Skip to content

Commit

Permalink
gaming: flesh out gaming module
Browse files Browse the repository at this point in the history
Move the gaming module from home-manager to nixos and flesh it out with
additional installs, such as steam.
  • Loading branch information
MattSturgeon committed Aug 21, 2024
1 parent d560f74 commit c51b6b1
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 11 deletions.
1 change: 1 addition & 0 deletions hosts/desktop/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
impermanence.enable = true;
impermanence.wipeOnBoot = true;
flatpak.enable = true;
gaming.enable = true;
};

imports = with inputs.hardware.nixosModules; [
Expand Down
1 change: 0 additions & 1 deletion hosts/desktop/home.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ lib, ... }: {
custom = {
gaming = true;
editors.vscode = true;
editors.idea = true;
gnome.favorites = lib.mkAfter [
Expand Down
1 change: 0 additions & 1 deletion hosts/matebook/home.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ ... }: {
custom = {
gaming = true;
editors.vscode = true;
editors.idea = true;
};
Expand Down
9 changes: 0 additions & 9 deletions modules/home-manager/games.nix

This file was deleted.

36 changes: 36 additions & 0 deletions modules/nixos/games.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:
let
cfg = config.custom.gaming;
in
{
options.custom.gaming.enable = lib.mkEnableOption "gaming";

config = lib.mkIf cfg.enable {
programs.steam = {
enable = true;
protontricks.enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
};

programs.nix-ld = {
enable = true;
libraries = pkgs.steam-run.fhsenv.args.multiPkgs pkgs;
};

environment.systemPackages = with pkgs; [
heroic
prismlauncher
steam-run
];

nixpkgs.config.allowUnfreePredicate = pkg: lib.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-run"
];
};
}

0 comments on commit c51b6b1

Please sign in to comment.