32 lines
944 B
Nix
32 lines
944 B
Nix
{ inputs, self, ... }: let
|
|
mkNhAttrs = flake: {
|
|
enable = true;
|
|
inherit flake;
|
|
clean = {
|
|
enable = true;
|
|
dates = "Sun 05:00";
|
|
extraArgs = "--keep 5 --keep-since 3d";
|
|
};
|
|
};
|
|
in {
|
|
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
|
options.features.applications.cli.nh.enable = lib.mkEnableOption "nh";
|
|
|
|
config = lib.mkIf (config.features.applications.cli.nh.enable) {
|
|
programs.nh = mkNhAttrs config.info.rootPath;
|
|
|
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
|
features.applications.cli.nh.enable = lib.mkDefault true;
|
|
};
|
|
};
|
|
};
|
|
|
|
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
|
options.features.applications.cli.nh.enable = lib.mkEnableOption "nh";
|
|
|
|
config = lib.mkIf (config.features.applications.cli.nh.enable && config.info.isStandalone) {
|
|
programs.nh = mkNhAttrs config.info.rootPath;
|
|
};
|
|
};
|
|
}
|