Compare commits

..

2 commits

Author SHA1 Message Date
84f95642b0 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-02-24 14:08:24 +00:00
dc040f314e 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-02-24 14:02:59 +00:00
4 changed files with 3 additions and 21 deletions

View file

@ -15,9 +15,6 @@
# 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

@ -1,7 +1,6 @@
{ config, lib, pkgs, osConfig, ... }:
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.packages;
useGlobalPkgs = osConfig.home-manager.useGlobalPkgs or false;
in
{
options.my.home.packages = with lib; {
@ -30,7 +29,7 @@ in
tree
] ++ cfg.additionalPackages);
nixpkgs.config = lib.mkIf (!useGlobalPkgs) {
nixpkgs.config = {
inherit (cfg) allowAliases allowUnfree;
};
};

View file

@ -16,11 +16,7 @@ in
LESS = "-R -+X -c";
# Better XDG compliance
LESSHISTFILE = "${config.xdg.stateHome}/less/history";
LESSKEY = "${config.xdg.configHome}/less/lesskey";
};
xdg.configFile."lesskey".text = ''
# Quit without clearing the screen on `Q`
Q toggle-option -!^Predraw-on-quit\nq
'';
};
}

View file

@ -20,8 +20,6 @@ in
enablePassthrough = mkEnableOption "tmux DCS passthrough sequence";
enableResurrect = mkEnableOption "tmux-resurrect plugin";
terminalFeatures = mkOption {
type = with types; attrsOf (submodule {
options = {
@ -52,7 +50,6 @@ 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; [
# Open high-lighted files in copy mode
@ -82,13 +79,6 @@ 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 = ''