13
am I on nixos-unstable? (sh.itjust.works)

new to nixos. I have found a flake.nix file on the internet which I used to build my system. in that flake file I found the following line:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    antigravity-nix = {
      url = "github:jacopone/antigravity-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { self, nixpkgs, antigravity-nix, ... }: {
    nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
	./configuration.nix
	./hardware-configuration.nix
        {
          environment.systemPackages = [
            antigravity-nix.packages.x86_64-linux.default # Base App
            antigravity-nix.packages.x86_64-linux.google-antigravity-ide # IDE
            antigravity-nix.packages.x86_64-linux.google-antigravity-cli # CLI
          ];
        }
      ];
    };
  };
}

if I understood correctly the flake also has outputs variable in the attribute set and it's returning nixpkgs whose url is set to the unstable. does it mean I am running unstable version of nixos?

Thanks in advance!

top 10 comments
sorted by: hot top new old
[-] InnerScientist@lemmy.world 2 points 11 hours ago

Yes you're following nixpkgs unstable, the exact version can be seen in your flake.lock file (or updated using nix flake update)

[-] talkingpumpkin@lemmy.world 8 points 1 day ago

It's on line 3: nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable".

Change it to github:NixOS/nixpkgs/nixos-26.05 for the latest nixos stable (which is not rolling, meaning you'll have to update the URL every now and then)

[-] bruh11@sh.itjust.works 1 points 1 day ago

will antigravity-nix package keep working even if I move from unstable to stable? won't there be some versioning issue if I do so

[-] hallettj@leminal.space 2 points 7 hours ago

If antigravity doesn't work on stable I suggest that you remove the inputs.nixpxgs.follows = "nixpkgs" line so that antigravity uses the package set from its own lock file. Nix is especially good at tolerating multiple package sets / dependency versions on the system. The main drawback is you'll download more, and use more disk space.

If it doesn't work you can undo by reverting the changes to flake.nix to switch back to unstable and to put that line back. Then rebuild. If you want to get back to exactly the same state as before then also revert changes to flake.lock.

If you're used to other distros you might be used to package manager operations making changes you can't undo. That doesn't happen on NixOS - you can undo pretty much anything. Even if you get an unbootable system, you can select the previous generation from the boot menu. The best thing about NixOS is experimenting with few consequences!

[-] bruh11@sh.itjust.works 1 points 3 hours ago

Thanks, will do!

[-] talkingpumpkin@lemmy.world 5 points 1 day ago

No idea. The documentation of that antygrvity thing should tell you

[-] hallettj@leminal.space 2 points 1 day ago

Yes, you are on unstable, and your analysis is correct.

[-] libewa@feddit.org 2 points 1 day ago

Nevertheless, you regularly should run nix flake update --commit-lock-file in your configuration directory (by default, /etc/nixos), and then rebuild, as flakes never auto-update. Think of these commands as apt update and apt full-upgrade. The stable vs unstable channel only differ in when major updates are released. In my opinion, there is nothing wrong with running unstable, at least on a desktop, and I even use it on my server. You shouldn't see it as unstable as on Debian, but as rolling, like Debian testing, OpenSUSE Tumbleweed, or Arch.

[-] rozodru@piefed.world 1 points 1 day ago

Also keep in mind you don't need to run the flake update often. I'm on unstable and I run it like once a month. it's not like say Arch sudo pacman -Syu where you could literally run that every day if you wanted. I mean sure you COULD run the flake update everyday but if you want to do that you might as well just use Gentoo.

[-] libewa@feddit.org 2 points 1 day ago

I do it once a week, and if something breaks (which does sometimes happen), I roll back and retry after a few days, maybe file a ticket.

this post was submitted on 14 Sep 2026
13 points (100.0% liked)

Nix / NixOS

2876 readers
13 users here now

Main links

Videos

founded 3 years ago
MODERATORS