From f666c217906382bd63dddc83f7f822c1798c3df7 Mon Sep 17 00:00:00 2001 From: System administrator Date: Sat, 22 Aug 2015 23:28:41 +0000 Subject: add pornocauster systems --- makefu/2configs/sda-crypto-root-home.nix | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 makefu/2configs/sda-crypto-root-home.nix (limited to 'makefu/2configs/sda-crypto-root-home.nix') 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"; + }; + }; +} -- cgit v1.2.3 From 7a1e2f83b242b6779e1590082fbe93a8ed429611 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 23 Aug 2015 02:48:35 +0200 Subject: makefu: cleanup,refactoring after transfer --- makefu/2configs/sda-crypto-root-home.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'makefu/2configs/sda-crypto-root-home.nix') diff --git a/makefu/2configs/sda-crypto-root-home.nix b/makefu/2configs/sda-crypto-root-home.nix index 28d140119..3821c7504 100644 --- a/makefu/2configs/sda-crypto-root-home.nix +++ b/makefu/2configs/sda-crypto-root-home.nix @@ -1,8 +1,12 @@ { config, lib, pkgs, ... }: +# ssd # # sda: bootloader grub2 # sda1: boot ext4 (label nixboot) -# sda2: cryptoluks -> ext4 +# sda2: cryptoluks -> lvm: +# / (main-root) +# /home (main-home) + with lib; { boot = { -- cgit v1.2.3