From 5f5a1d378a9a3536bde9520ed2c46077508dd08a Mon Sep 17 00:00:00 2001 From: arunoruto Date: Sat, 21 Sep 2024 01:13:12 +0200 Subject: [PATCH] Dont use kernel params for iishin --- flake.nix | 7 ++++++- hosts/isshin/configuration.nix | 22 ++++++++++----------- modules/home-manager/pc/gui/thunderbird.nix | 3 ++- modules/nixos/environment/amd.nix | 2 +- modules/nixos/environment/cachix.nix | 3 +++ modules/nixos/services/default.nix | 1 + modules/nixos/services/ppd.nix | 17 ++++++++++++++++ modules/nixos/user.nix | 5 ----- 8 files changed, 41 insertions(+), 19 deletions(-) create mode 100644 modules/nixos/services/ppd.nix diff --git a/flake.nix b/flake.nix index 7ee4c23..be94eb2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,11 @@ { description = "Mirzas Nix Config"; + nixConfig = { + extra-substituters = ["https://arunoruto.cachix.org"]; + extra-trusted-public-keys = ["arunoruto.cachix.org-1:GQVw1YDtjt0+ElmQifxEI52a0pRVe9/gdcNEr8v8G14="]; + }; + inputs = { # Nixpkgs nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; @@ -169,7 +174,7 @@ ./homes ]; }; - + # Framework Laptop Intel 11th zangetsu = nixpkgs.lib.nixosSystem { inherit system; diff --git a/hosts/isshin/configuration.nix b/hosts/isshin/configuration.nix index fce3e90..ef77fbe 100644 --- a/hosts/isshin/configuration.nix +++ b/hosts/isshin/configuration.nix @@ -8,15 +8,15 @@ amd.enable = true; # Framework specific kernel Params - boot = { - kernelParams = [ - #"quiet" - #"splash" - # "ahci.mobile_lpm_policy=3" - # For Power consumption - # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html - # "mem_sleep_default=deep" - ]; - # initrd.kernelModules = ["i915"]; - }; + # boot = { + # kernelParams = [ + # #"quiet" + # #"splash" + # # "ahci.mobile_lpm_policy=3" + # # For Power consumption + # # https://kvark.github.io/linux/framework/2021/10/17/framework-nixos.html + # # "mem_sleep_default=deep" + # ]; + # # initrd.kernelModules = ["i915"]; + # }; } diff --git a/modules/home-manager/pc/gui/thunderbird.nix b/modules/home-manager/pc/gui/thunderbird.nix index ac110cd..f131314 100644 --- a/modules/home-manager/pc/gui/thunderbird.nix +++ b/modules/home-manager/pc/gui/thunderbird.nix @@ -9,7 +9,8 @@ config = lib.mkIf config.thunderbird.enable { programs.thunderbird = { enable = true; - package = pkgs.unstable.thunderbird-128; + # package = pkgs.unstable.thunderbird-128; + package = pkgs.thunderbird; profiles.mirza = { isDefault = true; }; diff --git a/modules/nixos/environment/amd.nix b/modules/nixos/environment/amd.nix index d3191ff..7e46459 100644 --- a/modules/nixos/environment/amd.nix +++ b/modules/nixos/environment/amd.nix @@ -9,7 +9,7 @@ }; config = lib.mkIf config.amd.enable { - boot.initrd.kernelModules = ["amdgpu"]; + # boot.initrd.kernelModules = ["amdgpu"]; services.xserver.videoDrivers = ["amdgpu"]; diff --git a/modules/nixos/environment/cachix.nix b/modules/nixos/environment/cachix.nix index f1c2e5d..616f8c3 100644 --- a/modules/nixos/environment/cachix.nix +++ b/modules/nixos/environment/cachix.nix @@ -2,6 +2,7 @@ pkgs, lib, config, + username, ... }: { options.cachix.enable = lib.mkEnableOption "Use cachix to manage nix caches for packages"; @@ -10,5 +11,7 @@ environment.systemPackages = with pkgs; [ cachix ]; + + nix.settings.trusted-users = ["root" username]; }; } diff --git a/modules/nixos/services/default.nix b/modules/nixos/services/default.nix index 7d40672..f0ffcb5 100644 --- a/modules/nixos/services/default.nix +++ b/modules/nixos/services/default.nix @@ -24,4 +24,5 @@ # oneapi.enable = lib.mkDefault true; ssh.enable = lib.mkDefault true; tlp.enable = lib.mkDefault false; + ppd.enable = lib.mkDefault false; } diff --git a/modules/nixos/services/ppd.nix b/modules/nixos/services/ppd.nix new file mode 100644 index 0000000..6c0a27f --- /dev/null +++ b/modules/nixos/services/ppd.nix @@ -0,0 +1,17 @@ +{ + lib, + config, + ... +}: { + options.ppd.enable = lib.mkEnableOption '' + Enable power saving using Power Profiles Deamon. + Needed by AMD framework laptops, since TLP interfers with some process. + https://knowledgebase.frame.work/en_us/optimizing-ubuntu-battery-life-Sye_48Lg3 + ''; + + config = lib.mkIf config.ppd.enable { + services = { + power-profiles-daemon.enable = lib.mkDefault true; + powerManagement.powertop.enable = lib.mkDefault false; + }; +} diff --git a/modules/nixos/user.nix b/modules/nixos/user.nix index 9234b53..465ed27 100644 --- a/modules/nixos/user.nix +++ b/modules/nixos/user.nix @@ -37,11 +37,6 @@ environment.sessionVariables.FLAKE = "/home/${username}/.config/flake"; - # catppuccin = { - # enable = true; - # flavor = "macchiato"; - # accent = "green"; - # }; imports = [ inputs.stylix.nixosModules.stylix ];