nixosModules.zapret: ip block list interface packages.zapret: remove antifilter lists astora: update zapret lists lib.preconfiguredModules.bonvim: fix deprecations
This commit is contained in:
parent
bb7c9204f5
commit
27d79a8647
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ templates/*/result*
|
||||
templates/*/flake.lock
|
||||
/result*
|
||||
/repl*
|
||||
/temp
|
||||
|
147
flake.lock
147
flake.lock
@ -8,11 +8,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721306136,
|
||||
"narHash": "sha256-VKPsIGf3/a+RONBipx4lEE4LXG2sdMNkWQu22LNQItg=",
|
||||
"lastModified": 1725841979,
|
||||
"narHash": "sha256-SXYqzpHPuXFR6w/cUKo3VN8XRn6XA2mGbdRXs9oLk6k=",
|
||||
"owner": "Aylur",
|
||||
"repo": "ags",
|
||||
"rev": "344ea72cd3b8d4911f362fec34bce7d8fb37028c",
|
||||
"rev": "aaef50bb2c80ef4b4a359329d72669a95e7c4796",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -39,11 +39,11 @@
|
||||
},
|
||||
"catppuccin": {
|
||||
"locked": {
|
||||
"lastModified": 1720472194,
|
||||
"narHash": "sha256-CYscFEts6tyvosc1T29nxhzIYJAj/1CCEkV3ZMzSN/c=",
|
||||
"lastModified": 1725509983,
|
||||
"narHash": "sha256-NHCgHVqumPraFJnLrkanoLDuhOoUHUvRhvp/RIHJR+A=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "d75d5803852fb0833767dc969a4581ac13204e22",
|
||||
"rev": "45745fe5960acaefef2b60f3455bcac6a0ca6bc9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -53,17 +53,12 @@
|
||||
}
|
||||
},
|
||||
"crane": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721322122,
|
||||
"narHash": "sha256-a0G1NvyXGzdwgu6e1HQpmK5R5yLsfxeBe07nNDyYd+g=",
|
||||
"lastModified": 1725409566,
|
||||
"narHash": "sha256-PrtLmqhM6UtJP7v7IGyzjBFhbG4eOAHT6LPYOFmYfbk=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "8a68b987c476a33e90f203f0927614a75c3f47ea",
|
||||
"rev": "7e4586bad4e3f8f97a9271def747cf58c4b68f3c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -80,11 +75,11 @@
|
||||
"rust-analyzer-src": []
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721629802,
|
||||
"narHash": "sha256-GKlvM9M0mkKJrL6N1eMG4DrROO25Ds1apFw3/b8594w=",
|
||||
"lastModified": 1726813972,
|
||||
"narHash": "sha256-t6turZgoSAVgj7hn5mxzNlLOeVeZvymFo8+ymB52q34=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "1270fb024c6987dd825a20cd27319384a8d8569e",
|
||||
"rev": "251caeafc75b710282ee7e375800f75f4c8c5727",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -117,11 +112,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"lastModified": 1726153070,
|
||||
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -148,6 +143,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"freetype2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -189,11 +202,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721534365,
|
||||
"narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=",
|
||||
"lastModified": 1726825546,
|
||||
"narHash": "sha256-HiBzfzgqojA9OjPB+vdi2o+gy4Zw/MEipuGopgGsZEw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "635563f245309ef5320f80c7ebcb89b2398d2949",
|
||||
"rev": "0b052dd8119005c6ba819db48bcc657e48f401b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -229,11 +242,11 @@
|
||||
"nixpkgs-24_05": "nixpkgs-24_05"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721121314,
|
||||
"narHash": "sha256-zwc7YXga/1ppaZMWFreZykXtFwBgXodxUZiUx969r+g=",
|
||||
"lastModified": 1722877200,
|
||||
"narHash": "sha256-qgKDNJXs+od+1UbRy62uk7dYal3h98I4WojfIqMoGcg=",
|
||||
"owner": "simple-nixos-mailserver",
|
||||
"repo": "nixos-mailserver",
|
||||
"rev": "059b50b2e729729ea00c6831124d3837c494f3d5",
|
||||
"rev": "af7d3bf5daeba3fc28089b015c0dd43f06b176f2",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
@ -244,11 +257,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1721379653,
|
||||
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
|
||||
"lastModified": 1726755586,
|
||||
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
|
||||
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -275,11 +288,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1721524707,
|
||||
"narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=",
|
||||
"lastModified": 1725762081,
|
||||
"narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "556533a23879fc7e5f98dd2e0b31a6911a213171",
|
||||
"rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -316,14 +329,15 @@
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"treefmt-nix": []
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721772245,
|
||||
"narHash": "sha256-//9p3Qm8gLbPUTsSGN2EMYkDwE5Sqq9B9P2X/z2+npw=",
|
||||
"lastModified": 1726846628,
|
||||
"narHash": "sha256-0CH44sEwiljiN2q7eIFCvabyUm1WeEiF8ofP/z5ca0Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "ab67ee7e8b33e788fc53d26dc6f423f9358e3e66",
|
||||
"rev": "3211ce356be612ae89a38c60799992bde8a47127",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -332,6 +346,28 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726816132,
|
||||
"narHash": "sha256-AbB0lgc0IbzLIxj1O3cosiMNAVQak4KJtvq9q8MjHhs=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "7733a39a1321057172d87e6251ded7cdeb67171e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"obs-image-reaction": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
@ -360,11 +396,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714759244,
|
||||
"narHash": "sha256-ZDH7WTsILPEIZuo3/C4QwOXTv7r1xoUxKOQSDFpdNEE=",
|
||||
"lastModified": 1726851829,
|
||||
"narHash": "sha256-8jqyae77Erc82WZgE1rYkds+rjNCKc0rvuMgeQvehGk=",
|
||||
"owner": "L-Nafaryus",
|
||||
"repo": "oscuro",
|
||||
"rev": "68da7759c61b6d34f54087e3e845d8cc70702310",
|
||||
"rev": "d2c22bcb407df746fbbf5279dcccd57e6409427e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -397,11 +433,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721441897,
|
||||
"narHash": "sha256-gYGX9/22tPNeF7dR6bWN5rsrpU4d06GnQNNgZ6ZiXz0=",
|
||||
"lastModified": 1726280639,
|
||||
"narHash": "sha256-YfLRPlFZWrT2oRLNAoqf7G3+NnUTDdlIJk6tmBU7kXM=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "b7996075da11a2d441cfbf4e77c2939ce51506fd",
|
||||
"rev": "e9f8641c92f26fd1e076e705edb12147c384171d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -418,11 +454,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721531171,
|
||||
"narHash": "sha256-AsvPw7T0tBLb53xZGcUC3YPqlIpdxoSx56u8vPCr6gU=",
|
||||
"lastModified": 1726524647,
|
||||
"narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "909e8cfb60d83321d85c8d17209d733658a21c95",
|
||||
"rev": "e2d404a7ea599a013189aa42947f66cede0645c8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -461,9 +497,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wezterm": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"freetype2": "freetype2",
|
||||
"harfbuzz": "harfbuzz",
|
||||
"libpng": "libpng",
|
||||
@ -475,11 +526,11 @@
|
||||
},
|
||||
"locked": {
|
||||
"dir": "nix",
|
||||
"lastModified": 1722353247,
|
||||
"narHash": "sha256-pPH+IJ8pljR+PmeOdckoHvbQVfSBdStKbgXcaqdkTRk=",
|
||||
"lastModified": 1726842683,
|
||||
"narHash": "sha256-n0k/znwnDGF3CNB2GhX9NfGg02mhxOzRTMmWr2EUxFs=",
|
||||
"owner": "wez",
|
||||
"repo": "wezterm",
|
||||
"rev": "56a27e93a9ee50aab50ff4d78308f9b3154b5122",
|
||||
"rev": "abfc0b4c3aa2d6f99c76b20c4d7bdb6d0603ac80",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -28,7 +28,6 @@
|
||||
};
|
||||
crane = {
|
||||
url = "github:ipetkov/crane";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
|
@ -169,42 +169,46 @@
|
||||
# Status line
|
||||
plugins.bufferline = {
|
||||
enable = true;
|
||||
diagnostics = "nvim_lsp";
|
||||
mode = "buffers";
|
||||
settings.options = {
|
||||
diagnostics = "nvim_lsp";
|
||||
mode = "buffers";
|
||||
|
||||
offsets = [
|
||||
{
|
||||
filetype = "neo-tree";
|
||||
text = "Neo-tree";
|
||||
highlight = "Directory";
|
||||
text_align = "left";
|
||||
}
|
||||
];
|
||||
offsets = [
|
||||
{
|
||||
filetype = "neo-tree";
|
||||
text = "Neo-tree";
|
||||
highlight = "Directory";
|
||||
text_align = "left";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
globalstatus = true;
|
||||
extensions = ["neo-tree"];
|
||||
sections = {
|
||||
lualine_a = [
|
||||
{
|
||||
name = "mode";
|
||||
separator.right = "";
|
||||
}
|
||||
];
|
||||
lualine_b = [
|
||||
{
|
||||
name = "branch";
|
||||
icon = "";
|
||||
separator.right = "";
|
||||
}
|
||||
];
|
||||
lualine_c = [
|
||||
{
|
||||
name = "diagnostics";
|
||||
separator.right = ">";
|
||||
extraConfig = {
|
||||
settings = {
|
||||
options = {
|
||||
globalstatus = true;
|
||||
extensions = ["neo-tree"];
|
||||
};
|
||||
sections = {
|
||||
lualine_a = [
|
||||
"mode"
|
||||
{
|
||||
separator.right = "";
|
||||
}
|
||||
];
|
||||
lualine_b = [
|
||||
"branch"
|
||||
{
|
||||
icon = "";
|
||||
separator.right = "";
|
||||
}
|
||||
];
|
||||
lualine_c = [
|
||||
"diagnostics"
|
||||
{
|
||||
separator.right = ">";
|
||||
sources = ["nvim_lsp"];
|
||||
symbols = {
|
||||
error = " ";
|
||||
@ -212,77 +216,47 @@
|
||||
info = " ";
|
||||
hint = " ";
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "filetype";
|
||||
extraConfig = {
|
||||
}
|
||||
|
||||
"filetype"
|
||||
{
|
||||
icon_only = true;
|
||||
separator = "";
|
||||
padding = {
|
||||
left = 1;
|
||||
right = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "filename";
|
||||
extraConfig = {
|
||||
}
|
||||
"filename"
|
||||
{
|
||||
path = 1;
|
||||
};
|
||||
}
|
||||
];
|
||||
lualine_x = [
|
||||
{
|
||||
name = "diff";
|
||||
extraConfig = {
|
||||
symbols = {
|
||||
added = " ";
|
||||
modified = " ";
|
||||
removed = " ";
|
||||
};
|
||||
source.__raw = ''
|
||||
function()
|
||||
local gitsings = vim.b.gitsigns_status_dict
|
||||
if gitsigns then
|
||||
return {
|
||||
added = gitigns.added,
|
||||
modified = gitigns.changed,
|
||||
removed = gitigns.removed
|
||||
}
|
||||
end
|
||||
}
|
||||
];
|
||||
lualine_x = [
|
||||
"diff"
|
||||
];
|
||||
lualine_y = [
|
||||
"progress"
|
||||
{
|
||||
separator.left = "";
|
||||
}
|
||||
"location"
|
||||
{
|
||||
separator.right = "";
|
||||
}
|
||||
];
|
||||
lualine_z = [
|
||||
{
|
||||
separator.left = "";
|
||||
icon = " ";
|
||||
__unkeyed-1.__raw = ''
|
||||
function(text)
|
||||
return os.date("%R")
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
lualine_y = [
|
||||
{
|
||||
separator.left = "";
|
||||
name = "progress";
|
||||
padding = {
|
||||
left = 1;
|
||||
right = 0;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "location";
|
||||
padding = {
|
||||
left = 0;
|
||||
right = 1;
|
||||
};
|
||||
}
|
||||
];
|
||||
lualine_z = [
|
||||
{
|
||||
separator.left = "";
|
||||
fmt = ''
|
||||
function(text)
|
||||
return " " .. os.date("%R")
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -291,7 +265,7 @@
|
||||
plugins.project-nvim = {
|
||||
enable = true;
|
||||
enableTelescope = true;
|
||||
showHidden = true;
|
||||
settings.show_hidden = true;
|
||||
};
|
||||
|
||||
# Syntax highlight
|
||||
@ -315,13 +289,30 @@
|
||||
|
||||
plugins.which-key = {
|
||||
enable = true;
|
||||
icons.group = "+";
|
||||
registrations = {
|
||||
"<leader>g" = "+ Git";
|
||||
"<leader>c" = "+ Code";
|
||||
"<leader>s" = "+ Search";
|
||||
"<leader>w" = "+ Window";
|
||||
"<leader>q" = "+ Quit";
|
||||
settings = {
|
||||
icons.group = "+";
|
||||
spec = [
|
||||
{
|
||||
__unkeyed = "<leader>g";
|
||||
group = "Git";
|
||||
}
|
||||
{
|
||||
__unkeyed = "<leader>c";
|
||||
group = "Code";
|
||||
}
|
||||
{
|
||||
__unkeyed = "<leader>s";
|
||||
group = "Search";
|
||||
}
|
||||
{
|
||||
__unkeyed = "<leader>w";
|
||||
group = "Window";
|
||||
}
|
||||
{
|
||||
__unkeyed = "<leader>q";
|
||||
group = "Quit";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -170,6 +170,7 @@
|
||||
|
||||
nvidia.nvidiaSettings = true;
|
||||
nvidia.modesetting.enable = true;
|
||||
nvidia.open = false;
|
||||
|
||||
graphics.enable = true;
|
||||
graphics.enable32Bit = true;
|
||||
|
@ -38,7 +38,7 @@
|
||||
git
|
||||
#nnn
|
||||
pass
|
||||
taskwarrior
|
||||
taskwarrior3
|
||||
#tmux
|
||||
|
||||
gparted
|
||||
@ -269,6 +269,9 @@
|
||||
ncmpcpp.enable = true;
|
||||
|
||||
# Graphical
|
||||
hyprlock = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
wezterm = {
|
||||
enable = true;
|
||||
@ -287,7 +290,7 @@
|
||||
top = 0,
|
||||
bottom = 0
|
||||
},
|
||||
# ISSUE: the terminal does not update after some time of use. It only updates with mouse movements. [Wayland, Hyprland]
|
||||
-- ISSUE: the terminal does not update after some time of use. It only updates with mouse movements. [Wayland, Hyprland]
|
||||
enable_wayland = false
|
||||
}
|
||||
'';
|
||||
@ -407,6 +410,7 @@
|
||||
"XCURSOR_SIZE,16"
|
||||
"HYPRCURSOR_SIZE,16"
|
||||
"WLR_DRM_NO_ATOMIC,1"
|
||||
"HYPRSHOT_DIR,${hmConfig.xdg.userDirs.pictures}/screenshots"
|
||||
];
|
||||
|
||||
general = {
|
||||
@ -556,7 +560,8 @@
|
||||
"SUPER SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
"SUPER, SPACE, exec, hyprctl switchxkblayout keychron-keychron-k3-pro next"
|
||||
", PRINT, exec, hyprshot -m region"
|
||||
", PRINT, exec, hyprshot --freeze --mode region"
|
||||
"CTRL, PRINT, exec, hyprshot --freeze --mode output"
|
||||
"SUPER, H, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy"
|
||||
];
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
@ -632,7 +637,7 @@
|
||||
};
|
||||
|
||||
# Services
|
||||
services.spoofdpi.enable = false;
|
||||
services.spoofdpi.enable = true;
|
||||
|
||||
services.zapret = {
|
||||
enable = true;
|
||||
@ -648,6 +653,10 @@
|
||||
TPWS_OPT="--hostspell=HOST --split-http-req=method --split-pos=3 --oob"
|
||||
INIT_APPLY_FW=1
|
||||
'';
|
||||
filterAddresses = lib.readFile (pkgs.fetchurl {
|
||||
url = "https://antifilter.network/download/ipsmart.lst";
|
||||
hash = "sha256-zLq3rgci/rye1oQp2zbJelPaoN9+jqPebIbxfJ44Qlg=";
|
||||
});
|
||||
};
|
||||
|
||||
# TODO: remember who use gvfs
|
||||
|
@ -9,9 +9,12 @@ with lib; let
|
||||
cfg = config.services.zapret;
|
||||
|
||||
createFilterList = name: str: (
|
||||
lib.concatStringsSep "\n"
|
||||
(map (ip: "add ${name} ${ip}")
|
||||
(lib.splitString "\n" (lib.removeSuffix "\n" str)))
|
||||
if str == null
|
||||
then ""
|
||||
else
|
||||
(lib.concatStringsSep "\n"
|
||||
(map (ip: "add ${name} ${ip}")
|
||||
(lib.splitString "\n" (lib.removeSuffix "\n" str))))
|
||||
);
|
||||
in {
|
||||
options.services.zapret = {
|
||||
@ -81,6 +84,23 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
filterAddresses = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "List of addresses to filter";
|
||||
};
|
||||
|
||||
ignoreAddresses = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = ''
|
||||
10.0.0.0/8
|
||||
169.254.0.0/16
|
||||
172.16.0.0/12
|
||||
192.168.0.0/16
|
||||
'';
|
||||
description = "List of addresses to ignore";
|
||||
};
|
||||
|
||||
# TODO: add filter and anti filter options with optional file paths
|
||||
# TODO ipset hashsize and maxelem
|
||||
};
|
||||
@ -157,13 +177,9 @@ in {
|
||||
};
|
||||
|
||||
preStart = let
|
||||
zapretListFile = pkgs.writeText "zapretList" (createFilterList "zapret" (lib.readFile cfg.package.passthru.antifilter.ipsmart));
|
||||
nozapretListFile = pkgs.writeText "nozapretList" (createFilterList "nozapret" ''
|
||||
10.0.0.0/8
|
||||
169.254.0.0/16
|
||||
172.16.0.0/12
|
||||
192.168.0.0/16
|
||||
'');
|
||||
# zapretListFile = pkgs.writeText "zapretList" (createFilterList "zapret" (lib.readFile cfg.package.passthru.antifilter.ipsmart));
|
||||
zapretListFile = pkgs.writeText "zapretList" (createFilterList "zapret" cfg.filterAddresses);
|
||||
nozapretListFile = pkgs.writeText "nozapretList" (createFilterList "nozapret" cfg.ignoreAddresses);
|
||||
in ''
|
||||
ipset create zapret hash:net family inet hashsize 262144 maxelem 522288 -!
|
||||
ipset flush zapret
|
||||
|
@ -9,6 +9,10 @@
|
||||
}: let
|
||||
platformInputs = system: rec {
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
#pkgs = import inputs.nixpkgs {
|
||||
# inherit system;
|
||||
# config.allowUnfree = true;
|
||||
#};
|
||||
lib = pkgs.lib;
|
||||
|
||||
inherit bonLib;
|
||||
|
@ -61,15 +61,6 @@ pkgs.stdenv.mkDerivation {
|
||||
ln -s ../usr/share/zapret/init.d/sysv/init.d $out/bin/zapret
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
antifilter = {
|
||||
ipsmart = pkgs.fetchurl {
|
||||
url = "https://antifilter.network/download/ipsmart.lst";
|
||||
hash = "sha256-mg2OFZ3x2q/31wNMZl6R6bTK0TKenSFePRo+B1GJdwo=";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "DPI bypass multi platform";
|
||||
homepage = "https://github.com/bol-van/zapret";
|
||||
|
Loading…
Reference in New Issue
Block a user