diff options
| -rw-r--r-- | system/default.nix | 1 | ||||
| -rw-r--r-- | system/encryption.nix | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/system/default.nix b/system/default.nix index 0893ac0..5022caf 100644 --- a/system/default.nix +++ b/system/default.nix @@ -10,6 +10,7 @@ ./programs.nix ./services.nix ./users.nix + ./encryption.nix # Desktop and stylix are now configured per-rice in home/rices/*/system.nix ]; diff --git a/system/encryption.nix b/system/encryption.nix new file mode 100644 index 0000000..152d657 --- /dev/null +++ b/system/encryption.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + cryptsetup + ]; + + environment.etc."crypttab" = { + text = '' + ssh-keys UUID=da31e270-80d4-4a89-9633-87dd4d736ca2 none noauto,x-systemd.device-timeout=0 + ''; + }; + + fileSystems."/mnt/ssh-keys" = { + device = "/dev/mapper/ssh-keys"; + fsType = "ext4"; + options = ["noauto" "nofail" "x-systemd.automount" "x-systemd.idle-timeout=300"]; + }; +} |
