feat(git): use soft secrets to handle email and signing key

This commit is contained in:
Yorick Barbanneau 2025-08-11 22:22:31 +02:00
parent 55517dba81
commit 8bf663b78a
3 changed files with 10 additions and 11 deletions

6
flake.lock generated
View file

@ -61,10 +61,10 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1754865211, "lastModified": 1754941966,
"narHash": "sha256-/J6DVTh9f2KXB9N6Dvdf/tZQjkwCzVNxztgNPl2wNVI=", "narHash": "sha256-P+I9HIL6p+ySfsFR+3wQYOWouB3lXXeipMG7MYYWX9o=",
"ref": "main", "ref": "main",
"rev": "bb8073a0dc9ac1299e73c4a576bbd9e1314483e6", "rev": "a1a559d8a00dbc4b00abd99f02f536c0f6027a32",
"shallow": true, "shallow": true,
"type": "git", "type": "git",
"url": "ssh://git@git.epha.se:24422/ephase/nix-private.git" "url": "ssh://git@git.epha.se:24422/ephase/nix-private.git"

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { { pkgs, inputs, ... }: {
config.modules = { config.modules = {
application = { application = {
zathura.enable = true; zathura.enable = true;
@ -13,9 +13,8 @@
ghq.enable = true; ghq.enable = true;
git = { git = {
enable = true; enable = true;
userEmail = "ybarbanneau@sellsy.com"; userEmail = inputs.nix-private.git.work.userEmail;
signingKey = "6E1A834E282FBD98B48069444447A19BBEDB8DBA"; signingKey = inputs.nix-private.git.work.signingKey;
signByDefault = true;
}; };
k8s = { k8s = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, inputs, ... }:
with lib; with lib;
let let
cfg = config.modules.cli.git; cfg = config.modules.cli.git;
@ -15,19 +15,19 @@ in
userEmail = mkOption { userEmail = mkOption {
type = types.str; type = types.str;
default = "ephase@xieme-art.org"; default = inputs.nix-private.git.personal.userEmail;
description = "git email"; description = "git email";
}; };
signingKey = mkOption { signingKey = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = inputs.nix-private.git.personal.signingKey;
description = "signing key fingerprint"; description = "signing key fingerprint";
}; };
signByDefault = mkOption { signByDefault = mkOption {
type = types.bool; type = types.bool;
default = false; default = true;
description = "activate signing by default"; description = "activate signing by default";
}; };
}; };