Add configuration for WSL2

This commit is contained in:
Dave Gallant
2022-07-02 22:56:20 +00:00
parent 920602e0fe
commit d74ec8f89b
21 changed files with 1101 additions and 14 deletions

View File

@@ -0,0 +1,25 @@
{
lib,
pkgs,
config,
defaultUser,
...
}:
pkgs.substituteAll {
name = "syschdemd";
src = ./syschdemd.sh;
dir = "bin";
isExecutable = true;
buildInputs = with pkgs; [daemonize];
inherit (pkgs) daemonize;
inherit defaultUser;
inherit (config.security) wrapperDir;
fsPackagesPath = lib.makeBinPath config.system.fsPackages;
systemdWrapper = pkgs.writeShellScript "systemd-wrapper.sh" ''
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc || true
exec systemd
'';
}