1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{ config, lib, ... }: { options.programs.git.signCommits = lib.mkEnableOption "GPG signing of git commits."; config = lib.mkIf config.programs.git.signCommits { assertions = [ { assertion = config.programs.gpg.enable; message = "programs.git.signCommits requires programs.gpg.enable to be true."; } ]; programs.git.settings = { commit.gpgSign = true; }; }; }