Files
nix-config/modules/machines/aether/nixos-wsl/syschdemd.nix
2023-07-11 04:37:24 -04:00

26 lines
511 B
Nix

{
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
'';
}