git secret handling
This commit is contained in:
+28
-7
@@ -6,23 +6,44 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
(import "${home-manager}/nixos")
|
(import "${home-manager}/nixos")
|
||||||
];
|
];
|
||||||
|
# Home-manager configuration for the root user
|
||||||
|
home-manager.users.root = {
|
||||||
|
home.stateVersion = config.vars.stateVersion; # Set to your current home-manager version
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = config.vars.hm_git_username;
|
||||||
|
userEmail = config.vars.usermail;
|
||||||
|
extraConfig = {
|
||||||
|
credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users."${config.vars.username}" = {
|
home-manager.users."${config.vars.username}" = {
|
||||||
/* The home.stateVersion option does not have a default and must be set */
|
/* The home.stateVersion option does not have a default and must be set */
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = config.vars.stateVersion;
|
||||||
/* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */
|
/* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = config.vars.hm_git_username;
|
userName = config.vars.hm_git_username;
|
||||||
userEmail = config.vars.usermail;
|
userEmail = config.vars.usermail;
|
||||||
|
extraConfig = {
|
||||||
|
credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
programs.zoxide.enable = true;
|
programs.zoxide.enable = true;
|
||||||
programs.zoxide.enableZshIntegration = true;
|
programs.zoxide.enableZshIntegration = true;
|
||||||
programs.zsh.envExtra = ["LANG=en_US.UTF-8" "EDITOR='nano'"];
|
programs.zsh.envExtra = ["LANG=en_US.UTF-8" "EDITOR='nano'"];
|
||||||
programs.ssh.matchBlocks = {
|
programs.ssh = {
|
||||||
"nixconf" = {
|
enable = true;
|
||||||
hostname = "github.com";
|
addKeysToAgent = "yes";
|
||||||
user = "${config.vars.email}";
|
matchBlocks = {
|
||||||
identityFile = "/home/${config.vars.username}/.ssh/id_nix";
|
"nixconf" = {
|
||||||
|
hostname = "github.com";
|
||||||
|
user = "${config.vars.usermail}";
|
||||||
|
identityFile = "/home/${config.vars.username}/.ssh/id_nix";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user