Compare commits
8 commits
9f548cffe3
...
4e26e1aa0b
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e26e1aa0b | |||
| 1a2be3d84c | |||
| ca618b53cc | |||
| 88c00bb83d | |||
| 0dc8ac4433 | |||
| edeb67238b | |||
| 105bcbd53a | |||
| 84f1186b6c |
8 changed files with 102 additions and 51 deletions
18
flake.lock
generated
18
flake.lock
generated
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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 = { };
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
./bluetooth
|
||||
./calibre
|
||||
./comma
|
||||
./delta
|
||||
./dircolors
|
||||
./direnv
|
||||
./discord
|
||||
|
|
|
|||
61
modules/home/delta/default.nix
Normal file
61
modules/home/delta/default.nix
Normal 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;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = ''
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue