hosts/gluttony: init #119
@@ -179,6 +179,7 @@
|
||||
shark = stableNixosConfig "shark" { };
|
||||
wenche = stableNixosConfig "wenche" { };
|
||||
temmie = stableNixosConfig "temmie" { };
|
||||
gluttony = stableNixosConfig "gluttony" { };
|
||||
|
||||
kommode = stableNixosConfig "kommode" {
|
||||
overlays = [
|
||||
|
||||
51
hosts/gluttony/configuration.nix
Normal file
51
hosts/gluttony/configuration.nix
Normal 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
|
||||
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
felixalb
commented
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.
vegardbm
commented
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.
|
||||
}
|
||||
50
hosts/gluttony/hardware-configuration.nix
Normal file
50
hosts/gluttony/hardware-configuration.nix
Normal 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
felixalb
commented
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
vegardbm
commented
Won't it be pretty difficult since there is no free space? Won't it be pretty difficult since there is no free space?
vegardbm
commented
I can just use a swap file instead of a dedicated partition. I can just use a swap file instead of a dedicated partition.
vegardbm
commented
How big should the swap file be then? How big should the swap file be then?
vegardbm
commented
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";
|
||||
}
|
||||
@@ -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
felixalb
commented
LGTM LGTM
|
||||
wenche = {
|
||||
ipv4 = pvv-ipv4 240;
|
||||
ipv6 = pvv-ipv6 240;
|
||||
|
||||
Reference in New Issue
Block a user
Does this work? On ildkule, I believe we had to use grub2 for some reason. Very cool if it works.
I am pretty sure this works I can try to reboot again to confirm.
I am able to reboot the machine without issue, marking this as resolved.