1
0
Fork 0
nix-homemanager-laptop/sops/default.nix

33 lines
940 B
Nix

# SPDX-FileCopyrightText: 2025 Ethan Reece <contact@ethanreece.com>
#
# SPDX-License-Identifier: MIT
{ ... }:
{
perSystem =
{ pkgs, ... }:
{
config = {
devshells.default = {
commands = [
{
help = " generate age key";
name = "age-generate-key";
command = "${pkgs.uutils-coreutils-noprefix}/bin/mkdir -p ~/.config/sops/age && ${pkgs.age}/bin/age-keygen -o ~/.config/sops/age/keys.txt && ${pkgs.uutils-coreutils-noprefix}/bin/cat ~/.config/sops/age/keys.txt";
category = " SOPS";
}
{
help = " edit secrets.yaml";
name = "sops-edit";
command = "${pkgs.sops}/bin/sops edit ./sops/secrets.yaml";
category = " SOPS";
}
];
packages = [
pkgs.age
pkgs.sops
];
};
};
};
}