openrgb: add startupProfile option to service (#408517)
This commit is contained in:
@@ -41,6 +41,11 @@ in
|
||||
description = "Set server port of openrgb.";
|
||||
};
|
||||
|
||||
startupProfile = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.str);
|
||||
default = null;
|
||||
description = "The profile file to load from \"/var/lib/OpenRGB\" at startup.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -61,7 +66,9 @@ in
|
||||
serviceConfig = {
|
||||
StateDirectory = "OpenRGB";
|
||||
WorkingDirectory = "/var/lib/OpenRGB";
|
||||
ExecStart = "${cfg.package}/bin/openrgb --server --server-port ${toString cfg.server.port}";
|
||||
ExecStart =
|
||||
"${cfg.package}/bin/openrgb --server --server-port ${toString cfg.server.port}"
|
||||
+ lib.optionalString (builtins.isString cfg.startupProfile) " --profile ${lib.escapeShellArg cfg.startupProfile}";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user