nixos/system/home/shell/git.nix
Evie Litherland-Smith 5ff572a9b7 Major rewrite/refactor to simplify things
Move home/ directory under system/ directory. Remove duplicated
machine-specific config files, now handled as one per host (excluding
hardware-configuration directory)

Move as much configuration as possible out of flake.nix and into more
appropriate files (e.g. system/default.nix)

Add a desktop.nix and laptop.nix for system, both will import
home/desktop.nix and home/laptop.nix respectively to reduce
duplication in machine-specific config files

Remove games and streaming directories, moved directly into Vanguard
config file

Remove home/personal.nix since it ended up being empty after changes

Remove old sway config since I haven't been maintaining it and this
refactor will definitely break it
2024-08-30 12:57:02 +01:00

57 lines
1.3 KiB
Nix

{
config,
lib,
pkgs,
...
}:
{
services.git-sync.enable = false; # Can't find pass for some reason...
programs.git =
let
package = pkgs.git.override {
withLibsecret = true;
withSsh = true;
};
in
{
inherit package;
enable = true;
userName = "Evie Litherland-Smith";
userEmail = lib.mkDefault "evie@xenia.me.uk";
delta = {
enable = true;
options = {
line-numbers = true;
hyprlinks = true;
navigate = true;
side-by-side = true;
syntax-theme = with config.programs; lib.mkIf bat.enable bat.config.theme;
};
};
attributes = [
"*.gpg filter=gpg diff=gpg"
"*.asc filter=gpg diff=gpg"
];
extraConfig =
let
user = "pixelifytica";
in
{
github = {
inherit user;
};
gitea = {
inherit user;
};
pull.rebase = false;
init.defaultBranch = "main";
merge.conflictstyle = "diff3";
credential.helper = "${package}/bin/git-credential-libsecret";
diff = {
colorMoved = "default";
gpg.textconv = "gpg --no-tty --decrypt";
};
};
};
}