about summary refs log tree commit diff
path: root/nixos/modules/tasks/network-interfaces-scripted.nix
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-06-17 22:36:45 +0200
committerGitHub <noreply@github.com>2022-06-17 22:36:45 +0200
commit8effa309ccc676d037197e8684406b6d6d71bba2 (patch)
tree3a895f2c0e393a21cc68d4b2f6958f78113c98ea /nixos/modules/tasks/network-interfaces-scripted.nix
parentf461f3c7b0e7e715a7b40730e49becb7642ed942 (diff)
parentec00b4bb1186719bbee30a89ca7f519c30001abd (diff)
downloadnixlib-8effa309ccc676d037197e8684406b6d6d71bba2.tar
nixlib-8effa309ccc676d037197e8684406b6d6d71bba2.tar.gz
nixlib-8effa309ccc676d037197e8684406b6d6d71bba2.tar.bz2
nixlib-8effa309ccc676d037197e8684406b6d6d71bba2.tar.lz
nixlib-8effa309ccc676d037197e8684406b6d6d71bba2.tar.xz
nixlib-8effa309ccc676d037197e8684406b6d6d71bba2.tar.zst
nixlib-8effa309ccc676d037197e8684406b6d6d71bba2.zip
Merge pull request #176379 from SuperSandro2000/network-setup
nixos/network-interfaces-scripted: remove network-setup unit if unused
Diffstat (limited to 'nixos/modules/tasks/network-interfaces-scripted.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces-scripted.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix
index 66fdc61d2835..dce72b36fc50 100644
--- a/nixos/modules/tasks/network-interfaces-scripted.nix
+++ b/nixos/modules/tasks/network-interfaces-scripted.nix
@@ -90,7 +90,7 @@ let
           bindsTo = [ "network-setup.service" ];
         };
 
-        networkSetup =
+        networkSetup = lib.mkIf (config.networking.resolvconf.enable || cfg.defaultGateway != null || cfg.defaultGateway6 != null)
           { description = "Networking Setup";
 
             after = [ "network-pre.target" "systemd-udevd.service" "systemd-sysctl.service" ];