this post was submitted on 29 Nov 2026
744 points (99.1% liked)

linuxmemes

33607 readers
277 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry of any kind will not be tolerated. This is an LGBTQ+-friendly community -- if that is a problem for you, you should leave.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don't come looking for advice, this is not the right community.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves / tolerates / hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 3 years ago
    MODERATORS
     
    you are viewing a single comment's thread
    view the rest of the comments
    [–] balsoft@lemmy.ml 9 points 2 days ago* (last edited 2 days ago) (1 children)

    Eh, kinda but a lot more flexible.

    It basically just gives you a declarative language to build your own distro with, plus a bunch of pre-made packages/modules you can then configure and assemble into what you need. The end result of what you are building will be a script that (re)installs your entire OS (called "activation" in NixOS parlance). That OS will have a lot of immutable parts, similar to Silverblue, but you can easily change anything in your install by modifying the original declarative configuration, rebuilding it, and then re-running the activation script.

    That activation script can configure literally everything on your system, from bootloader to init to networking to services to your WM to app config. Mine even sets up the exact Librewolf UI layout. This means that when I get a new machine, I can just take the same config, add some hardware-specific stuff, and get my full work environment in minutes.

    Impermanence takes it a step further, where your entire root filesystem will be wiped on shutdown to be recreated by that activation script during boot, except for the files and directories you explicitly tell it to keep on disk. This means you can control exactly where your apps keep their state and how much of it is there, which is handy for backups and also keeps your system feeling fresh.

    Basically, here's what my mount looks like:

    none on / type tmpfs (rw,relatime,size=4194304k,mode=755)
    /dev/nvme0n1p2 on /persist type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /var/lib/nixos type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /nix type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /nix/store type ext4 (ro,nosuid,nodev,relatime,x-initrd.mount)
    /dev/nvme0n1p2 on /etc/machine-id type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /home/balsoft/.config/kdeconnect type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /home/balsoft/.config/nheko type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /etc/ssh type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /etc/NetworkManager/system-connections type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /home/balsoft/.config/JOSM type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /home/balsoft/.librewolf/default type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /home/balsoft/.local/share/JOSM type ext4 (rw,relatime)
    /dev/nvme0n1p2 on /home/balsoft/.local/share/cargo type ext4 (rw,relatime)
    <...>
    

    So, I have a list of directories which will be kept on-disk, and the root filesystem (including /home) is just a tmpfs which is destroyed on shutdown.

    [–] ytg@sopuli.xyz 1 points 2 days ago (1 children)

    Read-only Nix store? How does that work?

    [–] balsoft@lemmy.ml 4 points 2 days ago (2 children)

    It's mounted twice, ro for the world and rw in the daemon mount namespace

    [–] ytg@sopuli.xyz 3 points 2 days ago (1 children)

    ah that's cool! When your mount has the same partition for different mountpoints how does that work? Some kind of bind-mount?

    [–] balsoft@lemmy.ml 2 points 2 days ago* (last edited 2 days ago)

    Yep, it's all bind mounts from /persist/<path> to /<path> where /persist is the actual root of the storage device.

    While setting this up, I was surprised to learn that you can just bind mount files and it works, in my mind it was only supposed to work on directories.

    [–] rumba@lemmy.zip 2 points 2 days ago (1 children)

    And everything in there is referenced by hash, so it's actually a little bit of work to inject something in there without your express written consent :)

    [–] balsoft@lemmy.ml 3 points 2 days ago (1 children)

    Well, trusted-users (which I am) can kinda just inject shit into the store via a poisoned substituter.

    But yeah otherwise it's supposed to be secure

    [–] rumba@lemmy.zip 2 points 1 day ago

    Yeah, that's how most of our development works :)