mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01:00
systemd: force copying of unit files
This is done by exploiting the fact that home files will be copied if the executable bit of the source file and the target file is different. This should be considered a hack until some nicer solution is found.
This commit is contained in:
parent
54043df8fb
commit
f52ec0df7c
1 changed files with 3 additions and 3 deletions
|
@ -24,17 +24,17 @@ let
|
|||
|
||||
buildService = style: name: serviceCfg:
|
||||
let
|
||||
source = pkgs.writeText "${name}.${style}" (toSystemdIni serviceCfg);
|
||||
source = pkgs.writeScript "${name}.${style}" (toSystemdIni serviceCfg);
|
||||
|
||||
wantedBy = target:
|
||||
{
|
||||
name = "systemd/user/${target}.wants/${name}.${style}";
|
||||
value = { inherit source; };
|
||||
value = { inherit source; executable = false; };
|
||||
};
|
||||
in
|
||||
singleton {
|
||||
name = "systemd/user/${name}.${style}";
|
||||
value = { inherit source; };
|
||||
value = { inherit source; executable = false; };
|
||||
}
|
||||
++
|
||||
map wantedBy (serviceCfg.Install.WantedBy or []);
|
||||
|
|
Loading…
Reference in a new issue