feat: files force,,,

This commit is contained in:
Kat Inskip 2025-07-14 08:55:51 -07:00
parent 8ea560f504
commit 1d5c0a1d15
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
5 changed files with 49 additions and 16 deletions

View file

@ -0,0 +1,27 @@
{
config,
options,
lib,
...
}: let
inherit (lib.types) attrsOf submodule;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.modules) mkDefault;
inherit (lib.attrsets) genAttrs;
fileOption = mkOption {
type = attrsOf (submodule (
_: {
config.force = mkDefault config.home.clobberAllFiles;
}
));
};
in {
options = {
home = {
clobberAllFiles = mkEnableOption "clobbering all files";
file = fileOption;
};
xdg = genAttrs [ "configFile" "cacheFile" "stateFile" "dataFile" ] (_: fileOption);
};
}