!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

340 Members
https://github.com/nix-community/NixOS-WSL58 Servers

Load older messages


SenderMessageTime
12 Feb 2025
@sustainedrelease:matrix.orgsustainedreleaseHas anyone here successfully run VSCode in NixOS, like this article explains? https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-vscode23:33:47
@sustainedrelease:matrix.orgsustainedreleaseRedacted or Malformed Event23:34:59
@sustainedrelease:matrix.orgsustainedreleaseRedacted or Malformed Event23:35:00
@nzbr:nzbr.denzbr (they/it)It's not as straight-forward as on other distros, but we have a guide for that in the documentation https://nix-community.github.io/NixOS-WSL/how-to/vscode.html23:36:21
@sustainedrelease:matrix.orgsustainedreleaseThanks, I didn't see that. NixOS rocks.23:40:03
@sustainedrelease:matrix.orgsustainedreleaseEverything appears to be working. :D23:45:42
13 Feb 2025
@gleydar:beeper.comGleydarInteresting! I hope they can release it soon-ish so that podman can stop screaming at me08:36:38
14 Feb 2025
@nzbr:nzbr.denzbr (they/it)

It's possible to find the WSL version from inside the distro like this

strings /init | sed -nE 's/.* container_host_version_id=(.+\..+\..+\..+)/\1/p'

We might be able to use that to issue a warning on old WSL versions

10:46:06
@k900:0upti.meK900I think there's a magic file with it somewhere? 10:48:41
@nzbr:nzbr.denzbr (they/it) Currently trying to grep for it, but that's been running for a while now 10:49:18
@nzbr:nzbr.denzbr (they/it) /mnt/wslg/versions.txt only has the WSLg version, which is at 1.0.65 for me 10:50:33
15 Feb 2025
@nzbr:nzbr.denzbr (they/it)https://github.com/nix-community/NixOS-WSL/releases/tag/2411.6.000:03:17
18 Feb 2025
@sustainedrelease:matrix.orgsustainedrelease why am I getting "network is unreachable" when trying to do anything with IPv6 addresses? I even manually set networking.enableIPv6 = true; although it was not set to false 03:12:44
@sustainedrelease:matrix.orgsustainedreleaseipv6 is turned on in Windows 1103:21:39
@sustainedrelease:matrix.orgsustainedreleaseimage.png
Download image.png
03:21:40
@sustainedrelease:matrix.orgsustainedreleaseI can ping IPv6 addresses with powershell.03:28:25
@sustainedrelease:matrix.orgsustainedreleaseI can only connect to my VPS with IPv6, so help would be appreciated.03:28:57
@sustainedrelease:matrix.orgsustainedreleasefor what it's worth, IPv6 seems broken in ubuntu as well. I'm looking into IPv6 issues with WSL2...03:44:08
@sustainedrelease:matrix.orgsustainedrelease the solution was to enable mirrored networking in a file called .wslconfig in my Windows home directory 03:49:27
@nzbr:nzbr.denzbr (they/it)Yeah, the default network mode of WSL still doesn't support IPv6 at all. There's nothing we can do about it from the distro side09:15:32
28 Feb 2025
@balanced_design:matrix.orgbalanced_designtry setting up tailscale on WSL and your VPS. It is made to handle things that would otherwise prevent connecting between your devices. It will give you a virtual IPv4 address you can send packets to that will go to your VPS via IPv6 via tailscale noticing a request to a special IP and handling the networking.07:21:01
@balanced_design:matrix.orgbalanced_design

On a different topic, my own question.
https://nix-community.github.io/NixOS-WSL/how-to/nix-flakes.html
Mentions to "First add a nixos-wsl input, then add nixos-wsl.nixosModules.default to your nixos configuration."
I assume by "nixos configuration" it means configuration.nix.
But how exactly do I add nixos-wsl.nixosModules.default to it. Say to the base configuration.nix that comes with nixOS WSL of:

# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).

# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL

{ config, lib, pkgs, ... }:

{
  imports = [
    # include NixOS-WSL modules
    <nixos-wsl/modules>
    nixos-wsl.nixosModules.default
  ];

  wsl.enable = true;
  wsl.defaultUser = "nixos";
  

  # This value determines the NixOS release from which the default
  # settings for stateful data, like file locations and database versions
  # on your system were taken. It's perfectly fine and recommended to leave
  # this value at the release version of the first install of this system.
  # Before changing this value read the documentation for this option
  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  system.stateVersion = "24.05"; # Did you read the comment?
}

Ive googled a bunch and used the current best coding AI Claude 3.7 sonnet with no luck.

07:26:15
@balanced_design:matrix.orgbalanced_designIve been spending many hours trying to get nixrebuild-switch working with a configuration.nix and flake.nix in the home directory. Ill eventually get there. NixOS has comparatively so little info online, docs or otherwise.07:28:58
@k900:0upti.meK900The default configuration should just work 07:34:41
@k900:0upti.meK900You don't need to add anything07:34:46
@k900:0upti.meK900And don't use word vomit machines, they don't understand Nix or anything else really 07:35:01
@balanced_design:matrix.orgbalanced_designI just try to avoid being a burden on others. I try to avoid using their time.11:35:04
@balanced_design:matrix.orgbalanced_designIts possible my nix rebuild switch function is wrong I couldnt find conisistent info on how to rebuild switch with a configuration.nix and flake.nix in the home directory. Can I ask what that function would be?11:35:09
@balanced_design:matrix.orgbalanced_design* Its possible my nix rebuild switch function is wrong I couldnt find conisistent info on how to rebuild switch with a configuration.nix and flake.nix in the home/nixos directory. Can I ask what that function would be?11:35:52
@balanced_design:matrix.orgbalanced_design* Its possible my nix rebuild switch command is wrong I couldnt find conisistent info on how to rebuild switch with a configuration.nix and flake.nix in the home/nixos directory. Can I ask what that command would be?11:36:20

Show newer messages


Back to Room ListRoom Version: 9