!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

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


SenderMessageTime
27 May 2022
@hexa:lossy.networkhexaI'm slowly trying to migrate from morph, so some of the boilerplate is from that era15:04:27
@linus:schreibt.jetztLinux Hackermanmeta.nixpkgs should be an imported nixpkgs, not the path to a nixpkgs15:04:57
@hexa:lossy.networkhexaaccording to https://colmena.cli.rs/unstable/tutorial/index.html it can be … everything?15:05:15
@hexa:lossy.networkhexaalthough that may be something new from "unstable"15:05:25
@hexa:lossy.networkhexa
{
  meta = {
    # Override to pin the Nixpkgs version (recommended). This option
    # accepts one of the following:
    # - A path to a Nixpkgs checkout
    # - The Nixpkgs lambda (e.g., import <nixpkgs>)
    # - An initialized Nixpkgs attribute set
    nixpkgs = <nixpkgs>;
15:05:44
@hexa:lossy.networkhexafrom the 0.3 docs15:06:01
@linus:schreibt.jetztLinux Hackermanoh, hm. Might have been broken accidentally?15:06:06
@linus:schreibt.jetztLinux HackermanIt definitely doesn't support passing a path when using flakes15:06:55
@linus:schreibt.jetztLinux HackermanTry using an imported nixpkgs anyway maybe15:07:31
@hexa:lossy.networkhexa passed nixpkgs = import defaultPkgs {}; 15:08:45
@hexa:lossy.networkhexa
error: attribute 'path' missing

       at /run/user/1000/.tmpsGzWiX:396:26:

          395|       else pkgs;
          396|     evalConfig = import (npkgs.path + "/nixos/lib/eval-config.nix");
             |                          ^
          397|     assertionModule = { config, ... }: {
(use '--show-trace' to show detailed location information)
15:08:50
@hexa:lossy.networkhexafails 8 lines down, progress 😄15:09:22
@hexa:lossy.networkhexa *
let
  # niv sources
  sources = import ../nix/sources.nix;

  defaultArch = "x86_64-linux";
  defaultPkgs = sources."nixos-22.05";

  lib = import (defaultPkgs + "/lib");

  machines = {
    "foo.example.com" = {
      system = "aarch64-linux";
    };
    "bar.example.com" = {
      packages = source."nixos-21.11";
    };
  };

  mkMachine = hostName: { system ? defaultArch, packages ? defaultPkgs, tags ? [] }:
    {
      imports = [
        (./machines + "/${hostName}")
      ];

      nixpkgs = {
        inherit system;
      };
    };
in
{
  meta = {
    nixpkgs = defaultPkgs;

    nodeNixpkgs = lib.mapAttrs
      (hostName: { packages? defaultPkgs, ... }: packages)
    machines;
  };
} // (lib.mapAttrs mkMachine machines)
15:10:00
@linus:schreibt.jetztLinux Hackermanok, uh, I don't know. That should have a path attr!?15:19:20
@linus:schreibt.jetztLinux HackermanOh wait15:19:31
@linus:schreibt.jetztLinux Hackermanthe same applies to nodeNixpkgs.15:19:36

Show newer messages


Back to Room ListRoom Version: 6