From c1b0259313f661cf74051c916cf3bb4f061ce11f Mon Sep 17 00:00:00 2001 From: K900 Date: Mon, 29 Aug 2022 14:32:14 +0300 Subject: feat: rewrite syschdemd (#126) Mostly just a big pile of cleanups. Important changes: - refactor and clean up the code, fix all the shellcheck complaints - stop trying to guess paths in scripts and wrap them correctly instead - use nsfs instead of trying to figure out the right PID to copy namespaces from - clean up $WSLPATH to remove extra impure entries - don't try to restart systemd if it died - make sure the store is read-only before we do anything, so systemd can't mess with it - reformat shell scripts with shfmt --- modules/wsl-distro.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix index 4c6eda5..b3437d7 100644 --- a/modules/wsl-distro.nix +++ b/modules/wsl-distro.nix @@ -33,7 +33,7 @@ with builtins; with lib; config = let cfg = config.wsl; - syschdemd = import ../syschdemd.nix { inherit lib pkgs config; inherit (cfg) automountPath defaultUser; defaultUserHome = config.users.users.${cfg.defaultUser}.home; }; + syschdemd = pkgs.callPackage ../scripts/syschdemd.nix { inherit (cfg) automountPath defaultUser; }; in mkIf cfg.enable { -- cgit v1.2.3