1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2025-03-31 04:14:37 +00:00

modules/sops/templates: declare defaultText for sops.templates.<name>.group

When using `documentation.nixos.includeAllModules = true;` this fails
for me with

    error: attribute 'users' missing

           at /nix/store/30jax2y4q3d1xyf8ha3cwilw3kdz4pn8-source/modules/sops/templates/default.nix:8:11:

                7|   secretsForUsers = lib.filterAttrs (_: v: v.neededForUsers) cfg.secrets;
                8|   users = config.users.users;
                 |           ^
                9| in {
    (use '--show-trace' to show detailed location information)

Not depending on `config` when building the manual fixes the issue.
This commit is contained in:
Maximilian Bosch 2023-04-25 21:45:42 +02:00
parent 7c8e9727a2
commit f10110ddef
No known key found for this signature in database
GPG key ID: 9A6EEA275CA5BE0A

View file

@ -48,6 +48,7 @@ in {
group = mkOption {
type = singleLineStr;
default = users.${config.owner}.group;
defaultText = ''config.users.users.''${cfg.owner}.group'';
description = ''
Group of the file.
'';