From 0df3b7ebde38ac3457b7e53e3120bd3a38f0c810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Sat, 28 Mar 2026 13:46:36 +0100 Subject: [PATCH] finalize: jonas@comfy-station --- home/jonas@comfy-station/configuration.nix | 13 +- home/jonas@comfy-station/default.nix | 2 + modules/doom/doom.nix | 290 ++++++++++++++++++ .../doom/static/config.d/copilot.el | 0 .../home => modules}/doom/static/config.el | 0 .../home => modules}/doom/static/icon.png | Bin .../home => modules}/doom/static/init.el | 0 .../doom/static/packages.d/copilot.el | 0 .../doom/static/packages.d/tidal.el | 0 .../home => modules}/doom/static/packages.el | 0 .../doom/static/packages/treesit-docgen.el | 0 .../home => modules}/doom/static/splash.png | Bin modules/programs/jj.nix | 37 +++ old/modules/home/doom/default.nix | 5 - old/modules/home/doom/doom.nix | 288 ----------------- old/modules/home/jj.nix | 36 --- 16 files changed, 335 insertions(+), 336 deletions(-) create mode 100644 modules/doom/doom.nix rename {old/modules/home => modules}/doom/static/config.d/copilot.el (100%) rename {old/modules/home => modules}/doom/static/config.el (100%) rename {old/modules/home => modules}/doom/static/icon.png (100%) rename {old/modules/home => modules}/doom/static/init.el (100%) rename {old/modules/home => modules}/doom/static/packages.d/copilot.el (100%) rename {old/modules/home => modules}/doom/static/packages.d/tidal.el (100%) rename {old/modules/home => modules}/doom/static/packages.el (100%) rename {old/modules/home => modules}/doom/static/packages/treesit-docgen.el (100%) rename {old/modules/home => modules}/doom/static/splash.png (100%) create mode 100644 modules/programs/jj.nix delete mode 100644 old/modules/home/doom/default.nix delete mode 100644 old/modules/home/doom/doom.nix delete mode 100644 old/modules/home/jj.nix diff --git a/home/jonas@comfy-station/configuration.nix b/home/jonas@comfy-station/configuration.nix index b782c61..8ddd34b 100644 --- a/home/jonas@comfy-station/configuration.nix +++ b/home/jonas@comfy-station/configuration.nix @@ -22,13 +22,12 @@ keys = ["borg" "passgit"]; }; hive.yubikey.withCCID = false; - #hive.doom.enable = true; - #hive.doom.asDefaultEditor = true; - #hive.doom.enableCopilot = true; - #hive.doom.withNixPkgs = true; - #hive.doom.withShellPkgs = true; - #hive.doom.withPythonPkgs = true; - #hive.jj.enable = true; + hive.doom.enable = true; + hive.doom.asDefaultEditor = true; + hive.doom.enableCopilot = true; + hive.doom.withNixPkgs = true; + hive.doom.withShellPkgs = true; + hive.doom.withPythonPkgs = true; # Make session variables available in systemd units # SEE: https://github.com/nix-community/home-manager/pull/5543 diff --git a/home/jonas@comfy-station/default.nix b/home/jonas@comfy-station/default.nix index 33b288f..6330ae2 100644 --- a/home/jonas@comfy-station/default.nix +++ b/home/jonas@comfy-station/default.nix @@ -27,6 +27,8 @@ self.homeModules.yubikey self.homeModules.zsh self.homeModules.nix-scripts + self.homeModules.doom + self.homeModules.jj ]; }; } diff --git a/modules/doom/doom.nix b/modules/doom/doom.nix new file mode 100644 index 0000000..20d432b --- /dev/null +++ b/modules/doom/doom.nix @@ -0,0 +1,290 @@ +{ + flake.homeModules.doom = { + config, + pkgs, + lib, + ... + }: let + cfg = config.hive.doom; + doom-pkgs = with pkgs; [ + cmake + emacs-all-the-icons-fonts + fira + fira-code-symbols + fontconfig + gcc + nerd-fonts.fira-code + ]; + default-core-pkgs = with pkgs; [ + (ripgrep.override {withPCRE2 = true;}) + (aspellWithDicts (d: [d.en d.de d.en-computers d.en-science])) + binutils + editorconfig-core-c + fd + git + gnumake + gnutls + ispell + libtool + vscode-langservers-extracted + (pkgs.stdenvNoCC.mkDerivation { + name = "epdfinfo"; + phases = "installPhase"; + installPhase = '' + mkdir -p $out/bin + ln -s $(${pkgs.findutils}/bin/find ${pkgs.emacsPackages.pdf-tools}/ -name epdfinfo) $out/bin/ + ''; + }) + ]; + default-shell-pkgs = with pkgs; [ + bash-language-server + ]; + default-nix-pkgs = with pkgs; [ + alejandra + nixd + ]; + default-latex-pkgs = with pkgs; [ + pandoc + poppler + texlab + texlive.combined.scheme-medium + ]; + default-cxx-pkgs = with pkgs; [ + clang + clang-tools + cmake + cppcheck + doxygen + gdb + ninja + ]; + default-python-pkgs = with pkgs; [ + python312 + python312Packages.black + pyright + ]; + doom-path-pkgs = + lib.optionals cfg.withLatexPkgs (cfg.overrideLatexPkgs default-latex-pkgs) + ++ lib.optionals cfg.withShellPkgs (cfg.overrideShellPkgs default-shell-pkgs) + ++ lib.optionals cfg.withNixPkgs (cfg.overrideNixPkgs default-nix-pkgs) + ++ lib.optionals cfg.withCXXPkgs (cfg.overrideCXXPkgs default-cxx-pkgs) + ++ lib.optionals cfg.withPythonPkgs (cfg.overridePythonPkgs default-python-pkgs) + ++ lib.optional cfg.enableCopilot pkgs.unstable.copilot-language-server + ++ default-core-pkgs; + doom-socket-name = "main"; + wrapped-emacs = pkgs.symlinkJoin { + name = "wrapped-emacs"; + paths = [pkgs.emacs30]; + nativeBuildInputs = [pkgs.makeBinaryWrapper]; + postBuild = '' + wrapProgram $out/bin/emacs \ + --prefix PATH : ${lib.makeBinPath doom-path-pkgs} \ + --add-flags "--init-directory=${config.xdg.configHome}/doom-emacs" \ + --set DOOMDIR "${config.home.sessionVariables.DOOMDIR}" \ + --set DOOMLOCALDIR "${config.home.sessionVariables.DOOMLOCALDIR}" + + wrapProgram $out/bin/emacsclient \ + --prefix PATH : ${lib.makeBinPath doom-path-pkgs} \ + --set DOOMDIR "${config.home.sessionVariables.DOOMDIR}" \ + --set DOOMLOCALDIR "${config.home.sessionVariables.DOOMLOCALDIR}" + ''; + }; + doom-setup = pkgs.writeShellScript "doom-setup" '' + export PATH="${lib.makeBinPath doom-path-pkgs}:$PATH" + export EMACS="${wrapped-emacs}/bin/emacs" + export DOOMDIR="${config.home.sessionVariables.DOOMDIR}" + export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}" + if [ ! -d "$DOOMLOCALDIR" ]; then + ${config.xdg.configHome}/doom-emacs/bin/doom install --force --no-env + else + ${config.xdg.configHome}/doom-emacs/bin/doom "$@" + fi + ''; + doom-open = pkgs.writeShellScriptBin "doom-open" '' + export EMACS_SOCKET_NAME="$XDG_RUNTIME_DIR/emacs/${doom-socket-name}" + if [ -t 0 ]; then + exec ${wrapped-emacs}/bin/emacsclient -t "$@" + else + exec ${wrapped-emacs}/bin/emacsclient -c "$@" + fi + ''; + in { + options.hive.doom = { + enable = lib.mkEnableOption "Enable Doom Emacs"; + asDefaultEditor = lib.mkEnableOption "set the EDITOR variable to use the current emacs server (graphical/non-graphical)"; + enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs"; + enableTidal = lib.mkEnableOption "Enable TidalCycles"; + withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; + withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path"; + withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; + withCXXPkgs = lib.mkEnableOption "Enable CXX packages in doom path"; + withPythonPkgs = lib.mkEnableOption "Enable python packages in doom path"; + overrideLatexPkgs = lib.mkOption { + type = lib.types.functionTo (lib.types.listOf lib.types.package); + default = pkgs: pkgs; + example = '' + prev: with pkgs; [ + texlive.combined.scheme-full + ] + ''; + description = "Override the default LaTeX packages in the doom path."; + }; + overrideShellPkgs = lib.mkOption { + type = lib.types.functionTo (lib.types.listOf lib.types.package); + default = pkgs: pkgs; + example = '' + prev: with pkgs; [ + shellcheck + ] + ''; + description = "Override the default shell packages in the doom path."; + }; + overrideNixPkgs = lib.mkOption { + type = lib.types.functionTo (lib.types.listOf lib.types.package); + default = pkgs: pkgs; + example = '' + prev: with pkgs; [ + nixpkgs-fmt + ] + ''; + description = "Override the default Nix packages in the doom path."; + }; + overrideCXXPkgs = lib.mkOption { + type = lib.types.functionTo (lib.types.listOf lib.types.package); + default = pkgs: pkgs; + example = '' + prev: with pkgs; [ + openmp + ] + ''; + description = "Override the default C++ packages in the doom path."; + }; + overridePythonPkgs = lib.mkOption { + type = lib.types.functionTo (lib.types.listOf lib.types.package); + default = pkgs: pkgs; + example = '' + prev: with pkgs; [ + pythonPackages.black + ] + ''; + description = "Override the default Python packages in the doom path."; + }; + }; + + config = lib.mkIf cfg.enable { + fonts.fontconfig.enable = true; + + programs.emacs = { + enable = true; + package = wrapped-emacs; + }; + + home = { + sessionPath = ["${config.xdg.configHome}/doom-emacs/bin"]; + sessionVariables = + { + DOOMDIR = "${config.xdg.configHome}/doom-config"; + DOOMLOCALDIR = "${config.xdg.configHome}/doom-local"; + } + // lib.optionalAttrs cfg.asDefaultEditor { + EDITOR = "${doom-open.name}"; + }; + packages = doom-pkgs ++ lib.optional cfg.asDefaultEditor doom-open; + }; + + systemd.user.services.doom-emacs-server = { + Unit = { + Description = "Doom Emacs Server"; + }; + Service = { + ExecStart = "${wrapped-emacs}/bin/emacs --fg-daemon=${doom-socket-name}"; + SuccessExitStatus = 15; + }; + Install = { + WantedBy = []; # Lazy start by socket + }; + }; + systemd.user.sockets.doom-emacs-server = { + Socket = { + ListenStream = "/run/user/%U/emacs/${doom-socket-name}"; + DirectoryMode = "0700"; + }; + Install = { + WantedBy = ["sockets.target"]; + }; + }; + + xdg = { + enable = true; + configFile = { + "doom-config/splash.png" = { + source = ./static/splash.png; + }; + "doom-config/config.el" = { + source = ./static/config.el; + }; + "doom-config/config.d/copilot.el" = { + enable = cfg.enableCopilot; + source = ./static/config.d/copilot.el; + }; + "doom-config/packages/treesit-docgen.el" = { + source = ./static/packages/treesit-docgen.el; + }; + "doom-config/init.el" = { + source = ./static/init.el; + onChange = "${doom-setup} sync --force -e"; + }; + "doom-config/packages.el" = { + source = ./static/packages.el; + onChange = "${doom-setup} sync --force -u -e"; + }; + "doom-config/packages.d/copilot.el" = { + enable = cfg.enableCopilot; + source = ./static/packages.d/copilot.el; + onChange = "${doom-setup} sync --force -u -e"; + }; + "doom-config/packages.d/tidal.el" = { + enable = cfg.enableTidal; + source = ./static/packages.d/tidal.el; + onChange = "${doom-setup} sync --force -u -e"; + }; + "doom-emacs" = { + source = builtins.fetchGit { + url = "https://github.com/doomemacs/doomemacs"; + rev = "a0d6aac43fc94def29c98826e2f0088bcb703d13"; + }; + onChange = "${doom-setup} --force sync -u -e"; + }; + }; + desktopEntries = { + emacs = { + name = "Doom Emacs"; + genericName = "Text Editor"; + icon = ./static/icon.png; + exec = "${wrapped-emacs}/bin/emacs %F"; + terminal = false; + categories = ["Application" "Development" "TextEditor"]; + mimeType = ["text/*"]; + settings = { + StartupWMClass = "Doom Emacs"; + }; + }; + emacsclient = { + name = "Doom Emacs (Client)"; + genericName = "Text Editor"; + icon = ./static/icon.png; + exec = '' + sh -c "if [ -n \\"\\$*\\" ]; then exec ${wrapped-emacs}/bin/emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F + ''; + terminal = false; + categories = ["Application" "Development" "TextEditor"]; + mimeType = ["text/*"]; + settings = { + StartupWMClass = "Doom Emacs"; + }; + }; + }; + }; + }; + }; +} diff --git a/old/modules/home/doom/static/config.d/copilot.el b/modules/doom/static/config.d/copilot.el similarity index 100% rename from old/modules/home/doom/static/config.d/copilot.el rename to modules/doom/static/config.d/copilot.el diff --git a/old/modules/home/doom/static/config.el b/modules/doom/static/config.el similarity index 100% rename from old/modules/home/doom/static/config.el rename to modules/doom/static/config.el diff --git a/old/modules/home/doom/static/icon.png b/modules/doom/static/icon.png similarity index 100% rename from old/modules/home/doom/static/icon.png rename to modules/doom/static/icon.png diff --git a/old/modules/home/doom/static/init.el b/modules/doom/static/init.el similarity index 100% rename from old/modules/home/doom/static/init.el rename to modules/doom/static/init.el diff --git a/old/modules/home/doom/static/packages.d/copilot.el b/modules/doom/static/packages.d/copilot.el similarity index 100% rename from old/modules/home/doom/static/packages.d/copilot.el rename to modules/doom/static/packages.d/copilot.el diff --git a/old/modules/home/doom/static/packages.d/tidal.el b/modules/doom/static/packages.d/tidal.el similarity index 100% rename from old/modules/home/doom/static/packages.d/tidal.el rename to modules/doom/static/packages.d/tidal.el diff --git a/old/modules/home/doom/static/packages.el b/modules/doom/static/packages.el similarity index 100% rename from old/modules/home/doom/static/packages.el rename to modules/doom/static/packages.el diff --git a/old/modules/home/doom/static/packages/treesit-docgen.el b/modules/doom/static/packages/treesit-docgen.el similarity index 100% rename from old/modules/home/doom/static/packages/treesit-docgen.el rename to modules/doom/static/packages/treesit-docgen.el diff --git a/old/modules/home/doom/static/splash.png b/modules/doom/static/splash.png similarity index 100% rename from old/modules/home/doom/static/splash.png rename to modules/doom/static/splash.png diff --git a/modules/programs/jj.nix b/modules/programs/jj.nix new file mode 100644 index 0000000..524fc98 --- /dev/null +++ b/modules/programs/jj.nix @@ -0,0 +1,37 @@ +{ + flake.homeModules.jj = { + config, + lib, + pkgs, + ... + }: let + cfg = config.hive.jj; + in { + options.hive.jj = { + followGit = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Follow the current git configuration"; + }; + }; + + config = { + home.packages = with pkgs; [ + jujutsu + ]; + + programs.jujutsu = { + enable = true; + settings = { + user = lib.optionalAttrs cfg.followGit { + name = config.programs.git.settings.user.name; + email = config.programs.git.settings.user.email; + }; + ui = lib.optionalAttrs (cfg.followGit && config.programs.difftastic.enable) { + diff-formatter = ["${pkgs.difftastic}/bin/difft" "--color=always" "$left" "$right"]; + }; + }; + }; + }; + }; +} diff --git a/old/modules/home/doom/default.nix b/old/modules/home/doom/default.nix deleted file mode 100644 index 1b689b6..0000000 --- a/old/modules/home/doom/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{...}: { - imports = [ - ./doom.nix - ]; -} diff --git a/old/modules/home/doom/doom.nix b/old/modules/home/doom/doom.nix deleted file mode 100644 index 9d147f2..0000000 --- a/old/modules/home/doom/doom.nix +++ /dev/null @@ -1,288 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - cfg = config.hive.doom; - doom-pkgs = with pkgs; [ - cmake - emacs-all-the-icons-fonts - fira - fira-code-symbols - fontconfig - gcc - nerd-fonts.fira-code - ]; - default-core-pkgs = with pkgs; [ - (ripgrep.override {withPCRE2 = true;}) - (aspellWithDicts (d: [d.en d.de d.en-computers d.en-science])) - binutils - editorconfig-core-c - fd - git - gnumake - gnutls - ispell - libtool - vscode-langservers-extracted - (pkgs.stdenvNoCC.mkDerivation { - name = "epdfinfo"; - phases = "installPhase"; - installPhase = '' - mkdir -p $out/bin - ln -s $(${pkgs.findutils}/bin/find ${pkgs.emacsPackages.pdf-tools}/ -name epdfinfo) $out/bin/ - ''; - }) - ]; - default-shell-pkgs = with pkgs; [ - bash-language-server - ]; - default-nix-pkgs = with pkgs; [ - alejandra - nixd - ]; - default-latex-pkgs = with pkgs; [ - pandoc - poppler - texlab - texlive.combined.scheme-medium - ]; - default-cxx-pkgs = with pkgs; [ - clang - clang-tools - cmake - cppcheck - doxygen - gdb - ninja - ]; - default-python-pkgs = with pkgs; [ - python312 - python312Packages.black - pyright - ]; - doom-path-pkgs = - lib.optionals cfg.withLatexPkgs (cfg.overrideLatexPkgs default-latex-pkgs) - ++ lib.optionals cfg.withShellPkgs (cfg.overrideShellPkgs default-shell-pkgs) - ++ lib.optionals cfg.withNixPkgs (cfg.overrideNixPkgs default-nix-pkgs) - ++ lib.optionals cfg.withCXXPkgs (cfg.overrideCXXPkgs default-cxx-pkgs) - ++ lib.optionals cfg.withPythonPkgs (cfg.overridePythonPkgs default-python-pkgs) - ++ lib.optional cfg.enableCopilot pkgs.unstable.copilot-language-server - ++ default-core-pkgs; - doom-socket-name = "main"; - wrapped-emacs = pkgs.symlinkJoin { - name = "wrapped-emacs"; - paths = [pkgs.emacs30]; - nativeBuildInputs = [pkgs.makeBinaryWrapper]; - postBuild = '' - wrapProgram $out/bin/emacs \ - --prefix PATH : ${lib.makeBinPath doom-path-pkgs} \ - --add-flags "--init-directory=${config.xdg.configHome}/doom-emacs" \ - --set DOOMDIR "${config.home.sessionVariables.DOOMDIR}" \ - --set DOOMLOCALDIR "${config.home.sessionVariables.DOOMLOCALDIR}" - - wrapProgram $out/bin/emacsclient \ - --prefix PATH : ${lib.makeBinPath doom-path-pkgs} \ - --set DOOMDIR "${config.home.sessionVariables.DOOMDIR}" \ - --set DOOMLOCALDIR "${config.home.sessionVariables.DOOMLOCALDIR}" - ''; - }; - doom-setup = pkgs.writeShellScript "doom-setup" '' - export PATH="${lib.makeBinPath doom-path-pkgs}:$PATH" - export EMACS="${wrapped-emacs}/bin/emacs" - export DOOMDIR="${config.home.sessionVariables.DOOMDIR}" - export DOOMLOCALDIR="${config.home.sessionVariables.DOOMLOCALDIR}" - if [ ! -d "$DOOMLOCALDIR" ]; then - ${config.xdg.configHome}/doom-emacs/bin/doom install --force --no-env - else - ${config.xdg.configHome}/doom-emacs/bin/doom "$@" - fi - ''; - doom-open = pkgs.writeShellScriptBin "doom-open" '' - export EMACS_SOCKET_NAME="$XDG_RUNTIME_DIR/emacs/${doom-socket-name}" - if [ -t 0 ]; then - exec ${wrapped-emacs}/bin/emacsclient -t "$@" - else - exec ${wrapped-emacs}/bin/emacsclient -c "$@" - fi - ''; -in { - options.hive.doom = { - enable = lib.mkEnableOption "Enable Doom Emacs"; - asDefaultEditor = lib.mkEnableOption "set the EDITOR variable to use the current emacs server (graphical/non-graphical)"; - enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs"; - enableTidal = lib.mkEnableOption "Enable TidalCycles"; - withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; - withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path"; - withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; - withCXXPkgs = lib.mkEnableOption "Enable CXX packages in doom path"; - withPythonPkgs = lib.mkEnableOption "Enable python packages in doom path"; - overrideLatexPkgs = lib.mkOption { - type = lib.types.functionTo (lib.types.listOf lib.types.package); - default = pkgs: pkgs; - example = '' - prev: with pkgs; [ - texlive.combined.scheme-full - ] - ''; - description = "Override the default LaTeX packages in the doom path."; - }; - overrideShellPkgs = lib.mkOption { - type = lib.types.functionTo (lib.types.listOf lib.types.package); - default = pkgs: pkgs; - example = '' - prev: with pkgs; [ - shellcheck - ] - ''; - description = "Override the default shell packages in the doom path."; - }; - overrideNixPkgs = lib.mkOption { - type = lib.types.functionTo (lib.types.listOf lib.types.package); - default = pkgs: pkgs; - example = '' - prev: with pkgs; [ - nixpkgs-fmt - ] - ''; - description = "Override the default Nix packages in the doom path."; - }; - overrideCXXPkgs = lib.mkOption { - type = lib.types.functionTo (lib.types.listOf lib.types.package); - default = pkgs: pkgs; - example = '' - prev: with pkgs; [ - openmp - ] - ''; - description = "Override the default C++ packages in the doom path."; - }; - overridePythonPkgs = lib.mkOption { - type = lib.types.functionTo (lib.types.listOf lib.types.package); - default = pkgs: pkgs; - example = '' - prev: with pkgs; [ - pythonPackages.black - ] - ''; - description = "Override the default Python packages in the doom path."; - }; - }; - - config = lib.mkIf cfg.enable { - fonts.fontconfig.enable = true; - - programs.emacs = { - enable = true; - package = wrapped-emacs; - }; - - home = { - sessionPath = ["${config.xdg.configHome}/doom-emacs/bin"]; - sessionVariables = - { - DOOMDIR = "${config.xdg.configHome}/doom-config"; - DOOMLOCALDIR = "${config.xdg.configHome}/doom-local"; - } - // lib.optionalAttrs cfg.asDefaultEditor { - EDITOR = "${doom-open.name}"; - }; - packages = doom-pkgs ++ lib.optional cfg.asDefaultEditor doom-open; - }; - - systemd.user.services.doom-emacs-server = { - Unit = { - Description = "Doom Emacs Server"; - }; - Service = { - ExecStart = "${wrapped-emacs}/bin/emacs --fg-daemon=${doom-socket-name}"; - SuccessExitStatus = 15; - }; - Install = { - WantedBy = []; # Lazy start by socket - }; - }; - systemd.user.sockets.doom-emacs-server = { - Socket = { - ListenStream = "/run/user/%U/emacs/${doom-socket-name}"; - DirectoryMode = "0700"; - }; - Install = { - WantedBy = ["sockets.target"]; - }; - }; - - xdg = { - enable = true; - configFile = { - "doom-config/splash.png" = { - source = ./static/splash.png; - }; - "doom-config/config.el" = { - source = ./static/config.el; - }; - "doom-config/config.d/copilot.el" = { - enable = cfg.enableCopilot; - source = ./static/config.d/copilot.el; - }; - "doom-config/packages/treesit-docgen.el" = { - source = ./static/packages/treesit-docgen.el; - }; - "doom-config/init.el" = { - source = ./static/init.el; - onChange = "${doom-setup} sync --force -e"; - }; - "doom-config/packages.el" = { - source = ./static/packages.el; - onChange = "${doom-setup} sync --force -u -e"; - }; - "doom-config/packages.d/copilot.el" = { - enable = cfg.enableCopilot; - source = ./static/packages.d/copilot.el; - onChange = "${doom-setup} sync --force -u -e"; - }; - "doom-config/packages.d/tidal.el" = { - enable = cfg.enableTidal; - source = ./static/packages.d/tidal.el; - onChange = "${doom-setup} sync --force -u -e"; - }; - "doom-emacs" = { - source = builtins.fetchGit { - url = "https://github.com/doomemacs/doomemacs"; - rev = "a0d6aac43fc94def29c98826e2f0088bcb703d13"; - }; - onChange = "${doom-setup} --force sync -u -e"; - }; - }; - desktopEntries = { - emacs = { - name = "Doom Emacs"; - genericName = "Text Editor"; - icon = ./static/icon.png; - exec = "${wrapped-emacs}/bin/emacs %F"; - terminal = false; - categories = ["Application" "Development" "TextEditor"]; - mimeType = ["text/*"]; - settings = { - StartupWMClass = "Doom Emacs"; - }; - }; - emacsclient = { - name = "Doom Emacs (Client)"; - genericName = "Text Editor"; - icon = ./static/icon.png; - exec = '' - sh -c "if [ -n \\"\\$*\\" ]; then exec ${wrapped-emacs}/bin/emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec emacsclient --alternate-editor= --create-frame; fi" sh %F - ''; - terminal = false; - categories = ["Application" "Development" "TextEditor"]; - mimeType = ["text/*"]; - settings = { - StartupWMClass = "Doom Emacs"; - }; - }; - }; - }; - }; -} diff --git a/old/modules/home/jj.nix b/old/modules/home/jj.nix deleted file mode 100644 index 8c217a2..0000000 --- a/old/modules/home/jj.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.hive.jj; -in { - options.hive.jj = { - enable = lib.mkEnableOption "Enable jj vcs"; - followGit = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Follow the current git configuration"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - jujutsu - ]; - - programs.jujutsu = { - enable = true; - settings = { - user = lib.optionalAttrs cfg.followGit { - name = config.programs.git.settings.user.name; - email = config.programs.git.settings.user.email; - }; - ui = lib.optionalAttrs (cfg.followGit && config.programs.difftastic.enable) { - diff-formatter = ["${pkgs.difftastic}/bin/difft" "--color=always" "$left" "$right"]; - }; - }; - }; - }; -}