cli: Put name and email into a record
This commit is contained in:
parent
92bf748a71
commit
3a2f714943
1 changed files with 12 additions and 10 deletions
22
home/cli.nix
22
home/cli.nix
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
# minimal config, suitable for servers
|
# minimal config, suitable for servers
|
||||||
let
|
let
|
||||||
myUser = "alex";
|
user = {
|
||||||
myName = "Alexander Kobjolke";
|
name = "alex";
|
||||||
myMail = "me@failco.de";
|
fullName = "Alexander Kobjolke";
|
||||||
|
mail = "me@failco.de";
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
# shell config
|
# shell config
|
||||||
|
|
@ -13,8 +15,8 @@ in {
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
home = {
|
home = {
|
||||||
username = myUser;
|
username = user.name;
|
||||||
homeDirectory = "/home/${myUser}";
|
homeDirectory = "/home/${config.home.username}";
|
||||||
stateVersion = "21.05";
|
stateVersion = "21.05";
|
||||||
sessionPath = [ "$HOME/.local/bin" "$HOME/.emacs.d/bin" ];
|
sessionPath = [ "$HOME/.local/bin" "$HOME/.emacs.d/bin" ];
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
|
@ -96,9 +98,9 @@ in {
|
||||||
target = "pijul/config.toml";
|
target = "pijul/config.toml";
|
||||||
text = ''
|
text = ''
|
||||||
[author]
|
[author]
|
||||||
name = "${myUser}"
|
name = "${user.name}"
|
||||||
full_name = "${myName}"
|
full_name = "${user.fullName}"
|
||||||
email = "${myMail}"
|
email = "${user.mail}"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -140,8 +142,8 @@ in {
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ignores = [ "*~" "*.swp" "result" "dist-newstyle" ];
|
ignores = [ "*~" "*.swp" "result" "dist-newstyle" ];
|
||||||
userEmail = myMail;
|
userEmail = user.mail;
|
||||||
userName = myName;
|
userName = user.fullName;
|
||||||
aliases = { st = "status"; };
|
aliases = { st = "status"; };
|
||||||
extraConfig = { init.defaultBranch = "main"; };
|
extraConfig = { init.defaultBranch = "main"; };
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue