about summary refs log tree commit diff
path: root/nixos/modules/security/rngd.nix
diff options
context:
space:
mode:
authorAlexander Kjeldaas <ak@formalprivacy.com>2014-04-22 13:41:22 +0200
committerAlexander Kjeldaas <ak@formalprivacy.com>2014-04-22 14:05:09 +0200
commitbaf4faeddc80cca49ba2ec9130744d6e300029df (patch)
tree6933e0fb773c63e8dfb405f82c80afca2df56ec0 /nixos/modules/security/rngd.nix
parent4cca346d21aa164729164f6568fa60225f0fb4ea (diff)
downloadnixlib-baf4faeddc80cca49ba2ec9130744d6e300029df.tar
nixlib-baf4faeddc80cca49ba2ec9130744d6e300029df.tar.gz
nixlib-baf4faeddc80cca49ba2ec9130744d6e300029df.tar.bz2
nixlib-baf4faeddc80cca49ba2ec9130744d6e300029df.tar.lz
nixlib-baf4faeddc80cca49ba2ec9130744d6e300029df.tar.xz
nixlib-baf4faeddc80cca49ba2ec9130744d6e300029df.tar.zst
nixlib-baf4faeddc80cca49ba2ec9130744d6e300029df.zip
Only disable TPM access by rngd when tcsd is enabled.
Diffstat (limited to 'nixos/modules/security/rngd.nix')
-rw-r--r--nixos/modules/security/rngd.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/security/rngd.nix b/nixos/modules/security/rngd.nix
index c47c1b2a67e6..4d8fabc7696e 100644
--- a/nixos/modules/security/rngd.nix
+++ b/nixos/modules/security/rngd.nix
@@ -30,7 +30,8 @@ with lib;
 
       description = "Hardware RNG Entropy Gatherer Daemon";
 
-      serviceConfig.ExecStart = "${pkgs.rng_tools}/sbin/rngd -f -v --no-tpm=1";
+      serviceConfig.ExecStart = "${pkgs.rng_tools}/sbin/rngd -f -v" +
+        (if config.services.tcsd.enable then " --no-tpm=1" else "");
 
       restartTriggers = [ pkgs.rng_tools ];
     };