mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
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 {
|
||||
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" ];
|
||||
|
||||
@ -140,8 +140,7 @@ in
|
||||
path = with pkgs; [
|
||||
git
|
||||
nix
|
||||
systemd
|
||||
];
|
||||
] ++ lib.optionals (cfg.switchCommand == "boot") [ systemd ];
|
||||
|
||||
script = ''
|
||||
if [ ! -e ${repositoryDirectory} ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user