feat: migrate nh
This commit is contained in:
parent
1eba02f65f
commit
1c99ea2b99
4 changed files with 30 additions and 0 deletions
5
modules/home/programs/default.nix
Normal file
5
modules/home/programs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./nh.nix
|
||||
];
|
||||
}
|
23
modules/home/programs/nh.nix
Normal file
23
modules/home/programs/nh.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.nh;
|
||||
in {
|
||||
options.marleyos.programs.nh.enable = lib.mkEnableOption "nh";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean =
|
||||
osConfig.programs.nh.clean
|
||||
or {
|
||||
enable = true;
|
||||
dates = "daily";
|
||||
extraArgs = "--keep-since 7d --keep 3";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
./nh.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ in {
|
|||
config = lib.mkIf cfg.enable {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "daily";
|
Loading…
Reference in a new issue