mirror of
https://github.com/librephoenix/nixos-config
synced 2025-07-06 06:52:13 +05:30
Got my NixOS flake to run under WSL!
This commit is contained in:
parent
e877fd63bc
commit
0a71232a56
18 changed files with 1063 additions and 10 deletions
28
profiles/wsl/nixos-wsl/syschdemd.nix
Executable file
28
profiles/wsl/nixos-wsl/syschdemd.nix
Executable file
|
@ -0,0 +1,28 @@
|
|||
{ lib
|
||||
, pkgs
|
||||
, config
|
||||
, automountPath
|
||||
, defaultUser
|
||||
, defaultUserHome ? "/home/${defaultUser}"
|
||||
, ...
|
||||
}:
|
||||
|
||||
pkgs.substituteAll {
|
||||
name = "syschdemd";
|
||||
src = ./syschdemd.sh;
|
||||
dir = "bin";
|
||||
isExecutable = true;
|
||||
|
||||
buildInputs = with pkgs; [ daemonize ];
|
||||
|
||||
inherit defaultUser defaultUserHome;
|
||||
inherit (pkgs) daemonize;
|
||||
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
|
||||
mount --make-rshared ${automountPath}
|
||||
exec systemd
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue