mirror of
https://github.com/nix-community/home-manager
synced 2024-12-27 12:19:48 +01:00
bc90de24d8
Previously, this module was all-or-nothing with its pre-defined user dirs. This allows e.g. `xdg.userDirs.desktop = null;` to opt-out of some configuration while still benefiting from the rest.
26 lines
692 B
Nix
26 lines
692 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
config = {
|
|
xdg.userDirs = {
|
|
enable = true;
|
|
desktop = null;
|
|
};
|
|
|
|
nmt.script = ''
|
|
configFile=home-files/.config/user-dirs.dirs
|
|
assertFileExists $configFile
|
|
assertFileContent $configFile ${
|
|
pkgs.writeText "expected" ''
|
|
XDG_DOCUMENTS_DIR="/home/hm-user/Documents"
|
|
XDG_DOWNLOAD_DIR="/home/hm-user/Downloads"
|
|
XDG_MUSIC_DIR="/home/hm-user/Music"
|
|
XDG_PICTURES_DIR="/home/hm-user/Pictures"
|
|
XDG_PUBLICSHARE_DIR="/home/hm-user/Public"
|
|
XDG_TEMPLATES_DIR="/home/hm-user/Templates"
|
|
XDG_VIDEOS_DIR="/home/hm-user/Videos"
|
|
''
|
|
}
|
|
'';
|
|
};
|
|
}
|