From bf006a968bcf5f50d4cc3e60e7f1550dcf64d576 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 14 Feb 2026 13:46:38 -0500 Subject: [PATCH] Update jujutsu config. --- nix/configuration/hosts/odo/default.nix | 1 + nix/configuration/hosts/odowork/default.nix | 1 + nix/configuration/hosts/quark/default.nix | 1 + nix/configuration/roles/jujutsu/default.nix | 28 +++++++++++++++---- .../jujutsu/files/jujutsu_config_home.toml | 17 +++++++++++ 5 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 nix/configuration/roles/jujutsu/files/jujutsu_config_home.toml diff --git a/nix/configuration/hosts/odo/default.nix b/nix/configuration/hosts/odo/default.nix index d3840dff..d1968349 100644 --- a/nix/configuration/hosts/odo/default.nix +++ b/nix/configuration/hosts/odo/default.nix @@ -106,6 +106,7 @@ me.graphics_card_type = "amd"; me.graphviz.enable = true; me.iso_mount.enable = true; + me.jujutsu.config = ../../roles/jujutsu/files/jujutsu_config_home.toml; me.jujutsu.enable = true; me.kanshi.enable = false; me.kubernetes.enable = true; diff --git a/nix/configuration/hosts/odowork/default.nix b/nix/configuration/hosts/odowork/default.nix index 4dbbe2e6..98333f06 100644 --- a/nix/configuration/hosts/odowork/default.nix +++ b/nix/configuration/hosts/odowork/default.nix @@ -109,6 +109,7 @@ me.graphics_card_type = "amd"; me.graphviz.enable = true; me.iso_mount.enable = true; + me.jujutsu.config = ../../roles/jujutsu/files/jujutsu_config_home.toml; me.jujutsu.enable = true; me.latex.enable = true; me.launch_keyboard.enable = true; diff --git a/nix/configuration/hosts/quark/default.nix b/nix/configuration/hosts/quark/default.nix index edbde851..16184c84 100644 --- a/nix/configuration/hosts/quark/default.nix +++ b/nix/configuration/hosts/quark/default.nix @@ -100,6 +100,7 @@ me.graphics_card_type = "amd"; me.graphviz.enable = true; me.iso_mount.enable = true; + me.jujutsu.config = ../../roles/jujutsu/files/jujutsu_config_home.toml; me.jujutsu.enable = true; me.kanshi.enable = false; me.kubernetes.enable = true; diff --git a/nix/configuration/roles/jujutsu/default.nix b/nix/configuration/roles/jujutsu/default.nix index 3a8341dc..31070719 100644 --- a/nix/configuration/roles/jujutsu/default.nix +++ b/nix/configuration/roles/jujutsu/default.nix @@ -15,11 +15,29 @@ example = true; description = "Whether we want to install jujutsu."; }; + + jujutsu.config = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = null; + example = ./files/jujutsu_config_home.toml; + description = "A jujutsu config file."; + }; }; - config = lib.mkIf config.me.jujutsu.enable { - environment.systemPackages = with pkgs; [ - jujutsu - ]; - }; + config = lib.mkIf config.me.jujutsu.enable ( + lib.mkMerge [ + { + environment.systemPackages = with pkgs; [ + jujutsu + ]; + } + (lib.mkIf (config.me.jujutsu.config != null) { + me.install.user.talexander.file = { + ".config/jj/config.toml" = { + source = config.me.jujutsu.config; + }; + }; + }) + ] + ); } diff --git a/nix/configuration/roles/jujutsu/files/jujutsu_config_home.toml b/nix/configuration/roles/jujutsu/files/jujutsu_config_home.toml new file mode 100644 index 00000000..aa2706d1 --- /dev/null +++ b/nix/configuration/roles/jujutsu/files/jujutsu_config_home.toml @@ -0,0 +1,17 @@ +#:schema https://docs.jj-vcs.dev/latest/config-schema.json + +[ui] +default-command = "log" +paginate = "never" + +[user] +name = "Tom Alexander" +email = "tom@fizz.buzz" + +[signing] +behavior = "own" +backend = "gpg" +key = "D272C8D6167F26859467666F4278299FB84F6875" + +# [git] +# sign-on-push = true