diff options
author | William Carroll <wpcarro@google.com> | 2022-02-03 11:32:27 -0800 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2022-02-04 10:59:24 +0100 |
commit | e8ff81edb79b433f6574c4866b2ebfde4888f950 (patch) | |
tree | 4cb01be7ab4d198ea28c7895d0eb51c20c625a68 | |
parent | 221959fbbd25dc8954ab4cd0e55f8ece5f5a220d (diff) | |
download | nixpkgs-e8ff81edb79b433f6574c4866b2ebfde4888f950.tar nixpkgs-e8ff81edb79b433f6574c4866b2ebfde4888f950.tar.gz nixpkgs-e8ff81edb79b433f6574c4866b2ebfde4888f950.tar.bz2 nixpkgs-e8ff81edb79b433f6574c4866b2ebfde4888f950.tar.lz nixpkgs-e8ff81edb79b433f6574c4866b2ebfde4888f950.tar.xz nixpkgs-e8ff81edb79b433f6574c4866b2ebfde4888f950.tar.zst nixpkgs-e8ff81edb79b433f6574c4866b2ebfde4888f950.zip |
nixos/self-deploy: make systemd dependency conditional
As recommended in the discussion at #157883
-rw-r--r-- | nixos/modules/services/system/self-deploy.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/nixos/modules/services/system/self-deploy.nix b/nixos/modules/services/system/self-deploy.nix index 6224c8f748e..d7130a13c73 100644 --- a/nixos/modules/services/system/self-deploy.nix +++ b/nixos/modules/services/system/self-deploy.nix @@ -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 |