From 351aa5e53038a2ffe0758593ab7694fc3b8c9460 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 30 Mar 2025 01:46:10 +0200 Subject: [PATCH] add nixos-hardware Signed-off-by: unexplrd --- flake.lock | 17 +++++++++++++++++ hosts/dunamis/hardware.nix | 11 +++++------ hosts/dunamis/services.nix | 1 - 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 1aba727..f21ad33 100644 --- a/flake.lock +++ b/flake.lock @@ -1074,6 +1074,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1743167577, + "narHash": "sha256-I09SrXIO0UdyBFfh0fxDq5WnCDg8XKmZ1HQbaXzMA1k=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "0ed819e708af17bfc4bbc63ee080ef308a24aa42", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1742288794, @@ -1241,6 +1257,7 @@ "mysecrets": "mysecrets", "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "sops-nix": "sops-nix", "stylix": "stylix", diff --git a/hosts/dunamis/hardware.nix b/hosts/dunamis/hardware.nix index c0ce340..0e88e54 100644 --- a/hosts/dunamis/hardware.nix +++ b/hosts/dunamis/hardware.nix @@ -1,19 +1,18 @@ { + lib, inputs, modulesPath, ... }: { imports = with inputs.nixos-hardware.nixosModules; [ (modulesPath + "/installer/scan/not-detected.nix") - common-amd-cpu-pstate - common-intel-gpu + common-cpu-amd-pstate + common-gpu-intel common-pc-ssd ]; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware = { enableRedistributableFirmware = true; - intelgpu = { - vaapiDriver = "intel-media-driver"; - useIntelMediaDriver = true; - }; + intelgpu.vaapiDriver = "intel-media-driver"; }; } diff --git a/hosts/dunamis/services.nix b/hosts/dunamis/services.nix index bb9398b..97f86e0 100644 --- a/hosts/dunamis/services.nix +++ b/hosts/dunamis/services.nix @@ -2,7 +2,6 @@ services = { # hardware.openrgb.enable = true; flatpak.enable = true; - fstrim.enable = true; fwupd.enable = true; openssh.enable = true; syncthing.openDefaultPorts = true;