From 316870051a58dc29cc8d2939520726e0a9bb88d1 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Fri, 25 Oct 2024 19:53:54 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(xdg):=20Set=20XDG=20dirs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/default.nix | 3 +++ home/xdg/default.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 home/xdg/default.nix diff --git a/home/default.nix b/home/default.nix index 1f69643..b81c469 100644 --- a/home/default.nix +++ b/home/default.nix @@ -13,6 +13,8 @@ # Enable flakes. nix.settings.experimental-features = ["nix-command" "flakes"]; + targets.genericLinux.enable = true; + home.packages = with pkgs; [ inputs.alejandra.defaultPackage.${system} just @@ -26,6 +28,7 @@ ./btop ./cava ./gh + ./xdg ]; # This value determines the Home Manager release that your configuration is diff --git a/home/xdg/default.nix b/home/xdg/default.nix new file mode 100644 index 0000000..4a608ab --- /dev/null +++ b/home/xdg/default.nix @@ -0,0 +1,27 @@ +{config, ...}: { + home.preferXdgDirectories = true; + + xdg = let + homeDir = config.home.homeDirectory; + in { + enable = true; + + cacheHome = "${homeDir}/.cache"; + configHome = "${homeDir}/.config"; + dataHome = "${homeDir}/.local/share"; + stateHome = "${homeDir}/.local/state"; + + userDirs = { + enable = true; + createDirectories = true; + + desktop = "${homeDir}/desktop"; + documents = null; + download = "${homeDir}/downloads"; + music = null; + pictures = "${homeDir}/pictures"; + templates = null; + videos = "${homeDir}/videos"; + }; + }; +}