fix: ensure allowUnfree is set for roblox

This commit is contained in:
Youwen Wu 2024-12-26 21:56:35 -08:00
parent f5985b0c04
commit fa1194c760
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -25,7 +25,7 @@ in
}; };
roblox.enable = lib.mkOption { roblox.enable = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = config.liminalOS.extras.gaming && cfg.enable; default = config.liminalOS.extras.gaming && cfg.enable && config.liminalOS.config.allowUnfree;
description = '' description = ''
Whether to install the Roblox Sober flatpak automatically. Note that this will enable the nix-flatpak service and automatic flatpak updates.` Whether to install the Roblox Sober flatpak automatically. Note that this will enable the nix-flatpak service and automatic flatpak updates.`
''; '';
@ -126,6 +126,15 @@ in
] ]
else else
[ ]; [ ];
assertions = [
{
assertion = !cfg.roblox.enable || (config.liminalOS.config.allowUnfree && cfg.roblox.enable);
message = ''
You enabled Roblox but did not allow unfree software in liminalOS! Roblox is installed using the Sober Flatpak <sober.vinegarhq.org>, which is a proprietary unfree package! You must set liminalOS.config.allowUnfree to enable Roblox.
'';
}
];
} }
); );
} }