Setup a Pi 3, fix hetznix02

This focuses on being able to build a SD card image for a Pi 3 named
raspberry and the cofig it contains. As part of making that happen, I
found that I had totally messed up hetznix02's hardware config. I fixed
this as it is where I am builiding the SD image. This work also resulted
in adding a "volume" to hetznix02 and moving `/nix` onto it.
This commit is contained in:
Gene Liverman 2025-01-03 15:43:05 -05:00
parent d2950e1ff8
commit 680cd54a0b
5 changed files with 79 additions and 12 deletions

View file

@ -2,8 +2,8 @@
{ lib, ... }:
{
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/sda";
disk.primary = {
device = lib.mkDefault "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_51838383";
type = "disk";
content = {
type = "gpt";
@ -38,5 +38,26 @@
};
};
};
disk.volume1 = {
device = lib.mkDefault "/dev/disk/by-id/scsi-0HC_Volume_101886924";
type = "disk";
content = {
type = "gpt";
partitions = {
nix = {
name = "nix";
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}

View file

@ -10,23 +10,30 @@
boot = {
initrd = {
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ];
kernelModules = [ "nvme" ];
availableKernelModules = [ "xhci_pci" "virtio_scsi" "sr_mod" ];
kernelModules = [ ];
};
kernelModules = [ ];
extraModulePackages = [ ];
};
fileSystems = {
"/boot" = {
device = lib.mkForce "/dev/disk/by-uuid/D005-6C65";
fsType = "vfat";
};
"/" = {
device = lib.mkForce "/dev/sda1";
fileSystems."/" =
{ device = "/dev/disk/by-partlabel/disk-primary-root";
fsType = "ext4";
};
};
fileSystems."/boot" =
{ device = "/dev/disk/by-partlabel/disk-primary-ESP";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-partlabel/disk-volume1-nix";
fsType = "ext4";
};
swapDevices = [ ];
# 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