This commit is contained in:
notgne2 2022-06-11 11:37:58 -07:00
parent ac021ac976
commit 91eea7811a
No known key found for this signature in database
GPG key ID: 5CE0A245A2DAC84A
9 changed files with 259 additions and 256 deletions

View file

@ -1,9 +1,7 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.workstation;
in
{
let cfg = config.workstation;
in {
options.workstation = {
enable = mkEnableOption "make my computer work";
@ -37,7 +35,13 @@ in
services.thermald.enable = lib.mkDefault true;
boot.kernelParams = lib.optionals cfg.battery [ "iwlwifi.uapsd_disable=0" "iwlmvm.power_scheme=3" "iwldvm.force_cam=0" "snd_hda_intel.power_save=1" "snd_ac97_codec.power_save=1" ];
boot.kernelParams = lib.optionals cfg.battery [
"iwlwifi.uapsd_disable=0"
"iwlmvm.power_scheme=3"
"iwldvm.force_cam=0"
"snd_hda_intel.power_save=1"
"snd_ac97_codec.power_save=1"
];
# Don't kill the battery
services.upower = {
@ -109,9 +113,7 @@ in
# Optimizes running games
programs.gamemode = {
enable = lib.mkDefault true;
settings = {
general.renice = 10;
};
settings = { general.renice = 10; };
};
# Allows realtime stuff, useful for games, audio etc
@ -164,20 +166,29 @@ in
# the user should have some basic permissions lol
users.users."${cfg.user}" = {
extraGroups = [ "adbusers" "audio" "video" "libvirtd" "kvm" "sway" "wheel" "networkmanager" "docker" "podman" "input" "uinput" ];
extraGroups = [
"adbusers"
"audio"
"video"
"libvirtd"
"kvm"
"sway"
"wheel"
"networkmanager"
"docker"
"podman"
"input"
"uinput"
];
subUidRanges = [
{
startUid = 100000;
count = 65536;
}
];
subGidRanges = [
{
startGid = 100000;
count = 65536;
}
];
subUidRanges = [{
startUid = 100000;
count = 65536;
}];
subGidRanges = [{
startGid = 100000;
count = 65536;
}];
};
# brightness
@ -268,6 +279,7 @@ in
# bluetooth
hardware.bluetooth.enable = lib.mkDefault true;
hardware.bluetooth.settings.General.Enable = lib.mkDefault "Source,Sink,Media,Socket";
hardware.bluetooth.settings.General.Enable =
lib.mkDefault "Source,Sink,Media,Socket";
};
}