feat(xdg): Set XDG dirs

This commit is contained in:
punkfairie 2024-10-25 19:53:54 -07:00
parent ee2dcf2784
commit 316870051a
2 changed files with 30 additions and 0 deletions

View file

@ -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

27
home/xdg/default.nix Normal file
View file

@ -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";
};
};
}