| 12 Feb 2023 |
henrik-ch | Thank you for the advice - will do! What you mean for afterwards is basically installing as is, and then run the sudo nixos-rebuild without making any changes, to configuration.nix, right? | 20:05:20 |
henrik-ch | * Thank you for the advice - will do! What you mean for afterwards is basically installing as is, and then run the sudo nixos-rebuild without making any changes to configuration.nix, right? | 20:05:41 |
K900 | Just install from that latest build | 20:05:50 |
K900 | And then sudo nixos-rebuild switch when you want to make changes | 20:05:58 |
henrik-ch | Installed like this:
PS C:\Users\i97he> wsl --import NixOS .\NixOS\ installer.zip --version 2
then I run and get this error:
PS C:\Users\i97he> wsl --shutdown
PS C:\Users\i97he> wsl -d NixOS
Processing fstab with mount -a failed.
<3>WSL (8) ERROR: CreateProcessEntryCommon:358: getpwuid(0) failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:362: getpwuid(0) failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:570: execvpe /bin/sh failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:579: Create process not expected to return
PS C:\Users\i97he>
| 20:13:35 |
K900 | You need to unzip the installer.zip to actually get the install image | 20:14:53 |
Arson Copperflame | There should be a .tar.gz inside that zip, you need to use that instead of the zip directly | 20:14:53 |
K900 | Why does it even work the other way | 20:15:03 |
henrik-ch | Sorry to waste your time with my rookie mistakes, and thanks for your patience! | 20:15:51 |
henrik-ch | trying now | 20:15:55 |
Arson Copperflame | In reply to @k900:0upti.me Why does it even work the other way Because WSL can actually use zips, but then you get a system with the tarball as the only file (and that won't boot obviously). And because this is a MS-Product, the error message does not give any clue to what is actually happening | 20:16:43 |
K900 | Should just ship a squashfs | 20:17:07 |
K900 | /s | 20:17:23 |
K900 | Unless | 20:17:25 |
Arson Copperflame | VHDX is supported as well. squashfs isn't as far as I know. The only reason the tarball is inside a zip is that GitHub Actions artifacts are always zips for some reason, even if they only contain a single file | 20:18:36 |
K900 | Yeah, what I meant is the artifacts should just be a squashfs and a tiny shim to extract it | 20:19:09 |
henrik-ch | Thank you - seems much better after unzipping the zip and using the tar.gz with the usual name.
Follow up question, should you typically always run nixos-rebuild switch with sudo? | 20:20:55 |
K900 | Нуы | 20:21:28 |
K900 | * Yes | 20:21:29 |
Arson Copperflame | It will fail if you don't, because it needs to modify paths that only root can write to | 20:21:57 |
henrik-ch | Yess, it all worked out! 🎆 Thank you so much for your expert help!
You will probably hear back from me soon enough when I get stuck again, but for the moment I am a very happy camper! 🏕️ | 20:29:17 |
| nixinator joined the room. | 21:17:42 |
| 13 Feb 2023 |
K900 | There's still no good way to shrink the WSL disk image natively, is there? | 18:31:39 |
K900 | Natively as in in a way that can actually move files around and not just hope the FS is sparse enough | 18:31:54 |
Arson Copperflame | there is a powershell function to shink VHDX images iirc | 18:37:20 |
K900 | Yeah it doesn't work | 18:37:38 |
K900 | Well it does but | 18:37:42 |
K900 | It doesn't actually understand ext4 | 18:37:47 |
K900 | So if you have a single byte used in a block, it will not reclaim those | 18:37:57 |
K900 | The only consistent way to do it that I know of is to basically wsl --export | wsl --import | 18:38:13 |