This commit is contained in:
2023-02-27 21:29:14 +00:00
parent 3482a29ed4
commit ce1eb1d0e0
23 changed files with 452 additions and 332 deletions

View File

@@ -1,14 +1,15 @@
{ lib, pkgs, config, inputs, ... }: {
imports = [
../common
../common/mnt-public.nix
../common/user-sstent.nix
../../common
../../common/mnt-public.nix
../../common/user-sstent.nix
inputs.nixos-wsl.nixosModules.wsl
];
# system.stateVersion = "22.11";
nixpkgs.hostPlatform.system = "x86_64-linux";
networking.hostName = "Go3";
wsl = {
enable = true;

View File

@@ -0,0 +1,51 @@
{ lib, pkgs, config, inputs, ... }: {
imports = [
../../common
../../common/mnt-public.nix
../../common/user-sstent.nix
inputs.nixos-wsl.nixosModules.wsl
];
# system.stateVersion = "22.11";
nixpkgs.hostPlatform.system = "x86_64-linux";
networking.hostName = "StuPC";
wsl = {
enable = true;
wslConf.automount.root = "/mnt";
defaultUser = "sstent";
startMenuLaunchers = true;
interop.preserveArgvZero = true;
nativeSystemd = true;
# Enable native Docker support
docker-native.enable = true;
# Enable integration with Docker Desktop (needs to be installed)
# docker-desktop.enable = true;
};
systemd.services.nixs-wsl-systemd-fix = {
description = "Fix the /dev/shm symlink to be a mount";
unitConfig = {
DefaultDependencies = "no";
Before = [
"sysinit.target"
"systemd-tmpfiles-setup-dev.service"
"systemd-tmpfiles-setup.service"
"systemd-sysctl.service"
];
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" ];
};
}