Update Cfg and add proxy/wsl

This commit is contained in:
soraefir
2026-05-30 17:48:18 +02:00
parent d9e7775afc
commit 4217227070
18 changed files with 136 additions and 20 deletions

View File

@@ -1 +1 @@
{ ... }: { imports = [ ./base ./boot ./fs ./graphics ./power ./udev ./virt ]; }
{ ... }: { imports = [ ./base ./boot ./fs ./graphics ./power ./udev ./virt ./wsl ]; }

View File

@@ -0,0 +1,13 @@
{ lib, config, pkgs, ... }: {
config = lib.mkIf (config.syscfg.extra.wsl) {
wsl.enable = true;
wsl.defaultUser = config.syscfg.defaultUser;
wsl.extraBin = with pkgs; [
{ src = "${coreutils}/bin/uname"; }
{ src = "${coreutils}/bin/dirname"; }
{ src = "${coreutils}/bin/readlink"; }
];
wsl.wslConf.network.generateHosts = false;
};
}

View File

@@ -1,9 +1,19 @@
{ config, ... }: {
{ lib, config, ... }: {
networking = {
hostName = config.syscfg.hostname;
useDHCP = true;
nameservers = [ "1.1.1.1" "9.9.9.9" ];
extraHosts = ''
${lib.concatStringsSep "\n" config.syscfg.extra.hosts}
'';
proxy = lib.mkIf (config.syscfg.extra.proxy.domain != "") {
default = "http://${config.syscfg.extra.proxy.domain}:${config.syscfg.extra.proxy.port or "8080"}";
noProxy = "${config.syscfg.extra.proxy.noProxy}";
};
firewall = {
enable = true;
allowedUDPPorts =

View File

@@ -37,5 +37,40 @@
];
};
};
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
# Correctly namespaced X11 dependencies
xorg.libX11 xorg.libxcb xorg.libXi xorg.libXext xorg.libxkbfile xorg.xcbutilcursor
libpng libdrm libpulseaudio nss nspr expat libbsd
# Core system requirements
# stdenv.cc.cc
# zlib
# fuse3
# alsa-lib
# openssl
#
# xorg.libXdamage
# xorg.libXfixes
# xorg.libXcomposite
# xorg.libXcursor
# xorg.libXrandr
#
# xorg.libXtst
# # Graphics and system audio/menus
# libGL
# dbus
# fontconfig
# freetype
# glib
#
#
#
];
};
system.stateVersion = "24.11";
}