sops: set sops-config in dev shell

This commit is contained in:
SebastianStork 2025-07-22 23:26:50 +02:00
parent 062fd5de0b
commit d7e3fdeccd
2 changed files with 3 additions and 5 deletions

View file

@ -1,4 +1,4 @@
{ inputs, ... }: { inputs, self, ... }:
{ {
perSystem = perSystem =
{ pkgs, system, ... }: { pkgs, system, ... }:
@ -13,6 +13,7 @@
}; };
sops = pkgs.mkShell { sops = pkgs.mkShell {
SOPS_CONFIG = self.packages.${system}.sops-config;
packages = [ packages = [
pkgs.sops pkgs.sops
pkgs.age pkgs.age

View file

@ -29,9 +29,6 @@
jsonConfig = { creation_rules = hostCreationRules ++ userCreationRules; } |> lib.strings.toJSON; jsonConfig = { creation_rules = hostCreationRules ++ userCreationRules; } |> lib.strings.toJSON;
in in
pkgs.runCommand "sops-config" { buildInputs = [ pkgs.yj ]; } '' pkgs.runCommand "sops-config" { buildInputs = [ pkgs.yj ]; } "echo '${jsonConfig}' | yj -jy > $out";
mkdir $out
echo '${jsonConfig}' | yj -jy > $out/sops.yaml
'';
}; };
} }