diff --git a/flake.nix b/flake.nix index 5b5c277..6c02a6b 100755 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,7 @@ outputs = {nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-unstabl ./roles/common ./roles/desktop ./roles/kde + ./roles/gaming ./machines/Archie ]; }; diff --git a/roles/desktop/firefox.nix b/roles/desktop/firefox.nix index 5a44b3f..643f174 100644 --- a/roles/desktop/firefox.nix +++ b/roles/desktop/firefox.nix @@ -41,12 +41,12 @@ "Status" = "default"; }; /* - Not sure what this does, - but https://wiki.archlinux.org/title/Firefox#KDE_integration - tells me to enable it + https://wiki.archlinux.org/title/Firefox#KDE_integration tells me to enable this, + but strangely enough doing so makes firefox ask to be set as the default browser + every time you start it up, so I'll disable it */ "widget.use-xdg-desktop-portal.mime-handler" = { - "Value" = 1; + "Value" = 0; "Status" = "default"; }; }; diff --git a/roles/gaming/default.nix b/roles/gaming/default.nix new file mode 100755 index 0000000..fb3cce4 --- /dev/null +++ b/roles/gaming/default.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + imports = [ + ./steam.nix + ./mangohud.nix + ]; +} diff --git a/roles/gaming/mangohud.nix b/roles/gaming/mangohud.nix new file mode 100644 index 0000000..ff6f5df --- /dev/null +++ b/roles/gaming/mangohud.nix @@ -0,0 +1,19 @@ +{ config, ... }: + +{ + # This does the same as enableSessionWide does on the mangohud config + environment.sessionVariables = { MANGOHUD = "1"; MANGOHUD_DLSYM = "1"; }; + + home-manager.users.toast = { config, ... }: + { + programs.mangohud = { + enable = true; + # TODO: fix envvars set by home manager not applying for some reason + # This only works for Vulkan, openGL programs still need the mangohud wrapper + enableSessionWide = true; + settings = { + preset = 4; + }; + }; + }; +} diff --git a/roles/gaming/steam.nix b/roles/gaming/steam.nix new file mode 100644 index 0000000..1c71901 --- /dev/null +++ b/roles/gaming/steam.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + programs.steam = { + enable = true; + # Doubt that I'll use it, but I'll enable it anyways + remotePlay.openFirewall = true; + }; + # Some linux native games (rise of the tomb raider) use alsa for sound + services.pipewire.alsa.enable = true; +}