From daf867dcb9e1d5092ab457c012a70cfa0cdc8189 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 1 Feb 2021 17:33:29 +0100 Subject: [PATCH] machines: Add vueko This only adds a minimal configuration. --- machines/default.nix | 3 ++ machines/vueko/configuration.nix | 16 ++++++++ machines/vueko/hardware-configuration.nix | 49 +++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 machines/vueko/configuration.nix create mode 100644 machines/vueko/hardware-configuration.nix diff --git a/machines/default.nix b/machines/default.nix index 3184a3f..c5ed895 100644 --- a/machines/default.nix +++ b/machines/default.nix @@ -15,4 +15,7 @@ lib.mapAttrs { nunotaba = { }; sayuri = { }; + vueko = { + target = "root@vueko.sbruder.de"; + }; } diff --git a/machines/vueko/configuration.nix b/machines/vueko/configuration.nix new file mode 100644 index 0000000..3c9b4d2 --- /dev/null +++ b/machines/vueko/configuration.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ../../modules + ]; + + sbruder = { + restic.enable = true; + }; + + networking.hostName = "vueko"; + + system.stateVersion = "20.09"; +} diff --git a/machines/vueko/hardware-configuration.nix b/machines/vueko/hardware-configuration.nix new file mode 100644 index 0000000..38a493e --- /dev/null +++ b/machines/vueko/hardware-configuration.nix @@ -0,0 +1,49 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot = { + kernelModules = [ ]; + extraModulePackages = [ ]; + kernelParams = [ "ip=dhcp" ]; + initrd = { + availableKernelModules = [ "ata_piix" "virtio_pci" "xhci_pci" "sd_mod" "sr_mod" ]; + kernelModules = [ ]; + network.enable = true; # remote unlocking + luks.devices."root".device = "/dev/disk/by-uuid/9d3f544f-d502-4788-8187-1378a9ee0103"; + }; + loader.grub.device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0"; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/cad3325d-775d-4771-bb2d-7beaff9dbaf1"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/52c65d2f-2208-48aa-9d0a-592bca2ecfe3"; + fsType = "ext2"; + }; + }; + + networking.useDHCP = false; + networking.usePredictableInterfaceNames = false; + systemd.network = { + enable = true; + networks = { + eth0 = { + name = "eth0"; + DHCP = "yes"; + domains = [ "sbruder.de" ]; + address = [ "2a01:4f8:1c1c:4397::/64" ]; + gateway = [ "fe80::1" ]; + }; + }; + }; + + # no smart on qemu disk + services.smartd.enable = false; +}