about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJanik H. <janik@aq0.de>2023-10-22 19:10:55 +0200
committerJanik H. <janik@aq0.de>2023-10-31 15:46:53 +0100
commit8e5729517e73b496276b84a665be9f9f709f789b (patch)
tree6f7534641e4553d0d4b3d2e70aff71e3f0fee89f
parent13f325005cc9037f558a24772cb4b8e9572163d4 (diff)
downloadnixlib-8e5729517e73b496276b84a665be9f9f709f789b.tar
nixlib-8e5729517e73b496276b84a665be9f9f709f789b.tar.gz
nixlib-8e5729517e73b496276b84a665be9f9f709f789b.tar.bz2
nixlib-8e5729517e73b496276b84a665be9f9f709f789b.tar.lz
nixlib-8e5729517e73b496276b84a665be9f9f709f789b.tar.xz
nixlib-8e5729517e73b496276b84a665be9f9f709f789b.tar.zst
nixlib-8e5729517e73b496276b84a665be9f9f709f789b.zip
nixos/woodpecker-server: change type of environmentFile to list of paths
-rw-r--r--nixos/doc/manual/release-notes/rl-2311.section.md2
-rw-r--r--nixos/modules/services/continuous-integration/woodpecker/server.nix6
2 files changed, 5 insertions, 3 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md
index 29b32ce18650..78376a7d1a31 100644
--- a/nixos/doc/manual/release-notes/rl-2311.section.md
+++ b/nixos/doc/manual/release-notes/rl-2311.section.md
@@ -369,6 +369,8 @@
 
 - `services.hedgedoc` has been heavily refactored, reducing the amount of declared options in the module. Most of the options should still work without any changes. Some options have been deprecated, as they no longer have any effect. See [#244941](https://github.com/NixOS/nixpkgs/pull/244941) for more details.
 
+- The [services.woodpecker-server](#opt-services.woodpecker-server.environmentFile) type was changed to list of paths to be more consistent to the woodpecker-agent module
+
 - The module [services.ankisyncd](#opt-services.ankisyncd.package) has been switched to [anki-sync-server-rs](https://github.com/ankicommunity/anki-sync-server-rs) from the old python version, which was difficult to update, had not been updated in a while, and did not support recent versions of anki.
 Unfortunately all servers supporting new clients (newer version of anki-sync-server, anki's built in sync server and this new rust package) do not support the older sync protocol that was used in the old server, so such old clients will also need updating and in particular the anki package in nixpkgs is also being updated in this release.
 The module update takes care of the new config syntax and the data itself (user login and cards) are compatible, so users of the module will be able to just log in again after updating both client and server without any extra action.
diff --git a/nixos/modules/services/continuous-integration/woodpecker/server.nix b/nixos/modules/services/continuous-integration/woodpecker/server.nix
index cae5ed7cf116..dc8f1567f1e3 100644
--- a/nixos/modules/services/continuous-integration/woodpecker/server.nix
+++ b/nixos/modules/services/continuous-integration/woodpecker/server.nix
@@ -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;