!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

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


SenderMessageTime
1 Dec 2023
@zhaofeng:zhaofeng.liZhaofeng LiYeah, on non-NixOS hosts the Nix binaries aren't in the PATH set up by sshd/pam. It's a long-standing issue: https://github.com/NixOS/nix/issues/107817:42:10
@cw:kernelpanic.cafeChinchilla Optional

I'm getting Failed to upload keys: I/O Error: No such file or directory (os error 2) when I try to upload keys. The key block is:

          deployment = {
            keys."myservice.secret" = {
              keyFile = /full/path/to/secrets/myservice.secret;
              uploadAt = "pre-activation";
            };
          };

Am I doing something obviously stupid? File is in the ./secrets dir by the flake, and owned by the same user

22:21:06
@cw:kernelpanic.cafeChinchilla OptionalRedacted or Malformed Event22:21:20
@cw:kernelpanic.cafeChinchilla OptionalRedacted or Malformed Event22:21:41
@cw:kernelpanic.cafeChinchilla Optional okay so remote system has that file uploaded to /run/keys/myservice.secret but with no contents in the file 22:22:39
@cw:kernelpanic.cafeChinchilla Optionalodd22:22:53
@mihtig:matrix.orgmihtig
In reply to @zhaofeng:zhaofeng.li
Yeah, on non-NixOS hosts the Nix binaries aren't in the PATH set up by sshd/pam. It's a long-standing issue: https://github.com/NixOS/nix/issues/1078
Thank you I wasn’t aware.
22:53:37
2 Dec 2023
@cw:kernelpanic.cafeChinchilla Optionaland... it works now for some reason. Didn't change anything. Great.00:31:18
@srid:matrix.org@srid:matrix.org joined the room.16:03:02
@mjolnir:nixos.orgNixOS Moderation Bot banned @srid:matrix.org@srid:matrix.org (<no reason supplied>).16:03:03
@sivertism:matrix.org@sivertism:matrix.org joined the room.16:54:22
@sivertism:matrix.org@sivertism:matrix.org

Hi! I'm new to NixOS, but want to try out Colmena as a means to set up some computers in my home. One of them is a Microsoft Surface Pro 3, which needs <nixos-hardware/microsoft/surface-pro/3> to function properly. However, I'm struggling to use that with Colmena.

What I have now is something like this:

flake.nix
machines

  • surface-configuration.nix
  • surface-hardware-configuration.nix

In flake.nix:

inputs = { nixpkg.s.url = ... };
17:27:44
@sivertism:matrix.org@sivertism:matrix.org
In reply to @sivertism:matrix.org

Hi! I'm new to NixOS, but want to try out Colmena as a means to set up some computers in my home. One of them is a Microsoft Surface Pro 3, which needs <nixos-hardware/microsoft/surface-pro/3> to function properly. However, I'm struggling to use that with Colmena.

What I have now is something like this:

flake.nix
machines

  • surface-configuration.nix
  • surface-hardware-configuration.nix

In flake.nix:

inputs = { nixpkg.s.url = ... };
hit enter too soon... hold on
17:28:12
@sivertism:matrix.org@sivertism:matrix.org *

Hi! I'm new to NixOS, but want to try out Colmena as a means to set up some computers in my home. One of them is a Microsoft Surface Pro 3, which needs <nixos-hardware/microsoft/surface-pro/3> to function properly. However, I'm struggling to use that with Colmena.

What I have now is something like this:

flake.nix
machines

  • surface-configuration.nix
  • surface-hardware-configuration.nix

In flake.nix:

inputs = { nixpkg.s.url = ... };
outputs = {nixpkgs, ...} : {
  colmena = {
    meta = // default from examples
    
  surface = {name, nodes, pkgs, ... } : {
    deployment = { targetHost = name; targetUser="nixos"; };
    networking.hostName = name;
    imports = [
      <nixos-hardware/microsoft/surface-pro/3>
      ./machines/surface-configuration.nix
    ]
  };
};

And machines/surface-configuration.nix is the /etc/nixos/configuration.nix file copied from the surface after a fresh install. It, in turn, imports machines/surface-hardware-configuration.nix, which I've also left as default.

17:34:05
@sivertism:matrix.org@sivertism:matrix.org *

Hi! I'm new to NixOS, but want to try out Colmena as a means to set up some computers in my home. One of them is a Microsoft Surface Pro 3, which needs <nixos-hardware/microsoft/surface-pro/3> to function properly. However, I'm struggling to use that with Colmena.

What I have now is something like this:

flake.nix
machines

  • surface-configuration.nix
  • surface-hardware-configuration.nix

In flake.nix:

inputs = { nixpkg.s.url = ... };
outputs = {nixpkgs, ...} : {
  colmena = {
    meta = // default from examples
    
  surface = {name, nodes, pkgs, ... } : {
    deployment = { targetHost = name; targetUser="nixos"; };
    networking.hostName = name;
    imports = [
      <nixos-hardware/microsoft/surface-pro/3>
      ./machines/surface-configuration.nix
    ]
  };
};

And machines/surface-configuration.nix is the /etc/nixos/configuration.nix file copied from the surface after a fresh install. It, in turn, imports machines/surface-hardware-configuration.nix, which I've also left as default.

From this, I first get an error error: cannot look up '<nixos-hardware/microsoft/surface-pro/3>' in pure evaluation mode (use '--impure' to override), so I use --impure, but then get error: file 'nixos-hardware/microsoft/surface-pro/3' was not found in the Nix search path (add it using $NIX_PATH or -I. I should probably add it the proper way with a url to nixos-hardware as shown in the nixos-hardware section on flakes, but I'm not sure where to stick in those modules ref: (nixos-hardware#flakes)[https://github.com/NixOS/nixos-hardware#using-nix-flakes-support].

Does anyone know how I should proceed?

17:39:11

Show newer messages


Back to Room ListRoom Version: 6