From a3e0c39e40925693640c892c1b27761b398ed7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Flo=C3=9Fmann?= Date: Fri, 12 Jul 2024 11:18:25 +0200 Subject: [PATCH] add storage drives for muffinman --- hosts/muffinman/configuration.nix | 5 ++++- hosts/muffinman/hardware-configuration.nix | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/hosts/muffinman/configuration.nix b/hosts/muffinman/configuration.nix index 5778874..4c1a633 100644 --- a/hosts/muffinman/configuration.nix +++ b/hosts/muffinman/configuration.nix @@ -114,7 +114,10 @@ in # enableSSHSupport = true; # }; - # List services that you want to enable: + # auto unlock storage drive + environment.etc.crypttab.text = '' + cryptstorage UUID=74b68945-6edf-4141-93d4-bcccb310f7df /etc/secrets/storage_keyfile.key + ''; # Enable the OpenSSH daemon. services.openssh.enable = true; diff --git a/hosts/muffinman/hardware-configuration.nix b/hosts/muffinman/hardware-configuration.nix index 95099ca..0337db0 100644 --- a/hosts/muffinman/hardware-configuration.nix +++ b/hosts/muffinman/hardware-configuration.nix @@ -8,8 +8,8 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -26,7 +26,19 @@ options = [ "fmask=0022" "dmask=0022" ]; }; - swapDevices = [ ]; + fileSystems."/data/media" = + { device = "/dev/disk/by-uuid/203764d8-7e5d-4e61-8467-46dab635ceff"; + fsType = "ext4"; + }; + + fileSystems."/data/personal" = + { device = "/dev/disk/by-uuid/4fa1ebd4-eeee-44ab-a77b-df58edcf1813"; + fsType = "ext4"; + }; + + swapDevices = [ + { device = "/.swapfile"; size = 30518; } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's