1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-09 09:03:51 +00:00
ultima/modules/home/programs/cli/git/default.nix

67 lines
1.3 KiB
Nix
Raw Normal View History

{
x,
pkgs,
lib,
config,
...
}:
2024-11-21 09:24:15 +00:00
with lib;
2024-12-09 01:15:55 +00:00
with x;
2024-11-21 09:24:15 +00:00
let
cfg = config.module.programs.cli.git;
never = "git@git.sr.ht:~neverness";
interval = 300;
repo = {
ultima = "/persist/flake";
wallpapers = "/persist/wallpapers";
readme = "/persist/readme";
niXtended = "/persist/niXtended";
};
in
{
2024-11-21 09:24:15 +00:00
options = {
module.programs.cli.git = {
2024-12-09 01:15:55 +00:00
enable = mkBool;
name = mkOpt.str;
email = mkOpt.str;
2024-11-21 09:24:15 +00:00
};
};
config = mkIf cfg.enable {
programs.git = True // {
package = pkgs.gitMinimal;
2024-12-03 14:20:37 +00:00
userName = sec.git.name;
userEmail = sec.git.email;
2024-11-21 09:24:15 +00:00
extraConfig = {
color.ui = true;
init.defaultBranch = "main";
safe.directory = flakeDir;
};
};
services.git-sync = False // {
repositories = {
"ultima" = {
inherit interval;
uri = "${never}/ultima";
path = repo.ultima;
};
"wallpapers" = {
inherit interval;
uri = "${never}/wallpapers";
path = repo.wallpapers;
};
"readme" = {
inherit interval;
uri = "${never}/readme";
path = repo.readme;
};
"niXtended" = {
inherit interval;
uri = "${never}/niXtended";
path = repo.niXtended;
};
};
};
};
}