Skip to content

Commit

Permalink
add flakeDir option to automatically set the FLAKE variable
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAShelf committed Dec 12, 2023
1 parent 375c6cf commit 3684973
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ self: {
description = "Which NH package to use";
};

flakeDir = mkOption {
type = types.str;
default = "";
description = "The directory that will be used for the `FLAKE` environment variable";
};

clean = {
enable = mkOption {
type = types.bool;
Expand Down Expand Up @@ -47,7 +53,12 @@ self: {
}
];

environment.systemPackages = [config.nh.package];
environment = {
systemPackages = [config.nh.package];
variables = {
FLAKE = config.nh.flakeDir;
};
};

systemd = lib.mkIf config.nh.clean.enable {
services.nh-clean = {
Expand Down

0 comments on commit 3684973

Please sign in to comment.