From 844466c2cab4a4b4d960559474df52e326647005 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 19 Apr 2025 21:44:48 -0400 Subject: [PATCH] Update versions. --- nix/configuration/flake.lock | 24 +++---- nix/configuration/hosts/hydra/DEPLOY_BOOT | 2 +- nix/configuration/hosts/hydra/DEPLOY_SWITCH | 2 +- nix/configuration/hosts/hydra/ISO | 2 +- nix/configuration/hosts/neelix/DEPLOY_BOOT | 2 +- nix/configuration/hosts/neelix/DEPLOY_SWITCH | 2 +- nix/configuration/hosts/odo/ISO | 2 +- nix/configuration/hosts/odo/SELF_BOOT | 2 +- nix/configuration/hosts/odo/SELF_SWITCH | 2 +- .../hosts/odo/optimized_build.nix | 29 +++++--- nix/configuration/hosts/quark/DEPLOY_BOOT | 2 +- nix/configuration/hosts/quark/DEPLOY_SWITCH | 2 +- nix/configuration/hosts/quark/ISO | 2 +- nix/configuration/hosts/quark/SELF_BOOT | 2 +- nix/configuration/hosts/quark/SELF_SWITCH | 2 +- .../hosts/quark/optimized_build.nix | 20 +++++- .../hosts/quark/power_management.nix | 69 ++++++++----------- nix/configuration/roles/graphics/default.nix | 15 ++++ 18 files changed, 107 insertions(+), 76 deletions(-) diff --git a/nix/configuration/flake.lock b/nix/configuration/flake.lock index 79b7695..f031913 100644 --- a/nix/configuration/flake.lock +++ b/nix/configuration/flake.lock @@ -40,11 +40,11 @@ ] }, "locked": { - "lastModified": 1743598667, - "narHash": "sha256-ViE7NoFWytYO2uJONTAX35eGsvTYXNHjWALeHAg8OQY=", + "lastModified": 1744940522, + "narHash": "sha256-TNoetfICvd29DhxRPpmyKItQBDlqSvKcV+wGNkn14jk=", "owner": "nix-community", "repo": "disko", - "rev": "329d3d7e8bc63dd30c39e14e6076db590a6eabe6", + "rev": "51d33bbb7f1e74ba5f9d9a77357735149da99081", "type": "github" }, "original": { @@ -155,11 +155,11 @@ ] }, "locked": { - "lastModified": 1742588233, - "narHash": "sha256-Fi5g8H5FXMSRqy+mU6gPG0v+C9pzjYbkkiePtz8+PpA=", + "lastModified": 1745071558, + "narHash": "sha256-bvcatss0xodcdxXm0LUSLPd2jjrhqO3yFSu3stOfQXg=", "owner": "nix-community", "repo": "home-manager", - "rev": "296ddc64627f4a6a4eb447852d7346b9dd16197d", + "rev": "9676e8a52a177d80c8a42f66566362a6d74ecf78", "type": "github" }, "original": { @@ -211,11 +211,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1742422364, - "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=", + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "type": "github" }, "original": { @@ -259,11 +259,11 @@ }, "nixpkgs-unoptimized": { "locked": { - "lastModified": 1742422364, - "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=", + "lastModified": 1744932701, + "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc", + "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "type": "github" }, "original": { diff --git a/nix/configuration/hosts/hydra/DEPLOY_BOOT b/nix/configuration/hosts/hydra/DEPLOY_BOOT index 04484dc..f2039e2 100755 --- a/nix/configuration/hosts/hydra/DEPLOY_BOOT +++ b/nix/configuration/hosts/hydra/DEPLOY_BOOT @@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild boot --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" |& nom +nixos-rebuild boot --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom # rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#hydra' diff --git a/nix/configuration/hosts/hydra/DEPLOY_SWITCH b/nix/configuration/hosts/hydra/DEPLOY_SWITCH index e1fedc3..3a1ecdb 100755 --- a/nix/configuration/hosts/hydra/DEPLOY_SWITCH +++ b/nix/configuration/hosts/hydra/DEPLOY_SWITCH @@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild switch --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" |& nom +nixos-rebuild switch --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom # rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild switch --flake /persist/manual/configuration#hydra' diff --git a/nix/configuration/hosts/hydra/ISO b/nix/configuration/hosts/hydra/ISO index 16891ac..60a6895 100755 --- a/nix/configuration/hosts/hydra/ISO +++ b/nix/configuration/hosts/hydra/ISO @@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.hydra" --max-jobs "$JOBS" |& nom +nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.hydra" --max-jobs "$JOBS" "${@}" |& nom diff --git a/nix/configuration/hosts/neelix/DEPLOY_BOOT b/nix/configuration/hosts/neelix/DEPLOY_BOOT index 41c2faf..09321ac 100755 --- a/nix/configuration/hosts/neelix/DEPLOY_BOOT +++ b/nix/configuration/hosts/neelix/DEPLOY_BOOT @@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild boot --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" |& nom +nixos-rebuild boot --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom # rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#neelix' diff --git a/nix/configuration/hosts/neelix/DEPLOY_SWITCH b/nix/configuration/hosts/neelix/DEPLOY_SWITCH index d85e001..c1ea1e1 100755 --- a/nix/configuration/hosts/neelix/DEPLOY_SWITCH +++ b/nix/configuration/hosts/neelix/DEPLOY_SWITCH @@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild switch --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" |& nom +nixos-rebuild switch --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom # rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild switch --flake /persist/manual/configuration#neelix' diff --git a/nix/configuration/hosts/odo/ISO b/nix/configuration/hosts/odo/ISO index 99e918d..caa8063 100755 --- a/nix/configuration/hosts/odo/ISO +++ b/nix/configuration/hosts/odo/ISO @@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.odo" --max-jobs "$JOBS" |& nom +nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.odo" --max-jobs "$JOBS" "${@}" |& nom diff --git a/nix/configuration/hosts/odo/SELF_BOOT b/nix/configuration/hosts/odo/SELF_BOOT index 7550487..c5254a0 100755 --- a/nix/configuration/hosts/odo/SELF_BOOT +++ b/nix/configuration/hosts/odo/SELF_BOOT @@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" |& nom +nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" "${@}" |& nom diff --git a/nix/configuration/hosts/odo/SELF_SWITCH b/nix/configuration/hosts/odo/SELF_SWITCH index 5377bb6..916ac5e 100755 --- a/nix/configuration/hosts/odo/SELF_SWITCH +++ b/nix/configuration/hosts/odo/SELF_SWITCH @@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" |& nom +nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" "${@}" |& nom diff --git a/nix/configuration/hosts/odo/optimized_build.nix b/nix/configuration/hosts/odo/optimized_build.nix index ab5a323..c778564 100644 --- a/nix/configuration/hosts/odo/optimized_build.nix +++ b/nix/configuration/hosts/odo/optimized_build.nix @@ -75,21 +75,30 @@ haskellPackages = prev.haskellPackages.extend ( final': prev': { crypton = pkgs-unoptimized.haskellPackages.crypton; + crypton-connection = pkgs-unoptimized.haskellPackages.crypton-connection; + crypton-x509 = pkgs-unoptimized.haskellPackages.crypton-x509; + crypton-x509-store = pkgs-unoptimized.haskellPackages.crypton-x509-store; + crypton-x509-system = pkgs-unoptimized.haskellPackages.crypton-x509-system; + crypton-x509-validation = pkgs-unoptimized.haskellPackages.crypton-x509-validation; + hspec-wai = pkgs-unoptimized.haskellPackages.hspec-wai; + http-client-tls = pkgs-unoptimized.haskellPackages.http-client-tls; + http2 = pkgs-unoptimized.haskellPackages.http2; + pandoc = pkgs-unoptimized.haskellPackages.pandoc; + pandoc-cli = pkgs-unoptimized.haskellPackages.pandoc-cli; + pandoc-lua-engine = pkgs-unoptimized.haskellPackages.pandoc-lua-engine; + pandoc-server = pkgs-unoptimized.haskellPackages.pandoc-server; + servant-server = pkgs-unoptimized.haskellPackages.servant-server; + tls = pkgs-unoptimized.haskellPackages.tls; + wai-app-static = pkgs-unoptimized.haskellPackages.wai-app-static; + wai-extra = pkgs-unoptimized.haskellPackages.wai-extra; + warp = pkgs-unoptimized.haskellPackages.warp; } ); }) - # (final: prev: { - # haskell = prev.haskell // { - # packageOverrides = final.lib.composeExtensions prev.haskell.packageOverrides ( - # final': prev': { - # crypton = pkgs-unoptimized.haskellPackages.crypton; - # } - # ); - # }; - # }) (final: prev: { - redis = pkgs-unoptimized.redis; gsl = pkgs-unoptimized.gsl; + redis = pkgs-unoptimized.redis; + valkey = pkgs-unoptimized.valkey; }) ]; diff --git a/nix/configuration/hosts/quark/DEPLOY_BOOT b/nix/configuration/hosts/quark/DEPLOY_BOOT index a2c7f49..6b9b999 100755 --- a/nix/configuration/hosts/quark/DEPLOY_BOOT +++ b/nix/configuration/hosts/quark/DEPLOY_BOOT @@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild boot --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" |& nom +nixos-rebuild boot --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom # rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#quark' diff --git a/nix/configuration/hosts/quark/DEPLOY_SWITCH b/nix/configuration/hosts/quark/DEPLOY_SWITCH index 46854c2..aa21c0a 100755 --- a/nix/configuration/hosts/quark/DEPLOY_SWITCH +++ b/nix/configuration/hosts/quark/DEPLOY_SWITCH @@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild switch --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" |& nom +nixos-rebuild switch --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --no-build-nix --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom # rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild switch --flake /persist/manual/configuration#quark' diff --git a/nix/configuration/hosts/quark/ISO b/nix/configuration/hosts/quark/ISO index 73a198d..cbde604 100755 --- a/nix/configuration/hosts/quark/ISO +++ b/nix/configuration/hosts/quark/ISO @@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.quark" --max-jobs "$JOBS" |& nom +nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.quark" --max-jobs "$JOBS" "${@}" |& nom diff --git a/nix/configuration/hosts/quark/SELF_BOOT b/nix/configuration/hosts/quark/SELF_BOOT index 5441258..2c321c1 100755 --- a/nix/configuration/hosts/quark/SELF_BOOT +++ b/nix/configuration/hosts/quark/SELF_BOOT @@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" |& nom +nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" "${@}" |& nom diff --git a/nix/configuration/hosts/quark/SELF_SWITCH b/nix/configuration/hosts/quark/SELF_SWITCH index 12909eb..f7a3d7d 100755 --- a/nix/configuration/hosts/quark/SELF_SWITCH +++ b/nix/configuration/hosts/quark/SELF_SWITCH @@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" nix flake update zsh-histdb --flake "$DIR/../../" nix flake update ansible-sshjail --flake "$DIR/../../" for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done -nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" |& nom +nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" "${@}" |& nom diff --git a/nix/configuration/hosts/quark/optimized_build.nix b/nix/configuration/hosts/quark/optimized_build.nix index e0c349c..78b081d 100644 --- a/nix/configuration/hosts/quark/optimized_build.nix +++ b/nix/configuration/hosts/quark/optimized_build.nix @@ -81,12 +81,30 @@ haskellPackages = prev.haskellPackages.extend ( final': prev': { crypton = pkgs-unoptimized.haskellPackages.crypton; + crypton-connection = pkgs-unoptimized.haskellPackages.crypton-connection; + crypton-x509 = pkgs-unoptimized.haskellPackages.crypton-x509; + crypton-x509-store = pkgs-unoptimized.haskellPackages.crypton-x509-store; + crypton-x509-system = pkgs-unoptimized.haskellPackages.crypton-x509-system; + crypton-x509-validation = pkgs-unoptimized.haskellPackages.crypton-x509-validation; + hspec-wai = pkgs-unoptimized.haskellPackages.hspec-wai; + http-client-tls = pkgs-unoptimized.haskellPackages.http-client-tls; + http2 = pkgs-unoptimized.haskellPackages.http2; + pandoc = pkgs-unoptimized.haskellPackages.pandoc; + pandoc-cli = pkgs-unoptimized.haskellPackages.pandoc-cli; + pandoc-lua-engine = pkgs-unoptimized.haskellPackages.pandoc-lua-engine; + pandoc-server = pkgs-unoptimized.haskellPackages.pandoc-server; + servant-server = pkgs-unoptimized.haskellPackages.servant-server; + tls = pkgs-unoptimized.haskellPackages.tls; + wai-app-static = pkgs-unoptimized.haskellPackages.wai-app-static; + wai-extra = pkgs-unoptimized.haskellPackages.wai-extra; + warp = pkgs-unoptimized.haskellPackages.warp; } ); }) (final: prev: { - redis = pkgs-unoptimized.redis; gsl = pkgs-unoptimized.gsl; + redis = pkgs-unoptimized.redis; + valkey = pkgs-unoptimized.valkey; }) ]; diff --git a/nix/configuration/hosts/quark/power_management.nix b/nix/configuration/hosts/quark/power_management.nix index 211ee36..b6b6e26 100644 --- a/nix/configuration/hosts/quark/power_management.nix +++ b/nix/configuration/hosts/quark/power_management.nix @@ -12,48 +12,37 @@ powertop ]; - # amdgpu.abmlevel=3 :: Automatically reduce screen brightness but tweak colors to compensate for power reduction. - # pcie_aspm=force pcie_aspm.policy=powersupersave :: Enable PCIe active state power management for power reduction. - # nowatchdog :: Disable watchdog for power savings (related to disable_sp5100_watchdog above). - # amd_pstate=passive :: Fully automated hardware pstate control. - # amd_pstate=active :: Same as passive except we can set the energy performance preference (EPP) to suggest how much we prefer performance or energy efficiency. - # amd_pstate=guided :: Same as passive except we can set upper and lower frequency bounds. - # amdgpu.dcdebugmask=0x10 :: Allegedly disables Panel Replay from https://community.frame.work/t/tracking-freezing-arch-linux-amd/39495/32 boot.kernelParams = [ - # "amdgpu.abmlevel=3" - # "pcie_aspm=force" - # "pcie_aspm.policy=powersupersave" - # "nowatchdog" - # I don't see a measurable benefit from these two: - # "cpufreq.default_governor=powersave" - # "initcall_blacklist=cpufreq_gov_userspace_init" + # Enable undervolting GPU. + # "amdgpu.ppfeaturemask=0xfff7ffff" ]; - # systemd.tmpfiles.rules = [ - # "w- /sys/firmware/acpi/platform_profile - - - - low-power" - # "w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy6/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy7/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy8/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy9/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy10/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy11/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy12/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy14/energy_performance_preference - - - - power" - # "w- /sys/devices/system/cpu/cpufreq/policy15/energy_performance_preference - - - - power" + systemd.tmpfiles.rules = [ + # "w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy6/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy7/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy8/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy9/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy10/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy11/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy12/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy14/energy_performance_preference - - - - power" + # "w- /sys/devices/system/cpu/cpufreq/policy15/energy_performance_preference - - - - power" + ]; + + # services.udev.packages = [ + # (pkgs.writeTextFile { + # name = "amdgpu-low-power"; + # text = '' + # ACTION=="add", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="low" + # ''; + # destination = "/etc/udev/rules.d/30-amdgpu-low-power.rules"; + # }) # ]; - - # boot.extraModprobeConfig = '' - # # Disable the hardware watchdog inside AMD 700 chipset series for power savings. - # blacklist sp5100_tco - - # # Sound power-saving was causing chat notifications to be inaudible. - # # options snd_hda_intel power_save=1 - # ''; } diff --git a/nix/configuration/roles/graphics/default.nix b/nix/configuration/roles/graphics/default.nix index 9c6eed5..61d4cdb 100644 --- a/nix/configuration/roles/graphics/default.nix +++ b/nix/configuration/roles/graphics/default.nix @@ -43,6 +43,21 @@ # hardware.opengl.driSupport = true; # This is already enabled by default # hardware.opengl.driSupport32Bit = true; # For 32 bit applications }) + (lib.mkIf (config.me.graphics_card_type == "amd") { + environment.systemPackages = with pkgs; [ + nvtopPackages.amd + ]; + }) + (lib.mkIf (config.me.graphics_card_type == "intel") { + environment.systemPackages = with pkgs; [ + nvtopPackages.intel + ]; + }) + (lib.mkIf (config.me.graphics_card_type == "nvidia") { + environment.systemPackages = with pkgs; [ + nvtopPackages.nvidia + ]; + }) ] ); }