Compare commits

..

No commits in common. "f68d7a7e3a9001d13e27d2a9ca1beb51662f4305" and "bb7c9204f5070d47334da89adf611e5fda8a3f41" have entirely different histories.

10 changed files with 181 additions and 336 deletions

1
.gitignore vendored
View File

@ -2,4 +2,3 @@ templates/*/result*
templates/*/flake.lock
/result*
/repl*
/temp

View File

@ -8,11 +8,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1725841979,
"narHash": "sha256-SXYqzpHPuXFR6w/cUKo3VN8XRn6XA2mGbdRXs9oLk6k=",
"lastModified": 1721306136,
"narHash": "sha256-VKPsIGf3/a+RONBipx4lEE4LXG2sdMNkWQu22LNQItg=",
"owner": "Aylur",
"repo": "ags",
"rev": "aaef50bb2c80ef4b4a359329d72669a95e7c4796",
"rev": "344ea72cd3b8d4911f362fec34bce7d8fb37028c",
"type": "github"
},
"original": {
@ -39,11 +39,11 @@
},
"catppuccin": {
"locked": {
"lastModified": 1725509983,
"narHash": "sha256-NHCgHVqumPraFJnLrkanoLDuhOoUHUvRhvp/RIHJR+A=",
"lastModified": 1720472194,
"narHash": "sha256-CYscFEts6tyvosc1T29nxhzIYJAj/1CCEkV3ZMzSN/c=",
"owner": "catppuccin",
"repo": "nix",
"rev": "45745fe5960acaefef2b60f3455bcac6a0ca6bc9",
"rev": "d75d5803852fb0833767dc969a4581ac13204e22",
"type": "github"
},
"original": {
@ -53,12 +53,17 @@
}
},
"crane": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1725409566,
"narHash": "sha256-PrtLmqhM6UtJP7v7IGyzjBFhbG4eOAHT6LPYOFmYfbk=",
"lastModified": 1721322122,
"narHash": "sha256-a0G1NvyXGzdwgu6e1HQpmK5R5yLsfxeBe07nNDyYd+g=",
"owner": "ipetkov",
"repo": "crane",
"rev": "7e4586bad4e3f8f97a9271def747cf58c4b68f3c",
"rev": "8a68b987c476a33e90f203f0927614a75c3f47ea",
"type": "github"
},
"original": {
@ -75,11 +80,11 @@
"rust-analyzer-src": []
},
"locked": {
"lastModified": 1726813972,
"narHash": "sha256-t6turZgoSAVgj7hn5mxzNlLOeVeZvymFo8+ymB52q34=",
"lastModified": 1721629802,
"narHash": "sha256-GKlvM9M0mkKJrL6N1eMG4DrROO25Ds1apFw3/b8594w=",
"owner": "nix-community",
"repo": "fenix",
"rev": "251caeafc75b710282ee7e375800f75f4c8c5727",
"rev": "1270fb024c6987dd825a20cd27319384a8d8569e",
"type": "github"
},
"original": {
@ -112,11 +117,11 @@
]
},
"locked": {
"lastModified": 1726153070,
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=",
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github"
},
"original": {
@ -143,24 +148,6 @@
"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": {
@ -202,11 +189,11 @@
]
},
"locked": {
"lastModified": 1726825546,
"narHash": "sha256-HiBzfzgqojA9OjPB+vdi2o+gy4Zw/MEipuGopgGsZEw=",
"lastModified": 1721534365,
"narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0b052dd8119005c6ba819db48bcc657e48f401b7",
"rev": "635563f245309ef5320f80c7ebcb89b2398d2949",
"type": "github"
},
"original": {
@ -242,11 +229,11 @@
"nixpkgs-24_05": "nixpkgs-24_05"
},
"locked": {
"lastModified": 1722877200,
"narHash": "sha256-qgKDNJXs+od+1UbRy62uk7dYal3h98I4WojfIqMoGcg=",
"lastModified": 1721121314,
"narHash": "sha256-zwc7YXga/1ppaZMWFreZykXtFwBgXodxUZiUx969r+g=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "af7d3bf5daeba3fc28089b015c0dd43f06b176f2",
"rev": "059b50b2e729729ea00c6831124d3837c494f3d5",
"type": "gitlab"
},
"original": {
@ -257,11 +244,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1726755586,
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=",
"lastModified": 1721379653,
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e",
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
"type": "github"
},
"original": {
@ -288,11 +275,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1725762081,
"narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=",
"lastModified": 1721524707,
"narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05",
"rev": "556533a23879fc7e5f98dd2e0b31a6911a213171",
"type": "github"
},
"original": {
@ -329,15 +316,14 @@
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": []
},
"locked": {
"lastModified": 1726846628,
"narHash": "sha256-0CH44sEwiljiN2q7eIFCvabyUm1WeEiF8ofP/z5ca0Q=",
"lastModified": 1721772245,
"narHash": "sha256-//9p3Qm8gLbPUTsSGN2EMYkDwE5Sqq9B9P2X/z2+npw=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "3211ce356be612ae89a38c60799992bde8a47127",
"rev": "ab67ee7e8b33e788fc53d26dc6f423f9358e3e66",
"type": "github"
},
"original": {
@ -346,28 +332,6 @@
"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"
@ -396,11 +360,11 @@
]
},
"locked": {
"lastModified": 1726851829,
"narHash": "sha256-8jqyae77Erc82WZgE1rYkds+rjNCKc0rvuMgeQvehGk=",
"lastModified": 1714759244,
"narHash": "sha256-ZDH7WTsILPEIZuo3/C4QwOXTv7r1xoUxKOQSDFpdNEE=",
"owner": "L-Nafaryus",
"repo": "oscuro",
"rev": "d2c22bcb407df746fbbf5279dcccd57e6409427e",
"rev": "68da7759c61b6d34f54087e3e845d8cc70702310",
"type": "github"
},
"original": {
@ -433,11 +397,11 @@
]
},
"locked": {
"lastModified": 1726280639,
"narHash": "sha256-YfLRPlFZWrT2oRLNAoqf7G3+NnUTDdlIJk6tmBU7kXM=",
"lastModified": 1721441897,
"narHash": "sha256-gYGX9/22tPNeF7dR6bWN5rsrpU4d06GnQNNgZ6ZiXz0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "e9f8641c92f26fd1e076e705edb12147c384171d",
"rev": "b7996075da11a2d441cfbf4e77c2939ce51506fd",
"type": "github"
},
"original": {
@ -454,11 +418,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1726524647,
"narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=",
"lastModified": 1721531171,
"narHash": "sha256-AsvPw7T0tBLb53xZGcUC3YPqlIpdxoSx56u8vPCr6gU=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "e2d404a7ea599a013189aa42947f66cede0645c8",
"rev": "909e8cfb60d83321d85c8d17209d733658a21c95",
"type": "github"
},
"original": {
@ -497,24 +461,9 @@
"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_2",
"flake-utils": "flake-utils",
"freetype2": "freetype2",
"harfbuzz": "harfbuzz",
"libpng": "libpng",
@ -526,11 +475,11 @@
},
"locked": {
"dir": "nix",
"lastModified": 1726842683,
"narHash": "sha256-n0k/znwnDGF3CNB2GhX9NfGg02mhxOzRTMmWr2EUxFs=",
"lastModified": 1722353247,
"narHash": "sha256-pPH+IJ8pljR+PmeOdckoHvbQVfSBdStKbgXcaqdkTRk=",
"owner": "wez",
"repo": "wezterm",
"rev": "abfc0b4c3aa2d6f99c76b20c4d7bdb6d0603ac80",
"rev": "56a27e93a9ee50aab50ff4d78308f9b3154b5122",
"type": "github"
},
"original": {

View File

@ -28,6 +28,7 @@
};
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
fenix = {
url = "github:nix-community/fenix";

View File

@ -169,46 +169,42 @@
# Status line
plugins.bufferline = {
enable = true;
settings.options = {
diagnostics = "nvim_lsp";
mode = "buffers";
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;
settings = {
options = {
globalstatus = true;
extensions = ["neo-tree"];
};
sections = {
lualine_a = [
"mode"
{
separator.right = "";
}
];
lualine_b = [
"branch"
{
icon = "";
separator.right = "";
}
];
lualine_c = [
"diagnostics"
{
separator.right = ">";
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 = {
sources = ["nvim_lsp"];
symbols = {
error = " ";
@ -216,47 +212,77 @@
info = " ";
hint = "󰝶 ";
};
}
"filetype"
{
};
}
{
name = "filetype";
extraConfig = {
icon_only = true;
separator = "";
padding = {
left = 1;
right = 0;
};
}
"filename"
{
};
}
{
name = "filename";
extraConfig = {
path = 1;
}
];
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")
};
}
];
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
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
'';
}
];
};
};
@ -265,7 +291,7 @@
plugins.project-nvim = {
enable = true;
enableTelescope = true;
settings.show_hidden = true;
showHidden = true;
};
# Syntax highlight
@ -289,30 +315,13 @@
plugins.which-key = {
enable = true;
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";
}
];
icons.group = "+";
registrations = {
"<leader>g" = "+ Git";
"<leader>c" = "+ Code";
"<leader>s" = "+ Search";
"<leader>w" = "+ Window";
"<leader>q" = "+ Quit";
};
};

