My personal NixOS and home-manager configuration files
AGPL-3.0 License
This repository contains my personal Nix configurations for:
To install on a NixOS system:
git clone [email protected]:Jesalx/nixos-config.git ~/nixos-config
cd ~/nixos-config
sudo nixos-rebuild switch --flake .#default
For macOS systems, first install the Nix package manager. You have two options:
Using the Determinate Systems installer should eliminate the need for extra experimental features flags in the following commands.
Next, install Home Manager:
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
After installing Nix and Home Manager, set up the configuration:
git clone [email protected]:Jesalx/nixos-config.git ~/nixos-config
cd ~/nixos-config
home-manager switch -b backup --flake .#PROFILE --extra-experimental-features nix-command --extra-experimental-features flakes
Replace PROFILE
with the appropriate profile name for the device.
If you haven't already, then you should generate an SSH key pair.
ssh-keygen -t ed25519 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
For convenience, several custom commands that wrap the regular nix commands are available to help manage your Nix environment:
Command | Description |
---|---|
jp-test |
Tests the current configuration without making retaining changes on reboot. |
jp-switch |
Builds and activates the current configuration, making it the new default at boot. |
jp-update |
Update the flake and apply changes (equivalent to running nix flake update followed by jp-switch ) |
jp-clean |
Cleans up old generations of your nix/home-manager profiles and optimizes the Nix store. |