diff --git a/configuration.nix b/configuration.nix index 6142dcc..567a4b1 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,6 +4,29 @@ { 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. @@ -31,12 +54,21 @@ 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"; @@ -75,8 +107,8 @@ fcitx5-gtk fcitx5-anthy fcitx5-hangul - fcitx5-chinese-addons - fcitx5-configtool + qt6Packages.fcitx5-chinese-addons + qt6Packages.fcitx5-configtool fcitx5-nord ]; }; @@ -170,8 +202,41 @@ #}; #services.v2raya.enable = true; # Read the text content of an actual external JSON file - services.v2raya.enable = true; - services.v2raya.cliPackege = pkgs.xray + #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 = { @@ -264,6 +329,7 @@ extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ firefox + google-chrome vscode-fhs steam spotify @@ -275,7 +341,7 @@ handbrake musescore kdePackages.kdenlive - zoom-us + #zoom-us spotify-player shadowsocks-rust # obsidian @@ -292,16 +358,20 @@ # 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 @@ -314,7 +384,7 @@ hyfetch foot iptsd - libreoffice-qt6-fresh + libreoffice-qt-stable netflix audacity blender @@ -325,9 +395,9 @@ maliit-keyboard maliit-framework pavucontrol - fcitx5-configtool + qt6Packages.fcitx5-configtool R - rstudio + #rstudio wl-clipboard ]; diff --git a/flake_test/flake.lock b/flake_test/flake.lock deleted file mode 100644 index 42bac7c..0000000 --- a/flake_test/flake.lock +++ /dev/null @@ -1,27 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1751984180, - "narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/touchscreen/flake_test/.xray_config.json.swp b/touchscreen/flake_test/.xray_config.json.swp new file mode 100644 index 0000000..2d86b72 Binary files /dev/null and b/touchscreen/flake_test/.xray_config.json.swp differ diff --git a/touchscreen/flake_test/flake.lock b/touchscreen/flake_test/flake.lock new file mode 100644 index 0000000..22332b0 --- /dev/null +++ b/touchscreen/flake_test/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "nixpkgs": { + "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" + } + }, + "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" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake_test/flake.nix b/touchscreen/flake_test/flake.nix similarity index 77% rename from flake_test/flake.nix rename to touchscreen/flake_test/flake.nix index 0512f44..4949e91 100644 --- a/flake_test/flake.nix +++ b/touchscreen/flake_test/flake.nix @@ -2,7 +2,8 @@ description = "A very basic flake"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; # or nixpkgs/nixos-unstable + nixpkgs.url = "nixpkgs/nixos-unstable"; # or nixpkgs/nixos-unstable + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; }; outputs = { self, nixpkgs, ... }: diff --git a/flake_test/xray_config.json b/touchscreen/flake_test/xray_config.json similarity index 100% rename from flake_test/xray_config.json rename to touchscreen/flake_test/xray_config.json