move around some stuff

This commit is contained in:
xunuwu 2024-11-23 17:41:01 +01:00
parent 6ab8a4e38d
commit ef537aa980
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
31 changed files with 126 additions and 308 deletions

View file

@ -1,6 +0,0 @@
{
flake.nixosModules = {
#name = import ./name;
xun = import ./xun;
};
}

View file

@ -1,5 +0,0 @@
{
imports = [
./gaming
];
}

View file

@ -1,62 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
cfg = config.xun.gaming;
in {
options.xun.gaming = let
mkBool = lib.mkOption {type = lib.types.bool;};
in {
enable = lib.mkEnableOption "gaming";
steam.enable = lib.mkEnableOption "steam";
gamemode.enable = lib.mkEnableOption "gamemode";
gamescope.enable = lib.mkEnableOption "gamescope";
sunshine = {
enable = lib.mkEnableOption "sunshine";
openFirewall = mkBool;
};
};
config = lib.mkIf cfg.enable (lib.mkMerge [
(lib.mkIf cfg.gamescope.enable {
programs.gamescope = {
enable = true;
capSysNice = false; # doesnt work with steam & heroic
};
})
(lib.mkIf cfg.sunshine.enable {
services.sunshine = {
enable = true;
capSysAdmin = true;
openFirewall = cfg.sunshine.openFirewall;
};
})
(lib.mkIf cfg.gamemode.enable {programs.gamemode.enable = true;})
(lib.mkIf cfg.steam.enable {
# TODO: protontricks & steamtinkerlaunch
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
## Fixes gamescope (NOTE: no clue what this means)
extraPackages = with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
];
};
})
]);
}