feat: better modules aragement.

This commit is contained in:
CronyAkatsuki 2025-03-23 20:01:51 +01:00
parent de11ee0676
commit 6e967a751f
49 changed files with 27 additions and 19 deletions

View file

@ -0,0 +1,50 @@
{
config,
pkgs,
lib,
...
}: {
# Getting gaming setup
options = {
crony.gaming.enable = lib.mkEnableOption "enable gaming related stuff, like steam and gamemode";
};
config = lib.mkIf config.crony.gaming.enable {
environment.systemPackages = with pkgs; [
mangohud
];
# Install steam
programs.steam = {
enable = true;
};
# Enable gamescope
programs.gamescope = {
enable = true;
capSysNice = true;
};
# Install gamemode
programs.gamemode = {
enable = true;
enableRenice = true;
settings = {
general = {
softrealtime = "on";
renice = 10;
};
custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
};
# Setup esync
systemd.extraConfig = "DefaultLimitNOFILE=1048576";
security.pam.loginLimits = [
{
domain = "*";
type = "hard";
item = "nofile";
value = "1048576";
}
];
};
}