From ac038dcdcbc0a3f68cc1d43e49d173a6051320e7 Mon Sep 17 00:00:00 2001 From: "Simon R. - fantomitechno" Date: Mon, 8 Jun 2026 14:39:17 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Framework=20optimizations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 10 +++++++++- hosts/laptop/configuration.nix | 23 ++++------------------- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index cd0c9ac..9be0e05 100644 --- a/flake.lock +++ b/flake.lock @@ -81,6 +81,26 @@ "type": "github" } }, + "nixos-hardware": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1780310866, + "narHash": "sha256-fPBRVf6A5xlACYcOI59shGrjURuvwu0lRsDoSCEXt/I=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "4ed851c979641e28597a05086332d75cdc9e395f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1780453794, @@ -102,6 +122,7 @@ "home-manager": "home-manager", "niri-float-sticky": "niri-float-sticky", "nix4vscode": "nix4vscode", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs" } }, diff --git a/flake.nix b/flake.nix index 2c2b0db..98d084e 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,11 @@ url = "github:nix-community/nix4vscode?tag=nix4vscode-v0.0.12"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nixos-hardware = { + url = "github:NixOS/nixos-hardware"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -31,6 +36,7 @@ home-manager, niri-float-sticky, nix4vscode, + nixos-hardware, ... }: let @@ -60,7 +66,9 @@ nixosConfigurations = { fantomitechno-laptop = nixpkgs.lib.nixosSystem { inherit system; - modules = commonModules "laptop"; + modules = commonModules "laptop" ++ [ + nixos-hardware.nixosModules.framework-13-7040-amd + ]; }; fantomitechno-desktop = nixpkgs.lib.nixosSystem { inherit system; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 9540a76..ca5ce8f 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -1,5 +1,6 @@ { pkgs, + lib, ... }: @@ -23,6 +24,9 @@ variant = ""; }; + hardware.framework.laptop13.audioEnhancement.enable = true; + services.fprintd.enable = lib.mkForce false; + networking.hostName = "fantomitechno-laptop"; console.keyMap = "us"; @@ -34,24 +38,5 @@ GDK_BACKEND = "wayland"; }; - services.tlp = { - enable = true; - settings = { - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - - CPU_MIN_PERF_ON_AC = 0; - CPU_MAX_PERF_ON_AC = 100; - CPU_MIN_PERF_ON_BAT = 0; - CPU_MAX_PERF_ON_BAT = 20; - - START_CHARGE_THRESH_BAT0 = 40; - STOP_CHARGE_THRESH_BAT0 = 80; - }; - }; - system.stateVersion = "26.05"; } -- 2.54.0