From 9e1c0fdd42c52782e999ea78281613cf747b1e13 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Thu, 16 Feb 2017 18:51:05 -0800 Subject: [PATCH] nonfunctional fixes --- nixos-infect | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nixos-infect b/nixos-infect index f2acad3..13214d6 100755 --- a/nixos-infect +++ b/nixos-infect @@ -69,7 +69,7 @@ makeConf() { ]; } EOF - # (nixos-generate-config will add qemu-user and bind-mounts, so avoid) + # If you rerun this later, be sure to prune the filesSystems attr cat > /etc/nixos/hardware-configuration.nix << EOF { ... }: { @@ -123,8 +123,8 @@ EOF }; }; services.udev.extraRules = '' - KERNEL=="eth*", ATTR{address}=="${ether0}", NAME="eth0" - KERNEL=="eth*", ATTR{address}=="${ether1}", NAME="eth1" + ATTR{address}=="${ether0}", NAME="eth0" + ATTR{address}=="${ether1}", NAME="eth1" ''; } EOF @@ -214,8 +214,11 @@ checkEnv() { infect() { # Add nix build users # FIXME run only if necessary, rather than defaulting true - groupadd -r nixbld -g 30000 || true + groupadd nixbld -g 30000 || true for i in {1..10}; do useradd -c "Nix build user $i" -d /var/empty -g nixbld -G nixbld -M -N -r -s $(which nologin) nixbld$i || true; done + # TODO use addgroup and adduser as fallbacks + #addgroup nixbld -g 30000 || true + #for i in {1..10}; do adduser -DH -G nixbld nixbld$i || true; done curl https://nixos.org/nix/install | $SHELL