From 05d4fd7ed2310f366969c67e631d2684c5d09e74 Mon Sep 17 00:00:00 2001 From: Timo Bingmann Date: Sun, 21 Sep 2025 19:04:45 -0700 Subject: [PATCH] create home/macos/home.nix --- flake.nix | 6 ++++++ home/macos/home.nix | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 home/macos/home.nix diff --git a/flake.nix b/flake.nix index 22e35eb..b4d3448 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,12 @@ ]; }; + homeManagerModules.macos = { ... }: { + imports = [ + ./home/macos/home.nix + ]; + }; + homeManagerModules.develop = { ... }: { imports = [ ./home/develop/emacs.nix diff --git a/home/macos/home.nix b/home/macos/home.nix new file mode 100644 index 0000000..4ad29c9 --- /dev/null +++ b/home/macos/home.nix @@ -0,0 +1,38 @@ +{ lib, pkgs, ... }: +{ + # Set default terminal environment variable + home.sessionVariables = { + TERMINAL = lib.mkForce "open -a Terminal.app ."; + }; + + # Add NPM installed programs to PATH. + home.sessionPath = [ + "/Users/tbingmann/.npm-global/bin" + ]; + + # GnuPG configuration + programs.gpg = { + enable = true; + }; + + # GnuPG Agent configuration + services.gpg-agent = { + enable = true; + enableScDaemon = false; + enableSshSupport = false; + pinentry = { + package = pkgs.pinentry_mac; + }; + }; + + # Git configuration + programs.git = { + enable = true; + userName = lib.mkDefault "Timo Bingmann"; + userEmail = lib.mkDefault "tbgit@panthema.net"; + + extraConfig = { + credential.helper = "${pkgs.git}/bin/git-credential-osxkeychain"; + }; + }; +}