summaryrefslogtreecommitdiff
path: root/system/tpm.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--system/tpm.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/tpm.nix b/system/tpm.nix
new file mode 100644
index 0000000..c7507da
--- /dev/null
+++ b/system/tpm.nix
@@ -0,0 +1,14 @@
+{
+ lib,
+ config,
+ ...
+}: let
+ inherit (lib) mkIf;
+in {
+ config = mkIf config.tpm {
+ security.tpm2.enable = true;
+ security.tpm2.pkcs11.enable = true;
+ security.tpm2.tctiEnvironment.enable = true;
+ users.groups.tss.members = [config.user];
+ };
+}