1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2024-12-14 11:57:52 +00:00

Add some missing literalExpression

This commit is contained in:
Sandro Jäckel 2024-10-21 23:06:03 +02:00 committed by mergify[bot]
parent c504fd7ac9
commit 26642e8f19
3 changed files with 6 additions and 6 deletions

View file

@ -54,7 +54,7 @@ let
sopsFile = lib.mkOption { sopsFile = lib.mkOption {
type = lib.types.path; type = lib.types.path;
default = cfg.defaultSopsFile; default = cfg.defaultSopsFile;
defaultText = "\${config.sops.defaultSopsFile}"; defaultText = lib.literalExpression "\${config.sops.defaultSopsFile}";
description = '' description = ''
Sops file the secret is loaded from. Sops file the secret is loaded from.
''; '';
@ -267,7 +267,7 @@ in {
}; };
# [re]load secrets on home-manager activation # [re]load secrets on home-manager activation
home.activation = let home.activation = let
darwin = let darwin = let
domain-target = "gui/$(id -u ${config.home.username})"; domain-target = "gui/$(id -u ${config.home.username})";
in '' in ''
@ -286,7 +286,7 @@ in {
unset systemdStatus unset systemdStatus
''; '';
in { in {
sops-nix = if pkgs.stdenv.isLinux then linux else darwin; sops-nix = if pkgs.stdenv.isLinux then linux else darwin;
}; };

View file

@ -89,7 +89,7 @@ let
}; };
sopsFile = lib.mkOption { sopsFile = lib.mkOption {
type = lib.types.path; type = lib.types.path;
defaultText = "\${config.sops.defaultSopsFile}"; defaultText = lib.literalExpression "\${config.sops.defaultSopsFile}";
description = '' description = ''
Sops file the secret is loaded from. Sops file the secret is loaded from.
''; '';

View file

@ -69,7 +69,7 @@ in {
group = mkOption { group = mkOption {
type = singleLineStr; type = singleLineStr;
default = users.${config.owner}.group; default = users.${config.owner}.group;
defaultText = ''config.users.users.''${cfg.owner}.group''; defaultText = lib.literalExpression ''config.users.users.''${cfg.owner}.group'';
description = '' description = ''
Group of the file. Group of the file.
''; '';
@ -77,7 +77,7 @@ in {
file = mkOption { file = mkOption {
type = types.path; type = types.path;
default = pkgs.writeText config.name config.content; default = pkgs.writeText config.name config.content;
defaultText = ''pkgs.writeText config.name config.content''; defaultText = lib.literalExpression ''pkgs.writeText config.name config.content'';
example = "./configuration-template.conf"; example = "./configuration-template.conf";
description = '' description = ''
File used as the template. When this value is specified, `sops.templates.<name>.content` is ignored. File used as the template. When this value is specified, `sops.templates.<name>.content` is ignored.