| pkgs | ||
| configuration.nix | ||
| flake.nix | ||
| hardware-configuration.nix | ||
| home.nix | ||
| overlays.nix | ||
| README.md | ||
| shell.nix | ||
Nix Starter Config
This is a minimal (yet complete) nix flake for getting started with NixOS + home-manager.
What this provides
- NixOS configuration on
configuration.nix, accessible vianixos-rebuild --flake - Home-manager configuration on
home.nix, accessible viahome-manager --flake - Basic boilerplate for adding custom packages (under
pkgs) and overlays (onoverlays.nix). Acessible on your system, home config, as well asnix build .#package-name - Dev shell for bootstrapping, accessible via
nix develop
How to get started
Assuming you have a basic NixOS installation up and running:
Getting the repo
- Install git
- Clone this repo to somewhere acessible (i usually have a
/dotfilesfolder for this) - Add stuff you currently have on
/etc/nixos/configuration.nixtoconfiguration.nix, and/etc/nixos/hardware-configuration.nixtohardware-configuration.nix - If you're already using home-manager, add your stuff from
~/.config/nixpkgs/home.nixtohome.nix - Take a look at
flake.nix, filling out stuff marked byTODOs - Create a remote repo (github, gitlab, sr.ht, etc) and push your changes for safekeeping
Bootstrapping
- Run
nix-shell(ornix develop, if you already have flakes enabled) to bootstrap into flake-enabled nix and home-manager. - Run
sudo nixos-rebuild switch --flake .to apply system configuration - Run
home-manager switch --flake .to apply home configuration - Reboot!