From ccd9bbf4da53ee79805454494ebce7b8bf4795aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Mon, 7 Jul 2025 21:30:04 +0200 Subject: [PATCH] Remove incus hosts --- flake.nix | 34 ---------- hosts/inc1/configuration.nix | 96 --------------------------- hosts/inc1/default.nix | 5 -- hosts/inc1/hardware-configuration.nix | 41 ------------ hosts/inc2/configuration.nix | 96 --------------------------- hosts/inc2/default.nix | 5 -- hosts/inc2/hardware-configuration.nix | 33 --------- services/incus/default.nix | 7 -- 8 files changed, 317 deletions(-) delete mode 100644 hosts/inc1/configuration.nix delete mode 100644 hosts/inc1/default.nix delete mode 100644 hosts/inc1/hardware-configuration.nix delete mode 100644 hosts/inc2/configuration.nix delete mode 100644 hosts/inc2/default.nix delete mode 100644 hosts/inc2/hardware-configuration.nix delete mode 100644 services/incus/default.nix diff --git a/flake.nix b/flake.nix index a5423e4..ce0bcee 100644 --- a/flake.nix +++ b/flake.nix @@ -156,40 +156,6 @@ backup-helper.nixosModules.backup-helper ]; }; - inc1 = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { - inherit inputs self sops-nix; - }; - modules = [ - ( - { config, pkgs, ... }: - { - nixpkgs.overlays = commonOverlays; - } - ) - ./hosts/inc1 - sops-nix.nixosModules.sops - # backup-helper.nixosModules.backup-helper - ]; - }; - inc2 = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { - inherit inputs self sops-nix; - }; - modules = [ - ( - { config, pkgs, ... }: - { - nixpkgs.overlays = commonOverlays; - } - ) - ./hosts/inc2 - sops-nix.nixosModules.sops - # backup-helper.nixosModules.backup-helper - ]; - }; template1 = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { diff --git a/hosts/inc1/configuration.nix b/hosts/inc1/configuration.nix deleted file mode 100644 index aa2078b..0000000 --- a/hosts/inc1/configuration.nix +++ /dev/null @@ -1,96 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, ... }: - -{ - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../system - ../../services/incus - ]; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - boot.kernel.sysctl = { - "net.ipv4.ip_forward" = 1; - }; - - networking.hostName = "inc1"; - networking.domain = "home.2rjus.net"; - networking.useNetworkd = true; - networking.useDHCP = false; - networking.nftables.enable = true; - networking.firewall.trustedInterfaces = [ "vlan13" ]; - - services.resolved.enable = true; - networking.nameservers = [ - "10.69.13.5" - "10.69.13.6" - ]; - - systemd.network.enable = true; - # Primary interface - systemd.network.networks."enp2s0" = { - matchConfig.Name = "enp2s0"; - address = [ - "10.69.12.80/24" - ]; - networkConfig = { - VLAN = [ "enp2s0.13" ]; - }; - routes = [ - { Gateway = "10.69.12.1"; } - ]; - linkConfig.RequiredForOnline = "routable"; - }; - - # VLAN 13 netdev - systemd.network.netdevs."enp2s0.13" = { - enable = true; - netdevConfig = { - Kind = "vlan"; - Name = "enp2s0.13"; - }; - vlanConfig = { - Id = 13; - }; - }; - - # # Bridge netdev - # systemd.network.netdevs."br13" = { - # netdevConfig = { - # Name = "br13"; - # Kind = "bridge"; - # }; - # }; - - # # Bridge network - # systemd.network.networks."br13" = { - # matchConfig.Name = "enp2s0.13"; - # networkConfig.Bridge = "br13"; - # }; - - time.timeZone = "Europe/Oslo"; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nix.settings.tarball-ttl = 0; - environment.systemPackages = with pkgs; [ - tcpdump - vim - wget - git - ]; - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - # services.openssh.settings.PermitRootLogin = "yes"; - - system.stateVersion = "24.05"; # Did you read the comment? -} - diff --git a/hosts/inc1/default.nix b/hosts/inc1/default.nix deleted file mode 100644 index 4cd684a..0000000 --- a/hosts/inc1/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: { - imports = [ - ./configuration.nix - ]; -} diff --git a/hosts/inc1/hardware-configuration.nix b/hosts/inc1/hardware-configuration.nix deleted file mode 100644 index d9a724c..0000000 --- a/hosts/inc1/hardware-configuration.nix +++ /dev/null @@ -1,41 +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 + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/faa60038-b3a4-448a-8909-49857818c955"; - fsType = "xfs"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/7A94-A91C"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/f7a4f85e-0b4b-492d-a611-f50d2b915c2c"; } - ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/inc2/configuration.nix b/hosts/inc2/configuration.nix deleted file mode 100644 index a0a9ca1..0000000 --- a/hosts/inc2/configuration.nix +++ /dev/null @@ -1,96 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, ... }: - -{ - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - ../../system - ../../services/incus - ]; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - boot.kernel.sysctl = { - "net.ipv4.ip_forward" = 1; - }; - - networking.hostName = "inc2"; - networking.domain = "home.2rjus.net"; - networking.useNetworkd = true; - networking.useDHCP = false; - networking.nftables.enable = true; - networking.firewall.trustedInterfaces = [ "vlan13" ]; - - services.resolved.enable = true; - networking.nameservers = [ - "10.69.13.5" - "10.69.13.6" - ]; - - systemd.network.enable = true; - # Primary interface - systemd.network.networks."enp2s0" = { - matchConfig.Name = "enp2s0"; - address = [ - "10.69.12.81/24" - ]; - networkConfig = { - VLAN = [ "enp2s0.13" ]; - }; - routes = [ - { Gateway = "10.69.12.1"; } - ]; - linkConfig.RequiredForOnline = "routable"; - }; - - # VLAN 13 netdev - systemd.network.netdevs."enp2s0.13" = { - enable = true; - netdevConfig = { - Kind = "vlan"; - Name = "enp2s0.13"; - }; - vlanConfig = { - Id = 13; - }; - }; - - # # Bridge netdev - # systemd.network.netdevs."br13" = { - # netdevConfig = { - # Name = "br13"; - # Kind = "bridge"; - # }; - # }; - - # # Bridge network - # systemd.network.networks."br13" = { - # matchConfig.Name = "enp2s0.13"; - # networkConfig.Bridge = "br13"; - # }; - - time.timeZone = "Europe/Oslo"; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nix.settings.tarball-ttl = 0; - environment.systemPackages = with pkgs; [ - tcpdump - vim - wget - git - ]; - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - # services.openssh.settings.PermitRootLogin = "yes"; - - system.stateVersion = "24.05"; # Did you read the comment? -} - diff --git a/hosts/inc2/default.nix b/hosts/inc2/default.nix deleted file mode 100644 index 4cd684a..0000000 --- a/hosts/inc2/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ ... }: { - imports = [ - ./configuration.nix - ]; -} diff --git a/hosts/inc2/hardware-configuration.nix b/hosts/inc2/hardware-configuration.nix deleted file mode 100644 index 0d68fb0..0000000 --- a/hosts/inc2/hardware-configuration.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "rtsx_usb_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { - device = "/dev/disk/by-uuid/3e7c311c-b1a3-4be7-b8bf-e497cba64302"; - fsType = "btrfs"; - }; - - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/F0D7-E5C1"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = - [{ device = "/dev/disk/by-uuid/1a06a36f-da61-4d36-b94e-b852836c328a"; }]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} - diff --git a/services/incus/default.nix b/services/incus/default.nix deleted file mode 100644 index 8b2b860..0000000 --- a/services/incus/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ pkgs, config, ... }: -{ - virtualisation.incus = { - enable = true; - }; - networking.firewall.allowedTCPPorts = [ 8443 ]; -}