diff --git a/modules/home-manager/sops.nix b/modules/home-manager/sops.nix index 3520bb9a..a111af16 100644 --- a/modules/home-manager/sops.nix +++ b/modules/home-manager/sops.nix @@ -54,7 +54,7 @@ let sopsFile = lib.mkOption { type = lib.types.path; default = cfg.defaultSopsFile; - defaultText = "\${config.sops.defaultSopsFile}"; + defaultText = lib.literalExpression "\${config.sops.defaultSopsFile}"; description = '' Sops file the secret is loaded from. ''; @@ -267,7 +267,7 @@ in { }; # [re]load secrets on home-manager activation - home.activation = let + home.activation = let darwin = let domain-target = "gui/$(id -u ${config.home.username})"; in '' @@ -286,7 +286,7 @@ in { unset systemdStatus ''; - + in { sops-nix = if pkgs.stdenv.isLinux then linux else darwin; }; diff --git a/modules/sops/default.nix b/modules/sops/default.nix index e2d3824a..1a2d7932 100644 --- a/modules/sops/default.nix +++ b/modules/sops/default.nix @@ -89,7 +89,7 @@ let }; sopsFile = lib.mkOption { type = lib.types.path; - defaultText = "\${config.sops.defaultSopsFile}"; + defaultText = lib.literalExpression "\${config.sops.defaultSopsFile}"; description = '' Sops file the secret is loaded from. ''; diff --git a/modules/sops/templates/default.nix b/modules/sops/templates/default.nix index 892ad9b8..6f2bca76 100644 --- a/modules/sops/templates/default.nix +++ b/modules/sops/templates/default.nix @@ -69,7 +69,7 @@ in { group = mkOption { type = singleLineStr; default = users.${config.owner}.group; - defaultText = ''config.users.users.''${cfg.owner}.group''; + defaultText = lib.literalExpression ''config.users.users.''${cfg.owner}.group''; description = '' Group of the file. ''; @@ -77,7 +77,7 @@ in { file = mkOption { type = types.path; 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"; description = '' File used as the template. When this value is specified, `sops.templates..content` is ignored.