Install NixOS on Kimsufi: Difference between revisions
imported>Joscherrer m Add command to disable sandboxing. Create /etc/sudoers.d/setupuser instead on modifying /etc/sudoers |
|||
| (2 intermediate revisions by one other user not shown) | |||
| Line 37: | Line 37: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# Create a user for the install process | |||
useradd -m setupuser | |||
# Create a user for the Nix daemon | # Create a user for the Nix daemon | ||
groupadd -g 30000 nixbld | groupadd -g 30000 nixbld | ||
useradd -u 30000 -g nixbld -G nixbld nixbld | useradd -u 30000 -g nixbld -G nixbld nixbld | ||
# Set this to something you will remember, you'll need it in a moment | # Set this to something you will remember, you'll need it in a moment | ||
| Line 62: | Line 63: | ||
# The default channel is `nixpkgs-unstable`, let's switch to a stable NixOS channel | # The default channel is `nixpkgs-unstable`, let's switch to a stable NixOS channel | ||
nix-channel --add https://nixos.org/channels/nixos- | nix-channel --add https://nixos.org/channels/nixos-22.11 nixpkgs | ||
nix-channel --update | nix-channel --update | ||
| Line 116: | Line 117: | ||
You will probably encounter an error when you connect because the SSH host key will have changed. You can fix this with ssh-keygen -R 192.0.2.1 (replacing the IP with the one for your machine), and then try again. Hopefully you’ve now got a new NixOS machine up and running and ready to do whatever you need it to do. | You will probably encounter an error when you connect because the SSH host key will have changed. You can fix this with ssh-keygen -R 192.0.2.1 (replacing the IP with the one for your machine), and then try again. Hopefully you’ve now got a new NixOS machine up and running and ready to do whatever you need it to do. | ||
[[Category:Deployment]] | |||