Dev mode revamp

This commit is contained in:
2026-06-12 11:50:34 -07:00
parent f61201144f
commit 3395b127b4
13 changed files with 347 additions and 132 deletions

View File

@@ -117,6 +117,11 @@
default = false;
description = "Open ports in the firewall for the service.";
};
devModeDefault = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Whether new games start with Dev Mode (testing shortcuts) enabled.";
};
};
config = lib.mkIf cfg.enable {
@@ -129,6 +134,9 @@
environment = {
DATABASE_URL = "sqlite:///${cfg.databasePath}";
# Unset means "local checkout" and defaults Dev Mode on, so the
# service must always set it explicitly.
PIRATS_DEV_MODE = lib.boolToString cfg.devModeDefault;
};
serviceConfig = {