This commit is contained in:
2026-04-03 21:02:35 +00:00
parent e176f52a75
commit c63faed698
9 changed files with 183 additions and 60 deletions

View File

@@ -23,6 +23,7 @@ in {
config = mkIf cfg.enable {
networking.wireguard.enable = true;
services.mullvad-vpn.enable = true;
services.mullvad-vpn.package = pkgs.unstable.mullvad-vpn;
# set some options after every daemon start
# to avoid accidentally leaving unsafe settings
@@ -31,7 +32,7 @@ in {
while ! ${pkgs.mullvad}/bin/mullvad status >/dev/null; do sleep 1; done
${pkgs.mullvad}/bin/mullvad lan set allow #enable local lan access
${pkgs.mullvad}/bin/mullvad relay set tunnel-protocol wireguard
${pkgs.mullvad}/bin/mullvad relay set location ca mtr
#${pkgs.mullvad}/bin/mullvad relay set location ca mtr
'';
};
};

View File

@@ -1,7 +1,5 @@
{
lib,
inputs,
outputs,
config,
pkgs,
...
@@ -15,9 +13,8 @@ in {
# Enable native Docker support
virtualisation.docker.enable = true;
# Antigravity's install script needs these symlinked into /usr/bin
wsl.extraBin = [
# Required by VS Code's Remote WSL extension
# Required by VS Code's Remote WSL extension
{src = "${pkgs.coreutils}/bin/dirname";}
{src = "${pkgs.coreutils}/bin/readlink";}
{src = "${pkgs.coreutils}/bin/uname";}
@@ -29,17 +26,26 @@ in {
{src = "${pkgs.coreutils}/bin/sleep";}
{src = "${pkgs.gnutar}/bin/tar";}
{src = "${pkgs.gzip}/bin/gzip";}
{src = "${pkgs.wget}/bin/wget";} # Antigravity uses this to download the server
{src = "${pkgs.procps}/bin/ps";} # Used for process health checks
];
# programs.nix-ld = {
# enable = true;
# libraries = [
# # Required by NodeJS installed by VS Code's Remote WSL extension
# pkgs.stdenv.cc.cc
# ];
# # Use `nix-ld-rs` instead of `nix-ld`, because VS Code's Remote WSL extension launches a non-login non-interactive shell, which is not supported by `nix-ld`, while `nix-ld-rs` works in non-login non-interactive shells.
# package = inputs.nix-ld-rs.packages.${pkgs.system}.nix-ld-rs;
# };
# Standard nix-ld is now very stable and works with Antigravity/VS Code
# It solves the "Could not start dynamically linked executable" error
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc
zlib
fuse3
icu
nss
openssl
curl
expat
libxml2
];
};
wsl = {
enable = true;
@@ -47,16 +53,10 @@ in {
defaultUser = "sstent";
startMenuLaunchers = true;
wslConf.network.generateResolvConf = false;
# wslConf.interop.appendWindowsPath = false;
#No longer needed in 23.05
#interop.preserveArgvZero = true;
# docker-native.enable = true;
#nativeSystemd = true;
# Enable integration with Docker Desktop (needs to be installed)
# docker-desktop.enable = true;
# nativeSystemd = true; # Enable if you need complex service management
};
# Fix for /dev/shm (shared memory) for Electron-based tools like Antigravity
systemd.services.nixs-wsl-systemd-fix = {
description = "Fix the /dev/shm symlink to be a mount";
unitConfig = {