aboutsummaryrefslogtreecommitdiff
path: root/modules/secrets/options.nix
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2025-12-30 10:23:03 -0600
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2025-12-30 10:23:03 -0600
commit2c121c5411a78a5e8fc98b145c9667c8528e238c (patch)
tree6b2a2e3dd330bbb22ab5bc293bddc2d3f44fea90 /modules/secrets/options.nix
parent098f38e12ccc6317d7fe101e7de3e0d62c84cc86 (diff)
new secrets-management system
Diffstat (limited to 'modules/secrets/options.nix')
-rw-r--r--modules/secrets/options.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/modules/secrets/options.nix b/modules/secrets/options.nix
new file mode 100644
index 0000000..de15f50
--- /dev/null
+++ b/modules/secrets/options.nix
@@ -0,0 +1,32 @@
+{lib, ...}: let
+ inherit (lib) mkOption;
+in {
+ options = {
+ collinux.secrets = lib.mkOption {
+ type = lib.types.attrsOf (
+ lib.types.submodule ({config, ...}: {
+ options = {
+ name = mkOption {
+ type = lib.types.str;
+ default = config._module.args.name;
+ };
+ file = mkOption {type = lib.types.path;};
+ mode = mkOption {
+ type = lib.types.str;
+ default = "0400";
+ };
+ owner = mkOption {
+ type = lib.types.str;
+ default = "0";
+ };
+ path = mkOption {
+ type = lib.types.str;
+ default = "/run/secrets.d/${config.name}";
+ };
+ };
+ })
+ );
+ default = {};
+ };
+ };
+}