| 3 Jan 2022 |
angerman | Yea, I'm holding it wrong ;-) | 07:14:57 |
angerman | so I should initialize the nixpkgs with the controller system? | 07:15:16 |
Zhaofeng Li | Hmm, there isn't support for nix-darwin at the moment, only NixOS | 07:15:20 |
Zhaofeng Li | In reply to @angerman:matrix.org so I should initialize the nixpkgs with the controller system? controller system? | 07:15:39 |
angerman | Ohh... 😥 | 07:15:46 |
angerman | controller/deployer (whatever we call the machine from which we deploy). | 07:16:11 |
Zhaofeng Li | You should initialize with the target system (x86_64-linux, aarch64-linux, etc). | 07:17:12 |
Zhaofeng Li | Currently you can use the remote build feature to deploy from macOS to NixOS, but not to macOS. It should be fairly easy to add, however, since the semantics are similar | 07:18:37 |
Zhaofeng Li | * Currently you can use the remote build feature to deploy from macOS to NixOS, but not to macOS. It should be fairly easy to add, however, since the semantics are similar (with nix-darwin) | 07:19:07 |
angerman | Hmm. Yea, I've got a variety of {x86_64,aarch64}-{linux,macos} systems in my deployment. macos for now requires ssh'ing into the machine, updagint the nix configuration and running darwin rebuild. | 07:24:37 |
| 4 Jan 2022 |
| aanderse joined the room. | 22:16:50 |
| * aanderse waves 👋 | 22:18:54 |
| Buckley joined the room. | 22:21:48 |
Buckley | 👋 | 23:42:50 |
| 5 Jan 2022 |
| Rémy Grünblatt joined the room. | 07:40:54 |
Rémy Grünblatt | hello there | 07:51:20 |
| necrophcodr joined the room. | 15:54:38 |
necrophcodr | I'm getting the following error on a simple deployment at the moment:
-> % colmena apply
[INFO ] Enumerating nodes...
error: infinite recursion encountered
at /nix/store/y41rr1klzvwrmjs6smyl8kd1ipa5m5kj-source/lib/modules.nix:305:28:
304| builtins.addErrorContext (context name)
305| (args.${name} or config._module.args.${name})
| ^
306| ) (lib.functionArgs f);
(use '--show-trace' to show detailed location information)
[ERROR] -----
[ERROR] Operation failed with error: Nix exited with error code: 1
| 15:55:24 |
necrophcodr | NixOS config is
{ config, lib, pkgs, modulesPath, home-manager, ... }:
{
deployment = {
targetHost = "192.168.x.y";
targetUser = "nixos";
tags = [ "rpi" "lab" ];
};
imports = [
(home-manager + "/nixos")
];
}
| 15:55:50 |
necrophcodr | Any ideas on how I could debug that? | 15:57:46 |
| andi- joined the room. | 16:12:32 |
Zhaofeng Li | What does your hive.nix look like? | 17:09:20 |
necrophcodr | In reply to @zhaofeng:zhaofeng.li What does your hive.nix look like? Sorry for not replying earlier, but I don't have a hive.nix, just a flake.nix as follows:
{
description = "Flake for RPI 4 Lab Infrastructure";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05";
devshell.url = "github:numtide/devshell";
flake-utils.url = "github:numtide/flake-utils";
colmena.url = "github:zhaofengli/colmena/v0.2.0";
colmena.inputs.utils.follows = "flake-utils";
home-manager.url = "github:nix-community/home-manager/release-21.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, devshell, flake-utils, colmena, home-manager }:
let
nativePkgs = import nixpkgs {
system = ( if builtins ? currentSystem then builtins.currentSystem else "x86_64-linux" );
};
in
{
colmena = {
meta.nixpkgs = nativePkgs;
pi = import ./pi4.nix;
specialArgs = {
inherit home-manager;
};
};
} // flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs { inherit system; overlays = [ devshell.overlay ]; };
in
{
devShell = pkgs.devshell.mkShell {
packages = with pkgs; [
colmena.defaultPackage.${system}
];
};
}
);
}
| 21:35:33 |
Zhaofeng Li | That confirms my suspicions in https://matrix.to/#/!KqkRjyTEzAGRiZFBYT:nixos.org/$YU9o4IlsSyfFcrRGby4AGBIvMLhMH0OPdWvEG4-5Qnk?via=nixos.org&via=matrix.org&via=tchncs.de | 21:36:44 |
Zhaofeng Li | Change specialArgs to meta.specialArgs | 21:36:53 |
necrophcodr | Oh I didn't even see your reply there, so sorry! | 21:37:24 |
necrophcodr | Well, that does it! Thank you so much! Is this a recent change, that specialArgs are required? | 21:37:59 |
Zhaofeng Li | No, you need to pass it in otherwise there is no argument named home-manager | 21:38:54 |
necrophcodr | The odd thing is I've got a different system with roughly the same flake.nix setup, but for a bunch of TV settop systems. They also use home-manager in exactly the same manner, but there's no specialArgs defined there, and it still works | 21:39:05 |
Zhaofeng Li | Is home-manager there as part of the NixOS module arguments? That shouldn't have worked. | 21:40:17 |