nixos/self-deploy: make systemd dependency conditional
As recommended in the discussion at #157883
This commit is contained in:
parent
221959fbbd
commit
e8ff81edb7
@ -126,9 +126,9 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
systemd.services.self-deploy = {
|
systemd.services.self-deploy = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
inherit (cfg) startAt;
|
||||||
|
|
||||||
startAt = cfg.startAt;
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
||||||
requires = lib.mkIf (!(isPathType cfg.repository)) [ "network-online.target" ];
|
requires = lib.mkIf (!(isPathType cfg.repository)) [ "network-online.target" ];
|
||||||
|
|
||||||
@ -140,8 +140,7 @@ in
|
|||||||
path = with pkgs; [
|
path = with pkgs; [
|
||||||
git
|
git
|
||||||
nix
|
nix
|
||||||
systemd
|
] ++ lib.optionals (cfg.switchCommand == "boot") [ systemd ];
|
||||||
];
|
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
if [ ! -e ${repositoryDirectory} ]; then
|
if [ ! -e ${repositoryDirectory} ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user