treewide: refactor bootloader config to common file

This commit is contained in:
Katherina Walshe-Grey 2024-10-01 19:20:34 +01:00
parent 1b18133585
commit cd84be16be
12 changed files with 30 additions and 53 deletions

10
common/boot.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, lib, pkgs, ... }:
{
boot.loader = {
systemd-boot.enable = true;
systemd-boot.editor = false;
systemd-boot.memtest86.enable = true;
efi.canTouchEfiVariables = true;
};
}

View file

@ -3,6 +3,7 @@
./base-graphical ./base-graphical
./base-server ./base-server
./users ./users
./boot.nix
./environment.nix ./environment.nix
./home-manager.nix ./home-manager.nix
./nginx.nix ./nginx.nix

View file

@ -8,9 +8,6 @@
networking.hostName = "kalessin"; networking.hostName = "kalessin";
networking.hostId = "534b538e"; networking.hostId = "534b538e";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
users.users.qenya.extraGroups = [ "wheel" ]; users.users.qenya.extraGroups = [ "wheel" ];
qenya.base-server.enable = true; qenya.base-server.enable = true;

View file

@ -1,14 +0,0 @@
{ config, lib, pkgs, ... }:
{
boot = {
loader.systemd-boot.enable = true;
loader.systemd-boot.editor = false;
loader.efi.canTouchEfiVariables = true;
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
kernelModules = [ "kvm-intel" ];
supportedFilesystems = [ "ntfs" ]; # for USB drives
};
}

View file

@ -1,12 +0,0 @@
{ config, lib, pkgs, ... }:
{
environment.etc.crypttab.text = ''
albion UUID=acda0e7a-069f-47c7-8e37-ec00e7cdde0f /root/luks-albion.key
'';
randomcat.services.zfs.datasets = {
"rpool_albion/data" = { mountpoint = "none"; };
"rpool_albion/data/steam" = { mountpoint = "/home/qenya/.local/share/Steam"; };
};
}

View file

@ -2,12 +2,9 @@
{ {
imports = [ imports = [
./boot.nix
./filesystems.nix ./filesystems.nix
./hardware.nix ./hardware.nix
./networking.nix ./networking.nix
./datasets.nix
./ftp.nix ./ftp.nix
]; ];
@ -15,6 +12,9 @@
networking.hostName = "kilgharrah"; networking.hostName = "kilgharrah";
networking.hostId = "72885bb5"; networking.hostId = "72885bb5";
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" ];
qenya.base-graphical.enable = true; qenya.base-graphical.enable = true;
qenya.base-graphical.desktop = "plasma6"; qenya.base-graphical.desktop = "plasma6";
@ -47,6 +47,11 @@
programs.steam.enable = true; programs.steam.enable = true;
randomcat.services.zfs.datasets = {
"rpool_albion/data" = { mountpoint = "none"; };
"rpool_albion/data/steam" = { mountpoint = "/home/qenya/.local/share/Steam"; };
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View file

@ -5,6 +5,12 @@
"cryptroot".device = "/dev/disk/by-uuid/b414aaba-0a36-4135-a7e1-dc9489286acd"; "cryptroot".device = "/dev/disk/by-uuid/b414aaba-0a36-4135-a7e1-dc9489286acd";
}; };
environment.etc.crypttab.text = ''
albion UUID=acda0e7a-069f-47c7-8e37-ec00e7cdde0f /root/luks-albion.key
'';
boot.supportedFilesystems = [ "ntfs" ]; # for USB drives
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b"; device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b";

View file

@ -8,9 +8,6 @@
networking.hostName = "orm"; networking.hostName = "orm";
networking.hostId = "00000000"; networking.hostId = "00000000";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
users.users.qenya.extraGroups = [ "wheel" ]; users.users.qenya.extraGroups = [ "wheel" ];
qenya.base-server.enable = true; qenya.base-server.enable = true;

View file

@ -1,14 +0,0 @@
{ config, lib, pkgs, ... }:
{
boot = {
loader.systemd-boot.enable = true;
loader.systemd-boot.editor = false;
loader.efi.canTouchEfiVariables = true;
initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ];
kernelModules = [ "kvm-intel" ];
supportedFilesystems = [ "ntfs" ]; # for USB drives
};
}

View file

@ -2,7 +2,6 @@
{ {
imports = [ imports = [
./boot.nix
./filesystems.nix ./filesystems.nix
./hardware.nix ./hardware.nix
./networking.nix ./networking.nix
@ -14,6 +13,9 @@
networking.hostName = "tohru"; networking.hostName = "tohru";
networking.hostId = "31da19c1"; networking.hostId = "31da19c1";
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ];
boot.kernelModules = [ "kvm-intel" ];
qenya.base-graphical.enable = true; qenya.base-graphical.enable = true;
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";

View file

@ -5,6 +5,8 @@
"rpool".device = "/dev/nvme0n1p2"; "rpool".device = "/dev/nvme0n1p2";
}; };
boot.supportedFilesystems = [ "ntfs" ]; # for USB drives
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "rpool/root"; device = "rpool/root";

View file

@ -8,9 +8,6 @@
networking.hostName = "yevaud"; networking.hostName = "yevaud";
networking.hostId = "09673d65"; networking.hostId = "09673d65";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
users.users.qenya.extraGroups = [ "wheel" ]; users.users.qenya.extraGroups = [ "wheel" ];
qenya.base-server.enable = true; qenya.base-server.enable = true;