fix: use lib.recursiveUpdate where it is necessary
This commit is contained in:
parent
b31362656d
commit
3f43173838
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
secretsDir,
|
secretsDir,
|
||||||
...
|
...
|
||||||
@ -65,7 +66,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
vps-prune = cfg.vps-backup // {
|
vps-prune = lib.recursiveUpdate cfg.vps-backup {
|
||||||
backup = false;
|
backup = false;
|
||||||
prune = true;
|
prune = true;
|
||||||
createWrapper = false;
|
createWrapper = false;
|
||||||
|
@ -4,7 +4,12 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption mkEnableOption mkIf;
|
inherit (lib)
|
||||||
|
mkEnableOption
|
||||||
|
mkIf
|
||||||
|
mkOption
|
||||||
|
recursiveUpdate
|
||||||
|
;
|
||||||
inherit (lib.types) listOf path str;
|
inherit (lib.types) listOf path str;
|
||||||
cfg = config.persist;
|
cfg = config.persist;
|
||||||
in
|
in
|
||||||
@ -31,11 +36,11 @@ in
|
|||||||
};
|
};
|
||||||
# Stuff that matters
|
# Stuff that matters
|
||||||
# TODO backups
|
# TODO backups
|
||||||
state = {
|
state = recursiveUpdate {
|
||||||
# backup = {...};
|
# backup = {...};
|
||||||
} // common;
|
} common;
|
||||||
# Stuff that's just there to speed up the system
|
# Stuff that's just there to speed up the system
|
||||||
cache = {
|
cache = recursiveUpdate {
|
||||||
clean = {
|
clean = {
|
||||||
enable = mkEnableOption "cleaning the cache files and directories";
|
enable = mkEnableOption "cleaning the cache files and directories";
|
||||||
dates = mkOption {
|
dates = mkOption {
|
||||||
@ -44,7 +49,7 @@ in
|
|||||||
description = "A systemd.time calendar description of when to clean the cache files";
|
description = "A systemd.time calendar description of when to clean the cache files";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} // common;
|
} common;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ let
|
|||||||
mkOption
|
mkOption
|
||||||
nameValuePair
|
nameValuePair
|
||||||
optionalAttrs
|
optionalAttrs
|
||||||
|
recursiveUpdate
|
||||||
;
|
;
|
||||||
inherit (lib.types) listOf path str;
|
inherit (lib.types) listOf path str;
|
||||||
inherit (builtins) concatMap;
|
inherit (builtins) concatMap;
|
||||||
@ -46,11 +47,11 @@ in
|
|||||||
};
|
};
|
||||||
# Stuff that matters
|
# Stuff that matters
|
||||||
# TODO backups
|
# TODO backups
|
||||||
state = {
|
state = recursiveUpdate {
|
||||||
# backup = {...};
|
# backup = {...};
|
||||||
} // common;
|
} common;
|
||||||
# Stuff that's just there to speed up the system
|
# Stuff that's just there to speed up the system
|
||||||
cache = {
|
cache = recursiveUpdate {
|
||||||
clean = {
|
clean = {
|
||||||
enable = mkEnableOption "cleaning the cache files and directories";
|
enable = mkEnableOption "cleaning the cache files and directories";
|
||||||
dates = mkOption {
|
dates = mkOption {
|
||||||
@ -59,7 +60,7 @@ in
|
|||||||
description = "A systemd.time calendar description of when to clean the cache files";
|
description = "A systemd.time calendar description of when to clean the cache files";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} // common;
|
} common;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user