gaming: Add gaming-specific packages and settings

This commit is contained in:
PapaTutuWawa 2022-02-02 12:08:36 +01:00
parent 3bc1c21b4c
commit e80232bb39
3 changed files with 64 additions and 30 deletions

View File

@ -38,8 +38,8 @@
cantata cantata
newsflash newsflash
sublime-music-no-test sublime-music-no-test
psst anki
staruml-wrapped #psst
]; ];
ptw = { ptw = {
@ -59,10 +59,11 @@
enable = true; enable = true;
output = "DP-2"; output = "DP-2";
}; };
xournalpp.enable = true; #xournalpp.enable = true;
zsh.enable = true; zsh.enable = true;
office.enable = true; #office.enable = true;
#plasma.enable = true; #plasma.enable = true;
gaming.enable = true;
}; };
services = { services = {
gamemode.enable = true; gamemode.enable = true;
@ -113,6 +114,7 @@
}; };
virtualisation = { virtualisation = {
enable = true; enable = true;
gaming.enable = true;
}; };
}; };
programs = { programs = {
@ -134,12 +136,12 @@
options amdgpu dpm=0 options amdgpu dpm=0
''; '';
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" "amdgpu" ]; #"vendor-reset" ]; availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" "amdgpu" "vendor-reset" ];
kernelModules = [ kernelModules = [
"amdgpu" # GPU (duh) "amdgpu" # GPU (duh)
"kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" # Virt "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" # Virt
"uinput" # key-mapper "uinput" # key-mapper
#"vendor-reset" "vendor-reset"
]; ];
}; };
kernelParams = [ kernelParams = [
@ -183,34 +185,51 @@
}; };
}; };
hardware = {
opentabletdriver.enable = true;
};
# TODO: Move into modules # TODO: Move into modules
systemd.user.services = { systemd = {
scream = { services = {
description = "Audio receiver for the Scream virtual network sound card"; enable-vendor-reset = {
#wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
serviceConfig = { script = ''
Type = "simple"; echo "device_specific" > /sys/bus/pci/devices/0000:01:00.0/reset_method
ExecStart = "${pkgs.scream}/bin/scream -i virbr0 -o pulse"; '';
Restart = "always"; serviceConfig = {
Type = "simple";
};
}; };
}; };
replaysorcery-kms = { user.services = {
description = "An open-source, instant-replay solution for Linux; KMS service"; scream = {
#wantedBy = [ "default.target" ]; description = "Audio receiver for the Scream virtual network sound card";
serviceConfig = { #wantedBy = [ "default.target" ];
Type = "simple"; serviceConfig = {
ExecStart = "${pkgs.replaysorcery}/bin/replay-sorcery kms-service"; Type = "simple";
Restart = "always"; ExecStart = "${pkgs.scream}/bin/scream -i virbr0 -o pulse";
Restart = "always";
};
}; };
}; replaysorcery-kms = {
replaysorcery = { description = "An open-source, instant-replay solution for Linux; KMS service";
description = "An open-source, instant-replay solution for Linux"; #wantedBy = [ "default.target" ];
#wantedBy = [ "default.target" ]; serviceConfig = {
requires = [ "replaysorcery-kms.service" ]; Type = "simple";
serviceConfig = { ExecStart = "${pkgs.replaysorcery}/bin/replay-sorcery kms-service";
Type = "simple"; Restart = "always";
ExecStart = "${pkgs.replaysorcery}/bin/replay-sorcery"; };
Restart = "always"; };
replaysorcery = {
description = "An open-source, instant-replay solution for Linux";
#wantedBy = [ "default.target" ];
requires = [ "replaysorcery-kms.service" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.replaysorcery}/bin/replay-sorcery";
Restart = "always";
};
}; };
}; };
}; };

View File

@ -21,6 +21,7 @@
./programs/xournalpp ./programs/xournalpp
./programs/plasma ./programs/plasma
./programs/office ./programs/office
./programs/gaming
# Services # Services
./services/kanshi ./services/kanshi

View File

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
let
cfg = config.ptw.programs.gaming;
in {
options.ptw.programs.gaming = {
enable = lib.mkEnableOption "Configure gaming options";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
winePackages.stagingFull winetricks
];
};
}