From 0de15ae2403694b02de584ed5eee38d7c6e27b8b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 25 Nov 2026 09:48:16 +0100 Subject: ... --- hosts/eostre/default.nix | 108 ---------------------------------- hosts/eostre/ruleset.nft | 101 ------------------------------- hosts/skadhi/default.nix | 5 ++ hosts/vidhar/default.nix | 2 - hosts/vidhar/network/dhcp/default.nix | 102 ++++++++------------------------ 5 files changed, 29 insertions(+), 289 deletions(-) delete mode 100644 hosts/eostre/default.nix delete mode 100644 hosts/eostre/ruleset.nft (limited to 'hosts') diff --git a/hosts/eostre/default.nix b/hosts/eostre/default.nix deleted file mode 100644 index f8b48665..00000000 --- a/hosts/eostre/default.nix +++ /dev/null @@ -1,108 +0,0 @@ -{ flake, config, pkgs, lib, ... }: - -with lib; - -{ - imports = with flake.nixosModules.systemProfiles; [ - default-locale nfsroot openssh - ]; - - config = { - nixpkgs = { - system = "x86_64-linux"; - externalConfig = { - allowUnfree = true; - }; - extraOverlays = [ - (final: prev: { - upower = prev.upower.overrideAttrs (oldAttrs: { - doCheck = false; - }); - }) - ]; - }; - - boot = { - initrd = { - availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "sd_mod" "sr_mod" ]; - kernelModules = [ "igb" ]; - }; - kernelModules = [ "kvm-amd" ]; - extraModulePackages = [ ]; - - plymouth.enable = true; - - tmp.useTmpfs = true; - }; - - hardware = { - enableRedistributableFirmware = true; - cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware; - - nvidia = { - modesetting.enable = true; - powerManagement.enable = true; - }; - - graphics.enable = true; - }; - - networking = { - domain = "lan.yggdrasil"; - search = [ "lan.yggdrasil" "yggdrasil" ]; - - hosts = { - "127.0.0.1" = [ "eostre.lan.yggdrasil" "eostre" ]; - "::1" = [ "eostre.lan.yggdrasil" "eostre" ]; - }; - - firewall.enable = false; - nftables = { - enable = true; - rulesetFile = ./ruleset.nft; - }; - }; - - services.resolved = { - llmnr = "false"; - }; - - zramSwap.enable = true; - - system.stateVersion = "22.11"; - - - console.keyMap = "us"; - time.hardwareClockInLocalTime = true; - - - environment.systemPackages = with pkgs; [ cifs-utils ]; - - security.pam.mount = { - enable = true; - extraVolumes = [ - "" - "" - ]; - }; - - services.displayManager.sddm = { - enable = true; - wayland.enable = true; - settings = { - Users.HideUsers = "gkleen"; - }; - }; - services.desktopManager.plasma6.enable = true; - - - services.openssh = { - enable = true; - startWhenNeeded = true; - settings = { - PasswordAuthentication = true; - KbdInteractiveAuthentication = true; - }; - }; - }; -} diff --git a/hosts/eostre/ruleset.nft b/hosts/eostre/ruleset.nft deleted file mode 100644 index 7b38a059..00000000 --- a/hosts/eostre/ruleset.nft +++ /dev/null @@ -1,101 +0,0 @@ -define icmp_protos = {ipv6-icmp, icmp, igmp} - -table arp filter { - limit lim_arp { - rate over 50 mbytes/second burst 50 mbytes - } - - chain input { - type filter hook input priority filter - policy accept - - limit name lim_arp counter drop - - counter - } - - chain output { - type filter hook output priority filter - policy accept - - limit name lim_arp counter drop - - counter - } -} - -table inet filter { - limit lim_reject { - rate over 1000/second burst 1000 packets - } - - limit lim_icmp { - rate over 50 mbytes/second burst 50 mbytes - } - - - chain forward { - type filter hook forward priority filter - policy drop - - - ct state invalid log level debug prefix "drop invalid forward: " counter drop - - - iifname lo counter accept - - - limit name lim_reject log level debug prefix "drop forward: " counter drop - log level debug prefix "reject forward: " counter - meta l4proto tcp ct state new counter reject with tcp reset - ct state new counter reject - - - counter - } - - chain input { - type filter hook input priority filter - policy drop - - - ct state invalid log level debug prefix "drop invalid input: " counter drop - - - iifname lo counter accept - iif != lo ip daddr 127.0.0.1/8 counter reject - iif != lo ip6 daddr ::1/128 counter reject - - meta l4proto $icmp_protos limit name lim_icmp counter drop - meta l4proto $icmp_protos counter accept - - tcp dport 22 counter accept - udp dport 60000-61000 counter accept - - - ct state {established, related} counter accept - - - limit name lim_reject log level debug prefix "drop input: " counter drop - log level debug prefix "reject input: " counter - meta l4proto tcp ct state new counter reject with tcp reset - ct state new counter reject - - - counter - } - - chain output { - type filter hook output priority filter - policy accept - - - oifname lo counter accept - - meta l4proto $icmp_protos limit name lim_icmp counter drop - meta l4proto $icmp_protos counter accept - - - counter - } -} \ No newline at end of file diff --git a/hosts/skadhi/default.nix b/hosts/skadhi/default.nix index cf25777b..ee65bbbe 100644 --- a/hosts/skadhi/default.nix +++ b/hosts/skadhi/default.nix @@ -114,5 +114,10 @@ }; restartIfChanged = false; }; + nixpkgs.externalConfig = { + problems.handlers = { + "gtk+".broken = "warn"; # or "ignore" + }; + }; }; } diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index e97eb20b..90e08a5a 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix @@ -8,7 +8,6 @@ with lib; tmpfs-root zfs initrd-all-crypto-modules default-locale openssh rebuild-machines build-server - initrd-ssh ]; config = { @@ -35,7 +34,6 @@ with lib; initrd = { systemd = { - enable = true; network = { enable = true; networks = { diff --git a/hosts/vidhar/network/dhcp/default.nix b/hosts/vidhar/network/dhcp/default.nix index e4c3f16e..2efabd23 100644 --- a/hosts/vidhar/network/dhcp/default.nix +++ b/hosts/vidhar/network/dhcp/default.nix @@ -48,12 +48,6 @@ in { }; client-classes = [ - # { name = "ipxe-eostre"; - # test = "hexstring(pkt4.mac, ':') == '00:d8:61:79:c5:40' and option[77].hex == 'iPXE-yggdrasil'"; - # next-server = tftpIp; - # boot-file-name = "${nfsrootBaseUrl}/eostre.menu.ipxe"; - # only-if-required = true; - # } { name = "ipxe-yggdrasil"; test = "option[77].hex == 'iPXE-yggdrasil'"; next-server = tftpIp; @@ -294,43 +288,46 @@ in { name = "installer-${system}"; paths = [ (builtins.addErrorContext "while evaluating installer-${system}-nfsroot" (let - installerBuild' = (flake.nixosConfigurations.${"installer-${system}-nfsroot"}.extendModules { - modules = [ - ({ ... }: { - config.nfsroot.storeDevice = "${nfsIp}:nix-store"; - config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/installer-${system}/registration"; - config.system.nixos.label = "installer-${system}"; - }) - ]; - }); - installerBuild = installerBuild'.config.system.build; + # installerBuild' = (flake.nixosConfigurations.${"installer-${system}-nfsroot"}.extendModules { + # modules = [ + # ({ ... }: { + # config.nfsroot.storeDevice = "${nfsIp}:nix-store"; + # config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/installer-${system}/registration"; + # config.system.nixos.label = "installer-${system}"; + # }) + # ]; + # }); + # installerBuild = installerBuild'.config.system.build; + + # install -m 0444 -t $out/installer-${system} \ + # ${installerBuild.initialRamdisk}/initrd \ + # ${installerBuild.kernel}/bzImage \ + # ${installerBuild.netbootIpxeScript}/netboot.ipxe \ + # ${pkgs.closureInfo { rootPaths = installerBuild.storeContents; }}/registration + + # item installer ${with installerBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} + + # :installer + # chain installer-${system}/netboot.ipxe + # goto start + in builtins.toPath (pkgs.runCommandLocal "installer-${system}" {} '' mkdir -p $out/installer-${system} - install -m 0444 -t $out/installer-${system} \ - ${installerBuild.initialRamdisk}/initrd \ - ${installerBuild.kernel}/bzImage \ - ${installerBuild.netbootIpxeScript}/netboot.ipxe \ - ${pkgs.closureInfo { rootPaths = installerBuild.storeContents; }}/registration install -m 0444 ${pkgs.writeText "installer-${system}.menu.ipxe" '' #!ipxe :start menu iPXE boot menu for installer-${system} - item installer ${with installerBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} item memtest memtest86plus item netboot netboot.xyz item shell iPXE shell - choose --timeout 0 --default installer selected || goto shell + choose --timeout 0 --default netboot selected || goto shell goto ''${selected} :shell shell goto start - :installer - chain installer-${system}/netboot.ipxe - goto start - :netboot iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn goto start @@ -351,57 +348,6 @@ in { install -m 0444 ${sources.netbootxyz-efi.src} $out/netboot.xyz.efi install -m 0444 ${sources.netbootxyz-lkrn.src} $out/netboot.xyz.lkrn '') - # (builtins.addErrorContext "while evaluating eostre" (let - # eostreBuild' = (flake.nixosConfigurations.eostre.extendModules { - # modules = [ - # ({ ... }: { - # config.nfsroot.storeDevice = "${nfsIp}:nix-store"; - # config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/eostre/registration"; - # config.system.nixos.label = "eostre"; - # }) - # ]; - # }); - # eostreBuild = eostreBuild'.config.system.build; - # in builtins.toPath (pkgs.runCommandLocal "eostre" {} '' - # mkdir -p $out/eostre - # install -m 0444 -t $out/eostre \ - # ${eostreBuild.initialRamdisk}/initrd \ - # ${eostreBuild.kernel}/bzImage \ - # ${eostreBuild.netbootIpxeScript}/netboot.ipxe \ - # ${pkgs.closureInfo { rootPaths = eostreBuild.storeContents; }}/registration - # install -m 0444 ${pkgs.writeText "eostre.menu.ipxe" '' - # #!ipxe - - # set menu-timeout 5000 - - # :start - # menu iPXE boot menu for eostre - # item eostre ${with eostreBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} - # item memtest memtest86plus - # item netboot netboot.xyz - # item shell iPXE shell - # choose --timeout ''${menu-timeout} --default eostre selected || goto shell - # set menu-timeout 0 - # goto ''${selected} - - # :shell - # set menu-timeout 0 - # shell - # goto start - - # :eostre - # chain eostre/netboot.ipxe - # goto start - - # :netboot - # iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn - # goto start - - # :memtest - # chain --autofree mt86plus.efi - # goto start - # ''} $out/eostre.menu.ipxe - # ''))) ]; }; }; -- cgit v1.2.3