This is a repository for my NixOS configuration.
You can boot from the custom ISO which comes with Git, my custom Neovim build, and flakes pre-enabled.
Download the latest pre-built ISO from the Releases page, or build it locally:
just isoThen write it to a flash drive:
just iso-install /dev/sdXNote
If you don't have the custom ISO, a standard NixOS installer works too. You will just need to enter a Nix shell with Git first:
nix-shell -p git-
Clone the Git repository.
git clone https://github.com/BastianAsmussen/dotfiles.git ~/dotfiles cd ~/dotfiles
-
Enter the provided Nix development shell.
nix develop
Note
On a standard NixOS installer without flakes enabled, use the compatibility shell instead:
nix-shell --experimental-features 'nix-command flakes'-
Choose a host.
-
View available host options.
HOSTNAME=$(ls modules/nixosModules/hosts | fzf) -
Set manually, e.g.
lambda.HOSTNAME=lambda
-
-
Set up the disk configuration.
just disko $HOSTNAME -
Finally, install NixOS with the given configuration.
just install $HOSTNAME
-
error: creating pipe: Too many open filesSimply increase the open file limit, i.e. setting it to
2048.ulimit -n 2048 -
warning: download buffer is full; consider increasing the 'download-buffer-size' settingIt's worth to consider increasing the download buffer during installation. Like the warning suggests, this can be accomplished by increasing the
download-buffer-sizesetting; pass--option download-buffer-size nwherenis the buffer size to thenixos-installcommand from step 5.
Important
Remember to change the password of the user!
-
I recommend updating the flake.lock file about once per week.
just upgrade
Note
If it can't build, roll back the flake.lock file to a
previous version.
Running git restore flake.lock should be sufficient.
-
Move the host directory, e.g.
lambda->epsilon.mv modules/nixosModules/hosts/lambda modules/nixosModules/hosts/epsilon
-
Switch to new configuration.
just rebuild epsilon
Warning
The hostname won't update automatically!
To update the hostname, either reboot the computer, or restart the current session.
I track stuff I need to get done and stuff that annoys me about my current
setup in a file called TODO.md.
If you have suggestions or notice something that could be improved, feel free
to open a pull request. I'll review and consider integrating your
contributions.
You can use this flake for development environment templates.
nix-shell -p jq --run "nix flake show self --json 2>/dev/null | jq '.templates | map_values(.description) | del(.default)'"Note
Because we override the Nix registry
here, we can simply use the self registry
entry which references this flake.
mkdir ~/Projects/example
cd ~/Projects/example
nix flake init -t self#rust
./init.sh