Compare commits

...

8 commits

Author SHA1 Message Date
4e26e1aa0b WIP: home: delta: use stand-alone configuration file
All checks were successful
ci/woodpecker/push/check Pipeline was successful
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 :-/.

TODO:
* `git.enable = false` would break the standalone configuration
* using a wrapper which sets `--config` might be better than includes
2025-03-06 13:00:47 +00:00
1a2be3d84c home: git: extract 'delta' configuration
I want to be able to re-use it between different source control systems
(e.g: `jj`).

As a first step, extract it to a proper module so that I can have it
live in a single space.
2025-03-06 12:58:40 +00:00
ca618b53cc home: vim: oil: explicitly remove icons
All checks were successful
ci/woodpecker/push/check Pipeline was successful
They started appearing on the latest bump, it looks like my
configuration started including `nvim-web-devicons` (see [1]).

I'll probably remove this configuration on the next nixpkgs bump (it's a
good canary to check that I *never* include icons in the future).

[1]: https://github.com/NixOS/nixpkgs/pull/382668
2025-02-28 11:00:12 +00:00
88c00bb83d home: firefox: fix deprecated option
All checks were successful
ci/woodpecker/push/check Pipeline was successful
2025-02-27 12:44:10 +00:00
0dc8ac4433 flake: bump inputs 2025-02-27 12:36:10 +00:00
edeb67238b home: tmux: enable aggressive resize
All checks were successful
ci/woodpecker/push/check Pipeline was successful
Generally useful, rarely gets in the way, I'd rather have it enabled by
default.
2025-02-26 14:28:10 +00:00
105bcbd53a hosts: home: mousqueton: enable 'tmux-resurrect' 2025-02-26 14:28:10 +00:00
84f1186b6c home: tmux: add 'enableResurrect'
To be used on the cloudtop with its frequent reboots.
2025-02-26 14:28:10 +00:00
8 changed files with 102 additions and 51 deletions

18
flake.lock generated
View file

@ -136,11 +136,11 @@
]
},
"locked": {
"lastModified": 1739790043,
"narHash": "sha256-4gK4zdNDQ4PyGFs7B6zp9iPIBy9E+bVJiZ0XAmncvgQ=",
"lastModified": 1740624780,
"narHash": "sha256-8TP61AI3QBQsjzVUQFIV8NoB5nbYfJB3iHczhBikDkU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c1ea92cdfb85bd7b0995b550581d9fd1c3370bf9",
"rev": "b8869e4ead721bbd4f0d6b927e8395705d4f16e6",
"type": "github"
},
"original": {
@ -152,11 +152,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1739580444,
"narHash": "sha256-+/bSz4EAVbqz8/HsIGLroF8aNaO8bLRL7WfACN+24g4=",
"lastModified": 1740560979,
"narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8bb37161a0488b89830168b81c48aed11569cb93",
"rev": "5135c59491985879812717f4c9fea69604e7f26f",
"type": "github"
},
"original": {
@ -177,11 +177,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1739796551,
"narHash": "sha256-XcTK29rOc0WxcSJDHUK8JQege9CzSVVAcjHdswOVFPA=",
"lastModified": 1740655932,
"narHash": "sha256-BSTcgL2C74x0TgVdVEWfIz2SHkwIFMN0Dvv1lCoOhCA=",
"owner": "nix-community",
"repo": "NUR",
"rev": "827aa6eeaf92cc085f84947f6c32002792b67497",
"rev": "1ca8ff37f33a560c4a292ed83774434854f0b39a",
"type": "github"
},
"original": {

View file

@ -15,6 +15,9 @@
# I use scripts that use the passthrough sequence often on this host
enablePassthrough = true;
# Frequent reboots mean that session persistence can be handy
enableResurrect = true;
terminalFeatures = {
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
xterm-256color = { };

View file

@ -8,6 +8,7 @@
./bluetooth
./calibre
./comma
./delta
./dircolors
./direnv
./discord

View file

@ -0,0 +1,61 @@
{ 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; {
enable = my.mkDisableOption "delta configuration";
package = mkPackageOption pkgs "delta" { };
git = {
enable = my.mkDisableOption "git integration";
};
};
config = lib.mkIf cfg.enable {
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;
};
includes = [
{
path = configPath;
}
];
};
};
}

View file

@ -61,19 +61,21 @@ in
"ui.systemUsesDarkTheme" = true; # Dark mode
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; ([
bitwarden
consent-o-matic
form-history-control
reddit-comment-collapser
reddit-enhancement-suite
refined-github
sponsorblock
ublock-origin
]
++ lib.optional (cfg.tridactyl.enable) tridactyl
++ lib.optional (cfg.ff2mpv.enable) ff2mpv
);
extensions = {
packages = with pkgs.nur.repos.rycee.firefox-addons; ([
bitwarden
consent-o-matic
form-history-control
reddit-comment-collapser
reddit-enhancement-suite
refined-github
sponsorblock
ublock-origin
]
++ lib.optional (cfg.tridactyl.enable) tridactyl
++ lib.optional (cfg.ff2mpv.enable) ff2mpv
);
};
};
};
};

View file

@ -42,34 +42,6 @@ in
lfs.enable = true;
delta = {
enable = true;
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";
};
};
};
# There's more
extraConfig = {
# Makes it a bit more readable

View file

@ -20,6 +20,8 @@ in
enablePassthrough = mkEnableOption "tmux DCS passthrough sequence";
enableResurrect = mkEnableOption "tmux-resurrect plugin";
terminalFeatures = mkOption {
type = with types; attrsOf (submodule {
options = {
@ -50,8 +52,9 @@ in
mouse = false; # I dislike mouse support
focusEvents = true; # Report focus events
terminal = "tmux-256color"; # I want accurate termcap info
aggressiveResize = true; # Automatic resize when switching client size
plugins = with pkgs.tmuxPlugins; [
plugins = with pkgs.tmuxPlugins; builtins.filter (attr: attr != { }) [
# Open high-lighted files in copy mode
open
# Better pane management
@ -79,6 +82,13 @@ in
set -g status-right '#{prefix_highlight} %a %Y-%m-%d %H:%M'
'';
}
# Resurrect sessions
(lib.optionalAttrs cfg.enableResurrect {
plugin = resurrect;
extraConfig = ''
set -g @resurrect-dir '${config.xdg.stateHome}/tmux/resurrect'
'';
})
];
extraConfig = ''

View file

@ -4,6 +4,8 @@ local wk = require("which-key")
local detail = false
oil.setup({
-- Don't show icons
columns = {},
view_options = {
-- Show files and directories that start with "." by default
show_hidden = true,