mirror of
https://github.com/Mic92/sops-nix.git
synced 2025-03-31 04:14:37 +00:00
modules/sops: fix manual
* Since0d957142b6
the manual doesn't build since `<name>` is interpreted by docbook as (unmatched) XML-tag. I decided to use `<xref linkend` as this provides proper linking to the referenced option. * Also, if the module is included on a machine where `sops` isn't used, but `documentation.nixos.includeAllModules = true;` is set, the module wouldn't evaluate because `config.sopsFile` is referenced in a `default`-tag. This is generally an issue since every change to this option would trigger a rebuild of the manual anyways. See also94fd200305
for that.
This commit is contained in:
parent
87a27217b2
commit
df2d4bbbfc
1 changed files with 2 additions and 2 deletions
|
@ -8,6 +8,7 @@ let
|
|||
secretType = types.submodule ({ config, ... }: {
|
||||
config = {
|
||||
sopsFile = lib.mkOptionDefault cfg.defaultSopsFile;
|
||||
sopsFileHash = mkOptionDefault (optionalString cfg.validateSopsFiles "${builtins.hashFile "sha256" config.sopsFile}");
|
||||
};
|
||||
options = {
|
||||
name = mkOption {
|
||||
|
@ -73,9 +74,8 @@ let
|
|||
sopsFileHash = mkOption {
|
||||
type = types.str;
|
||||
readOnly = true;
|
||||
default = if cfg.validateSopsFiles then "${builtins.hashFile "sha256" config.sopsFile}" else "";
|
||||
description = ''
|
||||
Hash of the sops file, useful in systemd.services.<name>.restartTriggers.
|
||||
Hash of the sops file, useful in <xref linkend="opt-systemd.services._name_.restartTriggers" />.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue