diff --git a/flake.lock b/flake.lock index 9f578b4..4ab98d0 100644 --- a/flake.lock +++ b/flake.lock @@ -268,6 +268,24 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -899,6 +917,22 @@ "type": "github" } }, + "nixpkgs_8": { + "locked": { + "lastModified": 1777954456, + "narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": [ @@ -960,7 +994,8 @@ "russia-blocked-geoip": "russia-blocked-geoip", "sops-nix": "sops-nix", "stylix": "stylix", - "yazi": "yazi" + "yazi": "yazi", + "zapret-discord-youtube": "zapret-discord-youtube" } }, "russia-blocked-geoip": { @@ -1096,6 +1131,21 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -1237,6 +1287,42 @@ "repo": "yazi", "type": "github" } + }, + "zapret-discord-youtube": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_8", + "zapret-flowseal": "zapret-flowseal" + }, + "locked": { + "lastModified": 1777795990, + "narHash": "sha256-ln0P3BrWm8ScrwEhSxjLYPTiWWgsUyLospEj0yqRT6Y=", + "owner": "kartavkun", + "repo": "zapret-discord-youtube", + "rev": "0d8c5524ed50f1ff2e4d805ee8a976c4b907bd37", + "type": "github" + }, + "original": { + "owner": "kartavkun", + "repo": "zapret-discord-youtube", + "type": "github" + } + }, + "zapret-flowseal": { + "flake": false, + "locked": { + "lastModified": 1778422964, + "narHash": "sha256-1rjA0QV2X7XVS+SFAKCZXOQKNYdDjjXwgGEiAKgRN6U=", + "owner": "Flowseal", + "repo": "zapret-discord-youtube", + "rev": "459c4c2a2ef01dcab98811de448d19bda0678617", + "type": "github" + }, + "original": { + "owner": "Flowseal", + "repo": "zapret-discord-youtube", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 5e3487f..4546df5 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,8 @@ ayugram-desktop.url = "github:/ayugram-port/ayugram-desktop/release?submodules=1"; ags.url = "github:Aylur/ags/3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6"; + zapret-discord-youtube.url = "github:kartavkun/zapret-discord-youtube"; + nixpkgs-pinned.url = "github:nixos/nixpkgs/2d293cbfa5a793b4c50d17c05ef9e385b90edf6c"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11"; @@ -60,6 +62,7 @@ }; modules = [ ./host/${hostname}/configuration.nix + inputs.zapret-discord-youtube.nixosModules.default { nixpkgs.config = config; } ]; }; diff --git a/modules/host.nix b/modules/host.nix index 49859dc..8ece7d7 100644 --- a/modules/host.nix +++ b/modules/host.nix @@ -6,6 +6,7 @@ ./host/sound.nix ./host/vpn.nix ./host/postgresql.nix + ./host/zapret-config.nix ]; programs.hyprland.enable = true; diff --git a/modules/host/zapret-config.nix b/modules/host/zapret-config.nix new file mode 100644 index 0000000..1e36b7a --- /dev/null +++ b/modules/host/zapret-config.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: + +{ + services.zapret-discord-youtube = { + enable = true; + config = "general(ALT)"; # или любой другой + + gameFilter = "null"; # "all", "tcp", "udp" или "null" + + listGeneral = [ "example.com" "test.org" "mysite.net" ]; + listExclude = [ "ubisoft.com" "origin.com" ]; + + ipsetAll = [ "192.168.1.0/24" "10.0.0.1" ]; + ipsetExclude = [ "203.0.113.0/24" ]; + }; +}