Skip to content

Commit

Permalink
Move TPM related code to hardware x86_64-generic as hardware dependen…
Browse files Browse the repository at this point in the history
…t module.

Signed-off-by: Manuel Bluhm <[email protected]>
  • Loading branch information
mbssrc authored and brianmcgillion committed May 9, 2024
1 parent a4f747c commit 3831db6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion modules/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
./firewall
./profiles
./security
./tpm2
./users/accounts.nix
./version
./virtualization/docker.nix
Expand Down
2 changes: 1 addition & 1 deletion modules/common/users/accounts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ in
extraGroups =
["wheel" "video" "networkmanager"]
++ optionals
config.ghaf.security.tpm2.enable ["tss"];
config.security.tpm2.enable ["tss"];
};
groups."${cfg.user}" = {
name = cfg.user;
Expand Down
1 change: 1 addition & 0 deletions modules/hardware/x86_64-generic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
./kernel/host
./kernel/host/pkvm
./x86_64-linux.nix
./modules/tpm2.nix
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
pkgs,
...
}: let
cfg = config.ghaf.security.tpm2;
cfg = config.ghaf.hardware.tpm2;
in
with lib; {
options.ghaf.security.tpm2 = {
options.ghaf.hardware.tpm2 = {
enable = mkEnableOption "TPM2 PKCS#11 interface";
};

Expand Down
3 changes: 1 addition & 2 deletions targets/lenovo-x1/everything.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@
# Hardware definitions
hardware.x86_64.common.enable = true;
hardware.generation = generation;

hardware.ax88179_178a.enable = true;
security.tpm2.enable = true;
hardware.tpm2.enable = true;

# Kernel hardening
host.kernel.hardening.enable = false;
Expand Down

0 comments on commit 3831db6

Please sign in to comment.