qol(git@modules): git is now a module

This commit is contained in:
2025-10-21 09:58:23 +01:00
parent 2903440a12
commit 9f65a9f4c1
4 changed files with 39 additions and 12 deletions

View File

@@ -29,18 +29,13 @@
fish.enable = true; fish.enable = true;
stylix.enable = true; stylix.enable = true;
direnv.enable = true; direnv.enable = true;
git.enable = true;
}; };
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
home.username = "doloro"; home.username = "doloro";
home.homeDirectory = "/home/doloro"; home.homeDirectory = "/home/doloro";
programs.git = {
enable = true;
userName = "Doloro1978";
userEmail = "doloroo@proton.me";
};
# This value determines the Home Manager release that your configuration is # This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release # compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes. # introduces backwards incompatible changes.

View File

@@ -36,19 +36,18 @@
youtube-music.enable = true; youtube-music.enable = true;
unityhub.enable = true; unityhub.enable = true;
direnv.enable = true; direnv.enable = true;
git.enable = true;
}; };
# Home Manager needs a bit of information about you and the paths it should # Home Manager needs a bit of information about you and the paths it should
# manage. # manage.
home.username = "doloro"; home.username = "doloro";
home.homeDirectory = "/home/doloro"; home.homeDirectory = "/home/doloro";
programs.git = { services.gpg-agent = {
enable = true; enable = true;
settings = { pinentry = {
user = { package = pkgs.pinentry-qt;
name = "Doloro1978"; program = "pinentry-qt";
email = "doloroo@proton.me";
};
}; };
}; };
xdg.mimeApps.enable = true; xdg.mimeApps.enable = true;
@@ -75,6 +74,7 @@
btop btop
sops sops
alcom alcom
gcr
]; ];
# sops.age.keyFile = "/home/doloro/.config/sops/age/key.txt"; # sops.age.keyFile = "/home/doloro/.config/sops/age/key.txt";
@@ -117,6 +117,7 @@
enable = true; enable = true;
}; };
}; };
xdg.configFile."mimeapps.list".force = true;
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }

View File

@@ -0,0 +1,3 @@
_: {
home = ./home.nix;
}

28
nix/modules/git/home.nix Normal file
View File

@@ -0,0 +1,28 @@
{ config, lib, ... }:
let
cfg = config.modules.git;
in
{
options.modules.git = {
enable = lib.mkEnableOption "git";
};
config.programs = lib.mkIf cfg.enable {
git = {
enable = true;
settings = {
user = {
name = "Doloro1978";
email = "doloroo@proton.me";
signingKey = "089B373588540877";
};
commit = {
gpgSign = true;
};
};
};
gpg = {
enable = true;
};
};
}