Sample nix-based user config for our server.
-
Fork this repo under your own name
-
Setup
ssh
on the server:mkdir ~/.ssh && chmod 700 ~/.ssh
- Copy your
~/.ssh/id_rsa.pub
to the server as~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
- Copy your private key:
~/.ssh/id_rsa
to the server as~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
-
Clone your fork of this repo somewhere on the server, with
ssh
protocol -
In
flake.nix
, change these based on your user config:# change these yourself homeDirectory = "/home/physicist"; username = "physicist";
-
In
profiles/git/default.nix
, change:user.name = "Physicist"; user.email = "[email protected]";
-
If you want to install new packages, change
flake.nix
:home.packages = with pkgs; [ # ... # define additional packages here # you can search the package names on https://search.nixos.org/packages ];
-
nix develop -c home-switch
-
chsh -s $(which zsh)
-
Logout and re-login. Enjoy!