hosts/gluttony: init #119

Merged
vegardbm merged 3 commits from gluttony into main 2026-01-19 17:39:02 +01:00
4 changed files with 108 additions and 0 deletions

View File

@@ -179,6 +179,7 @@
shark = stableNixosConfig "shark" { };
wenche = stableNixosConfig "wenche" { };
temmie = stableNixosConfig "temmie" { };
gluttony = stableNixosConfig "gluttony" { };
kommode = stableNixosConfig "kommode" {
overlays = [

View File

@@ -0,0 +1,51 @@
{
fp,
lib,
values,
...
}:
{
imports = [
./hardware-configuration.nix
(fp /base)
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
vegardbm marked this conversation as resolved
Review

Does this work? On ildkule, I believe we had to use grub2 for some reason. Very cool if it works.

Does this work? On [ildkule](https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/branch/main/hosts/ildkule/configuration.nix), I believe we had to use grub2 for some reason. Very cool if it works.
Review

I am pretty sure this works I can try to reboot again to confirm.

I am pretty sure this works I can try to reboot again to confirm.
Review

I am able to reboot the machine without issue, marking this as resolved.

I am able to reboot the machine without issue, marking this as resolved.
systemd.network.enable = lib.mkForce false;
networking =
let
hostConf = values.hosts.gluttony;
in
{
hostName = "gluttony";
tempAddresses = "disabled";
useDHCP = false;
search = values.defaultNetworkConfig.domains;
vegardbm marked this conversation as resolved
Review

This is probably copied from ildkule, but I don't see why we would have both the hostConf.ipv4, hostConf.ipv4_internal and DHCP, as DHCP will probably just advertise the same as ipv4_internal but with incorrect DNS settings.

This is probably copied from ildkule, but I don't see why we would have both the hostConf.ipv4, hostConf.ipv4_internal _and_ DHCP, as DHCP will probably just advertise the same as ipv4_internal but with incorrect DNS settings.
Review

changed useDHCP to false.

changed useDHCP to false.
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.
}

View File

@@ -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 = [
vegardbm marked this conversation as resolved Outdated

Having a little swap is probably cool, but not absolutely required

Having a little swap is [probably cool](https://linuxblog.io/linux-performance-almost-always-add-swap-space/), but not absolutely required

Won't it be pretty difficult since there is no free space?

Won't it be pretty difficult since there is no free space?

I can just use a swap file instead of a dedicated partition.

I can just use a swap file instead of a dedicated partition.

How big should the swap file be then?

How big should the swap file be then?

I added an 8 GiB swap file.

I added an 8 GiB swap file.
{
device = "/var/lib/swapfile";
size = 8 * 1024;
}
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@@ -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";
};
vegardbm marked this conversation as resolved
Review

LGTM

LGTM
wenche = {
ipv4 = pvv-ipv4 240;
ipv6 = pvv-ipv6 240;