View File

@ -170,7 +170,6 @@
nvidia.nvidiaSettings = true;
nvidia.modesetting.enable = true;
nvidia.open = false;
graphics.enable = true;
graphics.enable32Bit = true;

View File

@ -38,7 +38,7 @@
git
#nnn
pass
taskwarrior3
taskwarrior
#tmux
gparted
@ -269,9 +269,6 @@
ncmpcpp.enable = true;
# Graphical
hyprlock = {
enable = true;
};
wezterm = {
enable = true;
@ -290,7 +287,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
}
'';
@ -410,7 +407,6 @@
"XCURSOR_SIZE,16"
"HYPRCURSOR_SIZE,16"
"WLR_DRM_NO_ATOMIC,1"
"HYPRSHOT_DIR,${hmConfig.xdg.userDirs.pictures}/screenshots"
];
general = {
@ -560,8 +556,7 @@
"SUPER SHIFT, S, movetoworkspace, special:magic"
"SUPER, SPACE, exec, hyprctl switchxkblayout keychron-keychron-k3-pro next"
", PRINT, exec, hyprshot --freeze --mode region"
"CTRL, PRINT, exec, hyprshot --freeze --mode output"
", PRINT, exec, hyprshot -m region"
"SUPER, H, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy"
];
# Move/resize windows with mainMod + LMB/RMB and dragging
@ -637,7 +632,7 @@
};
# Services
services.spoofdpi.enable = true;
services.spoofdpi.enable = false;
services.zapret = {
enable = true;
@ -653,10 +648,6 @@
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

View File

@ -9,12 +9,9 @@ with lib; let
cfg = config.services.zapret;
createFilterList = name: str: (
if str == null
then ""
else
(lib.concatStringsSep "\n"
(map (ip: "add ${name} ${ip}")
(lib.splitString "\n" (lib.removeSuffix "\n" str))))
lib.concatStringsSep "\n"
(map (ip: "add ${name} ${ip}")
(lib.splitString "\n" (lib.removeSuffix "\n" str)))
);
in {
options.services.zapret = {
@ -84,23 +81,6 @@ 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
};
@ -177,9 +157,13 @@ in {
};
preStart = let
# 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);
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
'');
in ''
ipset create zapret hash:net family inet hashsize 262144 maxelem 522288 -!
ipset flush zapret

View File

@ -9,10 +9,6 @@
}: let
platformInputs = system: rec {
pkgs = inputs.nixpkgs.legacyPackages.${system};
#pkgs = import inputs.nixpkgs {
# inherit system;
# config.allowUnfree = true;
#};
lib = pkgs.lib;
inherit bonLib;

View File

@ -1,108 +1,16 @@
{
bonLib,
craneLib,
lib,
pkgs,
version ? "2d0c5cddc91a9c59aef9a7667d90924e7cedd0ac",
hash ? "sha256-ZsDJQSUokodwFMP4FIZm2dYojf5iC4F/EeKC5VuQlqY=",
weztermPkgs,
...
}: let
src = pkgs.fetchFromGitHub {
owner = "wez";
repo = "wezterm";
rev = version;
hash = hash;
fetchSubmodules = true;
};
terminfo =
pkgs.runCommand "wezterm-terminfo"
{
nativeBuildInputs = [pkgs.ncurses];
} ''
mkdir -p $out/share/terminfo $out/nix-support
tic -x -o $out/share/terminfo ${src}/termwiz/data/wezterm.terminfo
'';
pkg = {
pname = "wezterm";
inherit version;
}:
weztermPkgs.default.overrideAttrs (old: {
pname = "wezterm";
inherit src;
strictDeps = true;
doCheck = false;
nativeBuildInputs = with pkgs; [
installShellFiles
ncurses # tic for terminfo
pkg-config
python3
];
buildInputs = with pkgs; [
fontconfig
pkgs.zlib
libxkbcommon
openssl
wayland
cairo
xorg.libX11
xorg.libxcb
xorg.xcbutil
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.xcbutilwm # contains xcb-ewmh among others
];
libPath = lib.makeLibraryPath (with pkgs; [
xorg.xcbutilimage
libGL
vulkan-loader
]);
postPatch = ''
echo ${version} > .tag
# tests are failing with: Unable to exchange encryption keys
# rm -r wezterm-ssh/tests
'';
preFixup = lib.optionalString pkgs.stdenv.isLinux ''
patchelf \
--add-needed "${pkgs.libGL}/lib/libEGL.so.1" \
--add-needed "${pkgs.vulkan-loader}/lib/libvulkan.so.1" \
$out/bin/wezterm-gui
'';
postInstall = ''
mkdir -p $out/nix-support
echo "${terminfo}" >> $out/nix-support/propagated-user-env-packages
install -Dm644 assets/icon/terminal.png $out/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
install -Dm644 assets/wezterm.desktop $out/share/applications/org.wezfurlong.wezterm.desktop
install -Dm644 assets/wezterm.appdata.xml $out/share/metainfo/org.wezfurlong.wezterm.appdata.xml
install -Dm644 assets/shell-integration/wezterm.sh -t $out/etc/profile.d
installShellCompletion --cmd wezterm \
--bash assets/shell-completion/bash \
--fish assets/shell-completion/fish \
--zsh assets/shell-completion/zsh
install -Dm644 assets/wezterm-nautilus.py -t $out/share/nautilus-python/extensions
'';
meta = with lib; {
meta =
old.meta
// {
homepage = "https://github.com/wez/wezterm";
description = "A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust";
license = lib.licenses.mit;
maintainers = with bonLib.maintainers; [L-Nafaryus];
platforms = platforms.x86_64;
mainProgram = "wezterm";
};
};
in let
cargoArtifacts = craneLib.buildDepsOnly pkg;
in
craneLib.buildPackage (
pkg // {inherit cargoArtifacts;}
)
})

View File

@ -61,6 +61,15 @@ 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";