From 2986ad06f5fb09d95144d165754f9e02ecabf84e Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Fri, 9 Sep 2022 22:16:45 -0400 Subject: [PATCH] modify git config for work --- flake.nix | 3 ++- hosts/common.nix | 4 ++++ hosts/macbook/default.nix | 8 ++++++-- modules/shell/git.nix | 6 +++--- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 01b61d0..767dfa3 100644 --- a/flake.nix +++ b/flake.nix @@ -39,9 +39,10 @@ let # Global configuration for my systems - globals = { + globals = rec { user = "noah"; fullName = "Noah Masur"; + gitName = fullName; gitEmail = "7386960+nmasur@users.noreply.github.com"; mailServer = "noahmasur.com"; dotfilesRepo = "https://github.com/nmasur/dotfiles"; diff --git a/hosts/common.nix b/hosts/common.nix index 10fb544..a886392 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -8,6 +8,10 @@ type = types.str; description = "Primary user of the system"; }; + fullName = lib.mkOption { + type = lib.types.str; + description = "Human readable name of the user"; + }; userDirs = { # Required to prevent infinite recursion when referenced by himalaya download = lib.mkOption { diff --git a/hosts/macbook/default.nix b/hosts/macbook/default.nix index 95be053..13dec98 100644 --- a/hosts/macbook/default.nix +++ b/hosts/macbook/default.nix @@ -1,11 +1,15 @@ { nixpkgs, darwin, home-manager, nur, globals, ... }: -# System configuration for my MacBook +# System configuration for my work MacBook darwin.lib.darwinSystem { system = "x86_64-darwin"; specialArgs = { }; modules = [ - (globals // { user = "Noah.Masur"; }) + (globals // { + user = "Noah.Masur"; + gitName = "Noah-Masur_1701"; + gitEmail = "Noah.Masur@take2games.com"; + }) home-manager.darwinModules.home-manager { gui.enable = true; diff --git a/modules/shell/git.nix b/modules/shell/git.nix index 823e83a..4e77837 100644 --- a/modules/shell/git.nix +++ b/modules/shell/git.nix @@ -5,9 +5,9 @@ let home-packages = config.home-manager.users.${config.user}.home.packages; in { options = { - fullName = lib.mkOption { + gitName = lib.mkOption { type = lib.types.str; - description = "Human readable name of the user"; + description = "Name to use for git commits"; }; gitEmail = lib.mkOption { type = lib.types.str; @@ -25,7 +25,7 @@ in { home-manager.users.${config.user} = { programs.git = { enable = true; - userName = config.fullName; + userName = config.gitName; userEmail = config.gitEmail; extraConfig = { pager = { branch = "false"; };