From 9eaf5770576b141f232157732ac254d35b2203c7 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 23 Aug 2024 20:27:28 +0800 Subject: [PATCH] users/foo-dogsquared/setups/development: add Jujutsu configuration --- .../foo-dogsquared/modules/default.nix | 1 + .../modules/programs/jujutsu.nix | 25 +++++++++++++++++++ .../modules/setups/development.nix | 1 + 3 files changed, 27 insertions(+) create mode 100644 configs/home-manager/foo-dogsquared/modules/programs/jujutsu.nix diff --git a/configs/home-manager/foo-dogsquared/modules/default.nix b/configs/home-manager/foo-dogsquared/modules/default.nix index fec67e08..9f5d6b4c 100644 --- a/configs/home-manager/foo-dogsquared/modules/default.nix +++ b/configs/home-manager/foo-dogsquared/modules/default.nix @@ -8,6 +8,7 @@ ./programs/doom-emacs.nix ./programs/email.nix ./programs/git.nix + ./programs/jujutsu.nix ./programs/keys.nix ./programs/nixvim ./programs/research.nix diff --git a/configs/home-manager/foo-dogsquared/modules/programs/jujutsu.nix b/configs/home-manager/foo-dogsquared/modules/programs/jujutsu.nix new file mode 100644 index 00000000..fc3b8e4f --- /dev/null +++ b/configs/home-manager/foo-dogsquared/modules/programs/jujutsu.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +let + userCfg = config.users.foo-dogsquared; + cfg = userCfg.programs.jujutsu; +in +{ + options.users.foo-dogsquared.programs.jujutsu.enable = + lib.mkEnableOption "foo-dogsquared's Jujutsu configuration"; + + config = lib.mkIf cfg.enable { + programs.jujutsu = { + enable = true; + settings = { + user.name = config.accounts.email.accounts.personal.realName; + user.email = config.accounts.email.accounts.personal.address; + + "merge-tools.diffoscope" = { + merge-args = [ "$left" "$right" ]; + program = lib.getExe' pkgs.diffoscope "diffoscope"; + }; + }; + }; + }; +} diff --git a/configs/home-manager/foo-dogsquared/modules/setups/development.nix b/configs/home-manager/foo-dogsquared/modules/setups/development.nix index 27781a05..fb45f174 100644 --- a/configs/home-manager/foo-dogsquared/modules/setups/development.nix +++ b/configs/home-manager/foo-dogsquared/modules/setups/development.nix @@ -19,6 +19,7 @@ in users.foo-dogsquared.programs = { shell.enable = lib.mkDefault true; git.enable = lib.mkDefault true; + jujutsu.enable = lib.mkDefault true; keys.gpg.enable = true; keys.ssh.enable = true; terminal-multiplexer.enable = lib.mkDefault true;