From 7330ef822c032b7a6720ab5abf63c3637ed58f3e Mon Sep 17 00:00:00 2001 From: Timo Bingmann Date: Fri, 18 Jul 2025 17:27:08 -0700 Subject: [PATCH] fix maven and hm-up/np --- README.md | 2 +- home.nix | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 19f5032..1a09bf0 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ You can apply the configuration directly from a Git repository without cloning: ```bash # If home-manager is not installed -nix --no-write-lock-file run github:nix-community/home-manager/release-25.05 -- switch --flake 'git+https://g.t1.xyz/tb/nix-ebay-home.git#tbingmann' +nix --no-write-lock-file run github:nix-community/home-manager/release-25.05 -- switch --refresh --flake 'git+https://g.t1.xyz/tb/nix-ebay-home.git#tbingmann' # If home-manager is installed home-manager --no-write-lock-file switch --flake 'git+https://g.t1.xyz/tb/nix-ebay-home.git#tbingmann' diff --git a/home.nix b/home.nix index 08edb86..16c65cf 100644 --- a/home.nix +++ b/home.nix @@ -30,10 +30,11 @@ # Set environment variables for all shells home.sessionVariables = { - NIX_PATH = "${config.home.homeDirectory}/.nix-defexpr/channels:nixpkgs=${config.home.homeDirectory}/.nix-defexpr/channels/nixpkgs"; - # Use bwrap for nix-portable NP_RUNTIME = "bwrap"; + + # This is missing for some reason and breaks alls kinds of Maven compilations. + MAVEN_OPTS="-Duser.home=${config.home.homeDirectory}"; }; # Create SSH environment file for non-interactive sessions @@ -47,6 +48,8 @@ home.packages = with pkgs; [ nix eza + + ripgrep ]; # Bash configuration @@ -73,7 +76,9 @@ ''; shellAliases = { - "hm-up" = "nix run github:nix-community/home-manager/release-25.05 -- switch --no-write-lock-file --refresh --flake 'git+https://g.t1.xyz/tb/nix-ebay-home.git#tbingmann'"; + "hm-up" = "nix-portable nix run github:nix-community/home-manager/release-25.05 -- switch --refresh --flake 'git+https://g.t1.xyz/tb/nix-ebay-home.git#tbingmann'"; + + "np" = "nix-portable nix run nixpkgs#bashInteractive --offline"; }; # History configuration