mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
sops: set sops-config in dev shell
This commit is contained in:
parent
062fd5de0b
commit
d7e3fdeccd
2 changed files with 3 additions and 5 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue