···78on:
9 schedule:
10- - cron: '37 * * * *'
11 workflow_call:
12 workflow_dispatch:
13 inputs:
···36 labels:
37 name: label-pr
38 runs-on: ubuntu-24.04-arm
39- if: "!contains(github.event.pull_request.title, '[skip treewide]')"
40 steps:
41 - name: Install dependencies
42 run: npm install @actions/artifact
···105106 log('Last updated at', pull_request.updated_at)
107 if (new Date(pull_request.updated_at) < cutoff) return done()
0108109 const run_id = (await github.rest.actions.listWorkflowRuns({
110 ...context.repo,
···118119 // Newer PRs might not have run Eval to completion, yet. We can skip them, because this
120 // job will be run as part of that Eval run anyway.
121- log('Last eval run', run_id)
122 if (!run_id) return;
123124 const artifact = (await github.rest.actions.listWorkflowRunArtifacts({
···129130 // Instead of checking the boolean artifact.expired, we will give us a minute to
131 // actually download the artifact in the next step and avoid that race condition.
132- log('Artifact expires at', artifact.expires_at)
133- if (new Date(artifact.expires_at) < new Date(new Date().getTime() + 60 * 1000)) return;
00134135 await artifactClient.downloadArtifact(artifact.id, {
136 findBy: {
···163164 const maintainers = new Set(Object.keys(
165 JSON.parse(await readFile(`${pull_request.number}/maintainers.json`, 'utf-8'))
166- ))
167168 // And the labels that should be there
169 const after = JSON.parse(await readFile(`${pull_request.number}/changed-paths.json`, 'utf-8')).labels
···78on:
9 schedule:
10+ - cron: '07,17,27,37,47,57 * * * *'
11 workflow_call:
12 workflow_dispatch:
13 inputs:
···36 labels:
37 name: label-pr
38 runs-on: ubuntu-24.04-arm
39+ if: github.event_name != 'schedule' || github.repository_owner == 'NixOS'
40 steps:
41 - name: Install dependencies
42 run: npm install @actions/artifact
···105106 log('Last updated at', pull_request.updated_at)
107 if (new Date(pull_request.updated_at) < cutoff) return done()
108+ log('URL', pull_request.html_url)
109110 const run_id = (await github.rest.actions.listWorkflowRuns({
111 ...context.repo,
···119120 // Newer PRs might not have run Eval to completion, yet. We can skip them, because this
121 // job will be run as part of that Eval run anyway.
122+ log('Last eval run', run_id ?? '<pending>')
123 if (!run_id) return;
124125 const artifact = (await github.rest.actions.listWorkflowRunArtifacts({
···130131 // Instead of checking the boolean artifact.expired, we will give us a minute to
132 // actually download the artifact in the next step and avoid that race condition.
133+ // Older PRs, where the workflow run was already eval.yml, but the artifact was not
134+ // called "comparison", yet, will be skipped as well.
135+ log('Artifact expires at', artifact?.expires_at ?? '<not found>')
136+ if (new Date(artifact?.expires_at ?? 0) < new Date(new Date().getTime() + 60 * 1000)) return;
137138 await artifactClient.downloadArtifact(artifact.id, {
139 findBy: {
···166167 const maintainers = new Set(Object.keys(
168 JSON.parse(await readFile(`${pull_request.number}/maintainers.json`, 'utf-8'))
169+ ).map(m => Number.parseInt(m, 10)))
170171 // And the labels that should be there
172 const after = JSON.parse(await readFile(`${pull_request.number}/changed-paths.json`, 'utf-8')).labels
···21 services.postgresql.package = pkgs.postgresql_15;
22}
23```
24-Note that you are required to specify the desired version of PostgreSQL (e.g. `pkgs.postgresql_15`). Since upgrading your PostgreSQL version requires a database dump and reload (see below), NixOS cannot provide a default value for [](#opt-services.postgresql.package) such as the most recent release of PostgreSQL.
0002526<!--
27After running {command}`nixos-rebuild`, you can verify
···21 services.postgresql.package = pkgs.postgresql_15;
22}
23```
24+25+The default PostgreSQL version is approximately the latest major version available on the NixOS release matching your [`system.stateVersion`](#opt-system.stateVersion).
26+This is because PostgreSQL upgrades require a manual migration process (see below).
27+Hence, upgrades must happen by setting [`services.postgresql.package`](#opt-services.postgresql.package) explicitly.
2829<!--
30After running {command}`nixos-rebuild`, you can verify
+17-2
nixos/modules/services/databases/postgresql.nix
···120121 enableJIT = mkEnableOption "JIT support";
122123- package = mkPackageOption pkgs "postgresql" {
124- example = "postgresql_15";
00000000000000125 };
126127 finalPackage = mkOption {
···656 See also https://endoflife.date/postgresql
657 '';
658 base =
0659 if versionAtLeast config.system.stateVersion "24.11" then
660 pkgs.postgresql_16
661 else if versionAtLeast config.system.stateVersion "23.11" then
···120121 enableJIT = mkEnableOption "JIT support";
122123+ package = mkOption {
124+ type = types.package;
125+ example = literalExpression "pkgs.postgresql_15";
126+ defaultText = literalExpression ''
127+ if versionAtLeast config.system.stateVersion "24.11" then
128+ pkgs.postgresql_16
129+ else if versionAtLeast config.system.stateVersion "23.11" then
130+ pkgs.postgresql_15
131+ else if versionAtLeast config.system.stateVersion "22.05" then
132+ pkgs.postgresql_14
133+ else
134+ pkgs.postgresql_13
135+ '';
136+ description = ''
137+ The package being used by postgresql.
138+ '';
139 };
140141 finalPackage = mkOption {
···670 See also https://endoflife.date/postgresql
671 '';
672 base =
673+ # XXX Don't forget to keep `defaultText` of `services.postgresql.package` up to date!
674 if versionAtLeast config.system.stateVersion "24.11" then
675 pkgs.postgresql_16
676 else if versionAtLeast config.system.stateVersion "23.11" then
+33-8
nixos/modules/services/misc/renovate.nix
···61 };
62 default = { };
63 };
00000000000000000000064 runtimePackages = mkOption {
65 type = with types; listOf package;
66 description = "Packages available to renovate.";
···82 description = ''
83 Renovate's global configuration.
84 If you want to pass secrets to renovate, please use {option}`services.renovate.credentials` for that.
0085 '';
86 };
87 };
8889 config = mkIf cfg.enable {
90- services.renovate.settings = {
91- cacheDir = "/var/cache/renovate";
92- baseDir = "/var/lib/renovate";
00000093 };
9495 systemd.services.renovate = {
···101 config.systemd.package
102 pkgs.git
103 ] ++ cfg.runtimePackages;
0104105 serviceConfig = {
106 User = "renovate";
···145 )}
146 exec ${lib.escapeShellArg (lib.getExe cfg.package)}
147 '';
148-149- environment = {
150- RENOVATE_CONFIG_FILE = generateConfig "renovate-config.json" cfg.settings;
151- HOME = "/var/lib/renovate";
152- };
153 };
154 };
155}
···61 };
62 default = { };
63 };
64+ environment = mkOption {
65+ type =
66+ with types;
67+ attrsOf (
68+ nullOr (oneOf [
69+ str
70+ path
71+ package
72+ ])
73+ );
74+ description = ''
75+ Extra environment variables to export to the Renovate process
76+ from the systemd unit configuration.
77+78+ See https://docs.renovatebot.com/config-overview for available environment variables.
79+ '';
80+ example = {
81+ LOG_LEVEL = "debug";
82+ };
83+ default = { };
84+ };
85 runtimePackages = mkOption {
86 type = with types; listOf package;
87 description = "Packages available to renovate.";
···103 description = ''
104 Renovate's global configuration.
105 If you want to pass secrets to renovate, please use {option}`services.renovate.credentials` for that.
106+107+ See https://docs.renovatebot.com/config-overview for available settings.
108 '';
109 };
110 };
111112 config = mkIf cfg.enable {
113+ services.renovate = {
114+ settings = {
115+ cacheDir = "/var/cache/renovate";
116+ baseDir = "/var/lib/renovate";
117+ };
118+ environment = {
119+ RENOVATE_CONFIG_FILE = generateConfig "renovate-config.json" cfg.settings;
120+ HOME = "/var/lib/renovate";
121+ };
122 };
123124 systemd.services.renovate = {
···130 config.systemd.package
131 pkgs.git
132 ] ++ cfg.runtimePackages;
133+ inherit (cfg) environment;
134135 serviceConfig = {
136 User = "renovate";
···175 )}
176 exec ${lib.escapeShellArg (lib.getExe cfg.package)}
177 '';
00000178 };
179 };
180}
-1
nixos/tests/mongodb.nix
···12{
13 name = "mongodb";
14 meta.maintainers = with pkgs.lib.maintainers; [
15- bluescreen303
16 offline
17 phile314
18 niklaskorz
···12{
13 name = "mongodb";
14 meta.maintainers = with pkgs.lib.maintainers; [
015 offline
16 phile314
17 niklaskorz
···28in
29stdenv.mkDerivation rec {
30 pname = "clightning";
31- version = "25.02.2";
3233 src = fetchurl {
34 url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
35- hash = "sha256-2wp9o1paWJWfxIvm9BDnsKX3GDUXKaPkpB89cwb6Oj8=";
36 };
3738 # when building on darwin we need cctools to provide the correct libtool
···28in
29stdenv.mkDerivation rec {
30 pname = "clightning";
31+ version = "25.05";
3233 src = fetchurl {
34 url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
35+ hash = "sha256-ANYzpjVw9kGdsNvXW1A7sEug9utGmJTab87SqJSdgAc=";
36 };
3738 # when building on darwin we need cctools to provide the correct libtool
···22 zlib,
23}:
2425-stdenv.mkDerivation rec {
26 pname = "ida-free";
27 version = "9.1";
28···8485 # IDA depends on quite some things extracted by the runfile, so first extract everything
86 # into $out/opt, then remove the unnecessary files and directories.
87- IDADIR=$out/opt
8889 # The installer doesn't honor `--prefix` in all places,
90 # thus needing to set `HOME` here.
···127 platforms = [ "x86_64-linux" ]; # Right now, the installation script only supports Linux.
128 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
129 };
130-}
···22 zlib,
23}:
2425+stdenv.mkDerivation (finalAttrs: rec {
26 pname = "ida-free";
27 version = "9.1";
28···8485 # IDA depends on quite some things extracted by the runfile, so first extract everything
86 # into $out/opt, then remove the unnecessary files and directories.
87+ IDADIR=$out/opt/${finalAttrs.pname}-${finalAttrs.version}
8889 # The installer doesn't honor `--prefix` in all places,
90 # thus needing to set `HOME` here.
···127 platforms = [ "x86_64-linux" ]; # Right now, the installation script only supports Linux.
128 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
129 };
130+})
···28 meta = {
29 description = "C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO)";
30 homepage = "https://github.com/joan2937/pigpio";
31- license = with lib.licenses; [ unlicense ];
32 maintainers = with lib.maintainers; [ doronbehar ];
33 platforms = lib.platforms.linux;
34 };
···28 meta = {
29 description = "C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO)";
30 homepage = "https://github.com/joan2937/pigpio";
31+ license = lib.licenses.unlicense;
32 maintainers = with lib.maintainers; [ doronbehar ];
33 platforms = lib.platforms.linux;
34 };