diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 8ce08ac0..27d4ef44 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -14,6 +14,7 @@ ./persist.nix ./polyunfill.nix ./programs + ./quirks.nix ./secrets.nix ./ssh.nix ./systemd.nix diff --git a/hosts/common/hardware/default.nix b/hosts/common/hardware/default.nix index 02534cb7..c18202b4 100644 --- a/hosts/common/hardware/default.nix +++ b/hosts/common/hardware/default.nix @@ -5,33 +5,6 @@ ./x86_64.nix ]; - # TODO: remove after linux 6.9. see: - # - - # - - # when removing, try starting and suspending (ctrl+z) two instances of neovim simultaneously. - # if the system doesn't freeze, then this is safe to remove. - # added 2024-04-04 - sane.user.fs.".profile".symlink.text = lib.mkBefore '' - export UV_USE_IO_URING=0 - ''; - - # powertop will default to putting USB devices -- including HID -- to sleep after TWO SECONDS - powerManagement.powertop.enable = false; - # linux CPU governor: - # - options: - # - "powersave" => force CPU to always run at lowest supported frequency - # - "performance" => force CPU to always run at highest frequency - # - "ondemand" => adjust frequency based on load - # - "conservative" (ondemand but slower to adjust) - # - "schedutil" - # - "userspace" - # - not all options are available for all platforms - # - intel (intel_pstate) appears to manage scaling w/o intervention/control from the OS. - # - AMD (acpi-cpufreq) appears to manage scaling via the OS *or* HW. but the ondemand defaults never put it to max hardware frequency. - # - qualcomm (cpufreq-dt) appears to manage scaling *only* via the OS. ondemand governor exercises the full range. - # - query details with `sudo cpupower frequency-info` - powerManagement.cpuFreqGovernor = "ondemand"; - # services.snapper.configs = { # root = { # subvolume = "/"; diff --git a/hosts/common/quirks.nix b/hosts/common/quirks.nix new file mode 100644 index 00000000..04dac09d --- /dev/null +++ b/hosts/common/quirks.nix @@ -0,0 +1,30 @@ +# quirks: temporary patches with the goal of eventually removing them +{ lib, ... }: +{ + # TODO: remove after linux 6.9. see: + # - + # - + # when removing, try starting and suspending (ctrl+z) two instances of neovim simultaneously. + # if the system doesn't freeze, then this is safe to remove. + # added 2024-04-04 + sane.user.fs.".profile".symlink.text = lib.mkBefore '' + export UV_USE_IO_URING=0 + ''; + + # powertop will default to putting USB devices -- including HID -- to sleep after TWO SECONDS + powerManagement.powertop.enable = false; + # linux CPU governor: + # - options: + # - "powersave" => force CPU to always run at lowest supported frequency + # - "performance" => force CPU to always run at highest frequency + # - "ondemand" => adjust frequency based on load + # - "conservative" (ondemand but slower to adjust) + # - "schedutil" + # - "userspace" + # - not all options are available for all platforms + # - intel (intel_pstate) appears to manage scaling w/o intervention/control from the OS. + # - AMD (acpi-cpufreq) appears to manage scaling via the OS *or* HW. but the ondemand defaults never put it to max hardware frequency. + # - qualcomm (cpufreq-dt) appears to manage scaling *only* via the OS. ondemand governor exercises the full range. + # - query details with `sudo cpupower frequency-info` + powerManagement.cpuFreqGovernor = "ondemand"; +}