Upgrade to Nix 25.11 and migrate configs
Update flake inputs and flake.lock to Nix/nixpkgs and home-manager release 25.11; bump home.stateVersion and setup script NIXOS_RELEASE. Migrate git config to new Home Manager layout (programs.git.settings, aliases under settings.alias), adjust delta config path, and reorganize SSH into matchBlocks with enableDefaultConfig=false to avoid global leaks. Simplify snapd session variable handling to avoid recursion. Misc: tweak Dashy title, replace du-dust->dust and plex-media-player -> plex-desktop, remove unused hostname arg, and add GitHub Copilot instructions document.
This commit is contained in:
154
config/git.nix
154
config/git.nix
@@ -1,6 +1,5 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
@@ -10,14 +9,17 @@
|
||||
enable = true;
|
||||
|
||||
# Basic configuration
|
||||
userName = "Menno van Leeuwen";
|
||||
userEmail = "menno@vleeuwen.me";
|
||||
signing = lib.mkIf (!config.isServer) {
|
||||
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+sKpcREOUjwMMSzEWAso6830wbOi8kUxqpuXWw5gHr";
|
||||
};
|
||||
|
||||
# Git settings
|
||||
extraConfig = {
|
||||
# Git settings (migrated to `programs.git.settings` for Nix 25.11+)
|
||||
settings = {
|
||||
user = {
|
||||
name = "Menno van Leeuwen";
|
||||
email = "menno@vleeuwen.me";
|
||||
};
|
||||
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
@@ -108,93 +110,93 @@
|
||||
protocol = {
|
||||
version = 2;
|
||||
};
|
||||
};
|
||||
|
||||
# Git aliases
|
||||
aliases = {
|
||||
# Status and info
|
||||
st = "status -sb";
|
||||
s = "status";
|
||||
stat = "status";
|
||||
# Git aliases moved under `settings.alias` per Nix 25.11
|
||||
alias = {
|
||||
# Status and info
|
||||
st = "status -sb";
|
||||
s = "status";
|
||||
stat = "status";
|
||||
|
||||
# Logging
|
||||
l = "log --oneline --graph --decorate";
|
||||
ll = "log --graph --pretty=format:'%C(yellow)%h%Creset -%C(red)%d%Creset %s %C(green)(%cr) %C(blue)<%an>%Creset' --abbrev-commit --date=relative";
|
||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
|
||||
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
|
||||
hist = "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short";
|
||||
# Logging
|
||||
l = "log --oneline --graph --decorate";
|
||||
ll = "log --graph --pretty=format:'%C(yellow)%h%Creset -%C(red)%d%Creset %s %C(green)(%cr) %C(blue)<%an>%Creset' --abbrev-commit --date=relative";
|
||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
|
||||
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
|
||||
hist = "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short";
|
||||
|
||||
# Diff
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
ds = "diff --staged";
|
||||
dt = "difftool";
|
||||
# Diff
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
ds = "diff --staged";
|
||||
dt = "difftool";
|
||||
|
||||
# Add and commit
|
||||
a = "add";
|
||||
aa = "add -A";
|
||||
ap = "add -p";
|
||||
c = "commit";
|
||||
cm = "commit -m";
|
||||
ca = "commit -am";
|
||||
amend = "commit --amend";
|
||||
# Add and commit
|
||||
a = "add";
|
||||
aa = "add -A";
|
||||
ap = "add -p";
|
||||
c = "commit";
|
||||
cm = "commit -m";
|
||||
ca = "commit -am";
|
||||
amend = "commit --amend";
|
||||
|
||||
# Checkout and branch
|
||||
co = "checkout";
|
||||
cb = "checkout -b";
|
||||
br = "branch";
|
||||
bra = "branch -a";
|
||||
bd = "branch -d";
|
||||
bdd = "branch -D";
|
||||
# Checkout and branch
|
||||
co = "checkout";
|
||||
cb = "checkout -b";
|
||||
br = "branch";
|
||||
bra = "branch -a";
|
||||
bd = "branch -d";
|
||||
bdd = "branch -D";
|
||||
|
||||
# Remote
|
||||
r = "remote";
|
||||
rv = "remote -v";
|
||||
# Remote
|
||||
r = "remote";
|
||||
rv = "remote -v";
|
||||
|
||||
# Push and pull
|
||||
p = "push";
|
||||
pf = "push --force-with-lease";
|
||||
pu = "push -u origin";
|
||||
pl = "pull";
|
||||
pom = "push origin main";
|
||||
plom = "pull origin main";
|
||||
# Push and pull
|
||||
p = "push";
|
||||
pf = "push --force-with-lease";
|
||||
pu = "push -u origin";
|
||||
pl = "pull";
|
||||
pom = "push origin main";
|
||||
plom = "pull origin main";
|
||||
|
||||
# Reset and clean
|
||||
unstage = "reset HEAD --";
|
||||
undo = "reset --soft HEAD~1";
|
||||
undohard = "reset --hard HEAD~1";
|
||||
clean-branches = "!git branch --merged | grep -v '\\*\\|master\\|main\\|develop' | xargs -n 1 git branch -d";
|
||||
# Reset and clean
|
||||
unstage = "reset HEAD --";
|
||||
undo = "reset --soft HEAD~1";
|
||||
undohard = "reset --hard HEAD~1";
|
||||
clean-branches = "!git branch --merged | grep -v '\\*\\|master\\|main\\|develop' | xargs -n 1 git branch -d";
|
||||
|
||||
# Stash
|
||||
ss = "stash save";
|
||||
sp = "stash pop";
|
||||
sl = "stash list";
|
||||
sd = "stash drop";
|
||||
# Stash
|
||||
ss = "stash save";
|
||||
sp = "stash pop";
|
||||
sl = "stash list";
|
||||
sd = "stash drop";
|
||||
|
||||
# Tags
|
||||
tags = "tag -l";
|
||||
# Tags
|
||||
tags = "tag -l";
|
||||
|
||||
# Show
|
||||
show-files = "show --pretty=\"\" --name-only";
|
||||
# Show
|
||||
show-files = "show --pretty=\"\" --name-only";
|
||||
|
||||
# Worktree
|
||||
wt = "worktree";
|
||||
# Worktree
|
||||
wt = "worktree";
|
||||
|
||||
# Maintenance
|
||||
cleanup = "!git remote prune origin && git gc && git clean -df && git stash clear";
|
||||
# Maintenance
|
||||
cleanup = "!git remote prune origin && git gc && git clean -df && git stash clear";
|
||||
|
||||
# Find
|
||||
find = "!git ls-files | grep -i";
|
||||
grep = "grep -Ii";
|
||||
# Find
|
||||
find = "!git ls-files | grep -i";
|
||||
grep = "grep -Ii";
|
||||
|
||||
# Contributors
|
||||
contributors = "shortlog --summary --numbered --email";
|
||||
# Contributors
|
||||
contributors = "shortlog --summary --numbered --email";
|
||||
|
||||
# Current branch
|
||||
current = "rev-parse --abbrev-ref HEAD";
|
||||
# Current branch
|
||||
current = "rev-parse --abbrev-ref HEAD";
|
||||
|
||||
# Ignore
|
||||
ignore = "!gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; gi";
|
||||
# Ignore
|
||||
ignore = "!gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; gi";
|
||||
};
|
||||
};
|
||||
|
||||
# Global gitignore
|
||||
@@ -246,7 +248,7 @@
|
||||
};
|
||||
|
||||
# Delta for better git diffs
|
||||
programs.git.delta = {
|
||||
programs.delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
features = "decorations";
|
||||
|
||||
Reference in New Issue
Block a user