mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-02-04 03:53:50 +08:00
Merge #320
320: templates: Add descriptions and use singleLineStr r=dasJ a=dasJ Co-authored-by: Janne Heß <janne@hess.ooo>
This commit is contained in:
commit
7c8e9727a2
1 changed files with 7 additions and 5 deletions
|
|
@ -9,17 +9,19 @@ let
|
||||||
in {
|
in {
|
||||||
options.sops = {
|
options.sops = {
|
||||||
templates = mkOption {
|
templates = mkOption {
|
||||||
|
description = "Templates for secret files";
|
||||||
type = attrsOf (submodule ({ config, ... }: {
|
type = attrsOf (submodule ({ config, ... }: {
|
||||||
options = {
|
options = {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
type = str;
|
type = singleLineStr;
|
||||||
default = config._module.args.name;
|
default = config._module.args.name;
|
||||||
description = ''
|
description = ''
|
||||||
Name of the file used in /run/secrets-rendered
|
Name of the file used in /run/secrets-rendered
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
path = mkOption {
|
path = mkOption {
|
||||||
type = str;
|
description = "Path where the rendered file will be placed";
|
||||||
|
type = singleLineStr;
|
||||||
default = "/run/secrets-rendered/${config.name}";
|
default = "/run/secrets-rendered/${config.name}";
|
||||||
};
|
};
|
||||||
content = mkOption {
|
content = mkOption {
|
||||||
|
|
@ -30,21 +32,21 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
mode = mkOption {
|
mode = mkOption {
|
||||||
type = str;
|
type = singleLineStr;
|
||||||
default = "0400";
|
default = "0400";
|
||||||
description = ''
|
description = ''
|
||||||
Permissions mode of the rendered secret file in octal.
|
Permissions mode of the rendered secret file in octal.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
owner = mkOption {
|
owner = mkOption {
|
||||||
type = str;
|
type = singleLineStr;
|
||||||
default = "root";
|
default = "root";
|
||||||
description = ''
|
description = ''
|
||||||
User of the file.
|
User of the file.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
group = mkOption {
|
group = mkOption {
|
||||||
type = str;
|
type = singleLineStr;
|
||||||
default = users.${config.owner}.group;
|
default = users.${config.owner}.group;
|
||||||
description = ''
|
description = ''
|
||||||
Group of the file.
|
Group of the file.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue