From 489551a8e257617e973a7adb7f6a42ae75d68832 Mon Sep 17 00:00:00 2001 From: Vegard Bieker Matthey Date: Mon, 19 Jan 2026 17:39:01 +0100 Subject: [PATCH] hosts/gluttony: init (!119) Reviewed-on: https://git.pvv.ntnu.no/Drift/pvv-nixos-config/pulls/119 Reviewed-by: Felix Albrigtsen Co-authored-by: Vegard Bieker Matthey Co-committed-by: Vegard Bieker Matthey --- flake.nix | 1 + hosts/gluttony/configuration.nix | 51 +++++++++++++++++++++++ hosts/gluttony/hardware-configuration.nix | 50 ++++++++++++++++++++++ values.nix | 6 +++ 4 files changed, 108 insertions(+) create mode 100644 hosts/gluttony/configuration.nix create mode 100644 hosts/gluttony/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 0a52ad5..79dea7a 100644 --- a/flake.nix +++ b/flake.nix @@ -179,6 +179,7 @@ shark = stableNixosConfig "shark" { }; wenche = stableNixosConfig "wenche" { }; temmie = stableNixosConfig "temmie" { }; + gluttony = stableNixosConfig "gluttony" { }; kommode = stableNixosConfig "kommode" { overlays = [ diff --git a/hosts/gluttony/configuration.nix b/hosts/gluttony/configuration.nix new file mode 100644 index 0000000..ddf9afa --- /dev/null +++ b/hosts/gluttony/configuration.nix @@ -0,0 +1,51 @@ +{ + fp, + lib, + values, + ... +}: +{ + imports = [ + ./hardware-configuration.nix + (fp /base) + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + systemd.network.enable = lib.mkForce false; + networking = + let + hostConf = values.hosts.gluttony; + in + { + hostName = "gluttony"; + tempAddresses = "disabled"; + useDHCP = false; + + search = values.defaultNetworkConfig.domains; + nameservers = values.defaultNetworkConfig.dns; + defaultGateway.address = hostConf.ipv4_internal_gw; + + interfaces."ens3" = { + ipv4.addresses = [ + { + address = hostConf.ipv4; + prefixLength = 32; + } + { + address = hostConf.ipv4_internal; + prefixLength = 24; + } + ]; + ipv6.addresses = [ + { + address = hostConf.ipv6; + prefixLength = 64; + } + ]; + }; + }; + + system.stateVersion = "25.11"; # Don't change unless you know what you are doing. +} diff --git a/hosts/gluttony/hardware-configuration.nix b/hosts/gluttony/hardware-configuration.nix new file mode 100644 index 0000000..66bc8d3 --- /dev/null +++ b/hosts/gluttony/hardware-configuration.nix @@ -0,0 +1,50 @@ +# 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" + "virtio_pci" + "virtio_scsi" + "sd_mod" + ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/mapper/pool-root"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D00A-B488"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = 8 * 1024; + } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/values.nix b/values.nix index cc758ec..5f7a9f8 100644 --- a/values.nix +++ b/values.nix @@ -77,6 +77,12 @@ in rec { ipv4 = pvv-ipv4 167; ipv6 = pvv-ipv6 167; }; + gluttony = { + ipv4 = "129.241.100.118"; + ipv4_internal = "192.168.20.11"; + ipv4_internal_gw = "192.168.20.1"; + ipv6 = "2001:700:305:aa07::3b3"; + }; wenche = { ipv4 = pvv-ipv4 240; ipv6 = pvv-ipv6 240;