1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-27 18:17:44 +00:00

Add jujutsu config

This commit is contained in:
RGBCube 2025-01-18 21:39:55 +03:00
parent 8ae633a5e4
commit b0991454b7
2 changed files with 44 additions and 7 deletions

View file

@ -1,4 +1,4 @@
{ self, config, lib, pkgs, ... }: let
{ config, lib, pkgs, ... }: let
inherit (lib) head mkAfter enabled merge mkIf;
inherit (lib.strings) match;
in {
@ -74,13 +74,12 @@ in {
];
home-manager.sharedModules = [
(let
(homeArgs: let
homeConfig = homeArgs.config;
# TODO: gitUrl = self.cube.services.forgejo.settings.server.ROOT_URL;
gitUrl = "https://git.rgbcu.be/";
gitDomain = head <| match "https://(.*)/" gitUrl;
# TODO: mailDomain = head self.disk.mailserver.domains;
mailDomain = "rgbcu.be";
in {
programs.nushell.configFile.text = mkAfter ''
# Sets the remote origin to the specified user and repository on my git instance
@ -98,8 +97,8 @@ in {
programs.git = enabled {
package = pkgs.gitFull;
userName = "RGBCube";
userEmail = "git@${mailDomain}";
userName = homeConfig.programs.jujutsu.settings.user.name;
userEmail = homeConfig.programs.jujutsu.settings.user.email;
lfs = enabled;

View file

@ -0,0 +1,38 @@
{ config, lib, pkgs, ... }: let
inherit (lib) enabled getExe;
in {
environment.systemPackages = [
pkgs.difftastic
];
home-manager.sharedModules = [(homeArgs: let
homeConfig = homeArgs.config;
homeLib = homeArgs.config.lib;
in {
# HACK: There is no way to get libgit2 to use custom key paths so we are linking this.
home.file.".ssh/id_ed25519".source = homeLib.file.mkOutOfStoreSymlink "${homeConfig.home.homeDirectory}/.ssh/id";
programs.jujutsu = enabled {
settings = let
# TODO: mailDomain = head self.disk.mailserver.domains;
mailDomain = "rgbcu.be";
in {
user.name = "RGBCube";
user.email = "git@${mailDomain}";
ui.default-command = "log";
ui.diff = [ "${getExe pkgs.difftastic}" "--color" "always" "$left" "$right" ];
ui.conflict-marker-style = "snapshot";
ui.graph.style = if config.theme.cornerRadius > 0 then "curved" else "square";
git.auto-local-bookmark = true;
git.push-bookmark-prefix = "change-";
signing.sign-all = true;
signing.backend = "ssh";
signing.key = "~/.ssh/id";
};
};
})];
}