move git to own mod
This commit is contained in:
parent
29ab335879
commit
c2aa932494
5 changed files with 32 additions and 17 deletions
|
|
@ -9,6 +9,7 @@
|
|||
./en-de.nix
|
||||
./extra-caches.nix
|
||||
./firmware-updates.nix
|
||||
./git.nix
|
||||
./globalinstalls.nix
|
||||
./gnome.nix
|
||||
./intel-graphics.nix
|
||||
|
|
|
|||
24
nixosModules/git.nix
Normal file
24
nixosModules/git.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.git.enable = lib.mkEnableOption "git with credential helper";
|
||||
|
||||
config = lib.mkIf config.my.git.enable {
|
||||
environment.systemPackages = [ pkgs.git-credential-oauth ];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
init.defaultBranch = "main";
|
||||
credential = {
|
||||
helper = "oauth";
|
||||
credentialStore = "cache";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -16,24 +16,16 @@
|
|||
screen
|
||||
tldr
|
||||
nix-output-monitor
|
||||
git-credential-oauth
|
||||
];
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
htop.enable = true;
|
||||
iotop.enable = true;
|
||||
git.enable = true;
|
||||
nano = {
|
||||
enable = true;
|
||||
syntaxHighlight = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."gitconfig".text = ''
|
||||
[credential]
|
||||
helper = oauth
|
||||
credentialStore = cache
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue