Skip to content

Commit

Permalink
Merge pull request #1187 from flyingcircusio/PL-133100-update-nixpkgs…
Browse files Browse the repository at this point in the history
…-flake

move package-, version update scripts to flake apps
  • Loading branch information
ctheune authored and PhilTaken committed Dec 9, 2024
2 parents b085e0d + 6451f18 commit ed8e8e7
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
19 changes: 19 additions & 0 deletions changelog.d/20241209_152400_phil-fix-varnish-reload_scriv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
A new changelog entry.
Delete placeholder items that do not apply. Empty sections will be removed
automatically during release.
Leave the XX.XX as is: this is a placeholder and will be automatically filled
correctly during the release and helps when backporting over multiple platform
branches.
-->

### Impact


### NixOS XX.XX platform

- Fix a bug in the reload script for the varnish service
17 changes: 15 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@
};
};

apps.buildVersionsJson = {
type = "app";
program = "${pkgs.writeShellScript "update-versions-json" ''
jq < $(nix build .#versionsJson --print-out-paths) > release/versions.json
''}";
};
apps.buildPackageVersionsJson = {
type = "app";
program = "${pkgs.writeShellScript "update-package-versions-json" ''
jq < $(nix build .#packageVersions --print-out-paths) > release/package-versions.json
''}";
};

packages = {
# These are packages that work on all systems.
# Also see release/flake-part-linux-only-packages.nix
Expand Down Expand Up @@ -153,11 +166,11 @@
# only build this script on Linux. It just produces an error
# message on Non-Linux because packageVersions is missing.
build_package_versions_json.exec = ''
jq < $(nix build .#packageVersions --print-out-paths) > release/package-versions.json
nix run .#buildPackageVersionsJson
'';

build_versions_json.exec = ''
jq < $(nix build .#versionsJson --print-out-paths) > release/versions.json
nix run .#buildVersionsJson
'';

build_channels_dir.exec = ''
Expand Down
2 changes: 1 addition & 1 deletion nixos/services/varnish/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ in {
if [ ! -z "$coldvcls" ]; then
for vcl in "$coldvcls"; do
$vadm vcl.discard $vcl
${vadm} vcl.discard $vcl
done
fi
'';
Expand Down

0 comments on commit ed8e8e7

Please sign in to comment.