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

impermanence

Modules to help you handle persistent state on systems with ephemeral root storage [maintainer=@talyz]

14Distinct people
14Mentions
1Explicit recommenders
1.9KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Modules to help you handle persistent state on systems with ephemeral root storage [maintainer=@talyz]

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

I use colmena[1] to manage one nixos configuration for multiple machines: - laptop - desktop - server - rpi nas I also wipe my entire rootfs every boot with a zfs snapshot…

techhazard used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

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

Also in these discussions

No other repository is repeatedly linked in the same discussions.

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 year14 dated mentions

Observed mentions: 2022-01-24 18:10:48 UTC to 2026-08-26 08:04:19 UTC.

012342022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 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
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC404
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC404
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

14 sources
Look, I try to avoid bringing up nix in unrelated conversations. But. > The only two options I have is a) do a factory reset and reinstall software from scratch and spend time configuring things again, or b) live with all of the extra garbage that has been excreted by the software on my systems just so that I can keep the data that I actually want to keep. NixOS solves this. > My ideal system would separate data that was written because of me (non-default config values, bookmarks, etc) from documents etc made by me, from garbage that the program wants to write that I absolutely do not care about and do not want to know about. And NixOS with https://github.com/nix-community/impermanence does this, forcefully. Actually normal nix might solve it depending on how far you want to go. Again, I wouldn't usually try to evangelize it, but you have
Read the rest
described your ideal system, and it exists.
In Queryable Executables
> As an example, nixos keeps state around regarding user id/username mappings, to avoid giving the same user id to different users across time. So a fresh install of nixos might leave services unable to read their data files, because the file might be owned by a different user id. One reason to set `mutableUsers = false`: https://mynixos.com/nixpkgs/option/users.mutableUsers. > And if you activate and enable incus, for instance, it will probably create a bridge device: the device will remain in place after you remove incus, which will have implications for how your network/firewall works that your configuration will depend on but will not enforce or be able to reproduce. Impermanence: https://github.com/nix-community/impermanence. To be clear, I don't use neither. But you can get NixOS to be almost completely stateless (if this is somethi
Read the rest
ng you care) with a few changes. The power is there, but it is disabled by default because it is not the pragmatic choice in most cases.
In Why I love NixOS
A lot of these problems seem pretty solveable, if you're the admin of the machine (or cloud system) and the user isn't. If you don't want a user to log in as root, disable the root password (or change it to something only you know) and disable root ssh. If you want people to stop sharing the same login and password across all servers, there's several ways to do it but the most straightforward one seems like it would be to enforce the use of a hardware key (yubikey or similar) for login. If people aren't using configuration management software and are leaving machines in an inconsistent state, again there are several options but I'd look into this NixOS project: https://github.com/nix-community/impermanence + some policy of rebooting the machines regularly. If you don't like how users are making use of AWS resources and secrets, then set u
Read the rest
p AWS permissions to force them to do so the correct way. In general if someone is using a system in a bad or insecure way, then after alerting them with some lead time, deliberately break their workflow and force them to come to you in order to make progress. If the thing you suggest is actually the correct course of action for your organization, then it will be worthwhile.
In Advent of Sysadmin 2025
This is a tough problem to solve. I currently use NixOS with impermanence [1] which is one way of solving it. Impermanence, in short, allows you to explicitely opt-in the files and directories that are persisted after each reboot. So while my `~` is not "clean" in the sense that all my config files are in `~/.config`, it is "clean" in the sense that all files in `~` are there for a reason (i.e., `~` is not polluted by the old config/cache of uninstalled packages). [1] https://github.com/nix-community/impermanence
In Xdg-ninja: checking your $HOME for unwanted files and directories
Mostly private use, I have 2 servers and a laptop configured with this: https://github.com/matrss/nixfiles. The servers host a bunch of different services from Nextcloud to a DoT-to-ODoH proxy and some more. I've also introduced some light NixOS usage at work (3 hosts, one is an uptime-kuma instance, two are Forgejo Actions runners). For that I had to get some proprietary scanner software to run on it, which I could by just putting the extracted deb package in an emulated FHS environment and setting up a service for it, all declaratively. Even for interfacing with legacy systems and unusual stacks I don't think you will need the escape hatch. Anything that is buildable on and above the abstraction-level of "ensure a file is present at some path with some content" should be doable declaratively, and that includes setting up an unusual soft
Read the rest
ware stack and running it in systemd services to communicate with some other legacy system or whatever. The escape hatch is there to modify how NixOS itself behaves, and modifying that should only be necessary to extend NixOS' core functionality. A quick search revealed that impermanence (https://github.com/nix-community/impermanence) and in some cases sops-nix (https://github.com/Mic92/sops-nix) use it, but those fundamentally extend NixOS with ephemeral root storage support and secrets management, respectively.
In NixOS is not reproducible
I would not call these projects unbelievable, but they are neat. Opt-in state: https://github.com/nix-community/impermanence https://grahamc.com/blog/erase-your-darlings Ease of setting up a real-time audio on Linux: https://github.com/musnix/musnix Generating virtual machines/installators from a configuration: https://github.com/astro/microvm.nix https://github.com/nix-community/nixos-generators It's interesting to scroll through nix-darwin options, I wasn't even aware of some useful macOS options before: https://daiderd.com/nix-darwin/manual/index.html A neat collection of music information retrieval packages in one place (and the ease of creating your own package registry): https://github.com/carlthome/mirpkgs
In Tvix – A New Implementation of Nix
I'd say yes, to an extent, although you don't get all of the benefits of immutable Linux this way. A good immutable Linux distro does some work to make sure that - upgrades/changes are atomic - it's very clear whose responsibility it is to track what state, i.e., what parts of the filesystem are snapshotted and when - it's easy to revert to any snapshot at boot time - you're unlikely to have 'gaps' where you wish there was a snapshot but there isn't one - snapshotting applies to configuration changes as well as package (un)installation You can get most of those benefits of the box on openSUSE or other distros where the default filesystem is copy-on-write and the package manager is configured to take snapshots for you. You can also get something like that for configuration management via etckeeper, which gives you version contro
Read the rest
l for system-wide config files. A distro which only takes these steps may not always be considered 'immutable Linux' as immutable distros typically go further, either in limiting what changes are possible outside the blessed methods (which generate new snapshots) or how what kinds of configuration/persistence it manages. But at some point it's just a question of degrees. As it happens, snapshotting with automatic reversion is an approach some take with NixOS to better ensure that its configuration management is comprehensive. You can force all of your persistence requirements to be explicit by reverting to an old snapshot on boot. Blog post which (afaik) first presented this idea to the community: https://grahamc.com/blog/erase-your-darlings/ Common implementation for NixOS: https://github.com/nix-community/impermanence Presentation on that implementation from NixCon 2023 (just a couple weeks ago!): https://www.youtube.com/watch?v=QtBouFMyrWg
In Introduction to Immutable Linux Systems
techhazard·Jun 9, 2023Recommendation phrase
I use colmena[1] to manage one nixos configuration for multiple machines: - laptop - desktop - server - rpi nas I also wipe my entire rootfs every boot with a zfs snapshot rollback[2] using the impermanence module[3] to keep specific stateful data one one of two datasets with regular snapshots: one is backed up with zfs send, the other is just for cache between reboots. It took a little puzzling to get started, because I didn’t know about the impermanence module at first, so I built my own hacky solution. But I really love this setup. And the way I don’t have cruft to clean. Also my backups are so much smaller now :’-) [1]: https://colmena.cli.rs/ [2]: https://grahamc.com/blog/erase-your-darlings/ [3]: https://github.com/nix-community/impermanence
In NixOS for the Impatient
Great introduction and overview on the theoretic foundations of the nix ecosystem! For people new to it, I am trying to provide a quick glossary of terms here, as I understand them after about 2 years of using nix. * nix: a language to create derivations and the interpreter/package-manager which provides the implementation of said language. It currently offers two command-line interfaces, the stable on with hyphenated commands like "nix-build", "nix-shell", etc. And the newer, "experimental" one which includes support for nix flakes and so on, without hyphens: nix build, nix shell, nix run, etc. repo: https://github.com/nixos/nix docs: https://nixos.org/manual/nix/stable/ * nixpkgs & nixos is a huge mono-repo containing instructions how to fetch the source of tenthousands of software packages and how to build them on supported plat
Read the rest
forms. It also contains the whole nixos operating system and tooling to support all of that. repo: https://github.com/NixOS/nixpkgs docs: https://nixos.org/manual/nixpkgs/stable/ docs nixos: https://nixos.org/manual/nixos/stable/ This tooling includes higher-level helpers for language-/environment-specific packaging, like "buildGoModule", "buildRustPackage" and so on, as well as e.g. tooling to run integration tests in a whole cluster of inter-connected linux VMs! Packages which are submitted to nixpkgs must fulfill certain criteria, such as not using "IFD" (input-from-derivation, to simplify: "letting nix evaluate nix-code which was generated by another deriviation/"nix package". nixpkgs is alive and well with lots of daily contribution and an everlasting effort to keep Hydra, the nix-specific CI/CD system and public binary caches up to date and responsive. Thanks to all maintainers & contributors! * flakes are an approach to standardize a way to package nix code outside of nixpkgs but to still keep it re-usable. They are still "experimental" as the details are figured out, but nevertheless used in production. There are some frame-works to keep boilerplate low, like "flake-utils", "flake-parts" and others, as well as e.g. deployment tools like "colmena" and "deploy-rs" and re-usable helpers for system-configuration like e.g. https://github.com/nix-community/impermanence There's lots of other stuff in the community, things like home-manager, direnv + flakes and devshells changed my workflow fundamentally to the better since I've switched. If you got the time and are still interested, join us on matrix or elsewhere :) https://github.com/nix-community/awesome-nix
In Nix: Taming Unix with Functional Programming

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.