File tree Expand file tree Collapse file tree 4 files changed +68
-1
lines changed Expand file tree Collapse file tree 4 files changed +68
-1
lines changed Original file line number Diff line number Diff line change 44 xdg-mime-disabled = ./mime-disabled.nix ;
55 xdg-autostart = ./autostart.nix ;
66 xdg-autostart-readonly = ./autostart-readonly.nix ;
7+ xdg-user-dirs-mixed = ./user-dirs-mixed.nix ;
8+ xdg-user-dirs-null = ./user-dirs-null.nix ;
9+ xdg-user-dirs-short = ./user-dirs-short.nix ;
710}
Original file line number Diff line number Diff line change 22 xdg-mime-apps-basics = ./mime-apps-basics.nix ;
33 xdg-system-dirs = ./system-dirs.nix ;
44 xdg-desktop-entries = ./desktop-entries.nix ;
5- xdg-user-dirs-null = ./user-dirs-null.nix ;
65 xdg-portal = ./portal.nix ;
76 xdg-mime = ./mime.nix ;
87 xdg-mime-package = ./mime-packages.nix ;
Original file line number Diff line number Diff line change 1+ {
2+ config ,
3+ pkgs ,
4+ ...
5+ } :
6+
7+ {
8+ config = {
9+ home . stateVersion = "25.05" ;
10+
11+ xdg . userDirs = {
12+ enable = true ;
13+ extraConfig . PROJECTS = "${ config . home . homeDirectory } /Projects" ;
14+ ## This will stop working with stateVersion 25.11.
15+ extraConfig . XDG_MISC_DIR = "${ config . home . homeDirectory } /Misc" ;
16+ } ;
17+
18+ nmt . script = ''
19+ configFile=home-files/.config/user-dirs.dirs
20+ assertFileExists $configFile
21+ assertFileContent $configFile ${ pkgs . writeText "expected" ''
22+ XDG_DESKTOP_DIR="/home/hm-user/Desktop"
23+ XDG_DOCUMENTS_DIR="/home/hm-user/Documents"
24+ XDG_DOWNLOAD_DIR="/home/hm-user/Downloads"
25+ XDG_MISC_DIR="/home/hm-user/Misc"
26+ XDG_MUSIC_DIR="/home/hm-user/Music"
27+ XDG_PICTURES_DIR="/home/hm-user/Pictures"
28+ XDG_PROJECTS_DIR="/home/hm-user/Projects"
29+ XDG_PUBLICSHARE_DIR="/home/hm-user/Public"
30+ XDG_TEMPLATES_DIR="/home/hm-user/Templates"
31+ XDG_VIDEOS_DIR="/home/hm-user/Videos"
32+ '' }
33+ '' ;
34+ } ;
35+ }
Original file line number Diff line number Diff line change 1+ {
2+ config ,
3+ pkgs ,
4+ ...
5+ } :
6+
7+ {
8+ config = {
9+ xdg . userDirs = {
10+ enable = true ;
11+ extraConfig . PROJECTS = "${ config . home . homeDirectory } /Projects" ;
12+ } ;
13+
14+ nmt . script = ''
15+ configFile=home-files/.config/user-dirs.dirs
16+ assertFileExists $configFile
17+ assertFileContent $configFile ${ pkgs . writeText "expected" ''
18+ XDG_DESKTOP_DIR="/home/hm-user/Desktop"
19+ XDG_DOCUMENTS_DIR="/home/hm-user/Documents"
20+ XDG_DOWNLOAD_DIR="/home/hm-user/Downloads"
21+ XDG_MUSIC_DIR="/home/hm-user/Music"
22+ XDG_PICTURES_DIR="/home/hm-user/Pictures"
23+ XDG_PROJECTS_DIR="/home/hm-user/Projects"
24+ XDG_PUBLICSHARE_DIR="/home/hm-user/Public"
25+ XDG_TEMPLATES_DIR="/home/hm-user/Templates"
26+ XDG_VIDEOS_DIR="/home/hm-user/Videos"
27+ '' }
28+ '' ;
29+ } ;
30+ }
You can’t perform that action at this time.
0 commit comments