From db9642d714f21a47088065e19e0a36b1022c5245 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Sat, 26 Jun 2021 11:50:17 +0200 Subject: [PATCH] Re-enable steam --- machines/kholinar/default.nix | 1 + modules/default.nix | 1 + modules/steam.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 modules/steam.nix diff --git a/machines/kholinar/default.nix b/machines/kholinar/default.nix index 201a43be..0756fea6 100644 --- a/machines/kholinar/default.nix +++ b/machines/kholinar/default.nix @@ -35,6 +35,7 @@ git.email = "charlotte@vanpetegem.me"; minecraft.client = true; sshd.enable = true; + steam.enable = true; vpn.ugent.enable = true; zeroad.enable = true; zfs = { diff --git a/modules/default.nix b/modules/default.nix index 9efc27f4..b78f67e9 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -17,6 +17,7 @@ ./smartd.nix ./ssh.nix ./sshd.nix + ./steam.nix ./syncthing-server.nix ./teeworlds.nix ./tetris.nix diff --git a/modules/steam.nix b/modules/steam.nix new file mode 100644 index 00000000..1877e330 --- /dev/null +++ b/modules/steam.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +{ + options.chvp.steam.enable = lib.mkOption { + default = false; + example = true; + }; + + config = lib.mkIf config.chvp.steam.enable { + hardware.opengl = { + driSupport32Bit = true; + extraPackages = with pkgs.pkgsi686Linux; [ libva ]; + }; + services.pipewire.alsa.support32Bit = true; + chvp = { + nix.unfreePackages = [ "steam" "steam-original" "steam-runtime" ]; + zfs.homeLinks = [ + { path = ".paradoxlauncher"; type = "cache"; } + { path = ".steam"; type = "cache"; } + { path = ".local/share/Steam"; type = "cache"; } + { path = ".local/share/Paradox Interactive"; type = "cache"; } + ]; + }; + + home-manager.users.charlotte = { pkgs, ... }: { + home.packages = [ pkgs.steam ]; + }; + }; +}