Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use internal WSL knobs instead of symlinks #281

Closed
wants to merge 1 commit into from
Closed

Conversation

K900
Copy link
Contributor

@K900 K900 commented Aug 27, 2023

This makes things so much easier and more consistent and it's undocumented API that I found in Ghidra so nothing could possibly go wrong.

@github-actions github-actions bot added the enhancement New feature or request label Aug 27, 2023
@K900
Copy link
Contributor Author

K900 commented Aug 27, 2023

Filed an issue with upstream to maybe stabilize these: microsoft/WSL#10425

This makes things so much easier and more consistent and it's undocumented API that I found in Ghidra so nothing could possibly go wrong.
@nzbr
Copy link
Member

nzbr commented Aug 27, 2023

This looks so much better. I hope they decide to keep these

@@ -41,6 +41,21 @@ with lib; {
default = false;
description = "Use systemd as init. There's no need to enable this manually, use the wsl.nativeSystemd option instead";
};
initPath = mkOption {
type = path;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this need to be nullOr path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, I haven't actually tested this on non-native-systemd yet.

systemd = true;
initPath = "${nativeUtils}/bin/systemd-shim";
initShutdownCommand = pkgs.writeShellScript "nixos-wsl-init-shutdown" ''
${pkgs.systemd}/bin/systemctl reboot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
${pkgs.systemd}/bin/systemctl reboot
${pkgs.systemd}/bin/systemctl reboot "$@"

just incase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm actually pretty sure we can avoid the shell script here and just write the string directly.

@K900
Copy link
Contributor Author

K900 commented Sep 27, 2023

This is drifting out of sync and I don't want to maintain it until upstream decides this is OK to do. Closing for now, we can revisit later.

@K900 K900 closed this Sep 27, 2023
@SuperSandro2000 SuperSandro2000 deleted the cursed-wizardry branch December 4, 2023 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants