pluto: add external disk

This commit is contained in:
Nico 2025-05-03 16:16:03 +10:00
parent 551b17baef
commit 754a6b403f
4 changed files with 51 additions and 5 deletions

View file

@ -41,11 +41,8 @@
./modules/hardware/secureboot.nix ./modules/hardware/secureboot.nix
lanzaboote.nixosModules.lanzaboote lanzaboote.nixosModules.lanzaboote
./hosts/disko-desktop.nix ./hosts/pluto/configuration.nix
disko.nixosModules.disko disko.nixosModules.disko
./hosts/pluto/conf.nix
./hosts/pluto/specialisation.nix
./hosts/pluto/hardware-configuration.nix
]; ];
}; };

View file

@ -1,6 +1,12 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [
./disko.nix
./hardware-configuration.nix
./specialisation.nix
];
networking.hostName = "pluto"; networking.hostName = "pluto";
hardware.graphics.enable = true; hardware.graphics.enable = true;

View file

@ -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" ];
};
};
};
};
};
};
};
};
}; };
}; };
} }

View file

@ -8,7 +8,7 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (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.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];