modularise the stuff

This commit is contained in:
tristan 2023-05-08 16:59:12 +01:00
parent 011009d22f
commit d1bcbc0fde
16 changed files with 159 additions and 61 deletions

30
lib/modules/gamer.nix Normal file
View file

@ -0,0 +1,30 @@
{ user }: { lib, pkgs, config, ... }:
with lib;
{
options.roles.gamer = {
enable = mkEnableOption "gamer packages";
};
config = mkIf config.roles.gamer.enable {
home-manager.users.${user}.imports = [{
home.packages = with pkgs; [
airshipper
minetest
];
}];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
# gamer time
"steam"
"steam-run"
"steam-original"
];
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
};
}