NixOS Server Setup

NIX SERVER-SETUP : a simple script to automate this

currently none provide with nix-images thus have to use conversion !

SSH to server and run

sudo -s curl | NIX_CHANNEL=nixos-21.11 bash -x

You will be logged out after OS is converted to NixOS ! Login again and proceed .

add to /etc/nixos/configuration.nix for default shell =;

copy local ~/.ssh/ to server or create a new one as below

ssh-keygen -t ed25519 -C ''
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/ #paste this in github

Fetching configs

nix-env -iA nixos.home-manager
nix-shell -p git --run "git clone --recursive -b server ~/.config/nixpkgs"
home-manager switch

Setup Complete !!

Note: do not forget to set root password !