Compare commits
6
Commits
main
...
surface-book-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21986aa957 | ||
|
|
87e8d05701 | ||
|
|
140aa335da | ||
|
|
c325943ef8 | ||
|
|
0ab9615537 | ||
|
|
7736f96078 |
+289
-20
@@ -4,12 +4,35 @@
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
vlessOutbound = {
|
||||
type = "vless";
|
||||
tag = "proxy";
|
||||
server = "immich.frogguingang.com";
|
||||
server_port = 443;
|
||||
uuid = "e76c485e-38f2-44fe-bb74-6550b307741d";
|
||||
flow = "xtls-rprx-vision";
|
||||
tls = {
|
||||
enabled = true;
|
||||
server_name = "immich.frogguingang.com";
|
||||
utls = {
|
||||
enabled = true;
|
||||
fingerprint = "chrome";
|
||||
};
|
||||
reality = {
|
||||
enabled = true;
|
||||
public_key = "Qm8GdYV5l78f24ThAglg6ldKdPPeeXh8KGFuC3krTjM";
|
||||
short_id = "68ce8db33efa2894";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
#system.copySystemConfiguration = true;
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
@@ -18,14 +41,47 @@
|
||||
};
|
||||
nixpkgs.system = "x86_64-linux";
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader = {
|
||||
# systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
useOSProber = true;
|
||||
};
|
||||
timeout = 10;
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.ip_forward" = 1;
|
||||
"net.ipv6.conf.all.forwarding" = 1;
|
||||
};
|
||||
networking.hostName = "nixpengames"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
swapDevices = [{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16 * 1024;
|
||||
}];
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
networking.networkmanager.wifi.powersave = false;
|
||||
# networking.nftables.enable = true;
|
||||
# systemd.services.v2raya.path = with pkgs; [ nftables ];
|
||||
# Fix Marvell AVASTAR WiFi not resuming after suspend (Surface devices)
|
||||
systemd.services.restart-mwifiex = {
|
||||
description = "Reload mwifiex driver after suspend/resume";
|
||||
wantedBy = [ "post-resume.target" ];
|
||||
after = [ "post-resume.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
modprobe -r mwifiex_pcie mwifiex
|
||||
modprobe mwifiex_pcie
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Australia/Sydney";
|
||||
@@ -42,19 +98,75 @@
|
||||
# useXkbConfig = true; # use xkb.options in tty.
|
||||
# };
|
||||
|
||||
i18n.inputMethod = {
|
||||
type = "fcitx5";
|
||||
enable = true;
|
||||
# fcitx5.waylandFrontend = true;
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
fcitx5-gtk
|
||||
fcitx5-anthy
|
||||
fcitx5-hangul
|
||||
qt6Packages.fcitx5-chinese-addons
|
||||
qt6Packages.fcitx5-configtool
|
||||
fcitx5-nord
|
||||
];
|
||||
};
|
||||
environment.sessionVariables = rec {
|
||||
EDITOR="vim";
|
||||
};
|
||||
#printing
|
||||
services.printing.enable = true;
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.printing = {
|
||||
drivers = with pkgs; [
|
||||
cups-filters
|
||||
cups-browsed
|
||||
];
|
||||
};
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
Wayland = {
|
||||
EnableHiDPI=true;
|
||||
};
|
||||
General = {
|
||||
GreeterEnvironment="QT_SCREEN_SCALE_FACTORS=2,QT_FONT_DPI=192";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.displayManager.defaultSession = "plasma";
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.xserver.desktopManager.runXdgAutostartIfNone = true;
|
||||
|
||||
# lid closed battery power management
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.tlp = {
|
||||
enable = false;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_MIN_PERF_ON_AC=0;
|
||||
CPU_MAX_PERF_ON_AC=100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 20;
|
||||
};
|
||||
};
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb.layout = "us";
|
||||
services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||
services.xserver = {
|
||||
enable = true ;
|
||||
xkb.layout = "";
|
||||
xkb.options = "eurosign:e,caps:escape";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
# hardware.pulseaudio.enable = true;
|
||||
@@ -62,19 +174,140 @@
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
# alsa.enable = true;
|
||||
# alsa.support32Bit = true;
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
|
||||
# Enable bluetooth
|
||||
services.blueman.enable = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
hardware.bluetooth.settings = {
|
||||
General = {
|
||||
Experimental = true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
# services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
|
||||
# "monitor.bluez.properties" = {
|
||||
# "bluez5.enable-sbc-xq" = true;
|
||||
# "bluez5.enable-msbc" = true;
|
||||
# "bluez5.enable-hw-volume" = true;
|
||||
# "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
|
||||
# };
|
||||
#};
|
||||
#services.v2raya.enable = true;
|
||||
# Read the text content of an actual external JSON file
|
||||
#services.v2raya.enable = true;
|
||||
# services.v2raya.cliPackage = pkgs.xray.override {
|
||||
# assets = [ pkgs.v2ray-geoip pkgs.v2ray-domain-list-community ];
|
||||
services.sing-box = {
|
||||
enable = true;
|
||||
package = pkgs.sing-box;
|
||||
settings = {
|
||||
log = {
|
||||
level = "info";
|
||||
};
|
||||
inbounds = [{
|
||||
type = "tun";
|
||||
tag = "tun-in";
|
||||
interface_name = "singtun";
|
||||
address = [
|
||||
"172.19.0.1/30"
|
||||
"fd00::1/126"
|
||||
];
|
||||
# mtu = 1492;
|
||||
auto_route = true;
|
||||
auto_redirect = true;
|
||||
strict_route = true;
|
||||
stack = "gvisor";
|
||||
}];
|
||||
outbounds = [ vlessOutbound ];
|
||||
route = {
|
||||
auto_detect_interface = true;
|
||||
final = "proxy";
|
||||
};
|
||||
};
|
||||
};
|
||||
#services.v2raya.enable = true;
|
||||
# services.v2raya.cliPackage = pkgs.xray.override {
|
||||
# assets = [ pkgs.v2ray-geoip pkgs.v2ray-domain-list-community ];
|
||||
# };
|
||||
# services.xray = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# log = {
|
||||
# loglevel = "warning";
|
||||
# };
|
||||
|
||||
# Inbounds: Local ports on your NixOS machine to connect your browser/apps to
|
||||
# inbounds = [
|
||||
# {
|
||||
# listen = "127.0.0.1";
|
||||
# port = 10808; # Local SOCKS5 Proxy Port
|
||||
# protocol = "socks";
|
||||
# settings = {
|
||||
# auth = "noauth";
|
||||
# udp = true;
|
||||
# };
|
||||
# sniffing = {
|
||||
# enabled = true;
|
||||
# destOverride = [ "http" "tls" ];
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# listen = "127.0.0.1";
|
||||
# port = 10809; # Local HTTP Proxy Port
|
||||
# protocol = "http";
|
||||
# settings = {
|
||||
# allowTransparent = false;
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
|
||||
# Outbounds: The VLESS-REALITY connection to your remote Xray server
|
||||
# outbounds = [
|
||||
# {
|
||||
# protocol = "vless";
|
||||
# tag = "proxy";
|
||||
# settings = {
|
||||
# vnext = [
|
||||
# {
|
||||
# address = "immich.frogguingang.com"; # Replace with your server IP or domain
|
||||
# port = 443;
|
||||
# users = [
|
||||
# {
|
||||
# id = "e76c485e-38f2-44fe-bb74-6550b307741d"; # Replace with your VLESS UUID
|
||||
# encryption = "none";
|
||||
# flow = "xtls-rprx-vision"; # Must use XTLS-Vision flow
|
||||
# }
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# streamSettings = {
|
||||
# network = "tcp";
|
||||
# security = "reality";
|
||||
# realitySettings = {
|
||||
# show = false;
|
||||
# serverName = "immich.frogguingang.com"; # Must match the server config SNI
|
||||
# publicKey = "Qm8GdYV5l78f24ThAglg6ldKdPPeeXh8KGFuC3krTjM"; # Replace with your X25519 Public Key
|
||||
# shortId = "68ce8db33efa2894"; # Must match server shortId
|
||||
# fingerprint = "chrome"; # Camouflages client TLS fingerprint as Chrome
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# protocol = "freedom";
|
||||
# tag = "direct";
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.libinput.enable = true;
|
||||
programs.fish.enable = true;
|
||||
@@ -83,6 +316,11 @@
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
services.displayManager.sddm = {
|
||||
wayland = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.jiemusi = {
|
||||
@@ -91,6 +329,7 @@
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
google-chrome
|
||||
vscode-fhs
|
||||
steam
|
||||
spotify
|
||||
@@ -98,6 +337,14 @@
|
||||
tigervnc
|
||||
foot
|
||||
openvpn
|
||||
prismlauncher
|
||||
handbrake
|
||||
musescore
|
||||
kdePackages.kdenlive
|
||||
#zoom-us
|
||||
spotify-player
|
||||
shadowsocks-rust
|
||||
# obsidian
|
||||
];
|
||||
};
|
||||
services.iptsd = {
|
||||
@@ -107,16 +354,24 @@
|
||||
Touchscreen.DisableOnStylus = true;
|
||||
};
|
||||
};
|
||||
programs.kdeconnect.enable = true;
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
# environment.etc."v2raya/geoip.dat".source = "${pkgs.v2ray-geoip}/share/v2ray/geoip.dat";
|
||||
# environment.etc."v2raya/geosite.dat".source = "${pkgs.v2ray-domain-list-community}/share/v2ray/geosite.dat";
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
# v2ray-geoip
|
||||
# v2ray-domain-list-community
|
||||
wakeonlan
|
||||
iwd
|
||||
lf
|
||||
fd
|
||||
traceroute
|
||||
ripgrep
|
||||
zoom
|
||||
# zoom
|
||||
python313
|
||||
firefox
|
||||
tree
|
||||
@@ -124,16 +379,26 @@
|
||||
git
|
||||
htop
|
||||
fastfetch
|
||||
oath-toolkit
|
||||
freshfetch
|
||||
hyfetch
|
||||
foot
|
||||
iptsd
|
||||
libreoffice-qt6-fresh
|
||||
libreoffice-qt-stable
|
||||
netflix
|
||||
audacity
|
||||
blender
|
||||
vlc
|
||||
gimp
|
||||
krita
|
||||
pciutils
|
||||
maliit-keyboard
|
||||
maliit-framework
|
||||
pavucontrol
|
||||
qt6Packages.fcitx5-configtool
|
||||
R
|
||||
#rstudio
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
@@ -144,13 +409,16 @@
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
microsoft-surface.ipts.enable = true;
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.openvpn.servers = {
|
||||
homeVPN = { config = '' config /root/nixos/openvpn/James\ Surface.ovpn ''; };
|
||||
};
|
||||
# services.openvpn.servers = {
|
||||
# homeVPN = { config = '' config /root/nixos/openvpn/James\ Surface.ovpn '';
|
||||
# updateResolvConf = true;}
|
||||
# ;
|
||||
#};
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
@@ -181,5 +449,6 @@
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -6,12 +6,17 @@
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
inputs.nixos-hardware.nixosModules.microsoft-surface-common
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelParams = [
|
||||
"pcie_port_pm=off"
|
||||
"mwifiex.skip_d3=1"
|
||||
];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/731c6ca3-40f5-4016-a460-0a08d3d1b557";
|
||||
@@ -31,7 +36,7 @@
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s20f0u1u2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.tun0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
};
|
||||
nixpkgs.system = "x86_64-linux";
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
networking.hostName = "nixpengames"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Australia/Sydney";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_AU.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# useXkbConfig = true; # use xkb.options in tty.
|
||||
# };
|
||||
|
||||
i18n.inputMethod = {
|
||||
# type = "fcitx5";
|
||||
enabled = "fcitx5";
|
||||
fcitx5.waylandFrontend = true;
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
fcitx5-gtk
|
||||
fcitx5-anthy
|
||||
fcitx5-hangul
|
||||
fcitx5-chinese-addons
|
||||
fcitx5-configtool
|
||||
fcitx5-nord
|
||||
];
|
||||
};
|
||||
environment.sessionVariables = rec {
|
||||
EDITOR="vim";
|
||||
};
|
||||
# Enable the X11 windowing system.
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
Wayland = {
|
||||
EnableHiDPI=true;
|
||||
};
|
||||
General = {
|
||||
GreeterEnvironment="QT_SCREEN_SCALE_FACTORS=2,QT_FONT_DPI=192";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.displayManager.defaultSession = "plasma";
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.xserver.desktopManager.runXdgAutostartIfNone = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
enable = true ;
|
||||
xkb.layout = "";
|
||||
xkb.options = "eurosign:e,caps:escape";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
# hardware.pulseaudio.enable = true;
|
||||
# OR
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
pulse.enable = false;
|
||||
# alsa.enable = true;
|
||||
# alsa.support32Bit = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
|
||||
# Enable bluetooth
|
||||
services.blueman.enable = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
hardware.bluetooth.settings = {
|
||||
General = {
|
||||
Experimental = true;
|
||||
};
|
||||
|
||||
};
|
||||
# services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
|
||||
# "monitor.bluez.properties" = {
|
||||
# "bluez5.enable-sbc-xq" = true;
|
||||
# "bluez5.enable-msbc" = true;
|
||||
# "bluez5.enable-hw-volume" = true;
|
||||
# "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
|
||||
# };
|
||||
#};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.libinput.enable = true;
|
||||
programs.fish.enable = true;
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.jiemusi = {
|
||||
initialPassword = "pengamesiscute";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
vscode-fhs
|
||||
steam
|
||||
spotify
|
||||
vesktop
|
||||
tigervnc
|
||||
foot
|
||||
openvpn
|
||||
];
|
||||
};
|
||||
services.iptsd = {
|
||||
enable = true;
|
||||
config = {
|
||||
Touchscreen.DisableOnPalm = true;
|
||||
Touchscreen.DisableOnStylus = true;
|
||||
};
|
||||
};
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wakeonlan
|
||||
wget
|
||||
lf
|
||||
fd
|
||||
ripgrep
|
||||
zoom
|
||||
python313
|
||||
firefox
|
||||
tree
|
||||
neovim
|
||||
git
|
||||
htop
|
||||
fastfetch
|
||||
freshfetch
|
||||
hyfetch
|
||||
foot
|
||||
iptsd
|
||||
libreoffice-qt6-fresh
|
||||
netflix
|
||||
audacity
|
||||
blender
|
||||
gimp
|
||||
krita
|
||||
pciutils
|
||||
maliit-keyboard
|
||||
maliit-framework
|
||||
pavucontrol
|
||||
libcamera
|
||||
traceroute
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.openvpn.servers = {
|
||||
homeVPN = { config = '' config /root/nixos/openvpn/James\ Surface.ovpn ''; };
|
||||
};
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
|
||||
|
||||
}
|
||||
|
||||
Generated
@@ -12,7 +12,6 @@
|
||||
./configuration.nix
|
||||
nixos-hardware.nixosModules.microsoft-surface-common
|
||||
{
|
||||
#config.microsoft-surface.ipts.enable = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/731c6ca3-40f5-4016-a460-0a08d3d1b557";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/CE3C-5273";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.tun0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,454 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
vlessOutbound = {
|
||||
type = "vless";
|
||||
tag = "proxy";
|
||||
server = "immich.frogguingang.com";
|
||||
server_port = 443;
|
||||
uuid = "e76c485e-38f2-44fe-bb74-6550b307741d";
|
||||
flow = "xtls-rprx-vision";
|
||||
tls = {
|
||||
enabled = true;
|
||||
server_name = "immich.frogguingang.com";
|
||||
utls = {
|
||||
enabled = true;
|
||||
fingerprint = "chrome";
|
||||
};
|
||||
reality = {
|
||||
enabled = true;
|
||||
public_key = "Qm8GdYV5l78f24ThAglg6ldKdPPeeXh8KGFuC3krTjM";
|
||||
short_id = "68ce8db33efa2894";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
#system.copySystemConfiguration = true;
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
};
|
||||
nixpkgs.system = "x86_64-linux";
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader = {
|
||||
# systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
useOSProber = true;
|
||||
};
|
||||
timeout = 10;
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.ip_forward" = 1;
|
||||
"net.ipv6.conf.all.forwarding" = 1;
|
||||
};
|
||||
networking.hostName = "nixpengames"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
swapDevices = [{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16 * 1024;
|
||||
}];
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
networking.networkmanager.wifi.powersave = false;
|
||||
# networking.nftables.enable = true;
|
||||
# systemd.services.v2raya.path = with pkgs; [ nftables ];
|
||||
# Fix Marvell AVASTAR WiFi not resuming after suspend (Surface devices)
|
||||
systemd.services.restart-mwifiex = {
|
||||
description = "Reload mwifiex driver after suspend/resume";
|
||||
wantedBy = [ "post-resume.target" ];
|
||||
after = [ "post-resume.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
modprobe -r mwifiex_pcie mwifiex
|
||||
modprobe mwifiex_pcie
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Australia/Sydney";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_AU.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# useXkbConfig = true; # use xkb.options in tty.
|
||||
# };
|
||||
|
||||
i18n.inputMethod = {
|
||||
type = "fcitx5";
|
||||
enable = true;
|
||||
# fcitx5.waylandFrontend = true;
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
fcitx5-gtk
|
||||
fcitx5-anthy
|
||||
fcitx5-hangul
|
||||
qt6Packages.fcitx5-chinese-addons
|
||||
qt6Packages.fcitx5-configtool
|
||||
fcitx5-nord
|
||||
];
|
||||
};
|
||||
environment.sessionVariables = rec {
|
||||
EDITOR="vim";
|
||||
};
|
||||
#printing
|
||||
services.printing.enable = true;
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.printing = {
|
||||
drivers = with pkgs; [
|
||||
cups-filters
|
||||
cups-browsed
|
||||
];
|
||||
};
|
||||
# Enable the X11 windowing system.
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
Wayland = {
|
||||
EnableHiDPI=true;
|
||||
};
|
||||
General = {
|
||||
GreeterEnvironment="QT_SCREEN_SCALE_FACTORS=2,QT_FONT_DPI=192";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.displayManager.defaultSession = "plasma";
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.xserver.desktopManager.runXdgAutostartIfNone = true;
|
||||
|
||||
# lid closed battery power management
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.tlp = {
|
||||
enable = false;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_MIN_PERF_ON_AC=0;
|
||||
CPU_MAX_PERF_ON_AC=100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 20;
|
||||
};
|
||||
};
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
enable = true ;
|
||||
xkb.layout = "";
|
||||
xkb.options = "eurosign:e,caps:escape";
|
||||
};
|
||||
|
||||
|
||||
# Enable sound.
|
||||
# hardware.pulseaudio.enable = true;
|
||||
# OR
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
# alsa.enable = true;
|
||||
# alsa.support32Bit = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
|
||||
# Enable bluetooth
|
||||
services.blueman.enable = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
hardware.bluetooth.settings = {
|
||||
General = {
|
||||
Experimental = true;
|
||||
};
|
||||
|
||||
};
|
||||
# services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = {
|
||||
# "monitor.bluez.properties" = {
|
||||
# "bluez5.enable-sbc-xq" = true;
|
||||
# "bluez5.enable-msbc" = true;
|
||||
# "bluez5.enable-hw-volume" = true;
|
||||
# "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
|
||||
# };
|
||||
#};
|
||||
#services.v2raya.enable = true;
|
||||
# Read the text content of an actual external JSON file
|
||||
#services.v2raya.enable = true;
|
||||
# services.v2raya.cliPackage = pkgs.xray.override {
|
||||
# assets = [ pkgs.v2ray-geoip pkgs.v2ray-domain-list-community ];
|
||||
services.sing-box = {
|
||||
enable = true;
|
||||
package = pkgs.sing-box;
|
||||
settings = {
|
||||
log = {
|
||||
level = "info";
|
||||
};
|
||||
inbounds = [{
|
||||
type = "tun";
|
||||
tag = "tun-in";
|
||||
interface_name = "singtun";
|
||||
address = [
|
||||
"172.19.0.1/30"
|
||||
"fd00::1/126"
|
||||
];
|
||||
# mtu = 1492;
|
||||
auto_route = true;
|
||||
auto_redirect = true;
|
||||
strict_route = true;
|
||||
stack = "gvisor";
|
||||
}];
|
||||
outbounds = [ vlessOutbound ];
|
||||
route = {
|
||||
auto_detect_interface = true;
|
||||
final = "proxy";
|
||||
};
|
||||
};
|
||||
};
|
||||
#services.v2raya.enable = true;
|
||||
# services.v2raya.cliPackage = pkgs.xray.override {
|
||||
# assets = [ pkgs.v2ray-geoip pkgs.v2ray-domain-list-community ];
|
||||
# };
|
||||
# services.xray = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# log = {
|
||||
# loglevel = "warning";
|
||||
# };
|
||||
|
||||
# Inbounds: Local ports on your NixOS machine to connect your browser/apps to
|
||||
# inbounds = [
|
||||
# {
|
||||
# listen = "127.0.0.1";
|
||||
# port = 10808; # Local SOCKS5 Proxy Port
|
||||
# protocol = "socks";
|
||||
# settings = {
|
||||
# auth = "noauth";
|
||||
# udp = true;
|
||||
# };
|
||||
# sniffing = {
|
||||
# enabled = true;
|
||||
# destOverride = [ "http" "tls" ];
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# listen = "127.0.0.1";
|
||||
# port = 10809; # Local HTTP Proxy Port
|
||||
# protocol = "http";
|
||||
# settings = {
|
||||
# allowTransparent = false;
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
|
||||
# Outbounds: The VLESS-REALITY connection to your remote Xray server
|
||||
# outbounds = [
|
||||
# {
|
||||
# protocol = "vless";
|
||||
# tag = "proxy";
|
||||
# settings = {
|
||||
# vnext = [
|
||||
# {
|
||||
# address = "immich.frogguingang.com"; # Replace with your server IP or domain
|
||||
# port = 443;
|
||||
# users = [
|
||||
# {
|
||||
# id = "e76c485e-38f2-44fe-bb74-6550b307741d"; # Replace with your VLESS UUID
|
||||
# encryption = "none";
|
||||
# flow = "xtls-rprx-vision"; # Must use XTLS-Vision flow
|
||||
# }
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# streamSettings = {
|
||||
# network = "tcp";
|
||||
# security = "reality";
|
||||
# realitySettings = {
|
||||
# show = false;
|
||||
# serverName = "immich.frogguingang.com"; # Must match the server config SNI
|
||||
# publicKey = "Qm8GdYV5l78f24ThAglg6ldKdPPeeXh8KGFuC3krTjM"; # Replace with your X25519 Public Key
|
||||
# shortId = "68ce8db33efa2894"; # Must match server shortId
|
||||
# fingerprint = "chrome"; # Camouflages client TLS fingerprint as Chrome
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# protocol = "freedom";
|
||||
# tag = "direct";
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.libinput.enable = true;
|
||||
programs.fish.enable = true;
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
services.displayManager.sddm = {
|
||||
wayland = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.jiemusi = {
|
||||
initialPassword = "pengamesiscute";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
google-chrome
|
||||
vscode-fhs
|
||||
steam
|
||||
spotify
|
||||
vesktop
|
||||
tigervnc
|
||||
foot
|
||||
openvpn
|
||||
prismlauncher
|
||||
handbrake
|
||||
musescore
|
||||
kdePackages.kdenlive
|
||||
#zoom-us
|
||||
spotify-player
|
||||
shadowsocks-rust
|
||||
# obsidian
|
||||
];
|
||||
};
|
||||
services.iptsd = {
|
||||
enable = true;
|
||||
config = {
|
||||
Touchscreen.DisableOnPalm = true;
|
||||
Touchscreen.DisableOnStylus = true;
|
||||
};
|
||||
};
|
||||
programs.kdeconnect.enable = true;
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
# environment.etc."v2raya/geoip.dat".source = "${pkgs.v2ray-geoip}/share/v2ray/geoip.dat";
|
||||
# environment.etc."v2raya/geosite.dat".source = "${pkgs.v2ray-domain-list-community}/share/v2ray/geosite.dat";
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
# v2ray-geoip
|
||||
# v2ray-domain-list-community
|
||||
wakeonlan
|
||||
iwd
|
||||
lf
|
||||
fd
|
||||
traceroute
|
||||
ripgrep
|
||||
# zoom
|
||||
python313
|
||||
firefox
|
||||
tree
|
||||
neovim
|
||||
git
|
||||
htop
|
||||
fastfetch
|
||||
oath-toolkit
|
||||
freshfetch
|
||||
hyfetch
|
||||
foot
|
||||
iptsd
|
||||
libreoffice-qt-stable
|
||||
netflix
|
||||
audacity
|
||||
blender
|
||||
vlc
|
||||
gimp
|
||||
krita
|
||||
pciutils
|
||||
maliit-keyboard
|
||||
maliit-framework
|
||||
pavucontrol
|
||||
qt6Packages.fcitx5-configtool
|
||||
R
|
||||
#rstudio
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
microsoft-surface.ipts.enable = true;
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
# services.openvpn.servers = {
|
||||
# homeVPN = { config = '' config /root/nixos/openvpn/James\ Surface.ovpn '';
|
||||
# updateResolvConf = true;}
|
||||
# ;
|
||||
#};
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
|
||||
|
||||
}
|
||||
|
||||
Generated
+74
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixos-hardware": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1791373788,
|
||||
"narHash": "sha256-c3oMt0QoE+4yiRk6u1m2L9ogjaUw0uTGn9yk808KkgE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "4bc63156b109ee7b4103e3ec30565c8c92bde435",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1789546076,
|
||||
"narHash": "sha256-vWkSk5bbfTqdtMoSgD9FshACO8JCvXTFi+3cqEp0mH0=",
|
||||
"rev": "b1b875982b17dabde9b4a37f3e229e74913e6db3",
|
||||
"type": "tarball",
|
||||
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1074753.b1b875982b17/nixexprs.tar.xz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1791456040,
|
||||
"narHash": "sha256-H83yz/do+hjOO0uujHyH8RgtIQP2v7Mw+cLwcZK/xKc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e7439b6b14ad3cc35d05608ebca9bce01a25f5f8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1791456040,
|
||||
"narHash": "sha256-gRZ/s8WQJ2CsXdhcDVQH34qxuL0MuMCOs3aBiK1Prsw=",
|
||||
"rev": "e7439b6b14ad3cc35d05608ebca9bce01a25f5f8",
|
||||
"type": "tarball",
|
||||
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1087755.e7439b6b14ad/nixexprs.tar.zst"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable"; # or nixpkgs/nixos-unstable
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
nixpengames = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [ ./configuration.nix ];
|
||||
};
|
||||
};
|
||||
# packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
|
||||
|
||||
# packages.x86_64-linux.default = self.packages.x86_64-linux.hello;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,354 @@
|
||||
|
||||
{
|
||||
"dns": {
|
||||
"hosts": {
|
||||
"domain:googleapis.cn": "googleapis.com",
|
||||
"dns.alidns.com": [
|
||||
"223.5.5.5",
|
||||
"223.6.6.6",
|
||||
"2400:3200::1",
|
||||
"2400:3200:baba::1"
|
||||
],
|
||||
"dns.sse.cisco.com": [
|
||||
"208.67.220.220",
|
||||
"208.67.222.222",
|
||||
"2620:119:35::35",
|
||||
"2620:119:53::53"
|
||||
],
|
||||
"dns.umbrella.com": [
|
||||
"208.67.220.220",
|
||||
"208.67.222.222",
|
||||
"2620:119:35::35",
|
||||
"2620:119:53::53"
|
||||
],
|
||||
"one.one.one.one": [
|
||||
"1.1.1.1",
|
||||
"1.0.0.1",
|
||||
"2606:4700:4700::1111",
|
||||
"2606:4700:4700::1001"
|
||||
],
|
||||
"1dot1dot1dot1.cloudflare-dns.com": [
|
||||
"1.1.1.1",
|
||||
"1.0.0.1",
|
||||
"2606:4700:4700::1111",
|
||||
"2606:4700:4700::1001"
|
||||
],
|
||||
"dns.cloudflare.com": [
|
||||
"162.159.61.8",
|
||||
"172.64.41.8",
|
||||
"2a06:98c1:52::8",
|
||||
"2803:f800:53::8"
|
||||
],
|
||||
"cloudflare-dns.com": [
|
||||
"104.16.248.249",
|
||||
"104.16.249.249",
|
||||
"2606:4700::6810:f8f9",
|
||||
"2606:4700::6810:f9f9"
|
||||
],
|
||||
"engage.cloudflareclient.com": [
|
||||
"162.159.192.1",
|
||||
"2606:4700:d0::a29f:c001"
|
||||
],
|
||||
"doh.pub": [
|
||||
"1.12.12.12",
|
||||
"120.53.53.53"
|
||||
],
|
||||
"dot.pub": [
|
||||
"1.12.12.12",
|
||||
"120.53.53.53"
|
||||
],
|
||||
"dns.google": [
|
||||
"8.8.8.8",
|
||||
"8.8.4.4",
|
||||
"2001:4860:4860::8888",
|
||||
"2001:4860:4860::8844"
|
||||
],
|
||||
"dns.quad9.net": [
|
||||
"9.9.9.9",
|
||||
"149.112.112.112",
|
||||
"2620:fe::fe",
|
||||
"2620:fe::9"
|
||||
],
|
||||
"dns.sb": [
|
||||
"45.11.45.11",
|
||||
"185.222.222.222",
|
||||
"2a09::",
|
||||
"2a11::"
|
||||
],
|
||||
"common.dot.dns.yandex.net": [
|
||||
"77.88.8.8",
|
||||
"77.88.8.1",
|
||||
"2a02:6b8::feed:0ff",
|
||||
"2a02:6b8:0:1::feed:0ff"
|
||||
],
|
||||
"immich.frogguingang.com": "116.255.17.227"
|
||||
},
|
||||
"servers": [
|
||||
"https://cloudflare-dns.com/dns-query",
|
||||
{
|
||||
"address": "223.5.5.5",
|
||||
"domains": [
|
||||
"geosite:cn"
|
||||
],
|
||||
"expectIPs": [
|
||||
"geoip:cn"
|
||||
],
|
||||
"skipFallback": true,
|
||||
"tag": "domestic-dns_cn_expect_0"
|
||||
},
|
||||
{
|
||||
"address": "https://cloudflare-dns.com/dns-query",
|
||||
"domains": [
|
||||
"geosite:google"
|
||||
]
|
||||
},
|
||||
{
|
||||
"address": "223.5.5.5",
|
||||
"domains": [
|
||||
"geosite:private"
|
||||
],
|
||||
"skipFallback": true,
|
||||
"tag": "domestic-dns_1_0"
|
||||
},
|
||||
{
|
||||
"address": "223.5.5.5",
|
||||
"domains": [
|
||||
"domain:alidns.com",
|
||||
"domain:doh.pub",
|
||||
"domain:dot.pub",
|
||||
"domain:360.cn",
|
||||
"domain:onedns.net"
|
||||
],
|
||||
"skipFallback": true,
|
||||
"tag": "domestic-dns_2_0"
|
||||
},
|
||||
{
|
||||
"address": "223.5.5.5",
|
||||
"domains": [
|
||||
"geosite:cn"
|
||||
],
|
||||
"skipFallback": true,
|
||||
"tag": "domestic-dns_3_0"
|
||||
}
|
||||
],
|
||||
"tag": "dns-module"
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": 10808,
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true,
|
||||
"userLevel": 8
|
||||
},
|
||||
"sniffing": {
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls",
|
||||
"quic"
|
||||
],
|
||||
"enabled": true,
|
||||
"routeOnly": false
|
||||
},
|
||||
"tag": "socks"
|
||||
}
|
||||
],
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"outbounds": [
|
||||
{
|
||||
"mux": {
|
||||
"concurrency": -1,
|
||||
"enabled": false
|
||||
},
|
||||
"protocol": "vless",
|
||||
"settings": {
|
||||
"vnext": [
|
||||
{
|
||||
"address": "immich.frogguingang.com",
|
||||
"encryption": "none",
|
||||
"flow": "xtls-rprx-vision",
|
||||
"id": "e76c485e-38f2-44fe-bb74-6550b307741d",
|
||||
"level": 8,
|
||||
"port": 443
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"realitySettings": {
|
||||
"allowInsecure": false,
|
||||
"fingerprint": "chrome",
|
||||
"publicKey": "Qm8GdYV5l78f24ThAglg6ldKdPPeeXh8KGFuC3krTjM",
|
||||
"serverName": "immich.frogguingang.com",
|
||||
"shortId": "68ce8db33efa2894"
|
||||
},
|
||||
"security": "reality",
|
||||
"sockopt": {
|
||||
"domainStrategy": "UseIP",
|
||||
"happyEyeballs": {
|
||||
"interleave": 2,
|
||||
"maxConcurrentTry": 4,
|
||||
"prioritizeIPv6": false,
|
||||
"tryDelayMs": 250
|
||||
}
|
||||
},
|
||||
"tcpSettings": {
|
||||
"header": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tag": "proxy"
|
||||
},
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"sockopt": {
|
||||
"domainStrategy": "UseIP",
|
||||
"happyEyeballs": {
|
||||
"interleave": 2,
|
||||
"maxConcurrentTry": 4,
|
||||
"tryDelayMs": 250
|
||||
}
|
||||
}
|
||||
},
|
||||
"tag": "direct"
|
||||
},
|
||||
{
|
||||
"protocol": "blackhole",
|
||||
"settings": {},
|
||||
"tag": "block"
|
||||
}
|
||||
],
|
||||
"policy": {
|
||||
"levels": {
|
||||
"8": {
|
||||
"connIdle": 300,
|
||||
"downlinkOnly": 1,
|
||||
"handshake": 4,
|
||||
"uplinkOnly": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"remarks": "reality xtls",
|
||||
"routing": {
|
||||
"domainStrategy": "AsIs",
|
||||
"rules": [
|
||||
{
|
||||
"network": "udp",
|
||||
"outboundTag": "block",
|
||||
"port": "443",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"domain": [
|
||||
"geosite:google"
|
||||
],
|
||||
"outboundTag": "proxy",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"ip": [
|
||||
"ext:geoip-only-cn-private.dat:private"
|
||||
],
|
||||
"outboundTag": "direct",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"domain": [
|
||||
"geosite:private"
|
||||
],
|
||||
"outboundTag": "direct",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"ip": [
|
||||
"223.5.5.5",
|
||||
"223.6.6.6",
|
||||
"2400:3200::1",
|
||||
"2400:3200:baba::1",
|
||||
"119.29.29.29",
|
||||
"1.12.12.12",
|
||||
"120.53.53.53",
|
||||
"2402:4e00::",
|
||||
"2402:4e00:1::",
|
||||
"180.76.76.76",
|
||||
"2400:da00::6666",
|
||||
"114.114.114.114",
|
||||
"114.114.115.115",
|
||||
"114.114.114.119",
|
||||
"114.114.115.119",
|
||||
"114.114.114.110",
|
||||
"114.114.115.110",
|
||||
"180.184.1.1",
|
||||
"180.184.2.2",
|
||||
"101.226.4.6",
|
||||
"218.30.118.6",
|
||||
"123.125.81.6",
|
||||
"140.207.198.6",
|
||||
"1.2.4.8",
|
||||
"210.2.4.8",
|
||||
"52.80.66.66",
|
||||
"117.50.22.22",
|
||||
"2400:7fc0:849e:200::4",
|
||||
"2404:c2c0:85d8:901::4",
|
||||
"117.50.10.10",
|
||||
"52.80.52.52",
|
||||
"2400:7fc0:849e:200::8",
|
||||
"2404:c2c0:85d8:901::8",
|
||||
"117.50.60.30",
|
||||
"52.80.60.30"
|
||||
],
|
||||
"outboundTag": "direct",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"domain": [
|
||||
"domain:alidns.com",
|
||||
"domain:doh.pub",
|
||||
"domain:dot.pub",
|
||||
"domain:360.cn",
|
||||
"domain:onedns.net"
|
||||
],
|
||||
"outboundTag": "direct",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"ip": [
|
||||
"ext:geoip-only-cn-private.dat:cn"
|
||||
],
|
||||
"outboundTag": "direct",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"domain": [
|
||||
"geosite:cn"
|
||||
],
|
||||
"outboundTag": "direct",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"inboundTag": [
|
||||
"domestic-dns_1_0",
|
||||
"domestic-dns_2_0",
|
||||
"domestic-dns_3_0",
|
||||
"domestic-dns_cn_expect_0"
|
||||
],
|
||||
"outboundTag": "direct",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"inboundTag": [
|
||||
"dns-module"
|
||||
],
|
||||
"outboundTag": "proxy",
|
||||
"type": "field"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user