refactor: move home-manager configuration to users dir

This commit is contained in:
Youwen Wu 2024-08-07 00:49:16 -07:00
parent d7373ba537
commit ee4c922eb2
12 changed files with 66 additions and 33 deletions

View file

@ -22,6 +22,10 @@
libvorbis
stdenv.cc.cc.lib
libkrb5
(writeShellScriptBin "launch-gamescope" ''
(sleep 1; pgrep gamescope| xargs renice -n -11 -p)&
exec gamescope "$@"
'')
keyutils
];
};

View file

@ -87,14 +87,41 @@
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = [ "networkmanager" "wheel" "nixos" ];
extraGroups = [ "networkmanager" "wheel" "nixos" "realtime" ];
};
users.groups.realtime = { };
nix.settings = {
trusted-users = [ "root" "youwen" ];
experimental-features = [ "nix-command" "flakes" ];
};
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
'';
security.pam.loginLimits = [
{
domain = "@realtime";
type = "-";
item = "rtprio";
value = 98;
}
{
domain = "@realtime";
type = "-";
item = "memlock";
value = "unlimited";
}
{
domain = "@realtime";
type = "-";
item = "nice";
value = -11;
}
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;