From 14ccd568717a9dbcfc5fe895838de9a226f2e68c Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Tue, 24 Sep 2024 13:25:08 -0700 Subject: [PATCH] Colmena dev --- nix/nix-lab/flake.nix | 6 +++ .../hosts/ranger/hardware-configuration.nix | 41 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 nix/nix-lab/hosts/ranger/hardware-configuration.nix diff --git a/nix/nix-lab/flake.nix b/nix/nix-lab/flake.nix index d02d1222..79a1b09b 100644 --- a/nix/nix-lab/flake.nix +++ b/nix/nix-lab/flake.nix @@ -48,8 +48,12 @@ }; }; time.timeZone = "America/Los_Angeles"; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + system.stateVersion = "24.05"; }; bard = { name, nodes, ... }: { + imports = [ ./hosts/bard/hardware-configuration.nix ]; deployment = { targetUser = "admin"; targetHost = "192.168.1.31"; @@ -59,6 +63,7 @@ networking.interfaces."enp1s0".ipv4.addresses.address = "192.168.1.31"; }; ranger = { name, nodes, ... }: { + imports = [ ./hosts/ranger/hardware-configuration.nix ]; deployment = { targetUser = "admin"; targetHost = "192.168.1.32"; @@ -68,6 +73,7 @@ networking.interfaces."enp1s0".ipv4.addresses.address = "192.168.1.32"; }; cleric = { name, nodes, ... }: { + imports = [ ./hosts/cleric/hardware-configuration.nix ]; deployment = { targetUser = "admin"; targetHost = "192.168.1.33"; diff --git a/nix/nix-lab/hosts/ranger/hardware-configuration.nix b/nix/nix-lab/hosts/ranger/hardware-configuration.nix new file mode 100644 index 00000000..200f1780 --- /dev/null +++ b/nix/nix-lab/hosts/ranger/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/889a82ef-50d8-49d9-a392-6b6d86516abc"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/4DDD-F278"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/bd9702db-e6cf-4935-b2a3-d3435beb7e43"; } + ]; + + # 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.enp1s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s12f0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}