summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2015-01-08 09:36:29 -0500
committerShea Levy <shea@shealevy.com>2015-01-08 09:36:29 -0500
commitcca8bae86e092ac9fc2c1e771e3602eacd8fbd7f (patch)
treefac8146dcefdff0be6c8cd3f64f92bc2efd9ec6f /nixos
parentc023a2778c034a3bf05571c72098faddb4e0700d (diff)
parentdbc0395b2bc357ee9f62e6e8947b3ae83a89d53c (diff)
downloadnixpkgs-cca8bae86e092ac9fc2c1e771e3602eacd8fbd7f.tar
nixpkgs-cca8bae86e092ac9fc2c1e771e3602eacd8fbd7f.tar.gz
nixpkgs-cca8bae86e092ac9fc2c1e771e3602eacd8fbd7f.tar.bz2
nixpkgs-cca8bae86e092ac9fc2c1e771e3602eacd8fbd7f.tar.lz
nixpkgs-cca8bae86e092ac9fc2c1e771e3602eacd8fbd7f.tar.xz
nixpkgs-cca8bae86e092ac9fc2c1e771e3602eacd8fbd7f.tar.zst
nixpkgs-cca8bae86e092ac9fc2c1e771e3602eacd8fbd7f.zip
Merge branch 'rngd-fix' of git://github.com/abbradar/nixpkgs
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/security/rngd.nix4
1 files changed, 1 insertions, 3 deletions
diff --git a/nixos/modules/security/rngd.nix b/nixos/modules/security/rngd.nix
index 4d8fabc7696..b14ea7a5f27 100644
--- a/nixos/modules/security/rngd.nix
+++ b/nixos/modules/security/rngd.nix
@@ -20,7 +20,7 @@ with lib;
       KERNEL=="random", TAG+="systemd"
       SUBSYSTEM=="cpu", ENV{MODALIAS}=="x86cpu:*feature:*009E*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"
       KERNEL=="hw_random", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"
-      KERNEL=="tmp0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"
+      ${if config.services.tcsd.enable then "" else ''KERNEL=="tpm0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="rngd.service"''}
     '';
 
     systemd.services.rngd = {
@@ -32,8 +32,6 @@ with lib;
 
       serviceConfig.ExecStart = "${pkgs.rng_tools}/sbin/rngd -f -v" +
         (if config.services.tcsd.enable then " --no-tpm=1" else "");
-
-      restartTriggers = [ pkgs.rng_tools ];
     };
   };
 }