From 2b46bdc3c4bbe3af36fb19548a0b78b038ad8d3e Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Thu, 13 Jul 2023 14:44:05 +0200 Subject: [PATCH] add bento to host, change hw configuration --- hosts/nb-epicenter/configuration.nix | 1 + hosts/nb-epicenter/hardware-configuration.nix | 61 +++++++++---------- 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/hosts/nb-epicenter/configuration.nix b/hosts/nb-epicenter/configuration.nix index b6b0a6b..f1a56fd 100644 --- a/hosts/nb-epicenter/configuration.nix +++ b/hosts/nb-epicenter/configuration.nix @@ -23,6 +23,7 @@ # ./modules/howdy + ./utils/bento.nix ./hardware-configuration.nix ]; diff --git a/hosts/nb-epicenter/hardware-configuration.nix b/hosts/nb-epicenter/hardware-configuration.nix index fda9b13..bf3cde7 100644 --- a/hosts/nb-epicenter/hardware-configuration.nix +++ b/hosts/nb-epicenter/hardware-configuration.nix @@ -2,57 +2,52 @@ # 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") - ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; # ← use the same mount point here. + }; + grub = { + device = "nodev"; + }; + }; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.kernelParams = [ "resume=/swap/swapfile" "resume_offset=533760" ]; - boot.resumeDevice = "/dev/disk/by-uuid/92284909-c5dd-4e0f-ab22-64157c8175cb"; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/92284909-c5dd-4e0f-ab22-64157c8175cb"; - fsType = "btrfs"; - options = [ "subvol=root" ]; + { device = "/dev/disk/by-uuid/15351aae-3efa-469f-aa3f-47f2b0ee44f7"; + fsType = "ext4"; }; - # boot.initrd.luks.devices."nixos-enc".device = "/dev/disk/by-uuid/7435d48f-f942-485b-9817-328ad3fc0b93"; + boot.initrd.luks.devices."luks-bfd1b7ac-b7b8-4d86-b9d6-222e96ae66ec".device = "/dev/disk/by-uuid/bfd1b7ac-b7b8-4d86-b9d6-222e96ae66ec"; - fileSystems."/home" = - { device = "/dev/disk/by-uuid/92284909-c5dd-4e0f-ab22-64157c8175cb"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C281-E509"; + fileSystems."/boot/efi" = + { device = "/dev/disk/by-uuid/711C-5E27"; fsType = "vfat"; }; - fileSystems."/swap" = - { device = "/dev/disk/by-uuid/92284909-c5dd-4e0f-ab22-64157c8175cb"; - fsType = "btrfs"; - options = [ "subvol=swap" ]; - }; - - swapDevices = [{ - device = "/swap/swapfile"; - size = (1024 * 16); - }]; + swapDevices = + [ { device = "/dev/disk/by-uuid/d218dec3-1980-44c9-b39d-59136494f184"; } + ]; # 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.wlp52s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp5s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }