operating system - NixOS Error on Declarative User Create -
new nixos, , trying out basic setup, including adding new user. i'm sure simple fix. need know setting put in. pastebin details here.
these partial contents of /etc/nixos/configuration.nix
. created nixos stock vagrant box: https://github.com/zimbatm/nixbox .
{ ... users = { extragroups = [ { name = "vagrant"; } { name = "twashing"; } { name = "vboxsf"; } ]; extrausers = [ { description = "vagrant user"; name = "vagrant"; ... } { description = "main user"; name = "user1"; group = "user1"; extragroups = [ "users" "vboxsf" "wheel" "networkmanager"]; home = "/home/user1"; createhome = true; usedefaultshell = true; } ]; }; ... }
and these errors when calling nixos-rebuild switch
, rebuild environment. user1 doesn't seem added properly. , can't su
after command run. how declaratively create users, , set groups?
$ sudo nixos-rebuild switch building nix... building system configuration... updating grub 2 menu... stopping following units: local-fs.target, network-interfaces.target, remote-fs.target activating configuration... setting /etc... useradd: group 'networkmanager' not exist chpasswd: line 1: user 'user1' not exist chpasswd: error detected, changes ignored id: user1: no such user id: user1: no such user /nix/store/1r443r7imrzl4mgc9rw1fmi9nz76j3bx-nixos-14.04.393.6593a98/activate: line 77: test: 0: unary operator expected chown: missing operand after ‘/home/user1’ try 'chown --help' more information. /nix/store/1r443r7imrzl4mgc9rw1fmi9nz76j3bx-nixos-14.04.393.6593a98/activate: line 78: test: 0: unary operator expected chgrp: missing operand after ‘/home/user1’ try 'chgrp --help' more information. starting following units: default.target, getty.target, ip-up.target, local-fs.target, multi-user.target, network-interfaces.target, network.target, paths.target, remote-fs.target, slices.target, sockets.target, swap.target, timers.target
Comments
Post a Comment