ctucx.git: nixfiles

ctucx' nixfiles

commit ac920a2c9e587b2338152aec73abbe70aac617bc
parent 2482544507d67e8552c3da1c7de18ded71cc3dab
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 27 Jan 2022 23:33:21 +0100

machines: add host hector
2 files changed, 84 insertions(+), 0 deletions(-)
A
machines/hector/configuration.nix
|
46
++++++++++++++++++++++++++++++++++++++++++++++
A
machines/hector/hardware-configuration.nix
|
38
++++++++++++++++++++++++++++++++++++++
diff --git a/machines/hector/configuration.nix b/machines/hector/configuration.nix
@@ -0,0 +1,46 @@
+{ config, pkgs, ... }:
+
+{
+
+  imports = [
+    ./hardware-configuration.nix
+    ../../configurations/common.nix
+    ../../configurations/services/prometheus-node-exporter.nix
+  ];
+
+  boot.loader.grub = {
+    enable  = true;
+    version = 2;
+    device  = "/dev/sda";
+  };
+
+  networking = {
+    hostName = "hector";
+    domain   = "ctu.cx";
+
+    useDHCP = false;
+
+    interfaces.ens18 = {
+      ipv6.addresses = [{
+        address     = "2a01:4f9:6b:2d99:2829:acab::1";
+        prefixLength = 128;
+      }];
+    };
+
+    defaultGateway6 = {
+      address = "2a01:4f9:6b:2d99::2";
+      interface = "ens18";
+    };
+
+    nameservers = [
+      "2001:67c:2b0::4"
+      "2001:67c:2b0::6"
+    ];
+
+    firewall.enable = true;
+  };
+
+  system.stateVersion = "21.11";
+  home-manager.users.leah.home.stateVersion = "21.11";
+}
+
diff --git a/machines/hector/hardware-configuration.nix b/machines/hector/hardware-configuration.nix
@@ -0,0 +1,38 @@
+# 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" "sr_mod" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/9183f812-936d-482a-bc25-17c35d31df71";
+      fsType = "ext4";
+    };
+
+  boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/116a46a2-f1ab-4313-bd8c-cdb5a522d368";
+
+  fileSystems."/data" =
+    { device = "/dev/disk/by-uuid/25c3bc2a-b55b-483e-b0db-331508644b6a";
+      fsType = "ext4";
+    };
+
+  boot.initrd.luks.devices."data".device = "/dev/disk/by-uuid/c9cd1573-6c20-4e45-b720-5f182b140dba";
+
+  fileSystems."/boot" =
+    { device = "/dev/disk/by-uuid/6D4E-A4DD";
+      fsType = "vfat";
+    };
+
+  swapDevices = [ ];
+
+  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}