| 26 Aug 2025 |
Pierre Carrier | perfect. and to make sure the VM is always running? | 17:29:13 |
K900 | There's a setting in .wslconfig for how long the VM is kept alive for | 17:29:43 |
Pierre Carrier | thanks. that and a startup script to run wsl exit 0 should do it then | 17:30:14 |
Pierre Carrier | yup I'm all set I believe. thanks so much | 17:35:53 |
Pierre Carrier | once I have a fully running system, can I image it using nix? not a fork of the nixos-wsl repo but everything in my flake: system config, user with home-manager, etc. I'd like to be able to restore my system in one command without exporting with wsl which lives temp files etc. in the backup | 17:37:39 |
Pierre Carrier | * once I have a fully running system, can I image it using nix? not a fork of the nixos-wsl repo but everything in my flake: system config, user with home-manager, etc. I'd like to be able to restore my system in one command without exporting with wsl which leaves temp files etc. in the backup | 17:37:52 |
K900 | What do you mean by "image"? | 17:38:10 |
K900 | Generate a NixOS config from a system that you set up manually? No | 17:38:18 |
Pierre Carrier | create a .wsl file | 17:38:19 |
K900 | Build a .wsl file from a NixOS config (with the WSL modules included)? Yes | 17:38:37 |
Pierre Carrier | that I can restore on other machines in as little time as possible. double click and go | 17:38:40 |
nzbr (they/it) | It should be possible (wsl --export I think), but I don't know if it will work well | 17:39:34 |
K900 | I think what they want is to build a tarball | 17:40:08 |
K900 | Which is yes a thing you can do | 17:40:13 |
Pierre Carrier | yeah --export has all the transient stuff I'd rather lose | 17:40:20 |
nzbr (they/it) | Building a .wsl file from your own config should work fine though. But I don't remember the command for doing that without flakes | 17:40:28 |
Pierre Carrier | as in, not carry around | 17:40:35 |
Pierre Carrier | I use flakes | 17:41:07 |
K900 | It should be nix-build <nixpkgs/nixos> -A config.system.build.tarballBuilder | 17:41:04 |
Pierre Carrier | https://github.com/pcarrier/nix | 17:41:20 |
K900 | Then it should be nix build .#nixosConfigurations.<hostname>.config.system.build.tarballBuilder | 17:41:22 |
Pierre Carrier | ah perfect appreciate it | 17:48:07 |
nzbr (they/it) | Does that automatically know to look in /etc/nixos/configuration.nix? | 17:50:23 |
K900 | Yes | 17:52:03 |
nzbr (they/it) | Neat | 17:52:10 |
Pierre Carrier | hmmm kinda lost here sorry. new x64 install, only added git to the nix-env and cloned the repo: | 18:17:59 |
Pierre Carrier | * hmmm kinda lost here sorry. new x64 install, only added git to the nix-env and cloned the repo:
| 18:18:21 |
Pierre Carrier | * hmmm kinda lost here sorry. new x64 install, only added git to the nix-env and cloned the repo:
[nixos@nixos:/src/sys]$ sudo nix-channel --update
unpacking 2 channels...
[nixos@nixos:/src/sys]$ sudo nixos-rebuild switch
building Nix...
building the system configuration...
activating the configuration...
setting up /run/booted-system...
setting up /bin...
setting up /sbin...
setting up /etc...
setting up /sbin/init shim...
reloading user units for nixos...
restarting sysinit-reactivation.target
Done. The new configuration is /nix/store/pwp82labadhpgsq86wbyfi8pbh3jvxwb-nixos-system-nixos-25.05.808723.b1b329146965
[nixos@nixos:/src/sys]$ sudo nixos-rebuild switch --flake .#wsl
/nix/store/f9iszzwi9k32cjafcmmvd4dawayva1ml-nixos-rebuild-ng-0.0.0/bin/.nixos-rebuild-wrapped: /nix/store/f9iszzwi9k32cjafcmmvd4dawayva1ml-nixos-rebuild-ng-0.0.0/bin/nixos-rebuild: line 3: syntax error near unexpected token `lambda'
/nix/store/f9iszzwi9k32cjafcmmvd4dawayva1ml-nixos-rebuild-ng-0.0.0/bin/.nixos-rebuild-wrapped: /nix/store/f9iszzwi9k32cjafcmmvd4dawayva1ml-nixos-rebuild-ng-0.0.0/bin/nixos-rebuild: line 3: `import sys;import site;import functools;sys.argv[0] = '/nix/store/f9iszzwi9k32cjafcmmvd4dawayva1ml-nixos-rebuild-ng-0.0.0/bin/nixos-rebuild';functools.reduce(lambda k, p: site.addsitedir(p, k), ['/nix/store/f9iszzwi9k32cjafcmmvd4dawayva1ml-nixos-rebuild-ng-0.0.0/lib/python3.13/site-packages'], site._init_pathinfo());'
| 18:18:32 |
Pierre Carrier | * https://github.com/pcarrier/sys | 18:19:27 |
Pierre Carrier | Redacted or Malformed Event | 18:20:34 |