nixos-configs/homeManagerModules/shell/git/default.nix
matt1432 7c362318aa
All checks were successful
Discord / discord commits (push) Has been skipped
chore: update sources
Flake Inputs:
    • Updated input 'home-manager':
        'github:nix-community/home-manager' (2025-02-13) rev: 22b418c13fb0be43f4bc5c185f323a3237028594
      → 'github:nix-community/home-manager' (2025-02-14) rev: 9daae9a67af7b4d341e2c806fa274a9c0925d7cf

    • Updated input 'hyprland':
        'github:hyprwm/Hyprland' (2025-02-13) rev: 40adb3dfb4b6f8cf0c5093f095954e3ef162a8eb
      → 'github:hyprwm/Hyprland' (2025-02-14) rev: df3fba157279de53c582344b59699a21ac5d62b5

    • Updated input 'jovian':
        'github:Jovian-Experiments/Jovian-NixOS' (2025-02-13) rev: 27f77b393bb2cf8740d2275cb59254f742469f64
      → 'github:Jovian-Experiments/Jovian-NixOS' (2025-02-14) rev: 740e8e359a21b4d0ab5421f33ba328a43e768652

    • Updated input 'modernz-src':
        'github:Samillion/ModernZ' (2025-02-08) rev: 1b8d849242ab293b6e41fc5dffd01a1b0fde5723
      → 'github:Samillion/ModernZ' (2025-02-14) rev: 124b836109453ef06c2ee3ab7711d2118691dd02

    • Updated input 'nix-eval-jobs':
        'github:nix-community/nix-eval-jobs' (2025-02-13) rev: 6d4fd5a93d7bc953ffa4dcd6d53ad7056a71eff7
      → 'github:nix-community/nix-eval-jobs' (2024-12-10) rev: 8e82a79fe9329f3be4836ad45d4edf2383e7723a

    • Updated input 'nix-gaming':
        'github:fufexan/nix-gaming' (2025-02-13) rev: 78967efda12abfb171fa837c7b9f9d1043277a15
      → 'github:fufexan/nix-gaming' (2025-02-14) rev: 78c53283c9c7a4f1ac83ac0354e5f74ef8eacc01

    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs' (2025-02-10) rev: 64e75cd44acf21c7933d61d7721e812eac1b5a0a
      → 'github:NixOS/nixpkgs' (2025-02-13) rev: 2ff53fe64443980e139eaa286017f53f88336dd0

    • Updated input 'nixpkgs-wayland':
        'github:nix-community/nixpkgs-wayland' (2025-02-13) rev: 731a05226213f16fac030f6da40f3d86918dd565
      → 'github:nix-community/nixpkgs-wayland' (2025-02-14) rev: 97697872a3ae429185f71e08b0832d2a574c7475

    • Updated input 'vimplugin-roslyn-nvim-src':
        'github:seblj/roslyn.nvim' (2025-02-07) rev: fcf98a8ee39f34287cec3cafdef7f95583e412db
      → 'github:seblj/roslyn.nvim' (2025-02-14) rev: 63b0c30bb6b82b1f5b100cde3a212a5a3a677869

Docker Images:
    • postgres 14:
       sha256:2a453914efff6156786247b2399e6f9f18d7fc37e1ca5574a23aba172cf37d3e
     → sha256:5d8330e221083215ffbb3c5feeb2cfe44aadda827bc3f0dad9bbf3e58ed2e895

    • rssbridge/rss-bridge latest:
       sha256:c916ebd227c19c1dbe81f2cd594678c7bf6f07ef2d34b3e2f12816d205261109
     → sha256:222e1ad7f207a58bfb49c69925b233405d2eff8a7a61cd5ab094631de02765f8

    • nextcloud fpm:
       sha256:1654f68700a482a13feca52c3235b949d8771624d738c17e9c82e437fe5de5ec
     → sha256:35816840281aa2fa2d5630d981ce32c72388f5e885d9ea1be43b38c76ab95d42

    • postgres 15-alpine:
       sha256:a58cec2ba7a60b4c08d51f2ca93c1ad65fbf96e75cf0c89b7c0d2684860d3bb3
     → sha256:0cb7397b0ef9c951f642398a24141a61e48168fbc88eeb7b3ad47618e1176ffb

Node modules:
    @types/node: 22.13.2 -> 22.13.4

Caddy Plugins:
    cloudflare: v0.0.0-20240703190432-89f16b99c18e -> v0.0.0-20250214163716-188b4850c0f2
2025-02-14 14:45:54 -05:00

111 lines
3.1 KiB
Nix

self: {
config,
lib,
pkgs,
...
}: let
inherit (lib) getExe mkIf;
cfg = config.programs.bash;
mkRemoteConf = remote: email: name: {
condition = "hasconfig:remote.*.url:${remote}*/**";
contents.user = {inherit email name;};
};
mkDefaultRemote = remote: mkRemoteConf remote "matt@nelim.org" "matt1432";
mkGitAlias = script: "!${getExe script}";
in {
config.programs = mkIf cfg.enable {
git = {
enable = true;
package = pkgs.gitFull;
lfs.enable = true;
# TODO: check if this is right
signing.format = "openpgp";
includes = [
{path = toString self.scopedPackages.${pkgs.system}.dracula.git;}
(mkDefaultRemote "https://github.com")
(mkDefaultRemote "git@github.com")
(mkDefaultRemote "git@git.nelim.org")
(mkRemoteConf "git@gitlab.info.uqam.ca" "gj591944@ens.uqam.ca" "Mathis Hurtubise")
];
delta = {
enable = true;
options = {
side-by-side = true;
line-numbers-zero-style = "#E6EDF3";
};
};
extraConfig = {
alias = {
diff-clean = "-c delta.side-by-side=false diff";
diff-patch = "-c delta.side-by-side=false -c delta.keep-plus-minus-markers=true diff";
# https://stackoverflow.com/a/18317425
ignore = "update-index --assume-unchanged";
unignore = "update-index --no-assume-unchanged";
ignored = "!git ls-files -v | ${getExe pkgs.gnugrep} \"^[[:lower:]]\"";
untracked-ignore = mkGitAlias (pkgs.writeShellApplication {
name = "untracked-ignore";
text = ''
if [ $# -eq 0 ]; then
echo "No file names provided"
exit 1
fi
for arg in "$@"; do
echo -e "$arg\n" >> .git/info/exclude
done
'';
});
untracked-unignore = mkGitAlias (pkgs.writeShellApplication {
name = "untracked-unignore";
text = ''
if [ $# -eq 0 ]; then
echo "No file names provided"
exit 1
fi
for arg in "$@"; do
sed -i "s/$arg//" .git/info/exclude
done
'';
});
untracked-ignored = mkGitAlias (pkgs.writeShellApplication {
name = "untracked-ignored";
text = ''
while IFS= read -r line; do
if [[ "$line" != "" ]] && [[ "$line" != "#"* ]]; then
echo "$line"
fi
done < .git/info/exclude
'';
});
};
diff.sopsdiffer.textconv = "sops decrypt";
sendemail = {
smtpserver = "127.0.0.1";
smtpuser = "matt@nelim.org";
smtpencryption = "tls";
smtpserverport = 1025;
smtpsslcertpath = "";
};
};
};
# https://github.com/dandavison/delta/issues/630#issuecomment-2003149860
bash.sessionVariables.LESS = "-R --mouse";
};
# For accurate stack trace
_file = ./default.nix;
}