london: Add Steam

This commit is contained in:
Victor Mignot 2024-08-14 22:43:28 +02:00
parent 15562083e2
commit d6d1764f83
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D
3 changed files with 20 additions and 3 deletions

View file

@ -93,6 +93,7 @@
my.development.tools.embedded.enable = true; my.development.tools.embedded.enable = true;
my.development.tools.networking.enable = true; my.development.tools.networking.enable = true;
my.games.wine.enable = true; my.games.wine.enable = true;
my.games.steam.enable = true;
}; };
}; };
}; };

View file

@ -14,6 +14,13 @@ let
) )
else else
false; false;
anySteamUser =
if machineProps.enableHomeManager then
builtins.any (user: config.home-manager.users.${user}.my.games.steam.enable) (
builtins.attrNames config.my.users
)
else
false;
in in
{ {
programs.sway = mkIf anySwayUser { programs.sway = mkIf anySwayUser {
@ -21,6 +28,8 @@ in
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
}; };
programs.steam.enable = anySteamUser;
xdg.portal = mkIf anySwayUser { xdg.portal = mkIf anySwayUser {
enable = true; enable = true;
xdgOpenUsePortal = true; xdgOpenUsePortal = true;

View file

@ -6,10 +6,17 @@
}: }:
with lib; with lib;
{ {
options.my.games.wine.enable = mkOption { options.my.games = {
wine.enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
}; };
steam.enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf config.my.games.wine.enable { home.packages = with pkgs; [ wine ]; }; config = mkIf config.my.games.wine.enable { home.packages = with pkgs; [ wine ]; };
} }