Commit f9f05f8e3648
Changed files (3)
home
common
shell
home/common/shell/git.nix
@@ -48,9 +48,6 @@ in
enable = true;
package = pkgs.git;
- userName = "Vincent Demeester";
- userEmail = "vincent@sbr.pm";
-
includes = lib.lists.forEach redhat_folders (x: {
condition = "gitdir:${config.home.homeDirectory}/${x}/";
contents.user.email = "vdemeest@redhat.com";
@@ -64,30 +61,34 @@ in
signByDefault = false;
};
- aliases = {
- b = "branch - -color - v";
- br = "branch";
- ca = "commit --amend";
- ci = "commit --signoff";
- co = "checkout";
- conflicts = "!git ls-files --unmerged | cut -c51- | sort -u | xargs $EDITOR";
- dft = "difftool";
- lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative";
- lga = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --branches --remotes";
- lol = "log --pretty=oneline --abbrev-commit --graph --decorate";
- ls-ignored = "ls-files --exclude-standard --ignored --others";
- resolve = "!git ls-files --unmerged | cut -c51- | sort -u | xargs git add";
- st = "status";
- su = "submodule update --init --recursive";
- unstage = "reset HEAD";
- w = "status -sb";
- wdiff = "diff --color-words";
- kdiff = "difftool --tool=kitty --no-symlinks --dir-diff";
- };
attributes = [
"*.org diff=org"
];
- extraConfig = {
+ settings = {
+ user = {
+ name = "Vincent Demeester";
+ email = "vincent@sbr.pm";
+ };
+ alias = {
+ b = "branch - -color - v";
+ br = "branch";
+ ca = "commit --amend";
+ ci = "commit --signoff";
+ co = "checkout";
+ conflicts = "!git ls-files --unmerged | cut -c51- | sort -u | xargs $EDITOR";
+ dft = "difftool";
+ lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative";
+ lga = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative --branches --remotes";
+ lol = "log --pretty=oneline --abbrev-commit --graph --decorate";
+ ls-ignored = "ls-files --exclude-standard --ignored --others";
+ resolve = "!git ls-files --unmerged | cut -c51- | sort -u | xargs git add";
+ st = "status";
+ su = "submodule update --init --recursive";
+ unstage = "reset HEAD";
+ w = "status -sb";
+ wdiff = "diff --color-words";
+ kdiff = "difftool --tool=kitty --no-symlinks --dir-diff";
+ };
core = {
pager = "${pkgs.delta}/bin/delta";
abbrev = 12;
home/common/shell/openssh.nix
@@ -12,14 +12,17 @@
# services.ssh-agent.enable = true;
programs.ssh = {
enable = true;
- serverAliveInterval = 60;
- hashKnownHosts = true;
- userKnownHostsFile = "${config.home.homeDirectory}/.ssh/known_hosts";
+ enableDefaultConfig = false;
# controlMaster = "auto";
# controlPersist = "10m"; # FIXME: issue with OpenSSH 10p1, can re-enable in a few weeks.
# controlPath = "${config.home.homeDirectory}/.ssh/master-%C";
- addKeysToAgent = "confirm";
matchBlocks = {
+ "*" = {
+ serverAliveInterval = 60;
+ hashKnownHosts = true;
+ userKnownHostsFile = "${config.home.homeDirectory}/.ssh/known_hosts";
+ addKeysToAgent = "confirm";
+ };
"github.com" = {
hostname = "github.com";
user = "git";
home/common/shell/zsh.nix
@@ -45,7 +45,7 @@
export TLDR_CACHE_DIR="$XDG_CACHE_HOME"/tldr
'';
# TODO Extract this to files.
- initExtra = ''
+ initContent = ''
# c.f. https://wiki.gnupg.org/AgentForwarding
# gpgconf --create-socketdir &!
path+="${config.programs.zsh.dotDir}/functions"