mirror of
https://github.com/sstent/vmimages.git
synced 2026-02-08 13:32:44 +00:00
42 lines
1010 B
Nix
42 lines
1010 B
Nix
{ lib, pkgs, config, modulesPath, ... }:
|
|
{
|
|
|
|
system.stateVersion = "22.05";
|
|
# Enable nix flakes
|
|
nix.package = pkgs.nixFlakes;
|
|
nix.extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
'';
|
|
|
|
systemd.services.nixs-wsl-systemd-fix = {
|
|
description = "Fix the /dev/shm symlink to be a mount";
|
|
unitConfig = {
|
|
DefaultDependencies = "no";
|
|
Before = "sysinit.target";
|
|
ConditionPathExists = "/dev/shm";
|
|
ConditionPathIsSymbolicLink = "/dev/shm";
|
|
ConditionPathIsMountPoint = "/run/shm";
|
|
};
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
ExecStart = [
|
|
"${pkgs.coreutils-full}/bin/rm /dev/shm"
|
|
"/run/wrappers/bin/mount --bind -o X-mount.mkdir /run/shm /dev/shm"
|
|
];
|
|
};
|
|
wantedBy = [ "sysinit.target" ];
|
|
};
|
|
|
|
|
|
wsl = {
|
|
enable = true;
|
|
wslConf.automount.root = "/mnt";
|
|
defaultUser = "sstent";
|
|
startMenuLaunchers = true;
|
|
interop.preserveArgvZero = true;
|
|
};
|
|
|
|
mymods = {
|
|
user_sstent.enable = true;
|
|
};
|
|
} |