From 1a109b6b1f48919cc07a2a3c853858e5900eede4 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 26 Aug 2025 11:39:23 +0000 Subject: [PATCH 01/14] flake: bump inputs And fix a renamed package. --- flake.lock | 18 +++++++++--------- modules/nixos/profiles/x/default.nix | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index f4d5f57..ca1b422 100644 --- a/flake.lock +++ b/flake.lock @@ -117,11 +117,11 @@ ] }, "locked": { - "lastModified": 1755446520, - "narHash": "sha256-I0Ok1OGDwc1jPd8cs2VvAYZsHriUVFGIUqW+7uSsOUM=", + "lastModified": 1755960406, + "narHash": "sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "4b04db83821b819bbbe32ed0a025b31e7971f22e", + "rev": "e891a93b193fcaf2fc8012d890dc7f0befe86ec2", "type": "github" }, "original": { @@ -159,11 +159,11 @@ ] }, "locked": { - "lastModified": 1755491080, - "narHash": "sha256-ib1Xi13NEalrFqQAHceRsb+6aIPANFuQq80SS/bY10M=", + "lastModified": 1756022458, + "narHash": "sha256-J1i35r4HfNDdPpwL0vOBaZopQudAUVtartEerc1Jryc=", "owner": "nix-community", "repo": "home-manager", - "rev": "f8af2cbe386f9b96dd9efa57ab15a09377f38f4d", + "rev": "9e3a33c0bcbc25619e540b9dfea372282f8a9740", "type": "github" }, "original": { @@ -175,11 +175,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1755186698, - "narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=", + "lastModified": 1756125398, + "narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c", + "rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5", "type": "github" }, "original": { diff --git a/modules/nixos/profiles/x/default.nix b/modules/nixos/profiles/x/default.nix index ea77939..874f36f 100644 --- a/modules/nixos/profiles/x/default.nix +++ b/modules/nixos/profiles/x/default.nix @@ -13,7 +13,7 @@ in # Nice wallpaper services.xserver.displayManager.lightdm.background = let - wallpapers = "${pkgs.plasma5Packages.plasma-workspace-wallpapers}/share/wallpapers"; + wallpapers = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers"; in "${wallpapers}/summer_1am/contents/images/2560x1600.jpg"; From a889dfbb1a9ce76410e6655ba82616a4c20a3e71 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 26 Aug 2025 11:40:40 +0000 Subject: [PATCH 02/14] home: nix: fix renamed option --- modules/home/nix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/nix/default.nix b/modules/home/nix/default.nix index c67cc6a..2f435a8 100644 --- a/modules/home/nix/default.nix +++ b/modules/home/nix/default.nix @@ -69,7 +69,7 @@ in automatic = true; # Every week, with some wiggle room - frequency = "weekly"; + dates = "weekly"; randomizedDelaySec = "10min"; # Use a persistent timer for e.g: laptops From 31147abd9176c9b8afbfa4924df0f589f041b3fc Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 26 Aug 2025 13:07:41 +0000 Subject: [PATCH 03/14] home: add trgui --- modules/home/default.nix | 1 + modules/home/trgui/default.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 modules/home/trgui/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix index 1c40377..ad3b979 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -38,6 +38,7 @@ ./ssh ./terminal ./tmux + ./trgui ./udiskie ./vim ./wget diff --git a/modules/home/trgui/default.nix b/modules/home/trgui/default.nix new file mode 100644 index 0000000..ee545a9 --- /dev/null +++ b/modules/home/trgui/default.nix @@ -0,0 +1,17 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.my.home.trgui; +in +{ + options.my.home.trgui = with lib; { + enable = mkEnableOption "Transmission GUI onfiguration"; + + package = mkPackageOption pkgs "TrguiNG" { default = "trgui-ng"; }; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + cfg.package + ]; + }; +} From 1800cb9daa62bf87d55b98baf84a0d2d9a70129c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 26 Aug 2025 13:08:58 +0000 Subject: [PATCH 04/14] hosts: nixos: aramis: use 'trgui' module --- hosts/nixos/aramis/home.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hosts/nixos/aramis/home.nix b/hosts/nixos/aramis/home.nix index 221b1ea..7578582 100644 --- a/hosts/nixos/aramis/home.nix +++ b/hosts/nixos/aramis/home.nix @@ -20,7 +20,6 @@ element-desktop # Matrix client jellyfin-media-player # Wraps the webui and mpv together pavucontrol # Audio mixer GUI - trgui-ng # Transmission remote ]; # Minimal video player mpv.enable = true; @@ -28,6 +27,8 @@ nm-applet.enable = true; # Terminal terminal.program = "alacritty"; + # Transmission remote + trgui.enable = true; # Zathura document viewer zathura.enable = true; }; From 3fa1664b5c574632c67848e44c167c77cf638ccb Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 21 Feb 2025 16:47:11 +0000 Subject: [PATCH 05/14] home: delta: use stand-alone configuration file Ideally, I'd like for `delta` to just read a configuration file at `$XDG_CONFIG_HOME/delta/config` by default, but upstream seems somewhat reticent to the idea :-/. So instead, let's keep relying on `git` being enabled, but rather than inlining the configuration, let's store it where I think it should belong and include it into `gitconfig`. --- modules/home/delta/default.nix | 59 ++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/modules/home/delta/default.nix b/modules/home/delta/default.nix index 58ee031..16d3d59 100644 --- a/modules/home/delta/default.nix +++ b/modules/home/delta/default.nix @@ -1,6 +1,9 @@ { config, pkgs, lib, ... }: let cfg = config.my.home.delta; + + configFormat = pkgs.formats.gitIni { }; + configPath = "${config.xdg.configHome}/delta/config"; in { options.my.home.delta = with lib; { @@ -34,35 +37,43 @@ in home.packages = [ cfg.package ]; + xdg.configFile."delta/config".source = configFormat.generate "delta-config" { + delta = { + features = "diff-highlight decorations"; + + # Less jarring style for `diff-highlight` emulation + diff-highlight = { + minus-style = "red"; + minus-non-emph-style = "red"; + minus-emph-style = "bold red 52"; + + plus-style = "green"; + plus-non-emph-style = "green"; + plus-emph-style = "bold green 22"; + + whitespace-error-style = "reverse red"; + }; + + # Personal preference for easier reading + decorations = { + commit-style = "raw"; # Do not recolor meta information + keep-plus-minus-markers = true; + paging = "always"; + }; + }; + }; + programs.git = lib.mkIf cfg.git.enable { delta = { enable = true; inherit (cfg) package; - - options = { - features = "diff-highlight decorations"; - - # Less jarring style for `diff-highlight` emulation - diff-highlight = { - minus-style = "red"; - minus-non-emph-style = "red"; - minus-emph-style = "bold red 52"; - - plus-style = "green"; - plus-non-emph-style = "green"; - plus-emph-style = "bold green 22"; - - whitespace-error-style = "reverse red"; - }; - - # Personal preference for easier reading - decorations = { - commit-style = "raw"; # Do not recolor meta information - keep-plus-minus-markers = true; - paging = "always"; - }; - }; }; + + includes = [ + { + path = configPath; + } + ]; }; }; } From 3dd4f07609a8d8c9f15530745aa68ba458b943f3 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 Sep 2025 11:35:39 +0000 Subject: [PATCH 06/14] hosts: nixos: aramis: home: drop 'jellyfin-media-player' It's about to be made broken due to using QtWebEngine 5, which is EOL and marked insecure in new nixpkgs. --- hosts/nixos/aramis/home.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/hosts/nixos/aramis/home.nix b/hosts/nixos/aramis/home.nix index 7578582..e8c99e4 100644 --- a/hosts/nixos/aramis/home.nix +++ b/hosts/nixos/aramis/home.nix @@ -18,7 +18,6 @@ # Machine specific packages packages.additionalPackages = with pkgs; [ element-desktop # Matrix client - jellyfin-media-player # Wraps the webui and mpv together pavucontrol # Audio mixer GUI ]; # Minimal video player From b9bc37d365c607bdda473c9f2a0a992f0e8f6cc0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 Sep 2025 11:14:25 +0000 Subject: [PATCH 07/14] flake: bump inputs --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index ca1b422..e86674e 100644 --- a/flake.lock +++ b/flake.lock @@ -73,11 +73,11 @@ ] }, "locked": { - "lastModified": 1754487366, - "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", + "rev": "4524271976b625a4a605beefd893f270620fd751", "type": "github" }, "original": { @@ -159,11 +159,11 @@ ] }, "locked": { - "lastModified": 1756022458, - "narHash": "sha256-J1i35r4HfNDdPpwL0vOBaZopQudAUVtartEerc1Jryc=", + "lastModified": 1756954499, + "narHash": "sha256-Pg4xBHzvzNY8l9x/rLWoJMnIR8ebG+xeU+IyqThIkqU=", "owner": "nix-community", "repo": "home-manager", - "rev": "9e3a33c0bcbc25619e540b9dfea372282f8a9740", + "rev": "ed1a98c375450dfccf427adacd2bfd1a7b22eb25", "type": "github" }, "original": { @@ -175,11 +175,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1756125398, - "narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=", + "lastModified": 1756936398, + "narHash": "sha256-/o1TTpMIICpjrMHBilL9lYm/r69uhdK1L8j1pfY6tWU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5", + "rev": "47f28ad9378956563df9a884fd1b209b64336ba3", "type": "github" }, "original": { From e6c95245b27e5ac6fbac237d222c56a39ba401f9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 4 Sep 2025 11:17:27 +0000 Subject: [PATCH 08/14] home: ssh: disable default config It's been deprecated. This also makes my `addKeysToAgent` configuration more explicit. --- modules/home/ssh/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/home/ssh/default.nix b/modules/home/ssh/default.nix index 748b195..b0b4167 100644 --- a/modules/home/ssh/default.nix +++ b/modules/home/ssh/default.nix @@ -17,6 +17,7 @@ in { programs.ssh = { enable = true; + enableDefaultConfig = false; includes = [ # Local configuration, not-versioned @@ -53,11 +54,12 @@ in identityFile = "~/.ssh/shared_rsa"; user = "ambroisie"; }; - }; - extraConfig = '' - AddKeysToAgent yes - ''; + # `*` is automatically made the last match block by the module + "*" = { + addKeysToAgent = "yes"; + }; + }; }; } From 4fd534af481200953331a74309f10afabd495de7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 26 Feb 2025 10:51:31 +0000 Subject: [PATCH 09/14] WIP: add jujutsu (w/ Delta) --- modules/home/default.nix | 1 + modules/home/delta/default.nix | 22 ++++++++ modules/home/jujutsu/default.nix | 90 ++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 modules/home/jujutsu/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix index ad3b979..eb3d0f2 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/delta/default.nix b/modules/home/delta/default.nix index 16d3d59..23b09be 100644 --- a/modules/home/delta/default.nix +++ b/modules/home/delta/default.nix @@ -14,6 +14,10 @@ in git = { enable = my.mkDisableOption "git integration"; }; + + jujutsu = { + enable = my.mkDisableOption "jujutsu integration"; + }; }; config = lib.mkIf cfg.enable { @@ -75,5 +79,23 @@ in } ]; }; + + programs.jujutsu = lib.mkIf cfg.jujutsu.enable { + settings = { + merge-tools = { + delta = { + # Errors are signaled with exit codes greater or equal to 2 + diff-expected-exit-codes = [ 0 1 ]; + }; + }; + + ui = { + # Delta expects a `git diff` input + diff-formatter = ":git"; + + pager = [ (lib.getExe cfg.package) "--config=${configPath}" ]; + }; + }; + }; }; } diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix new file mode 100644 index 0000000..8a4cac3 --- /dev/null +++ b/modules/home/jujutsu/default.nix @@ -0,0 +1,90 @@ +{ 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" ]; + # 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) + }; + + # FIXME: `extraConfig` equivalents... + + # FIXME: from ma_9's config, plus my own stuff + # snapshot = { + # auto-track = "none()"; + # }; + # + # ui = { + # diff-editor = ":builtin"; # To silence hints + # movement = { + # edit = false; + # }; + # }; + + + "--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 8bad4a2b4b4f2267d5363169c3b6c5f40f8f29bc Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Mar 2025 12:43:12 +0000 Subject: [PATCH 10/14] home: jj: use verbose draft commit messages --- modules/home/jujutsu/default.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index 8a4cac3..e418111 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -62,6 +62,27 @@ in # }; # }; + 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 c87ebff318e5905521eb9ecfb2fbac1fd09f3af8 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 17 Mar 2025 15:31:45 +0000 Subject: [PATCH 11/14] WIP: ADD NOTE FOR FUTURE SELF --- modules/home/jujutsu/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/home/jujutsu/default.nix b/modules/home/jujutsu/default.nix index e418111..b860618 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -48,7 +48,18 @@ in # * `root`: `jj workspace root` (barely necessary then) }; - # FIXME: `extraConfig` equivalents... + # FIXME: git equivalents + # 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 = { @@ -75,6 +86,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 95be323f6871ad804e10d835aeb9574b362a9907 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 18 Mar 2025 14:59:23 +0000 Subject: [PATCH 12/14] 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 b860618..79fa314 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -121,5 +121,10 @@ in ]; }; }; + + # To drop in a `local.toml` configuration, not-versioned + xdg.configFile = { + "jj/conf.d/.keep".text = ""; + }; }; } From e0c82d49d47971ad0f9a2e8ceb2863c0bbb75bd7 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 11 Jul 2025 10:49:29 +0000 Subject: [PATCH 13/14] 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 79fa314..deed94f 100644 --- a/modules/home/jujutsu/default.nix +++ b/modules/home/jujutsu/default.nix @@ -35,7 +35,7 @@ in }; aliases = { - jj = [ "util" "exec" "--" "jj" ]; + jj = [ ]; # FIXME: # * still not a big fan of the template lol = [ "log" "-r" "..@" "-T" "builtin_log_oneline" ]; From 6afbe21032bdccd0eb2ef3afddb9ac2f918fdc92 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 22 Aug 2025 11:32:57 +0000 Subject: [PATCH 14/14] WIP: use system jujutsu for work --- hosts/homes/ambroisie@bazin/default.nix | 4 ++++ hosts/homes/ambroisie@mousqueton/default.nix | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/hosts/homes/ambroisie@bazin/default.nix b/hosts/homes/ambroisie@bazin/default.nix index 365b70d..9ef2642 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; diff --git a/hosts/homes/ambroisie@mousqueton/default.nix b/hosts/homes/ambroisie@mousqueton/default.nix index 1383618..1ffee2b 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;