0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

Merge pull request #262781 from Janik-Haag/woodpecker

nixos/woodpecker-server: change type of environmentFile to list of paths
This commit is contained in:
Janik 2023-11-02 17:40:07 +01:00 committed by GitHub
commit 8a897821fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -31,8 +31,8 @@ in
description = lib.mdDoc "woodpecker-server config environment variables, for other options read the [documentation](https://woodpecker-ci.org/docs/administration/server-config)";
};
environmentFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
type = with lib.types; coercedTo path (f: [ f ]) (listOf path);
default = [ ];
example = "/root/woodpecker-server.env";
description = lib.mdDoc ''
File to load environment variables
@ -61,7 +61,7 @@ in
StateDirectoryMode = "0700";
UMask = "0007";
ConfigurationDirectory = "woodpecker-server";
EnvironmentFile = lib.optional (cfg.environmentFile != null) cfg.environmentFile;
EnvironmentFile = cfg.environmentFile;
ExecStart = "${cfg.package}/bin/woodpecker-server";
Restart = "on-failure";
RestartSec = 15;