From a3eead9419b64544b6cc6ff780b743fee9984964 Mon Sep 17 00:00:00 2001 From: Dmitriy Kholkin Date: Fri, 11 Aug 2023 11:01:40 +0300 Subject: [PATCH] add bottles, move with lutris --- machines/AMD-Workstation/default.nix | 1 + profiles/applications/games/steam.nix | 26 +++++++++++++ profiles/applications/games/wine-games.nix | 10 +++++ profiles/applications/packages.nix | 1 - profiles/applications/steam.nix | 45 ---------------------- 5 files changed, 37 insertions(+), 46 deletions(-) create mode 100644 profiles/applications/games/steam.nix create mode 100644 profiles/applications/games/wine-games.nix delete mode 100644 profiles/applications/steam.nix diff --git a/machines/AMD-Workstation/default.nix b/machines/AMD-Workstation/default.nix index 81f080e..c1a02be 100644 --- a/machines/AMD-Workstation/default.nix +++ b/machines/AMD-Workstation/default.nix @@ -13,6 +13,7 @@ nixosProfiles.attic nixosProfiles.emulators nixosProfiles.minecraft + nixosProfiles.wine-games ]; virtualisation.libvirt.guests = { diff --git a/profiles/applications/games/steam.nix b/profiles/applications/games/steam.nix new file mode 100644 index 0000000..4df168c --- /dev/null +++ b/profiles/applications/games/steam.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, config, ... }: { + programs.steam.enable = true; + programs.steam.extraCompatPackages = [ + pkgs.proton-ge + ]; + + startupApplications = [ + "${pkgs.steam}/bin/steam" + ]; + + systemd.user.services.x11-ownership = rec { + script = '' + doas chown ${config.mainuser} /tmp/.X11-unix + ''; + after = [ "hyprland-session.target" ]; + wantedBy = [ "hyprland-session.target" ]; + }; + + persist.state.homeDirectories = [ + ".local/share/Steam" + ".steam" + ] ++ [ + # Games configs + ".config/WarThunder" + ]; +} diff --git a/profiles/applications/games/wine-games.nix b/profiles/applications/games/wine-games.nix new file mode 100644 index 0000000..719bb16 --- /dev/null +++ b/profiles/applications/games/wine-games.nix @@ -0,0 +1,10 @@ +{ pkgs, lib, config, ... }: { + home-manager.users.${config.mainuser}.home.packages = [ + pkgs.lutris pkgs.bottles + ]; + persist.state.homeDirectories = [ + ".config/lutris" + ".local/share/lutris" + ".local/share/bottles" + ]; +} diff --git a/profiles/applications/packages.nix b/profiles/applications/packages.nix index 2d97564..3f2cb1d 100644 --- a/profiles/applications/packages.nix +++ b/profiles/applications/packages.nix @@ -74,7 +74,6 @@ with config.deviceSpecific; { ceserver gamescope # goverlay - lutris moonlight-qt # reshade-shaders # parsec diff --git a/profiles/applications/steam.nix b/profiles/applications/steam.nix deleted file mode 100644 index 5da3233..0000000 --- a/profiles/applications/steam.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ pkgs, lib, config, ... }: { - programs.steam.enable = true; - programs.steam.extraCompatPackages = [ - pkgs.proton-ge - ]; - - startupApplications = [ - "${pkgs.steam}/bin/steam" - ]; - - systemd.user.services.x11-ownership = rec { - script = '' - doas chown ${config.mainuser} /tmp/.X11-unix - ''; - after = [ "hyprland-session.target" ]; - wantedBy = [ "hyprland-session.target" ]; - }; - - persist.state.homeDirectories = [ - ".local/share/Steam" - ".steam" - ".config/lutris" - ".local/share/lutris" - ] ++ [ - # Games configs - ".config/WarThunder" - ]; - - # Start Steam only after the network is up - # home-manager.users.${config.mainuser}.systemd.user.services.steam-startup = { - # Service = { - # ExecStart = "${pkgs.steam}/bin/steam"; - # Type = "oneshot"; - # }; - # Unit = rec { - # After = if config.deviceSpecific.vpn.mullvad.enable then [ - # "mullvad-daemon.service" - # ] else [ - # "network-online.target" - # ]; - # Wants = After; - # }; - # Install.WantedBy = [ "hyprland-session.target" ]; - # }; -}