!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
2 Dec 2023
@cw:kernelpanic.cafeChinchilla Washingtonand... 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
@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:39:23
@sivertism:matrix.org@sivertism:matrix.org *

hit enter too soon... hold on

Done :)

17:39:58
@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:41:05
@ibizaman:matrix.orgibizaman
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 = ... };
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?

I wouldn’t use the impure mode here. The syntax with brackets is not what you want with flakes. You will need to add nixos-hardware as a flake input instead.   
19:12:49
@ibizaman:matrix.orgibizaman
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 = ... };
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?

*

I wouldn’t use the impure mode here. The syntax with brackets is not what you want with flakes. You will need to add nixos-hardware as a flake input instead.

If that doesn’t make sense I can give a more complete example when I’m back at my computer. 

19:15:31
3 Dec 2023
@sivertism:matrix.org@sivertism:matrix.org

I was eventually able to create a flake wrapper around my existing config, which seems to work. At least nix build .#nixosConfigurations.surface.config.system.build.toplevel succeeds.

So I think it's now just about importing that into the Colmena flake? I've tried a few variations of the below colmena flake, but to no avail.

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    surface.url = "/home/sivert/work/nixos-surface";
  };
 
  outputs = {nixpkgs, surface, ...}: {
    colmena = {
      meta = {
          nixpkgs = import nixpkgs {
            system = "x86_64-linux";
          };
      };
 
      surface = { name, ...}: {
 
        deployment = {
          targetHost = "surface";
          targetUser = "nixos";
        };
        
        networking.hostName = "surface";
 
        imports = [
          surface #.nixosConfigurations.surface.config.system.build.toplevel
          ];
      };
    };
  };
}
10:19:37
@sivertism:matrix.org@sivertism:matrix.orgimage.png
Download image.png
11:25:29
@sivertism:matrix.org@sivertism:matrix.org

Turn's out the answer was (yet again) in ibizaman 's blog! https://blog.tiserbox.com/posts/2023-11-08-switch-to-colmena-for-local-deploys.html

Just had to remove the flake wrapper and set up the colmena flake like this:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nixos-hardware.url = "github:NixOS/nixos-hardware/master";
  };

  outputs = inputs@{nixpkgs, nixos-hardware, ...}: {
    colmena = {
      meta = {
          nixpkgs = import inputs.nixpkgs {
            system = "x86_64-linux";
          };
          specialArgs=inputs;
      };

      surface = { name, ...}: {

        deployment = {
          targetHost = "surface";
          targetUser = "nixos";
        };

        networking.hostName = "surface";

        imports = [
          inputs.nixos-hardware.nixosModules.microsoft-surface-pro-3
          ./machines/surface/configuration.nix
          ];
      };
    };
  };
}

Now I'm running into some security error though (see the above screenshot)

11:25:50
@sivertism:matrix.org@sivertism:matrix.org *

Turn's out the answer was (yet again) in ibizaman 's blog! https://blog.tiserbox.com/posts/2023-11-08-switch-to-colmena-for-local-deploys.html

Just had to remove the flake wrapper and set up the colmena flake like this:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nixos-hardware.url = "github:NixOS/nixos-hardware/master";
  };

  outputs = inputs@{nixpkgs, nixos-hardware, ...}: {
    colmena = {
      meta = {
          nixpkgs = import inputs.nixpkgs {
            system = "x86_64-linux";
          };
          specialArgs=inputs;
      };

      surface = { name, ...}: {

        deployment = {
          targetHost = "surface";
          targetUser = "nixos";
        };

        networking.hostName = "surface";

        imports = [
          inputs.nixos-hardware.nixosModules.microsoft-surface-pro-3
          ./machines/surface/configuration.nix
          ];
      };
    };
  };
}

Now I'm running into some security error though (see the above screenshot)
[ERROR] stderr) error: cannot add path '/nix/store/00yiiplzcqzmqaw10cghbxlb4l4xibc0-i3lock-color.pam' because it lacks a signature by a trusted key

13:08:29
@ibizaman:matrix.orgibizaman

Sivert the following is what I understand but I’m not confident in my understanding of this. I think the trusted issue is due to the user used to deploy not being root. It falls after having copied the nix derivations to the target machine when it tries to add them to the nix store. The fix should be adding that user nixos  to the nix.settings.trusted-users option.

That being said, it never worked the first time for me. I think for it to work you must first deploy a change with just the trusted-user change and then you can deploy the rest.  

15:08:37
@ibizaman:matrix.orgibizaman *

Sivert the following is what I understand but I’m not confident in my understanding of this. I think the trusted issue is due to the user used to deploy not being root. It fails after having copied the nix derivations to the target machine when it tries to add them to the nix store. The fix should be adding that user nixos  to the nix.settings.trusted-users option.

That being said, it never worked the first time for me. I think for it to work you must first deploy a change with just the trusted-user change and then you can deploy the rest.  

15:08:59
@sivertism:matrix.org@sivertism:matrix.org ibizaman: That seems to be the issue. Added nix-settings.trusted-users to the config a couple of minutes ago and it worked on my other computer. Trying it on the surface now (seems to take like 20minutes). 15:10:40
@sivertism:matrix.org@sivertism:matrix.orgSo if this works on the surface, I've got all three computers deployed from Colmena. Very cool stuff!15:12:13
@sivertism:matrix.org@sivertism:matrix.org
In reply to @sivertism:matrix.org
So if this works on the surface, I've got all three computers deployed from Colmena. Very cool stuff!

meh, new errror. This one feels like it's got more to do with nixos-hardware than Colmena. Seems like the Colmena side of things is working fine though.

[nix-shell:~/nixos-home]$ colmena apply --on surface
[INFO ] Using flake: git+file:///home/nixos/nixos-home
[INFO ] Enumerating nodes...
[INFO ] Selected 1 out of 3 hosts.
        ❌ 14s Failed: Child process exited with error code: 1
surface ✅ 10s Evaluated surface
surface ✅ 0s Built "/nix/store/s9mlmd8b6lxy2b5m5wwy099d924y5s0w-nixos-system-surface-24.05pre-git"
surface ✅ 2s Pushed system closure
surface ❌ 0s Activation failed: Child process exited with error code: 1
[ERROR] Failed to deploy to surface - Last 15 lines of logs:
[ERROR]  created)
[ERROR]    state) Running
[ERROR]   stderr)
[ERROR]   stderr) We trust you have received the usual lecture from the local System
[ERROR]   stderr) Administrator. It usually boils down to these three things:
[ERROR]   stderr)
[ERROR]   stderr)     #1) Respect the privacy of others.
[ERROR]   stderr)     #2) Think before you type.
[ERROR]   stderr)     #3) With great power comes great responsibility.
[ERROR]   stderr)
[ERROR]   stderr) For security reasons, the password you type will not be visible.
[ERROR]   stderr)
[ERROR]   stderr) sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
[ERROR]   stderr) sudo: a password is required
[ERROR]  failure) Child process exited with error code: 1
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace
16:07:59
@ibizaman:matrix.orgibizaman Sivert: you need to have password less sudo for the nixos user 16:12:25
@ibizaman:matrix.orgibizaman
  security.sudo.extraRules = [
    { users = [ "nixos" ];
      commands = [
        { command = "ALL";
          options = [ "NOPASSWD" ];
        }
      ];
    }
  ];
16:13:53
@sivertism:matrix.org@sivertism:matrix.org

ah, you're right! I thought I had done that, but I hadn't.

Got a spicier error message this time though

[nixos@desktop:~/nixos-home]$ colmena apply --on surface
warning: Git tree '/home/nixos/nixos-home' is dirty
[INFO ] Using flake: git+file:///home/nixos/nixos-home
[INFO ] Enumerating nodes...
[INFO ] Selected 1 out of 3 hosts.
        ❌ 25s Failed: Child process exited with error code: 4
surface ✅ 11s Evaluated surface
surface ✅ 0s Built "/nix/store/nzpx3si3lnw205sdd4vcvkh74b8blvx4-nixos-system-surface-24.05pre-git"
surface ✅ 3s Pushed system closure
surface ❌ 11s Activation failed: Child process exited with error code: 4
[ERROR] Failed to deploy to surface - Last 20 lines of logs:
[ERROR]   stderr) restarting the following units: dev-hugepages.mount, nix-daemon.service, polkit.service, sshd.service, systemd-journald.service
[ERROR]   stderr) starting the following units: ModemManager.service, NetworkManager-wait-online.service, NetworkManager.service, accounts-daemon.service, alsa-store.service, audit.service, avahi-daemon.socket, bluetooth.service, colord.service, cpufreq.service, cups-browsed.service, cups.socket, kmod-static-nodes.service, logrotate-checkconf.service, mount-pstore.service, network-local-commands.service, network-setup.service, nscd.service, power-profiles-daemon.service, resolvconf.service, rtkit-daemon.service, systemd-machined.service, systemd-modules-load.service, systemd-oomd.socket, systemd-sysctl.service, systemd-timesyncd.service, systemd-tmpfiles-setup-dev.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, udisks2.service, upower.service, wpa_supplicant.service
[ERROR]   stderr) the following new units were started: NetworkManager-dispatcher.service, fstrim.timer, systemd-hostnamed.service, systemd-tmpfiles-setup-dev-early.service, systemd-vconsole-setup.service
[ERROR]   stderr) warning: the following units failed: iptsd.service
[ERROR]   stderr)
[ERROR]   stderr) × iptsd.service - IPTSD
[ERROR]   stderr)      Loaded: loaded (/etc/systemd/system/iptsd.service; enabled; preset: enabled)
[ERROR]   stderr)      Active: failed (Result: exit-code) since Sun 2023-12-03 17:17:38 CET; 3s ago
[ERROR]   stderr)    Duration: 295ms
[ERROR]   stderr)     Process: 3490 ExecStart=/nix/store/a2vzhri5pmfs83fpwcngm4inwk2ww7yj-unit-script-iptsd-start/bin/iptsd-start (code=exited, status=106)
[ERROR]   stderr)    Main PID: 3490 (code=exited, status=106)
[ERROR]   stderr)          IP: 0B in, 0B out
[ERROR]   stderr)         CPU: 99ms
[ERROR]   stderr)
[ERROR]   stderr) Dec 03 17:17:37 surface systemd[1]: Started IPTSD.
[ERROR]   stderr) Dec 03 17:17:38 surface iptsd-start[3619]: DEVICE is required
[ERROR]   stderr) Dec 03 17:17:38 surface iptsd-start[3619]: Run with --help for more information.
[ERROR]   stderr) Dec 03 17:17:38 surface systemd[1]: iptsd.service: Main process exited, code=exited, status=106/n/a
[ERROR]   stderr) Dec 03 17:17:38 surface systemd[1]: iptsd.service: Failed with result 'exit-code'.
[ERROR]  failure) Child process exited with error code: 4
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 4
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 4
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace
16:19:17
@sivertism:matrix.org@sivertism:matrix.org
In reply to @sivertism:matrix.org

