From ce98d6ad2ad10517f8d889cafefde1c389bf9596 Mon Sep 17 00:00:00 2001 From: Chris Dombroski Date: Mon, 29 Jul 2024 22:13:52 -0400 Subject: [PATCH] nixos-hardware --- flake.lock | 17 +++++++++++++++++ flake.nix | 15 ++++++++++++++- systems/smolboi/configuration.nix | 4 ---- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 471d49b..feb40a4 100644 --- a/flake.lock +++ b/flake.lock @@ -257,6 +257,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1722278305, + "narHash": "sha256-xLBAegsn9wbj+pQfbX07kykd5VBV3Ywk3IbObVAAlWA=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "eab049fe178c11395d65a858ba1b56461ba9652d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1722087241, @@ -295,6 +311,7 @@ "flake-utils": "flake-utils", "home-manager": "home-manager", "impermanence": "impermanence", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "sops-nix": "sops-nix", "stylix": "stylix" diff --git a/flake.nix b/flake.nix index abaa580..9b0afef 100644 --- a/flake.nix +++ b/flake.nix @@ -24,9 +24,10 @@ home-manager.follows = "home-manager"; }; }; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; }; outputs = inputs@{ self, nixpkgs, flake-utils, home-manager, deploy-rs - , sops-nix, impermanence, stylix, ... }: + , sops-nix, impermanence, stylix, nixos-hardware, ... }: let pkgs = import nixpkgs { system = "x86_64-linux"; }; aarch64Pkgs = import nixpkgs { system = "aarch64-linux"; }; @@ -63,6 +64,13 @@ stylix.nixosModules.stylix impermanence.nixosModules.impermanence ./systems/smolboi/configuration.nix + nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-cpu-amd-pstate + nixos-hardware.nixosModules.common-cpu-amd-zenpower + nixos-hardware.nixosModules.common-gpu-amd + nixos-hardware.nixosModules.common-pc + nixos-hardware.nixosModules.common-pc-ssd + nixos-hardware.nixosModules.gigabyte-b550 home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -76,6 +84,11 @@ modules = [ impermanence.nixosModules.impermanence ./systems/zeus/configuration.nix + nixos-hardware.nixosModules.supermicro + nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-cpu-amd-pstate + nixos-hardware.nixosModules.common-cpu-amd-zenpower + nixos-hardware.nixosModules.common-pc ]; }; orangepihole = nixpkgs.lib.nixosSystem { diff --git a/systems/smolboi/configuration.nix b/systems/smolboi/configuration.nix index e108b94..48d2b94 100644 --- a/systems/smolboi/configuration.nix +++ b/systems/smolboi/configuration.nix @@ -10,9 +10,6 @@ ]; boot = { - blacklistedKernelModules = [ "k10temp" ]; - extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; - kernelParams = [ "amd_pstate=passive" ]; loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; binfmt.registrations.appimage = { @@ -25,7 +22,6 @@ }; tmp.cleanOnBoot = true; }; - powerManagement.cpuFreqGovernor = "schedutil"; sops.secrets."cdombroski/password" = { neededForUsers = true; sopsFile = ../../secrets/smolboi/users.yaml;