update homemanager settings

This commit is contained in:
christoph.hollizeck 2024-03-26 22:15:49 +01:00
parent 6ca1efc75b
commit 34ce6efa04

View file

@ -1,33 +1,27 @@
{ { lib, config, pkgs, ... }:
options,
config, let
lib, inherit (lib) types mkEnableOption mkIf;
pkgs, inherit (lib.wyrdgard) mkOpt enabled;
...
}:
with lib;
with lib.wyrdgard; let
cfg = config.wyrdgard.tools.git; cfg = config.wyrdgard.tools.git;
user = config.wyrdgard.user; user = config.wyrdgard.user;
in { in
options.wyrdgard.tools.git = with types; { {
enable = mkBoolOpt true "Wether or not to enable git (Default enabled)"; options.wyrdgard.tools.git = {
userName = mkOpt types.str user.fullName "The name to use git with"; enable = mkEnableOption "Git";
userEmail = mkOpt types.str user.email "The email to use git with"; userName = mkOpt types.str user.fullName "The name to configure git with.";
userEmail = mkOpt types.str user.email "The email to configure git with.";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
git
gitAndTools.gh
];
programs.git = { programs.git = {
enable = true; enable = true;
lfs.enable = true; inherit (cfg) userName userEmail;
config = { lfs = enabled;
init = {defaultBranch = "main";}; extraConfig = {
push = {autoSetupRemote = true;}; init = { defaultBranch = "main"; };
push = { autoSetupRemote = true; };
}; };
}; };
}; };