From fdb32cae0ef3c8618cd10980bf08a2a78ee73740 Mon Sep 17 00:00:00 2001 From: k Date: Thu, 29 Aug 2024 01:22:47 -0400 Subject: [PATCH] made changes for clean ness and games-on-whales --- hosts/server/configuration.nix | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index c9c4cd4..47b3fc0 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -68,7 +68,7 @@ users.users.k = { isNormalUser = true; description = "k"; - extraGroups = [ "networkmanager" "wheel" "libvirtd" ]; + extraGroups = [ "networkmanager" "wheel" "libvirtd"]; packages = with pkgs; [zsh]; shell = pkgs.zsh; }; @@ -78,6 +78,34 @@ }; }; + services.udev.extraRules = '' + # Allows Wolf to acces /dev/uinput +KERNEL=="uinput", SUBSYSTEM=="misc", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput" + +# Allows Wolf to access /dev/uhid +KERNEL=="uhid", TAG+="uaccess" + +# Move virtual keyboard and mouse into a different seat +SUBSYSTEMS=="input", ATTRS{id/vendor}=="ab00", MODE="0660", GROUP="input", ENV{ID_SEAT}="seat9" + +# Joypads +SUBSYSTEMS=="input", ATTRS{name}=="Wolf X-Box One (virtual) pad", MODE="0660", GROUP="input" +SUBSYSTEMS=="input", ATTRS{name}=="Wolf PS5 (virtual) pad", MODE="0660", GROUP="input" +SUBSYSTEMS=="input", ATTRS{name}=="Wolf gamepad (virtual) motion sensors", MODE="0660", GROUP="input" +SUBSYSTEMS=="input", ATTRS{name}=="Wolf Nintendo (virtual) pad", MODE="0660", GROUP="input" + ''; + +users.users.game = { + isNormalUser = true; + extraGroups = ["docker" "input"]; + packages = with pkgs; [docker-compose]; +}; + +users.users.media = { + isNormalUser = true; + packages = with pkgs; [mpv ffmpeg handbrake makemkv]; +}; + system.autoUpgrade.enable = true; nix.gc.automatic = true;