From 437425837b54681ec2a4b6c9997f87c28c2fdd58 Mon Sep 17 00:00:00 2001 From: Timo Bingmann Date: Fri, 18 Jul 2025 19:49:06 -0700 Subject: [PATCH] add tb-shared home config --- flake.lock | 23 +++++++++++++++- flake.nix | 16 +++++++++--- home.nix | 77 ++++++++++++++++++++++++++++++++++++++++++------------ 3 files changed, 94 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index a0896fe..b581b3e 100644 --- a/flake.lock +++ b/flake.lock @@ -39,7 +39,28 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "tb-shared": "tb-shared" + } + }, + "tb-shared": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752439128, + "narHash": "sha256-r7zEmbio/qRHxmv4YX1NQeiaDCgVZkjo0JqpejRJOPA=", + "ref": "refs/heads/master", + "rev": "ef906fc107492e64212b765557722b42093be996", + "revCount": 8, + "type": "git", + "url": "https://g.t1.xyz/tb/nix-shared.git" + }, + "original": { + "type": "git", + "url": "https://g.t1.xyz/tb/nix-shared.git" } } }, diff --git a/flake.nix b/flake.nix index 53f2749..fd7650c 100644 --- a/flake.nix +++ b/flake.nix @@ -3,23 +3,31 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; - + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + + tb-shared = { + url = "git+https://g.t1.xyz/tb/nix-shared.git"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { nixpkgs, home-manager, ... }: + outputs = { nixpkgs, home-manager, tb-shared, ... }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; in { homeConfigurations."tbingmann" = home-manager.lib.homeManagerConfiguration { inherit pkgs; - + # Specify the path to your home configuration module - modules = [ ./home.nix ]; + modules = [ + tb-shared.homeManagerModules.default + ./home.nix + ]; }; }; } diff --git a/home.nix b/home.nix index 16c65cf..beca1ce 100644 --- a/home.nix +++ b/home.nix @@ -8,9 +8,6 @@ # Basic configuration home.stateVersion = "25.05"; - # Let Home Manager install and manage itself - programs.home-manager.enable = true; - # Configure PATH for all shells, including non-interactive ones home.sessionPath = [ "${config.home.homeDirectory}/.local/bin" @@ -49,7 +46,44 @@ nix eza + # Version control + git + delta + + # Languages and runtimes + python3 + + # System tools + coreutils + findutils + gnused + gawk + + # Networking tools + curl + wget + + # Archive tools + unzip + zip + + # Process management + htop + btop + + # JSON/YAML tools + jq + yq + + bash + bash-completion + + ncdu + screen + + ripgrep + gnupg ]; # Bash configuration @@ -80,23 +114,32 @@ "np" = "nix-portable nix run nixpkgs#bashInteractive --offline"; }; - - # History configuration - historyControl = [ - "erasedups" - "ignoredups" - "ignorespace" - ]; - historyFileSize = 1000000; - historySize = 1000000; }; - # Direnv configuration - programs.direnv = { + # Git configuration + programs.git = { enable = true; - nix-direnv.enable = true; + userName = "Timo Bingmann"; + userEmail = "tbingmann@ebay.com"; - # Add hook to .bashrc - enableBashIntegration = true; + extraConfig = { + credential.helper = "store --file ~/.git-credentials"; + + commit.gpgsign = true; + }; + }; + + # GnuPG configuration + programs.gpg = { + enable = true; + }; + + services.gpg-agent = { + enable = true; + enableScDaemon = false; + enableSshSupport = false; + pinentry = { + package = pkgs.pinentry-curses; + }; }; }