Reworked home manager configuration to modules
This commit is contained in:
46
modules/home/applications/git.nix
Normal file
46
modules/home/applications/git.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.applications.git;
|
||||
in {
|
||||
options = {
|
||||
settings.applications.git.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable git version control
|
||||
'';
|
||||
};
|
||||
|
||||
settings.applications.git.lazygit.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable lazygit
|
||||
'';
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
services = {
|
||||
"gitea.xeovalyte.dev" = "gitea:gitea.xeovalyte.dev";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = mkIf cfg.lazygit.enable {
|
||||
enable = true;
|
||||
userEmail = "me+gitea@xeovalyte.dev";
|
||||
userName = "xeovalyte";
|
||||
extraConfig = {
|
||||
commit.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
user.signingkey = "~/.ssh/gitea.pub";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user