mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 19:51:34 +01:00
sops: concentrate shell and config generation in one file
This commit is contained in:
parent
d84e13d45e
commit
9facf82a70
4 changed files with 30 additions and 28 deletions
13
flake/dev-shell.nix
Normal file
13
flake/dev-shell.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
_: {
|
||||
perSystem =
|
||||
{ inputs', pkgs, ... }:
|
||||
{
|
||||
devShells.default = pkgs.mkShellNoCC {
|
||||
packages = [
|
||||
pkgs.just
|
||||
pkgs.nh
|
||||
inputs'.deploy-rs.packages.default
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{ inputs, self, ... }:
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs, system, ... }:
|
||||
{
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.just
|
||||
pkgs.nh
|
||||
inputs.deploy-rs.packages.${system}.default
|
||||
];
|
||||
};
|
||||
|
||||
sops = pkgs.mkShell {
|
||||
SOPS_CONFIG = self.packages.${system}.sops-config;
|
||||
packages = [
|
||||
pkgs.sops
|
||||
pkgs.age
|
||||
pkgs.ssh-to-age
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +1,12 @@
|
|||
{ self, ... }:
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
self',
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
packages.sops-config =
|
||||
let
|
||||
|
|
@ -32,5 +37,14 @@
|
|||
pkgs.runCommand "sops.yaml" { buildInputs = [ pkgs.yj ]; } ''
|
||||
echo '${jsonConfig}' | yj -jy > $out
|
||||
'';
|
||||
|
||||
devShells.sops = pkgs.mkShellNoCC {
|
||||
SOPS_CONFIG = self'.packages.sops-config;
|
||||
packages = [
|
||||
pkgs.sops
|
||||
pkgs.age
|
||||
pkgs.ssh-to-age
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue