Manage xdg-user-dirs in home-manager

This commit is contained in:
Artemis Tosini 2023-10-19 00:02:04 +00:00
parent 696f20f632
commit 3efbdf866f
Signed by: artemist
GPG key ID: EE5227935FE3FF18
5 changed files with 55 additions and 30 deletions

View file

@ -201,11 +201,11 @@
]
},
"locked": {
"lastModified": 1697555443,
"narHash": "sha256-nsq8A+adEdN7bvVdz09LFyrHkTW5GtOzo/ctlHhyaaE=",
"lastModified": 1697622055,
"narHash": "sha256-t9rwzjlfgCnXDFGH3wsooYfAOA+XqQmgTojhzuNafZ4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b3acf1dc78b38a2fe03b287fead44d7ad25ac7c5",
"rev": "84fa81c7acb018c3c5a504dcefbc28a182c933c2",
"type": "github"
},
"original": {
@ -338,11 +338,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1697534983,
"narHash": "sha256-BRFBhLehpdoxtaRpPUzwSpZuVMjcmbhozhMNbeoDslk=",
"lastModified": 1697646003,
"narHash": "sha256-RNg0aTTxpEH+tO5Cxj3DuihfiZBo8veZAttCW1FscO4=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "465d09849a600f90e55f8a0f898fd11c2e292207",
"rev": "d560fc6183b4c6bf68f0846e6b1ef906f2c78929",
"type": "github"
},
"original": {

View file

@ -6,8 +6,16 @@
useGlobalPkgs = true;
};
home-manager.users.artemis = {
imports =
[ ./fish.nix ./gtk.nix ./git.nix ./mpv.nix ./kitty.nix ./ssh ./gpg.nix ];
imports = [
./fish.nix
./gtk.nix
./git.nix
./mpv.nix
./kitty.nix
./ssh
./gpg.nix
./dirs.nix
];
home.stateVersion = config.system.stateVersion;

10
home/dirs.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, lib, ... }:
{
xdg.userDirs = with lib; {
enable = true;
documents = mkDefault "${config.home.homeDirectory}/Dokumente";
music = mkDefault "${config.home.homeDirectory}/Musik";
pictures = mkDefault "${config.home.homeDirectory}/Bilder";
};
}

View file

@ -17,7 +17,8 @@
networking.hostName = "spike";
system.stateVersion = "23.11";
home-manager.users.artemis.xdg.configFile."rustybar/config.toml".text = ''
home-manager.users.artemis = {
xdg.configFile."rustybar/config.toml".text = ''
[[tile]]
type = "load"
[[tile]]
@ -31,7 +32,7 @@
format = "%Y-%m-%dT%H:%M:%S"
'';
home-manager.users.artemis.wayland.windowManager.sway.config = {
wayland.windowManager.sway.config = {
output."DSI-1" = {
pos = "0 0";
mode = "720x1280@60.083Hz";
@ -42,4 +43,6 @@
scroll_button = "BTN_MIDDLE";
};
};
xdg.userDirs.music = "/media/µsd/Musik";
};
}

View file

@ -135,6 +135,10 @@
type = "time"
format = "%Y-%m-%dT%H:%M:%S"
'';
xdg.userDirs = {
music = "/media/data/Musik";
pictures = "/media/luna/photos";
};
};
# NixOS
system.stateVersion = "21.11";