hardware
- Hardware specific configurations per machinehelpers
- Utility functions put in the global namespacemodules
profiles
- Configurations for nixos/nix-darwin systembase
- Shared configurations for all systemsdarwin.nix
nixos.nix
shared.nix
gaming
- Launchers, emulators and drivers to enable gaming on linuxhomelab
laptop
- Nix darwin configuration for laptoppersonal
- NixOS configuration for workstationwork
- minimal NixOS development environment
scripts
- Shell scripts to automate some parts of bootstapping NixOS/nix-darin systemssecrets
- Per system runtime secrets encrypted with sops
Before you try building a nix configuration make sure you've generated a ssh key and derived the sops age key
KEY=~/.ssh/id_ed25519
# Optionally generate a new ssh key if you don't have one
ssh-keygen -t ed25519 -a 32 -C "Name you@email.com" -f $KEY
# Outputs sops age key to ~/.config/sops/age/keys.txt
./scripts/derive-key.sh $KEY
This step can be skipped for NixOS systems...
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
After installation, open a new terminal session to make the nix
executable available in your $PATH
. You'll need this in the steps ahead.
Important
If you're on a new system make sure to generate a hardware configuration
NAME=myname nixos-generate-config --show-hardware-config > ./hardware/$NAME.nix
Then import it for your system configuration in ./flake.nix
{
workstation = nixosSystem {
...
modules = base ++ [
...
./hardware/myname.nix
];
};
}
To build a configuration and switch to it for the first time run the script in ./scripts/rebuild-switch.sh
passing the desired profile name to it as the first argument like this:
./scripts/rebuild-switch.sh homelab
The avaiable system configurations are:
- NixOS
- personal
- homelab
- vps
- work
- Nix Darwin
- laptop
Note
Consider setting up your home directory on a fresh system with ./scripts/setup-home.sh
This will clone my dotfiles to the home directory and create ~/notes ~/projects etc..
All my favourite programs are wrapped and exported from my dotfiles repo
These are also included as a flake input in this repository and avaiable under dotfiles.pkgs
in the global namespace
# Open up new shell with all my configured software
nix develop github:juliamertz/dotfiles