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/system/boot/luksroot.nix | |
parent | b392d9b827cf4bb52141ab86e4202ec340f0b181 (diff) |
treewide: use more lib.optionalString
Diffstat (limited to 'nixos/modules/system/boot/luksroot.nix')
-rw-r--r-- | nixos/modules/system/boot/luksroot.nix | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index 8954c90812f9..b8f36538e70f 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -1024,13 +1024,12 @@ in copy_bin_and_libs ${pkgs.gnupg}/libexec/scdaemon ${concatMapStringsSep "\n" (x: - if x.gpgCard != null then + optionalString (x.gpgCard != null) '' mkdir -p $out/secrets/gpg-keys/${x.device} cp -a ${x.gpgCard.encryptedPass} $out/secrets/gpg-keys/${x.device}/cryptkey.gpg cp -a ${x.gpgCard.publicKey} $out/secrets/gpg-keys/${x.device}/pubkey.asc '' - else "" ) (attrValues luks.devices) } ''} |