diff --git a/pkgs/inject-darwin.nix b/pkgs/inject-darwin.nix index 6623bb3..5e8f21b 100644 --- a/pkgs/inject-darwin.nix +++ b/pkgs/inject-darwin.nix @@ -30,7 +30,7 @@ writeShellApplication { # Build NixOS for this system pushd "''${dir}" - nix build "~/.config/darwin#darwinConfigurations.$(hostname -s).system" + nix build "''${HOME}/.config/darwin#darwinConfigurations.$(hostname -s).system" ./result/sw/bin/darwin-rebuild switch --flake ~/.config/darwin popd rm -r "''${dir}" diff --git a/pkgs/inject.nix b/pkgs/inject.nix index 793dd4d..2ec149f 100644 --- a/pkgs/inject.nix +++ b/pkgs/inject.nix @@ -5,7 +5,7 @@ writeShellApplication { runtimeInputs = [ git ]; text = '' hostname="''${1}" - if [ -n "''${hostname}"]; then + if [ -n "''${hostname}" ]; then echo "You must provide a hostname"; exit 1; fi @@ -50,7 +50,7 @@ writeShellApplication { cp /etc/nixos.bk/hardware-configuration.nix /etc/nixos chown -R greg nixos - echo "Now you should be able to just run `nixos-rebuild switch` to enable the flake functionality" - echo "After that and adding the entry to the flake, run `nixos-rebuild boot --flake '.#''${hostname}'` and reboot" + echo "Now you should be able to just run 'nixos-rebuild switch' to enable the flake functionality" + echo "After that and adding the entry to the flake, run 'nixos-rebuild boot --flake '.#''${hostname}' and reboot" ''; }