aboutsummaryrefslogtreecommitdiff
path: root/modules/secrets/options.nix
diff options
context:
space:
mode:
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 = {};
+ };
+ };
+}