refactor: modularize gaming module and fold in hamachi

This commit is contained in:
Youwen Wu 2024-12-22 22:32:50 -08:00
parent ee6f29eb57
commit ddfcbd78c8
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
3 changed files with 64 additions and 49 deletions

View file

@ -1,10 +1,26 @@
{ pkgs, ... }:
{
pkgs,
lib,
config,
...
}:
let
cfg = config.liminalOS.extras.gaming;
in
{
options.liminalOS.extras.gaming = {
enable = lib.mkEnableOption "gaming";
withHamachi = lib.mkEnableOption "hamachi";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
ryujinx
lutris
heroic
mangohud
mangojuice
];
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
@ -29,7 +45,10 @@
};
};
users.users.youwen.extraGroups = [ "gamemode" ];
users.users.${config.liminalOS.username}.extraGroups = [ "gamemode" ];
services.logmein-hamachi.enable = cfg.withHamachi;
programs.haguichi.enable = cfg.withHamachi;
nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override {
@ -52,4 +71,5 @@
];
};
};
};
}

View file

@ -1,4 +0,0 @@
{
services.logmein-hamachi.enable = true;
programs.haguichi.enable = true;
}

View file

@ -12,7 +12,6 @@ in
++ (with pkgs; [
bitwarden-desktop
modrinth-app
lutris
sbctl
r2modman
zoom-us