This commit is contained in:
nyxerinys 2026-10-16 21:25:19 -05:00
parent ad5107997b
commit b6117d062b
4 changed files with 162 additions and 10 deletions

View file

@ -8,25 +8,64 @@
networking.hostName = "iris";
system.nixos.tags = let
cfg = config.boot.loader.raspberry-pi;
in [
"raspberry-pi-${cfg.variant}"
cfg.bootloader
config.boot.kernelPackages.kernel.version
];
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
boot.loader.raspberry-pi.bootloader = "kernel";
environment.systemPackages = with pkgs; [
swiftpm
python3
(python3.withPackages (ps: with ps; [ gpiozero rpi-gpio ]))
];
services.udev.extraRules = ''
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", GROUP="gpio", MODE="0660"
SUBSYSTEM=="gpiomem", GROUP="gpio", MODE="0660"
'';
nix.settings = {
substituters = [
"https://nixos-raspberrypi.cachix.org"
];
trusted-public-keys = [
"nixos-raspberrypi.cachix.org-1:4iMO9LXa8BqhU+Rpg6LQKiGa2lsNh/j2oiYLNOQ5sPI="
];
};
users.groups.gpio = {};
users.users.nyxerinys.extraGroups = [ "gpio" ];
boot.supportedFilesystems.zfs = false;
boot.initrd.availableKernelModules = [ "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
swapDevices = [ ];
fileSystems."/boot/firmware" = {
device = "/dev/disk/by-label/FIRMWARE";
fsType = "vfat";
options = [
"nofail"
"fmask=0077"
"dmask=0077"
"flush"
];
};
swapDevices = [{
device = "/swapfile";
size = 8 * 1024; # Adjust size in MiB as needed
}];
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}