The configuration is set up using a flake. You can theoretically rebuild the system by just running the following nixos rebuild command:
nixos-rebuild switch --flake github:markbeep/NixOS-config#mark
One line install everything:
nix-shell -p curl -p git --run "curl https://raw.githubusercontent.com/markbeep/nixos-config/main/install.sh | sh"
List of commands to copy the setup and having the setup locally:
# temporarily install git in the shell
nix-shell -p git
cd ~
git clone https://github.com/markbeep/NixOS-config ~/nixos-config
For applications that are in private repos (visdev) for example, the private keys and config needs to be added to the root user .ssh directory, since nixos-rebuild is ran as root.
Files ending in .priv
are private and encrypted with
git-crypt. To decrypt them (if you have the
permissions), you can simply run git-crypt unlock
or git-crypt unlock /path/to/file
if a key file is given.
Some files need to be copied over manually, since NixOS makes them read-only when copying them over. These include:
configs/kube/config.priv
to.kube/config
The WSL configuration can be used to quickly set up a WSL instance running NixOS.
Follow the documentation in the NixOS-WSL repo to install NixOS in WSL. Then copy the wsl-configuration.nix
to /etc/nixos/configuration.nix and run sudo nixos-rebuild switch
.
To finish setting up direnv, the following line has to be added to ~/.bashrc
:
eval "$(direnv hook bash)"