Skip to content

Commit

Permalink
utils: fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
soopyc committed Aug 1, 2024
1 parent 09c5251 commit cf58ed5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions utils/build-yaml.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
{
name,
content,
}:
builtins.toFile name (builtins.toJSON content)
}: let
pkgs = import <nixpkgs> {}; # uses builtins.currentSystem
in
pkgs.writeText name (builtins.toJSON content)
2 changes: 1 addition & 1 deletion utils/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ update-sops-config:
set -euxo pipefail
rm ../.sops.yaml || true
# mv ../.sops.yaml{,.bak} 2>/dev/null || true
OUT=$(nix-instantiate --eval build-yaml.nix --argstr name ".sops.yaml" --arg content "import ../.sops.nix" | jq -r)
OUT=$(nix-build build-yaml.nix --argstr name ".sops.yaml" --arg content "import ../.sops.nix")
echo -e "# WARNING: This is a generated file. DO NOT EDIT DIRECTLY!\n# See .sops.nix and utils/build-yaml.nix for more details." \
| cat - $OUT > ../.sops.yaml
Expand Down

0 comments on commit cf58ed5

Please sign in to comment.