nonfunctional fixes

This commit is contained in:
Eric Litak 2017-02-16 18:51:05 -08:00
parent da8f61d2ff
commit 9e1c0fdd42

View file

@ -69,7 +69,7 @@ makeConf() {
]; ];
} }
EOF 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 cat > /etc/nixos/hardware-configuration.nix << EOF
{ ... }: { ... }:
{ {
@ -123,8 +123,8 @@ EOF
}; };
}; };
services.udev.extraRules = '' services.udev.extraRules = ''
KERNEL=="eth*", ATTR{address}=="${ether0}", NAME="eth0" ATTR{address}=="${ether0}", NAME="eth0"
KERNEL=="eth*", ATTR{address}=="${ether1}", NAME="eth1" ATTR{address}=="${ether1}", NAME="eth1"
''; '';
} }
EOF EOF
@ -214,8 +214,11 @@ checkEnv() {
infect() { infect() {
# Add nix build users # Add nix build users
# FIXME run only if necessary, rather than defaulting true # 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 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 curl https://nixos.org/nix/install | $SHELL