git: optional oauth

This commit is contained in:
Zynh Ludwig 2024-07-11 21:06:41 +00:00
parent 1c407de56d
commit cb1a15d8d2
4 changed files with 7 additions and 8 deletions

View file

@ -1,4 +1,4 @@
{ lib, config, ... }:
{ lib, config, pkgs, ... }:
let
cfg = config.snowhawk.git;
@ -6,9 +6,14 @@ in
{
options.snowhawk.git = {
enable = lib.mkEnableOption "git";
oauth = lib.mkEnableOption "enable git-credential-oauth";
};
config = lib.mkIf cfg.enable {
home.packages = lib.mkIf cfg.oauth [
pkgs.git-credential-oauth
];
programs.git = {
enable = true;
userName = "Zynh Ludwig";
@ -48,7 +53,7 @@ in
credential = {
helper = [
"cache --timeout 7200"
"oauth"
(lib.mkIf cfg.oauth "oauth")
];
"https://git.zynh.me" = {

View file

@ -77,8 +77,6 @@
nix-output-monitor
git-credential-oauth
xclip
rustup

View file

@ -64,8 +64,6 @@
steam-run
xivlauncher
git-credential-oauth
];
};

View file

@ -77,8 +77,6 @@
nix-output-monitor
git-credential-oauth
xclip
rustup