From 9b2a464a6a6d38887e64f32d8aa085afe8d295f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sun, 28 May 2023 15:35:16 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20use=20nixos-hardware?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 16 ++++++++++++++++ flake.nix | 9 ++++++++- hosts/neodymium/configuration.nix | 3 +++ hosts/neodymium/hardware-configuration.nix | 2 +- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/flake.lock b/flake.lock index d31acaa..c3e8124 100644 --- a/flake.lock +++ b/flake.lock @@ -291,6 +291,21 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1684899633, + "narHash": "sha256-NtwerXX8UFsoNy6k+DukJMriWtEjQtMU/Urbff2O2Dg=", + "owner": "nixos", + "repo": "nixos-hardware", + "rev": "4cc688ee711159b9bcb5a367be44007934e1a49d", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1684570954, @@ -360,6 +375,7 @@ "flake-utils": "flake-utils", "home-manager": "home-manager", "lanzaboote": "lanzaboote", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs" } }, diff --git a/flake.nix b/flake.nix index d5c002b..3f659de 100644 --- a/flake.nix +++ b/flake.nix @@ -22,9 +22,12 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nixos-hardware.url = "github:nixos/nixos-hardware"; }; - outputs = { nixpkgs, flake-utils, lanzaboote, agenix, home-manager, ... }: + outputs = { nixpkgs, flake-utils, lanzaboote, agenix, home-manager + , nixos-hardware, ... }: (flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; @@ -48,6 +51,10 @@ home-manager.nixosModules.home-manager agenix.nixosModules.default lanzaboote.nixosModules.lanzaboote + nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-gpu-nvidia-disable + nixos-hardware.nixosModules.common-pc-laptop + nixos-hardware.nixosModules.common-pc-laptop-ssd ]; }; diff --git a/hosts/neodymium/configuration.nix b/hosts/neodymium/configuration.nix index 48c6ea2..5dff7a9 100644 --- a/hosts/neodymium/configuration.nix +++ b/hosts/neodymium/configuration.nix @@ -6,6 +6,9 @@ DefaultTimeoutStopSec=10s ''; + # enable thermald + services.thermald.enable = true; + # udev services.udev.packages = [ pkgs.android-udev-rules ]; diff --git a/hosts/neodymium/hardware-configuration.nix b/hosts/neodymium/hardware-configuration.nix index 80b4453..ffd5974 100644 --- a/hosts/neodymium/hardware-configuration.nix +++ b/hosts/neodymium/hardware-configuration.nix @@ -1,7 +1,7 @@ # 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, ... }: +{ config, lib, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];