feat(home): add git config with example configuration for non-NixOS
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
|
[include]
|
||||||
|
path = ~/.gitconfig.email
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
editor = nvim
|
editor = nvim
|
||||||
excludesfile = ~/.gitignore
|
excludesfile = ~/.gitignore
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
email = hektor.misplon@pm.me
|
|
||||||
name = Hektor Misplon
|
name = Hektor Misplon
|
||||||
username = hektor
|
username = hektor
|
||||||
signingKey = AEB98353B8D72E465C4236435151AF79E723F21C
|
signingKey = AEB98353B8D72E465C4236435151AF79E723F21C
|
||||||
@@ -76,8 +78,6 @@
|
|||||||
[merge]
|
[merge]
|
||||||
tool = nvimdiff
|
tool = nvimdiff
|
||||||
conflictstyle = diff3
|
conflictstyle = diff3
|
||||||
[pull]
|
|
||||||
rebase = true
|
|
||||||
[diff]
|
[diff]
|
||||||
colorMoved = zebra
|
colorMoved = zebra
|
||||||
[commit]
|
[commit]
|
||||||
@@ -85,3 +85,11 @@
|
|||||||
|
|
||||||
[interactive]
|
[interactive]
|
||||||
singleKey = true
|
singleKey = true
|
||||||
|
|
||||||
|
[pull]
|
||||||
|
rebase = true
|
||||||
|
[rerere]
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
[includeIf "gitdir:~/work/"]
|
||||||
|
path = ~/.gitconfig.work
|
||||||
|
|||||||
2
dots/.gitconfig.email.example
Normal file
2
dots/.gitconfig.email.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[user]
|
||||||
|
email = your.email@example.com
|
||||||
13
dots/.gitconfig.work
Normal file
13
dots/.gitconfig.work
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
[include]
|
||||||
|
path = ~/.gitconfig.work.email
|
||||||
|
|
||||||
|
[core]
|
||||||
|
longpaths = true
|
||||||
|
|
||||||
|
[user]
|
||||||
|
name = Hektor Misplon
|
||||||
|
username = hektor.misplon
|
||||||
|
signingKey = 1C88BE828184CEE6
|
||||||
|
|
||||||
|
[commit]
|
||||||
|
gpgsign = false
|
||||||
2
dots/.gitconfig.work.email.example
Normal file
2
dots/.gitconfig.work.email.example
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[user]
|
||||||
|
email = your.work.email@example.com
|
||||||
@@ -12,6 +12,7 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
../../modules/dconf.nix # TODO: Only enable when on Gnome?
|
../../modules/dconf.nix # TODO: Only enable when on Gnome?
|
||||||
../../modules/git.nix
|
../../modules/git.nix
|
||||||
|
../../modules/k9s.nix
|
||||||
(import ../../modules/taskwarrior.nix {
|
(import ../../modules/taskwarrior.nix {
|
||||||
inherit config;
|
inherit config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|||||||
@@ -10,21 +10,15 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/dconf.nix # TODO: Only enable when on Gnome?
|
../../modules/dconf.nix
|
||||||
|
../../modules/git.nix
|
||||||
|
../../modules/k9s.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.stateVersion = "25.05";
|
home.stateVersion = "25.05";
|
||||||
home.username = username;
|
home.username = username;
|
||||||
home.homeDirectory = "/home/${username}";
|
home.homeDirectory = "/home/${username}";
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = "${builtins.toString inputs.nix-secrets}/secrets.yaml";
|
|
||||||
defaultSopsFormat = "yaml";
|
|
||||||
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
|
||||||
|
|
||||||
secrets."test" = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
nixGL = {
|
nixGL = {
|
||||||
packages = inputs.nixgl.packages;
|
packages = inputs.nixgl.packages;
|
||||||
defaultWrapper = "mesa";
|
defaultWrapper = "mesa";
|
||||||
@@ -37,7 +31,6 @@ in
|
|||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit config;
|
inherit config;
|
||||||
};
|
};
|
||||||
git = import ../../modules/git.nix;
|
|
||||||
keepassxc = import ../../modules/keepassxc.nix;
|
keepassxc = import ../../modules/keepassxc.nix;
|
||||||
};
|
};
|
||||||
home.packages = import ./packages.nix {
|
home.packages = import ./packages.nix {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
programs.git.enable = true;
|
programs.git.enable = true;
|
||||||
home.file = {
|
home.file = {
|
||||||
".gitconfig".source = ../../dots/.gitconfig;
|
".gitconfig".source = ../../dots/.gitconfig;
|
||||||
|
".gitconfig.work".source = ../../dots/.gitconfig.work;
|
||||||
".gitignore".source = ../../dots/.gitignore;
|
".gitignore".source = ../../dots/.gitignore;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
11
home/modules/k9s.nix
Normal file
11
home/modules/k9s.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
programs.k9s = {
|
||||||
|
enable = true;
|
||||||
|
settings.k9s = {
|
||||||
|
ui = {
|
||||||
|
logoless = true;
|
||||||
|
reactive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -25,6 +25,8 @@ in
|
|||||||
"taskwarrior_sync_server_url".owner = config.users.users.${cfg.username}.name;
|
"taskwarrior_sync_server_url".owner = config.users.users.${cfg.username}.name;
|
||||||
"taskwarrior_sync_server_client_id".owner = config.users.users.${cfg.username}.name;
|
"taskwarrior_sync_server_client_id".owner = config.users.users.${cfg.username}.name;
|
||||||
"taskwarrior_sync_encryption_secret".owner = config.users.users.${cfg.username}.name;
|
"taskwarrior_sync_encryption_secret".owner = config.users.users.${cfg.username}.name;
|
||||||
|
"email_personal".owner = config.users.users.${cfg.username}.name;
|
||||||
|
"email_work".owner = config.users.users.${cfg.username}.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
templates."taskrc.d/sync" = {
|
templates."taskrc.d/sync" = {
|
||||||
@@ -35,6 +37,24 @@ in
|
|||||||
sync.encryption_secret=${config.sops.placeholder."taskwarrior_sync_encryption_secret"}
|
sync.encryption_secret=${config.sops.placeholder."taskwarrior_sync_encryption_secret"}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
templates.".gitconfig.email" = {
|
||||||
|
owner = config.users.users.${cfg.username}.name;
|
||||||
|
path = "/home/${cfg.username}/.gitconfig.email";
|
||||||
|
content = ''
|
||||||
|
[user]
|
||||||
|
email = ${config.sops.placeholder."email_personal"}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
templates.".gitconfig.work.email" = {
|
||||||
|
owner = config.users.users.${cfg.username}.name;
|
||||||
|
path = "/home/${cfg.username}/.gitconfig.work.email";
|
||||||
|
content = ''
|
||||||
|
[user]
|
||||||
|
email = ${config.sops.placeholder."email_work"}
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user