Update Cfg and add proxy/wsl
This commit is contained in:
@@ -1 +1 @@
|
||||
{ ... }: { imports = [ ./base ./boot ./fs ./graphics ./power ./udev ./virt ]; }
|
||||
{ ... }: { imports = [ ./base ./boot ./fs ./graphics ./power ./udev ./virt ./wsl ]; }
|
||||
|
||||
13
modules/nixos/system/hw/wsl/default.nix
Normal file
13
modules/nixos/system/hw/wsl/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
@@ -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 =
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user