diff options
author | System administrator <root@nixos.lan> | 2015-08-22 23:28:41 +0000 |
---|---|---|
committer | System administrator <root@nixos.lan> | 2015-08-22 23:28:41 +0000 |
commit | f666c217906382bd63dddc83f7f822c1798c3df7 (patch) | |
tree | 0b6899889ee3e41e879388542b9fdf8e62bc75b9 /makefu/2configs/sda-crypto-root-home.nix | |
parent | 3496e869000f7b4059ec5c2597b0504f6cb855ea (diff) |
add pornocauster systems
Diffstat (limited to 'makefu/2configs/sda-crypto-root-home.nix')
-rw-r--r-- | makefu/2configs/sda-crypto-root-home.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/makefu/2configs/sda-crypto-root-home.nix b/makefu/2configs/sda-crypto-root-home.nix new file mode 100644 index 000000000..28d140119 --- /dev/null +++ b/makefu/2configs/sda-crypto-root-home.nix @@ -0,0 +1,35 @@ +{ config, lib, pkgs, ... }: + +# sda: bootloader grub2 +# sda1: boot ext4 (label nixboot) +# sda2: cryptoluks -> ext4 +with lib; +{ + boot = { + loader.grub.enable =true; + loader.grub.version =2; + loader.grub.device = "/dev/sda"; + + initrd.luks.devices = [ { name = "main"; device = "/dev/sda2"; allowDiscards=true; }]; + initrd.luks.cryptoModules = ["aes" "sha512" "sha1" "xts" ]; + initrd.availableKernelModules = ["xhci_hcd" "ehci_pci" "ahci" "usb_storage" ]; + }; + fileSystems = { + "/" = { + device = "/dev/mapper/main-root"; + fsType = "ext4"; + options="defaults,discard"; + }; + # TODO: just import sda-crypto-root, add this device + "/home" = { + device = "/dev/mapper/main-home"; + fsType = "ext4"; + options="defaults,discard"; + }; + "/boot" = { + device = "/dev/disk/by-label/nixboot"; + fsType = "ext4"; + options="defaults,discard"; + }; + }; +} |