replacing sops with agenix

This commit is contained in:
cnst
2024-08-30 13:08:18 +02:00
parent 6befe2e0fe
commit 963a579d89
24 changed files with 603 additions and 607 deletions

View File

@@ -0,0 +1,58 @@
{
config,
lib,
inputs,
pkgs,
self,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption mkMerge;
cfg = config.modules.utils.agenix;
in {
options = {
modules.utils.agenix = {
enable = mkEnableOption "Enables agenix system environment";
cnix.enable = mkOption {
type = lib.types.bool;
default = false;
description = "Apply cnix agenix settings";
};
toothpc.enable = mkOption {
type = lib.types.bool;
default = false;
description = "Apply toothpc agenix settings";
};
adampad.enable = mkOption {
type = lib.types.bool;
default = false;
description = "Apply adampad agenix settings";
};
};
};
config = mkIf cfg.enable {
age = mkMerge [
(mkIf cfg.cnix.enable {
secrets = {
cnstssh.file = "${self}/secrets/cnstssh.age";
cnixssh.file = "${self}/secrets/cnixssh.age";
};
})
(mkIf cfg.toothpc.enable {
secrets = {
# Add toothpc specific secrets here
};
})
(mkIf cfg.adampad.enable {
secrets = {
# Add adampad specific secrets here
};
})
];
environment.systemPackages = [
inputs.agenix.packages.x86_64-linux.default
pkgs.age
];
};
}

View File

@@ -11,11 +11,11 @@ in {
modules.utils.misc.enable = mkEnableOption "Enables miscellaneous pacakges";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
nodejs_22
ripgrep
fd
beekeeper-studio
environment.systemPackages = [
pkgs.nodejs_22
pkgs.ripgrep
pkgs.fd
pkgs.beekeeper-studio
];
};
}