diff --git a/flake.nix b/flake.nix index f746645..25e385d 100644 --- a/flake.nix +++ b/flake.nix @@ -2,13 +2,11 @@ description = "Home Manager configuration flake for JSL"; inputs = { - # Specify the source of Home Manager and Nixpkgs. nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager"; - # home-manager = { - # url = "github:nix-community/home-manager"; - # inputs.nixpkgs.follows = "nixpkgs"; - # }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { nixpkgs, home-manager, ... }: @@ -22,6 +20,7 @@ imports = [ ./options.nix ./home.nix + ./git.nix ]; }; }; diff --git a/git-personal.nix b/git-personal.nix deleted file mode 100644 index d30ba88..0000000 --- a/git-personal.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ ... }: -{ - programs.git = { - enable = true; - extraConfig.credential.helper = "store --file ~/.git-credentials"; - userName = "John Lancaster"; - userEmail = "32917998+jsl12@users.noreply.github.com"; - }; -} \ No newline at end of file diff --git a/git.nix b/git.nix new file mode 100644 index 0000000..95259b0 --- /dev/null +++ b/git.nix @@ -0,0 +1,18 @@ +{ config, lib, ... }: +{ + programs.git = lib.mkMerge [ + { + enable = true; + extraConfig.credential.helper = "store --file ~/.git-credentials"; + } + (lib.mkIf (config.profile == "personal") { + userName = "John Lancaster"; + userEmail = "32917998+jsl12@users.noreply.github.com"; + + }) + (lib.mkIf (config.profile == "work") { + userName = "John Lancaster"; + userEmail = "john.lancaster@crowncastle.com"; + }) + ]; +} \ No newline at end of file