Skip to content
NixOS configuration for all my computers/servers (except, sadly, my phone...)
Nix Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build and deploy

To build and deploy a system either:

Symlink a machine file in daniel/machines to /etc/nixos/configuration.nix and run

nixos-rebuild -I nixpkgs=(nix eval --raw '(import ./daniel/nixpkgs-channel.nix).url') -I nixos-hardware=(nix eval --raw '(import ./daniel/sources/nixos-hardware.nix).url') test

Or nix-build -I nixpkgs=(nix eval --raw '(import ./daniel/nixpkgs-channel.nix).url') -I nixos-hardware=(nix eval --raw '(import ./daniel/sources/nixos-hardware.nix).url') '<nixpkgs/nixos>' -A system and run ./result/bin/switch-to-configuration test to enable it.

Or invoke nix-build -E "(import ./daniel/system.nix) ./daniel/machines/acer-laptop.nix" with the . You can copy the resulting closure to a target system and run ./result/bin/switch-to-configuration test to enable it.

Update pinned repos

The nixpkgs and nixos-hardware repos should be updated regularly to get recent updates.

Building without internet

You can't use the -I parameters because they access the internet at evaluation time. To prevent the reset from accessing the internet use --option binary-caches "" - that only works if there are no new packages that need to be built.

Information about the system

Show all configured systemPackages across all config files of the currently running config:

nix-instantiate --strict --json --eval -E ' (p: (import <nixpkgs/nixos> {}).config.environment.systemPackages'
You can’t perform that action at this time.