| 11 Sep 2024 |
common16 | 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 | You want nixos-rebuild -I nixos-config=/mnt/c/Users/host/nixos/configuration.nix | 14:51:46 |
common16 | Ah that built. Ty | 14:52:22 |
common16 | That also removed my rogue SSH agent :) | 14:52:48 |
common16 | It'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 | services.openssh stuff affects the SSH server, not the client | 14:58:04 |
K900 | So you can drop those | 14:58:19 |
K900 | programs.ssh.startAgent should work, but you need to add your key to the agent first | 14:58:41 |
K900 | With ssh-add /path/to/your/key | 14:58:46 |
common16 | This 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-agent | 15:00:15 |
common16 | That's why I'm manually copying over my host .ssh/ folder into the WSL nixos user on programs.fish.shellInit | 15:00:35 |
K900 | What is setting that? | 15:00:36 |
K900 | Actually | 15:01:13 |
K900 | What does systemctl --user status ssh-agent output? | 15:01:22 |
common16 | Loaded: /etc/systemd/user/ssh-agent.service; enabled | 15:02:19 |
K900 | OK it didn't start automatically then which is probably because you rebuilt and didn't restart the session | 15:03:08 |
K900 | Try systemctl --user start ssh-agent | 15:03:14 |
common16 | That entered silently lol | 15:04:17 |
K900 | That is normal | 15:04:25 |
K900 | You can try ssh-add now | 15:04:31 |
common16 | That worked. Do I need to run that systemctl on every startup? | 15:05:10 |
K900 | No | 15:12:23 |
common16 | Why did I need to run it that time? lol | 15:20:24 |
common16 | I'm worried that that one-off command will lead me to non-reproducible environments as I try to lift-and-shift this WSL between machines | 15:20:42 |
K900 | In reply to@common16:matrix.org Why did I need to run it that time? lol Because it's configured to run on startup and it wasn't startup | 15:54:49 |
| 14 Sep 2024 |
| SomeoneSerge (back on matrix) changed their display name from SomeoneSerge (nix.camp) to SomeoneSerge (utc+3). | 11:38:11 |
| @crimsonpanda:matrix.org joined the room. | 16:12:13 |
| mwoodpatrickmx joined the room. | 16:12:24 |
| @crimsonpanda:matrix.org left the room. | 16:12:56 |
| 16 Sep 2024 |
| silentlurker joined the room. | 19:56:19 |