HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nix-community
nixos-anywhere
Shell2023–2026
nix-community / nixos-anywhere

nixos-anywhere

Install NixOS everywhere via SSH [maintainers=@Mic92 @Lassulus @phaer @Enzime @a-kenji]

10Distinct people
15Mentions
0Explicit recommenders
3.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Install NixOS everywhere via SSH [maintainers=@Mic92 @Lassulus @phaer @Enzime @a-kenji]

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year15 dated mentions

Observed mentions: 2023-04-02 06:19:58 UTC to 2026-03-24 15:10:18 UTC.

02462023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC624
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC505
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC202

What Hacker News says

15 sources
It’s fairly trivial to map your NixOS config into a VM image: https://nixos.org/manual/nixos/stable/#sec-image-nixos-rebui... An alternative is to “infect” a VM running in whatever cloud and convert it into a NixOS VM in-place: https://github.com/nix-community/nixos-anywhere In fact, it is a common practice to use the latter to install NixOS on new machines. You start off by booting into a live USB with SSH enabled, then use nixos-anywhere to install NixOS and partition disks via disko. Here is an example I used recently to provision a new gaming desktop: nix run github:nix-community/nixos-anywhere -- \ --flake .#myhost \ --target-host user@192.168.0.100 \ --generate-hardware-config nixos-generate-config ./hosts/myhost/hardware-configuration.nix At the end of this invocation, you end up with a NixOS machine running
Read the rest
your config partitioned based on your disk config. My disko config in this case (ZFS pool with 1 disk vdev): https://gist.github.com/aksiksi/7fed39f17037e9ae82c043457ed2...
In Coding Agent VMs on NixOS with Microvm.nix
And for cloud/dedicated servers perhaps https://github.com/nix-community/nixos-anywhere (There's also a terraform module ) And for state changes https://github.com/serokell/deploy-rs Or Colmena /nixops/ and x other For secret handling perhaps https://github.com/ryantm/agenix/ + https://github.com/oddlama/agenix-rekey The ecosystem is in my experience very well fleshed out (7 yrs of use), as long as you don't require a knowledgebase/wiki/ up2date documentation, it's not been a issue for me since I could always fall back on Linux knowledge and just looking for how other distributions do x / how the thing itself is configured , and looking at how perhaps a existing nix module wraps that
In NixOS is a good server OS, except when it isn't
nixos-anywhere is a tool that allows you to do something similar (?) to install NixOS in-place on a remote machine (using kexec “magic” under the hood). https://github.com/nix-community/nixos-anywhere I tried it on a Hetzner VPS and was honestly pretty surprised that it even worked. What makes it even cooler is that you can continue to rebuild the machine’s config remotely even after initialization (thanks to NixOS).
In OpenBSD 7.5 via QEMU on Hetzner physical machine (no phys. access / KVM console)
Nonetheless, Nix/NixOS is more reproducible than the majority of other build systems and distros out of the box. But yes, if this is a hard requirement, you’ll be better off with a different choice. Keep in mind that this is but one of the features NixOS provides. I would say the config-driven approach to OS management is extremely powerful. As an example, I could bring up my homelab’s external reverse proxy on a generic VPS in a few minutes over SSH using a single command. This includes SSH keys, Telegraf, Nginx with LetsEncrypt certs, and automatic OS upgrades. No Ansible needed :) See: https://github.com/nix-community/nixos-anywhere
In Rebuilding my homelab: Suffering as a service
I'm now running impermanence on NixOS servers. Setting it up was slightly more work, obviously, but it's been... freeing in a sense. My confidence that I can rebuild all servers at any time and that all the peculiarities of my setup are documented have never been higher. Rather than using a script for setup, I am using disko [0] with nixos-anywhere [1] and a small home-grown script that integrates with 1Password for deployments and it's wonderful, because everything including disk formatting is now purely declarative. [0] https://github.com/nix-community/disko [1] https://github.com/numtide/nixos-anywhere
In Impermanence
> but it requires fiddling with partitions by hand Nowadays you can declare partitioning instructions with Nix just like the rest of the system: https://github.com/nix-community/disko And you can use something like nixos-anywhere with it for a alternative process, if your provider isn't as cool as Linode and won't let you boot arbitrary ISOs: https://github.com/numtide/nixos-anywhere Building images directly for cloud vendors' platforms on your local system and then pushing them up and assigning them to VMs is probably nicer than actually installing NixOS in the cloud, though. See this comment's siblings for that :)
In NixOS RFC 136 approved: A plan to stabilize the new CLI and Flakes incrementally

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.