From e2f5407c757fdfb9d5205b9f0ba276c673b6b4bd Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Mon, 12 Aug 2024 19:37:39 +0100 Subject: [PATCH] hosts: add kalessin --- hive.nix | 11 +++++ hosts/kalessin/configuration.nix | 12 ++++++ hosts/kalessin/hardware-configuration.nix | 52 +++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 hosts/kalessin/configuration.nix create mode 100644 hosts/kalessin/hardware-configuration.nix diff --git a/hive.nix b/hive.nix index 43603b8..23baf32 100644 --- a/hive.nix +++ b/hive.nix @@ -59,4 +59,15 @@ in { ./hosts/orm/configuration.nix ]; }; + + kalessin = { name, nodes, ... }: { + networking.hostId = "534b538e"; + time.timeZone = "Etc/UTC"; + deployment.buildOnTarget = true; + + imports = [ + ./deployment/remote.nix + ./hosts/kalessin/configuration.nix + ]; + }; } diff --git a/hosts/kalessin/configuration.nix b/hosts/kalessin/configuration.nix new file mode 100644 index 0000000..84c9f82 --- /dev/null +++ b/hosts/kalessin/configuration.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + system.stateVersion = "23.11"; +} diff --git a/hosts/kalessin/hardware-configuration.nix b/hosts/kalessin/hardware-configuration.nix new file mode 100644 index 0000000..53ff439 --- /dev/null +++ b/hosts/kalessin/hardware-configuration.nix @@ -0,0 +1,52 @@ +# 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 = [ "xhci_pci" "virtio_scsi" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "rpool_kalessin/root"; + fsType = "zfs"; + }; + + fileSystems."/nix" = + { device = "rpool_kalessin/nix"; + fsType = "zfs"; + }; + + fileSystems."/var" = + { device = "rpool_kalessin/var"; + fsType = "zfs"; + }; + + fileSystems."/data" = + { device = "rpool_kalessin/data"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2ADE-A033"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s6.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +}