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

170
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"filter": {
"locked": {
"lastModified": 1731533336,
"narHash": "sha256-oRam5PS1vcrr5UPgALW0eo1m/5/pls27Z/pabHNy2Ms=",
"lastModified": 1757882181,
"narHash": "sha256-+cCxYIh2UNalTz364p+QYmWHs0P+6wDhiWR4jDIKQIU=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "f7653272fd234696ae94229839a99b73c9ab7de0",
"rev": "59c44d1909c72441144b93cf0f054be7fe764de5",
"type": "github"
},
"original": {
@@ -34,11 +34,11 @@
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
@@ -101,6 +101,24 @@
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -108,11 +126,11 @@
]
},
"locked": {
"lastModified": 1751468302,
"narHash": "sha256-tWosziZTT039x6PgEZUhzGlV8oLvdDmIgKTE8ESMaEA=",
"lastModified": 1763992789,
"narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "501cfec8277f931a9c9af9f23d3105c537faeafe",
"rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3",
"type": "github"
},
"original": {
@@ -129,11 +147,11 @@
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"lastModified": 1762808025,
"narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
"type": "github"
},
"original": {
@@ -181,13 +199,31 @@
"type": "github"
}
},
"nix-vscode-extensions": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1775185075,
"narHash": "sha256-fUvn9pAPPplNzpT27n51wBKBEJtHFLb8b2b+5fAU1Eo=",
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"rev": "b557a6397204dd4e148144979c99e1e66e8ab2e8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-vscode-extensions",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1751432711,
"narHash": "sha256-136MeWtckSHTN9Z2WRNRdZ8oRP3vyx3L8UxeBYE+J9w=",
"lastModified": 1775203647,
"narHash": "sha256-6MWaMLXK9QMndI94CIxeiPafi3wuO+imCtK9tfhsZdw=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "497ae1357f1ac97f1aea31a4cb74ad0d534ef41f",
"rev": "80afbd13eea0b7c4ac188de949e1711b31c2b5f0",
"type": "github"
},
"original": {
@@ -204,11 +240,11 @@
]
},
"locked": {
"lastModified": 1749574455,
"narHash": "sha256-fm2/8KPOYvvIAnNVtjDlTt/My00lIbZQ+LMrfQIWVzs=",
"lastModified": 1774972752,
"narHash": "sha256-DnLIpFxznohpLkIFs390uZ0gxwkVyhtknhKNu+lQJK8=",
"owner": "nix-community",
"repo": "nixos-wsl",
"rev": "917af390377c573932d84b5e31dd9f2c1b5c0f09",
"rev": "d97e078f4788cddb8d11c3c99f72a4bb9ddec221",
"type": "github"
},
"original": {
@@ -219,27 +255,27 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1751464076,
"narHash": "sha256-zPbr0yYo4BDfkJSy86fUx6TFLEAErZlmsVcTynKkFmk=",
"lastModified": 1766025857,
"narHash": "sha256-Lav5jJazCW4mdg1iHcROpuXqmM94BWJvabLFWaJVJp0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fe1a3fe5e4a84304f4d5564ac0bf32fc2780303c",
"rev": "def3da69945bbe338c373fddad5a1bb49cf199ce",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-25.05",
"repo": "nixpkgs",
"rev": "def3da69945bbe338c373fddad5a1bb49cf199ce",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1751271578,
"narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
"lastModified": 1775036866,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
"type": "github"
},
"original": {
@@ -251,11 +287,27 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1744868846,
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
"lastModified": 1768649915,
"narHash": "sha256-jc21hKogFnxU7KXSVTRmxC7u5D4RHwm9BAvDf5/Z1Uo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3e3f3c7f9977dc123c23ee21e8085ed63daf8c37",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1774610258,
"narHash": "sha256-HaThtroVD9wRdx7KQk0B75JmFcXlMUoEdDFNOMOlsOs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c",
"rev": "832efc09b4caf6b4569fbf9dc01bec3082a00611",
"type": "github"
},
"original": {
@@ -265,6 +317,20 @@
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1682134069,
"narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fd901ef4bf93499374c5af385b2943f5801c0833",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"filter": "filter",
@@ -273,24 +339,26 @@
"ignore": "ignore",
"library": "library",
"nix-ld-rs": "nix-ld-rs",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix",
"utils": "utils"
"utils": "utils",
"vscode-server": "vscode-server"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1750119275,
"narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=",
"lastModified": 1775188331,
"narHash": "sha256-/0BoSi0Dg0ON7IW0oscM12WSPBaMSCn36XTt0lHZoy8=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2",
"rev": "8f093d0d2f08f37317778bd94db5951d6cce6c46",
"type": "github"
},
"original": {
@@ -344,6 +412,21 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"flake-utils": "flake-utils_3"
@@ -361,6 +444,25 @@
"repo": "flake-utils-plus",
"type": "github"
}
},
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1770124655,
"narHash": "sha256-yHmd2B13EtBUPLJ+x0EaBwNkQr9LTne1arLVxT6hSnY=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "92ce71c3ba5a94f854e02d57b14af4997ab54ef0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-vscode-server",
"type": "github"
}
}
},
"root": "root",

View File

@@ -16,6 +16,12 @@
# TODO: Add any other flake you might need
# hardware.url = "github:nixos/nixos-hardware";
#VSCode fix
vscode-server.url = "github:nix-community/nixos-vscode-server";
# Add nix-vscode-extensions for VS Code extensions
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
# Shameless plug: looking for a way to nixify your themes and make
# everything match nicely? Try nix-colors!
# nix-colors.url = "github:misterio77/nix-colors";

View File

@@ -8,7 +8,7 @@
imports = [
../common.nix
../user-sstent.nix
inputs.nixos-wsl.nixosModules.wsl
inputs.nixos-wsl.nixosModules.default
];
# system.stateVersion = "22.11";
@@ -16,7 +16,7 @@
networking.hostName = "StuMini-WSL";
services.openssh.enable = true;
custom = {
mullvad.enable = true;
mullvad.enable = false;
mnt_public.enable = false;
syncthing.enable = true;
wsl.enable = true;

View File

@@ -8,7 +8,7 @@
imports = [
../common.nix
../user-sstent.nix
inputs.nixos-wsl.nixosModules.wsl
inputs.nixos-wsl.nixosModules.default
];
# system.stateVersion = "22.11";

View File

@@ -11,6 +11,7 @@
[
inputs.home-manager.nixosModules.home-manager
inputs.sops-nix.nixosModules.sops
inputs.vscode-server.nixosModules.default
]
++ (builtins.attrValues outputs.nixosModules);
@@ -95,8 +96,17 @@
aubio
pydub
]))
# (pkgs.vscode-with-extensions.override {
# vscodeExtensions = with pkgs.nix-vscode-extensions.vscode-marketplace; [
# # Add Kilo Code extension
# kilocode.kilo-code
# ];
# })
];
services.vscode-server.enable = true;
nix.gc = {
automatic = true; # Enable the automatic garbage collector
dates = "03:15"; # When to run the garbage collector

View File

@@ -8,7 +8,7 @@
imports = [
../common.nix
../user-sstent.nix
inputs.nixos-wsl.nixosModules.wsl
inputs.nixos-wsl.nixosModules.default
];
# system.stateVersion = "22.11";

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 = {

View File

@@ -21,6 +21,10 @@
keybase = final.unstable.keybase;
};
# Add VS Code extensions overlay
# This makes nix-vscode-extensions available as pkgs.nix-vscode-extensions
vscode-extensions = inputs.nix-vscode-extensions.overlays.default;
#When applied, the unstable nixpkgs set (declared in the flake inputs) will
#be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: {