fix: sign again with jujutsu

This commit is contained in:
Lucien Cartier-Tilet 2025-11-05 04:42:14 +01:00
parent 87047b5b1b
commit fc2407940c
No known key found for this signature in database
2 changed files with 16 additions and 4 deletions

View File

@ -29,8 +29,8 @@ in {
sshKey = mkOption { sshKey = mkOption {
type = with types; nullOr (either path str); type = with types; nullOr (either path str);
example = "~/.ssh/id_ed25519.pub"; example = "~/.ssh/id_ed25519.pub";
default = "~/.ssh/id_ed25519.pub"; default = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
description = "Path to the public SSH key or its content."; description = "Path to the private SSH key for signing.";
}; };
}; };
}; };
@ -54,8 +54,8 @@ in {
behavior = "own"; behavior = "own";
backend = "ssh"; backend = "ssh";
key = cfg.signing.sshKey; key = cfg.signing.sshKey;
backends."ssh.allowed-signers" = "~/.ssh/allowed_signers"; backends.ssh.allowed-signers = "${config.home.homeDirectory}/.ssh/allowed_signers";
backends."ssh.program" = "${pkgs.openssh}/bin/ssh-keygen"; backends.ssh.program = "${pkgs.openssh}/bin/ssh-keygen";
}; };
aliases = { aliases = {
blame = ["file" "annotate"]; blame = ["file" "annotate"];

View File

@ -1,6 +1,7 @@
{ {
pkgs, pkgs,
config, config,
lib,
... ...
}: { }: {
imports = [ imports = [
@ -69,6 +70,17 @@
vcs.jj.signing.enable = true; vcs.jj.signing.enable = true;
}; };
fullDesktop = true; fullDesktop = true;
file."${config.home.homeDirectory}/.ssh/allowed_signers" = {
enable = true;
text = lib.strings.join "\n" (
map (file: let
content = lib.strings.trim (builtins.readFile file);
parts = lib.strings.splitString " " content;
email = lib.lists.last parts;
in "${email} namespaces=\"git\" ${content}")
(lib.filesystem.listFilesRecursive ../../keys)
);
};
}; };
manual = { manual = {