!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

316 Members
A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena107 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
1 Jun 2023
@raphi:tapesoftware.netraphi changed their display name from raphi to raphi (element unread channel fix when).13:03:27
@solomon:cofree.coffee@solomon:cofree.coffee joined the room.18:38:18
2 Jun 2023
@alpha-centauri:matrix.orgAlexander joined the room.16:43:44
@alpha-centauri:matrix.orgAlexander

Hi there.
Have a question about nixpkgs per node inside a flake. I'm trying following configuration likewise in manual for a hive:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/7076110064c09f0b3942f609f2134c1358ef2e50";
  };

  outputs = { nixpkgs, ... }: {
    colmena = {
      meta = {
        nixpkgs = import nixpkgs {
          system = "x86_64-linux";
          overlays = [];
        };

        nodeNixpkgs.desktop = ./nixpkgs-23.05;
      };

      desktop = import ./desktop.nix;
    };
  };
}

But it does not work:

error: Passing a path to Nixpkgs as meta.nodeNixpkgs.pc is no longer accepted with Flakes.
       Please initialize Nixpkgs like the following:

       {
         # ...
         outputs = { nixpkgs, ... }: {
           colmena = {
             meta.nodeNixpkgs.pc = import nixpkgs {
               system = "x86_64-linux"; # Set your desired system here
               overlays = [];
             };
           };
         };
       }

Is it possible somehow to pin specific version of nixpkgs for a host in flake configuration?

16:53:06
@alpha-centauri:matrix.orgAlexander *

Hi there.
Have a question about nixpkgs per node inside a flake. I'm trying following configuration likewise in manual for a hive:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/7076110064c09f0b3942f609f2134c1358ef2e50";
  };

  outputs = { nixpkgs, ... }: {
    colmena = {
      meta = {
        nixpkgs = import nixpkgs {
          system = "x86_64-linux";
          overlays = [];
        };

        nodeNixpkgs.desktop = ./nixpkgs-23.05;
      };

      desktop = import ./desktop.nix;
    };
  };
}

But it does not work:

error: Passing a path to Nixpkgs as meta.nodeNixpkgs.pc is no longer accepted with Flakes.
       Please initialize Nixpkgs like the following:

       {
         # ...
         outputs = { nixpkgs, ... }: {
           colmena = {
             meta.nodeNixpkgs.desktop = import nixpkgs {
               system = "x86_64-linux"; # Set your desired system here
               overlays = [];
             };
           };
         };
       }

Is it possible somehow to pin specific version of nixpkgs for a host in flake configuration?

16:53:51
@zhaofeng:zhaofeng.liZhaofeng Li nodeNixpkgs.desktop has to be an initialized package set (see the error message), not a path 17:00:00
@zhaofeng:zhaofeng.liZhaofeng Li It accepts the exact type as meta.nixpkgs 17:00:18
@alpha-centauri:matrix.orgAlexander

There is only example for hive.nix:

    nodeNixpkgs = {
      node-b = ./another-nixos-checkout;
    };

I cannot find out where I should place a path to a nixpkgs when using flake

17:04:21
@zhaofeng:zhaofeng.liZhaofeng LiJust copy the nixpkgs pinning your have above17:05:27
@zhaofeng:zhaofeng.liZhaofeng LiBut there is no need to pin separately when it's the only node17:05:37

Show newer messages


Back to Room ListRoom Version: 6