{ config, pkgs, inputs, ... }: { imports = [ ./hardware-configuration.nix inputs.disko.nixosModules.default (import ./disko.nix { device1 = "/dev/mmcblk0"; }) inputs.home-manager.nixosModules.default inputs.sops-nix.nixosModules.sops ]; config = { sysconfig = { remoteBuildClient = true; users = { nathan = { hashedPasswordFile = config.sops.secrets."nathan/pass".path; shell = pkgs.zsh; sshKeys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAsU69CxfQk58CvItPN426h5Alnpb60SH37wet97Vb57 nathan@laptop" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnUhN2uHwAJF/SLRX3wlGRmfhV3zpP88JQAYB+gh8jW nathan@localhost" ]; extraGroups = [ "wheel" "networkmanager" "gpio" "spi" "audio" "pulse" "pulse-access" ]; home-manager = { enable = true; standalone = false; extraModules = [ { homeconfig = { scripts.enable = false; minimal = true; mpd.enable = true; git.enable = true; nh.enable = true; }; } ]; }; }; }; services = { openssh.enable = true; #pipewire.enable = true; netbird.enable = true; }; }; boot = { loader = { grub.enable = false; generic-extlinux-compatible.enable = true; }; }; networking = { hostName = "pi4"; nameservers = [ "1.1.1.1" "1.0.0.1" ]; networkmanager.enable = true; }; time.timeZone = "America/Chicago"; i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { LC_ADDRESS = "en_US.UTF-8"; LC_IDENTIFICATION = "en_US.UTF-8"; LC_MEASUREMENT = "en_US.UTF-8"; LC_MONETARY = "en_US.UTF-8"; LC_NAME = "en_US.UTF-8"; LC_NUMERIC = "en_US.UTF-8"; LC_PAPER = "en_US.UTF-8"; LC_TELEPHONE = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8"; }; hardware = { bluetooth.enable = true; }; programs.zsh.enable = true; environment.shells = with pkgs; [ zsh ]; users = { groups.gpio = {}; }; services = { udev.extraRules = '' SUBSYSTEM=="bcm2835-gpiomem", KERNEL=="gpiomem", GROUP="gpio",MODE="0660" SUBSYSTEM=="gpio", KERNEL=="gpiochip*", ACTION=="add", RUN+="${pkgs.bash}/bin/bash -c 'chown root:gpio /sys/class/gpio/export /sys/class/gpio/unexport ; chmod 220 /sys/class/gpio/export /sys/class/gpio/unexport'" SUBSYSTEM=="gpio", KERNEL=="gpio*", ACTION=="add",RUN+="${pkgs.bash}/bin/bash -c 'chown root:gpio /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value ; chmod 660 /sys%p/active_low /sys%p/direction /sys%p/edge /sys%p/value'" ''; pulseaudio = { enable = true; extraConfig = '' load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 ''; }; services.avahi = { enable = true; ipv4 = true; ipv6 = true; openFirewall = true; nssmdns4 = true; wideArea = true; }; }; sops = { age.keyFile = "/var/lib/sops/age/keys.txt"; defaultSopsFile = ./secrets.yaml; defaultSopsFormat = "yaml"; }; fonts.packages = with pkgs; [ nerd-fonts.fira-code ]; sound.enable = true; security.rtkit.enable = true; system.stateVersion = "25.05"; }; }