this post was submitted on 29 Aug 2025
156 points (94.8% liked)

linuxmemes

27680 readers
1169 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 will not be tolerated.
  • 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.
  • 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 2 years ago
    MODERATORS
    156
    sudo nixos-rebuild switch (anarchist.nexus)
    submitted 1 month ago* (last edited 1 month ago) by fxomt@anarchist.nexus to c/linuxmemes@lemmy.world
     
    you are viewing a single comment's thread
    view the rest of the comments
    [–] eierschaukeln@kbin.earth 17 points 1 month ago (21 children)

    Info:

    nixos-rebuild switch = build the new system configuration (from /etc/nixos/configuration.nix or flakes) and activate it immediately without reboot.

    • It builds the new system in /nix/store.
    • Updates the GRUB/systemd-boot entries.
    • Switches to the new configuration right away (systemd units, services, kernel params if possible, etc.).
    • Leaves the old generations available for rollback (nixos-rebuild switch --rollback).

    So: "switch" means build + activate now

    [–] enbiousenvy@lemmy.blahaj.zone 8 points 1 month ago (20 children)

    I never use nixos, but I just got intrusive thought to make that command get invoked automatically every time the config file is modified.

    [–] clay_pidgin@sh.itjust.works 3 points 1 month ago (9 children)

    I'm only two days into Nixos, but I don't think that would be a problem. I am at 14 generations of my system already, and it asks me every boot which generation I want to start. It's trivial to scroll down and pick an earlier (working) version.

    One thing that might be nice would be if that menu indicated how many times each generation had been booted and used for more than 10 min, so I could tell which ones were "real" versions and which were transitional.

    [–] brrt@sh.itjust.works 2 points 1 month ago (2 children)

    I don’t have the command at hand but you can name versions.

    [–] clay_pidgin@sh.itjust.works 5 points 1 month ago (1 children)

    Ooh that's handy.

    NIXOS_LABEL="changed-some-settings" nixos-rebuild switch

    [–] brrt@sh.itjust.works 4 points 1 month ago (1 children)

    Also, since you’re already 14 versions deep you should probably implement automatic “garbage collection”.

    [–] clay_pidgin@sh.itjust.works 1 points 1 month ago

    Will do. I'm worried about deleting the one good version while I'm still building the system.

    load more comments (6 replies)
    load more comments (16 replies)
    load more comments (16 replies)