diffview jj

This commit is contained in:
iofq 2025-05-08 02:10:39 -05:00
parent 625fbde680
commit 0b7da58795
5 changed files with 85 additions and 69 deletions

116
flake.lock generated
View file

@ -129,11 +129,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1741352980, "lastModified": 1743550720,
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9", "rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -352,11 +352,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1745128386, "lastModified": 1746287478,
"narHash": "sha256-xnNxL9lZC5Ez8AxTgHZZu8pYSNM34+5GD5jGSs8Vq4M=", "narHash": "sha256-z3HiHR2CNAdwyZTWPM2kkzhE1gD1G6ExPxkaiQfNh7s=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f98314bb064cf8f8446c44afbadaaad2505875a7", "rev": "75268f62525920c4936404a056f37b91e299c97e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -393,11 +393,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1743293377, "lastModified": 1743898191,
"narHash": "sha256-DqvBHtTslU0E+XMW6xM4SY3UD3+nHAAIXHag0zukrpc=", "narHash": "sha256-JCcQDgwYV+C4igYA6DchGpKKA6eyZXLvRrxWHmQbmDk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "3f10166b5b818227b9d7728f97e67e11cdf27ffd", "rev": "276567b29d8c9aca7b6a54e93a9183e44a17f19c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -409,11 +409,11 @@
"neovim-src": { "neovim-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1743289921, "lastModified": 1743893800,
"narHash": "sha256-0gsBH+wMZJaXb95GKP6OZmtyhlJh0lS/gsn6J8rxt6k=", "narHash": "sha256-i/X0b3b/dAqjNIB5RoryeDvMkVfdoPBwK5xn06W6Wdo=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "99529577cc9f5229cbb3dac8ab4782bd43094102", "rev": "28e819018520a2300eaeeec6794ffcd614b25dd2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -429,11 +429,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1745120797, "lastModified": 1746054057,
"narHash": "sha256-owQ0VQ+7cSanTVPxaZMWEzI22Q4bGnuvhVjLAJBNQ3E=", "narHash": "sha256-iR+idGZJ191cY6NBXyVjh9QH8GVWTkvZw/w+1Igy45A=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "69716041f881a2af935021c1182ed5b0cc04d40e", "rev": "13ba07d54c6ccc5af30a501df669bf3fe3dd4db8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -444,11 +444,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1744633460, "lastModified": 1745955289,
"narHash": "sha256-fbWE4Xpw6eH0Q6in+ymNuDwTkqmFmtxcQEmtRuKDTTk=", "narHash": "sha256-mmV2oPhQN+YF2wmnJzXX8tqgYmUYXUj3uUUBSTmYN5o=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "9a049b4a421076d27fee3eec664a18b2066824cb", "rev": "72081c9fbbef63765ae82bff9727ea79cc86bd5b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -459,11 +459,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1744932701, "lastModified": 1746141548,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "narHash": "sha256-IgBWhX7A2oJmZFIrpRuMnw5RAufVnfvOgHWgIdds+hc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "rev": "f02fddb8acef29a8b32f10a335d44828d7825b78",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -485,22 +485,6 @@
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
} }
}, },
"nixpkgs-master": {
"locked": {
"lastModified": 1743392618,
"narHash": "sha256-lc4l0nV5WgnS4wuZrX7Na2tRBEpe2IzWmLnhm3+t3Tk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cd6f6791e94d08b983fe6d127ec6942176737f6a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1720386169, "lastModified": 1720386169,
@ -517,13 +501,29 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs-uns": {
"locked": { "locked": {
"lastModified": 1743076231, "lastModified": 1743827369,
"narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=", "narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6c5963357f3c1c840201eda129a99d455074db04", "rev": "42a1c966be226125b48c384171c44c651c236c22",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1743689281,
"narHash": "sha256-y7Hg5lwWhEOgflEHRfzSH96BOt26LaYfrYWzZ+VoVdg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2bfc080955153be0be56724be6fa5477b4eefabb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -535,16 +535,16 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1743315132, "lastModified": 1743962461,
"narHash": "sha256-6hl6L/tRnwubHcA4pfUUtk542wn2Om+D4UnDhlDW9BE=", "narHash": "sha256-UaulIYZqwVF7CRYsDG6Jt3k3+Qs21yJT2/CLRWT9qzg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "52faf482a3889b7619003c0daec593a1912fddc1", "rev": "eb77ff4e9c1f071693be92d144f363ef24701039",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "master",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -555,14 +555,14 @@
"gen-luarc": "gen-luarc", "gen-luarc": "gen-luarc",
"neovim-nightly-overlay": "neovim-nightly-overlay", "neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
"nixpkgs-master": "nixpkgs-master" "nixpkgs-uns": "nixpkgs-uns"
}, },
"locked": { "locked": {
"lastModified": 1743497885, "lastModified": 1745307137,
"narHash": "sha256-xPOhFw+BIN1rTsg5W1ibb0F6nsdElK1gmBg1m9Xx6u4=", "narHash": "sha256-EVj4wP0bn0isewPi2NjwD2s5H5ED0i9fTQraGzV3HEM=",
"owner": "iofq", "owner": "iofq",
"repo": "nvim.nix", "repo": "nvim.nix",
"rev": "1013b2348363b1f3318417e8afb96bf19c497813", "rev": "96a162e9e8e9fa55f6d69296b6ecef0781dc3e4d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -614,11 +614,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1744669848, "lastModified": 1745310711,
"narHash": "sha256-pXyanHLUzLNd3MX9vsWG+6Z2hTU8niyphWstYEP3/GU=", "narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "61154300d945f0b147b30d24ddcafa159148026a", "rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -680,11 +680,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1743081648, "lastModified": 1743748085,
"narHash": "sha256-WRAylyYptt6OX5eCEBWyTwOEqEtD6zt33rlUkr6u3cE=", "narHash": "sha256-uhjnlaVTWo5iD3LXics1rp9gaKgDRQj6660+gbUU3cE=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "29a3d7b768c70addce17af0869f6e2bd8f5be4b7", "rev": "815e4121d6a5d504c0f96e5be2dd7f871e4fd99d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -700,11 +700,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1744961264, "lastModified": 1746216483,
"narHash": "sha256-aRmUh0AMwcbdjJHnytg1e5h5ECcaWtIFQa6d9gI85AI=", "narHash": "sha256-4h3s1L/kKqt3gMDcVfN8/4v2jqHrgLIe4qok4ApH5x4=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "8d404a69efe76146368885110f29a2ca3700bee6", "rev": "29ec5026372e0dec56f890e50dbe4f45930320fd",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -33,11 +33,33 @@
default-command = ["log"]; default-command = ["log"];
conflict-marker-style = "git"; conflict-marker-style = "git";
merge-editor = "vimdiff"; merge-editor = "vimdiff";
diff-editor = "diffview";
diff.format = "git"; diff.format = "git";
}; };
merge-tools.vimdiff = { merge-tools.vimdiff = {
program = "nvim"; program = "nvim";
}; };
merge-tools.diffview = {
program = "sh";
edit-args = [
"-c"
''
set -eu
rm -f "$right/JJ-INSTRUCTIONS"
git -C "$left" init -q
git -C "$left" add -A
git -C "$left" commit -q -m baseline --allow-empty
mv "$left/.git" "$right"
git -C "$right" add --intent-to-add -A
(cd "$right"; nvim -c "lua require('lazy').load({plugins = {'diffview.nvim'}})" -c DiffviewOpen)
git -C "$right" diff-index --quiet --cached HEAD && { echo "No changes done, aborting split."; exit 1; }
git -C "$right" commit -q -m split
git -C "$right" restore . # undo changes in modified files
git -C "$right" reset . # undo --intent-to-add
git -C "$right" clean -q -df # remove untracked files
''
];
};
snapshot = { snapshot = {
max-new-file-size = "10MiB"; max-new-file-size = "10MiB";
}; };

View file

@ -20,6 +20,7 @@
programs.zellij.enable = true; programs.zellij.enable = true;
home.file."${config.xdg.configHome}/zellij/config.kdl".text = '' home.file."${config.xdg.configHome}/zellij/config.kdl".text = ''
show_startup_tips false
on_force_close "quit" on_force_close "quit"
default_layout "compact" default_layout "compact"
default_mode "locked" default_mode "locked"

View file

@ -14,10 +14,6 @@ in {
cryptsetup cryptsetup
nfs-utils nfs-utils
nerdctl nerdctl
bubblewrap
fuse-overlayfs
dwarfs
wine-staging
]; ];
environment.extraInit = "[[ -f ${homeManagerSessionVars} ]] && source ${homeManagerSessionVars} && echo 'x' > /tmp/test"; environment.extraInit = "[[ -f ${homeManagerSessionVars} ]] && source ${homeManagerSessionVars} && echo 'x' > /tmp/test";
@ -92,6 +88,8 @@ in {
CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "low-power";
PLATFORM_PROFILE_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0; CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100; CPU_MAX_PERF_ON_AC = 100;
@ -129,8 +127,10 @@ in {
hardware.graphics = { hardware.graphics = {
enable = true; enable = true;
enable32Bit = true;
extraPackages = [ extraPackages = [
pkgs.mesa pkgs.mesa
pkgs.amdvlk
pkgs.libGL pkgs.libGL
]; ];
}; };

View file

@ -26,13 +26,6 @@
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [
{
device = "/swapfile";
size = 8 * 1024;
}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction