From 43a60eaae9f4e039787adb295c281d3bfa4e391f Mon Sep 17 00:00:00 2001 From: Isaac Corbrey Date: Wed, 17 Jun 2026 23:26:00 -0400 Subject: [PATCH] langs-common: Bundle Helix and Jujutsu config with module --- modules/home/helix.nix | 3 --- modules/home/jujutsu/default.nix | 5 ---- modules/home/langs-common.nix | 40 +++++++++++++++++++++++--------- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/modules/home/helix.nix b/modules/home/helix.nix index 2792939..e2a54bc 100644 --- a/modules/home/helix.nix +++ b/modules/home/helix.nix @@ -133,9 +133,6 @@ (def "jjdescription" { rulers = [73]; }) - (def "markdown" { - rulers = [81]; - }) (def "sql" { indent.tab-width = 4; indent.unit = " "; diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 64a180e..f0575a5 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -173,11 +173,6 @@ ''; }; - fix.tools.alejandra = { - command = ["alejandra" "--quiet"]; - patterns = ["glob:'**/*.nix'"]; - }; - jjj.splash.skip = true; merge-tools.difft = { diff --git a/modules/home/langs-common.nix b/modules/home/langs-common.nix index 5afff2e..791163f 100644 --- a/modules/home/langs-common.nix +++ b/modules/home/langs-common.nix @@ -16,17 +16,35 @@ config = let langs-common = config.modules.home.langs-common; + helix = config.modules.home.helix; + jujutsu = config.modules.home.jujutsu; in - lib.mkIf langs-common.enable { - home.packages = utils.mkIfOptions langs-common { - markdown = [ - pkgs.markdown-oxide - pkgs.marksman - ]; + lib.mkIf langs-common.enable (lib.mkMerge [ + { + home.packages = utils.mkIfOptions langs-common { + markdown = [ + pkgs.markdown-oxide + pkgs.marksman + ]; - nix = pkgs.nil; - toml = pkgs.taplo; - yaml = pkgs.yaml-language-server; - }; - }; + nix = pkgs.nil; + toml = pkgs.taplo; + yaml = pkgs.yaml-language-server; + }; + } + (lib.mkIf (helix.enable && langs-common.markdown.enable) { + programs.helix.languages.language = [ + { + name = "markdown"; + rulers = [81]; + } + ]; + }) + (lib.mkIf (jujutsu.enable && langs-common.nix.enable) { + programs.jujutsu.settings.fix.tools.alejandra = { + command = ["alejandra" "--quiet"]; + patterns = ["glob:'**/*.nix'"]; + }; + }) + ]); } -- 2.51.2