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!

  • bruh11@sh.itjust.worksOP
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 days 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
      link
      fedilink
      English
      arrow-up
      0
      ·
      9 days 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!