diff --git a/home/modules/git.nix b/home/modules/git.nix index 1fd3a45..871c6c9 100644 --- a/home/modules/git.nix +++ b/home/modules/git.nix @@ -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" = { diff --git a/hosts/nixos/configuration.nix b/hosts/nixos/configuration.nix index 424f867..4f243e6 100644 --- a/hosts/nixos/configuration.nix +++ b/hosts/nixos/configuration.nix @@ -77,8 +77,6 @@ nix-output-monitor - git-credential-oauth - xclip rustup diff --git a/hosts/snowhawk/configuration.nix b/hosts/snowhawk/configuration.nix index 0cfe1b7..cbcae01 100644 --- a/hosts/snowhawk/configuration.nix +++ b/hosts/snowhawk/configuration.nix @@ -64,8 +64,6 @@ steam-run xivlauncher - - git-credential-oauth ]; }; diff --git a/hosts/sprite/configuration.nix b/hosts/sprite/configuration.nix index 424f867..4f243e6 100644 --- a/hosts/sprite/configuration.nix +++ b/hosts/sprite/configuration.nix @@ -77,8 +77,6 @@ nix-output-monitor - git-credential-oauth - xclip rustup