Headless Git credential storage

This commit is contained in:
2026-04-02 03:12:41 +02:00
parent 29dd2a305a
commit df872d185e
2 changed files with 9 additions and 6 deletions

View File

@@ -1,6 +1,9 @@
{ pkgs, ... }:
{ osConfig, lib, pkgs, ... }:
let
hasGui = osConfig.services.dbus.implementation == "dbus";
in
{
home.packages = with pkgs; [
home.packages = with pkgs; lib.mkIf hasGui [
git-credential-manager
];
@@ -15,8 +18,8 @@
init.defaultBranch = "main";
credential = {
helper = "manager";
credentialStore = "secretservice";
helper = if hasGui then "manager" else "store";
credentialStore = lib.mkIf hasGui "secretservice";
"https://github.com" = {
username = "kpghostfox";
@@ -30,4 +33,4 @@
};
};
};
}
}

View File

@@ -35,4 +35,4 @@ in
};
};
};
}
}