ah, you're right! I thought I had done that, but I hadn't.

Got a spicier error message this time though

[nixos@desktop:~/nixos-home]$ colmena apply --on surface
warning: Git tree '/home/nixos/nixos-home' is dirty
[INFO ] Using flake: git+file:///home/nixos/nixos-home
[INFO ] Enumerating nodes...
[INFO ] Selected 1 out of 3 hosts.
        ❌ 25s Failed: Child process exited with error code: 4
surface ✅ 11s Evaluated surface
surface ✅ 0s Built "/nix/store/nzpx3si3lnw205sdd4vcvkh74b8blvx4-nixos-system-surface-24.05pre-git"
surface ✅ 3s Pushed system closure
surface ❌ 11s Activation failed: Child process exited with error code: 4
[ERROR] Failed to deploy to surface - Last 20 lines of logs:
[ERROR]   stderr) restarting the following units: dev-hugepages.mount, nix-daemon.service, polkit.service, sshd.service, systemd-journald.service
[ERROR]   stderr) starting the following units: ModemManager.service, NetworkManager-wait-online.service, NetworkManager.service, accounts-daemon.service, alsa-store.service, audit.service, avahi-daemon.socket, bluetooth.service, colord.service, cpufreq.service, cups-browsed.service, cups.socket, kmod-static-nodes.service, logrotate-checkconf.service, mount-pstore.service, network-local-commands.service, network-setup.service, nscd.service, power-profiles-daemon.service, resolvconf.service, rtkit-daemon.service, systemd-machined.service, systemd-modules-load.service, systemd-oomd.socket, systemd-sysctl.service, systemd-timesyncd.service, systemd-tmpfiles-setup-dev.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, udisks2.service, upower.service, wpa_supplicant.service
[ERROR]   stderr) the following new units were started: NetworkManager-dispatcher.service, fstrim.timer, systemd-hostnamed.service, systemd-tmpfiles-setup-dev-early.service, systemd-vconsole-setup.service
[ERROR]   stderr) warning: the following units failed: iptsd.service
[ERROR]   stderr)
[ERROR]   stderr) × iptsd.service - IPTSD
[ERROR]   stderr)      Loaded: loaded (/etc/systemd/system/iptsd.service; enabled; preset: enabled)
[ERROR]   stderr)      Active: failed (Result: exit-code) since Sun 2023-12-03 17:17:38 CET; 3s ago
[ERROR]   stderr)    Duration: 295ms
[ERROR]   stderr)     Process: 3490 ExecStart=/nix/store/a2vzhri5pmfs83fpwcngm4inwk2ww7yj-unit-script-iptsd-start/bin/iptsd-start (code=exited, status=106)
[ERROR]   stderr)    Main PID: 3490 (code=exited, status=106)
[ERROR]   stderr)          IP: 0B in, 0B out
[ERROR]   stderr)         CPU: 99ms
[ERROR]   stderr)
[ERROR]   stderr) Dec 03 17:17:37 surface systemd[1]: Started IPTSD.
[ERROR]   stderr) Dec 03 17:17:38 surface iptsd-start[3619]: DEVICE is required
[ERROR]   stderr) Dec 03 17:17:38 surface iptsd-start[3619]: Run with --help for more information.
[ERROR]   stderr) Dec 03 17:17:38 surface systemd[1]: iptsd.service: Main process exited, code=exited, status=106/n/a
[ERROR]   stderr) Dec 03 17:17:38 surface systemd[1]: iptsd.service: Failed with result 'exit-code'.
[ERROR]  failure) Child process exited with error code: 4
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 4
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 4
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace

Just needed a reboot. Works like a charm now. Touch and everything 🥳

Thanks a lot for the help ibizaman !

16:24:47
@ibizaman:matrix.orgibizaman
The error is weird indeed. Glad we made it work!
17:20:18
@ibizaman:matrix.orgibizaman *

The error is weird indeed. Glad we made it work!

17:20:39
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @sivertism:matrix.org

ah, you're right! I thought I had done that, but I hadn't.

Got a spicier error message this time though

[nixos@desktop:~/nixos-home]$ colmena apply --on surface
warning: Git tree '/home/nixos/nixos-home' is dirty
[INFO ] Using flake: git+file:///home/nixos/nixos-home
[INFO ] Enumerating nodes...
[INFO ] Selected 1 out of 3 hosts.
        ❌ 25s Failed: Child process exited with error code: 4
surface ✅ 11s Evaluated surface
surface ✅ 0s Built "/nix/store/nzpx3si3lnw205sdd4vcvkh74b8blvx4-nixos-system-surface-24.05pre-git"
surface ✅ 3s Pushed system closure
surface ❌ 11s Activation failed: Child process exited with error code: 4
[ERROR] Failed to deploy to surface - Last 20 lines of logs:
[ERROR]   stderr) restarting the following units: dev-hugepages.mount, nix-daemon.service, polkit.service, sshd.service, systemd-journald.service
[ERROR]   stderr) starting the following units: ModemManager.service, NetworkManager-wait-online.service, NetworkManager.service, accounts-daemon.service, alsa-store.service, audit.service, avahi-daemon.socket, bluetooth.service, colord.service, cpufreq.service, cups-browsed.service, cups.socket, kmod-static-nodes.service, logrotate-checkconf.service, mount-pstore.service, network-local-commands.service, network-setup.service, nscd.service, power-profiles-daemon.service, resolvconf.service, rtkit-daemon.service, systemd-machined.service, systemd-modules-load.service, systemd-oomd.socket, systemd-sysctl.service, systemd-timesyncd.service, systemd-tmpfiles-setup-dev.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, udisks2.service, upower.service, wpa_supplicant.service
[ERROR]   stderr) the following new units were started: NetworkManager-dispatcher.service, fstrim.timer, systemd-hostnamed.service, systemd-tmpfiles-setup-dev-early.service, systemd-vconsole-setup.service
[ERROR]   stderr) warning: the following units failed: iptsd.service
[ERROR]   stderr)
[ERROR]   stderr) × iptsd.service - IPTSD
[ERROR]   stderr)      Loaded: loaded (/etc/systemd/system/iptsd.service; enabled; preset: enabled)
[ERROR]   stderr)      Active: failed (Result: exit-code) since Sun 2023-12-03 17:17:38 CET; 3s ago
[ERROR]   stderr)    Duration: 295ms
[ERROR]   stderr)     Process: 3490 ExecStart=/nix/store/a2vzhri5pmfs83fpwcngm4inwk2ww7yj-unit-script-iptsd-start/bin/iptsd-start (code=exited, status=106)
[ERROR]   stderr)    Main PID: 3490 (code=exited, status=106)
[ERROR]   stderr)          IP: 0B in, 0B out
[ERROR]   stderr)         CPU: 99ms
[ERROR]   stderr)
[ERROR]   stderr) Dec 03 17:17:37 surface systemd[1]: Started IPTSD.
[ERROR]   stderr) Dec 03 17:17:38 surface iptsd-start[3619]: DEVICE is required
[ERROR]   stderr) Dec 03 17:17:38 surface iptsd-start[3619]: Run with --help for more information.
[ERROR]   stderr) Dec 03 17:17:38 surface systemd[1]: iptsd.service: Main process exited, code=exited, status=106/n/a
[ERROR]   stderr) Dec 03 17:17:38 surface systemd[1]: iptsd.service: Failed with result 'exit-code'.
[ERROR]  failure) Child process exited with error code: 4
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 4
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 4
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace

Looks like the iptsd setup in nixos-hardware does script = "iptsd $(iptsd-find-hidraw)";

https://github.com/NixOS/nixos-hardware/blob/a89745edd5f657e2e5be5ed1bea86725ca78d92e/microsoft/surface/common/ipts/default.nix#L42

17:31:50
@zhaofeng:zhaofeng.liZhaofeng Li If you don't have the driver, then iptsd-find-hidraw presumably returns nothing 17:32:15

Show newer messages


Back to Room ListRoom Version: 6