From 8bdda3df420e656fb934cf597142e28628503d2e Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 20 Nov 2024 05:44:59 -0500 Subject: [PATCH] seth/jj: init --- users/seth/programs/default.nix | 1 + users/seth/programs/jj.nix | 46 +++++++++++++++++++++++++++++++++ users/seth/programs/ssh.nix | 5 ++++ 3 files changed, 52 insertions(+) create mode 100644 users/seth/programs/jj.nix diff --git a/users/seth/programs/default.nix b/users/seth/programs/default.nix index 594f14c7..3785712b 100644 --- a/users/seth/programs/default.nix +++ b/users/seth/programs/default.nix @@ -16,6 +16,7 @@ ./gh.nix ./git.nix ./gpg.nix + ./jj.nix ./mangohud.nix ./moar.nix ./ncspot.nix diff --git a/users/seth/programs/jj.nix b/users/seth/programs/jj.nix new file mode 100644 index 00000000..5886db0f --- /dev/null +++ b/users/seth/programs/jj.nix @@ -0,0 +1,46 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.seth.programs.jujutsu; +in +{ + options.seth.programs.jujutsu = { + enable = lib.mkEnableOption "jujutsu configuration settings" // { + default = config.seth.enable; + defaultText = lib.literalExpression "config.seth.enable"; + }; + }; + + # TODO: Configure + config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = cfg.enable -> (config.seth.programs.git.enable && config.seth.programs.gh.enable); + message = "`seth.programs.git` and `seth.programs.gh` are required to use `seth.programs.jujutsu`"; + } + ]; + + programs = { + jujutsu = { + enable = true; + + settings = { + user = { + name = "seth"; + email = "getchoo@tuta.io"; + }; + + signing = { + sign-all = true; + backend = "gpg"; + key = "D31BD0D494BBEE86"; + }; + }; + }; + }; + }; +} diff --git a/users/seth/programs/ssh.nix b/users/seth/programs/ssh.nix index 4db813ac..9cef7ff4 100644 --- a/users/seth/programs/ssh.nix +++ b/users/seth/programs/ssh.nix @@ -31,6 +31,11 @@ in user = "git"; }; + "github.com" = { + identityFile = "${sshDir}/github"; + user = "git"; + }; + # linux packaging "aur.archlinux.org" = { identityFile = "${sshDir}/aur";