Compare commits

..

2 commits

Author SHA1 Message Date
b36d666c02
flake: bump 2024-08-25 22:25:57 +08:00
1df7471bf7 nixos/sing-box: bypass lan 2024-08-24 21:24:08 +08:00
3 changed files with 54 additions and 33 deletions

View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1724006180,
"narHash": "sha256-PVxPj0Ga2fMYMtcT9ARCthF+4U71YkOT7ZjgD/vf1Aw=",
"lastModified": 1724537630,
"narHash": "sha256-gpqINM71zp3kw5XYwUXa84ZtPnCmLLnByuFoYesT1bY=",
"owner": "ipetkov",
"repo": "crane",
"rev": "7ce92819802bc583b7e82ebc08013a530f22209f",
"rev": "3e08f4b1fc9aaede5dd511d8f5f4ef27501e49b0",
"type": "github"
},
"original": {
@ -27,11 +27,11 @@
]
},
"locked": {
"lastModified": 1724290508,
"narHash": "sha256-dtL4vielmrko/0XpZ3Wfd7czVvv3NC5oiwh8PKJN9hw=",
"lastModified": 1724349583,
"narHash": "sha256-zgB1Cfk46irIsto8666yLdKjqKdBrjR48Dd3lhQ0CnQ=",
"owner": "nix-community",
"repo": "disko",
"rev": "4b866c9942d0f771ae934f04ca9859936f9bfbcf",
"rev": "435737144be0259559ca3b43f7d72252b1fdcc1b",
"type": "github"
},
"original": {
@ -122,11 +122,11 @@
]
},
"locked": {
"lastModified": 1723986931,
"narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=",
"lastModified": 1724435763,
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671",
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
"type": "github"
},
"original": {
@ -137,11 +137,11 @@
},
"impermanence": {
"locked": {
"lastModified": 1724146542,
"narHash": "sha256-MLxtqDtu+y/4UDhXX5pFypX9/qbH54TDP6Z90oFzd/A=",
"lastModified": 1724489415,
"narHash": "sha256-ey8vhwY/6XCKoh7fyTn3aIQs7WeYSYtLbYEG87VCzX4=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "03fe473c731cda2900bae9894b8dfc68e3492db5",
"rev": "c7f5b394397398c023000cf843986ee2571a1fd7",
"type": "github"
},
"original": {
@ -216,11 +216,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1724067415,
"narHash": "sha256-WJBAEFXAtA41RMpK8mvw0cQ62CJkNMBtzcEeNIJV7b0=",
"lastModified": 1724575805,
"narHash": "sha256-OB/kEL3GAhUZmUfkbPfsPhKs0pRqJKs0EEBiLfyKZw8=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "b09c46430ffcf18d575acf5c339b38ac4e1db5d2",
"rev": "9fc19be21f0807d6be092d70bf0b1de0c00ac895",
"type": "github"
},
"original": {
@ -231,11 +231,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1724271409,
"narHash": "sha256-z4nw9HxkaXEn+5OT8ljLVL2oataHvAzUQ1LEi8Fp+SY=",
"lastModified": 1724395761,
"narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "36a9aeaaa17a2d4348498275f9fe530cd4f9e519",
"rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c",
"type": "github"
},
"original": {
@ -261,11 +261,11 @@
]
},
"locked": {
"lastModified": 1724227338,
"narHash": "sha256-TuSaYdhOxeaaE9885mFO1lZHHax33GD5A9dczJrGUjw=",
"lastModified": 1724440431,
"narHash": "sha256-9etXEOUtzeMgqg1u0wp+EdwG7RpmrAZ2yX516bMj2aE=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "6cedaa7c1b4f82a266e5d30f212273e60d62cb0d",
"rev": "c8a54057aae480c56e28ef3e14e4960628ac495b",
"type": "github"
},
"original": {
@ -302,11 +302,11 @@
]
},
"locked": {
"lastModified": 1724293269,
"narHash": "sha256-x/XhOAszT/ejditCHUtGOjQcVg2AQhrC/QVew3i7kTI=",
"lastModified": 1724552650,
"narHash": "sha256-u1xzgrdRTL0DQhjXMgmEvl75IrL8zGf0RS34IQJXxeU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "6dc6d34a3a217457d7044dcce32b6d537480a6a1",
"rev": "19fda552b69513df7b6aa5fcfd1412c0221467b1",
"type": "github"
},
"original": {
@ -360,11 +360,11 @@
]
},
"locked": {
"lastModified": 1723808491,
"narHash": "sha256-rhis3qNuGmJmYC/okT7Dkc4M8CeUuRCSvW6kC2f3hBc=",
"lastModified": 1724338379,
"narHash": "sha256-kKJtaiU5Ou+e/0Qs7SICXF22DLx4V/WhG1P6+k4yeOE=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "1d07739554fdc4f8481068f1b11d6ab4c1a4167a",
"rev": "070f834771efa715f3e74cd8ab93ecc96fabc951",
"type": "github"
},
"original": {

View file

@ -6,15 +6,15 @@
programs.mpv = {
enable = true;
config = {
ao = "pipewire,";
vo = "gpu-next,gpu,";
ao = "pipewire";
vo = "gpu-next";
hwdec = "auto-safe";
profile = "gpu-hq";
osc = "no";
alang = "jpn,ja";
slang = "eng,en";
osc = "no";
};
scripts =
@ -22,7 +22,9 @@
modernx-zydezu
thumbfast
])
++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.mpvScripts.mpris;
++ lib.optionals pkgs.stdenv.hostPlatform.isLinux (with pkgs.mpvScripts; [
mpris
]);
bindings = let
inherit (pkgs) anime4k;

View file

@ -39,10 +39,21 @@
route = {
rules = [
{
rule_set = ["geoip-cn" "geosite-cn"];
rule_set = [
"geoip-cn"
"geosite-cn"
];
outbound = "direct";
}
{
rule_set = [
"geosite-private"
];
ip_is_private = true;
outbound = "direct";
}
];
rule_set = [
{
tag = "geoip-cn";
@ -56,7 +67,14 @@
format = "binary";
path = "${pkgs.sing-geosite}/share/sing-box/rule-set/geosite-cn.srs";
}
{
tag = "geosite-private";
type = "local";
format = "binary";
path = "${pkgs.sing-geosite}/share/sing-box/rule-set/geosite-private.srs";
}
];
final = "tyo0";
};
@ -75,6 +93,7 @@
httpProxy = "http://127.0.0.1:1080/";
httpsProxy = "http://127.0.0.1:1080/";
};
environment.shellAliases = let
inherit (config.networking.proxy) httpProxy httpsProxy;
in {