diff --git a/flake.nix b/flake.nix index 237cf09..224ad4c 100644 --- a/flake.nix +++ b/flake.nix @@ -41,11 +41,8 @@ ./modules/hardware/secureboot.nix lanzaboote.nixosModules.lanzaboote - ./hosts/disko-desktop.nix + ./hosts/pluto/configuration.nix disko.nixosModules.disko - ./hosts/pluto/conf.nix - ./hosts/pluto/specialisation.nix - ./hosts/pluto/hardware-configuration.nix ]; }; diff --git a/hosts/pluto/conf.nix b/hosts/pluto/configuration.nix similarity index 70% rename from hosts/pluto/conf.nix rename to hosts/pluto/configuration.nix index f581ba8..6f099b9 100644 --- a/hosts/pluto/conf.nix +++ b/hosts/pluto/configuration.nix @@ -1,6 +1,12 @@ { config, lib, pkgs, ... }: { + imports = [ + ./disko.nix + ./hardware-configuration.nix + ./specialisation.nix + ]; + networking.hostName = "pluto"; hardware.graphics.enable = true; diff --git a/hosts/disko-desktop.nix b/hosts/pluto/disko.nix similarity index 54% rename from hosts/disko-desktop.nix rename to hosts/pluto/disko.nix index 5d73a54..39011a3 100644 --- a/hosts/disko-desktop.nix +++ b/hosts/pluto/disko.nix @@ -56,6 +56,49 @@ }; }; }; + media = { + type = "disk"; + device = "/dev/sda"; + content = { + type = "gpt"; + partitions = { + luks = { + size = "100%"; + content = { + type = "luks"; + name = "media"; + settings = { + allowDiscards = true; + fallbackToPassword = false; + keyFile = "/sysroot/var/lib/disk-media.key"; + }; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/media/shows" = { + mountpoint = "/media/shows"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/media/movies" = { + mountpoint = "/media/movies"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/media/music" = { + mountpoint = "/media/music"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/media/books" = { + mountpoint = "/media/books"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + }; }; }; } diff --git a/hosts/pluto/hardware-configuration.nix b/hosts/pluto/hardware-configuration.nix index 861da36..77a2497 100644 --- a/hosts/pluto/hardware-configuration.nix +++ b/hosts/pluto/hardware-configuration.nix @@ -8,7 +8,7 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "uas" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ];