!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

333 Members
https://github.com/nix-community/NixOS-WSL55 Servers

Load older messages


SenderMessageTime
10 Sep 2024
@arexon:matrix.org@arexon:matrix.org left the room.10:15:13
@simonyde:matrix.orgSimon Yde

evaluating withnix eval on a different computer running NixOS

trace: evaluation warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
performing daemon worker op: 7
instantiated 'bootstrap-stage0-stdenv-linux' -> '/nix/store/y3vwfd67h193ynxz98jwn3gd81vblacb-bootstrap-stage0-stdenv-linux.drv'
performing daemon worker op: 7
instantiated 'stdenv-test-succeedOnFailure' -> '/nix/store/8bxfynjfm1l82438dig1fvr6v4g4d6ph-stdenv-test-succeedOnFailure.drv'
trace: evaluation warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
performing daemon worker op: 7
instantiated 'bootstrap-stage0-stdenv-linux' -> '/nix/store/y3vwfd67h193ynxz98jwn3gd81vblacb-bootstrap-stage0-stdenv-linux.drv'
performing daemon worker op: 7
instantiated 'stdenv-test-succeedOnFailure' -> '/nix/store/8bxfynjfm1l82438dig1fvr6v4g4d6ph-stdenv-test-succeedOnFailure.drv'
trace: evaluation warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
performing daemon worker op: 7
instantiated 'bootstrap-stage0-stdenv-linux' -> '/nix/store/y3vwfd67h193ynxz98jwn3gd81vblacb-bootstrap-stage0-stdenv-linux.drv'
performing daemon worker op: 7
instantiated 'stdenv-test-succeedOnFailure' -> '/nix/store/8bxfynjfm1l82438dig1fvr6v4g4d6ph-stdenv-test-succeedOnFailure.drv'
trace: evaluation warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
performing daemon worker op: 7
instantiated 'bootstrap-stage0-stdenv-linux' -> '/nix/store/y3vwfd67h193ynxz98jwn3gd81vblacb-bootstrap-stage0-stdenv-linux.drv'
performing daemon worker op: 7
instantiated 'stdenv-test-succeedOnFailure' -> '/nix/store/8bxfynjfm1l82438dig1fvr6v4g4d6ph-stdenv-test-succeedOnFailure.drv'
trace: evaluation warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
performing daemon worker op: 7
instantiated 'bootstrap-stage0-stdenv-linux' -> '/nix/store/y3vwfd67h193ynxz98jwn3gd81vblacb-bootstrap-stage0-stdenv-linux.drv'
performing daemon worker op: 7
instantiated 'stdenv-test-succeedOnFailure' -> '/nix/store/8bxfynjfm1l82438dig1fvr6v4g4d6ph-stdenv-test-succeedOnFailure.drv'
trace: evaluation warning: Use `stdenv.tests` instead. `passthru` is a `mkDerivation` detail.
error: stack overflow (possible infinite recursion)
11:24:59
@k900:0upti.meK900That sounds very wrong11:25:32
@k900:0upti.meK900Do you have any sort of custom overlays?11:25:38
@simonyde:matrix.orgSimon Yde

This is my overlays config that I use on all other machine I have

  config = {
    nixpkgs = {
      overlays = [
        inputs.nur.overlay
        inputs.helix.overlays.default
        inputs.nix-ld-rs.overlays.default
        inputs.neovim-nightly.overlays.default
        inputs.rustaceanvim.overlays.default

        (final: prev: {
          stable = import inputs.stable {
            config = prev.config;
            system = prev.system;
          };
          grawlix = prev.callPackage ./home-manager/packages/grawlix.nix { };
          pix2tex = inputs.pix2tex.packages.${prev.system}.default;

          delta = final.stable.delta;
          swaylock-effects = final.stable.swaylock-effects;

          kattis-cli = prev.callPackage ./home-manager/packages/kattis-cli.nix { };
          kattis-test = prev.callPackage ./home-manager/packages/kattis-test.nix { };
          vimPlugins = prev.vimPlugins // {
            mini-nvim = prev.vimUtils.buildVimPlugin {
              version = "nightly";
              pname = "mini-nvim";
              src = inputs.mini-nvim;
            };

            neogit = prev.vimUtils.buildVimPlugin {
              version = "nightly";
              pname = "neogit";
              src = inputs.neogit;
            };
          };
        })
      ];
    };
  };

11:30:10
@simonyde:matrix.orgSimon Ydeincluding the wsl instance11:30:18
@k900:0upti.meK900Yeah maybe try removing some of those overlays11:31:31
@simonyde:matrix.orgSimon Yde I'm able to build it using sudo nixos-rebuild --flake .#nixosConfiguration.icarus-wsl build but it won't evaluate with nix eval 11:54:06
@k900:0upti.meK900Oh wait11:57:08
@k900:0upti.meK900 Are you trying to nix eval the entire nixosConfigurations.icarus-wsl? 11:57:19
@k900:0upti.meK900 You want to nix eval .#nixosConfigurations.icarus-wsl.config.system.build.toplevel 11:57:28
@simonyde:matrix.orgSimon Ydeoh, though that still results in the same stack overflow, even on the proper NixOS config I'm using on my laptop to write this message14:20:10
@k900:0upti.meK900That does not sound right at all15:12:19
@simonyde:matrix.orgSimon Ydeturns out it's my git that's fucked because of gpg-agent being used for SSH, and it not being able to open pinentry19:52:46
@simonyde:matrix.orgSimon YdeI don't know how to work around it19:52:50
@common16:matrix.orgcommon16I'm actually on a similar issue. Do you guys have advice on how to manage injecting the SSH keys? I posted my config yesterday and sometimes my WSL asks me for a passphrase on literally every call to my git origin but other times it asks once and then works for the rest of my session(?) 🤔19:56:56
@common16:matrix.orgcommon16 My approach was to copy over my C:\Users\host.ssh folder which contains my id_ed25519, the id_ed25519.pub, and also a known_hosts files for github 19:57:32
11 Sep 2024
@k900:0upti.meK900As said before, you need to figure out what is spawning a bunch of SSH agents, and figure out which one to keep04:34:02
@sandro:supersandro.deSandro 🐧bashrc that starts the agent?09:24:55
@common16:matrix.orgcommon16

K900: I think it could be because I may have built using one configuration.nix that had ssh and now mine doesn't? When I try to run nixos-rebuild -I /mnt/c/Users/host/nixos/configuration.nix it errors with a 'nixos-config' was not found error. My configuration.nix is super simplified and looks like:

{ config, lib, pkgs, ...}:
{
imports = [
<nixos-wsl/modules>
];
wsl.enable = true;
wsl.defaultUser = "nixos";
system.stateVersion = "24.05";
}

This doesn't seem correct to me. Do you think this could be what's going wrong (and can you help fix up my configuration.nix if it is)?

14:51:14
@k900:0upti.meK900 You want nixos-rebuild -I nixos-config=/mnt/c/Users/host/nixos/configuration.nix 14:51:46
@common16:matrix.orgcommon16Ah that built. Ty14:52:22
@common16:matrix.orgcommon16That also removed my rogue SSH agent :)14:52:48
@common16:matrix.orgcommon16It's still asking me for my passphrase every time I git pull though when I explicitly tried hosting the ssh agent in my flake.nix 😦 programs.ssh.startAgent = true; services.openssh = { enable = true; settings.PasswordAuthentication = false; settings.KbdInteractiveAuthentication = false; };14:57:28
@k900:0upti.meK900 services.openssh stuff affects the SSH server, not the client 14:58:04
@k900:0upti.meK900So you can drop those14:58:19
@k900:0upti.meK900 programs.ssh.startAgent should work, but you need to add your key to the agent first 14:58:41
@k900:0upti.meK900 With ssh-add /path/to/your/key 14:58:46
@common16:matrix.orgcommon16This goes back to the issue I had last week. When I try to ssh-add I run into a "Error connecting to agent: No such file or directory" with my SSH_AUTH_SOCK set to /run/user/1000//ssh-agent15:00:15
@common16:matrix.orgcommon16That's why I'm manually copying over my host .ssh/ folder into the WSL nixos user on programs.fish.shellInit15:00:35

Show newer messages


Back to Room ListRoom Version: 9