| 1 Feb 2023 |
K900 | At least currently | 12:55:43 |
K900 | Like, you can update the launcher and not update the modules, or vice versa, and it'll be fine | 12:55:55 |
Arson Copperflame | Yes, that will work | 12:56:07 |
K900 | So it feels weird to me to specifically prompt people to update when the launcher updates | 12:56:21 |
Arson Copperflame | You can also use the updater without the launcher | 12:56:29 |
Arson Copperflame | They are coupled in a way: The launcher comes with the installer tarball bundled. So whenever there's a new release, we need to push a new launcher to the store | 12:57:52 |
Arson Copperflame | And both carry the same version number. The launcher checks the output of nixos-wsl-version and compares that to its own version number. If the module comes from anywhere except /etc/nixos/nixos-wsl, it would be DEV_BUILD and no update prompt would be triggered (because it can't know about /etc/nixos/nixos-wsl/VERSION) | 13:01:35 |
Sandro 🐧 | In reply to @nzbr:nzbr.de
It will obviously never work if you import the module yourself, all it does is replace the files in /etc/nixos/nixos-wsl and offer you to run nixos-rebuild switch(if it doesn't detect that you aren't using /etc/nixos/configuration.nix)
If your config comes from anywhere else, it does absolutely nothing. I don't see a way how you could break your system with it in a way that you couldn't by putting the files there manually Why do we even do this?
Can't we just fetch the source from github? With flakes or just fetch* something?
| 13:04:31 |
Sandro 🐧 | thats a lot easier and saves us lots of trouble | 13:04:47 |
Arson Copperflame | I mean, we could just replace the whole /etc/nixos/nixos-wsl directory with a default.nix that runs fetchGit | 13:06:48 |
Arson Copperflame | And then the update Macha ism would just overwrite that file | 13:07:08 |
Arson Copperflame | * And then the update Machanism would just overwrite that file | 13:07:15 |
K900 | Maybe we should make it a channel | 13:08:33 |
K900 | And then the updater will just need to switch the channel URL | 13:08:40 |
Sandro 🐧 | we just should not push updates through the microsoft store. It takes unnecessarily long and I don't want to depend on MS' update policies and what not | 13:09:37 |
Sandro 🐧 | it would be a lot easier if we just bootstrap nixos with the store app and then only update it to have an up to date base system | 13:10:04 |
Arson Copperflame | Wouldn't we need additional infrastructure for that though? Also: We only need to serve one specific commit per release | 13:10:08 |
K900 | No | 13:10:12 |
Sandro 🐧 | we can point a channel to a branch | 13:10:21 |
K900 | We can point nix-channel directly at a github tarball URL | 13:10:21 |
Arson Copperflame | In reply to @sandro:supersandro.de we just should not push updates through the microsoft store. It takes unnecessarily long and I don't want to depend on MS' update policies and what not You can still update without the launcher knowing | 13:10:57 |
Sandro 🐧 | and just putting instructions on the update subcommand is a lot more convenient | 13:11:01 |
Arson Copperflame | The Launcher could check for updates against the GitHub API instead of relying on its own version number | 13:12:13 |
Arson Copperflame | And we definitely need to come up with a better mechanism to get the version into the module. Adding a file in CI doesn't feel particularly nice, but I had no better idea, because nix strips the .git directory from the input | 13:13:33 |
Arson Copperflame | As it github gives us a nice json of all releases here https://api.github.com/repos/nix-community/nixos-wsl/releases | 13:18:41 |
Arson Copperflame | * Github gives us a nice json of all releases here https://api.github.com/repos/nix-community/nixos-wsl/releases | 13:19:01 |
Arson Copperflame | * GitHub gives us a nice json of all releases here https://api.github.com/repos/nix-community/nixos-wsl/releases | 13:19:07 |
Sandro 🐧 | In reply to @nzbr:nzbr.de And we definitely need to come up with a better mechanism to get the version into the module. Adding a file in CI doesn't feel particularly nice, but I had no better idea, because nix strips the .git directory from the input or we just copy lib.version from nixpkgs | 13:31:07 |
Sandro 🐧 | and sell it as the module for version X of NixOS | 13:31:15 |
Arson Copperflame | But if we ever want to release between two versions, we'd have no chance to do that
Does nix give us a timestamp to the commit? | 13:35:30 |