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