diff options
Diffstat (limited to 'hosts/server1')
-rw-r--r-- | hosts/server1/configuration.nix | 5 | ||||
-rw-r--r-- | hosts/server1/hardware.nix | 9 | ||||
-rw-r--r-- | hosts/server1/networking.nix | 17 |
3 files changed, 20 insertions, 11 deletions
diff --git a/hosts/server1/configuration.nix b/hosts/server1/configuration.nix index 729ef0f..891c5dc 100644 --- a/hosts/server1/configuration.nix +++ b/hosts/server1/configuration.nix @@ -1,10 +1,9 @@ {pkgs, ...}: { imports = [ ./networking.nix # network configuration that just works + ./hardware.nix ../../system - - ../../services ]; boot.cleanTmpDir = true; @@ -12,7 +11,7 @@ networking.hostName = "server1"; networking.domain = "vhack.eu"; - system.fileSystemLayouts.mainDisk = "/dev/vda3"; + system.fileSystemLayouts.mainDisk = "/dev/disk/by-uuid/7d960eb9-9334-4aef-9f7c-9a908a91a6db"; system.stateVersion = "22.11"; } diff --git a/hosts/server1/hardware.nix b/hosts/server1/hardware.nix new file mode 100644 index 0000000..9fabafe --- /dev/null +++ b/hosts/server1/hardware.nix @@ -0,0 +1,9 @@ +{modulesPath, ...}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + (modulesPath + "/profiles/headless.nix") + ]; + boot.loader.grub.device = "/dev/vda"; + boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; + boot.initrd.kernelModules = []; +} diff --git a/hosts/server1/networking.nix b/hosts/server1/networking.nix index 26d6719..cd0484f 100644 --- a/hosts/server1/networking.nix +++ b/hosts/server1/networking.nix @@ -5,8 +5,14 @@ nameservers = [ "8.8.8.8" ]; - defaultGateway = "89.58.56.1"; - defaultGateway6 = "fe80::1"; + defaultGateway = { + address = "89.58.56.1"; + interface = "eth0"; + }; + defaultGateway6 = { + address = "fe80::1"; + interface = "eth0"; + }; dhcpcd.enable = false; usePredictableInterfaceNames = lib.mkForce false; interfaces = { @@ -19,11 +25,7 @@ ]; ipv6.addresses = [ { - address = "2a03:4000:6a:3f3:6422:6dff:fe82:939b"; - prefixLength = 64; - } - { - address = "fe80::6422:6dff:fe82:939b"; + address = "2a03:4000:6a:3f3::1"; prefixLength = 64; } ]; @@ -44,6 +46,5 @@ }; services.udev.extraRules = '' ATTR{address}=="66:22:6d:82:93:9b", NAME="eth0" - ''; } |