diff options
author | Felix Buehler <account@buehler.rocks> | 2023-03-19 21:44:31 +0100 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2023-04-07 13:38:33 +0200 |
commit | 327b0cff7aedc20a148d245b1182f43800acc1f5 (patch) | |
tree | a498ae1b2dd2289310483d81345903d7e9123cb7 /nixos/modules/virtualisation/nixos-containers.nix | |
parent | b392d9b827cf4bb52141ab86e4202ec340f0b181 (diff) |
treewide: use more lib.optionalString
Diffstat (limited to 'nixos/modules/virtualisation/nixos-containers.nix')
-rw-r--r-- | nixos/modules/virtualisation/nixos-containers.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/modules/virtualisation/nixos-containers.nix b/nixos/modules/virtualisation/nixos-containers.nix index 669981da5974..d54e2ed3f3ae 100644 --- a/nixos/modules/virtualisation/nixos-containers.nix +++ b/nixos/modules/virtualisation/nixos-containers.nix @@ -170,11 +170,11 @@ let --setenv HOST_PORT="$HOST_PORT" \ --setenv PATH="$PATH" \ ${optionalString cfg.ephemeral "--ephemeral"} \ - ${if cfg.additionalCapabilities != null && cfg.additionalCapabilities != [] then - ''--capability="${concatStringsSep "," cfg.additionalCapabilities}"'' else "" + ${optionalString (cfg.additionalCapabilities != null && cfg.additionalCapabilities != []) + ''--capability="${concatStringsSep "," cfg.additionalCapabilities}"'' } \ - ${if cfg.tmpfs != null && cfg.tmpfs != [] then - ''--tmpfs=${concatStringsSep " --tmpfs=" cfg.tmpfs}'' else "" + ${optionalString (cfg.tmpfs != null && cfg.tmpfs != []) + ''--tmpfs=${concatStringsSep " --tmpfs=" cfg.tmpfs}'' } \ ${containerInit cfg} "''${SYSTEM_PATH:-/nix/var/nix/profiles/system}/init" ''; |