mirror of
https://github.com/nix-community/home-manager
synced 2024-11-09 20:59:44 +01:00
sd-switch: respect xdg directory specifications
This commit is contained in:
parent
c085b984ff
commit
90ae324e2c
1 changed files with 4 additions and 2 deletions
|
@ -100,6 +100,8 @@ let
|
||||||
settingsFormat.generate "user.conf" cfg.settings;
|
settingsFormat.generate "user.conf" cfg.settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
configHome = lib.removePrefix config.home.homeDirectory config.xdg.configHome;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ lib.maintainers.rycee ];
|
meta.maintainers = [ lib.maintainers.rycee ];
|
||||||
|
|
||||||
|
@ -355,13 +357,13 @@ in {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -v oldGenPath ]]; then
|
if [[ -v oldGenPath ]]; then
|
||||||
oldUnitsDir="$oldGenPath/home-files/.config/systemd/user"
|
oldUnitsDir="$oldGenPath/home-files${configHome}/systemd/user"
|
||||||
if [[ ! -e $oldUnitsDir ]]; then
|
if [[ ! -e $oldUnitsDir ]]; then
|
||||||
oldUnitsDir=
|
oldUnitsDir=
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
newUnitsDir="$newGenPath/home-files/.config/systemd/user"
|
newUnitsDir="$newGenPath/home-files${configHome}/systemd/user"
|
||||||
if [[ ! -e $newUnitsDir ]]; then
|
if [[ ! -e $newUnitsDir ]]; then
|
||||||
newUnitsDir=${pkgs.emptyDirectory}
|
newUnitsDir=${pkgs.emptyDirectory}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue