From 71d816fe804925da5d3c4fbdf8a885346040c16e Mon Sep 17 00:00:00 2001 From: Ahwx Date: Fri, 16 May 2025 11:28:56 +0200 Subject: [PATCH] feat: adds correct files for `lily` --- hosts/lily/default.nix | 10 ++++---- hosts/lily/hardware-configuration.nix | 37 +++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 hosts/lily/hardware-configuration.nix diff --git a/hosts/lily/default.nix b/hosts/lily/default.nix index b7772a7..21b6992 100644 --- a/hosts/lily/default.nix +++ b/hosts/lily/default.nix @@ -18,20 +18,20 @@ ]; boot = { - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; supportedFilesystems = [ "zfs" ]; }; - networking.hostId = "8wfk1d8a"; + networking.hostId = "8ddb2a9b"; services.zfs = { autoScrub.enable = true; trim.enable = true; }; + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + # boot.zfs.extraPools = [ "terrabite" ]; # fileSystems."/terrabite/main" = { diff --git a/hosts/lily/hardware-configuration.nix b/hosts/lily/hardware-configuration.nix new file mode 100644 index 0000000..b0c372b --- /dev/null +++ b/hosts/lily/hardware-configuration.nix @@ -0,0 +1,37 @@ +# 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 = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/75447a73-848e-4b34-a1b3-d5b7a8e804ee"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/d4552527-c7c6-4047-929b-aeb3500299e3"; } + ]; + + # 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.eno2.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0f1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}