{ config, lib, pkgs, inputs, ... }: # Raspberry Pi 4, bestehende Hardware statt Neuanschaffung -- Kriterien in # docs/operator-prompt.md §0 (Energieeffizienz, vorhandene Hardware # weiterverwenden). Lokales Bauen ist hier ausdrücklich vorgesehen: weil # die Konfiguration deklarativ ist, lässt sich die Maschine verlustfrei # auf das Nötige reduzieren und dann direkt auf der Zielhardware testen # -- eine Abhängigkeit weniger. Siehe docs/pinix-minimalbetrieb.md und # den Abschnitt "Lokal auf pinix bauen" in CLAUDE.md. SD-Karten-Verschleiß # bleibt ein Abwägungsgrund, kein Verbot. { imports = [ ./hardware-configuration.nix ./router-uplink.nix ./router-lan.nix ../user/drone.nix ../globalServices/default.nix ./localServices/default.nix # ./disko.nix ]; networking.firewall.allowedTCPPorts = [22 8050 8012 8026 3000 9000]; networking = { wireless.enable = true; wireless.secretsFile = config.age.secrets.wirelessSecretsFile.path; # wireless.networks.idea.pskRaw = "ext:psk_mango"; wireless.networks.Vodafone-E6EF.pskRaw = "ext:psk_home"; interfaces.wlan0.useDHCP = true; # Fester Wartungszugang von tnix (192.168.50.2), unabhängig vom Uplink. # useDHCP/SLAAC überschreibt ../router-uplink.nix (mkForce false). interfaces.end0.useDHCP = true; interfaces.end0.ipv4.addresses = [ { address = "192.168.50.1"; prefixLength = 24; } ]; }; documentation.nixos.enable = false; #boot.kernelPackages = pkgs.linuxKernel.packages.linux_rpi4; boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ]; boot.loader.grub.enable = false; boot.loader.generic-extlinux-compatible.enable = true; # fileSystems."/".device = "/dev/disk/by-label/NIXOS_SD"; # fileSystems."/".fsType = "ext4"; # fileSystems."/".options = [ "noatime" ]; nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnsupportedSystems = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.trusted-users = [ "root" "builder" "@wheel" ]; networking.hostName = "pinix"; # Define your hostname. time.timeZone = "Europe/Berlin"; console = { keyMap = "de"; }; environment.variables = { EDITOR = "nvim"; VISUAL = "nvim"; }; system.stateVersion = "25.11"; # Did you read the comment? # Aufgeraeumt am 13.09.2026: end0 ist seit der Router-Migration # (docs/pinix-router-migration.md) der feste Wartungslink zu tnix, kein # Uplink mehr -- das fruehere "interface end0 / nooption routers" hier war # ohnehin schon tot (router-uplink.nix setzt networking.dhcpcd.extraConfig # per mkForce fuer wan0 und gewinnt). # MagicDNS ist aus (localServices/tailscale.nix), damit der DNS64-Resolver # von router-uplink.nix (pinix-router-dns) greift. Ersatz für die # Tailnet-Namen: networking.hosts = (lib.mapAttrs' (name: ip: lib.nameValuePair ip [ name ]) config.tailnetIPs) // { # The new identity services reach each other through their public TLS # names, but must not hairpin through the WAN's public NAT66 path. "127.0.0.1" = [ "dex.${config.domain2}" "head.${config.domain2}" ]; }; }