cyclone: Migrate to Linux subdirectory

This commit is contained in:
Spotlight 2024-10-07 21:46:30 -05:00
parent 2265ae8eac
commit 1d5090762b
Signed by: spotlight
GPG key ID: 874AA355B3209BDC
4 changed files with 5 additions and 2 deletions

View file

@ -0,0 +1,80 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
# We'll use systemd-boot.
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
# Use the latest kernel.
# As such, we'll also use unstable ZFS.
kernelPackages = pkgs.linuxPackages_6_10;
zfs = {
package = pkgs.zfs_unstable;
# For reasons unbeknownst to humanity, this drive
# appears to keep changing identifiers or similar.
# Prefer by-partuuid instead.
#
# (We could also do by-uuid, but it'd be best not
# to have a drive's serial number publicly.)
devNodes = "/dev/disk/by-uuid";
};
kernelModules = [ "kvm-amd" ];
};
# Configured ZFS datasets.
fileSystems = {
"/" = {
device = "rpool/ROOT/nixos";
fsType = "zfs";
};
"/home" = {
device = "rpool/home";
fsType = "zfs";
};
"/home/spotlight" = {
device = "rpool/home/spotlight";
fsType = "zfs";
};
"/root" = {
device = "rpool/root";
fsType = "zfs";
};
"/var/lib" = {
device = "rpool/var/lib";
fsType = "zfs";
};
"/var/log" = {
device = "rpool/var/log";
fsType = "zfs";
};
"/nix" = {
device = "rpool/nix";
fsType = "zfs";
};
"/boot" = {
device = "/dev/disk/by-uuid/6073-ACA7";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
};
# ZFS is not a fan of swap.
swapDevices = [ ];
}