aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-07-09 00:54:13 +0900
committernsfisis <nsfisis@gmail.com>2025-07-09 00:54:13 +0900
commit9d7c29dbb9bab86e05f0a5d240e56e832942e9eb (patch)
tree3593cb3d18ca9ffee1b800fd2c0dca102739a252
parent551122e5da0f8ca51ffc7da0cb063c627f34ebf7 (diff)
downloaddotfiles-9d7c29dbb9bab86e05f0a5d240e56e832942e9eb.tar.gz
dotfiles-9d7c29dbb9bab86e05f0a5d240e56e832942e9eb.tar.zst
dotfiles-9d7c29dbb9bab86e05f0a5d240e56e832942e9eb.zip
git: set user.name and user.email on workplace machine
-rw-r--r--.config/git/local.pc168.config3
-rw-r--r--flake.nix2
-rw-r--r--home-manager/modules/common.nix11
3 files changed, 15 insertions, 1 deletions
diff --git a/.config/git/local.pc168.config b/.config/git/local.pc168.config
new file mode 100644
index 0000000..88cc123
--- /dev/null
+++ b/.config/git/local.pc168.config
@@ -0,0 +1,3 @@
+[user]
+ name = "IMAMURA Kensuke"
+ email = "imamura.kensuke@dgcircus.com"
diff --git a/flake.nix b/flake.nix
index 36f7775..f86b33a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -47,6 +47,7 @@
readJSON = p: builtins.fromJSON (builtins.readFile p);
mkHomeConfiguration =
{
+ name,
profile,
flake,
...
@@ -57,6 +58,7 @@
config.allowUnfree = true;
};
extraSpecialArgs = {
+ nodeName = name;
env = flake.env;
nurpkgs = import nur-packages { inherit pkgs; };
};
diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix
index 231555e..2f75ba9 100644
--- a/home-manager/modules/common.nix
+++ b/home-manager/modules/common.nix
@@ -1,6 +1,7 @@
{
pkgs,
nurpkgs,
+ nodeName,
env,
...
}:
@@ -93,7 +94,6 @@ in
".config/alacritty/alacritty.local.toml".source = ../../.config/alacritty/alacritty.${env.os}.toml;
".config/alacritty/alacritty.toml".source = ../../.config/alacritty/alacritty.toml;
".config/fish/completions/git-sw.fish".source = ../../.config/fish/completions/git-sw.fish;
- ".config/git/config".source = ../../.config/git/config;
".config/git/ignore".source = ../../.config/git/ignore;
".config/nvim".source = ../../.config/nvim;
".config/sh/claude-code.sh".source = ../config/sh/claude-code.sh;
@@ -103,6 +103,15 @@ in
"bin/__claude-code-notify".source = ../../bin/__claude-code-notify;
"bin/tmux-pane-idx".source = ../../bin/tmux-pane-idx;
+ ".config/git/config".text =
+ builtins.readFile ../../.config/git/config
+ + (
+ if builtins.pathExists ../../.config/git/local.${nodeName}.config then
+ builtins.readFile ../../.config/git/local.${nodeName}.config
+ else
+ ""
+ );
+
"${if env.os == "macos" then "Library/Fonts/" else ".local/share/fonts/"}/SourceHanCodeJP.ttc" = {
source = "${nurpkgs.source-han-code-jp}/share/fonts/SourceHanCodeJP.ttc";
};