From 6c35c04c1f859d32a7a703ac98679e093f6cea17 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 12 Jan 2026 14:54:11 +0000 Subject: [PATCH 01/53] treewide: remove unused 'with pkgs' --- modules/home/calibre/default.nix | 2 +- modules/home/gdb/default.nix | 2 +- modules/home/trgui/default.nix | 2 +- templates/c++-cmake/flake.nix | 2 +- templates/c++-meson/flake.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/home/calibre/default.nix b/modules/home/calibre/default.nix index de7c1263..fcd62f86 100644 --- a/modules/home/calibre/default.nix +++ b/modules/home/calibre/default.nix @@ -10,7 +10,7 @@ in }; config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ + home.packages = [ cfg.package ]; }; diff --git a/modules/home/gdb/default.nix b/modules/home/gdb/default.nix index 1ffc6bd9..b7c3aca5 100644 --- a/modules/home/gdb/default.nix +++ b/modules/home/gdb/default.nix @@ -17,7 +17,7 @@ in config = lib.mkIf cfg.enable (lib.mkMerge [ { - home.packages = with pkgs; [ + home.packages = [ cfg.package ]; diff --git a/modules/home/trgui/default.nix b/modules/home/trgui/default.nix index ee545a98..63df3550 100644 --- a/modules/home/trgui/default.nix +++ b/modules/home/trgui/default.nix @@ -10,7 +10,7 @@ in }; config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ + home.packages = [ cfg.package ]; }; diff --git a/templates/c++-cmake/flake.nix b/templates/c++-cmake/flake.nix index 7796f5e5..eb2767d6 100644 --- a/templates/c++-cmake/flake.nix +++ b/templates/c++-cmake/flake.nix @@ -95,7 +95,7 @@ self.packages.${system}.project ]; - packages = with pkgs; [ + packages = [ self.checks.${system}.pre-commit.enabledPackages ]; diff --git a/templates/c++-meson/flake.nix b/templates/c++-meson/flake.nix index cb14eb56..44189179 100644 --- a/templates/c++-meson/flake.nix +++ b/templates/c++-meson/flake.nix @@ -95,7 +95,7 @@ self.packages.${system}.project ]; - packages = with pkgs; [ + packages = [ self.checks.${system}.pre-commit.enabledPackages ]; From 184a6a13cc7876c89beaa72dfe4e91981c11a7bf Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 26 Jan 2026 17:52:23 +0000 Subject: [PATCH 02/53] treewide: remove redundant 'builtins' I keep forgetting `map` and `removeAttrs` are included at the top-level in the prelude. --- modules/home/mail/accounts/default.nix | 2 +- modules/home/wm/i3bar/default.nix | 2 +- modules/nixos/programs/steam/default.nix | 2 +- modules/nixos/services/backup/default.nix | 2 +- modules/nixos/services/nginx/default.nix | 6 +++--- overlays/default.nix | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/home/mail/accounts/default.nix b/modules/home/mail/accounts/default.nix index 5216ad5e..ca5e6ea6 100644 --- a/modules/home/mail/accounts/default.nix +++ b/modules/home/mail/accounts/default.nix @@ -11,7 +11,7 @@ let lib.mkDefault [ (lib.getExe pkgs.ambroisie.rbw-pass) "Mail" passName ]; address = mkMailAddress address domain; - aliases = builtins.map (lib.flip mkMailAddress domain) aliases; + aliases = map (lib.flip mkMailAddress domain) aliases; inherit primary; diff --git a/modules/home/wm/i3bar/default.nix b/modules/home/wm/i3bar/default.nix index 5ae0e7d7..28c19355 100644 --- a/modules/home/wm/i3bar/default.nix +++ b/modules/home/wm/i3bar/default.nix @@ -69,7 +69,7 @@ in inactive_state = "Idle"; }; in - builtins.map (block: defaults // block) cfg.vpn.blockConfigs + map (block: defaults // block) cfg.vpn.blockConfigs ) ) { diff --git a/modules/nixos/programs/steam/default.nix b/modules/nixos/programs/steam/default.nix index 0c7f9dad..c859bdb2 100644 --- a/modules/nixos/programs/steam/default.nix +++ b/modules/nixos/programs/steam/default.nix @@ -23,7 +23,7 @@ in enable = true; }; - environment.systemPackages = builtins.map lib.hiPrio [ + environment.systemPackages = map lib.hiPrio [ # Respect XDG conventions, leave my HOME alone (pkgs.writeShellScriptBin "steam" '' mkdir -p "${cfg.dataDir}" diff --git a/modules/nixos/services/backup/default.nix b/modules/nixos/services/backup/default.nix index 8aeeae19..79884063 100644 --- a/modules/nixos/services/backup/default.nix +++ b/modules/nixos/services/backup/default.nix @@ -96,7 +96,7 @@ in # Contains the UID/GID map, and other useful state "/var/lib/nixos" # SSH host keys (and public keys for convenience) - (builtins.map (key: [ key.path "${key.path}.pub" ]) config.services.openssh.hostKeys) + (map (key: [ key.path "${key.path}.pub" ]) config.services.openssh.hostKeys) ]; services.restic.backups.backblaze = { diff --git a/modules/nixos/services/nginx/default.nix b/modules/nixos/services/nginx/default.nix index ff530b0a..153a299f 100644 --- a/modules/nixos/services/nginx/default.nix +++ b/modules/nixos/services/nginx/default.nix @@ -188,14 +188,14 @@ in ++ (lib.flip lib.mapAttrsToList cfg.virtualHosts (_: { subdomain, ... } @ args: let conflicts = [ "port" "root" "socket" "redirect" ]; - optionsNotNull = builtins.map (v: args.${v} != null) conflicts; + optionsNotNull = map (v: args.${v} != null) conflicts; optionsSet = lib.filter lib.id optionsNotNull; in { assertion = builtins.length optionsSet == 1; message = '' Subdomain '${subdomain}' must have exactly one of ${ - lib.concatStringsSep ", " (builtins.map (v: "'${v}'") conflicts) + lib.concatStringsSep ", " (map (v: "'${v}'") conflicts) } configured. ''; })) @@ -208,7 +208,7 @@ in assertion = args.websocketsLocations != [ ] -> proxyPassUsed; message = '' Subdomain '${subdomain}' can only use 'websocketsLocations' with one of ${ - lib.concatStringsSep ", " (builtins.map (v: "'${v}'") proxyPass) + lib.concatStringsSep ", " (map (v: "'${v}'") proxyPass) }. ''; })) diff --git a/overlays/default.nix b/overlays/default.nix index 683e021b..d3e30aa8 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,6 +1,6 @@ # Automatically import all overlays in the directory let files = builtins.readDir ./.; - overlays = builtins.removeAttrs files [ "default.nix" ]; + overlays = removeAttrs files [ "default.nix" ]; in builtins.mapAttrs (name: _: import "${./.}/${name}") overlays From 5414f4c38d7337ffb9ccc79285d79c65c848437d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 12 Jan 2026 14:55:47 +0000 Subject: [PATCH 03/53] nixos: services: servarr: remove redundant 'lib' My personal style preference (currently) is to use `with lib` on option declarations, avoiding the `lib` prefix. --- modules/nixos/services/servarr/bazarr.nix | 2 +- modules/nixos/services/servarr/jackett.nix | 2 +- modules/nixos/services/servarr/nzbhydra.nix | 2 +- modules/nixos/services/servarr/prowlarr.nix | 2 +- modules/nixos/services/servarr/starr.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/nixos/services/servarr/bazarr.nix b/modules/nixos/services/servarr/bazarr.nix index 637da0c7..67d34169 100644 --- a/modules/nixos/services/servarr/bazarr.nix +++ b/modules/nixos/services/servarr/bazarr.nix @@ -4,7 +4,7 @@ let in { options.my.services.servarr.bazarr = with lib; { - enable = lib.mkEnableOption "Bazarr" // { + enable = mkEnableOption "Bazarr" // { default = config.my.services.servarr.enableAll; }; diff --git a/modules/nixos/services/servarr/jackett.nix b/modules/nixos/services/servarr/jackett.nix index 481cd3de..8e8a5c3e 100644 --- a/modules/nixos/services/servarr/jackett.nix +++ b/modules/nixos/services/servarr/jackett.nix @@ -4,7 +4,7 @@ let in { options.my.services.servarr.jackett = with lib; { - enable = lib.mkEnableOption "Jackett" // { + enable = mkEnableOption "Jackett" // { default = config.my.services.servarr.enableAll; }; diff --git a/modules/nixos/services/servarr/nzbhydra.nix b/modules/nixos/services/servarr/nzbhydra.nix index 7b639869..f2f82ac2 100644 --- a/modules/nixos/services/servarr/nzbhydra.nix +++ b/modules/nixos/services/servarr/nzbhydra.nix @@ -4,7 +4,7 @@ let in { options.my.services.servarr.nzbhydra = with lib; { - enable = lib.mkEnableOption "NZBHydra2" // { + enable = mkEnableOption "NZBHydra2" // { default = config.my.services.servarr.enableAll; }; }; diff --git a/modules/nixos/services/servarr/prowlarr.nix b/modules/nixos/services/servarr/prowlarr.nix index ce044c63..6825843c 100644 --- a/modules/nixos/services/servarr/prowlarr.nix +++ b/modules/nixos/services/servarr/prowlarr.nix @@ -5,7 +5,7 @@ let in { options.my.services.servarr.prowlarr = with lib; { - enable = lib.mkEnableOption "Prowlarr" // { + enable = mkEnableOption "Prowlarr" // { default = config.my.services.servarr.enableAll; }; diff --git a/modules/nixos/services/servarr/starr.nix b/modules/nixos/services/servarr/starr.nix index 2bf7c114..0ccdaa42 100644 --- a/modules/nixos/services/servarr/starr.nix +++ b/modules/nixos/services/servarr/starr.nix @@ -12,7 +12,7 @@ let in { options.my.services.servarr.${starr} = with lib; { - enable = lib.mkEnableOption (lib.toSentenceCase starr) // { + enable = mkEnableOption (lib.toSentenceCase starr) // { default = config.my.services.servarr.enableAll; }; From fbbe4ebe3c4b08dd3929e7521f5506ffad3214b4 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 26 Jan 2026 17:55:52 +0000 Subject: [PATCH 04/53] flake: checks: enable 'nixf-diagnose' --- flake/checks.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flake/checks.nix b/flake/checks.nix index 73e64d52..01d3c7a5 100644 --- a/flake/checks.nix +++ b/flake/checks.nix @@ -15,6 +15,10 @@ enable = true; }; + nixf-diagnose = { + enable = true; + }; + nixpkgs-fmt = { enable = true; }; From 5767c60cf2b2955aff0cde937743fac32e0faa1c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 18 Feb 2026 11:18:41 +0000 Subject: [PATCH 05/53] pkgs: i3-get-window-criteria: fix 'xorg' packages The `xorg` namespace is about to be removed in my next bump, so let's pro-actively remove them now. --- pkgs/i3-get-window-criteria/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/i3-get-window-criteria/default.nix b/pkgs/i3-get-window-criteria/default.nix index 2fc840dc..cba51944 100644 --- a/pkgs/i3-get-window-criteria/default.nix +++ b/pkgs/i3-get-window-criteria/default.nix @@ -1,4 +1,4 @@ -{ lib, coreutils, gnused, makeWrapper, stdenvNoCC, xorg }: +{ lib, coreutils, gnused, makeWrapper, stdenvNoCC, xprop, xwininfo }: stdenvNoCC.mkDerivation rec { pname = "i3-get-window-criteria"; version = "0.1.0"; @@ -22,8 +22,8 @@ stdenvNoCC.mkDerivation rec { wrapperPath = lib.makeBinPath [ coreutils gnused - xorg.xprop - xorg.xwininfo + xprop + xwininfo ]; fixupPhase = '' From f700375a66ac0a8a3a5f1033c3c02e2445862d6c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 12:06:05 +0000 Subject: [PATCH 06/53] home: vim: prefix augroup with 'ambroisie.*' --- modules/home/vim/plugin/numbertoggle.lua | 2 +- modules/home/vim/plugin/settings/tree-sitter.lua | 2 +- modules/home/vim/plugin/signtoggle.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/home/vim/plugin/numbertoggle.lua b/modules/home/vim/plugin/numbertoggle.lua index b1e3df21..2299a629 100644 --- a/modules/home/vim/plugin/numbertoggle.lua +++ b/modules/home/vim/plugin/numbertoggle.lua @@ -1,7 +1,7 @@ -- Show lines numbers vim.opt.number = true -local numbertoggle = vim.api.nvim_create_augroup("numbertoggle", { clear = true }) +local numbertoggle = vim.api.nvim_create_augroup("ambroisie.numbertoggle", { clear = true }) -- Toggle numbers between relative and absolute when changing buffers vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "InsertLeave", "WinEnter" }, { diff --git a/modules/home/vim/plugin/settings/tree-sitter.lua b/modules/home/vim/plugin/settings/tree-sitter.lua index 2958c2a9..b533452b 100644 --- a/modules/home/vim/plugin/settings/tree-sitter.lua +++ b/modules/home/vim/plugin/settings/tree-sitter.lua @@ -83,7 +83,7 @@ end vim.api.nvim_create_autocmd("FileType", { pattern = "*", - group = vim.api.nvim_create_augroup("treesitter_attach", { clear = true }), + group = vim.api.nvim_create_augroup("ambroisie.treesitter_attach", { clear = true }), callback = function(args) local buf, filetype = args.buf, args.match local language = vim.treesitter.language.get_lang(filetype) diff --git a/modules/home/vim/plugin/signtoggle.lua b/modules/home/vim/plugin/signtoggle.lua index 3deca340..66e0ab4c 100644 --- a/modules/home/vim/plugin/signtoggle.lua +++ b/modules/home/vim/plugin/signtoggle.lua @@ -1,4 +1,4 @@ -local signtoggle = vim.api.nvim_create_augroup("signtoggle", { clear = true }) +local signtoggle = vim.api.nvim_create_augroup("ambroisie.signtoggle", { clear = true }) -- Only show sign column for the currently focused buffer, if it has a number column vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "WinEnter" }, { From 11dcf849c8f3573fc04576719e0a462823e72fc0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 10 Feb 2026 15:39:16 +0000 Subject: [PATCH 07/53] home: vim: clarify how to disable 'ignorecase' Because I tend to forget the exact way to do it, let's document it so I have an easy place to check next time. --- modules/home/vim/init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/vim/init.vim b/modules/home/vim/init.vim index 11429250..f3b50227 100644 --- a/modules/home/vim/init.vim +++ b/modules/home/vim/init.vim @@ -112,7 +112,7 @@ colorscheme gruvbox """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Enable search high-lighting while the search is on-going set hlsearch -" Ignore case on search +" Ignore case on search unless \C is in search terms set ignorecase " Ignore case unless there is an uppercase letter in the pattern set smartcase From 6cb58c0a58c7efe39751fe48698efac5d1a589f8 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 19 Jan 2026 12:10:17 +0000 Subject: [PATCH 08/53] home: calibre: use upstream module --- modules/home/calibre/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/home/calibre/default.nix b/modules/home/calibre/default.nix index fcd62f86..e3733b10 100644 --- a/modules/home/calibre/default.nix +++ b/modules/home/calibre/default.nix @@ -10,8 +10,10 @@ in }; config = lib.mkIf cfg.enable { - home.packages = [ - cfg.package - ]; + programs.calibre = { + enable = true; + + inherit (cfg) package; + }; }; } From f6ea0014bd98bfdfdf88530f8c35d76d68a03659 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Nov 2025 12:31:19 +0000 Subject: [PATCH 09/53] pkgs: diff-flake: add nix-darwin support --- pkgs/diff-flake/diff-flake | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkgs/diff-flake/diff-flake b/pkgs/diff-flake/diff-flake index a2a35131..7a46151a 100755 --- a/pkgs/diff-flake/diff-flake +++ b/pkgs/diff-flake/diff-flake @@ -24,6 +24,10 @@ current_system() { nix eval --raw --impure --expr 'builtins.currentSystem' } +add_darwin() { + FLAKE_OUTPUTS+=("darwinConfigurations.\"$1\".config.system.build.toplevel") +} + add_home() { FLAKE_OUTPUTS+=("homeConfigurations.\"$1\".activationPackage") } @@ -54,6 +58,10 @@ usage() { print_err " -p, --previous-rev" print_err " which git revision should be considered the 'previous' state," print_err " defaults to HEAD~" + print_err " --darwin [name]" + print_err " specify the name of a nix-darwin output configuration whose" + print_err " closure should be diffed, can be used multiple times" + print_err " if no host name is given, defaults to current hostname" print_err " --home [name]" print_err " specify the name of a home-manager output configuration whose" print_err " closure should be diffed, can be used multiple times" @@ -101,6 +109,14 @@ parse_args() { PREVIOUS_REV="$(git rev-parse "$1")" shift ;; + --darwin) + if [ $# -gt 0 ] && ! is_option "$1"; then + add_darwin "$1" + shift + else + add_darwin "$(hostname)" + fi + ;; --home) if [ $# -gt 0 ] && ! is_option "$1"; then add_home "$1" @@ -138,6 +154,12 @@ parse_args() { done } +list_darwin_configurations() { + nix eval '.#darwinConfigurations' \ + --apply 'attrs: with builtins; concatStringsSep "\n" (attrNames attrs)' \ + --raw +} + list_home_configurations() { nix eval '.#homeConfigurations' \ --apply 'attrs: with builtins; concatStringsSep "\n" (attrNames attrs)' \ @@ -175,6 +197,9 @@ diff_output() { parse_args "$@" if [ "${#FLAKE_OUTPUTS[@]}" -eq 0 ]; then + for darwin in $(list_darwin_configurations); do + add_darwin "$darwin" + done for home in $(list_home_configurations); do add_home "$home" done From 95c21ace3c17403cd847abcab9410d204b5f308f Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Nov 2025 12:40:21 +0000 Subject: [PATCH 10/53] pkgs: diff-flake: add system-manager support --- pkgs/diff-flake/diff-flake | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkgs/diff-flake/diff-flake b/pkgs/diff-flake/diff-flake index 7a46151a..bacee6ed 100755 --- a/pkgs/diff-flake/diff-flake +++ b/pkgs/diff-flake/diff-flake @@ -41,6 +41,10 @@ add_shell() { FLAKE_OUTPUTS+=("devShells.\"$(current_system)\".\"$1\".inputDerivation") } +add_system() { + FLAKE_OUTPUTS+=("systemConfigs.\"$1\".config.system.build.toplevel") +} + usage() { print_err "Usage: $0 [option]... [-- [nix build option]...]" print_err "" @@ -74,6 +78,10 @@ usage() { print_err " specify a specific devShell configuration name whose closure" print_err " should be diffed, can be used multiple times" print_err " if no name is given, defaults to 'default'" + print_err " --system [name]" + print_err " specify the name of a system-manager output configuration whose" + print_err " closure should be diffed, can be used multiple times" + print_err " if no host name is given, defaults to current hostname" print_err "" print_err "when no flake outputs are specified, automatically queries for" print_err "all NixOS configurations, and devShells for current system" @@ -141,6 +149,14 @@ parse_args() { add_shell "default" fi ;; + --system) + if [ $# -gt 0 ] && ! is_option "$1"; then + add_system "$1" + shift + else + add_system "$(hostname)" + fi + ;; --) NIX_BUILD_ARGS=("$@") break @@ -178,6 +194,12 @@ list_dev_shells() { --raw } +list_system_configurations() { + nix eval '.#systemConfigs' \ + --apply 'attrs: with builtins; concatStringsSep "\n" (attrNames attrs)' \ + --raw +} + diff_output() { local PREV NEW PREV="$(mktemp --dry-run)" @@ -209,6 +231,9 @@ if [ "${#FLAKE_OUTPUTS[@]}" -eq 0 ]; then for shell in $(list_dev_shells); do add_shell "$shell" done + for system in $(list_system_configurations); do + add_system "$system" + done fi for out in "${FLAKE_OUTPUTS[@]}"; do From bc4326497fbeb7f7ea9e384f0e8115fc83f4b00b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Nov 2025 12:42:03 +0000 Subject: [PATCH 11/53] pkgs: diff-flake: rename 'host' to 'nixos' To avoid mixing them up with Nix-Darwin and System Manager hosts. --- pkgs/diff-flake/diff-flake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/diff-flake/diff-flake b/pkgs/diff-flake/diff-flake index bacee6ed..f9290b91 100755 --- a/pkgs/diff-flake/diff-flake +++ b/pkgs/diff-flake/diff-flake @@ -32,7 +32,7 @@ add_home() { FLAKE_OUTPUTS+=("homeConfigurations.\"$1\".activationPackage") } -add_host() { +add_nixos() { FLAKE_OUTPUTS+=("nixosConfigurations.\"$1\".config.system.build.toplevel") } @@ -70,7 +70,7 @@ usage() { print_err " specify the name of a home-manager output configuration whose" print_err " closure should be diffed, can be used multiple times" print_err " if no configuration name is given, defaults to current username" - print_err " --host [name]" + print_err " --nixos [name]" print_err " specify the name of a NixOS output configuration whose" print_err " closure should be diffed, can be used multiple times" print_err " if no host name is given, defaults to current hostname" @@ -133,12 +133,12 @@ parse_args() { add_home "$USER" fi ;; - --host) + --nixos) if [ $# -gt 0 ] && ! is_option "$1"; then - add_host "$1" + add_nixos "$1" shift else - add_host "$(hostname)" + add_nixos "$(hostname)" fi ;; --shell) @@ -225,8 +225,8 @@ if [ "${#FLAKE_OUTPUTS[@]}" -eq 0 ]; then for home in $(list_home_configurations); do add_home "$home" done - for host in $(list_nixos_configurations); do - add_host "$host" + for nixos in $(list_nixos_configurations); do + add_nixos "$nixos" done for shell in $(list_dev_shells); do add_shell "$shell" From 40509304d2572e552351791027d7ef520d339968 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Feb 2025 10:51:31 +0000 Subject: [PATCH 12/53] home: add jujutsu This is a very basic configuration, still missing most bells and whistles. --- modules/home/default.nix | 1 + modules/home/jujutsu/default.nix | 67 ++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 modules/home/jujutsu/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix index ad3b9791..eb3d0f29 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -24,6 +24,7 @@ ./gtk ./htop ./jq + ./jujutsu ./keyboard ./mail ./mpv diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix new file mode 100644 index 00000000..eaf56e9d --- /dev/null +++ b/modules/home/jujutsu/default.nix @@ -0,0 +1,67 @@ +{ config, pkgs, lib, ... }: +let + cfg = config.my.home.jujutsu; + + inherit (lib.my) mkMailAddress; +in +{ + options.my.home.jujutsu = with lib; { + enable = my.mkDisableOption "jujutsu configuration"; + + package = mkPackageOption pkgs "jujutsu" { }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + { + # For `jj git` commands + assertion = cfg.enable -> config.my.home.git.enable; + message = '' + `config.my.home.jujutsu` relies on `config.my.home.git` being enabled. + ''; + } + ]; + + programs.jujutsu = { + enable = true; + + inherit (cfg) package; + + settings = { + # Who am I? + user = { + name = "Bruno BELANYI"; + email = mkMailAddress "bruno" "belanyi.fr"; + }; + + aliases = { + jj = [ "util" "exec" "--" "jj" ]; + lol = [ "log" "-r" "..@" "-T" "builtin_log_oneline" ]; + lola = [ "lol" "-r" "all()" ]; + }; + + "--scope" = [ + # Multiple identities + { + "--when" = { + repositories = [ "~/git/EPITA/" ]; + }; + user = { + name = "Bruno BELANYI"; + email = mkMailAddress "bruno.belanyi" "epita.fr"; + }; + } + { + "--when" = { + repositories = [ "~/git/work/" ]; + }; + user = { + name = "Bruno BELANYI"; + email = mkMailAddress "ambroisie" "google.com"; + }; + } + ]; + }; + }; + }; +} From ed69076aceb77a8b50d871f3c612f4b4cf9bf173 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Feb 2025 10:51:31 +0000 Subject: [PATCH 13/53] home: delta: add 'jujutsu.enable' --- modules/home/delta/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/home/delta/default.nix b/modules/home/delta/default.nix index e76edc60..f6526321 100644 --- a/modules/home/delta/default.nix +++ b/modules/home/delta/default.nix @@ -11,6 +11,10 @@ in git = { enable = my.mkDisableOption "git integration"; }; + + jujutsu = { + enable = my.mkDisableOption "jujutsu integration"; + }; }; config = lib.mkIf cfg.enable { @@ -20,6 +24,9 @@ in inherit (cfg) package; enableGitIntegration = cfg.git.enable; + # `jj log -p` does not use `delta` + # https://github.com/jj-vcs/jj/issues/4142 + enableJujutsuIntegration = cfg.jujutsu.enable; options = { features = "diff-highlight decorations"; From 4ce0ba059a35966708b5c46b1d22280aca09902c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 Dec 2025 13:55:01 +0000 Subject: [PATCH 14/53] home: jujutsu: set 'ui.diff-formatter' I *still* don't really like the built-in formatting, but it's more about its highlighting than its syntax. Given that I default to using `delta` anyways, it doesn't _really_ matter as I don't see the default output. --- modules/home/jujutsu/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index eaf56e9d..fd8f84c1 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -40,6 +40,11 @@ in lola = [ "lol" "-r" "all()" ]; }; + ui = { + # I don't like word-diff + diff-formatter = ":git"; + }; + "--scope" = [ # Multiple identities { From 05da2d8546aa0a3a769bd095beb8d73fefc182ff Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 Dec 2025 12:48:58 +0000 Subject: [PATCH 15/53] home: jujutsu: set 'ui.pager' The v0.36 release stopped honoring `$PAGER`. So enforce it in the configuration (as I don't like their default pager settings). Ideally this would be `mkIf`ed behind `my.home.pager.enable`, however it looks like this does not work with the TOML type (does not seem to do any `mkMerge`-ish logic). --- modules/home/jujutsu/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index fd8f84c1..8d4141c8 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -43,6 +43,8 @@ in ui = { # I don't like word-diff diff-formatter = ":git"; + # Does not honor `$PAGER` (anymore) + pager = lib.mkDefault config.home.sessionVariables.PAGER; }; "--scope" = [ From 2d0d6ca8e116a1f360560cd9afaca58167c4feb3 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Mar 2025 12:43:12 +0000 Subject: [PATCH 16/53] home: jj: use verbose draft commit messages --- modules/home/jujutsu/default.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 8d4141c8..206cc2b9 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -47,6 +47,28 @@ in pager = lib.mkDefault config.home.sessionVariables.PAGER; }; + templates = { + # Equivalent to `commit.verbose = true` in Git + draft_commit_description = "commit_description_verbose(self)"; + }; + + template-aliases = { + "commit_description_verbose(commit)" = '' + concat( + commit_description(commit), + "JJ: ignore-rest\n", + diff.git(), + ) + ''; + "commit_description(commit)" = '' + concat( + commit.description(), "\n", + "JJ: This commit contains the following changes:\n", + indent("JJ: ", diff.stat(72)), + ) + ''; + }; + "--scope" = [ # Multiple identities { From 7aec662c4b7641713b0977ff15f5544d22d17122 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 18 Mar 2025 14:59:23 +0000 Subject: [PATCH 17/53] home: jujutsu: explicitly create 'conf.d' This is to serve as a reminder of _how_ to add a local configuration file. --- modules/home/jujutsu/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 206cc2b9..4112dc09 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -92,5 +92,10 @@ in ]; }; }; + + # To drop in a `local.toml` configuration, not-versioned + xdg.configFile = { + "jj/conf.d/.keep".text = ""; + }; }; } From a8ce474d4462a7cca2307c4e3144f42d81f24e4b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Jul 2025 10:49:29 +0000 Subject: [PATCH 18/53] home: jujutsu: simplify 'jj jj' alias --- modules/home/jujutsu/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 4112dc09..2eec27ea 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -35,7 +35,7 @@ in }; aliases = { - jj = [ "util" "exec" "--" "jj" ]; + jj = [ ]; lol = [ "log" "-r" "..@" "-T" "builtin_log_oneline" ]; lola = [ "lol" "-r" "all()" ]; }; From 9195d34261e6d9d1de1f14ad62349c7e37052ed9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Aug 2025 11:32:57 +0000 Subject: [PATCH 19/53] homes: bazin: use system jujutsu They have a custom `jj` with Piper CitC integration. --- hosts/homes/ambroisie@bazin/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/homes/ambroisie@bazin/default.nix b/hosts/homes/ambroisie@bazin/default.nix index 365b70df..9ef26427 100644 --- a/hosts/homes/ambroisie@bazin/default.nix +++ b/hosts/homes/ambroisie@bazin/default.nix @@ -22,6 +22,10 @@ package = pkgs.emptyDirectory; }; + jujutsu = { + package = pkgs.emptyDirectory; + }; + tmux = { # I use scripts that use the passthrough sequence often on this host enablePassthrough = true; From 61d202e3ce063817c9b3c32ab91317d7858313a2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Aug 2025 11:32:57 +0000 Subject: [PATCH 20/53] homes: mousqueton: use system jujutsu They have a custom `jj` with Piper CitC integration. --- hosts/homes/ambroisie@mousqueton/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/homes/ambroisie@mousqueton/default.nix b/hosts/homes/ambroisie@mousqueton/default.nix index 13836189..1ffee2b0 100644 --- a/hosts/homes/ambroisie@mousqueton/default.nix +++ b/hosts/homes/ambroisie@mousqueton/default.nix @@ -25,6 +25,10 @@ package = pkgs.emptyDirectory; }; + jujutsu = { + package = pkgs.emptyDirectory; + }; + tmux = { # I use scripts that use the passthrough sequence often on this host enablePassthrough = true; From e3c61b51860db585ee1adcdcffbe2fe5f4cd612b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 27 Oct 2025 12:34:07 +0000 Subject: [PATCH 21/53] home: jujutsu: set 'ui.diff-editor' Otherwise it keeps nagging me with a hint to set it. I'm not a big fan of this UI, I wish I add something closer to Git's patch interface. --- modules/home/jujutsu/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 2eec27ea..d24b5ca9 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -41,6 +41,8 @@ in }; ui = { + # Stop nagging me about it, though I am not a fan of its UI. + diff-editor = ":builtin"; # I don't like word-diff diff-formatter = ":git"; # Does not honor `$PAGER` (anymore) From 23b51798af080e11fa78b9acdcc45800b71a48c1 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Nov 2025 11:13:10 +0000 Subject: [PATCH 22/53] home: jujutsu: set 'ui.merge-editor' Same reason as `ui.diff-editor`. --- modules/home/jujutsu/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index d24b5ca9..1472e3ba 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -45,6 +45,8 @@ in diff-editor = ":builtin"; # I don't like word-diff diff-formatter = ":git"; + # Stop nagging me about it, though I am not a fan of its UI. + merge-editor = ":builtin"; # Does not honor `$PAGER` (anymore) pager = lib.mkDefault config.home.sessionVariables.PAGER; }; From 1b3afec82bd98756c9c56a97ab2cdc935a14b5d6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Feb 2025 10:51:31 +0000 Subject: [PATCH 23/53] WIP: ADD NOTE FOR FUTURE SELF --- modules/home/jujutsu/default.nix | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 1472e3ba..3072af42 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -36,8 +36,16 @@ in aliases = { jj = [ ]; + # FIXME: + # * still not a big fan of the template lol = [ "log" "-r" "..@" "-T" "builtin_log_oneline" ]; lola = [ "lol" "-r" "all()" ]; + # FIXME: equivalent to `git switch -` + # See https://github.com/jj-vcs/jj/issues/2871 + # Might be broken recently https://discord.com/channels/968932220549103686/1380272574709366989/1380432041983606855 + # TODO: + # * `pick` (https://github.com/jj-vcs/jj/issues/5446): [ "util" "exec" "--" "bash" "-c" "jj log -p -r \"diff_contains($1)\"" "" ] + # * `root`: `jj workspace root` (barely necessary then) }; ui = { @@ -51,6 +59,31 @@ in pager = lib.mkDefault config.home.sessionVariables.PAGER; }; + # FIXME: git equivalents + # I'd like a better formatted blame (more like delta's?) + # blame = { + # coloring = "repeatedLines"; + # markIgnoredLines = true; + # markUnblamables = true; + # }; + # FIXME: log colors should probably match git + # FIXME: patience diff? + # FIXME: fetch prune/pruneTags? + # FIXME: pull.rebase=true? Probably true TBH + # FIXME: push.default=simple? Probably true TBH + # FIXME: conflict style? ui.conflict-marker-style=git is diff3, not zdiff3. Default looks fine-ish + + # FIXME: from ma_9's config, plus my own stuff + # snapshot = { + # auto-track = "none()"; + # }; + # + # ui = { + # movement = { + # edit = false; + # }; + # }; + templates = { # Equivalent to `commit.verbose = true` in Git draft_commit_description = "commit_description_verbose(self)"; @@ -64,6 +97,9 @@ in diff.git(), ) ''; + # FIXME: use `diff.summary()` instead? Supported by syntax highlighting + # See https://github.com/jj-vcs/jj/issues/1946#issuecomment-2572986485 + # FIXME: tree-sitter grammar isn't in `nvim-treesitter` (https://github.com/kareigu/tree-sitter-jjdescription) "commit_description(commit)" = '' concat( commit.description(), "\n", From f56b1068da2f001d873b368918acf220a14e4b56 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 12:32:14 +0000 Subject: [PATCH 24/53] home: vim: fix unimpaired mapping descriptions --- modules/home/vim/after/plugin/mappings/unimpaired.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/vim/after/plugin/mappings/unimpaired.lua b/modules/home/vim/after/plugin/mappings/unimpaired.lua index 765b6b11..f83a3a34 100644 --- a/modules/home/vim/after/plugin/mappings/unimpaired.lua +++ b/modules/home/vim/after/plugin/mappings/unimpaired.lua @@ -82,7 +82,7 @@ local keys = { -- Disable option { "]o", group = "Disable option" }, - { "]ob", desc = "Light background" }, + { "]ob", desc = "Dark background" }, { "]oc", desc = "Cursor line" }, { "]od", desc = "Diff" }, { "]of", "FormatDisable", desc = "LSP Formatting" }, @@ -101,7 +101,7 @@ local keys = { -- Toggle option { "yo", group = "Toggle option" }, - { "yob", desc = "Light background" }, + { "yob", desc = "Toggle background" }, { "yoc", desc = "Cursor line" }, { "yod", desc = "Diff" }, { "yof", "FormatToggle", desc = "LSP Formatting" }, From f2ae223c665968d94c573c3a6eb37b7d19513e2d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 15:01:11 +0100 Subject: [PATCH 25/53] nixos: services: sabnzbd: fix deprecated config I want to have _some_ settings set outside my NixOS configuration, so keep the config-file writable. --- modules/nixos/services/sabnzbd/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/nixos/services/sabnzbd/default.nix b/modules/nixos/services/sabnzbd/default.nix index 9e0d9c3c..6c9eadd4 100644 --- a/modules/nixos/services/sabnzbd/default.nix +++ b/modules/nixos/services/sabnzbd/default.nix @@ -13,6 +13,11 @@ in services.sabnzbd = { enable = true; group = "media"; + + # Don't warn about the config file + configFile = null; + # I want to configure servers outside of Nix + allowConfigWrite = true; }; # Set-up media group From c8f9e002f62e770be83d9af56a58f176b92a7474 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 15:08:09 +0100 Subject: [PATCH 26/53] nixos: services: sabnzbd: add 'port' option --- modules/nixos/services/sabnzbd/default.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/modules/nixos/services/sabnzbd/default.nix b/modules/nixos/services/sabnzbd/default.nix index 6c9eadd4..37ba96cf 100644 --- a/modules/nixos/services/sabnzbd/default.nix +++ b/modules/nixos/services/sabnzbd/default.nix @@ -2,11 +2,17 @@ { config, lib, ... }: let cfg = config.my.services.sabnzbd; - port = 9090; # NOTE: not declaratively set... in { options.my.services.sabnzbd = with lib; { enable = mkEnableOption "SABnzbd binary news reader"; + + port = mkOption { + type = types.port; + default = 9090; + example = 4242; + description = "The port on which SABnzbd will listen for incoming HTTP traffic"; + }; }; config = lib.mkIf cfg.enable { @@ -18,6 +24,13 @@ in configFile = null; # I want to configure servers outside of Nix allowConfigWrite = true; + + settings = { + misc = { + host = "127.0.0.1"; + inherit (cfg) port; + }; + }; }; # Set-up media group @@ -25,7 +38,7 @@ in my.services.nginx.virtualHosts = { sabnzbd = { - inherit port; + inherit (cfg) port; }; }; From 72efb0c7eae9a14c26e702dbca0ebbd1c2822f46 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 19:46:25 +0100 Subject: [PATCH 27/53] hosts: nixos: porthos: secrets: update cross-seed --- .../servarr/cross-seed/configuration.json.age | Bin 2031 -> 3119 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/hosts/nixos/porthos/secrets/servarr/cross-seed/configuration.json.age b/hosts/nixos/porthos/secrets/servarr/cross-seed/configuration.json.age index 94fdf975d6418d394c62c42e572374b24865a776..b8cbe6aa7d2a5491342a62798ddaf2830e28cb7d 100644 GIT binary patch literal 3119 zcmdM|0Vh{?Pd^1mcUJ{hKj)yxfDl&~1vgJ0SCE`8S7dlfj!$@4X{522X|hL9L6VV4 zX_B#5o{w>4g>$BXwx@?*Rid+DPLzwMp-OH&<9-en~*4 zV_9IZMXqOvUzksLN@Y~ITUAuBlY5Yhle>?BVRnjRfvaz5SW%!+L2;r-RAo?zt4Xql zpGjbdV-Z(KXoX==M7B||L5Znzra_5Mu#<6!YlVAiXhu$CZct%VmXk?{tEEY>foEl4 zR*+eUhm(PCSb<4WZlqyUSX4Pza70d4Vor){RJd!obDn=nx{p&~aaOo*qH9ukKuVTx zS&+YTsk2*-c6OCtu5)T~Sa7OqQktc4X^xY5ScS0xSBQaIu4h(?QDT{EmU*#LzF$&F zgjryfTe4GXNI+#)xuJP}xItucQeIhEd0s_TQKoU3Pqt@?aa3-lQJHH}6<3%~cy3u} zNUm=|Xr@7#v2UJtYGuB!qq(_rV5woEuZdrIgppa9g{5z)pMjZMnqx(%f0RL>WoB4# zp@mn7vpH94P)bCEi+)yEs=Gl+s)2imXHjLienqfvxNnhTx<__qS)zZYk8w$fzn^Pb zs+)gRx{FgmQCg6pdzDF6K#4O~s#!sPqQGkVa zx?8weR(eIMcCN8ux^G&Ek#}-tRElGGg?~zAW@Je=m#KbYak-8G`MU_jAi*sg{Z)kCGgpsFVnv+v@nP-8MK~RuIQGiRXV`gSqrSdNg}G~JQese$QL0OTb5%q{u6u5}iK&rKqJ@E@V?ddav4>-% zuSIEbkh6JGWp-3Rva6$`Q${dXXh2Y)nR9rirKMTAX;EIWk+HrNB*v8#c5Rhf&nMXp(ZVV-H2Wr(Azi>YHemqnR-g+*p+Mwv&UxuI{6XGy71 zl5<&TPHCc9Zc15rXnBT*w_k9ob7qlyNl3YweoA7bkBhc(Vpe)?nn$RsE0=q&Ur3N& zK%jx6p_xH;zPYQVsY_r+SxKRnsdGtjq<>;nezCt{R*F$@YN?N(YpPFPxtB#{lwXju zPfnnvxj$D~iEnmgK$2y8u47t7SxAzhvw?SBs7bm(VoEVRA)=f1;zgcVtnacThf8U~!^nVMJn1ct(a}aHyk+XK8U-SV@(6VUS6pX=t{$ zPobMhR+&$^n|psE>JyQ$Suws%eUwpRq}Ju9rcYQA$}#c#yeQ zkdaA5fssdXT6T7zwwHf$zF8udp=VB*c3MWMt-7Eq=$EKl!ZwmSCwJ5m!)$_T7jXncDbojwu_&> zS8kHNzh9VR zZ(e%2rC)eiSZ;AniMK^ST1i-{Q)ZyPqmPGippScGpj&8WqGM8Ev5%osK%jAjkF&nM ztC@F3XcU*Pxpt_FKv|hZZnAz>qJ?>&S!Iz|o@ID= zm`7@Wp_yTtOHp!GXi9`>5X|}eTc|c)#prLC;c4l&wd%90i za=C9-PD+|vhIg{NcWR!8MTL2oTc%5tTTw)wTS|pDmws`HtADC%kZEb5U!GY;Wnoxu zq`OZ*v2$g*Wtd5&i&vgca+G7fw~1G>ey~AmW`4R)k+XS3aA8tKMNnCmDVMKHSYp0e zu}Ni~Q<8U?xv#%LQDAXIpii!gr@LuNfwzmRez-+$XsEtVaax*pfTc@BuxDXWNp@wW zdq75!sUcT{VX~`!a=y2jc}hjTNvf~8QE_&8NU(2lP-%#vaiCdIq+yA9u6|^yhe@J) zvPr17yLNd{N_wfWS(#66WQrwMnTw};Zl$w_c7bQEN1}UJx>2E@Yg&q9nWtx{yPv;F zqL+tfaDaZLc4b*cqNRCKZbW)mo{^z`sCjZlzIkNZo^ye7VNr>bQ+8gMGnbJ;ib+aV zSaMKSP^G?kp=XLmwn1TLfoW<=R+vjwdPJzVsj0JLxvNR0ab-|xMOaW`MwyFafJ;=7 zep+E}l^IutepX77WsY~4Pfl2hw_$2#mRD7zNxFAoUXizxmtj;%g@>cIk6*rTd8tL3 zep;njWu#A1L{+(gv0FufZ$OPwpT@Po_ShYP^h_UK%$p-M5Tp$ zZgx^wYEfcUNKj#vzf+ijexNs3m04v(iA#2tsb#pCe~NLQwtMuvxx zXL_o3WMyJvfK!o2KxSg1d#P(kae;H1b67~Ji)TeTmr+1LRJvJ~cZgGzV^FG}xl?MW zqqbR!p>}48e||=Wd1zH$W=V;0URtt#x?8YIrn7Hlc2QBNcc{63Nl{6NK37h7fnj#2 ztG}07kWZpxSV>BvL5ORJS4d!yiBpzOh^c=`xud(KOL3A{m1BresBw_9OOB_hOJzW+ zg-4*dTRxYwi(6(+q_&q?YJOUXTWLm^o2Pqvj%!*;Nvg4NWK?cdXjze0a=D9#c6g~z dsE?UZRiv?{u}hM_qpd9$xWVu0=Yq2@004Qv`|1Dy literal 2031 zcmYdHPt{G$OD?J`D9Oyv)5|YP*Do{V(zR14F3!+RO))YxHMCSn_Ri1BO;<=S&$J9m zF108%Ez1fnwba%(@lP*Gv8;3pa4ITEa}G-n@GUjXG)>PAwBQQ!PmHukbu};XDaucD z&U7>_!m*q%D~GW!PCyAa=HPkhbXbVF37 zN?-GNd`T7B8omGaZol8#dRXti*uqeG!fCfmmqMUWnFOQqq01_JHaw2M5yI+fsQ&KG z^;1^+T2(5`xDBq(c%ySg^gw&a54{aGOE*~S$ZlM|vHfpUz?$5OLj{h9cDS1#y}xO_ zLPheMIX_=qX;-rfjCyCRvpJq=XT{o&)(+vvofO2`r&=CZ6xenuR)21d!&L7bdTYc= zLRawg?K)6*U0Zi?g3M&+hfDH4MY%GZyIb|5$M(Tg$;?inturkgj$Cn?HA&oN&q>*d z%j-_D9KL^(xx`Y#*#2;2Tk};p!Goa_9{fFLEF2WYr!0H+-AYr=0EGqj?(Yt>XF4Ff z^LVF#gTiOoH``>~kGU?fZ0Fs&n^Sp(WrX3ecA=sr@0}U6uieeCGqGRlZ+^IFKd}_&m#(Kht>q1$~?7h-IrI~ z%&SkOu>6!LUVgh?F8FEI=G%@PI}5)Uy%oJEr}TA>qx1J0-VF19e_!)T&sBKVYnCf! z4xgQhp43*i%AVLbk6%ss>E8Mb%VV|*_Ay&O{MwMDdso1tQGxeEs(${@4C$FKk1JnW_UhKtZ6`fU&L^<*s@-@}=JhGRYfj>0seJ3L z^O_GVl5Dh`xkg?fr}R*Azs36*^81y}9hB_OQBsm(E^y_L5lNqv6;$YP^qr-wh3fOD zjaCnf+*_Wh?f$f8*WIT<-`&ool<`Wgm|XZ^*~-gj&-*O;Qghv`FN-(z)9m+-N8U&B zt995tZ}WQJ!d{XqWODsp%)2YE<82OpU9&KK|6QfDErO-qO~%1Gk6I?5zu&y>{Krp^ zYOAE;vgbNgC`^C;YY|tS&GxU;)`;D#QDsfsZl6C({NUrz;_B1_=fy5LIdQ+W=JsBW z%nm*x^*YF&WF4f%bacs3anas8oq8>zcl;?xnIWXIFk_~9f7XTzT-QA}J@4i3{Bbctb2ra0Y`ZMgewZzp!SLVqDv#rWyUy*%TIj5Qnnm;M#5Gp- zmRl7U{A>*SH1FD@)^*WG1LnWCJ9Sic8N-wKz2|HN1Q_fC&CX~vUh$gZ{d0+wzq$IJ z&Gu*ZPwGFgcfQG#*o%3*4cxwNP6wU6UDm$2{)WHjNBfg}f91z=>nEK5wmQG|*T%vp zugUpj5qt5jvDxYAG8`$p`}cS0uK8!4wBd<@xa5ov-@>x` z4YxeF|KPXg(WwiqZH=k|s~OU!>h#QKwp+$GFD?D!my!U6gBn}j3M?G5IK4cBmr8yEjszWJTf zp1W!cj|^YLd89JDQEszyTYUQNp5XT0Nv|6oOkb2T!}#*+l9x$$F8u1*eEf3cUF%C4 zK`Ylzw45Bhf9}s-jdQ1puDPiMsW0iazjEVWY436#4iUuytqpbFRcg%T-vqDc6s{=g z4Jk}MwrrQLDd(G*jh+&7GI&|bm=9iYX7k+?#ah`e5XX1^e8pw$L(jEi&2pb)PMa+i zFva=c(QQUn47`Oi_WNAlX{^l28dhHW(0{s6O$>+bT+YbNvq~3Q>UY;AW&R7x@b Date: Wed, 18 Feb 2026 11:18:41 +0000 Subject: [PATCH 28/53] pkgs: i3-get-window-criteria: fix 'xorg' packages The `xorg` namespace is about to be removed in my next bump, so let's pro-actively remove them now. --- pkgs/i3-get-window-criteria/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/i3-get-window-criteria/default.nix b/pkgs/i3-get-window-criteria/default.nix index 2fc840dc..cba51944 100644 --- a/pkgs/i3-get-window-criteria/default.nix +++ b/pkgs/i3-get-window-criteria/default.nix @@ -1,4 +1,4 @@ -{ lib, coreutils, gnused, makeWrapper, stdenvNoCC, xorg }: +{ lib, coreutils, gnused, makeWrapper, stdenvNoCC, xprop, xwininfo }: stdenvNoCC.mkDerivation rec { pname = "i3-get-window-criteria"; version = "0.1.0"; @@ -22,8 +22,8 @@ stdenvNoCC.mkDerivation rec { wrapperPath = lib.makeBinPath [ coreutils gnused - xorg.xprop - xorg.xwininfo + xprop + xwininfo ]; fixupPhase = '' From 4704b34db3e248abab508f0f8c2b5c6f45a26549 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 21:40:35 +0100 Subject: [PATCH 29/53] overlays: downgrade-transmission: add derivation I need to vendor the full derivation definition, as upstream diverges further and further away from 4.0.5. On the next bump, the packaging for 4.1.0 starts becoming sufficiently different to break my overlay. --- overlays/downgrade-transmission/default.nix | 17 +- .../downgrade-transmission/transmission_4.nix | 232 ++++++++++++++++++ 2 files changed, 237 insertions(+), 12 deletions(-) create mode 100644 overlays/downgrade-transmission/transmission_4.nix diff --git a/overlays/downgrade-transmission/default.nix b/overlays/downgrade-transmission/default.nix index 9d3fc8ae..9fc6d140 100644 --- a/overlays/downgrade-transmission/default.nix +++ b/overlays/downgrade-transmission/default.nix @@ -1,14 +1,7 @@ -self: prev: +self: _prev: { - transmission_4 = prev.transmission_4.overrideAttrs (_: { - version = "4.0.5"; - - src = self.fetchFromGitHub { - owner = "transmission"; - repo = "transmission"; - rev = "4.0.5"; - hash = "sha256-gd1LGAhMuSyC/19wxkoE2mqVozjGPfupIPGojKY0Hn4="; - fetchSubmodules = true; - }; - }); + transmission_4 = self.callPackage ./transmission_4.nix { + fmt = self.fmt_9; + libutp = self.libutp_3_4; + }; } diff --git a/overlays/downgrade-transmission/transmission_4.nix b/overlays/downgrade-transmission/transmission_4.nix new file mode 100644 index 00000000..a49f6b9b --- /dev/null +++ b/overlays/downgrade-transmission/transmission_4.nix @@ -0,0 +1,232 @@ +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch2 +, cmake +, pkg-config +, python3 +, openssl +, curl +, libevent +, inotify-tools +, systemd +, zlib +, pcre +, libb64 +, libutp +, libdeflate +, utf8cpp +, fast-float +, fmt +, libpsl +, miniupnpc +, dht +, libnatpmp +, # Build options + enableGTK3 ? false +, gtkmm3 +, libpthread-stubs +, wrapGAppsHook3 +, enableQt5 ? false +, enableQt6 ? false +, qt5 +, qt6Packages +, nixosTests +, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd +, enableDaemon ? true +, enableCli ? true +, installLib ? false +, apparmorRulesFromClosure +}: + +let + inherit (lib) cmakeBool optionals; + + apparmorRules = apparmorRulesFromClosure { name = "transmission-daemon"; } ( + [ + curl + libdeflate + libevent + libnatpmp + libpsl + miniupnpc + openssl + pcre + zlib + ] + ++ optionals enableSystemd [ systemd ] + ++ optionals stdenv.hostPlatform.isLinux [ inotify-tools ] + ); + +in +stdenv.mkDerivation (finalAttrs: { + pname = "transmission"; + version = "4.0.5"; + + src = fetchFromGitHub { + owner = "transmission"; + repo = "transmission"; + rev = finalAttrs.version; + hash = "sha256-gd1LGAhMuSyC/19wxkoE2mqVozjGPfupIPGojKY0Hn4="; + fetchSubmodules = true; + }; + + patches = [ + (fetchpatch2 { + url = "https://github.com/transmission/transmission/commit/febfe49ca3ecab1a7142ecb34012c1f0b2bcdee8.patch?full_index=1"; + hash = "sha256-Ge0+AXf/ilfMieGBAdvvImY7JOb0gGIdeKprC37AROs="; + excludes = [ + # The submodule that we don't use (we use our miniupnp) + "third-party/miniupnp" + # Hunk fails for this one, but we don't care because we don't rely upon + # xcode definitions even for the Darwin build. + "Transmission.xcodeproj/project.pbxproj" + ]; + }) + ]; + + outputs = [ + "out" + "apparmor" + ]; + + cmakeFlags = [ + (cmakeBool "ENABLE_CLI" enableCli) + (cmakeBool "ENABLE_DAEMON" enableDaemon) + (cmakeBool "ENABLE_GTK" enableGTK3) + (cmakeBool "ENABLE_MAC" false) # requires xcodebuild + (cmakeBool "ENABLE_QT" (enableQt5 || enableQt6)) + (cmakeBool "INSTALL_LIB" installLib) + ] + ++ optionals stdenv.hostPlatform.isDarwin [ + # Transmission sets this to 10.13 if not explicitly specified, see https://github.com/transmission/transmission/blob/0be7091eb12f4eb55f6690f313ef70a66795ee72/CMakeLists.txt#L7-L16. + "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.hostPlatform.darwinMinVersion}" + ]; + + postPatch = '' + # Clean third-party libraries to ensure system ones are used. + # Excluding gtest since it is hardcoded to vendored version. The rest of the listed libraries are not packaged. + pushd third-party + for f in *; do + if [[ ! $f =~ googletest|wildmat|wide-integer|jsonsl ]]; then + rm -r "$f" + fi + done + popd + rm \ + cmake/FindFastFloat.cmake \ + cmake/FindFmt.cmake \ + cmake/FindUtfCpp.cmake + # Upstream uses different config file name. + substituteInPlace CMakeLists.txt --replace 'find_package(UtfCpp)' 'find_package(utf8cpp)' + + # Use gettext even on Darwin + substituteInPlace libtransmission/utils.h \ + --replace-fail '#if defined(HAVE_GETTEXT) && !defined(__APPLE__)' '#if defined(HAVE_GETTEXT)' + ''; + + nativeBuildInputs = [ + pkg-config + cmake + python3 + ] + ++ optionals enableGTK3 [ wrapGAppsHook3 ] + ++ optionals enableQt5 [ qt5.wrapQtAppsHook ] + ++ optionals enableQt6 [ qt6Packages.wrapQtAppsHook ]; + + buildInputs = [ + curl + dht + fast-float + fmt + libb64 + libdeflate + libevent + libnatpmp + libpsl + libutp + miniupnpc + openssl + pcre + utf8cpp + zlib + ] + ++ optionals enableQt5 ( + with qt5; + [ + qttools + qtbase + ] + ) + ++ optionals enableQt6 ( + with qt6Packages; + [ + qttools + qtbase + qtsvg + ] + ) + ++ optionals enableGTK3 [ + gtkmm3 + libpthread-stubs + ] + ++ optionals enableSystemd [ systemd ] + ++ optionals stdenv.hostPlatform.isLinux [ inotify-tools ]; + + postInstall = '' + mkdir $apparmor + cat >$apparmor/bin.transmission-daemon <, + include + profile $out/bin/transmission-daemon { + include + include + include + include "${apparmorRules}" + @{PROC}/sys/kernel/random/uuid r, + @{PROC}/sys/vm/overcommit_memory r, + @{PROC}/@{pid}/environ r, + @{PROC}/@{pid}/mounts r, + /tmp/tr_session_id_* rwk, + + $out/share/transmission/public_html/** r, + + include if exists + } + EOF + install -Dm0444 -t $out/share/icons ../qt/icons/transmission.svg + ''; + + passthru.tests = { + apparmor = nixosTests.transmission_4; # starts the service with apparmor enabled + smoke-test = nixosTests.bittorrent; + }; + + meta = { + description = "Fast, easy and free BitTorrent client"; + mainProgram = + if (enableQt5 || enableQt6) then + "transmission-qt" + else if enableGTK3 then + "transmission-gtk" + else + "transmission-cli"; + longDescription = '' + Transmission is a BitTorrent client which features a simple interface + on top of a cross-platform back-end. + Feature spotlight: + * Uses fewer resources than other clients + * Native Mac, GTK and Qt GUI clients + * Daemon ideal for servers, embedded systems, and headless use + * All these can be remote controlled by Web and Terminal clients + * Bluetack (PeerGuardian) blocklists with automatic updates + * Full encryption, DHT, and PEX support + ''; + homepage = "https://www.transmissionbt.com/"; + license = with lib.licenses; [ + gpl2Plus + mit + ]; + platforms = lib.platforms.unix; + }; +}) From 89bd3aa428ab9bb37c61f2fa0e75c755b37bc3c3 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 15:21:56 +0100 Subject: [PATCH 30/53] flake: bump inputs --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index dad55a08..1f7bb189 100644 --- a/flake.lock +++ b/flake.lock @@ -159,11 +159,11 @@ ] }, "locked": { - "lastModified": 1770654520, - "narHash": "sha256-mg5WZMIPGsFu9MxSrUcuJUPMbfMsF77el5yb/7rc10k=", + "lastModified": 1771505064, + "narHash": "sha256-lh9rF+C/nKFyWAqbHIa6tK9L/6N0UaQg7zw15aP4jBM=", "owner": "nix-community", "repo": "home-manager", - "rev": "6c4fdbe1ad198fac36c320fd45c5957324a80b8e", + "rev": "a0a01d8811fd5e99e003078ed64a0e7b531545dd", "type": "github" }, "original": { @@ -175,11 +175,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1770562336, - "narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=", + "lastModified": 1771369470, + "narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d6c71932130818840fc8fe9509cf50be8c64634f", + "rev": "0182a361324364ae3f436a63005877674cf45efb", "type": "github" }, "original": { @@ -199,11 +199,11 @@ ] }, "locked": { - "lastModified": 1770732881, - "narHash": "sha256-yGkibRit67Pz1uo1Kk55kZBHQq90K3gc0N762JGW/uQ=", + "lastModified": 1771506707, + "narHash": "sha256-R9oBi0EPsWN4bHfYgcyiSzx31/Fkgg3IHubf30II7Ow=", "owner": "nix-community", "repo": "NUR", - "rev": "06490c1287ab62a8c5075c440fd3e247913bc29c", + "rev": "30ad144e51a0ae8b47aa84c1139e84fc278d6e86", "type": "github" }, "original": { From 50709a1266d2e35e28da223b7b5d649b3f5e721b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 12 Jan 2026 14:54:11 +0000 Subject: [PATCH 31/53] treewide: remove unused 'with pkgs' --- modules/home/calibre/default.nix | 2 +- modules/home/gdb/default.nix | 2 +- modules/home/trgui/default.nix | 2 +- templates/c++-cmake/flake.nix | 2 +- templates/c++-meson/flake.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/home/calibre/default.nix b/modules/home/calibre/default.nix index de7c1263..fcd62f86 100644 --- a/modules/home/calibre/default.nix +++ b/modules/home/calibre/default.nix @@ -10,7 +10,7 @@ in }; config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ + home.packages = [ cfg.package ]; }; diff --git a/modules/home/gdb/default.nix b/modules/home/gdb/default.nix index 1ffc6bd9..b7c3aca5 100644 --- a/modules/home/gdb/default.nix +++ b/modules/home/gdb/default.nix @@ -17,7 +17,7 @@ in config = lib.mkIf cfg.enable (lib.mkMerge [ { - home.packages = with pkgs; [ + home.packages = [ cfg.package ]; diff --git a/modules/home/trgui/default.nix b/modules/home/trgui/default.nix index ee545a98..63df3550 100644 --- a/modules/home/trgui/default.nix +++ b/modules/home/trgui/default.nix @@ -10,7 +10,7 @@ in }; config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ + home.packages = [ cfg.package ]; }; diff --git a/templates/c++-cmake/flake.nix b/templates/c++-cmake/flake.nix index 7796f5e5..eb2767d6 100644 --- a/templates/c++-cmake/flake.nix +++ b/templates/c++-cmake/flake.nix @@ -95,7 +95,7 @@ self.packages.${system}.project ]; - packages = with pkgs; [ + packages = [ self.checks.${system}.pre-commit.enabledPackages ]; diff --git a/templates/c++-meson/flake.nix b/templates/c++-meson/flake.nix index cb14eb56..44189179 100644 --- a/templates/c++-meson/flake.nix +++ b/templates/c++-meson/flake.nix @@ -95,7 +95,7 @@ self.packages.${system}.project ]; - packages = with pkgs; [ + packages = [ self.checks.${system}.pre-commit.enabledPackages ]; From 53c12a9e1a691221031fa710f0b18a7993cdac2d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 26 Jan 2026 17:52:23 +0000 Subject: [PATCH 32/53] treewide: remove redundant 'builtins' I keep forgetting `map` and `removeAttrs` are included at the top-level in the prelude. --- modules/home/mail/accounts/default.nix | 2 +- modules/home/wm/i3bar/default.nix | 2 +- modules/nixos/programs/steam/default.nix | 2 +- modules/nixos/services/backup/default.nix | 2 +- modules/nixos/services/nginx/default.nix | 6 +++--- overlays/default.nix | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/home/mail/accounts/default.nix b/modules/home/mail/accounts/default.nix index 5216ad5e..ca5e6ea6 100644 --- a/modules/home/mail/accounts/default.nix +++ b/modules/home/mail/accounts/default.nix @@ -11,7 +11,7 @@ let lib.mkDefault [ (lib.getExe pkgs.ambroisie.rbw-pass) "Mail" passName ]; address = mkMailAddress address domain; - aliases = builtins.map (lib.flip mkMailAddress domain) aliases; + aliases = map (lib.flip mkMailAddress domain) aliases; inherit primary; diff --git a/modules/home/wm/i3bar/default.nix b/modules/home/wm/i3bar/default.nix index 5ae0e7d7..28c19355 100644 --- a/modules/home/wm/i3bar/default.nix +++ b/modules/home/wm/i3bar/default.nix @@ -69,7 +69,7 @@ in inactive_state = "Idle"; }; in - builtins.map (block: defaults // block) cfg.vpn.blockConfigs + map (block: defaults // block) cfg.vpn.blockConfigs ) ) { diff --git a/modules/nixos/programs/steam/default.nix b/modules/nixos/programs/steam/default.nix index 0c7f9dad..c859bdb2 100644 --- a/modules/nixos/programs/steam/default.nix +++ b/modules/nixos/programs/steam/default.nix @@ -23,7 +23,7 @@ in enable = true; }; - environment.systemPackages = builtins.map lib.hiPrio [ + environment.systemPackages = map lib.hiPrio [ # Respect XDG conventions, leave my HOME alone (pkgs.writeShellScriptBin "steam" '' mkdir -p "${cfg.dataDir}" diff --git a/modules/nixos/services/backup/default.nix b/modules/nixos/services/backup/default.nix index 8aeeae19..79884063 100644 --- a/modules/nixos/services/backup/default.nix +++ b/modules/nixos/services/backup/default.nix @@ -96,7 +96,7 @@ in # Contains the UID/GID map, and other useful state "/var/lib/nixos" # SSH host keys (and public keys for convenience) - (builtins.map (key: [ key.path "${key.path}.pub" ]) config.services.openssh.hostKeys) + (map (key: [ key.path "${key.path}.pub" ]) config.services.openssh.hostKeys) ]; services.restic.backups.backblaze = { diff --git a/modules/nixos/services/nginx/default.nix b/modules/nixos/services/nginx/default.nix index ff530b0a..153a299f 100644 --- a/modules/nixos/services/nginx/default.nix +++ b/modules/nixos/services/nginx/default.nix @@ -188,14 +188,14 @@ in ++ (lib.flip lib.mapAttrsToList cfg.virtualHosts (_: { subdomain, ... } @ args: let conflicts = [ "port" "root" "socket" "redirect" ]; - optionsNotNull = builtins.map (v: args.${v} != null) conflicts; + optionsNotNull = map (v: args.${v} != null) conflicts; optionsSet = lib.filter lib.id optionsNotNull; in { assertion = builtins.length optionsSet == 1; message = '' Subdomain '${subdomain}' must have exactly one of ${ - lib.concatStringsSep ", " (builtins.map (v: "'${v}'") conflicts) + lib.concatStringsSep ", " (map (v: "'${v}'") conflicts) } configured. ''; })) @@ -208,7 +208,7 @@ in assertion = args.websocketsLocations != [ ] -> proxyPassUsed; message = '' Subdomain '${subdomain}' can only use 'websocketsLocations' with one of ${ - lib.concatStringsSep ", " (builtins.map (v: "'${v}'") proxyPass) + lib.concatStringsSep ", " (map (v: "'${v}'") proxyPass) }. ''; })) diff --git a/overlays/default.nix b/overlays/default.nix index 683e021b..d3e30aa8 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,6 +1,6 @@ # Automatically import all overlays in the directory let files = builtins.readDir ./.; - overlays = builtins.removeAttrs files [ "default.nix" ]; + overlays = removeAttrs files [ "default.nix" ]; in builtins.mapAttrs (name: _: import "${./.}/${name}") overlays From 31e03ffdcbcea060f69c36e1fdb14d1d7ccb8598 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 12 Jan 2026 14:55:47 +0000 Subject: [PATCH 33/53] nixos: services: servarr: remove redundant 'lib' My personal style preference (currently) is to use `with lib` on option declarations, avoiding the `lib` prefix. --- modules/nixos/services/servarr/bazarr.nix | 2 +- modules/nixos/services/servarr/jackett.nix | 2 +- modules/nixos/services/servarr/nzbhydra.nix | 2 +- modules/nixos/services/servarr/prowlarr.nix | 2 +- modules/nixos/services/servarr/starr.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/nixos/services/servarr/bazarr.nix b/modules/nixos/services/servarr/bazarr.nix index 637da0c7..67d34169 100644 --- a/modules/nixos/services/servarr/bazarr.nix +++ b/modules/nixos/services/servarr/bazarr.nix @@ -4,7 +4,7 @@ let in { options.my.services.servarr.bazarr = with lib; { - enable = lib.mkEnableOption "Bazarr" // { + enable = mkEnableOption "Bazarr" // { default = config.my.services.servarr.enableAll; }; diff --git a/modules/nixos/services/servarr/jackett.nix b/modules/nixos/services/servarr/jackett.nix index 481cd3de..8e8a5c3e 100644 --- a/modules/nixos/services/servarr/jackett.nix +++ b/modules/nixos/services/servarr/jackett.nix @@ -4,7 +4,7 @@ let in { options.my.services.servarr.jackett = with lib; { - enable = lib.mkEnableOption "Jackett" // { + enable = mkEnableOption "Jackett" // { default = config.my.services.servarr.enableAll; }; diff --git a/modules/nixos/services/servarr/nzbhydra.nix b/modules/nixos/services/servarr/nzbhydra.nix index 7b639869..f2f82ac2 100644 --- a/modules/nixos/services/servarr/nzbhydra.nix +++ b/modules/nixos/services/servarr/nzbhydra.nix @@ -4,7 +4,7 @@ let in { options.my.services.servarr.nzbhydra = with lib; { - enable = lib.mkEnableOption "NZBHydra2" // { + enable = mkEnableOption "NZBHydra2" // { default = config.my.services.servarr.enableAll; }; }; diff --git a/modules/nixos/services/servarr/prowlarr.nix b/modules/nixos/services/servarr/prowlarr.nix index ce044c63..6825843c 100644 --- a/modules/nixos/services/servarr/prowlarr.nix +++ b/modules/nixos/services/servarr/prowlarr.nix @@ -5,7 +5,7 @@ let in { options.my.services.servarr.prowlarr = with lib; { - enable = lib.mkEnableOption "Prowlarr" // { + enable = mkEnableOption "Prowlarr" // { default = config.my.services.servarr.enableAll; }; diff --git a/modules/nixos/services/servarr/starr.nix b/modules/nixos/services/servarr/starr.nix index 2bf7c114..0ccdaa42 100644 --- a/modules/nixos/services/servarr/starr.nix +++ b/modules/nixos/services/servarr/starr.nix @@ -12,7 +12,7 @@ let in { options.my.services.servarr.${starr} = with lib; { - enable = lib.mkEnableOption (lib.toSentenceCase starr) // { + enable = mkEnableOption (lib.toSentenceCase starr) // { default = config.my.services.servarr.enableAll; }; From fb2b20bd842d8bc98fc3070d5674f10c1f22a5d9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 26 Jan 2026 17:55:52 +0000 Subject: [PATCH 34/53] flake: checks: enable 'nixf-diagnose' --- flake/checks.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flake/checks.nix b/flake/checks.nix index 73e64d52..01d3c7a5 100644 --- a/flake/checks.nix +++ b/flake/checks.nix @@ -15,6 +15,10 @@ enable = true; }; + nixf-diagnose = { + enable = true; + }; + nixpkgs-fmt = { enable = true; }; From 8082de90c3c4c09dd4a0f3efa8e9f32ad3c1024e Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 12:06:05 +0000 Subject: [PATCH 35/53] home: vim: prefix augroup with 'ambroisie.*' --- modules/home/vim/plugin/numbertoggle.lua | 2 +- modules/home/vim/plugin/settings/tree-sitter.lua | 2 +- modules/home/vim/plugin/signtoggle.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/home/vim/plugin/numbertoggle.lua b/modules/home/vim/plugin/numbertoggle.lua index b1e3df21..2299a629 100644 --- a/modules/home/vim/plugin/numbertoggle.lua +++ b/modules/home/vim/plugin/numbertoggle.lua @@ -1,7 +1,7 @@ -- Show lines numbers vim.opt.number = true -local numbertoggle = vim.api.nvim_create_augroup("numbertoggle", { clear = true }) +local numbertoggle = vim.api.nvim_create_augroup("ambroisie.numbertoggle", { clear = true }) -- Toggle numbers between relative and absolute when changing buffers vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "InsertLeave", "WinEnter" }, { diff --git a/modules/home/vim/plugin/settings/tree-sitter.lua b/modules/home/vim/plugin/settings/tree-sitter.lua index 2958c2a9..b533452b 100644 --- a/modules/home/vim/plugin/settings/tree-sitter.lua +++ b/modules/home/vim/plugin/settings/tree-sitter.lua @@ -83,7 +83,7 @@ end vim.api.nvim_create_autocmd("FileType", { pattern = "*", - group = vim.api.nvim_create_augroup("treesitter_attach", { clear = true }), + group = vim.api.nvim_create_augroup("ambroisie.treesitter_attach", { clear = true }), callback = function(args) local buf, filetype = args.buf, args.match local language = vim.treesitter.language.get_lang(filetype) diff --git a/modules/home/vim/plugin/signtoggle.lua b/modules/home/vim/plugin/signtoggle.lua index 3deca340..66e0ab4c 100644 --- a/modules/home/vim/plugin/signtoggle.lua +++ b/modules/home/vim/plugin/signtoggle.lua @@ -1,4 +1,4 @@ -local signtoggle = vim.api.nvim_create_augroup("signtoggle", { clear = true }) +local signtoggle = vim.api.nvim_create_augroup("ambroisie.signtoggle", { clear = true }) -- Only show sign column for the currently focused buffer, if it has a number column vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained", "WinEnter" }, { From c8a06b30d014735e0c487332bca5afd9c328801a Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 19 Feb 2026 12:32:14 +0000 Subject: [PATCH 36/53] home: vim: fix unimpaired mapping descriptions --- modules/home/vim/after/plugin/mappings/unimpaired.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/vim/after/plugin/mappings/unimpaired.lua b/modules/home/vim/after/plugin/mappings/unimpaired.lua index 765b6b11..f83a3a34 100644 --- a/modules/home/vim/after/plugin/mappings/unimpaired.lua +++ b/modules/home/vim/after/plugin/mappings/unimpaired.lua @@ -82,7 +82,7 @@ local keys = { -- Disable option { "]o", group = "Disable option" }, - { "]ob", desc = "Light background" }, + { "]ob", desc = "Dark background" }, { "]oc", desc = "Cursor line" }, { "]od", desc = "Diff" }, { "]of", "FormatDisable", desc = "LSP Formatting" }, @@ -101,7 +101,7 @@ local keys = { -- Toggle option { "yo", group = "Toggle option" }, - { "yob", desc = "Light background" }, + { "yob", desc = "Toggle background" }, { "yoc", desc = "Cursor line" }, { "yod", desc = "Diff" }, { "yof", "FormatToggle", desc = "LSP Formatting" }, From 0f5d2601c6915b18edc3a2fa040b5bee803aefe4 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 10 Feb 2026 15:39:16 +0000 Subject: [PATCH 37/53] home: vim: clarify how to disable 'ignorecase' Because I tend to forget the exact way to do it, let's document it so I have an easy place to check next time. --- modules/home/vim/init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/vim/init.vim b/modules/home/vim/init.vim index 11429250..f3b50227 100644 --- a/modules/home/vim/init.vim +++ b/modules/home/vim/init.vim @@ -112,7 +112,7 @@ colorscheme gruvbox """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Enable search high-lighting while the search is on-going set hlsearch -" Ignore case on search +" Ignore case on search unless \C is in search terms set ignorecase " Ignore case unless there is an uppercase letter in the pattern set smartcase From 52037a816556df0b66b4470ee21de96fa7e7de69 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 19 Jan 2026 12:10:17 +0000 Subject: [PATCH 38/53] home: calibre: use upstream module --- modules/home/calibre/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/home/calibre/default.nix b/modules/home/calibre/default.nix index fcd62f86..e3733b10 100644 --- a/modules/home/calibre/default.nix +++ b/modules/home/calibre/default.nix @@ -10,8 +10,10 @@ in }; config = lib.mkIf cfg.enable { - home.packages = [ - cfg.package - ]; + programs.calibre = { + enable = true; + + inherit (cfg) package; + }; }; } From 9701acce5b45ff00b0b17bd031717873a572010e Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Nov 2025 12:31:19 +0000 Subject: [PATCH 39/53] pkgs: diff-flake: add nix-darwin support --- pkgs/diff-flake/diff-flake | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkgs/diff-flake/diff-flake b/pkgs/diff-flake/diff-flake index a2a35131..7a46151a 100755 --- a/pkgs/diff-flake/diff-flake +++ b/pkgs/diff-flake/diff-flake @@ -24,6 +24,10 @@ current_system() { nix eval --raw --impure --expr 'builtins.currentSystem' } +add_darwin() { + FLAKE_OUTPUTS+=("darwinConfigurations.\"$1\".config.system.build.toplevel") +} + add_home() { FLAKE_OUTPUTS+=("homeConfigurations.\"$1\".activationPackage") } @@ -54,6 +58,10 @@ usage() { print_err " -p, --previous-rev" print_err " which git revision should be considered the 'previous' state," print_err " defaults to HEAD~" + print_err " --darwin [name]" + print_err " specify the name of a nix-darwin output configuration whose" + print_err " closure should be diffed, can be used multiple times" + print_err " if no host name is given, defaults to current hostname" print_err " --home [name]" print_err " specify the name of a home-manager output configuration whose" print_err " closure should be diffed, can be used multiple times" @@ -101,6 +109,14 @@ parse_args() { PREVIOUS_REV="$(git rev-parse "$1")" shift ;; + --darwin) + if [ $# -gt 0 ] && ! is_option "$1"; then + add_darwin "$1" + shift + else + add_darwin "$(hostname)" + fi + ;; --home) if [ $# -gt 0 ] && ! is_option "$1"; then add_home "$1" @@ -138,6 +154,12 @@ parse_args() { done } +list_darwin_configurations() { + nix eval '.#darwinConfigurations' \ + --apply 'attrs: with builtins; concatStringsSep "\n" (attrNames attrs)' \ + --raw +} + list_home_configurations() { nix eval '.#homeConfigurations' \ --apply 'attrs: with builtins; concatStringsSep "\n" (attrNames attrs)' \ @@ -175,6 +197,9 @@ diff_output() { parse_args "$@" if [ "${#FLAKE_OUTPUTS[@]}" -eq 0 ]; then + for darwin in $(list_darwin_configurations); do + add_darwin "$darwin" + done for home in $(list_home_configurations); do add_home "$home" done From dd6dfe17bcda19d2a9b96f5f57b41762b7a9822f Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Nov 2025 12:40:21 +0000 Subject: [PATCH 40/53] pkgs: diff-flake: add system-manager support --- pkgs/diff-flake/diff-flake | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkgs/diff-flake/diff-flake b/pkgs/diff-flake/diff-flake index 7a46151a..bacee6ed 100755 --- a/pkgs/diff-flake/diff-flake +++ b/pkgs/diff-flake/diff-flake @@ -41,6 +41,10 @@ add_shell() { FLAKE_OUTPUTS+=("devShells.\"$(current_system)\".\"$1\".inputDerivation") } +add_system() { + FLAKE_OUTPUTS+=("systemConfigs.\"$1\".config.system.build.toplevel") +} + usage() { print_err "Usage: $0 [option]... [-- [nix build option]...]" print_err "" @@ -74,6 +78,10 @@ usage() { print_err " specify a specific devShell configuration name whose closure" print_err " should be diffed, can be used multiple times" print_err " if no name is given, defaults to 'default'" + print_err " --system [name]" + print_err " specify the name of a system-manager output configuration whose" + print_err " closure should be diffed, can be used multiple times" + print_err " if no host name is given, defaults to current hostname" print_err "" print_err "when no flake outputs are specified, automatically queries for" print_err "all NixOS configurations, and devShells for current system" @@ -141,6 +149,14 @@ parse_args() { add_shell "default" fi ;; + --system) + if [ $# -gt 0 ] && ! is_option "$1"; then + add_system "$1" + shift + else + add_system "$(hostname)" + fi + ;; --) NIX_BUILD_ARGS=("$@") break @@ -178,6 +194,12 @@ list_dev_shells() { --raw } +list_system_configurations() { + nix eval '.#systemConfigs' \ + --apply 'attrs: with builtins; concatStringsSep "\n" (attrNames attrs)' \ + --raw +} + diff_output() { local PREV NEW PREV="$(mktemp --dry-run)" @@ -209,6 +231,9 @@ if [ "${#FLAKE_OUTPUTS[@]}" -eq 0 ]; then for shell in $(list_dev_shells); do add_shell "$shell" done + for system in $(list_system_configurations); do + add_system "$system" + done fi for out in "${FLAKE_OUTPUTS[@]}"; do From 7325073577b1bd190d4f5a84e943dae7758b7815 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Nov 2025 12:42:03 +0000 Subject: [PATCH 41/53] pkgs: diff-flake: rename 'host' to 'nixos' To avoid mixing them up with Nix-Darwin and System Manager hosts. --- pkgs/diff-flake/diff-flake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/diff-flake/diff-flake b/pkgs/diff-flake/diff-flake index bacee6ed..f9290b91 100755 --- a/pkgs/diff-flake/diff-flake +++ b/pkgs/diff-flake/diff-flake @@ -32,7 +32,7 @@ add_home() { FLAKE_OUTPUTS+=("homeConfigurations.\"$1\".activationPackage") } -add_host() { +add_nixos() { FLAKE_OUTPUTS+=("nixosConfigurations.\"$1\".config.system.build.toplevel") } @@ -70,7 +70,7 @@ usage() { print_err " specify the name of a home-manager output configuration whose" print_err " closure should be diffed, can be used multiple times" print_err " if no configuration name is given, defaults to current username" - print_err " --host [name]" + print_err " --nixos [name]" print_err " specify the name of a NixOS output configuration whose" print_err " closure should be diffed, can be used multiple times" print_err " if no host name is given, defaults to current hostname" @@ -133,12 +133,12 @@ parse_args() { add_home "$USER" fi ;; - --host) + --nixos) if [ $# -gt 0 ] && ! is_option "$1"; then - add_host "$1" + add_nixos "$1" shift else - add_host "$(hostname)" + add_nixos "$(hostname)" fi ;; --shell) @@ -225,8 +225,8 @@ if [ "${#FLAKE_OUTPUTS[@]}" -eq 0 ]; then for home in $(list_home_configurations); do add_home "$home" done - for host in $(list_nixos_configurations); do - add_host "$host" + for nixos in $(list_nixos_configurations); do + add_nixos "$nixos" done for shell in $(list_dev_shells); do add_shell "$shell" From 99b9ace469a20aa9702adc8dc3b3f8a730fb45db Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Feb 2025 10:51:31 +0000 Subject: [PATCH 42/53] home: add jujutsu This is a very basic configuration, still missing most bells and whistles. --- modules/home/default.nix | 1 + modules/home/jujutsu/default.nix | 67 ++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 modules/home/jujutsu/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix index ad3b9791..eb3d0f29 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -24,6 +24,7 @@ ./gtk ./htop ./jq + ./jujutsu ./keyboard ./mail ./mpv diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix new file mode 100644 index 00000000..eaf56e9d --- /dev/null +++ b/modules/home/jujutsu/default.nix @@ -0,0 +1,67 @@ +{ config, pkgs, lib, ... }: +let + cfg = config.my.home.jujutsu; + + inherit (lib.my) mkMailAddress; +in +{ + options.my.home.jujutsu = with lib; { + enable = my.mkDisableOption "jujutsu configuration"; + + package = mkPackageOption pkgs "jujutsu" { }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + { + # For `jj git` commands + assertion = cfg.enable -> config.my.home.git.enable; + message = '' + `config.my.home.jujutsu` relies on `config.my.home.git` being enabled. + ''; + } + ]; + + programs.jujutsu = { + enable = true; + + inherit (cfg) package; + + settings = { + # Who am I? + user = { + name = "Bruno BELANYI"; + email = mkMailAddress "bruno" "belanyi.fr"; + }; + + aliases = { + jj = [ "util" "exec" "--" "jj" ]; + lol = [ "log" "-r" "..@" "-T" "builtin_log_oneline" ]; + lola = [ "lol" "-r" "all()" ]; + }; + + "--scope" = [ + # Multiple identities + { + "--when" = { + repositories = [ "~/git/EPITA/" ]; + }; + user = { + name = "Bruno BELANYI"; + email = mkMailAddress "bruno.belanyi" "epita.fr"; + }; + } + { + "--when" = { + repositories = [ "~/git/work/" ]; + }; + user = { + name = "Bruno BELANYI"; + email = mkMailAddress "ambroisie" "google.com"; + }; + } + ]; + }; + }; + }; +} From 8b354d306b1781b541cdfae86519d66c23d27e92 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Feb 2025 10:51:31 +0000 Subject: [PATCH 43/53] home: delta: add 'jujutsu.enable' --- modules/home/delta/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/home/delta/default.nix b/modules/home/delta/default.nix index e76edc60..f6526321 100644 --- a/modules/home/delta/default.nix +++ b/modules/home/delta/default.nix @@ -11,6 +11,10 @@ in git = { enable = my.mkDisableOption "git integration"; }; + + jujutsu = { + enable = my.mkDisableOption "jujutsu integration"; + }; }; config = lib.mkIf cfg.enable { @@ -20,6 +24,9 @@ in inherit (cfg) package; enableGitIntegration = cfg.git.enable; + # `jj log -p` does not use `delta` + # https://github.com/jj-vcs/jj/issues/4142 + enableJujutsuIntegration = cfg.jujutsu.enable; options = { features = "diff-highlight decorations"; From a54719d3bfce14ad4bbd8352790d7aa88e1c5357 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 Dec 2025 13:55:01 +0000 Subject: [PATCH 44/53] home: jujutsu: set 'ui.diff-formatter' I *still* don't really like the built-in formatting, but it's more about its highlighting than its syntax. Given that I default to using `delta` anyways, it doesn't _really_ matter as I don't see the default output. --- modules/home/jujutsu/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index eaf56e9d..fd8f84c1 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -40,6 +40,11 @@ in lola = [ "lol" "-r" "all()" ]; }; + ui = { + # I don't like word-diff + diff-formatter = ":git"; + }; + "--scope" = [ # Multiple identities { From 3c85243cf08e6154c7179351174f735b1b62217b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 Dec 2025 12:48:58 +0000 Subject: [PATCH 45/53] home: jujutsu: set 'ui.pager' The v0.36 release stopped honoring `$PAGER`. So enforce it in the configuration (as I don't like their default pager settings). Ideally this would be `mkIf`ed behind `my.home.pager.enable`, however it looks like this does not work with the TOML type (does not seem to do any `mkMerge`-ish logic). --- modules/home/jujutsu/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index fd8f84c1..8d4141c8 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -43,6 +43,8 @@ in ui = { # I don't like word-diff diff-formatter = ":git"; + # Does not honor `$PAGER` (anymore) + pager = lib.mkDefault config.home.sessionVariables.PAGER; }; "--scope" = [ From 2f91e631642ffff0042ede3d5c4bbf0782a2c49d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Mar 2025 12:43:12 +0000 Subject: [PATCH 46/53] home: jj: use verbose draft commit messages --- modules/home/jujutsu/default.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 8d4141c8..206cc2b9 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -47,6 +47,28 @@ in pager = lib.mkDefault config.home.sessionVariables.PAGER; }; + templates = { + # Equivalent to `commit.verbose = true` in Git + draft_commit_description = "commit_description_verbose(self)"; + }; + + template-aliases = { + "commit_description_verbose(commit)" = '' + concat( + commit_description(commit), + "JJ: ignore-rest\n", + diff.git(), + ) + ''; + "commit_description(commit)" = '' + concat( + commit.description(), "\n", + "JJ: This commit contains the following changes:\n", + indent("JJ: ", diff.stat(72)), + ) + ''; + }; + "--scope" = [ # Multiple identities { From 77cc2db47106af999b296ec97fe2237bf75d89a2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 18 Mar 2025 14:59:23 +0000 Subject: [PATCH 47/53] home: jujutsu: explicitly create 'conf.d' This is to serve as a reminder of _how_ to add a local configuration file. --- modules/home/jujutsu/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 206cc2b9..4112dc09 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -92,5 +92,10 @@ in ]; }; }; + + # To drop in a `local.toml` configuration, not-versioned + xdg.configFile = { + "jj/conf.d/.keep".text = ""; + }; }; } From f5488e3c5651c43ec025d648b2ede81b6b8af9fe Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Jul 2025 10:49:29 +0000 Subject: [PATCH 48/53] home: jujutsu: simplify 'jj jj' alias --- modules/home/jujutsu/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 4112dc09..2eec27ea 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -35,7 +35,7 @@ in }; aliases = { - jj = [ "util" "exec" "--" "jj" ]; + jj = [ ]; lol = [ "log" "-r" "..@" "-T" "builtin_log_oneline" ]; lola = [ "lol" "-r" "all()" ]; }; From 89d73b6e82450909c82e6a69e9e09d17f058d5e7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Aug 2025 11:32:57 +0000 Subject: [PATCH 49/53] homes: bazin: use system jujutsu They have a custom `jj` with Piper CitC integration. --- hosts/homes/ambroisie@bazin/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/homes/ambroisie@bazin/default.nix b/hosts/homes/ambroisie@bazin/default.nix index 365b70df..9ef26427 100644 --- a/hosts/homes/ambroisie@bazin/default.nix +++ b/hosts/homes/ambroisie@bazin/default.nix @@ -22,6 +22,10 @@ package = pkgs.emptyDirectory; }; + jujutsu = { + package = pkgs.emptyDirectory; + }; + tmux = { # I use scripts that use the passthrough sequence often on this host enablePassthrough = true; From ea838ecc7d79fe3223fe9732088c20d94d43d021 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Aug 2025 11:32:57 +0000 Subject: [PATCH 50/53] homes: mousqueton: use system jujutsu They have a custom `jj` with Piper CitC integration. --- hosts/homes/ambroisie@mousqueton/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/homes/ambroisie@mousqueton/default.nix b/hosts/homes/ambroisie@mousqueton/default.nix index 13836189..1ffee2b0 100644 --- a/hosts/homes/ambroisie@mousqueton/default.nix +++ b/hosts/homes/ambroisie@mousqueton/default.nix @@ -25,6 +25,10 @@ package = pkgs.emptyDirectory; }; + jujutsu = { + package = pkgs.emptyDirectory; + }; + tmux = { # I use scripts that use the passthrough sequence often on this host enablePassthrough = true; From 66c5cc1ca69481633ed294dc52a24d827ca935fd Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 27 Oct 2025 12:34:07 +0000 Subject: [PATCH 51/53] home: jujutsu: set 'ui.diff-editor' Otherwise it keeps nagging me with a hint to set it. I'm not a big fan of this UI, I wish I add something closer to Git's patch interface. --- modules/home/jujutsu/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 2eec27ea..d24b5ca9 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -41,6 +41,8 @@ in }; ui = { + # Stop nagging me about it, though I am not a fan of its UI. + diff-editor = ":builtin"; # I don't like word-diff diff-formatter = ":git"; # Does not honor `$PAGER` (anymore) From 4a9ff9e60b0fe915156be9dd0094a49886722030 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Nov 2025 11:13:10 +0000 Subject: [PATCH 52/53] home: jujutsu: set 'ui.merge-editor' Same reason as `ui.diff-editor`. --- modules/home/jujutsu/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index d24b5ca9..1472e3ba 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -45,6 +45,8 @@ in diff-editor = ":builtin"; # I don't like word-diff diff-formatter = ":git"; + # Stop nagging me about it, though I am not a fan of its UI. + merge-editor = ":builtin"; # Does not honor `$PAGER` (anymore) pager = lib.mkDefault config.home.sessionVariables.PAGER; }; From 7600976fbcb3d470caef7fe0bbbd3a59aa76c300 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Feb 2025 10:51:31 +0000 Subject: [PATCH 53/53] WIP: ADD NOTE FOR FUTURE SELF --- modules/home/jujutsu/default.nix | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 1472e3ba..3072af42 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -36,8 +36,16 @@ in aliases = { jj = [ ]; + # FIXME: + # * still not a big fan of the template lol = [ "log" "-r" "..@" "-T" "builtin_log_oneline" ]; lola = [ "lol" "-r" "all()" ]; + # FIXME: equivalent to `git switch -` + # See https://github.com/jj-vcs/jj/issues/2871 + # Might be broken recently https://discord.com/channels/968932220549103686/1380272574709366989/1380432041983606855 + # TODO: + # * `pick` (https://github.com/jj-vcs/jj/issues/5446): [ "util" "exec" "--" "bash" "-c" "jj log -p -r \"diff_contains($1)\"" "" ] + # * `root`: `jj workspace root` (barely necessary then) }; ui = { @@ -51,6 +59,31 @@ in pager = lib.mkDefault config.home.sessionVariables.PAGER; }; + # FIXME: git equivalents + # I'd like a better formatted blame (more like delta's?) + # blame = { + # coloring = "repeatedLines"; + # markIgnoredLines = true; + # markUnblamables = true; + # }; + # FIXME: log colors should probably match git + # FIXME: patience diff? + # FIXME: fetch prune/pruneTags? + # FIXME: pull.rebase=true? Probably true TBH + # FIXME: push.default=simple? Probably true TBH + # FIXME: conflict style? ui.conflict-marker-style=git is diff3, not zdiff3. Default looks fine-ish + + # FIXME: from ma_9's config, plus my own stuff + # snapshot = { + # auto-track = "none()"; + # }; + # + # ui = { + # movement = { + # edit = false; + # }; + # }; + templates = { # Equivalent to `commit.verbose = true` in Git draft_commit_description = "commit_description_verbose(self)"; @@ -64,6 +97,9 @@ in diff.git(), ) ''; + # FIXME: use `diff.summary()` instead? Supported by syntax highlighting + # See https://github.com/jj-vcs/jj/issues/1946#issuecomment-2572986485 + # FIXME: tree-sitter grammar isn't in `nvim-treesitter` (https://github.com/kareigu/tree-sitter-jjdescription) "commit_description(commit)" = '' concat( commit.description(), "\n",