summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-05-07 20:53:47 +0200
committerAdrian Kummerlaender2018-05-07 20:53:47 +0200
commit0f04ebeab7291fb39bba83a031d777947a8b18fd (patch)
tree1b5e3f9c24751b76149fec30430982cfbb67cbaa
parent0dd401a70b5820b8991c0c3a62fd0661e2e463b5 (diff)
downloadnixos_system-0f04ebeab7291fb39bba83a031d777947a8b18fd.tar
nixos_system-0f04ebeab7291fb39bba83a031d777947a8b18fd.tar.gz
nixos_system-0f04ebeab7291fb39bba83a031d777947a8b18fd.tar.bz2
nixos_system-0f04ebeab7291fb39bba83a031d777947a8b18fd.tar.lz
nixos_system-0f04ebeab7291fb39bba83a031d777947a8b18fd.tar.xz
nixos_system-0f04ebeab7291fb39bba83a031d777947a8b18fd.tar.zst
nixos_system-0f04ebeab7291fb39bba83a031d777947a8b18fd.zip
Switch system to LUKS-encrypted SSD
As hoped redeployment consisted only of partioning the new drive, copying the config and calling `nixos-install`.
-rw-r--r--configuration.nix21
-rw-r--r--hardware-configuration.nix9
2 files changed, 24 insertions, 6 deletions
diff --git a/configuration.nix b/configuration.nix
index b318c58..8fcab2e 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -8,12 +8,25 @@
./conf/fish.nix
];
- boot.loader.grub = {
- enable = true;
- version = 2;
- device = "/dev/sda";
+ boot = {
+ loader.grub = {
+ enable = true;
+ version = 2;
+ device = "/dev/sdb";
+ };
+
+ initrd.luks.devices = [
+ {
+ name = "root";
+ device = "/dev/disk/by-uuid/6205da24-b1b2-402c-b175-4036e678dea9";
+ preLVM = true;
+ allowDiscards = true;
+ }
+ ];
};
+ fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
+
networking = {
hostName = "obelix";
firewall.enable = false;
diff --git a/hardware-configuration.nix b/hardware-configuration.nix
index 3ddc0eb..eb6140b 100644
--- a/hardware-configuration.nix
+++ b/hardware-configuration.nix
@@ -13,12 +13,17 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
- { device = "/dev/disk/by-uuid/cd4fe873-d75a-4810-bbc8-2dc00144619a";
+ { device = "/dev/disk/by-uuid/ac766046-c9cd-4771-b591-f74d50aa8500";
fsType = "ext4";
};
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/20ea14b0-33ef-4fa1-a861-fd1156a0b60d";
+ fsType = "ext2";
+ };
+
swapDevices =
- [ { device = "/dev/disk/by-uuid/4ac4ae45-de8e-4c3f-b026-0d1b70aea2e2"; }
+ [ { device = "/dev/disk/by-uuid/0732dc69-7d30-4e99-af6d-d12b927945eb"; }
];
nix.maxJobs = lib.mkDefault 8;