Files
nixos-configs/hosts/backwards/modules/boot/default.nix
T
Alexander Heldt ccd58b62ce backwards: Enable Steam and let it use the 8BitDo pad
`hid_nintendo` claims the pad when it is in Nintendo Switch mode, which
leaves Steam unable to reach it through hidraw. Blacklist the module and
tag the device with `uaccess` so Steam can open it.
2026-10-20 21:20:31 +02:00

55 lines
1.1 KiB
Nix

{
lib,
config,
...
}:
let
configurationLimit = config.mod.gc.configurationLimit;
in
{
options = {
mod.gc = {
configurationLimit = lib.mkOption {
type = lib.types.int;
default = 10;
description = "number of configuration generations to keep";
};
};
};
config = {
# `nix.gc` cannot prune generations under `~/.local/state/nix/profiles`
# when run as root (NixOS/nix#8508), so home-manager generations piled up.
# `nh clean` walks those per-user profiles too.
programs.nh = {
enable = true;
clean = {
enable = true;
dates = "weekly";
extraArgs = "--keep ${builtins.toString configurationLimit}";
};
};
boot = {
tmp.cleanOnBoot = true;
loader = {
systemd-boot = {
enable = true;
inherit configurationLimit;
};
efi.canTouchEfiVariables = true;
};
blacklistedKernelModules = [ "hid_nintendo" ];
extraModprobeConfig = ''
options snd-intel-dspcfg dsp_driver=1
options snd_hda_intel power_save=0 power_save_controller=N
'';
};
};
}