blob: 8337643f520e365693d6bad092fa53d0c2258bf9 [file] [log] [blame]
Skyler Grey3637b8a2024-08-02 19:01:48 +00001{ config, lib, ... }: {
2 options.clicks.security.secrets.groupPerms.enable = lib.mkOption {
3 description = ''
4 Enable setting permissions for age secrets to 0440 rather than 0400 by
5 default, allowing group access
6
7 The default age permissions for secrets block the "group" from accessing
8 the secret, making that option useless without additionally specifying a
9 mode
10 '';
11 type = lib.types.bool;
12 default = config.clicks.security.secrets.enable;
13 };
14
15 options.age = {
16 secrets = lib.mkOption {
17 type = lib.types.attrsOf (lib.types.submodule (submodule: {
Skyler Greyec13fbd2024-08-03 08:11:04 +000018 config = lib.optionalAttrs config.clicks.security.secrets.groupPerms.enable {
19 mode = lib.mkOverride 999 "0440";
Skyler Grey3637b8a2024-08-02 19:01:48 +000020 };
21 }));
22 };
23 };
24}