Skip to content

Commit

Permalink
seth/jj: init
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo committed Nov 21, 2024
1 parent e998a21 commit 8bdda3d
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions users/seth/programs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
./gh.nix
./git.nix
./gpg.nix
./jj.nix
./mangohud.nix
./moar.nix
./ncspot.nix
Expand Down
46 changes: 46 additions & 0 deletions users/seth/programs/jj.nix
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]";
};

signing = {
sign-all = true;
backend = "gpg";
key = "D31BD0D494BBEE86";
};
};
};
};
};
}
5 changes: 5 additions & 0 deletions users/seth/programs/ssh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ in
user = "git";
};

"github.com" = {
identityFile = "${sshDir}/github";
user = "git";
};

# linux packaging
"aur.archlinux.org" = {
identityFile = "${sshDir}/aur";
Expand Down

0 comments on commit 8bdda3d

Please sign in to comment.