From 64b91f4982291a20d6ef7cb06349dc29130a5cc0 Mon Sep 17 00:00:00 2001 From: DerGrumpf Date: Sun, 6 Apr 2025 21:07:08 +0200 Subject: [PATCH] Added: Hardware Config HP --- hosts/hp15-n028sg/default.nix | 6 +-- hosts/hp15-n028sg/hardware-configuration.nix | 39 ++++++++++++++++++++ 2 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 hosts/hp15-n028sg/hardware-configuration.nix diff --git a/hosts/hp15-n028sg/default.nix b/hosts/hp15-n028sg/default.nix index baad2f6..53d03d0 100644 --- a/hosts/hp15-n028sg/default.nix +++ b/hosts/hp15-n028sg/default.nix @@ -27,10 +27,8 @@ programs.geary.enable = true; boot.loader = { - grub = { - enable = true; - device = "/dev/sda"; - }; + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; }; networking.hostName = "nix-hp"; # Define your hostname. diff --git a/hosts/hp15-n028sg/hardware-configuration.nix b/hosts/hp15-n028sg/hardware-configuration.nix new file mode 100644 index 0000000..e6e219b --- /dev/null +++ b/hosts/hp15-n028sg/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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" "usb_storage" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-label/NIXROOT"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-label/NIXBOOT"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}