From dc685affee718b6385e52bf40dbdb506d602ca50 Mon Sep 17 00:00:00 2001 From: dadada Date: Sun, 29 Oct 2023 18:42:06 +0100 Subject: [PATCH] Remove non-existent hosts --- nixos/configurations.nix | 16 -- nixos/ifrit/configuration.nix | 81 --------- nixos/ifrit/hardware-configuration.nix | 29 ---- nixos/pruflas/configuration.nix | 199 ----------------------- nixos/pruflas/hardware-configuration.nix | 50 ------ 5 files changed, 375 deletions(-) delete mode 100644 nixos/ifrit/configuration.nix delete mode 100644 nixos/ifrit/hardware-configuration.nix delete mode 100644 nixos/pruflas/configuration.nix delete mode 100644 nixos/pruflas/hardware-configuration.nix diff --git a/nixos/configurations.nix b/nixos/configurations.nix index 1e1fa1e..a6871f4 100644 --- a/nixos/configurations.nix +++ b/nixos/configurations.nix @@ -1,6 +1,5 @@ { self , agenix -, eza , nixpkgs , home-manager , homePage @@ -54,14 +53,6 @@ in ]; }; - ifrit = nixosSystem { - extraModules = [ - ./modules/profiles/server.nix - ./ifrit/configuration.nix - ./ifrit/hardware-configuration.nix - ]; - }; - surgat = nixosSystem rec { system = "x86_64-linux"; extraModules = [ @@ -73,13 +64,6 @@ in ]; }; - pruflas = nixosSystem { - extraModules = [ - ./modules/profiles/laptop.nix - ./pruflas/configuration.nix - ]; - }; - agares = nixosSystem { extraModules = [ ./agares/configuration.nix diff --git a/nixos/ifrit/configuration.nix b/nixos/ifrit/configuration.nix deleted file mode 100644 index 1640e8f..0000000 --- a/nixos/ifrit/configuration.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ config -, pkgs -, lib -, ... -}: -let - hostAliases = [ - "ifrit.dadada.li" - "media.dadada.li" - "backup0.dadada.li" - ]; -in -{ - dadada = { - admin.enable = true; - borgServer.enable = true; - borgServer.path = "/mnt/storage/backup"; - }; - - - dadada.ddns.domains = [ - "backup0.dadada.li" - ]; - - networking.hostName = "ifrit"; - networking.domain = "bs.dadada.li"; - - networking.hosts = { - "127.0.0.1" = hostAliases; - "::1" = hostAliases; - }; - - # Use the GRUB 2 boot loader. - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; - - # weird issues with crappy plastic router - networking.interfaces."ens3".tempAddress = "disabled"; - - services.resolved.enable = true; - - systemd.network = { - enable = true; - networks = { - "10-lan" = { - matchConfig.Name = "ens*"; - networkConfig.DHCP = "ipv4"; - linkConfig.RequiredForOnline = "routable"; - }; - }; - }; - - boot.kernelParams = [ - "console=ttyS0,115200" - ]; - - fileSystems."/mnt/storage" = { - device = "/dev/disk/by-uuid/a34e36fc-d7dd-4ceb-93c4-48f9c2727cb7"; - mountPoint = "/mnt/storage"; - neededForBoot = false; - options = [ "nofail" ]; - }; - - networking.firewall = { - enable = true; - allowPing = true; - allowedTCPPorts = [ - 22 # SSH - ]; - }; - - users.users."mist" = { - isNormalUser = true; - }; - - environment.systemPackages = [ pkgs.curl ]; - - services.smartd.enable = true; - - system.stateVersion = "20.03"; -} diff --git a/nixos/ifrit/hardware-configuration.nix b/nixos/ifrit/hardware-configuration.nix deleted file mode 100644 index 125e24d..0000000 --- a/nixos/ifrit/hardware-configuration.nix +++ /dev/null @@ -1,29 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config -, lib -, pkgs -, modulesPath -, ... -}: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ehci_pci" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/0b4f5f01-5849-4f05-9822-b648abbc2485"; - fsType = "ext4"; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/53b5715e-2724-4800-9cfc-f892115681b6"; } - ]; - - nix.settings.max-jobs = lib.mkDefault 2; -} diff --git a/nixos/pruflas/configuration.nix b/nixos/pruflas/configuration.nix deleted file mode 100644 index 5b8e592..0000000 --- a/nixos/pruflas/configuration.nix +++ /dev/null @@ -1,199 +0,0 @@ -{ config -, pkgs -, lib -, ... -}: -with lib; -let - secretsPath = config.dadada.secrets.path; - wg0PrivKey = "${config.networking.hostName}-wg0-key"; - wgHydraPrivKey = "${config.networking.hostName}-wg-hydra-key"; - wg0PresharedKey = "${config.networking.hostName}-wg0-preshared-key"; - hydraGitHubAuth = "hydra-github-authorization"; -in -{ - imports = [ ./hardware-configuration.nix ]; - - networking.hostName = "pruflas"; - - services.logind.lidSwitch = "ignore"; - - age.secrets.${hydraGitHubAuth} = { - file = "${secretsPath}/${hydraGitHubAuth}.age"; - mode = "440"; - owner = "hydra-www"; - group = "hydra"; - }; - - services.hydra = { - enable = true; - package = pkgs.hydra-unstable; - hydraURL = "https://hydra.dadada.li"; - notificationSender = "hydra@localhost"; - buildMachinesFiles = [ ]; - useSubstitutes = true; - port = 3000; - listenHost = "10.3.3.3"; - extraConfig = '' - Include ${config.age.secrets."${hydraGitHubAuth}".path} - - - jobs = nix-config:main.* - inputs = nix-config - excludeBuildFromContext = 1 - useShortContext = 1 - - ''; - }; - - nix.buildMachines = [ - { - hostName = "localhost"; - system = "x86_64-linux"; - supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ]; - maxJobs = 8; - } - ]; - - nix.extraOptions = '' - allowed-uris = https://github.com/NixOS https://github.com/nix-community https://github.com/dadada https://git.dadada.li/ github.com/ryantm/agenix github.com/serokell/deploy-rs https://gitlab.com/khumba/nvd.git https://github.com/real-or-random/dokuwiki-plugin-icalevents https://github.com/giterlizzi/dokuwiki-template-bootstrap3 - ''; - - services.nginx = { - enable = true; - recommendedTlsSettings = true; - recommendedOptimisation = true; - recommendedGzipSettings = true; - logError = "/dev/null"; - appendHttpConfig = '' - access_log off; - ''; - - virtualHosts."pruflas.uwu" = { - enableACME = false; - forceSSL = false; - root = "/var/www/pruflas.uwu"; - locations."/" = { - tryFiles = "$uri $uri/ = 404"; - index = "index.html"; - }; - }; - }; - - systemd.tmpfiles.rules = [ - "d /var/www/pruflas.uwu 0551 nginx nginx - -" - ]; - - dadada.admin.enable = true; - - dadada.backupClient = { - bs.enable = true; - }; - - age.secrets.${wg0PrivKey}.file = "${secretsPath}/${wg0PrivKey}.age"; - age.secrets.${wg0PresharedKey}.file = "${secretsPath}/${wg0PresharedKey}.age"; - - age.secrets.${wgHydraPrivKey}.file = "${secretsPath}/${wgHydraPrivKey}.age"; - - networking.wireguard = { - enable = true; - interfaces.uwupn = { - allowedIPsAsRoutes = true; - privateKeyFile = config.age.secrets.${wg0PrivKey}.path; - ips = [ "10.11.0.39/32" "fc00:1337:dead:beef::10.11.0.39/128" ]; - peers = [ - { - publicKey = "tuoiOWqgHz/lrgTcLjX+xIhvxh9jDH6gmDw2ZMvX5T8="; - allowedIPs = [ "10.11.0.0/22" "fc00:1337:dead:beef::10.11.0.0/118" "192.168.178.0/23" ]; - endpoint = "53c70r.de:51820"; - persistentKeepalive = 25; - presharedKeyFile = config.age.secrets.${wg0PresharedKey}.path; - } - ]; - }; - interfaces.hydra = { - allowedIPsAsRoutes = true; - privateKeyFile = config.age.secrets.${wgHydraPrivKey}.path; - ips = [ "10.3.3.3/32" ]; - peers = [ - { - publicKey = "KzL+PKlv4LktIqqTqC9Esw8dkSZN2qSn/vq76UHbOlY="; - allowedIPs = [ "10.3.3.1/32" ]; - endpoint = "hydra.dadada.li:51235"; - persistentKeepalive = 25; - } - ]; - }; - }; - - networking.useDHCP = false; - networking.interfaces."enp0s25".useDHCP = true; - - networking.firewall = { - enable = true; - allowPing = true; - allowedTCPPorts = [ - 22 # SSH - 80 # HTTP - 443 # HTTPS - 3000 # Hydra - ]; - allowedUDPPorts = [ - 51234 # Wireguard - 51235 # Wireguard - ]; - }; - - boot.kernelModules = [ "kvm-intel" ]; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Desktop things for media playback - - services.xserver.enable = true; - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - - security.rtkit.enable = true; - - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - - hardware.pulseaudio.enable = false; - - environment.systemPackages = [ pkgs.spotify pkgs.mpv ]; - - users.users."media" = { - isNormalUser = true; - description = "Media playback user"; - extraGroups = [ "users" "video" ]; - # allow anyone with physical access to log in - password = "media"; - }; - - networking.domain = "dadada.li"; - networking.tempAddresses = "disabled"; - - networking.networkmanager.enable = false; - - users.mutableUsers = true; - - dadada.networking.localResolver.enable = true; - dadada.networking.localResolver.uwu = true; - dadada.networking.localResolver.s0 = true; - - documentation.enable = false; - documentation.nixos.enable = false; - - services.journald.extraConfig = '' - SystemKeepFree = 2G - ''; - - system.stateVersion = "20.09"; -} diff --git a/nixos/pruflas/hardware-configuration.nix b/nixos/pruflas/hardware-configuration.nix deleted file mode 100644 index 7f39bd7..0000000 --- a/nixos/pruflas/hardware-configuration.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: -{ - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { - device = "/dev/disk/by-uuid/767a84ad-4157-4e9f-a3db-145449edd3bc"; - fsType = "btrfs"; - options = [ "subvol=root" "compress=zstd" ]; - }; - - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/BFF0-B760"; - fsType = "vfat"; - }; - - fileSystems."/home" = - { - device = "/dev/disk/by-uuid/767a84ad-4157-4e9f-a3db-145449edd3bc"; - fsType = "btrfs"; - options = [ "subvol=home" "compress=zstd" ]; - }; - - fileSystems."/nix" = { - device = "/dev/disk/by-uuid/767a84ad-4157-4e9f-a3db-145449edd3bc"; - fsType = "btrfs"; - options = [ "subvol=nix" "compress=zstd" ]; - }; - - fileSystems."/swap" = { - device = "/dev/disk/by-uuid/767a84ad-4157-4e9f-a3db-145449edd3bc"; - fsType = "btrfs"; - options = [ "subvol=swap" "noatime" ]; - }; - - swapDevices = [{ device = "/swap/swapfile"; }]; - - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; -}