Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ On NixOS and nix-darwin, simply replace your `nix.package`, like so:
```nix
nix.package = pkgs.nix-monitored;
```
And then import and enable it like this:
```nix
{
imports = [
inputs.nix-monitored.nixosModules.default
];

nix.monitored.enable = true;
}
```
Comment on lines +36 to +45
Copy link
Copy Markdown
Owner

@ners ners Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Importing and enabling the module actually replaces setting nix.package manually, as that's part of the module's implementation: https://github.com/ners/nix-monitored/blob/master/flake.nix#L108

I'd also like to mention that there is also a Darwin module available, not just a NixOS one.


You can also import it in the overlay below by putting this line inside alongside the rest:
```
nix-monitored = inputs.nix-monitored.packages.${self.system}.default.override self;
```
Comment on lines +47 to +50
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably rather be added to the module: https://github.com/ners/nix-monitored/blob/master/flake.nix#L109


To make it work with `nix-direnv` and `nixos-rebuild`, we can override those packages:
```nix
Expand All @@ -44,6 +59,7 @@ nixpkgs.overlays = [
nix-direnv = super.nix-direnv.override {
nix = super.nix-monitored;
};
# Line above here if you want it.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this entire section is obsolete if you use the module, and can be removed.

})
];
```
Expand Down