summaryrefslogtreecommitdiff
path: root/modules/services/ofborg/default.nix
diff options
context:
space:
mode:
authorMike Vink <59492084+ivi-vink@users.noreply.github.com>2025-01-16 22:22:34 +0100
committerGitHub <noreply@github.com>2025-01-16 22:22:34 +0100
commit8e7bd91f353caacc0bc4105f573eb3e17f09e03a (patch)
treec5059edcbebd9644290cad7c653c49a36d593021 /modules/services/ofborg/default.nix
parent6bd39d420578aacf7c0bab7de3e7027b952115ae (diff)
parentbd921223ba7cdac346477d7ea5204d6f4736fcc6 (diff)
Merge branch 'LnL7:master' into masterHEADmaster
Diffstat (limited to 'modules/services/ofborg/default.nix')
-rw-r--r--modules/services/ofborg/default.nix18
1 files changed, 8 insertions, 10 deletions
diff --git a/modules/services/ofborg/default.nix b/modules/services/ofborg/default.nix
index 9151039..8959cc8 100644
--- a/modules/services/ofborg/default.nix
+++ b/modules/services/ofborg/default.nix
@@ -12,13 +12,13 @@ in
services.ofborg.enable = mkOption {
type = types.bool;
default = false;
- description = lib.mdDoc "Whether to enable the ofborg builder service.";
+ description = "Whether to enable the ofborg builder service.";
};
services.ofborg.package = mkOption {
type = types.package;
example = literalExpression "pkgs.ofborg";
- description = lib.mdDoc ''
+ description = ''
This option specifies the ofborg package to use. eg.
(import &lt;ofborg&gt; {}).ofborg.rs
@@ -30,7 +30,7 @@ in
services.ofborg.configFile = mkOption {
type = types.path;
- description = lib.mdDoc ''
+ description = ''
Configuration file to use for ofborg.
WARNING Don't use a path literal or derivation for this,
@@ -41,17 +41,11 @@ in
services.ofborg.logFile = mkOption {
type = types.path;
default = "/var/log/ofborg.log";
- description = lib.mdDoc "The logfile to use for the ofborg service.";
+ description = "The logfile to use for the ofborg service.";
};
};
config = mkIf cfg.enable {
-
- assertions = [
- { assertion = elem "ofborg" config.users.knownGroups; message = "set users.knownGroups to enable ofborg group"; }
- { assertion = elem "ofborg" config.users.knownUsers; message = "set users.knownUsers to enable ofborg user"; }
- ];
-
warnings = mkIf (isDerivation cfg.configFile) [
"services.ofborg.configFile is a derivation, credentials will be world readable"
];
@@ -87,9 +81,13 @@ in
users.users.ofborg.shell = "/bin/bash";
users.users.ofborg.description = "OfBorg service user";
+ users.knownUsers = [ "ofborg" ];
+
users.groups.ofborg.gid = mkDefault 531;
users.groups.ofborg.description = "Nix group for OfBorg service";
+ users.knownGroups = [ "ofborg" ];
+
# FIXME: create logfiles automatically if defined.
system.activationScripts.preActivation.text = ''
mkdir -p '${user.home}'