!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

335 Members
https://github.com/nix-community/NixOS-WSL57 Servers

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


SenderMessageTime
15 Jun 2024
@toddt:matrix.orgTodd Thompsonlooks like that worked. maybe you can recommend updating the community page and manual08:34:48
@toddt:matrix.orgTodd ThompsonI appreciate your help08:35:03
@k900:0upti.meK900We should just update the bootstrap tarball to 24.0508:37:07
@k900:0upti.meK900Now it's officially out 08:37:12
@k900:0upti.meK900 nzbr (they/it) can you do the thing? 08:37:20
@k900:0upti.meK900(I can't releng) 08:37:29
@toddt:matrix.orgTodd Thompsonyes, but community page still needs to be updated to 24.0508:38:25
@toddt:matrix.orgTodd Thompsonand manual doesn't show using sudo08:38:43
@toddt:matrix.orgTodd ThompsonI updated my configuration.nix file to ... but it now starts me as root with "<3>WSL (36034) ERROR: CreateProcessParseCommon:748: getpwnam(nixos) failed 5"08:48:39
@toddt:matrix.orgTodd Thompson

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

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

users.users.todd = {
isNormalUser = true;
home = "/home/todd";
description = "Todd Thompson";
extraGroups = [ "wheel" "networkmanager" ];
};

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

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?
system.autoUpgrade.enable = true;
system.autoUpgrade.allowReboot = true;
}

08:48:43
@k900:0upti.meK900You need to restart WSL entirely if changing the default user name 08:49:29
@k900:0upti.meK900 Run wsl --shutdown 08:49:35
@toddt:matrix.orgTodd Thompsongotcha08:49:37
@k900:0upti.meK900 And then wsl again 08:49:40
@toddt:matrix.orgTodd Thompsonthanks08:49:44
@k900:0upti.meK900Also, do not use allowReboot08:49:59
@k900:0upti.meK900The WSL VM cannot reboot 08:50:05
@k900:0upti.meK900Attempting to reboot it leaves it in a weird fucked up state half the time 08:50:20
@toddt:matrix.orgTodd Thompsonok, will comment out for now08:50:33
@k900:0upti.meK900 The only way to restart it properly is to wsl --shutdown externallyn 08:50:54
@k900:0upti.meK900* The only way to restart it properly is to wsl --shutdown externallynl08:51:00
@k900:0upti.meK900* The only way to restart it properly is to wsl --shutdown externally08:51:04

Show newer messages


Back to Room ListRoom Version: 9