Add luks encrypted fs

This commit is contained in:
Dave Gallant
2021-01-23 16:24:21 -05:00
parent 64401beff4
commit 0255469ad3
2 changed files with 19 additions and 16 deletions

View File

@@ -1,28 +1,31 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules =
boot.initrd.kernelModules = [ ]; [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = boot.initrd.luks.devices.luksroot = {
{ device = "/dev/disk/by-uuid/e39690f0-4026-4571-969f-493efa0d1c96"; device = "/dev/disk/by-uuid/4b886807-3e19-437c-84bb-c2dd766fc19b";
fsType = "ext4"; allowDiscards = true;
}; };
fileSystems."/boot" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/B2C8-621E"; device = "/dev/disk/by-uuid/48d2e958-00a0-47fa-8c32-9aec031f6098";
fsType = "vfat"; fsType = "ext4";
}; };
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D387-B640";
fsType = "vfat";
};
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/0933f280-888d-4eff-9274-a515bcccca4e"; } [{ device = "/dev/disk/by-uuid/92c35fa7-2d2e-4172-abaf-4c81599782f1"; }];
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
} }

View File

@@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
inherit (src.meta) homepage; inherit (src.meta) homepage;
license = licenses.gpl3; license = licenses.gpl3;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ samuelgrf ]; maintainers = with maintainers; [ davegallant ];
}; };
} }