diff --git a/modules/home/desktop/common/default.nix b/modules/home/desktop/common/default.nix new file mode 100644 index 0000000..9974475 --- /dev/null +++ b/modules/home/desktop/common/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./xdg-userdirs.nix + ]; +} diff --git a/modules/home/desktop/common/xdg-userdirs.nix b/modules/home/desktop/common/xdg-userdirs.nix index cce492e..b9e6c16 100644 --- a/modules/home/desktop/common/xdg-userdirs.nix +++ b/modules/home/desktop/common/xdg-userdirs.nix @@ -1,14 +1,17 @@ -{config, ...}: { +{config, ...}: let + inherit (config.home) homeDirectory; + home = f: "${homeDirectory}/${f}"; +in { xdg.userDirs = { enable = true; createDirectories = true; - templates = "${config.home.homeDirectory}/temps"; - publicShare = "${config.home.homeDirectory}/pub"; - desktop = "${config.home.homeDirectory}/desktop"; - download = "${config.home.homeDirectory}/downloads"; - documents = "${config.home.homeDirectory}/docs"; - pictures = "${config.home.homeDirectory}/pics"; - videos = "${config.home.homeDirectory}/vids"; - music = "${config.home.homeDirectory}/music"; + templates = home "temps"; + publicShare = home "pub"; + desktop = home "desktop"; + download = home "downloads"; + documents = home "docs"; + pictures = home "pics"; + videos = home "vids"; + music = home "music"; }; } diff --git a/modules/home/desktop/default.nix b/modules/home/desktop/default.nix index c18c8e5..58c0cf4 100644 --- a/modules/home/desktop/default.nix +++ b/modules/home/desktop/default.nix @@ -1,6 +1,6 @@ { imports = [ - ./common/xdg-userdirs.nix + ./common ./gnome ./hyprland ./niri