diff options
Diffstat (limited to '')
-rw-r--r-- | modules/common/common/xdg.nix | 75 |
1 files changed, 47 insertions, 28 deletions
diff --git a/modules/common/common/xdg.nix b/modules/common/common/xdg.nix index 04ca544..4463c15 100644 --- a/modules/common/common/xdg.nix +++ b/modules/common/common/xdg.nix @@ -1,18 +1,35 @@ +{ config, lib, ... }: +with lib; { - config, - lib, - ... -}: -with lib; { - imports = let - withBase = a: ["nixfiles" "modules" "common" "xdg" a]; - in [ - (mkAliasOptionModule ["dirs" "cache"] (withBase "cacheHome")) - (mkAliasOptionModule ["dirs" "config"] (withBase "configHome")) - (mkAliasOptionModule ["dirs" "data"] (withBase "dataHome")) - (mkAliasOptionModule ["dirs" "state"] (withBase "stateHome")) - (mkAliasOptionModule ["userDirs"] (withBase "userDirs")) - ]; + imports = + let + withBase = a: [ + "nixfiles" + "modules" + "common" + "xdg" + a + ]; + in + [ + (mkAliasOptionModule [ + "dirs" + "cache" + ] (withBase "cacheHome")) + (mkAliasOptionModule [ + "dirs" + "config" + ] (withBase "configHome")) + (mkAliasOptionModule [ + "dirs" + "data" + ] (withBase "dataHome")) + (mkAliasOptionModule [ + "dirs" + "state" + ] (withBase "stateHome")) + (mkAliasOptionModule [ "userDirs" ] (withBase "userDirs")) + ]; options.nixfiles.modules.common.xdg = { cacheHome = mkOption { @@ -33,21 +50,23 @@ with lib; { }; userDirs = mkOption { type = types.attrs; - default = let - inherit (config.my) home; - tmp = home + "/tmp"; - in { - enable = true; + default = + let + inherit (config.my) home; + tmp = home + "/tmp"; + in + { + enable = true; - desktop = tmp; - documents = "${home}/doc"; - download = tmp; - music = tmp; - pictures = tmp; - publicShare = "${home}/share"; - templates = tmp; - videos = tmp; - }; + desktop = tmp; + documents = "${home}/doc"; + download = tmp; + music = tmp; + pictures = tmp; + publicShare = "${home}/share"; + templates = tmp; + videos = tmp; + }; }; }; } |