sombrero: Add git module
This commit is contained in:
@@ -69,7 +69,6 @@
|
|||||||
gnumake
|
gnumake
|
||||||
mkpasswd
|
mkpasswd
|
||||||
vim
|
vim
|
||||||
git
|
|
||||||
tig
|
tig
|
||||||
unar
|
unar
|
||||||
];
|
];
|
||||||
@@ -79,6 +78,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
mod = {
|
mod = {
|
||||||
|
git.enable = true;
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
|
|||||||
23
hosts/sombrero/modules/git/default.nix
Normal file
23
hosts/sombrero/modules/git/default.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
let
|
||||||
|
enabled = config.mod.git.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
mod.git = {
|
||||||
|
enable = lib.mkEnableOption "enable git module";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf enabled {
|
||||||
|
home-manager.users.alex = {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
includes = [
|
||||||
|
{ path = ./gitconfig; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
hosts/sombrero/modules/git/gitconfig
Normal file
6
hosts/sombrero/modules/git/gitconfig
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[user]
|
||||||
|
name = Alexander Heldt
|
||||||
|
email = me@alexanderheldt.se
|
||||||
|
|
||||||
|
[url "git@github.com:"]
|
||||||
|
insteadOf = https://github.com/
|
||||||
Reference in New Issue
Block a user