diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 19:16:14 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-24 19:16:14 +0530 |
| commit | f36491c92269d3e1dd241e67c292af762ac498c3 (patch) | |
| tree | 7e36c45915bf83dc7b69e21830cf0c27397c0592 /modules/development/git/assertions.nix | |
| parent | f85b86095aa4ea6ac4921b6d37981bffa5c0b711 (diff) | |
| download | home-manager-config-f36491c92269d3e1dd241e67c292af762ac498c3.tar.gz home-manager-config-f36491c92269d3e1dd241e67c292af762ac498c3.zip | |
refactor: some more minor refactoring
Diffstat (limited to 'modules/development/git/assertions.nix')
| -rw-r--r-- | modules/development/git/assertions.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/development/git/assertions.nix b/modules/development/git/assertions.nix index 2baeced..1dd1cf5 100644 --- a/modules/development/git/assertions.nix +++ b/modules/development/git/assertions.nix @@ -1,24 +1,26 @@ # Validates SSH is enabled when git.useSSH is set { config, ... }: +let + cfg = config.development.git; +in { assertions = [ { - assertion = !config.development.git.signing.sign-by-default || config.development.git.enable; + assertion = !cfg.signing.sign-by-default || cfg.enable; message = '' development.git.signing.sign-by-default is enabled but development.git.enable is not. Enable development.git before enabling commit signing. ''; } { - assertion = - !config.development.git.signing.sign-by-default || config.development.git.signing.key != null; + assertion = !cfg.signing.sign-by-default || cfg.signing.key != null; message = '' development.git.signing.sign-by-default is enabled but development.git.signing.key is not set. Set a GPG key ID before enabling commit signing by default. ''; } { - assertion = !config.development.git.signing.sign-by-default || config.security.gpg.enable; + assertion = !cfg.signing.sign-by-default || config.security.gpg.enable; message = '' development.git.signing.sign-by-default is enabled but security.gpg.enable is not. Commit signing requires the managed GPG configuration. Please enable security.gpg. |
