From fa1194c760fd0d86e34b03135a066b8ea02bf1ae Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 26 Dec 2024 21:56:35 -0800 Subject: [PATCH] fix: ensure allowUnfree is set for roblox --- modules/linux/gaming/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/linux/gaming/default.nix b/modules/linux/gaming/default.nix index 9462717..8a937f7 100755 --- a/modules/linux/gaming/default.nix +++ b/modules/linux/gaming/default.nix @@ -25,7 +25,7 @@ in }; roblox.enable = lib.mkOption { type = lib.types.bool; - default = config.liminalOS.extras.gaming && cfg.enable; + default = config.liminalOS.extras.gaming && cfg.enable && config.liminalOS.config.allowUnfree; description = '' 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 [ ]; + + 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 , which is a proprietary unfree package! You must set liminalOS.config.allowUnfree to enable Roblox. + ''; + } + ]; } ); }