diff options
Diffstat (limited to 'modules/services/ofborg/default.nix')
| -rw-r--r-- | modules/services/ofborg/default.nix | 18 |
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 <ofborg> {}).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}' |
