begin (possible) module rewrite
This commit is contained in:
parent
675d0453ad
commit
7cdfb454eb
6 changed files with 68 additions and 3 deletions
|
@ -74,9 +74,9 @@ in {
|
||||||
#"services/ollama.nix"
|
#"services/ollama.nix"
|
||||||
"desktop/x11/nosleep.nix"
|
"desktop/x11/nosleep.nix"
|
||||||
|
|
||||||
"programs/gamemode.nix"
|
# "programs/gamemode.nix" # TEMP: TODO
|
||||||
"programs/gamescope.nix"
|
# "programs/gamescope.nix" # TEMP: TODO
|
||||||
"programs/steam.nix"
|
# "programs/steam.nix" # TEMP: TODO
|
||||||
"programs/RE"
|
"programs/RE"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./hibernate-boot.nix
|
./hibernate-boot.nix
|
||||||
|
./testing.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "nixdesk";
|
networking.hostName = "nixdesk";
|
||||||
|
|
11
hosts/nixdesk/testing.nix
Normal file
11
hosts/nixdesk/testing.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{self, ...}: {
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.xun
|
||||||
|
];
|
||||||
|
xun.gaming = {
|
||||||
|
enable = true;
|
||||||
|
steam.enable = true;
|
||||||
|
gamescope.enable = true;
|
||||||
|
gamemode.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
flake.nixosModules = {
|
flake.nixosModules = {
|
||||||
#name = import ./name;
|
#name = import ./name;
|
||||||
|
xun = import ./xun;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
5
modules/xun/default.nix
Normal file
5
modules/xun/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gaming
|
||||||
|
];
|
||||||
|
}
|
47
modules/xun/gaming/default.nix
Normal file
47
modules/xun/gaming/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.xun.gaming;
|
||||||
|
in {
|
||||||
|
options.xun.gaming = {
|
||||||
|
enable = lib.mkEnableOption "gaming";
|
||||||
|
steam.enable = lib.mkEnableOption "steam";
|
||||||
|
gamemode.enable = lib.mkEnableOption "gamemode";
|
||||||
|
gamescope.enable = lib.mkEnableOption "gamescope";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable ({
|
||||||
|
programs.gamescope = lib.mkIf cfg.gamescope.enable {
|
||||||
|
enable = true;
|
||||||
|
capSysNice = false; # doesnt work with steam & heroic
|
||||||
|
};
|
||||||
|
programs.gamemode.enable = cfg.gamemode.enable;
|
||||||
|
}
|
||||||
|
// 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue