Compare commits

...

4 commits

Author SHA1 Message Date
b49b318595 flake: bump inputs
Some checks failed
ci/woodpecker/push/check Pipeline failed
2025-09-02 14:38:08 +00:00
cb45ece777 home: delta: use stand-alone configuration file
Some checks failed
ci/woodpecker/push/check Pipeline failed
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`.
2025-08-26 13:09:18 +00:00
f7a6ab0a63 hosts: nixos: aramis: use 'trgui' module 2025-08-26 13:09:18 +00:00
a9de1797c4 home: add trgui 2025-08-26 13:09:18 +00:00
5 changed files with 64 additions and 34 deletions

18
flake.lock generated
View file

@ -73,11 +73,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1754487366, "lastModified": 1756770412,
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", "rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -159,11 +159,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1756022458, "lastModified": 1756788591,
"narHash": "sha256-J1i35r4HfNDdPpwL0vOBaZopQudAUVtartEerc1Jryc=", "narHash": "sha256-LOrOfPWpJU/ADWDyVwPv9XNuYPq5KJtmAmSzplpccmE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9e3a33c0bcbc25619e540b9dfea372282f8a9740", "rev": "f3d3b4592a73fb64b5423234c01985ea73976596",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -175,11 +175,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1756125398, "lastModified": 1756718921,
"narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=", "narHash": "sha256-Tj/ySxdHJPTSYZEPl0p5A+S2wH/e9X8Ss9zqA3noQMg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5", "rev": "96f31a553de753f2fc05259b434d9316e6f4f4d6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -20,7 +20,6 @@
element-desktop # Matrix client element-desktop # Matrix client
jellyfin-media-player # Wraps the webui and mpv together jellyfin-media-player # Wraps the webui and mpv together
pavucontrol # Audio mixer GUI pavucontrol # Audio mixer GUI
trgui-ng # Transmission remote
]; ];
# Minimal video player # Minimal video player
mpv.enable = true; mpv.enable = true;
@ -28,6 +27,8 @@
nm-applet.enable = true; nm-applet.enable = true;
# Terminal # Terminal
terminal.program = "alacritty"; terminal.program = "alacritty";
# Transmission remote
trgui.enable = true;
# Zathura document viewer # Zathura document viewer
zathura.enable = true; zathura.enable = true;
}; };

View file

@ -38,6 +38,7 @@
./ssh ./ssh
./terminal ./terminal
./tmux ./tmux
./trgui
./udiskie ./udiskie
./vim ./vim
./wget ./wget

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
cfg = config.my.home.delta; cfg = config.my.home.delta;
configFormat = pkgs.formats.gitIni { };
configPath = "${config.xdg.configHome}/delta/config";
in in
{ {
options.my.home.delta = with lib; { options.my.home.delta = with lib; {
@ -34,35 +37,43 @@ in
home.packages = [ cfg.package ]; 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 { programs.git = lib.mkIf cfg.git.enable {
delta = { delta = {
enable = true; enable = true;
inherit (cfg) package; 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;
}
];
}; };
}; };
} }

View file

@ -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
];
};
}