Files
nix-flake/modules/features/applications/cli/nh.nix
T
greyweather 81e85743de
Build docs with nix and Material for mkDocs / build-docs (push) Successful in 1m33s
move options to separate modules, set up mkDocs generation
2026-09-01 03:08:10 +01:00

28 lines
792 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, ... }: {
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, ... }: {
config = lib.mkIf (config.features.applications.cli.nh.enable && config.info.isStandalone) {
programs.nh = mkNhAttrs config.info.rootPath;
};
};
}