mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-04-15 08:46:25 +00:00
nix: only set NIX_REMOTE for nix 1.11
This isn't needed anymore, nix 2.0 figures this out automatically now.
This commit is contained in:
parent
9347dc05d1
commit
48f3ed6301
3 changed files with 6 additions and 5 deletions
|
@ -388,7 +388,7 @@ in
|
|||
NIX_REMOTE_SYSTEMS = "/etc/nix/machines";
|
||||
};
|
||||
|
||||
environment.extraInit = ''
|
||||
environment.extraInit = optionalString (!isNix20) ''
|
||||
# Set up secure multi-user builds: non-root users build through the
|
||||
# Nix daemon.
|
||||
if [ ! -w /nix/var/nix/db ]; then
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
grep 'export PATH=${pkgs.hello}/bin' ${config.out}/etc/zshenv
|
||||
echo >&2 "checking SHELL in /etc/zshenv"
|
||||
grep 'export SHELL="${pkgs.zsh}/bin/zsh"' ${config.out}/etc/zshenv
|
||||
echo >&2 "checking nix-daemon init in /etc/zshenv"
|
||||
grep '! -w /nix/var/nix/db' ${config.out}/etc/zshenv
|
||||
grep 'export NIX_REMOTE=daemon' ${config.out}/etc/zshenv
|
||||
echo >&2 "checking nix-shell return /etc/zshenv"
|
||||
grep 'if test -n "$IN_NIX_SHELL"; then return; fi' ${config.out}/etc/zshenv
|
||||
echo >&2 "checking zshenv.d in /etc/zshenv"
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
nix = pkgs.runCommand "nix-0.0.0" {} "mkdir -p $out";
|
||||
nix = pkgs.runCommand "nix-0.0.0" { version = "1.11.6"; } "mkdir -p $out";
|
||||
in
|
||||
|
||||
{
|
||||
services.nix-daemon.enable = true;
|
||||
nix.package = nix;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
test = ''
|
||||
echo checking nix-daemon service in /Library/LaunchDaemons >&2
|
||||
grep "<string>org.nixos.nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
|
@ -20,5 +22,7 @@ in
|
|||
|
||||
echo checking NIX_REMOTE=daemon in /etc/bashrc >&2
|
||||
grep "NIX_REMOTE=daemon" ${config.out}/etc/bashrc
|
||||
echo "checking NIX_REMOTE=daemon in /etc/zshenv" >&2
|
||||
grep 'export NIX_REMOTE=daemon' ${config.out}/etc/zshenv
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue