profile option finally working
This commit is contained in:
11
flake.nix
11
flake.nix
@@ -2,13 +2,11 @@
|
|||||||
description = "Home Manager configuration flake for JSL";
|
description = "Home Manager configuration flake for JSL";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Specify the source of Home Manager and Nixpkgs.
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager = {
|
||||||
# home-manager = {
|
url = "github:nix-community/home-manager";
|
||||||
# url = "github:nix-community/home-manager";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
};
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, home-manager, ... }:
|
outputs = { nixpkgs, home-manager, ... }:
|
||||||
@@ -22,6 +20,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./options.nix
|
./options.nix
|
||||||
./home.nix
|
./home.nix
|
||||||
|
./git.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
18
git.nix
Normal file
18
git.nix
Normal file
@@ -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";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user