1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-19 12:57:29 +02:00

sd-switch: respect xdg directory specifications

This commit is contained in:
Chris Hodapp 2024-07-11 14:48:33 -07:00 committed by GitHub
parent c085b984ff
commit 90ae324e2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,6 +100,8 @@ let
settingsFormat.generate "user.conf" cfg.settings;
};
configHome = lib.removePrefix config.home.homeDirectory config.xdg.configHome;
in {
meta.maintainers = [ lib.maintainers.rycee ];
@ -355,13 +357,13 @@ in {
fi
if [[ -v oldGenPath ]]; then
oldUnitsDir="$oldGenPath/home-files/.config/systemd/user"
oldUnitsDir="$oldGenPath/home-files${configHome}/systemd/user"
if [[ ! -e $oldUnitsDir ]]; then
oldUnitsDir=
fi
fi
newUnitsDir="$newGenPath/home-files/.config/systemd/user"
newUnitsDir="$newGenPath/home-files${configHome}/systemd/user"
if [[ ! -e $newUnitsDir ]]; then
newUnitsDir=${pkgs.emptyDirectory}
fi