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.networking.enable = true;
my.games.wine.enable = true;
my.games.steam.enable = true;
};
};
};

View file

@ -14,6 +14,13 @@ let
)
else
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
{
programs.sway = mkIf anySwayUser {
@ -21,6 +28,8 @@ in
wrapperFeatures.gtk = true;
};
programs.steam.enable = anySteamUser;
xdg.portal = mkIf anySwayUser {
enable = true;
xdgOpenUsePortal = true;

View file

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