diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix index 5781e09..b358ad8 100644 --- a/home-manager/modules/common.nix +++ b/home-manager/modules/common.nix @@ -239,6 +239,12 @@ in packages = with pkgs; [ pkgs'.mine.nix ]; + + # Without this, we are at the mercy of whatever version of nix is in $PATH... + # TODO: Is this the right thing to do? + extraActivationPath = [ + config.nix.package + ]; }; }) (mkIf pkgs.stdenv.isLinux (mkMerge [ @@ -272,7 +278,7 @@ in # No targets.genericLinux equivalent apparently sessionVariablesExtra = '' - . "${pkgs.nix}/etc/profile.d/nix.sh" + . "${config.nix.package}/etc/profile.d/nix.sh" ''; packages = with pkgs; [ cacert diff --git a/nixos/modules/containers.nix b/nixos/modules/containers.nix index 17f56a5..b4fa612 100644 --- a/nixos/modules/containers.nix +++ b/nixos/modules/containers.nix @@ -198,7 +198,7 @@ in '' if [ ! -e "${sysProfile}" ]; then echo "Creating dummy profile" - ${pkgs.nix}/bin/nix-env -p ${sysProfile} --set ${dummyProfile} + ${config.nix.package}/bin/nix-env -p ${sysProfile} --set ${dummyProfile} fi ''} diff --git a/nixos/modules/deploy-rs.nix b/nixos/modules/deploy-rs.nix index 56201f2..679bead 100644 --- a/nixos/modules/deploy-rs.nix +++ b/nixos/modules/deploy-rs.nix @@ -9,7 +9,7 @@ let keepGensOpt = with lib.types; mkOpt' ints.unsigned 10 "Number of generations to keep when cleaning up old deployments (0 to disable deletion on deployment)."; keepGensSnippet = p: n: optionalString (n > 0) '' - ${pkgs.nix}/bin/nix-env -p "${p}" --delete-generations +${toString n} + ${config.nix.package}/bin/nix-env -p "${p}" --delete-generations +${toString n} ''; # Based on https://github.com/serokell/deploy-rs/blob/master/flake.nix