├── browser ├── userscripts │ ├── vk.js │ ├── NixOSWiki.user.js │ ├── no-popup.js │ ├── LigmaBallz.user.js │ ├── GeminiInline.user.js │ ├── VideoLinkDumper.user.js │ ├── pip.user.js │ └── YouTubeFix.user.js └── proxy.list ├── nix ├── modules │ ├── shell │ │ ├── default.nix │ │ └── fish.nix │ ├── vm │ │ ├── gui.nix │ │ └── default.nix │ ├── hardware │ │ ├── xbox.nix │ │ ├── fingerprint.nix │ │ ├── wifi-unlimited.nix │ │ └── logi-mx3.nix │ ├── diagnostic.nix │ ├── java.nix │ ├── printer.nix │ ├── locale.nix │ ├── gui │ │ ├── throne.nix │ │ ├── waydroid.nix │ │ ├── remote.nix │ │ ├── default.nix │ │ ├── games.nix │ │ ├── plasma.nix │ │ └── sound.nix │ ├── containers │ │ ├── default.nix │ │ ├── docker.nix │ │ └── podman.nix │ ├── android.nix │ ├── swap.nix │ ├── wireguard.nix │ ├── network.nix │ ├── security.nix │ ├── stylix.nix │ └── zapret.nix ├── packages │ ├── openwrt │ │ ├── root │ │ │ ├── .config │ │ │ │ └── tmux │ │ │ │ │ └── tmux.conf │ │ │ └── .profile │ │ ├── etc │ │ │ ├── uci-defaults │ │ │ │ ├── 91-change-root-shell │ │ │ │ ├── 70-pbr │ │ │ │ └── 99-custom │ │ │ └── hotplug.d │ │ │ │ └── iface │ │ │ │ └── 26-white-ip-miner │ │ ├── dewclaw.nix │ │ ├── xiaomi_ax3600.nix │ │ ├── default.nix │ │ └── tplink_archer-c50-v4.nix │ ├── locale-cxx.nix │ ├── minecraftia.nix │ ├── anicli-ru │ │ ├── eggella.nix │ │ ├── anicli-api.nix │ │ └── default.nix │ ├── keepassxc.nix │ ├── adbfs-rootless-libfuse-3.nix │ ├── kmod │ │ └── iwlwifi.nix │ ├── goodix-patch-521d.nix │ ├── shdotenv.nix │ ├── libspeedhack │ │ ├── default.nix │ │ └── fix_paths.patch │ ├── shikiwatch-appimage.nix │ ├── telegram-desktop-patched.nix │ ├── flclashx.nix │ ├── grdcontrol.nix │ ├── mprint.nix │ ├── README.md │ ├── shikiwatch-native.nix │ ├── virtiofsd │ │ └── default.nix │ ├── kompas3d │ │ └── fhs.nix │ ├── davinci-resolve-studio.nix │ ├── libfprint-27c6-521d.nix │ └── windows │ │ ├── scoop.nix │ │ ├── default.nix │ │ └── unattend.nix ├── .config │ ├── mpv │ │ ├── script-opts │ │ │ ├── encode_mp4.conf │ │ │ ├── encode_slice.conf │ │ │ ├── crop.conf │ │ │ └── encode_webm.conf │ │ ├── patcher.py │ │ └── mpv.conf │ ├── starship │ │ └── starship.bash │ ├── Code │ │ └── User │ │ │ └── tasks.json │ ├── nvim │ │ └── init.lua │ ├── ludusavi │ │ └── config.yaml │ └── shell │ │ ├── wifite.sh │ │ ├── android-utils.sh │ │ └── g14.sh ├── home │ ├── shell │ │ ├── default.nix │ │ ├── 404.nix │ │ └── bat.nix │ ├── gui │ │ ├── syncthing.nix │ │ ├── games │ │ │ ├── default.nix │ │ │ └── minecraft.nix │ │ ├── mpv.nix │ │ ├── office.nix │ │ ├── terminal.nix │ │ ├── bcompare.nix │ │ ├── quickshare.nix │ │ ├── autostart.nix │ │ ├── sound.nix │ │ ├── vm.nix │ │ ├── vscode.nix │ │ ├── default.nix │ │ ├── rofi.nix │ │ └── social.nix │ ├── hardware │ │ └── anime.nix │ ├── stylix.nix │ └── default.nix ├── shared │ ├── default.nix │ ├── lists │ │ ├── 01_base.nix │ │ ├── 00_essential.nix │ │ ├── 02_add.nix │ │ ├── default.nix │ │ ├── test.nix │ │ └── extra.nix │ └── nix.nix ├── repl.nix ├── hosts │ ├── remote │ │ └── configuration.nix │ ├── ROG14 │ │ ├── home.nix │ │ └── hardware-configuration.nix │ ├── ROG14-WSL │ │ └── configuration.nix │ └── default.nix ├── nixpkgs.nix └── nix-on-droid.nix ├── windows ├── terminal │ ├── starship.lua │ └── extend.ps1 ├── scoop │ ├── 20SoftHighPriority.ps1 │ ├── 11ShellHeavy.ps1 │ ├── 00Bootstrap.ps1 │ ├── 01System.ps1 │ ├── 10Shell.ps1 │ ├── 21SoftHighAssociations.ps1 │ └── PackageList.ps1 ├── winget │ └── settings.json ├── rog14.md ├── g-helper │ └── config.json ├── pwsh.ps1 └── installOnWin10LTSC.ps1 ├── versus ├── pages │ ├── vscode-pycharm.md │ ├── canvas-render.md │ ├── linux.md │ ├── opera-other.md │ └── instagram.md └── README.md ├── .vscode ├── extensions.json └── settings.json ├── android ├── devices │ ├── mitv.md │ └── oculus.md ├── termux.md ├── revanced.md ├── certs.md └── README.md ├── linux ├── hax.md ├── services │ ├── byedpi.service │ ├── streamlink@.service │ └── ytarchive@.service ├── README.md ├── cheatsheet_desktop.md ├── devices │ └── rpi-zero.md └── wsl.md ├── аrchive ├── README.md ├── ax3600.md └── fixdd.sh ├── .editorconfig └── configs ├── .config ├── starship │ └── starship.bat ├── nvim │ └── init.vim ├── shell │ └── aliases.sh └── bash │ └── config.bash ├── install.ps1 └── install.sh /browser/userscripts/vk.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nix/modules/shell/default.nix: -------------------------------------------------------------------------------- 1 | { programs.direnv.enable = true; } 2 | -------------------------------------------------------------------------------- /nix/packages/openwrt/root/.config/tmux/tmux.conf: -------------------------------------------------------------------------------- 1 | set -g mouse on 2 | -------------------------------------------------------------------------------- /nix/modules/vm/gui.nix: -------------------------------------------------------------------------------- 1 | { 2 | programs.virt-manager.enable = true; 3 | } 4 | -------------------------------------------------------------------------------- /windows/terminal/starship.lua: -------------------------------------------------------------------------------- 1 | load(io.popen('starship init cmd'):read("*a"))() 2 | -------------------------------------------------------------------------------- /nix/.config/mpv/script-opts/encode_mp4.conf: -------------------------------------------------------------------------------- 1 | codec=-an -sn -crf 10 -b:v 1000k 2 | output_format=$f_$n.mp4 3 | -------------------------------------------------------------------------------- /nix/packages/openwrt/etc/uci-defaults/91-change-root-shell: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sed -i 's|/bin/ash|/bin/bash|' /etc/passwd 3 | -------------------------------------------------------------------------------- /nix/modules/hardware/xbox.nix: -------------------------------------------------------------------------------- 1 | { 2 | # USB 3 | hardware.xpad-noone.enable = true; 4 | # BT 5 | hardware.xpadneo.enable = true; 6 | } 7 | -------------------------------------------------------------------------------- /nix/modules/diagnostic.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | programs.mtr = { 4 | enable = true; 5 | package = pkgs.mtr-gui; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /windows/scoop/20SoftHighPriority.ps1: -------------------------------------------------------------------------------- 1 | scoop install ` 2 | altsnap ` 3 | everything ` 4 | notepadplusplus ` 5 | systeminformer ` 6 | wiztree ` 7 | -------------------------------------------------------------------------------- /nix/home/shell/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | imports = [ 3 | ./minimal.nix 4 | 5 | ./404.nix 6 | { programs.ripgrep-all.enable = true; } 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /windows/scoop/11ShellHeavy.ps1: -------------------------------------------------------------------------------- 1 | scoop bucket add nerd-fonts 2 | sudo scoop install Cascadia-Code 3 | 4 | #! yazi deps 5 | scoop install ffmpeg poppler resvg imagemagick 6 | -------------------------------------------------------------------------------- /nix/packages/openwrt/etc/uci-defaults/70-pbr: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #? docs.openwrt.melmac.ca/pbr/1.1.8/#Warning:Pleasesetdhcp.lan.force1 3 | uci set dhcp.lan.force='1' 4 | uci commit 5 | -------------------------------------------------------------------------------- /nix/packages/openwrt/root/.profile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -x /usr/bin/fish ] && [ "$0" != "/usr/bin/fish" ]; then 3 | SHELL=/usr/bin/fish 4 | exec /usr/bin/fish 5 | fi 6 | -------------------------------------------------------------------------------- /nix/modules/java.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | programs.java = { 4 | enable = true; 5 | package = pkgs.graalvmPackages.graalvm-oracle; 6 | binfmt = true; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /nix/home/gui/syncthing.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | services.syncthing.enable = true; 4 | services.syncthing.tray.enable = true; 5 | services.syncthing.tray.package = pkgs.syncthingtray; 6 | } 7 | -------------------------------------------------------------------------------- /nix/modules/printer.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | services.printing = { 4 | enable = true; 5 | drivers = [ 6 | (pkgs.callPackage ../packages/mprint.nix { }) 7 | ]; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /windows/scoop/00Bootstrap.ps1: -------------------------------------------------------------------------------- 1 | scoop install aria2 2 | scoop config aria2-warning-enabled false 3 | scoop install 7zip 4 | scoop install mingit innounp dark gsudo 5 | 6 | scoop bucket add extras 7 | scoop update 8 | -------------------------------------------------------------------------------- /nix/home/shell/404.nix: -------------------------------------------------------------------------------- 1 | { 2 | programs.nix-index.enable = true; 3 | # programs.nix-index.enableBashIntegration = false; 4 | # programs.nix-index.enableZshIntegration = false; 5 | # programs.nix-index.enableFishIntegration = false; 6 | } 7 | -------------------------------------------------------------------------------- /nix/shared/default.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | let 3 | inherit (lib) 4 | mkEnableOption 5 | ; 6 | 7 | in 8 | { 9 | options.custom = { 10 | isAsus = mkEnableOption "Whether the machine is an ASUS laptop."; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /versus/pages/vscode-pycharm.md: -------------------------------------------------------------------------------- 1 | # [VsCode vs PyCharm](./README.md) 2 | 3 | - pycharm better than vscode 4 | - easier to use 5 | - imports wont break 6 | - vscode better than pycharm 7 | - terminal 8 | - git 9 | 10 | ## TODO 11 | -------------------------------------------------------------------------------- /nix/shared/lists/01_base.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | with pkgs; 4 | [ 5 | jq 6 | bat 7 | duf 8 | gdu 9 | fzf 10 | btop 11 | neovim 12 | zoxide 13 | ripgrep 14 | 15 | ncurses # tput for convinient colors in scripts 16 | ] 17 | -------------------------------------------------------------------------------- /versus/pages/canvas-render.md: -------------------------------------------------------------------------------- 1 | # [canvas rendering in browser](./README.md) 2 | 3 | ie. flutter 4 | 5 | ## Pros 6 | 7 | - pixelperfect 8 | - portable 9 | 10 | ## Cons 11 | 12 | - raster 13 | - no visit links 14 | 15 | ## Updated 2025-04-12 16 | -------------------------------------------------------------------------------- /nix/shared/lists/00_essential.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | with pkgs; 4 | [ 5 | git 6 | curl 7 | wget 8 | 9 | gawk 10 | psmisc # killall pstree 11 | gnused 12 | gnugrep 13 | openssh 14 | iproute2 15 | diffutils 16 | findutils 17 | ] 18 | -------------------------------------------------------------------------------- /nix/home/gui/games/default.nix: -------------------------------------------------------------------------------- 1 | { config, flakePath, ... }: 2 | { 3 | services.ludusavi.enable = true; 4 | services.ludusavi.settings = { }; 5 | services.ludusavi.configFile = config.lib.file.mkOutOfStoreSymlink "${flakePath}/.config/ludusavi/config.yaml"; 6 | } 7 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "sumneko.lua", 4 | "editorconfig.editorconfig", 5 | "jnoortheen.nix-ide", 6 | "christian-kohler.path-intellisense", 7 | "aaron-bond.better-comments", 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /nix/modules/locale.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | ... 5 | }: 6 | { 7 | i18n = { 8 | glibcLocales = ( 9 | pkgs.callPackage ../packages/locale-cxx.nix { 10 | locales = config.i18n.supportedLocales; 11 | } 12 | ); 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /nix/modules/gui/throne.nix: -------------------------------------------------------------------------------- 1 | { 2 | programs.throne = { 3 | #? https://github.com/throneproj/Throne/issues/625#issuecomment-3181124179 4 | #! Routing -> Routing settings -> DNS -> Direct DNS: `8.8.8.8` 5 | enable = true; 6 | tunMode.enable = true; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /nix/modules/containers/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | imports = [ 4 | ./podman.nix 5 | # ./docker.nix 6 | # (import ./docker.nix { rootless = true; }) 7 | ]; 8 | 9 | environment.systemPackages = with pkgs; [ 10 | distrobox 11 | 12 | lazydocker 13 | dive 14 | ]; 15 | } 16 | -------------------------------------------------------------------------------- /nix/repl.nix: -------------------------------------------------------------------------------- 1 | let 2 | flake = builtins.getFlake (toString ./.); 3 | nixos = flake.nixosConfigurations."ROG14"; 4 | in 5 | nixos 6 | // { 7 | inherit flake; 8 | home = builtins.head (builtins.attrValues nixos.config.home-manager.users); 9 | # home = flake.homeConfigurations."nixos".config; 10 | } 11 | -------------------------------------------------------------------------------- /nix/modules/android.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: 2 | { 3 | programs.adb.enable = true; 4 | users.users.${username}.extraGroups = [ "adbusers" ]; 5 | 6 | environment.systemPackages = with pkgs; [ 7 | android-file-transfer 8 | (callPackage ../packages/adbfs-rootless-libfuse-3.nix { }) 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /nix/modules/gui/waydroid.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | virtualisation.waydroid.enable = true; 4 | 5 | environment.systemPackages = with pkgs; [ waydroid-helper ]; 6 | 7 | systemd = { 8 | packages = with pkgs; [ waydroid-helper ]; 9 | services.waydroid-mount.wantedBy = [ "multi-user.target" ]; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /nix/home/gui/games/minecraft.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | home.packages = with pkgs; [ 4 | (prismlauncher.override { 5 | jdks = [ 6 | # jdk8 7 | # jdk17 8 | # graalvmPackages.graalvm-oracle_17 9 | # jdk21 10 | graalvmPackages.graalvm-oracle 11 | ]; 12 | }) 13 | ]; 14 | } 15 | -------------------------------------------------------------------------------- /nix/modules/containers/docker.nix: -------------------------------------------------------------------------------- 1 | { 2 | username, 3 | rootless ? false, 4 | ... 5 | }: 6 | { 7 | users.users.${username}.extraGroups = [ "docker" ]; 8 | virtualisation.docker = { 9 | enable = true; 10 | storageDriver = "btrfs"; 11 | rootless = { 12 | enable = rootless; 13 | setSocketVariable = true; 14 | }; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /nix/home/gui/mpv.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | 3 | { 4 | programs.mpv = { 5 | enable = true; 6 | package = 7 | with pkgs; 8 | (mpv.override { 9 | scripts = with mpvScripts; [ 10 | mpris 11 | uosc 12 | thumbfast 13 | ]; 14 | }); 15 | }; 16 | xdg.configFile."mpv".source = ../../.config/mpv; 17 | } 18 | -------------------------------------------------------------------------------- /nix/modules/swap.nix: -------------------------------------------------------------------------------- 1 | { 2 | zramSwap.enable = true; 3 | 4 | # swapDevices = [ 5 | # { 6 | # # device = "/zxc/hibernation"; 7 | # #? free | awk '/Mem/ {x=$2/1024; printf "%.0fM", (x<2 ? 2*x : x<8 ? 1.5*x : x) } 8 | # # TODO this is device specific value 9 | # size = 38 * 1024; # in megabytes 10 | # priority = 0; 11 | # } 12 | # ]; 13 | } 14 | -------------------------------------------------------------------------------- /nix/modules/wireguard.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: 2 | { 3 | networking.wg-quick.interfaces = { 4 | awg0 = { 5 | autostart = false; 6 | type = "amneziawg"; 7 | # TODO: secrets 8 | configFile = "/home/${username}/awg0.conf"; 9 | }; 10 | }; 11 | 12 | environment.systemPackages = with pkgs; [ 13 | wireguard-tools 14 | amneziawg-tools 15 | ]; 16 | } 17 | -------------------------------------------------------------------------------- /nix/shared/lists/02_add.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | # add (historicaly, this is packages was unavailable in ubuntu/scoop base repos or have different name) 3 | with pkgs; 4 | [ 5 | fd 6 | eza 7 | croc 8 | lsof 9 | mosh 10 | tmux 11 | zellij 12 | tree 13 | yazi 14 | starship 15 | fastfetch 16 | lazygit 17 | lazydocker 18 | 19 | zsh 20 | # fish 21 | # babelfish 22 | ] 23 | -------------------------------------------------------------------------------- /nix/shared/lists/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | # base cli packages, which is used in all hosts and easy to install 3 | with pkgs; 4 | import ./00_essential.nix { inherit pkgs; } 5 | ++ import ./01_base.nix { inherit pkgs; } 6 | ++ import ./02_add.nix { inherit pkgs; } 7 | ++ [ 8 | # nix 9 | nh 10 | nvd 11 | nix-tree 12 | nix-output-monitor 13 | 14 | tree-sitter 15 | nixfmt-rfc-style 16 | nixd 17 | nil 18 | ] 19 | -------------------------------------------------------------------------------- /nix/packages/openwrt/etc/uci-defaults/99-custom: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | uci -q batch << EOI 3 | # set system.@system[0].hostname='TODO ESSID' 4 | # commit system 5 | 6 | del wireless.@wifi-device[-1].disabled 7 | del wireless.@wifi-iface[-1].disabled 8 | # set wireless.@wifi-iface[-1].ssid='TODO ESSID' 9 | # set wireless.@wifi-iface[-1].encryption='sae-mixed' 10 | # set wireless.@wifi-iface[-1].key='TODO password' 11 | commit wireless 12 | EOI 13 | -------------------------------------------------------------------------------- /nix/home/gui/office.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | home.packages = with pkgs; [ 4 | #? fuck libreoffice, it still can't smooth scroll 5 | libreoffice-qt6-fresh 6 | # spellchecks defined at system level 7 | 8 | #? fuck onlyoffice, it is very slow and laggy (but nice and smooth) 9 | # onlyoffice-bin 10 | #! make fonts DeClArAtIvE https://wiki.nixos.org/wiki/ONLYOFFICE#Install_and_use_missing_corefonts 11 | ]; 12 | } 13 | -------------------------------------------------------------------------------- /versus/README.md: -------------------------------------------------------------------------------- 1 | # [Versus](../README.md) 2 | 3 | My opinion to different things 4 | 5 | - [VsCode vs PyCharm](./pages/vscode-pycharm.md) 6 | - [Opera vs Other](./pages/opera-other.md) 7 | - yandex vs google 8 | - english vs russian UI 9 | - gpt vs copilot 10 | 11 | ## Notes 12 | 13 | - [Instagram](./pages/instagram.md) 14 | 15 | ## TODO 16 | 17 | - nvim 18 | - grammar check 19 | - anime "tyanoch'ka" tierlist 20 | - copypaste tierlist 21 | -------------------------------------------------------------------------------- /nix/packages/locale-cxx.nix: -------------------------------------------------------------------------------- 1 | { 2 | glibcLocales, 3 | locales ? [ "en_US.UTF-8/UTF-8" ], 4 | ... 5 | }: 6 | (glibcLocales.override { 7 | allLocales = false; 8 | locales = locales; 9 | }).overrideAttrs 10 | (previousAttrs: { 11 | patchPhase = (previousAttrs.patchPhase or "") + '' 12 | substituteInPlace localedata/locales/en_GB \ 13 | --replace-fail 'd_fmt "%d//%m//%y"' 'd_fmt "%F"' 14 | ''; 15 | }) 16 | -------------------------------------------------------------------------------- /windows/terminal/extend.ps1: -------------------------------------------------------------------------------- 1 | Test-Path Alias:\nv && Remove-Item Alias:\nv -Force 2 | Function nv { editor $(fzf) } 3 | 4 | Function cu { cd ~/config/ && git pull && ./configs/install.ps1 && ./windows/pwsh.ps1 && cd - } 5 | 6 | Function pipi { uv pip install -r requirements.txt || uv pip install -r pyproject.toml } 7 | Function pyvcr { uv venv --allow-existing && .venv\Scripts\activate && (pipi) } 8 | Function pyv { .venv/Scripts/activate || (pyvcr) } 9 | -------------------------------------------------------------------------------- /nix/packages/openwrt/etc/hotplug.d/iface/26-white-ip-miner: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ]; then 3 | . /lib/functions/network.sh; network_get_ipaddr ip wan 4 | _ip=$(echo $ip | grep -v -E "(^100\.6[4-9]\.|^100\.[7-9][0-9]\.|^100\.1[0-1][0-9]\.|^100\.12[0-7]\.)") 5 | [ -z "$_ip" ] && logger -t white-ip-miner "Reloading wan due grey IP - $ip" && ifup wan 6 | [ ! -z "$_ip" ] && logger -t white-ip-miner "White IP taken! - $ip" 7 | fi 8 | -------------------------------------------------------------------------------- /android/devices/mitv.md: -------------------------------------------------------------------------------- 1 | # Xiaomi TV Stick 2 | 3 | THIS IS OUTDATED LIST FROM 2021! 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | pm disable-user --user 0 com.xiaomi.android.tvsetup.partnercustomizer 13 | 14 | 15 | -------------------------------------------------------------------------------- /browser/userscripts/NixOSWiki.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name switch nixos.wiki to wiki.nixos.org 3 | // @namespace akellare.ru 4 | // @match https://nixos.wiki/* 5 | // @grant none 6 | // @version 0.1.0 7 | // @author Sweetdogs 8 | // @description Redirect nixos.wiki URLs to wiki.nixos.org 9 | // @downloadURL https://raw.githubusercontent.com/barsikus007/config/master/browser/userscripts/NixOSWiki.user.js 10 | // ==/UserScript== 11 | 12 | window.location.host = "wiki.nixos.org"; 13 | -------------------------------------------------------------------------------- /nix/.config/mpv/script-opts/encode_slice.conf: -------------------------------------------------------------------------------- 1 | # https://github.com/occivink/mpv-scripts 2 | # profile to slice the current video without reencoding it 3 | # watch out that the extract will be snapped to keyframes; this is unavoidable when copying streams 4 | # see encode_webm.conf for a detailed explanations of all the options 5 | 6 | only_active_tracks=yes 7 | preserve_filters=no 8 | append_filter= 9 | codec=-c copy 10 | output_format=$f_$n.$x 11 | output_directory= 12 | detached=yes 13 | ffmpeg_command=ffmpeg 14 | print=yes 15 | -------------------------------------------------------------------------------- /nix/packages/minecraftia.nix: -------------------------------------------------------------------------------- 1 | { minecraftia, fetchzip }: 2 | (minecraftia.overrideAttrs { 3 | version = "2.0"; 4 | 5 | src = fetchzip { 6 | url = "https://dl.dafont.com/dl/?f=minecraftia"; 7 | hash = "sha256-Nr/ujZsM4iG9DdKyY03d9aR0A+ND5H/cbUDBRnCDrMs="; 8 | extension = "zip"; 9 | stripRoot = false; 10 | }; 11 | 12 | installPhase = '' 13 | runHook preInstall 14 | 15 | install -D -m444 -t $out/share/fonts/truetype $src/Minecraftia-Regular.ttf 16 | 17 | runHook postInstall 18 | ''; 19 | }) 20 | -------------------------------------------------------------------------------- /nix/modules/network.nix: -------------------------------------------------------------------------------- 1 | { 2 | networking.networkmanager.enable = true; 3 | #? dns 4 | services.resolved.enable = true; 5 | networking.networkmanager.dns = "systemd-resolved"; 6 | # networking.nameservers = [ 7 | # "8.8.8.8" 8 | # "4.4.4.4" 9 | # ]; 10 | networking.hosts = { 11 | "130.255.77.28" = [ "ntc.party" ]; 12 | }; 13 | 14 | # networking.firewall.enable = false; 15 | networking.firewall.allowedTCPPorts = [ 16 | # TODO: home-manager-module: firewall 17 | 12345 # ? home: rquickshare 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /nix/packages/anicli-ru/eggella.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | # 4 | version ? null, 5 | hash ? null, 6 | }: 7 | 8 | pkgs.python3Packages.buildPythonApplication rec { 9 | pname = "eggella"; 10 | inherit version; 11 | pyproject = true; 12 | 13 | src = pkgs.fetchPypi { 14 | inherit 15 | pname 16 | version 17 | hash 18 | ; 19 | }; 20 | 21 | build-system = with pkgs.python3Packages; [ 22 | hatchling 23 | ]; 24 | 25 | dependencies = with pkgs.python3Packages; [ 26 | prompt-toolkit 27 | ]; 28 | } 29 | -------------------------------------------------------------------------------- /nix/modules/shell/fish.nix: -------------------------------------------------------------------------------- 1 | { 2 | # users.defaultUserShell = pkgs.fish; 3 | 4 | # programs.bash = { 5 | # interactiveShellInit = '' 6 | # if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] 7 | # then 8 | # shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" 9 | # exec ${pkgs.fish}/bin/fish $LOGIN_OPTION 10 | # fi 11 | # ''; 12 | # }; 13 | programs.fish = { 14 | enable = true; 15 | useBabelfish = true; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /nix/home/gui/terminal.nix: -------------------------------------------------------------------------------- 1 | { 2 | xdg.mimeApps.associations.added."application/x-shellscript" = [ "org.wezfurlong.wezterm.desktop" ]; 3 | xdg.terminal-exec.settings.default = "org.wezfurlong.wezterm.desktop"; 4 | programs.zsh.shellAliases = { 5 | wt = "wezterm start --cwd ./"; 6 | }; 7 | programs.wezterm = { 8 | enable = true; 9 | extraConfig = builtins.readFile ../../.config/wezterm/wezterm.lua; 10 | }; 11 | programs.neovide = { 12 | enable = true; 13 | settings = { 14 | grid = "120x30"; 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /nix/packages/keepassxc.nix: -------------------------------------------------------------------------------- 1 | { 2 | keepassxc, 3 | fetchFromGitHub, 4 | keyutils, 5 | ... 6 | }: 7 | (keepassxc.overrideAttrs (old: { 8 | version = "2.8.0-snapshot"; 9 | 10 | src = fetchFromGitHub { 11 | owner = "keepassxreboot"; 12 | rev = "967dc5937f1f69e601f7aecbc600ef9027cc5043"; 13 | sha256 = "sha256-Nfp5B8OZ3NIZIHkR/aVwdnose61gPVEEFsRjEyUm7uw="; 14 | repo = "keepassxc"; 15 | }; 16 | 17 | cmakeFlags = old.cmakeFlags ++ [ 18 | "-DWITH_XC_ALL=ON" 19 | ]; 20 | 21 | buildInputs = old.buildInputs ++ [ keyutils ]; 22 | })) 23 | -------------------------------------------------------------------------------- /linux/hax.md: -------------------------------------------------------------------------------- 1 | # [zlom](./README.md) 2 | 3 | ## scan.sh by XAKEP 4 | 5 | ```shell 6 | #!/bin/bash 7 | ports=$(nmap -p- --min-rate=500 $1 | grep ^[0-9] | cut -d '/' -f 1 | tr '\n' ',' | sed s/,$//) 8 | nmap -p$ports -A $1 9 | ``` 10 | 11 | ## [Cloudflare bypass](https://github.com/FDX100/cloud-killer) 12 | 13 | ## [exploitdb](https://gitlab.com/exploit-database/exploitdb) 14 | 15 | ```shell 16 | sudo git clone https://gitlab.com/exploit-database/exploitdb.git /opt/exploitdb 17 | sudo ln -sf /opt/exploitdb/searchsploit /usr/local/bin/searchsploit 18 | searchsploit -u 19 | ``` 20 | -------------------------------------------------------------------------------- /nix/home/gui/bcompare.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | home.packages = with pkgs; [ 4 | ((pkgs.libsForQt5.callPackage ../../packages/bcompare5.nix { }).overrideAttrs { 5 | #? sorry, I can't buy this software right now (and trial doesn't work) 6 | #? https://gist.github.com/rise-worlds/5a5917780663aada8028f96b15057a67?permalink_comment_id=5168755#gistcomment-5168755 7 | postFixup = '' 8 | sed -i "s/AlPAc7Np1/AlPAc7Npn/g" $out/lib/beyondcompare/BCompare 9 | ''; 10 | }) 11 | cifs-utils # to mount smb cause smb:// don't work 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /windows/scoop/01System.ps1: -------------------------------------------------------------------------------- 1 | sudo scoop install vcredist-aio 2 | # TODO: is needed?: dotnet-sdk 3 | # scoop install dotnet-sdk 4 | 5 | Function Test-Command ($commandName) { 6 | if (Get-Command $commandName -ErrorAction SilentlyContinue) { return $true } 7 | return $false 8 | } 9 | if (-not (Test-Command winget)) { 10 | scoop install winget 11 | } 12 | winget upgrade --accept-source-agreements 13 | 14 | if (-not (Test-Command wt)) { 15 | winget install -e --id Microsoft.WindowsTerminal 16 | } 17 | if (-not (Test-Command pwsh)) { 18 | winget install -e --id Microsoft.PowerShell -h 19 | } 20 | -------------------------------------------------------------------------------- /nix/home/hardware/anime.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | { 3 | #! https://gitlab.com/asus-linux/asusctl/-/issues/530#note_2101255275 4 | xdg.configFile."rog/rog-user.cfg".text = builtins.toJSON { 5 | name = "anime-bad-apple"; 6 | anime = [ 7 | { 8 | ImageAnimation = { 9 | file = "${config.xdg.configHome}/rog/bad-apple.gif"; 10 | scale = 1; 11 | angle = 0; 12 | translation = [ 13 | 0.0 14 | 0.0 15 | ]; 16 | time = "Infinite"; 17 | brightness = 1; 18 | }; 19 | } 20 | ]; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /nix/modules/hardware/fingerprint.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | #? dev notes https://web.archive.org/web/20240913070409/https://infinytum.co/fixing-my-fingerprint-reader-on-linux-by-writing-a-driver-for-it/ 3 | #? windows dual-boot https://www.reddit.com/r/ZephyrusG14/comments/ql2opr/comment/hj2grmo/ 4 | { 5 | services.fprintd = { 6 | enable = true; 7 | package = pkgs.fprintd.override { 8 | libfprint = pkgs.callPackage ../../packages/libfprint-27c6-521d.nix { }; 9 | }; 10 | }; 11 | #! cause it breaks SDDM wallet and password auth 12 | #? https://wiki.nixos.org/wiki/Fingerprint_scanner#Login 13 | security.pam.services.login.fprintAuth = false; 14 | } 15 | -------------------------------------------------------------------------------- /nix/home/gui/quickshare.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | home.packages = with pkgs; [ 4 | rquickshare 5 | ]; 6 | 7 | xdg.dataFile."dev.mandre.rquickshare/.settings.json".text = builtins.toJSON { 8 | startminimized = true; 9 | visibility = 0; 10 | autostart = true; 11 | realclose = false; 12 | port = 12345; # TODO: home-manager-module: firewall 13 | }; 14 | 15 | xdg.configFile."autostart/RQuickShare.desktop".text = '' 16 | [Desktop Entry] 17 | Type=Application 18 | Version=1.0 19 | Name=RQuickShare 20 | Comment=RQuickSharestartup script 21 | Exec=rquickshare 22 | StartupNotify=false 23 | Terminal=false 24 | ''; 25 | } 26 | -------------------------------------------------------------------------------- /nix/packages/anicli-ru/anicli-api.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | # 4 | version ? null, 5 | hash ? null, 6 | }: 7 | 8 | pkgs.python3Packages.buildPythonApplication rec { 9 | pname = "anicli_api"; 10 | inherit version; 11 | pyproject = true; 12 | dontCheckRuntimeDeps = true; 13 | 14 | src = pkgs.fetchPypi { 15 | inherit 16 | pname 17 | version 18 | hash 19 | ; 20 | }; 21 | 22 | build-system = with pkgs.python3Packages; [ 23 | hatchling 24 | ]; 25 | 26 | dependencies = with pkgs.python3Packages; [ 27 | attrs 28 | httpx 29 | httpx.optional-dependencies.http2 30 | httpx.optional-dependencies.socks 31 | parsel 32 | ]; 33 | } 34 | -------------------------------------------------------------------------------- /аrchive/README.md: -------------------------------------------------------------------------------- 1 | # [Archive](../README.md) 2 | 3 | `а` in folder name is cyrillic letter 4 | 5 | ## [Fedora on GA401IV](./fedora.md) 6 | 7 | ## [Linux on Rock3A](./rock3a.md) 8 | 9 | ## [OpenWrt on Xiaomi AX3600](./ax3600.md) 10 | 11 | ## Android 12 | 13 | ### DriveDroid fix on Pixel 7 Pro (better use [module](https://github.com/overzero-git/DriveDroid-fix-Magisk-module)) 14 | 15 | ```shell 16 | curl -sL https://gist.github.com/barsikus007/2e44999712cdb074a1c9a9803cad7b8f/raw/ce0bd0e58403d4cbf44a0297fa994a6e1c3fdd7e/fixdd > ~/fixdd && sudo cp fixdd /data/adb/service.d/fixdd && sudo chmod +x /data/adb/service.d/fixdd 17 | ``` 18 | 19 | #### [local script](./fixdd.sh) 20 | 21 | ```shell 22 | -------------------------------------------------------------------------------- /nix/home/shell/bat.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | 3 | { 4 | programs.bat = { 5 | enable = true; 6 | config = { 7 | theme = "Coldark-Dark"; 8 | }; 9 | extraPackages = with pkgs.bat-extras; [ 10 | batman 11 | batgrep 12 | ]; 13 | }; 14 | programs.zsh = { 15 | shellAliases = { 16 | batsh = "bat --language=sh"; 17 | cat = "bat --style=plain"; 18 | ccat = ''\command cat''; 19 | }; 20 | initContent = ''eval "$(batman --export-env)"''; 21 | }; 22 | home.sessionVariables.MANPAGER = lib.mkForce ""; 23 | programs.lesspipe.enable = true; 24 | home.sessionVariables = { 25 | PAGER = "bat"; 26 | LESS = "--mouse"; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /nix/modules/vm/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: 2 | # https://wiki.nixos.org/wiki/Virt-manager 3 | { 4 | environment.systemPackages = with pkgs; [ 5 | # TODO: is needed? https://wiki.nixos.org/wiki/Libvirt#Default_networking 6 | dnsmasq 7 | ]; 8 | 9 | virtualisation.libvirtd = { 10 | enable = true; 11 | qemu = { 12 | swtpm.enable = true; 13 | # https://wiki.archlinux.org/title/Libvirt#Virtio-FS 14 | vhostUserPackages = with pkgs; [ 15 | (callPackage ../../packages/virtiofsd/default.nix { }) 16 | ]; 17 | }; 18 | }; 19 | users.users.${username}.extraGroups = [ "libvirtd" ]; 20 | 21 | virtualisation.spiceUSBRedirection.enable = true; 22 | } 23 | -------------------------------------------------------------------------------- /windows/winget/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://aka.ms/winget-settings.schema.json", 3 | // For documentation on these settings, see: https://aka.ms/winget-settings 4 | // "source": { 5 | // "autoUpdateIntervalInMinutes": 5 6 | // }, 7 | "visual": { 8 | "progressBar": "rainbow" 9 | }, 10 | "installBehavior": { 11 | "preferences": { 12 | "scope": "user", 13 | "locale": [ 14 | "en-US" 15 | ] 16 | } 17 | }, 18 | "telemetry": { 19 | "disable": true 20 | }, 21 | "experimentalFeatures": { 22 | "resume": true, 23 | "configureSelfElevate": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /nix/modules/gui/remote.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | # rdp 4 | # networking.firewall.allowedTCPPorts = [ 3389 ]; 5 | # networking.firewall.allowedUDPPorts = [ 3389 ]; 6 | 7 | services.rustdesk-server = { 8 | enable = true; 9 | openFirewall = true; 10 | signal.relayHosts = [ "rs-sg.rustdesk.com" ]; 11 | }; 12 | services.sunshine = { 13 | enable = true; 14 | autoStart = true; 15 | capSysAdmin = true; # only needed for Wayland -- omit this when using with Xorg 16 | openFirewall = true; 17 | # TODO https://search.nixos.org/options?query=services.sunshine.applications 18 | }; 19 | 20 | environment.systemPackages = with pkgs; [ 21 | rustdesk-flutter 22 | ]; 23 | } 24 | -------------------------------------------------------------------------------- /windows/scoop/10Shell.ps1: -------------------------------------------------------------------------------- 1 | #! scoop addons 2 | scoop install scoop-search scoop-completion 3 | 4 | #! essential 5 | #? curl wget 6 | #! base 7 | scoop install jq fd bat duf gdu fzf btop neovim zoxide ripgrep 8 | #? btop-lhm VERY SLOW 9 | #! add 10 | scoop install eza tlrc yazi starship fastfetch 11 | #! pwsh/cmd specific 12 | scoop install posh-git psfzf 13 | scoop install clink clink-completions 14 | 15 | scoop install lazydocker 16 | #? psreadline 17 | #! unix tools 18 | #? cmake 19 | scoop install busybox 20 | #! shim overrides 21 | # TODO: is still needed 22 | scoop install uutils-coreutils 23 | # scoop install which 24 | scoop install grep 25 | # scoop install less 26 | # TODO: clink inject; clink autorun install 27 | -------------------------------------------------------------------------------- /linux/services/byedpi.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=byedpi proxy service 3 | 4 | [Service] 5 | User=user 6 | Group=user 7 | # https://github.com/yt-dlp/yt-dlp/issues/10443#issuecomment-2248940967 8 | ExecStart=%s -c '/home/user/.local/bin/ciadpi-$(uname -p) -i 127.0.0.1 -p 10801 -d 1' 9 | 10 | [Install] 11 | WantedBy=default.target 12 | 13 | # curl -sL https://github.com/hufrea/byedpi/releases/download/v0.13.1/byedpi-13.1-$(uname -p).tar.gz | tar xz -C ~/.local/bin/ 14 | # mkdir -p /usr/local/lib/systemd/system 15 | # sudoedit /usr/local/lib/systemd/system/byedpi.service 16 | # sudo sed -i "s/user/$USER/g" /usr/local/lib/systemd/system/byedpi.service 17 | # sudo systemctl enable --now byedpi 18 | # systemctl status byedpi 19 | -------------------------------------------------------------------------------- /nix/hosts/remote/configuration.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | # This value determines the NixOS release from which the default 4 | # settings for stateful data, like file locations and database versions 5 | # on your system were taken. It's perfectly fine and recommended to leave 6 | # this value at the release version of the first install of this system. 7 | # Before changing this value read the documentation for this option 8 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 9 | system.stateVersion = "25.05"; # Did you read the comment? 10 | networking.hostName = "remote"; # Define your hostname 11 | 12 | environment.systemPackages = (import ../../shared/lists { inherit pkgs; }); 13 | } 14 | -------------------------------------------------------------------------------- /nix/.config/mpv/patcher.py: -------------------------------------------------------------------------------- 1 | input_bindings = """""" # paste here from https://github.com/mpv-player/mpv/blob/master/etc/input.conf 2 | 3 | eng = """~QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>?`qwertyuiop[]asdfghjkl;"zxcvbnm,./""" 4 | rus = """ЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,ёйцукенгшщзхъфывапролджэячсмитьбю.""" 5 | for line in input_bindings.splitlines(): 6 | if not line.startswith("#"): 7 | continue 8 | keybind, *rest = line.split(" ", 1) 9 | if keybind == "#": 10 | continue 11 | keybind = keybind[1:] 12 | keys = keybind.split("+") 13 | new_keys = [key.translate(key.maketrans(eng, rus)) if len(key) == 1 else key for key in keys] 14 | if new_keys == keys: 15 | continue 16 | print("+".join(new_keys), next(iter(rest), "")) 17 | -------------------------------------------------------------------------------- /nix/.config/starship/starship.bash: -------------------------------------------------------------------------------- 1 | URL=$(git ls-remote --get-url) 2 | if [[ "$URL" =~ "github" ]]; then 3 | ICON=" " 4 | elif [[ "$URL" =~ "gitlab" ]]; then 5 | ICON=" " 6 | elif [[ "$URL" =~ "bitbucket" ]];then 7 | ICON=" " 8 | elif [[ "$URL" =~ "kernel" ]];then 9 | ICON=" " 10 | elif [[ "$URL" =~ "archlinux" ]];then 11 | ICON=" " 12 | elif [[ "$URL" =~ "gnu" ]];then 13 | ICON=" " 14 | elif [[ "$URL" =~ "git" ]];then 15 | ICON=" " 16 | else 17 | ICON=" " 18 | URL="localhost" 19 | fi 20 | for PATTERN in "https" "http" "git" "://" "@"; do 21 | [[ "$URL" == "$PATTERN"* ]] && URL="${URL##"$PATTERN"}" 22 | done 23 | for PATTERN in "/" ".git"; do 24 | [[ "$URL" == *"$PATTERN" ]] && URL="${URL%%"$PATTERN"}" 25 | done 26 | printf "%s%s" "$ICON" "$URL" 27 | -------------------------------------------------------------------------------- /nix/modules/security.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | programs.ssh.startAgent = true; 4 | 5 | security.polkit.debug = true; 6 | security.polkit.extraConfig = '' 7 | /* Allow members of the wheel group to execute the defined actions 8 | * without password authentication, similar to "sudo NOPASSWD:" 9 | */ 10 | polkit.addRule(function(action, subject) { 11 | if (( 12 | action.id == "org.freedesktop.udisks2.filesystem-mount-system" || 13 | action.id == "org.freedesktop.udisks2.encrypted-unlock-system" 14 | ) && subject.isInGroup("wheel")) 15 | { 16 | return polkit.Result.YES; 17 | } 18 | }); 19 | ''; 20 | 21 | environment.systemPackages = with pkgs; [ 22 | (callPackage ../packages/keepassxc.nix { }) 23 | ]; 24 | } 25 | -------------------------------------------------------------------------------- /browser/proxy.list: -------------------------------------------------------------------------------- 1 | ; https://github.com/FelisCatus/SwitchyOmega/wiki/SwitchyOmega-conditions-format#result-profile 2 | [SwitchyOmega Conditions] 3 | @with result 4 | 5 | ; captcha 6 | *.google.com +proxy 7 | 8 | ; torrents/piracy 9 | *.rutracker.org +proxy 10 | *.rutracker.cc +proxy 11 | *.nnmstatic.win +proxy 12 | *.nnmclub.to +proxy 13 | *.flibusta.is +proxy 14 | 15 | ; anime 16 | *.anilibria.top +proxy 17 | 18 | ; idk 19 | *.medium.com +proxy 20 | *.matrix.org +proxy 21 | *.kernel.org +proxy 22 | *.grok.com +proxy 23 | *.doubleclick.net +proxy 24 | *.primepayments.io +proxy 25 | *.gosuslugi.ru +direct 26 | 27 | ; rkn 28 | *.youtu.be +proxy 29 | *.youtube.com +proxy 30 | *.ytimg.com +proxy 31 | *.ggpht.com +proxy 32 | *.googlevideo.com +proxy 33 | *.instagram.com +proxy 34 | *.cdninstagram.com +proxy 35 | 36 | * +direct 37 | -------------------------------------------------------------------------------- /nix/packages/openwrt/dewclaw.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | #? https://makisekurisu.github.io/dewclaw/ 3 | # https://github.com/MakiseKurisu/dewclaw/blob/main/example/classic/example.nix 4 | # https://github.com/MakiseKurisu/nixos-config/blob/dfae9aa4c364eab97565fd5859d10483a126385e/pkgs/dewclaw/router/default.nix 5 | # https://github.com/shuuri-labs/shuurinet-nix/blob/356c7515d3c4c0ef67cbc4f8cdeb14b37fb76af8/flakeHelper.nix#L99 6 | #? https://skogsbrus.xyz/building-a-router-with-nixos/ 7 | { 8 | openwrt = { 9 | "xiaomi_ax3600" = { 10 | deploy.host = "router"; 11 | #? I don't want dewclaw managing packages at all? 12 | deploySteps.packages = { 13 | copy = lib.mkForce ""; 14 | apply = lib.mkForce ""; 15 | }; 16 | uci.retain = [ "pbr" ]; 17 | uci.settings = { 18 | }; 19 | }; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /linux/services/streamlink@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Twitch stream auto recorder for @%i channel 3 | Requires=zfs-mount.service 4 | After=zfs-mount.service 5 | 6 | [Service] 7 | User=user 8 | Group=user 9 | Restart=always 10 | RestartSec=3 11 | ExecStart=/home/user/.local/bin/streamlink -o '/home/user/streams/%i/{time}-{title} [v{id}].mp4' --retry-streams 60 --twitch-disable-ads --twitch-disable-hosting https://www.twitch.tv/%i 720p60,720p,best 12 | 13 | [Install] 14 | WantedBy=default.target 15 | 16 | # uv tool install streamlink 17 | # mkdir -p /usr/local/lib/systemd/system 18 | # sudoedit /usr/local/lib/systemd/system/streamlink@.service 19 | # sudo sed -i "s/user/$USER/g" /usr/local/lib/systemd/system/streamlink@.service 20 | # sudo systemctl enable --now streamlink@{channel1,channel2} 21 | # systemctl status streamlink@{channel1,channel2} 22 | -------------------------------------------------------------------------------- /nix/shared/nix.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | inputs, 5 | ... 6 | }: 7 | { 8 | nix.package = pkgs.nix; 9 | nix.channel.enable = false; 10 | nix.registry = { 11 | nixpkgs.flake = inputs.nixpkgs; 12 | }; 13 | nix.settings = { 14 | use-xdg-base-directories = true; 15 | experimental-features = [ 16 | "nix-command" 17 | "flakes" 18 | "pipe-operators" 19 | ]; 20 | substituters = lib.mkForce [ 21 | "https://cache.nixos.org" 22 | # "https://nixos-cache-proxy.cofob.dev" # ? cloudflare mirror, uses original keys 23 | 24 | "https://nix-community.cachix.org" 25 | ]; 26 | trusted-public-keys = [ 27 | "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 28 | 29 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 30 | ]; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /nix/shared/lists/test.nix: -------------------------------------------------------------------------------- 1 | # packages I want to test before adding 2 | { pkgs, ... }: 3 | 4 | with pkgs; 5 | [ 6 | # new base 7 | ##dive 8 | serpl 9 | lshw-gui 10 | 11 | # new add security scanners 12 | nikto 13 | # ffuf 14 | # seclists 15 | # frida-tools 16 | # wifite2 17 | # airgeddon 18 | # openvas-scanner 19 | # burpsuite 20 | # caido 21 | wireshark 22 | 23 | # networking tools 24 | zmap 25 | iperf 26 | rustscan # nmap 27 | bind 28 | ldns # have drill like dig 29 | 30 | # new other 31 | shfmt 32 | iotop 33 | fatrace # sudo fatrace . 2>&1 | grep firefox 34 | systemctl-tui 35 | 36 | bruno 37 | devenv 38 | devbox 39 | blender 40 | # (blender-hip.override { 41 | # # blender-hip for rocm amd gpu 42 | # cudaSupport = true; 43 | # }) 44 | 45 | # new GUI automation 46 | autokey 47 | # ahk_x11 48 | ] 49 | -------------------------------------------------------------------------------- /linux/services/ytarchive@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=YouTube stream auto recorder for @%i channel 3 | # Requires=zfs-mount.service 4 | Requires=zfs-mount.service byedpi.service 5 | After=zfs-mount.service 6 | 7 | [Service] 8 | User=user 9 | Group=user 10 | ExecStart=/home/user/go/bin/ytarchive \ 11 | --proxy socks5://127.0.0.1:10801 \ 12 | -t -o '/home/user/streams/%i/%(title)s [%(id)s]' -r 900 --add-metadata --monitor-channel https://www.youtube.com/@%i/live best 13 | 14 | [Install] 15 | WantedBy=default.target 16 | 17 | # go install github.com/Kethsar/ytarchive@dev 18 | # mkdir -p /usr/local/lib/systemd/system 19 | # sudoedit /usr/local/lib/systemd/system/ytarchive@.service 20 | # sudo sed -i "s/user/$USER/g" /usr/local/lib/systemd/system/ytarchive@.service 21 | # sudo systemctl enable --now ytarchive@{channel1,channel2} 22 | # systemctl status ytarchive@{channel1,channel2} -a 23 | -------------------------------------------------------------------------------- /nix/.config/Code/User/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "Run python file", 8 | "type": "process", 9 | // https://github.com/microsoft/vscode/issues/160891 10 | "windows": { 11 | "command": ".venv/Scripts/python.exe", 12 | }, 13 | "command": "${command:python.interpreterPath}", 14 | "args": [ 15 | "-uB", 16 | "${file}" 17 | ], 18 | "presentation": { 19 | "clear": true 20 | }, 21 | // "options": { 22 | // "env": { 23 | // "PYTHONIOENCODING": "utf8" 24 | // } 25 | // } 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /linux/README.md: -------------------------------------------------------------------------------- 1 | # [Linux](../README.md) 2 | 3 | ## [Command Cheat Sheet](./cheatsheet.md) 4 | 5 | ### [Server](./cheatsheet_server.md) 6 | 7 | ### [Desktop](./cheatsheet_desktop.md) 8 | 9 | ## [WSL Hints](./wsl.md) 10 | 11 | ## [ethical hacking](./hax.md) 12 | 13 | ## [raspberry pi zero w](./devices/rpi-zero.md) 14 | 15 | ## Archive 16 | 17 | ### Install Config 18 | 19 | > [!WARNING] 20 | > DEPRECATION WARNING!!! I USE NIX NOW 21 | 22 | #### Deps 23 | 24 | ```shell 25 | #? ubuntu 26 | sudo apt install git -y 27 | 28 | #? arch 29 | sudo pacman -S git 30 | 31 | #? all 32 | chsh -s /bin/bash 33 | ``` 34 | 35 | #### Clone 36 | 37 | ```shell 38 | cd && git clone https://github.com/barsikus007/config --depth 1 && cd - 39 | ``` 40 | 41 | #### Install/Update 42 | 43 | ```shell 44 | #? all 45 | cd ~/config/ && git pull && ./configs/install.sh && cd - 46 | 47 | setup_ubuntu 48 | 49 | setup_arch 50 | 51 | #? others 52 | setup_linux 53 | ``` 54 | -------------------------------------------------------------------------------- /nix/packages/adbfs-rootless-libfuse-3.nix: -------------------------------------------------------------------------------- 1 | { 2 | adbfs-rootless, 3 | fetchFromGitHub, 4 | fuse3, 5 | }: 6 | #? https://github.com/spion/adbfs-rootless/pull/73 7 | # (adbfs-rootless.overrideAttrs (previousAttrs: { 8 | # patches = (previousAttrs.patches or [ ]) ++ [ 9 | # (fetchpatch { 10 | # url = "github.com/spion/adbfs-rootless/pull/73.patch"; 11 | # hash = "sha256-S3KY3xy+939nkYyJerC+rKemcqocbxPV7bwjZKMkeJQ="; 12 | # }) 13 | # ]; 14 | # })) 15 | #? https://github.com/spion/adbfs-rootless/issues/56 16 | (adbfs-rootless.overrideAttrs (previousAttrs: { 17 | pname = previousAttrs.pname + "-libfuse-3"; 18 | 19 | src = fetchFromGitHub { 20 | owner = "spion"; 21 | repo = "adbfs-rootless"; 22 | # rev = "feat/merge-libfuse-3"; 23 | rev = "cf2f8ae0feeb41e4abaf59e166d1337cc87204c8"; 24 | sha256 = "sha256-FWGJyJv7c0FZ6NvepcavxWpeUT0KanU8D4B1FL7QxPI="; 25 | }; 26 | 27 | buildInputs = [ fuse3 ]; 28 | })) 29 | -------------------------------------------------------------------------------- /nix/home/gui/autostart.nix: -------------------------------------------------------------------------------- 1 | { pkgs, config, ... }: 2 | let 3 | replaceDesktopItem = 4 | package: name: newExec: 5 | (pkgs.runCommand name { } '' 6 | mkdir -p $out 7 | src=${package}/share/applications/${name} 8 | sed 's|^Exec=.*$|Exec=${newExec}|' "$src" > $out/${name} 9 | '') 10 | + /${name}; 11 | in 12 | { 13 | xdg.autostart = { 14 | enable = true; 15 | entries = [ 16 | (replaceDesktopItem pkgs.throne "throne.desktop" 17 | "${pkgs.throne}/share/throne/Throne -tray -appdata" 18 | ) 19 | # extraConfig = { 20 | # "X-KDE-autostart-after" = "panel"; 21 | # }; 22 | # outName = "Throne.desktop"; 23 | 24 | (replaceDesktopItem pkgs.ayugram-desktop "com.ayugram.desktop.desktop" "AyuGram -autostart") 25 | (replaceDesktopItem config.programs.nixcord.finalPackage.vesktop "vesktop.desktop" 26 | "vesktop --start-minimized" 27 | ) 28 | ]; 29 | }; 30 | } 31 | -------------------------------------------------------------------------------- /nix/home/stylix.nix: -------------------------------------------------------------------------------- 1 | { config, ... }: 2 | { 3 | stylix = { 4 | enable = true; 5 | # autoEnable = false; 6 | targets = { 7 | # TODO: unstable: https://github.com/nix-community/stylix/issues/869: user profile: stylix: qt: `config.stylix.targets.qt.platform` other than 'qtct' are currently unsupported: kde. Support may be added in the future. 8 | # TODO: unstable: https://github.com/NixOS/nixpkgs/issues/359129 9 | # qt.platform = "qtct"; 10 | 11 | mpv.enable = false; 12 | vscode.enable = false; 13 | nixcord.enable = false; 14 | 15 | #? due to font troubles 16 | firefox.enable = false; 17 | # firefox.profileNames = [ "default" ]; 18 | 19 | #? shell 20 | bat.enable = false; 21 | fzf.enable = false; 22 | }; 23 | }; 24 | 25 | programs.neovide.settings.font = { 26 | normal = [ config.stylix.fonts.monospace.name ]; 27 | size = config.stylix.fonts.sizes.terminal; 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /versus/pages/linux.md: -------------------------------------------------------------------------------- 1 | # [Linux distros](./README.md) 2 | 3 | ## Ubuntu 4 | 5 | - Pros 6 | - signed in secureboot 7 | - available on every hosting 8 | - relatively stable 9 | - Cons 10 | - old packages 11 | 12 | ## Fedora 13 | 14 | - Pros 15 | - signed in secureboot 16 | - stable 17 | - good packages 18 | 19 | ## Arch 20 | 21 | - Pros 22 | - best packages 23 | - best wiki 24 | - i use arch btw 25 | - Cons 26 | - unstable 27 | - hard to make easy things (plymouth) 28 | - hard to learn 29 | 30 | ## NixOS 31 | 32 | - Pros 33 | - declarative 34 | - most stable (reproducible) 35 | - best packages 36 | - best way to configure 37 | - VERY agile 38 | - best experience with 39 | - ZFS 40 | - AWG 41 | - hibernation 42 | - grub/systemd-boot/etc 43 | - Cons 44 | - hardest to learn ? 45 | - takes a lot space 46 | - non FHS 47 | - fast developing is slower 48 | - at least now for me 49 | 50 | ## Updated 2025-04-13 51 | -------------------------------------------------------------------------------- /nix/packages/anicli-ru/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: 2 | 3 | # watch anime in terminal (cli) 4 | # only russian sources 5 | 6 | pkgs.python3Packages.buildPythonApplication rec { 7 | pname = "anicli_ru"; 8 | version = "5.0.16"; 9 | pyproject = true; 10 | 11 | src = pkgs.fetchPypi { 12 | inherit 13 | pname 14 | version 15 | ; 16 | hash = "sha256-gM9on15RQIpQVJfWW/uPeN63vSSbCJt2mNN5zkvc5Jg="; 17 | }; 18 | 19 | build-system = with pkgs.python3Packages; [ 20 | hatchling 21 | ]; 22 | 23 | dependencies = with pkgs; [ 24 | (callPackage ./anicli-api.nix { 25 | version = "0.7.17"; 26 | hash = "sha256-nrv3JQaYSjZTCDbwBc/7/oYurJcJKFyVlzTfO9xz1qg="; 27 | }) 28 | (callPackage ./eggella.nix { 29 | version = "0.1.7"; 30 | hash = "sha256-8Vo39BePA86wcLKs/F+u2N7tpIpPrEyEPp3POszy050="; 31 | }) 32 | python3Packages.tqdm 33 | ]; 34 | 35 | meta = { 36 | homepage = "https://github.com/vypivshiy/ani-cli-ru"; 37 | mainProgram = "anicli-ru"; 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /nix/modules/containers/podman.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: 2 | { 3 | users.users.${username}.extraGroups = [ "podman" ]; 4 | virtualisation = { 5 | containers = { 6 | enable = true; 7 | registries.search = [ 8 | "docker.io" 9 | # "quay.io" 10 | # "ghcr.io" 11 | # "mcr.microsoft.com" 12 | ]; 13 | }; 14 | podman = { 15 | #? https://github.com/containers/podman/blob/main/rootless.md 16 | enable = true; 17 | # Create a `docker` alias for podman, to use it as a drop-in replacement 18 | dockerCompat = true; 19 | dockerSocket.enable = true; 20 | # Required for containers under podman-compose to be able to talk to each other. 21 | defaultNetwork.settings.dns_enabled = true; 22 | }; 23 | }; 24 | environment.systemPackages = with pkgs; [ 25 | podman-tui 26 | podman-compose 27 | podman-desktop 28 | ]; 29 | environment.sessionVariables = { 30 | DOCKER_HOST = "unix:///run/user/1000/podman/podman.sock"; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /nix/packages/kmod/iwlwifi.nix: -------------------------------------------------------------------------------- 1 | { 2 | stdenv, 3 | kernel, 4 | }: 5 | stdenv.mkDerivation { 6 | pname = "intel-iwlwifi"; 7 | inherit (kernel) 8 | src 9 | version 10 | postPatch 11 | nativeBuildInputs 12 | ; 13 | 14 | kernel_dev = kernel.dev; 15 | kernelVersion = kernel.modDirVersion; 16 | 17 | modulePath = "drivers/net/wireless/intel/iwlwifi"; 18 | 19 | buildPhase = '' 20 | BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build 21 | 22 | cp $BUILT_KERNEL/Module.symvers . 23 | cp $BUILT_KERNEL/.config . 24 | cp $kernel_dev/vmlinux . 25 | 26 | make "-j$NIX_BUILD_CORES" modules_prepare 27 | make "-j$NIX_BUILD_CORES" M=$modulePath modules 28 | ''; 29 | 30 | installPhase = '' 31 | make \ 32 | INSTALL_MOD_PATH="$out" \ 33 | XZ="xz -T$NIX_BUILD_CORES" \ 34 | M="$modulePath" \ 35 | modules_install 36 | ''; 37 | 38 | meta = { 39 | description = "iwlwifi kernel module"; 40 | inherit (kernel.meta) license platforms; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_style = space 7 | max_line_length = 120 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | indent_size = 2 13 | 14 | [*.nix] 15 | indent_size = 2 16 | 17 | [*.{sh,bash,zsh}] 18 | indent_size = 2 19 | 20 | [*.py] 21 | indent_size = 4 22 | 23 | [*.{json,code-workspace}] 24 | indent_size = 4 25 | 26 | [*.{cjs,js,jsx,ts,tsx}] 27 | indent_size = 2 28 | max_line_length = 80 29 | quote_type = single 30 | trailingComma = all # wont work 31 | trailing_comma = all # wont work 32 | # "arrowParens": "always", 33 | # "bracketSpacing": true, 34 | # "htmlWhitespaceSensitivity": "css", 35 | # "insertPragma": false, 36 | # "singleAttributePerLine": false, 37 | # "bracketSameLine": false, 38 | # "jsxBracketSameLine": false, 39 | # "proseWrap": "preserve", 40 | # "quoteProps": "as-needed", 41 | # "requirePragma": false, 42 | # "semi": true, 43 | # "singleQuote": false, 44 | # "trailingComma": "all", 45 | # "vueIndentScriptAndStyle": false, 46 | -------------------------------------------------------------------------------- /linux/cheatsheet_desktop.md: -------------------------------------------------------------------------------- 1 | # [cheatsheet for desktop](./README.md) 2 | 3 | ## plasma 4 | 5 | - `kioclient exec .desktop` 6 | 7 | ## waydroid 8 | 9 | - 10 | - `sudo waydroid init` 11 | - you can download OTA images located in `/var/lib/waydroid/waydroid.cfg` manually 12 | - extract them to `/var/lib/waydroid/images/` 13 | - and edit `waydroid.cfg` accordingly (set datetime variables) 14 | - 15 | - after system startup `systemctl --user start waydroid-monitor` 16 | - mount dirs 17 | - `sudo waydroid shell mkdir /data/adb/modules/` 18 | - `/run/media/admin/Data/projects/` host 19 | - `/home/admin/.local/share/waydroid/data/adb/modules/` waydroid 20 | - props 21 | - `waydroid prop set persist.waydroid.multi_windows true` 22 | - funny, uses android windowed mode 23 | - `waydroid prop set persist.waydroid.width 480` 24 | - `waydroid prop set persist.waydroid.height 800` 25 | -------------------------------------------------------------------------------- /windows/scoop/21SoftHighAssociations.ps1: -------------------------------------------------------------------------------- 1 | $SCOOP_HOME = $(If (Test-Path env:SCOOP) { $env:SCOOP } Else { ($env:GIT_INSTALL_ROOT -split "scoop")[0]+"scoop" }) 2 | 3 | [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 4 | Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/DanysysTeam/PS-SFTA/master/SFTA.ps1')) 5 | 6 | '.zip','.rar','.7z','.001','.arj','.bz2','.cab','.gz','.lzh','.tar','.xz','.z' | ForEach-Object { 7 | Register-FTA "$SCOOP_HOME\apps\7zip\current\7zFM.exe" $_ -ProgId "7-Zip$_" -Icon "$SCOOP_HOME\apps\7zip\current\7z.dll,1" 8 | } 9 | 10 | '.txt','.log','.ini','.cfg','.conf','.json','.xml','.yaml','.yml','.md','.csv','.ps1','.psm1','.bat','.cmd','.reg','.inf','.css','.js','.ts','.html','.htm','.cs','.py','.java','.cpp','.c','.h','.php','.sql' | ForEach-Object { 11 | Set-FTA Notepad++$_ $_ 12 | Register-FTA "$SCOOP_HOME\apps\notepadplusplus\current\notepad++.exe" $_ -ProgId "Notepad++$_" -Icon "$SCOOP_HOME\apps\notepadplusplus\current\notepad++.exe,0" 13 | } 14 | -------------------------------------------------------------------------------- /configs/.config/starship/starship.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | chcp 65001 > nul 3 | setlocal EnableDelayedExpansion 4 | 5 | for /f "usebackq" %%a in (`git ls-remote --get-url`) do set "URL=%%a" 6 | 7 | if "%URL:github=%" neq "%URL%" ( 8 | set "ICON= " 9 | ) else if "%URL:gitlab=%" neq "%URL%" ( 10 | set "ICON= " 11 | ) else if "%URL:bitbucket=%" neq "%URL%" ( 12 | set "ICON= " 13 | ) else if "%URL:kernel=%" neq "%URL%" ( 14 | set "ICON= " 15 | ) else if "%URL:archlinux=%" neq "%URL%" ( 16 | set "ICON= " 17 | ) else if "%URL:gnu=%" neq "%URL%" ( 18 | set "ICON= " 19 | ) else if "%URL:git=%" neq "%URL%" ( 20 | set "ICON= " 21 | ) else ( 22 | set "ICON= " 23 | set "URL=localhost" 24 | ) 25 | 26 | if "!URL:~,5!"=="https" set "URL=!URL:~5!" 27 | if "!URL:~,4!"=="http" set "URL=!URL:~4!" 28 | if "!URL:~,3!"=="git" set "URL=!URL:~3!" 29 | if "!URL:~,3!"=="://" set "URL=!URL:~3!" 30 | if "!URL:~,1!"=="@" set "URL=!URL:~1!" 31 | 32 | if "!URL:~-1!"=="/" set "URL=!URL:~,-1!" 33 | if "!URL:~-4!"==".git" set "URL=!URL:~,-4!" 34 | 35 | echo %ICON%%URL% -------------------------------------------------------------------------------- /nix/modules/gui/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, username, ... }: 2 | { 3 | environment.systemPackages = with pkgs; [ 4 | # wayland stuff 5 | #! https://github.com/YaLTeR/wl-clipboard-rs/issues/5 6 | wl-clipboard 7 | libnotify 8 | 9 | # spell check 10 | hunspell 11 | hunspellDicts.en_US-large 12 | hunspellDicts.ru_RU 13 | ]; 14 | 15 | # wayland stuff 16 | programs.ydotool.enable = true; 17 | users.users.${username}.extraGroups = [ "ydotool" ]; 18 | 19 | fonts = { 20 | # fix furryfox fonts 21 | enableDefaultPackages = true; 22 | fontconfig.useEmbeddedBitmaps = true; 23 | packages = with pkgs; [ 24 | # fix furryfox JAP pixelated fonts 25 | noto-fonts-cjk-sans 26 | 27 | # office fonts 28 | corefonts 29 | 30 | # minecraft-like fonts 31 | monocraft 32 | miracode 33 | (callPackage ../../packages/minecraftia.nix { }) 34 | ]; 35 | }; 36 | 37 | #? https://wiki.archlinux.org/title/Java#Java_applications_cannot_open_external_links 38 | # also for gio mount 39 | services.gvfs.enable = true; 40 | } 41 | -------------------------------------------------------------------------------- /nix/home/gui/sound.nix: -------------------------------------------------------------------------------- 1 | { 2 | services.easyeffects.enable = true; 3 | dconf.settings."com/github/wwmm/easyeffects" = { 4 | process-all-inputs = true; 5 | }; 6 | # https://github.com/Digitalone1/EasyEffects-Presets 7 | services.easyeffects.preset = "LoudnessEqualizer"; 8 | services.easyeffects.extraPresets = { 9 | LoudnessEqualizer = builtins.fromJSON ( 10 | builtins.readFile ( 11 | builtins.fetchurl { 12 | url = "https://raw.githubusercontent.com/Digitalone1/EasyEffects-Presets/69567deb8284a0c93975f2655b63c8246b320a31/LoudnessEqualizer.json"; 13 | sha256 = "sha256-1vVMz+X+Zxldo7ull6FL3IGdvzuDO3nNosE3nPclvKw="; 14 | } 15 | ) 16 | ); 17 | LoudnessCrystalEqualizer = builtins.fromJSON ( 18 | builtins.readFile ( 19 | builtins.fetchurl { 20 | url = "https://raw.githubusercontent.com/Digitalone1/EasyEffects-Presets/69567deb8284a0c93975f2655b63c8246b320a31/LoudnessCrystalEqualizer.json"; 21 | sha256 = "sha256-Wqq6ltbAmfqMc8tkq977LKtLzrO6R69hV+i5KrVWLWo="; 22 | } 23 | ) 24 | ); 25 | }; 26 | } 27 | -------------------------------------------------------------------------------- /nix/home/gui/vm.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | programs.looking-glass-client = { 4 | enable = true; 5 | settings = { 6 | input = { 7 | escapeKey = "KEY_RIGHTALT"; 8 | }; 9 | win = { 10 | # position = "10x10"; 11 | size = "2560x1440"; 12 | fullScreen = true; 13 | showFPS = true; 14 | }; 15 | }; 16 | package = 17 | with pkgs; 18 | looking-glass-client.overrideAttrs ( 19 | let 20 | # https://github.com/gnif/LookingGlass/commits/master/ 21 | # https://github.com/gnif/LookingGlass/compare/...gnif%3ALookingGlass%3Amaster 22 | rev = "53bfb6547f2b7abd6c183192e13a57068c1677ea"; 23 | hash = "sha256-SakFCEXPsJW3zmNpmklK8ZCGpcJzJ/4v7TJDpjWqVeA="; 24 | in 25 | { 26 | version = "B7-g${builtins.substring 0 10 rev}"; 27 | 28 | src = fetchFromGitHub { 29 | inherit rev hash; 30 | owner = "gnif"; 31 | repo = "LookingGlass"; 32 | fetchSubmodules = true; 33 | }; 34 | } 35 | ); 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /nix/hosts/ROG14/home.nix: -------------------------------------------------------------------------------- 1 | { lib, ... }: 2 | { 3 | imports = [ 4 | ../../shared 5 | 6 | ../../home 7 | ../../home/shell 8 | ../../home/editors.nix 9 | 10 | ../../home/hardware/anime.nix 11 | 12 | ../../home/stylix.nix 13 | ../../home/shell/404.nix 14 | ../../home/shell/bat.nix 15 | 16 | ../../home/gui 17 | ../../home/gui/sound.nix 18 | ../../home/gui/autostart.nix 19 | ../../home/gui/syncthing.nix 20 | ../../home/gui/quickshare.nix 21 | ../../home/gui/terminal.nix 22 | ../../home/gui/plasma.nix 23 | ../../home/gui/rofi.nix 24 | ../../home/gui/mpv.nix 25 | ../../home/gui/vscode.nix 26 | ../../home/gui/browser.nix 27 | ../../home/gui/social.nix 28 | ../../home/gui/office.nix 29 | ../../home/gui/bcompare.nix 30 | ../../home/gui/vm.nix 31 | 32 | ../../home/gui/games 33 | ../../home/gui/games/minecraft.nix 34 | { 35 | programs.nvf.settings.vim.lsp.enable = lib.mkForce true; 36 | } 37 | { 38 | home.sessionVariables = { 39 | # fuck the firefox 40 | LC_TIME = "en_GB.UTF-8"; 41 | }; 42 | } 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /nix/.config/mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | # https://github.com/mpv-player/mpv/blob/master/etc/mpv.conf 2 | 3 | 4 | # https://github.com/mpv-player/mpv/blob/master/etc/builtin.conf 5 | # profile=high-quality 6 | no-border 7 | snap-window 8 | save-position-on-quit 9 | screenshot-directory=~~desktop/ 10 | screenshot-template="mpv - %F - [%P] (%#01n)" 11 | sub-fonts-dir=fonts/ 12 | 13 | [linux] 14 | profile-cond=platform == "linux" 15 | screenshot-directory=~/Desktop 16 | 17 | [ontop-onplay] 18 | profile-cond=not pause 19 | profile-restore=copy-equal 20 | ontop 21 | 22 | [playlist] 23 | # drop-buffers 24 | profile=low-latency 25 | profile-cond=filename:match"[.]m3u" 26 | geometry=-0-0 27 | autofit=25% 28 | prefetch-playlist=yes 29 | demuxer-max-bytes=500MiB 30 | demuxer-max-back-bytes=200MiB 31 | osd-playing-msg=Playlist player mode 32 | 33 | [online] 34 | profile-cond=path:find('https?://') 35 | profile=playlist 36 | osd-playing-msg=Online player mode 37 | 38 | [music] 39 | # https://www.reddit.com/r/mpv/comments/kmcftq/comment/ghh7rw2 40 | profile-cond=filename:match"[.]mp3$" 41 | profile=online 42 | force-window=yes 43 | save-position-on-quit=no 44 | osd-playing-msg=Music player mode 45 | -------------------------------------------------------------------------------- /nix/.config/mpv/script-opts/crop.conf: -------------------------------------------------------------------------------- 1 | # https://github.com/occivink/mpv-scripts 2 | # default mode to be used if not specified in the script-message 3 | # can be hard, soft or delogo 4 | # in hard mode, a crop filter is applied to the video 5 | # in soft mode, video-zoom, video-pan-x and video-pan-y are modified to simulate the cropping 6 | # in delogo mode, the delogo filter is applied to the selected are 7 | # hard mode interacts nicely with encode.lua, soft mode does not 8 | mode=hard 9 | 10 | draw_crosshair=yes 11 | draw_text=yes 12 | draw_shade=yes 13 | draw_frame=yes 14 | frame_border_width=2 15 | frame_border_color=EEEEEE 16 | # hexadecimal: 00 is opaque, FF is transparent 17 | shade_opacity=77 18 | mouse_support=yes 19 | 20 | # movement is defined in pixels in the window 21 | # which explains the mismatch with the text (in video space) 22 | coarse_movement=30 23 | left_coarse=LEFT 24 | right_coarse=RIGHT 25 | up_coarse=UP 26 | down_coarse=DOWN 27 | fine_movement=1 28 | left_fine=ALT+LEFT 29 | right_fine=ALT+RIGHT 30 | up_fine=ALT+UP 31 | down_fine=ALT+DOWN 32 | 33 | # these two options accept comma separated list of keys 34 | accept=ENTER,MOUSE_BTN0 35 | cancel=ESC 36 | -------------------------------------------------------------------------------- /nix/packages/goodix-patch-521d.nix: -------------------------------------------------------------------------------- 1 | { 2 | stdenvNoCC, 3 | fetchFromGitHub, 4 | python3, 5 | openssl, 6 | }: 7 | let 8 | python3Env = python3.withPackages ( 9 | ps: with ps; [ 10 | pyusb 11 | crcmod 12 | python-periphery 13 | spidev 14 | pycryptodome 15 | crccheck 16 | ] 17 | ); 18 | in 19 | stdenvNoCC.mkDerivation { 20 | pname = "goodix-fp-patch"; 21 | version = "UwU"; 22 | src = fetchFromGitHub { 23 | owner = "goodix-fp-linux-dev"; 24 | repo = "goodix-fp-dump"; 25 | # rev = "master"; 26 | rev = "cc43bb3b3154a0bccc0412ae024013c7e1923139"; 27 | hash = "sha256-AVq2PZe0iv9Mh8+XRr/vbZsbvDIrPKD90Xdu9lXs8p0="; 28 | fetchSubmodules = true; 29 | }; 30 | 31 | patchPhase = '' 32 | #? comment "if len(otp) < 64:" check 33 | sed -i '133,134s/^/#/' driver_52xd.py 34 | ''; 35 | 36 | installPhase = '' 37 | mkdir -p "$out/bin" 38 | cp -r ./* "$out/" 39 | cat > "$out/bin/run_521d" << EOF 40 | #!/bin/sh 41 | cd "$out/" 42 | export PATH="$PATH:${openssl}/bin" 43 | ${python3Env}/bin/python "run_521d.py" 44 | EOF 45 | chmod +x "$out/bin/run_521d" 46 | ''; 47 | } 48 | -------------------------------------------------------------------------------- /versus/pages/opera-other.md: -------------------------------------------------------------------------------- 1 | # [Opera vs Other](./README.md) 2 | 3 | ## Opera exclusive features 4 | 5 | - Click to tab header to scroll to top, click again to return to previous position 6 | - Highlight same tabs 7 | - Files suggestions based on downloads and clipboard when sending 8 | - Tabs selecting with actions 9 | - (etc, select tabs with Shift and copy url) 10 | - Video Picture-in-Picture with timeline 11 | - Search in tabs (including text) (Ctrl+Space) 12 | - TODO 13 | - Tab islands 14 | - TODO 15 | - Hover tab preview 16 | - TODO 17 | - AWESOME MOBILE VERSION 18 | - edge have extensions ? 19 | - Fixed 20 | - Selection mass and currency converter 21 | - [I made currency converter userscript](https://github.com/barsikus007/config/blob/master/browser/userscripts/ExchangeRater.user.js) 22 | - MRU Ctrl+Tab 23 | - [Extension fix](https://chromewebstore.google.com/detail/quickey-%E2%80%93-the-quick-tab-s/ldlghkoiihaelfnggonhjnfiabmaficg) 24 | - Workspaces 25 | - Edge have similar feature 26 | 27 | ## Feature lacking 28 | 29 | - Proper touchpad gestures 30 | - Edge (and other Chromium), Firefox: 2 finger swipe left/right to go through history 31 | 32 | ## Updated 2024-09-08 33 | -------------------------------------------------------------------------------- /configs/install.ps1: -------------------------------------------------------------------------------- 1 | Write-Host "DEPRECATION WARNING!!! I USE NIX NOW" 2 | Write-Host "Installing config files..." 3 | Copy-Item $PSScriptRoot\.config\* ~\.config\ -Recurse -Force 4 | Copy-Item $PSScriptRoot\..\nix\.config\* ~\.config\ -Recurse -Force 5 | 6 | Write-Host "Installing nvim config files..." 7 | Copy-Item ~\.config\nvim\ ~\AppData\Local\ -Recurse -Force 8 | 9 | $SCOOP_HOME = $(If (Test-Path env:SCOOP) { $env:SCOOP } Else { ($env:GIT_INSTALL_ROOT -split "scoop")[0]+"scoop" }) 10 | Write-Host "Detected scoop home: $SCOOP_HOME" 11 | 12 | Write-Host "Installing config files for scoop apps..." 13 | Write-Host "mpv" 14 | sudo New-Item -ItemType SymbolicLink -Value $HOME\.config\mpv\mpv.conf -Path $SCOOP_HOME\persist\mpv\portable_config\mpv.conf -Force | Out-Null 15 | sudo New-Item -ItemType SymbolicLink -Value $HOME\.config\mpv\input.conf -Path $SCOOP_HOME\persist\mpv\portable_config\input.conf -Force | Out-Null 16 | sudo New-Item -ItemType SymbolicLink -Value $HOME\.config\mpv\scripts\ -Path $SCOOP_HOME\persist\mpv\portable_config\scripts\ -Force | Out-Null 17 | sudo New-Item -ItemType SymbolicLink -Value $HOME\.config\mpv\script-opts\ -Path $SCOOP_HOME\persist\mpv\portable_config\script-opts\ -Force | Out-Null 18 | -------------------------------------------------------------------------------- /nix/modules/stylix.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | inputs, 4 | ... 5 | }: 6 | { 7 | imports = [ 8 | inputs.stylix.nixosModules.stylix 9 | ]; 10 | stylix = { 11 | #? shared 12 | enable = true; 13 | # autoEnable = false; 14 | base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml"; 15 | # image = pkgs.fetchurl { 16 | # url = "https://www.pixelstalk.net/wp-content/uploads/2016/05/Epic-Anime-Awesome-Wallpapers.jpg"; 17 | # sha256 = "enQo3wqhgf0FEPHj2coOCvo7DuZv+x5rL/WIo4qPI50="; 18 | # }; 19 | # cursor = { 20 | # size = 24; 21 | # package = pkgs.kdePackages.breeze; 22 | # name = "breeze_cursors"; 23 | # }; 24 | polarity = "dark"; 25 | 26 | fonts = with pkgs; { 27 | serif = { 28 | package = noto-fonts; 29 | name = "Noto Serif"; 30 | }; 31 | sansSerif = { 32 | package = cascadia-code; 33 | name = "Noto Sans"; 34 | }; 35 | monospace = { 36 | package = cascadia-code; 37 | name = "Cascadia Code NF"; 38 | }; 39 | sizes = { 40 | applications = 10; 41 | terminal = 12; 42 | }; 43 | }; 44 | 45 | targets = { 46 | plymouth.enable = false; 47 | }; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /nix/packages/shdotenv.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | fetchFromGitHub, 5 | gawk, 6 | makeWrapper, 7 | coreutils, 8 | }: 9 | #? https://github.com/NixOS/nixpkgs/pull/348161 10 | stdenv.mkDerivation (finalAttrs: { 11 | pname = "shdotenv"; 12 | version = "0.14.0"; 13 | 14 | src = fetchFromGitHub { 15 | owner = "ko1nksm"; 16 | repo = "shdotenv"; 17 | rev = "v${finalAttrs.version}"; 18 | hash = "sha256-3O9TUA3/vuC12OJTxVVoAGmgSRq+1xPG7LxX+aXqVCo="; 19 | }; 20 | 21 | buildInputs = [ 22 | gawk 23 | makeWrapper 24 | ]; 25 | 26 | makeFlags = [ "PREFIX=${placeholder "out"}" ]; 27 | 28 | preInstall = '' 29 | mkdir -p $out/bin 30 | ''; 31 | 32 | postFixup = '' 33 | wrapProgram $out/bin/shdotenv \ 34 | --prefix PATH : ${ 35 | lib.makeBinPath [ 36 | coreutils 37 | gawk 38 | ] 39 | } 40 | ''; 41 | 42 | meta = with lib; { 43 | description = "Dotenv for shells with support for POSIX-compliant and multiple .env file syntax"; 44 | homepage = "https://github.com/ko1nksm/shdotenv"; 45 | platforms = platforms.all; 46 | license = licenses.mit; 47 | sourceProvenance = with sourceTypes; [ fromSource ]; 48 | maintainers = with maintainers; [ 49 | hadrienmp 50 | barsikus007 51 | ]; 52 | mainProgram = "shdotenv"; 53 | }; 54 | }) 55 | -------------------------------------------------------------------------------- /nix/shared/lists/extra.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | with pkgs; 3 | [ 4 | # other (specific cli tools) 5 | _7zz-rar 6 | gcc 7 | git-lfs 8 | isd 9 | file 10 | tlrc 11 | aria2 12 | sbctl # for systemd-boot (and lumine) secure boot 13 | unrar 14 | yq-go 15 | ffmpeg 16 | yt-dlp 17 | pciutils # lspci 18 | usbutils # lssub 19 | inetutils # telnet traceroute whois 20 | rsync 21 | strace # files monitoring 22 | inotify-tools # files monitoring 23 | 24 | # CLI python 25 | python-launcher 26 | (python3.withPackages ( 27 | python-pkgs: with python-pkgs; [ 28 | tkinter 29 | ptpython 30 | ipython 31 | #? certifi 32 | ] 33 | )) 34 | uv 35 | hatch 36 | ruff 37 | 38 | # CLI node 39 | bun 40 | nodejs # it is probably installed by other tools anyway 41 | 42 | # CLI db 43 | lazysql 44 | pgcli 45 | litecli 46 | 47 | # CLI renders for yazi 48 | exiftool 49 | poppler 50 | resvg 51 | imagemagick 52 | ueberzugpp 53 | 54 | # sound 55 | # for play command for asus 56 | sox 57 | 58 | # GUI 59 | gimp3 60 | scrcpy 61 | neovide 62 | qdirstat 63 | parsec-bin 64 | qbittorrent 65 | 66 | # https://www.reddit.com/r/software/comments/t5n3cm/everything_for_linux/ 67 | fsearch 68 | 69 | # GUI unfree 70 | obsidian 71 | 72 | # GUI automation 73 | xclicker 74 | ] 75 | -------------------------------------------------------------------------------- /nix/packages/libspeedhack/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | multiStdenv, 4 | fetchFromGitHub, 5 | }: 6 | #? https://github.com/NixOS/nixpkgs/pull/202212 7 | multiStdenv.mkDerivation (finalAttrs: { 8 | pname = "libspeedhack"; 9 | version = "0.1-x86-multilib"; 10 | 11 | src = fetchFromGitHub { 12 | owner = "evg-zhabotinsky"; 13 | repo = finalAttrs.pname; 14 | rev = finalAttrs.version; 15 | hash = "sha256-+ymV3hWeNtnaUBPkbELhloQ1UVf1vAwXnPOMj2aun54="; 16 | }; 17 | 18 | patches = [ 19 | ./fix_paths.patch 20 | ]; 21 | 22 | postPatch = '' 23 | substituteInPlace ${finalAttrs.meta.mainProgram} --replace-fail %OUT% $out 24 | ''; 25 | 26 | buildPhase = '' 27 | make multilib 28 | ''; 29 | 30 | installPhase = '' 31 | mkdir -p $out/lib/64 $out/lib/32 $out/bin 32 | cp lib64/* $out/lib/64 33 | cp lib32/* $out/lib/32 34 | cp ${finalAttrs.meta.mainProgram} $out/bin 35 | ''; 36 | 37 | meta = with lib; { 38 | description = "A simple dynamic library to slowdown or speedup games on Linux Resources"; 39 | homepage = "https://github.com/evg-zhabotinsky/libspeedhack"; 40 | platforms = with platforms; lists.intersectLists x86_64 linux; 41 | license = licenses.mit; 42 | maintainers = with maintainers; [ 43 | tilcreator 44 | barsikus007 45 | ]; 46 | mainProgram = "speedhack"; 47 | }; 48 | }) 49 | -------------------------------------------------------------------------------- /nix/packages/shikiwatch-appimage.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | appimageTools, 4 | fetchurl, 5 | makeDesktopItem, 6 | }: 7 | 8 | appimageTools.wrapType2 rec { 9 | pname = "ShikiWatch"; 10 | version = "0.12.0"; 11 | 12 | src = fetchurl { 13 | url = "https://github.com/wheremyfiji/ShikiWatch/releases/download/v${version}/ShikiWatch-${version}-linux-amd64.AppImage"; 14 | hash = "sha256-DNLQG3N2Ni8kTsvO1RhRQiaAvPHGqhiRUgDWViwFbCc="; 15 | }; 16 | 17 | # GDK_BACKEND=x11 18 | extraInstallCommands = '' 19 | cp -r ${ 20 | (makeDesktopItem { 21 | name = pname; 22 | exec = pname; 23 | icon = pname; 24 | desktopName = pname; 25 | type = "Application"; 26 | comment = meta.description; 27 | categories = [ 28 | "AudioVideo" 29 | "Video" 30 | "Network" 31 | ]; 32 | }) 33 | }/* $out 34 | ''; 35 | 36 | meta = with lib; { 37 | description = "Unofficial Android and Windows (and Linux) application for Shikimori"; 38 | homepage = "https://github.com/wheremyfiji/ShikiWatch"; 39 | downloadPage = "https://github.com/wheremyfiji/ShikiWatch/releases"; 40 | platforms = with platforms; lists.intersectLists x86_64 linux; 41 | license = licenses.mit; 42 | sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 43 | maintainers = with maintainers; [ barsikus007 ]; 44 | }; 45 | } 46 | -------------------------------------------------------------------------------- /nix/home/gui/vscode.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | flakePath, 5 | ... 6 | }: 7 | { 8 | xdg.configFile = { 9 | "Code/User/settings.json".source = 10 | config.lib.file.mkOutOfStoreSymlink "${flakePath}/.config/Code/User/settings.json"; 11 | "Code/User/keybindings.json".source = 12 | config.lib.file.mkOutOfStoreSymlink "${flakePath}/.config/Code/User/keybindings.json"; 13 | }; 14 | programs.vscode = { 15 | enable = false; 16 | package = pkgs.vscodium; 17 | profiles.default = { 18 | enableUpdateCheck = false; 19 | keybindings = builtins.fromJSON ( 20 | builtins.readFile ( 21 | pkgs.runCommand "clean-json" { } '' 22 | ${pkgs.hjson-go}/bin/hjson-cli -j ${../../.config/Code/User/keybindings.json} > $out 23 | '' 24 | ) 25 | ); 26 | userSettings = builtins.fromJSON ( 27 | builtins.readFile ( 28 | pkgs.runCommand "clean-json" { } '' 29 | ${pkgs.hjson-go}/bin/hjson-cli -j ${../../.config/Code/User/settings.json} > $out 30 | '' 31 | ) 32 | ); 33 | extensions = with pkgs.vscode-extensions; [ 34 | yzhang.markdown-all-in-one 35 | jnoortheen.nix-ide 36 | ]; 37 | }; 38 | }; 39 | home.packages = with pkgs; [ 40 | vscode 41 | #! https://github.com/NixOS/nixpkgs/blob/c23193b943c6c689d70ee98ce3128239ed9e32d1/pkgs/applications/editors/vscode/generic.nix#L82 42 | # vscode-fhs 43 | ]; 44 | } 45 | -------------------------------------------------------------------------------- /nix/modules/zapret.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | #? 🙏 https://github.com/ViZiD/dotfiles/blob/master/modules/shared/zapret.nix 3 | #? https://github.com/Flowseal/zapret-discord-youtube/blob/main/general.bat 4 | let 5 | list-general = pkgs.fetchurl { 6 | # https://github.com/Flowseal/zapret-discord-youtube/blob/main/lists/list-general.txt 7 | url = "https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/779853740f9c957551685bdebf59ad3a788b5004/lists/list-general.txt"; 8 | hash = "sha256-/9dYk5fiVLfN+bY0STlqutnRQQoInS9NBGg9fWHZedk="; 9 | }; 10 | in 11 | { 12 | services.zapret = { 13 | enable = false; 14 | udpSupport = true; 15 | udpPorts = [ 16 | "443" 17 | "50000:50099" 18 | ]; 19 | params = [ 20 | "--filter-tcp=80" 21 | "--hostlist=${list-general}" 22 | "--dpi-desync=fake,split2" 23 | "--dpi-desync-autottl=2" 24 | "--dpi-desync-fooling=md5sig" 25 | 26 | "--new" 27 | "--filter-tcp=443" 28 | "--hostlist=${list-general}" 29 | "--dpi-desync=fake,multidisorder" 30 | "--dpi-desync-split-pos=midsld" 31 | "--dpi-desync-repeats=8" 32 | "--dpi-desync-fooling=md5sig,badseq" 33 | 34 | "--new" 35 | "--filter-udp=443" 36 | "--hostlist=${list-general}" 37 | "--dpi-desync=fake" 38 | "--dpi-desync-repeats=6" 39 | 40 | "--new" 41 | "--filter-udp=50000-50099" 42 | "--filter-l7=discord,stun" 43 | "--dpi-desync=fake" 44 | "--dpi-desync-repeats=6" 45 | ]; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /nix/packages/telegram-desktop-patched.nix: -------------------------------------------------------------------------------- 1 | { 2 | replaceDependencies, 3 | telegram-desktop, 4 | telegram-desktop-client ? telegram-desktop, 5 | fetchFromGitHub, 6 | lib, 7 | qt6, 8 | ... 9 | }: 10 | (replaceDependencies { 11 | drv = telegram-desktop-client; 12 | replacements = 13 | let 14 | patchesRepo = fetchFromGitHub { 15 | # https://github.com/desktop-app/patches/tree/0b68b11048987a68d31b2d8380d9b7c5116aa961 16 | owner = "desktop-app"; 17 | repo = "patches"; 18 | rev = "0b68b11048987a68d31b2d8380d9b7c5116aa961"; 19 | hash = "sha256-eSIO7ALsC8W4bR/KOk7kgDMd9/ABNN8EdCiJwVAK24g="; 20 | }; 21 | qtbasePatches = lib.filesystem.listFilesRecursive "${patchesRepo}/qtbase_6.10.0"; 22 | qtwaylandPatches = lib.filesystem.listFilesRecursive "${patchesRepo}/qtwayland_6.10.0"; 23 | in 24 | [ 25 | { 26 | oldDependency = qt6.qtbase; 27 | newDependency = qt6.qtbase.overrideAttrs (oldAttrs: { 28 | patches = (oldAttrs.patches or [ ]) ++ qtbasePatches; 29 | }); 30 | } 31 | { 32 | oldDependency = qt6.qtwayland; 33 | newDependency = qt6.qtwayland.overrideAttrs (oldAttrs: { 34 | patches = 35 | (oldAttrs.patches or [ ]) 36 | ++ [ (builtins.elemAt qtwaylandPatches 0) ] 37 | ++ [ (builtins.elemAt qtwaylandPatches 1) ] 38 | # ++ [ (builtins.elemAt qtwaylandPatches 2) ] # compilation error 39 | ++ [ ]; 40 | }); 41 | } 42 | ]; 43 | }) 44 | -------------------------------------------------------------------------------- /browser/userscripts/no-popup.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name no popup 3 | // @version 0.0.1 4 | // @description shitcoded popup remover via semantics magic 5 | // @author barsikus007 6 | // @match https://*/* 7 | // @require https://code.jquery.com/jquery-3.6.3.slim.min.js 8 | // ==/UserScript== 9 | 10 | const $ = window.jQuery 11 | 12 | function getElementWithStyle() { 13 | const vw = $(window).width() 14 | const vh = $(window).height() 15 | const elements = $('*').filter( function(){ 16 | return ($(this).css('position') == 'fixed'); 17 | }).filter( function(){ 18 | return ($(this).css('z-index') > 100); 19 | }).filter( function(){ 20 | return ($(this).css('top') == '0px'); 21 | }).filter( function(){ 22 | return ($(this).css('left') == '0px'); 23 | }).filter( function(){ 24 | return ($(this).css('width') == `${vw}px`); 25 | }).filter( function(){ 26 | return ($(this).css('height') == `${vh}px`); 27 | }) 28 | return [...elements] 29 | } 30 | 31 | function clearPopups() { 32 | console.log("WIP due to many false positives at vk.com") 33 | return 34 | console.log("no popup started work") 35 | const elementsToDelete = getElementWithStyle() 36 | console.log("no popup found these elements to hide") 37 | console.log(elementsToDelete) 38 | elementsToDelete.forEach(el => { el.style.display = 'none' }) 39 | console.log("no popup finished work") 40 | } 41 | 42 | (function () { 43 | clearPopups() 44 | })() 45 | -------------------------------------------------------------------------------- /android/termux.md: -------------------------------------------------------------------------------- 1 | # [Termux](./) 2 | 3 | from PC (root needed) 4 | 5 | ```shell 6 | adb shell -t "su -c /data/data/com.termux/files/usr/bin/login" 7 | 8 | export PREFIX="/data/data/com.termux/files" 9 | export HOME="$PREFIX/home" 10 | export LD_LIBRARY_PATH="$PREFIX/usr/lib" 11 | export PATH="$PATH:$HOME/.local/bin:$PREFIX/usr/bin" 12 | export LANG="en_US.UTF-8" 13 | cd $HOME 14 | . $PREFIX/usr/etc/profile 15 | 16 | 17 | # https://github.com/nix-community/nix-on-droid/issues/248 18 | adb shell -t 'su $(su -c "stat -c %U /data/data/com.termux.nix") -c /data/data/com.termux.nix/files/usr/bin/login' 19 | #! NEVER REBUILD SYSTEM FROM ADB SHELL 20 | ``` 21 | 22 | ## sync ssh folder 23 | 24 | ```shell 25 | nix shell nixpkgs#rsync 26 | rsync -avz --delete --chmod=F0600 --no-owner --no-group storage/shared/Documents/Sync/home/.ssh/ ~/.ssh/ 27 | ``` 28 | 29 | ## vanilla setup 30 | 31 | ```shell 32 | termux-setup-storage 33 | yes | pkg up 34 | # unix 35 | pkg i git curl wget iproute2 -y 36 | # base 37 | pkg i bat duf gdu fzf btop neovim zoxide ripgrep -y 38 | # add 39 | pkg i eza tree zellij -y 40 | pkg i python -y 41 | # add termix (no tsu) 42 | pkg i termux-api -y 43 | 44 | # fonts 45 | #? https://github.com/lsd-rs/lsd/issues/423 46 | tmpfile=$(mktemp --suffix .zip) 47 | curl -sSL https://github.com/microsoft/cascadia-code/releases/download/v2407.24/CascadiaCode-2407.24.zip -o "$tmpfile" 48 | unzip -j "$tmpfile" 'ttf/Cascadia*.ttf' -d /data/data/com.termux/files/usr/share/fonts/cascadia 49 | ln -s /data/data/com.termux/files/usr/share/fonts/cascadia/CascadiaCodeNF.ttf ~/.termux/font.ttf 50 | ``` 51 | -------------------------------------------------------------------------------- /windows/rog14.md: -------------------------------------------------------------------------------- 1 | # [ASUS GA401IV](./) 2 | 3 | ## TODO 4 | 5 | - 6 | - 7 | - 8 | - 9 | - 10 | - 11 | - unlock hidden power functions 12 | - unknown source (reddit) 13 | - `powercfg.exe -attributes sub_processor perfboostmode -attrib_hide` 14 | - `powercfg.exe -attributes sub_disk 0b2d69d7-a2a1-449c-9680-f91c70521c60 -attrib_hide` 15 | - ROG G14 AniMe 16 | - 17 | - 18 | - 19 | - 20 | - RestartGPU (Run as root) 21 | - `$device = Get-PnpDevice | Where-Object { $_.FriendlyName -imatch 'NVIDIA' -and $_.Class -eq 'Display' }; Disable-PnpDevice $device.InstanceId -Confirm:$false; Start-Sleep -Seconds 3; Enable-PnpDevice $device.InstanceId -Confirm:$false` 22 | - Power Options 23 | - Switchable Dynamic Graphics 24 | - Global Settings 25 | - On battery: Force power-saving graphics 26 | - [ROG Fonts v1.5](https://dlcdnets.asus.com/pub/ASUS/GamingNB/AppforWin10/ROGFont/Font_ROG_ASUS_V100.zip?model=ROG%20Zephyrus%20G14) 27 | -------------------------------------------------------------------------------- /nix/modules/gui/games.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | programs.steam = { 4 | enable = true; 5 | remotePlay.openFirewall = true; 6 | dedicatedServer.openFirewall = true; 7 | localNetworkGameTransfers.openFirewall = true; 8 | extraCompatPackages = [ pkgs.proton-ge-bin ]; 9 | package = pkgs.steam.override { 10 | extraPkgs = ( 11 | pkgs: with pkgs; [ 12 | gamemode 13 | ] 14 | ); 15 | }; 16 | protontricks.enable = true; 17 | gamescopeSession.enable = true; 18 | }; 19 | 20 | programs.gamemode.enable = true; 21 | environment.systemPackages = with pkgs; [ 22 | protonup-qt 23 | 24 | #? overlay like msi afterburner 25 | mangohud 26 | 27 | r2modman 28 | 29 | (heroic.override { 30 | extraPkgs = pkgs: [ 31 | gamescope 32 | gamemode 33 | ]; 34 | }) 35 | 36 | # native wayland support (unstable) 37 | wineWowPackages.unstableFull 38 | winetricks 39 | bottles 40 | 41 | gpu-screen-recorder-gtk 42 | ]; 43 | 44 | programs.gpu-screen-recorder.enable = true; 45 | programs.obs-studio = { 46 | enable = true; 47 | enableVirtualCamera = true; 48 | # optional Nvidia hardware acceleration 49 | package = ( 50 | pkgs.obs-studio.override { 51 | cudaSupport = true; 52 | } 53 | ); 54 | 55 | plugins = with pkgs.obs-studio-plugins; [ 56 | wlrobs 57 | obs-backgroundremoval 58 | obs-pipewire-audio-capture 59 | obs-vaapi # optional AMD hardware acceleration 60 | obs-gstreamer 61 | obs-vkcapture 62 | ]; 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /nix/nixpkgs.nix: -------------------------------------------------------------------------------- 1 | { 2 | system, 3 | inputs, 4 | overlays ? [ ], 5 | }: 6 | let 7 | # харам, платные приложения 8 | paidApps = [ 9 | "nvidia-x11" 10 | "nvidia-settings" 11 | 12 | "steam" 13 | "steam-unwrapped" 14 | 15 | "7zz" 16 | "unrar" 17 | "corefonts" 18 | "graalvm-oracle" 19 | 20 | "blender" 21 | "cuda_cudart" 22 | "cuda_nvcc" 23 | "cuda_cccl" 24 | 25 | "vscode" 26 | "discord" 27 | "obsidian" 28 | "parsec-bin" 29 | "microsoft-edge" 30 | 31 | "mprint" 32 | "bcompare" 33 | "grdcontrol" 34 | "kompas3d-v24-full" 35 | "davinci-resolve-studio" 36 | ]; 37 | lib = inputs.nixpkgs.lib; 38 | in 39 | import inputs.nixpkgs { 40 | inherit system; 41 | overlays = [ 42 | ( 43 | _: prev: 44 | builtins.mapAttrs 45 | ( 46 | pkgsName: pkgsInput: 47 | import pkgsInput { 48 | inherit system; 49 | config.allowUnfreePredicate = pkg: builtins.elem (pkgsInput.lib.getName pkg) paidApps; 50 | } 51 | ) 52 | ( 53 | inputs 54 | |> inputs.nixpkgs.lib.attrsets.filterAttrs ( 55 | inputName: _: inputName |> lib.strings.hasPrefix "nixpkgs-" 56 | ) 57 | |> lib.attrsets.mapAttrs' ( 58 | inputName: input: { 59 | name = "${inputName |> lib.strings.removePrefix "nixpkgs-"}"; 60 | value = input; 61 | } 62 | ) 63 | ) 64 | ) 65 | ] 66 | ++ overlays; 67 | config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) paidApps; 68 | } 69 | -------------------------------------------------------------------------------- /nix/packages/flclashx.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | appimageTools, 4 | fetchurl, 5 | makeDesktopItem, 6 | }: 7 | 8 | appimageTools.wrapType2 rec { 9 | pname = "FlClashX"; 10 | version = "0.2.1"; 11 | 12 | src = fetchurl { 13 | url = "https://github.com/pluralplay/FlClashX/releases/download/v${version}/${pname}-${version}-linux-amd64.AppImage"; 14 | hash = "sha256-r+1hXoVGZU8+1eK6l4hk2K+sHlKqAZbUhx0yrdDicaw="; 15 | }; 16 | 17 | extraPkgs = pkgs: with pkgs; [ libepoxy ]; 18 | 19 | extraInstallCommands = '' 20 | cp -r ${ 21 | (makeDesktopItem { 22 | name = pname; 23 | exec = "${pname} %U"; 24 | icon = pname; 25 | genericName = pname; 26 | desktopName = pname; 27 | type = "Application"; 28 | comment = meta.description; 29 | categories = [ "Network" ]; 30 | keywords = [ 31 | "FlClashX" 32 | "Clash" 33 | "ClashMeta" 34 | "Proxy" 35 | ]; 36 | }) 37 | }/* $out 38 | ''; 39 | 40 | meta = with lib; { 41 | description = "A fork of the multi-platform proxy client FlClash based on ClashMeta, simple and easy to use, open source and ad-free"; 42 | homepage = "https://github.com/pluralplay/FlClashX"; 43 | downloadPage = "https://github.com/pluralplay/FlClashX/releases"; 44 | platforms = with platforms; lists.intersectLists x86_64 linux; 45 | license = with lib.licenses; [ gpl3Plus ]; 46 | mainProgram = "FlClashX"; 47 | sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 48 | maintainers = with maintainers; [ barsikus007 ]; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /nix/hosts/ROG14-WSL/configuration.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | username, 4 | inputs, 5 | ... 6 | }: 7 | { 8 | networking.hostName = "ROG14-WSL"; # Define your hostname 9 | 10 | environment.systemPackages = (import ../../shared/lists { inherit pkgs; }) 11 | # ++ (import ../../shared/lists/extra.nix { inherit pkgs; }) 12 | # ++ (import ../../shared/lists/test.nix { inherit pkgs; }) 13 | # 14 | ; 15 | 16 | # Edit this configuration file to define what should be installed on 17 | # your system. Help is available in the configuration.nix(5) man page, on 18 | # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). 19 | 20 | # NixOS-WSL specific options are documented on the NixOS-WSL repository: 21 | # https://github.com/nix-community/NixOS-WSL 22 | imports = [ 23 | # include NixOS-WSL modules 24 | inputs.nixos-wsl.nixosModules.default 25 | ]; 26 | 27 | wsl.enable = true; 28 | wsl.defaultUser = username; 29 | wsl.docker-desktop.enable = true; 30 | wsl.interop.register = true; 31 | wsl.startMenuLaunchers = true; 32 | wsl.usbip.enable = true; 33 | 34 | # This value determines the NixOS release from which the default 35 | # settings for stateful data, like file locations and database versions 36 | # on your system were taken. It's perfectly fine and recommended to leave 37 | # this value at the release version of the first install of this system. 38 | # Before changing this value read the documentation for this option 39 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 40 | system.stateVersion = "25.05"; # Did you read the comment? 41 | } 42 | -------------------------------------------------------------------------------- /browser/userscripts/LigmaBallz.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Ligma Ballz 3 | // @namespace https://github.com/barsikus007/ 4 | // @version 1.3.3.7 5 | // @author barsikus007 6 | // @description Hacks ligma dev mode 7 | // @icon https://static.figma.com/app/icon/1/favicon.ico 8 | // @downloadURL https://raw.githubusercontent.com/barsikus007/config/master/browser/userscripts/LigmaBallz.user.js 9 | // @match https://www.figma.com/file/* 10 | // @run-at document-start 11 | // ==/UserScript== 12 | 13 | const logger = console.log.bind(console, "Ligma Ballz:"); 14 | 15 | (function () { 16 | "use strict"; 17 | 18 | new MutationObserver(async (mutations, observer) => { 19 | logger("Loaded Chrome"); 20 | let oldScript = mutations 21 | .flatMap((e) => [...e.addedNodes]) 22 | .filter((e) => e.tagName == "SCRIPT") 23 | .find((e) => e.src.match(/figma_app\.min\.js\.br/)); 24 | 25 | if (oldScript) { 26 | logger("script found", oldScript); 27 | observer.disconnect(); 28 | oldScript.remove(); 29 | 30 | let text = await fetch(oldScript.src) 31 | .then((e) => e.text()) 32 | .then((e) => e.replace(/[tk_].canAccessFullDevMode/g, "true")); 33 | 34 | let newScript = document.createElement("script"); 35 | newScript.type = "module"; 36 | newScript.textContent = text; 37 | logger("script patched", newScript); 38 | document.head.appendChild(newScript); 39 | logger("script injected", newScript); 40 | } 41 | }).observe(document, { 42 | childList: true, 43 | subtree: true, 44 | }); 45 | })(); 46 | -------------------------------------------------------------------------------- /browser/userscripts/GeminiInline.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Gemini URL Param Pre-fill 3 | // @namespace http://tampermonkey.net/ 4 | // @version 1.0 5 | // @description Allows ?q=query in URL to auto-fill Gemini chat 6 | // @author You 7 | // @match https://gemini.google.com/* 8 | // @grant none 9 | // ==/UserScript== 10 | 11 | (function() { 12 | 'use strict'; 13 | 14 | // 1. Get the 'q' parameter from the URL 15 | const url = new URL(window.location); 16 | const query = url.searchParams.get('q'); 17 | 18 | if (!query) return 19 | 20 | // This prevents the script from running again if you refresh the page 21 | // TODO: don't work 22 | url.searchParams.delete('q'); 23 | window.history.replaceState({}, '', url); 24 | 25 | // 2. Wait for the input box to load (it's dynamic) 26 | const waitForInput = setInterval(() => { 27 | // Selects the main contenteditable div (rich text editor) 28 | const inputField = document.querySelector('div[contenteditable="true"]'); 29 | 30 | if (!inputField) return 31 | 32 | clearInterval(waitForInput); 33 | 34 | // 3. Simulate user typing (required for React/Angular apps to register change) 35 | inputField.focus(); 36 | document.execCommand('insertText', false, query); 37 | 38 | // 4. Auto-send after a delay 39 | setTimeout(() => { 40 | const sendBtn = document.querySelector('button[aria-label*="Send"]'); // Selector may vary 41 | if (sendBtn) sendBtn.click(); 42 | }, 500); 43 | 44 | }, 500); // Checks every 500ms 45 | })(); 46 | -------------------------------------------------------------------------------- /nix/modules/hardware/wifi-unlimited.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | config, 5 | ... 6 | }: 7 | # thx https://github.com/truelecter/infra/blob/08f01f1ef85e95de43b65fcb4f1cf9cb8883d2ba/nixos/hosts/x86_64/sirius/wifi.nix#L47 8 | { 9 | # unlimited powah UwU 10 | #? https://github.com/NixOS/nixpkgs/issues/25378 11 | hardware.wirelessRegulatoryDatabase = true; 12 | boot.extraModprobeConfig = '' 13 | options cfg80211 ieee80211_regdom="PA" 14 | options iwlwifi lar_disable=1 15 | ''; 16 | boot.extraModulePackages = 17 | let 18 | iwlifi = pkgs.callPackage ../../packages/kmod/iwlwifi.nix { 19 | inherit (config.boot.kernelPackages) kernel; 20 | }; 21 | iwlifi-larless = iwlifi.overrideAttrs { 22 | patches = [ ../../packages/kmod/iwlwifi-lar_disable.patch ]; 23 | }; 24 | in 25 | [ 26 | (lib.hiPrio iwlifi-larless) 27 | ]; 28 | # boot.kernelPatches = [ 29 | # { 30 | # name = "restore lar_disable module parameter"; 31 | # patch = ( 32 | # pkgs.fetchpatch2 { 33 | # # https://github.com/torvalds/linux/commit/f06021a18fcf8d8a1e79c5e0a8ec4eb2b038e153 34 | # # https://gist.github.com/rhjdvsgsgks/7f6cce3d3b176a03e5b60427301bc9f9 35 | # # https://github.com/truelecter/infra/blob/08f01f1ef85e95de43b65fcb4f1cf9cb8883d2ba/nixos/hosts/x86_64/sirius/kmod/iwlwifi-lar_disable.patch 36 | # url = "https://raw.githubusercontent.com/truelecter/infra/08f01f1ef85e95de43b65fcb4f1cf9cb8883d2ba/nixos/hosts/x86_64/sirius/kmod/iwlwifi-lar_disable.patch"; 37 | # hash = "sha256-GGc8yje3IsxVBYCAzQc3g3gss6zSBYRxANqsLSkXYLU="; 38 | # } 39 | # ); 40 | # } 41 | # ]; 42 | } 43 | -------------------------------------------------------------------------------- /windows/g-helper/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "performance_mode": 2, 3 | "performance_1": 2, 4 | "gpu_mode": 1, 5 | "internal_display": "", 6 | "screen_max": 120, 7 | "frequency": 120, 8 | "overdrive": -65536, 9 | "charge_full": 0, 10 | "performance_0": 3, 11 | "matrix_brightness": 0, 12 | "matrix_auto": 1, 13 | "matrix_running": 2, 14 | "matrix_picture": "", 15 | "matrix_x": 0, 16 | "matrix_y": 0, 17 | "matrix_gamma": 0, 18 | "matrix_contrast": 100, 19 | "matrix_zoom": 100, 20 | "keyboard_brightness": 0, 21 | "keyboard_brightness_ac": 0, 22 | "mid_fan": 0, 23 | "xgm_fan": 0, 24 | "fan_profile_cpu_1": "14-32-37-3C-41-46-4B-62-12-17-1C-23-28-2D-35-3E", 25 | "fan_profile_gpu_1": "14-32-37-3C-41-46-4B-62-19-1C-22-28-2C-31-3D-46", 26 | "limit_total_1": 80, 27 | "limit_slow_1": 80, 28 | "limit_cpu_1": 80, 29 | "limit_fast_1": 80, 30 | "fan_profile_cpu_2": "14-2C-2F-32-35-38-3C-62-07-0B-0E-10-13-17-1C-23", 31 | "fan_profile_gpu_2": "14-2C-2F-32-35-38-3C-62-0B-0E-12-15-19-1C-22-28", 32 | "limit_total_2": 80, 33 | "limit_slow_2": 80, 34 | "limit_cpu_2": 80, 35 | "limit_fast_2": 80, 36 | "mode_base_3": 2, 37 | "mode_name_3": "Potato", 38 | "fan_profile_cpu_3": "14-2C-2F-32-35-38-3C-62-07-0B-0E-10-13-17-1C-23", 39 | "fan_profile_gpu_3": "14-2C-2F-32-35-38-3C-62-0B-0E-12-15-19-1C-22-28", 40 | "limit_total_3": 15, 41 | "limit_slow_3": 15, 42 | "limit_cpu_3": 6, 43 | "limit_fast_3": 80, 44 | "auto_apply_power_3": 1, 45 | "gpu_clock_limit_3": 400, 46 | "gpu_core_3": -250, 47 | "gpu_memory_3": -500, 48 | "auto_uv_3": 0, 49 | "cpu_temp_3": 98, 50 | "cpu_uv_3": -20, 51 | "igpu_uv_3": 0, 52 | "topmost": 1, 53 | "bw_icon": 0 54 | } 55 | -------------------------------------------------------------------------------- /nix/packages/grdcontrol.nix: -------------------------------------------------------------------------------- 1 | { 2 | stdenv, 3 | lib, 4 | 5 | fetchzip, 6 | dpkg, 7 | 8 | autoPatchelfHook, 9 | 10 | xorg, 11 | }: 12 | let 13 | pname = "grdcontrol"; 14 | version = "4.4.3"; 15 | in 16 | stdenv.mkDerivation { 17 | inherit pname version; 18 | 19 | src = fetchzip { 20 | url = "https://download.guardant.ru/Guardant_Control_Center/${version}/grdcontrol-${version}_amd64.deb"; 21 | hash = "sha256-1JvZaEPo6IEkcOVsx7PLW1fCUbbn/Bn89iz/4IAmZAs="; 22 | nativeBuildInputs = [ dpkg ]; 23 | }; 24 | 25 | nativeBuildInputs = [ 26 | autoPatchelfHook 27 | ]; 28 | 29 | propagatedBuildInputs = [ 30 | xorg.libxcb 31 | ]; 32 | 33 | installPhase = '' 34 | runHook preInstall 35 | 36 | mkdir -p $out/{bin,opt,lib}/ 37 | # don't copy etc cause it contain only legacy init.d script 38 | cp -R opt $out/ 39 | 40 | mkdir -p $out/lib/systemd/system/ 41 | cp $out/opt/guardant/grdcontrol/grdcontrol.service $out/lib/systemd/system/ 42 | substituteInPlace $out/opt/guardant/grdcontrol/grdcontrol.service \ 43 | --replace-fail "/opt/guardant" "$out/opt/guardant" 44 | 45 | runHook postInstall 46 | ''; 47 | 48 | dontBuild = true; 49 | 50 | meta = with lib; { 51 | description = "Professional solutions for software monetization and protection"; 52 | homepage = "https://www.guardant.com/support/users/control-center/"; 53 | platforms = with platforms; lists.intersectLists x86_64 linux; 54 | license = licenses.unfree; 55 | sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 56 | maintainers = with maintainers; [ barsikus007 ]; 57 | mainProgram = "../opt/guardant/grdcontrol/grdcontrold"; 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /linux/devices/rpi-zero.md: -------------------------------------------------------------------------------- 1 | # [RPI](../README.md) 2 | 3 | ## [Kali](https://www.kali.org/docs/arm/raspberry-pi-zero-w/) 4 | 5 | ### WiFi setup 6 | 7 | ```shell 8 | wpa_passphrase "Network 1" >> wpa_supplicant.conf 9 | wpa_passphrase "Network 2 with lower priority" >> wpa_supplicant.conf 10 | ``` 11 | 12 | Then edit config values 13 | 14 | ```conf 15 | network={ 16 | ssid="Network 1" 17 | #psk="12345678" 18 | psk=hex_key 19 | priority=2 20 | } 21 | network={ 22 | ssid="Network 2 with lower priority" 23 | #psk="12345678" 24 | psk=hex_key 25 | } 26 | ``` 27 | 28 | ### [Bluetooth stealth mode](https://stackoverflow.com/a/67193246/15844518) 29 | 30 | ```shell 31 | sudoedit /etc/systemd/system/bluetooth.target.wants/bluetooth.service 32 | 33 | ExecStart=/usr/libexec/bluetooth/bluetoothd --noplugin=hostname 34 | 35 | 36 | sudo systemctl daemon-reload && sudo service bluetooth restart 37 | 38 | 39 | sudo hciconfig hci0 name 40 | sudo hciconfig hci0 name '' 41 | ``` 42 | 43 | ## [Raspberry Pi OS](https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-32-bit) 44 | 45 | (Probably, outdated) 46 | 47 | ### setup 48 | 49 | ```shell 50 | # Expand filesystem 51 | sudo raspi-config --expand-rootfs 52 | # Create password for user pi 53 | passwd 54 | ``` 55 | 56 | ### Create files 57 | 58 | #### /boot/ssh 59 | 60 | #### /boot/wpa_supplicant.conf 61 | 62 | ```conf 63 | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev 64 | country=RU 65 | update_config=1 66 | network={ 67 | ssid="WIFI_NAME1" 68 | psk="WIFI_PASSWORD1" 69 | priority=1 70 | key_mgmt=WPA-PSK 71 | } 72 | network={ 73 | ssid="WIFI_NAME2" 74 | psk="WIFI_PASSWORD2" 75 | priority=2 76 | key_mgmt=WPA-PSK 77 | } 78 | ``` 79 | -------------------------------------------------------------------------------- /nix/packages/mprint.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | 5 | fetchzip, 6 | unrar, 7 | 8 | patchPpdFilesHook, 9 | autoPatchelfHook, 10 | 11 | cups, 12 | krb5, 13 | e2fsprogs, 14 | libxcrypt-legacy, 15 | }: 16 | let 17 | installationPath = if stdenv.hostPlatform.system == "x86_64-linux" then "x64" else "x86"; 18 | in 19 | stdenv.mkDerivation (finalAttrs: { 20 | pname = "mprint"; 21 | version = "1.2.1"; 22 | 23 | src = fetchzip { 24 | url = "https://files.mertech.ru/help/general/label/mprint%20linux%20driver%20v1.2.0-1.2.2.rar"; 25 | hash = "sha256-q/p/OvPfj95yZNmZFxiZkL/7biOAGqSh6oIzT2Xi5jk="; 26 | nativeBuildInputs = [ unrar ]; 27 | }; 28 | 29 | nativeBuildInputs = [ 30 | patchPpdFilesHook 31 | autoPatchelfHook 32 | ]; 33 | 34 | buildInputs = [ 35 | cups 36 | krb5 37 | e2fsprogs 38 | libxcrypt-legacy 39 | ]; 40 | 41 | installPhase = '' 42 | runHook preInstall 43 | 44 | cd v${finalAttrs.version}/ 45 | mkdir -p $out/lib/cups/filter/ 46 | mkdir -p $out/share/cups/model/hprt/ 47 | install -m 644 ppd/*.ppd $out/share/cups/model/hprt/ 48 | install -m 755 -D filter/${installationPath}/* $out/lib/cups/filter/ 49 | 50 | runHook postInstall 51 | ''; 52 | 53 | ppdFileCommands = [ 54 | "raster-tspl" 55 | ]; 56 | 57 | meta = with lib; { 58 | description = "MPrint drivers for label printers"; 59 | homepage = "https://help.mertech.ru/label_printers/Общее/Установка_пакета_драйверов_для_принтеров.html"; 60 | platforms = with platforms; lists.intersectLists x86_64 linux; 61 | sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 62 | license = licenses.unfree; 63 | maintainers = with maintainers; [ barsikus007 ]; 64 | }; 65 | }) 66 | -------------------------------------------------------------------------------- /nix/packages/README.md: -------------------------------------------------------------------------------- 1 | # [Worst Nix/OS packages ever](../README.md) 2 | 3 | ```shell 4 | # generic usage of autocompletion with your system nixpkgs 5 | nix run --override-input nixpkgs nixpkgs github:barsikus007/config?dir=nix# 6 | ``` 7 | 8 | ## [index](https://github.com/barsikus007/config/blob/19c08aca56fd7dfd1fc66a31a62cf26e880ca59c/nix/flake.nix#L315) 9 | 10 | - [adbfs with libfuse experemental](./adbfs-rootless-libfuse-3.nix) 11 | - [anicli anime TUI client](./anicli-ru/) 12 | - [bcompare 5 diff tool](./bcompare5.nix) 13 | - `sed -i '/CheckID/d' ~/.config/bcompare5/BCState.xml.bak` 14 | - [davinci-resolve communism edition](./davinci-resolve-studio.nix) 15 | - TODO 16 | - [minecraftia 2 font](./minecraftia.nix) 17 | - TODO 18 | 19 | ### [kompas3d](./kompas3d) 20 | 21 | ```shell 22 | nix run --impure --override-input nixpkgs nixpkgs 'github:barsikus007/config?dir=nix#kompas3d-fhs' 23 | # on non NixOS 24 | nix --extra-experimental-features "nix-command flakes" run --impure --override-input nixpkgs nixpkgs 'github:nix-community/nixGL' -- env NIXPKGS_ALLOW_UNFREE=1 nix run --impure --override-input nixpkgs nixpkgs 'github:barsikus007/config?dir=nix#kompas3d-fhs' 25 | ``` 26 | 27 | ### cleanup after store paths update 28 | 29 | ```shell 30 | rm ~/.config/ascon/KOMPAS-3D/24/{recent_files.xml,KOMPAS.kit.config} 31 | ``` 32 | 33 | ### grdcontrol license service forwarding 34 | 35 | ```shell 36 | # launch on computer with enough system parts (remote) lol 37 | sudo NIXPKGS_ALLOW_UNFREE=1 nix --extra-experimental-features "nix-command flakes" run --impure --override-input nixpkgs nixpkgs 'github:barsikus007/config?dir=nix#grdcontrol' 38 | # launch on computer with kompas (client) 39 | socat TCP-LISTEN:3189,bind=127.0.0.1,fork TCP::3189 40 | ``` 41 | -------------------------------------------------------------------------------- /nix/packages/shikiwatch-native.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | fetchFromGitHub, 4 | flutter329, 5 | 6 | mpv, 7 | 8 | libplacebo, 9 | libdovi, 10 | }: 11 | 12 | flutter329.buildFlutterApplication rec { 13 | pname = "ShikiWatch"; 14 | version = "0.12.0"; 15 | 16 | src = fetchFromGitHub { 17 | owner = "wheremyfiji"; 18 | repo = "ShikiWatch"; 19 | tag = "v${version}"; 20 | hash = "sha256-b5FK5XW0iRyMMtYCnlpHht8WbVFeO26jMeDxncJ9taA="; 21 | }; 22 | 23 | buildInputs = [ 24 | mpv 25 | ] 26 | ++ mpv.unwrapped.buildInputs 27 | ++ libplacebo.buildInputs 28 | ++ [ libdovi ]; 29 | 30 | inputsFrom = [ mpv ]; 31 | 32 | autoPubspecLock = src + /pubspec.lock; 33 | # yq . pubspec.lock -o=json > ./pubspec.lock.json 34 | # pubspecLock = lib.importJSON ./pubspec.lock.json; 35 | 36 | gitHashes = { 37 | dart_discord_rpc = "sha256-YYQ9BRFgq5FSLLb+AIzH1q09RKNwKuhTH2TN4MTkfhQ="; 38 | flutter_secure_storage_linux = "sha256-cFNHW7dAaX8BV7arwbn68GgkkBeiAgPfhMOAFSJWlyY="; 39 | }; 40 | 41 | preBuild = '' 42 | echo "Don't work: https://github.com/wheremyfiji/ShikiWatch/issues/39" 43 | exit 44 | echo "Creating env files" 45 | echo "const String appBuildDateTime = '2025-09-08T13:03:00.000Z';" > lib/build_date_time.dart 46 | # cp lib/secret.example.dart lib/secret.dart 47 | ''; 48 | 49 | meta = with lib; { 50 | description = "Unofficial Android and Windows application for Shikimori"; 51 | homepage = "https://github.com/wheremyfiji/ShikiWatch"; 52 | downloadPage = "https://github.com/wheremyfiji/ShikiWatch/releases"; 53 | platforms = with platforms; lists.intersectLists x86_64 linux; 54 | license = with licenses; [ mit ]; 55 | maintainers = with maintainers; [ barsikus007 ]; 56 | }; 57 | } 58 | -------------------------------------------------------------------------------- /nix/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | -- ^C to copy 2 | vim.keymap.set('n', '', '"+y', { noremap = true }) 3 | vim.keymap.set('v', '', '"+y', { noremap = true }) 4 | 5 | -- https://github.com/neovide/neovide/issues/1282#issuecomment-2496204257 6 | -- TODO make it global? 7 | if vim.g.neovide then 8 | vim.api.nvim_set_keymap('n', '', 'l"+P', {noremap = true}) 9 | vim.api.nvim_set_keymap('v', '', '"+P', {noremap = true}) 10 | vim.api.nvim_set_keymap('c', '', 'l"+Pl', {noremap = true}) 11 | vim.api.nvim_set_keymap('i', '', 'l"+Pli', {noremap = true}) 12 | vim.api.nvim_set_keymap('t', '', '"+Pi', {noremap = true}) 13 | vim.api.nvim_set_keymap("i", "", '"+p', { noremap = true }) -- Paste in insert mode (CTRL+C) 14 | vim.api.nvim_set_keymap("n", "", '"+p', { noremap = true }) -- Paste in normal mode (CTRL+C) 15 | end 16 | 17 | -- russian commands 18 | -- https://neovim.io/doc/user/russian.html 19 | -- https://gist.github.com/sigsergv/5329458 20 | -- TODO https://habr.com/ru/articles/726400/ 21 | local function escape(str) 22 | -- Эти символы должны быть экранированы, если встречаются в langmap 23 | local escape_chars = [[;,."|\]] 24 | return vim.fn.escape(str, escape_chars) 25 | end 26 | 27 | local ru = [[ЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ,ёйцукенгшщзхъфывапролджэячсмить]] 28 | local en = [[~QWERTYUIOP{}ASDFGHJKL:"ZXCVBNM<>?`qwertyuiop[]asdfghjkl;'zxcvbnm]] 29 | vim.opt.langmap = escape(ru) .. ";" .. escape(en) 30 | 31 | local map = vim.keymap.set 32 | local function nmap(shortcut, command) 33 | map('n', shortcut, command) 34 | end 35 | nmap("Ж", ":") 36 | -- yank 37 | nmap("Н", "Y") 38 | nmap("з", "p") 39 | nmap("ф", "a") 40 | nmap("щ", "o") 41 | nmap("г", "u") 42 | nmap("З", "P") 43 | -------------------------------------------------------------------------------- /configs/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "DEPRECATION WARNING!!! I USE NIX NOW" 4 | ( 5 | set -euo pipefail 6 | 7 | script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) 8 | 9 | cp -r "$script_dir/".[!.]* ~/ 10 | cp -r "$script_dir/"../nix/.config/ ~/ 11 | 12 | ln -sf ~/.config/nvim/init.vim ~/.vimrc 13 | 14 | touch_file_if_not_exist() { 15 | # touches $1 if it does not exist 16 | if [ ! -f "$1" ]; then 17 | touch "$1" 18 | fi 19 | } 20 | 21 | add_line_if_not_exists() { 22 | # appends $1 to $2 if it does not exist 23 | if ! grep -q "$1" "$2"; then 24 | echo "$1" >>"$2" 25 | fi 26 | } 27 | 28 | create_bashrc() { 29 | # creates .bashrc if it does not exist 30 | touch_file_if_not_exist ~/.bashrc 31 | } 32 | 33 | create_bash_profile() { 34 | # creates .bash_profile if it does not exist 35 | touch_file_if_not_exist ~/.bash_profile 36 | } 37 | 38 | add_to_bashrc() { 39 | # appends $1 to bashrc if it does not exist 40 | add_line_if_not_exists "$1" ~/.bashrc 41 | } 42 | 43 | add_to_bash_profile() { 44 | # appends $1 to bash_profile if it does not exist 45 | add_line_if_not_exists "$1" ~/.bash_profile 46 | } 47 | 48 | create_bashrc 49 | create_bash_profile 50 | add_to_bash_profile '[ -f ~/.bashrc ] && source ~/.bashrc' 51 | # shellcheck disable=SC2016 52 | add_to_bashrc '[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME="$HOME/.config"' 53 | # shellcheck disable=SC2016 54 | add_to_bashrc '[ -f "$XDG_CONFIG_HOME/bash/config.bash" ] && source $XDG_CONFIG_HOME/bash/config.bash' 55 | sed -i 's/^HIST/# HIST/' ~/.bashrc 56 | ) 57 | # https://stackoverflow.com/questions/2518127/how-to-reload-bashrc-settings-without-logging-out-and-back-in-again 58 | exec "$SHELL" 59 | -------------------------------------------------------------------------------- /nix/modules/gui/plasma.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | environment.sessionVariables = { 4 | #? https://wiki.nixos.org/wiki/Wayland#Electron_and_Chromium 5 | NIXOS_OZONE_WL = "1"; 6 | #? use KDE filepicker in GTK apps 7 | GTK_USE_PORTAL = "1"; 8 | }; 9 | #? use KDE filepicker in GTK apps 10 | xdg.portal.xdgOpenUsePortal = true; 11 | #? https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications#Set_the_preferred_portal_backend 12 | xdg.portal.config.common.default = [ "kde" ]; 13 | xdg.portal.config.common."org.freedesktop.impl.portal.FileChooser" = [ "kde" ]; 14 | 15 | services.displayManager = { 16 | sddm = { 17 | enable = true; 18 | wayland.enable = true; 19 | autoLogin.relogin = true; 20 | }; 21 | }; 22 | services.desktopManager.plasma6.enable = true; 23 | #? https://github.com/NixOS/nixpkgs/blob/d960d804370080d9ba0d4d197c3269e7e001b0e3/nixos/modules/services/desktop-managers/plasma6.nix#L151-L169 24 | # environment.plasma6.excludePackages = with pkgs.kdePackages; [ ]; 25 | environment.systemPackages = with pkgs; [ 26 | #? The fallback for GNOME apps 27 | gnome-icon-theme 28 | #? gtk2 console warning fix 29 | gnome-themes-extra 30 | 31 | #? https://wiki.nixos.org/wiki/Dolphin 32 | kdePackages.qtsvg 33 | kdePackages.kio 34 | kdePackages.kio-fuse 35 | kdePackages.kio-extras 36 | 37 | #? KDE apps, which are analog to useful Windows apps 38 | kdePackages.filelight 39 | kdePackages.kclock 40 | kdePackages.kcalc 41 | 42 | #? ydotool for plasma 43 | kdotool 44 | 45 | #? for KDE Connect 46 | kdePackages.kdialog 47 | # https://invent.kde.org/network/kdeconnect-kde/-/tree/master/plugins/virtualmonitor 48 | kdePackages.krfb 49 | ]; 50 | programs.kdeconnect.enable = true; 51 | } 52 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "search.exclude": { 3 | "аrchive/": true, 4 | }, 5 | // #region nix 6 | "nix.enableLanguageServer": true, 7 | "nix.serverPath": [ 8 | "nixd", 9 | // "--inlay-hints=false", 10 | // "--semantic-tokens=true", 11 | ], 12 | // check https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md for all nixd config 13 | "nix.serverSettings": { 14 | "nixd": { 15 | "nixpkgs": { 16 | "expr": "let inputs = (builtins.getFlake (''git+file://'' + toString ./. + ''?dir=nix'')).inputs; system = ''x86_64-linux''; in (import ''${toString ./.}/nix/nixpkgs.nix'' { inherit system inputs; })", 17 | }, 18 | "options": { 19 | "nixos": { 20 | "expr": "(builtins.getFlake (''git+file://'' + toString ./. + ''?dir=nix'')).nixosConfigurations.ROG14.options", 21 | }, 22 | "home-manager": { 23 | // "expr": "(builtins.getFlake (''git+file://'' + toString ./. + ''?dir=nix'')).homeConfigurations.ogurez.options", 24 | "expr": "(builtins.getFlake (''git+file://'' + toString ./. + ''?dir=nix'')).nixosConfigurations.ROG14.options.home-manager.users.type.getSubOptions []", 25 | }, 26 | "nix-on-droid": { 27 | "expr": "(builtins.getFlake (''git+file://'' + toString ./. + ''?dir=nix'')).nixOnDroidConfigurations.default.options", 28 | }, 29 | }, 30 | } 31 | }, 32 | "[nix]": { 33 | "editor.formatOnSave": true, 34 | "editor.wordBasedSuggestions": "off", 35 | }, 36 | "nix.hiddenLanguageServerErrors": [ 37 | "textDocument/definition", 38 | "textDocument/formatting", 39 | ], 40 | // #endregion nix 41 | } -------------------------------------------------------------------------------- /nix/packages/virtiofsd/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | rustPlatform, 5 | fetchFromGitLab, 6 | libcap_ng, 7 | libseccomp, 8 | }: 9 | #? https://gitlab.com/virtio-fs/virtiofsd/-/issues/96#note_2514997399 10 | rustPlatform.buildRustPackage (finalAttrs: { 11 | pname = "virtiofsd-hreitz-fork"; 12 | version = "8fa5564fdd4d5296997fb054a5e3193e18a81bcf"; # The specific commit hash 13 | 14 | src = fetchFromGitLab { 15 | owner = "hreitz"; 16 | repo = "virtiofsd-rs"; 17 | rev = finalAttrs.version; # Use the commit hash 18 | hash = "sha256-QjLOjH+AvF3I9ffLTRhEfwRKG7SIjTy9kQv3Q/it+hs="; 19 | }; 20 | 21 | # From the original nixpkgs package, likely still relevant 22 | separateDebugInfo = true; 23 | 24 | cargoHash = "sha256-reaVHbfrHj5iZjpRaB+nREctoS3ZLdl5WGIurpRqjZU="; 25 | 26 | # Copied from the original nixpkgs virtiofsd package definition 27 | LIBCAPNG_LIB_PATH = "${lib.getLib libcap_ng}/lib"; 28 | LIBCAPNG_LINK_TYPE = if stdenv.hostPlatform.isStatic then "static" else "dylib"; 29 | 30 | buildInputs = [ 31 | libcap_ng 32 | libseccomp 33 | ]; 34 | 35 | # These phases assume '50-virtiofsd.json' exists at the root of the fetched source. 36 | # This file IS present at the specified commit in hreitz/virtiofsd-rs. 37 | postConfigure = '' 38 | sed -i "s|/usr/libexec|$out/bin|g" 50-virtiofsd.json 39 | ''; 40 | 41 | postInstall = '' 42 | install -Dm644 50-virtiofsd.json "$out/share/qemu/vhost-user/50-virtiofsd.json" 43 | ''; 44 | 45 | meta = with lib; { 46 | homepage = "https://gitlab.com/hreitz/virtiofsd-rs"; 47 | description = "vhost-user virtio-fs device backend (hreitz/virtiofsd-rs fork at commit ${strings.substring 0 7 version})"; 48 | platforms = platforms.linux; 49 | license = with licenses; [ 50 | asl20 51 | bsd3 52 | ]; 53 | mainProgram = "virtiofsd"; 54 | }; 55 | }) 56 | -------------------------------------------------------------------------------- /android/revanced.md: -------------------------------------------------------------------------------- 1 | # [YouTube ReVanced](./README.md) 2 | 3 | ## correct update sequence 4 | 5 | 1. unmount app 6 | 2. install new version 7 | 3. patch and mount 8 | 9 | ## correct fix sequence 10 | 11 | if phone crashes, it causes base.apk of default apps reset their version 12 | 13 | 1. install same version 14 | 2. reboot/relaunch mount scripts 15 | 16 | ## [YouTube](https://revanced.app/patches?pkg=com.google.android.youtube) 17 | 18 | - 5.46.0 19 | - Theme 20 | - Material You 21 | - !GmsCore support (due to root) 22 | 23 | ### settings 24 | 25 | - Video quality preferences 26 | - \* 27 | - Higher picture quality 28 | - Playback 29 | - Double-tap to seek 30 | - 5 seconds 31 | - ReVanced 32 | - Miscellaneous 33 | - Import / Export 34 | 35 | ```json 36 | "custom_speed_menu": false, 37 | "disable_precise_seeking_gesture": true, 38 | "disable_resuming_shorts_player": true, 39 | "external_downloader": true, 40 | "force_original_audio": true, 41 | "hide_player_popup_panels": true, 42 | "miniplayer_type": "minimal", 43 | "ryd_toast_on_connection_error": false, 44 | "seekbar_tapping": true, 45 | "shorts_player_type": "regular_player", 46 | "swipe_brightness": true, 47 | "swipe_lowest_value_enable_auto_brightness": true, 48 | "swipe_volume": true, 49 | "sb_local_time_saved_milliseconds": 4330921, 50 | "sb_local_time_saved_number_segments": 120, 51 | "sb_toast_on_connection_error": false 52 | ``` 53 | 54 | ## [YouTube Music](https://revanced.app/patches?pkg=com.google.android.apps.youtube.music) 55 | 56 | - 5.46.0 57 | - Theme 58 | - Material You 59 | - !Bypass certificate check (due to root) 60 | - !GmsCore support (due to root) 61 | 62 | ### settings 63 | 64 | - ReVanced 65 | - Miscellaneous 66 | - Import / Export 67 | 68 | ```json 69 | "music_hide_navigation_bar_explore_button": true, 70 | "music_hide_navigation_bar_samples_button": true 71 | ``` 72 | 73 | ## updated 2025-11-29 74 | -------------------------------------------------------------------------------- /nix/packages/kompas3d/fhs.nix: -------------------------------------------------------------------------------- 1 | { 2 | kdePackages, 3 | 4 | buildFHSEnv, 5 | 6 | open-sans, 7 | fontconfig, 8 | 9 | bash, 10 | writeText, 11 | }: 12 | let 13 | kompas = (kdePackages.callPackage ./default.nix { }); 14 | in 15 | buildFHSEnv rec { 16 | pname = "kompas3d-fhs"; 17 | inherit (kompas) version; 18 | 19 | targetPkgs = pkgs: [ 20 | kompas 21 | open-sans 22 | ]; 23 | extraBuildCommands = '' 24 | mkdir -p $out/usr/local/ 25 | ''; 26 | extraBwrapArgs = [ 27 | "--tmpfs /usr/local" 28 | "--bind-try /etc/nixos/ /etc/nixos/" 29 | ]; 30 | 31 | # symlink shared assets, including icons and desktop entries 32 | extraInstallCommands = '' 33 | ln -s "${kompas}/share" "$out/" 34 | ln -s "$out/bin/${pname}" "$out/bin/${kompas.meta.mainProgram}" 35 | ''; 36 | 37 | profile = '' 38 | ( 39 | custom_font_dir="/usr/local/share/fonts" 40 | if [ -d "$custom_font_dir" ]; then 41 | echo "Font directory $custom_font_dir already exists, skipping font linking" 42 | return 0 43 | fi 44 | echo "Start font linking inside FHS env cause kompas only checks /usr/{,local/}share/fonts/ dirs" 45 | mkdir -p "$custom_font_dir" 46 | for font in $(${fontconfig}/bin/fc-list -f "%{file}\n" | sort -u | awk -F/ '{if (!seen[$NF]++) print $0}'); do 47 | [ -L "$font" ] && font=$(readlink -f "$font") 48 | relpath=$(dirname $(echo $font | sed 's|.*/share/fonts/||')) 49 | target="$custom_font_dir/$relpath/" 50 | mkdir -p "$target" 51 | ln -s "$font" "$target" 52 | done 53 | ) 54 | ''; 55 | # "${kompas}/bin/${kompas.meta.mainProgram}" 56 | runScript = "${bash}/bin/bash ${writeText "kompas-wrapper" '' 57 | export QT_QPA_PLATFORM=xcb 58 | export QT_STYLE_OVERRIDE=Fusion 59 | # export QT_STYLE_OVERRIDE=Windows 60 | cd /opt/ascon/kompas3d-v24/Bin/ 61 | ./kKompas 62 | ''}"; 63 | } 64 | -------------------------------------------------------------------------------- /nix/packages/libspeedhack/fix_paths.patch: -------------------------------------------------------------------------------- 1 | diff --git a/libspeedhack.cpp b/libspeedhack.cpp 2 | index 4663f61..657a0ba 100644 3 | --- a/libspeedhack.cpp 4 | +++ b/libspeedhack.cpp 5 | @@ -10,6 +10,8 @@ 6 | #include 7 | #include 8 | #include 9 | +#include 10 | +#include 11 | #include 12 | 13 | using namespace std; 14 | @@ -330,8 +332,12 @@ static void init_libspeedhack() 15 | the_mutex = new mutex; 16 | gettimeofday_orig = decltype(gettimeofday_orig)(dlsym(RTLD_NEXT,"gettimeofday")); 17 | clock_gettime_orig = decltype(clock_gettime_orig)(dlsym(RTLD_NEXT,"clock_gettime")); 18 | - efile = fopen("/tmp/speedhack_log", "a"); 19 | - fd = open("/tmp/speedhack_pipe", O_RDONLY | O_NONBLOCK); 20 | + std::stringstream log_path; 21 | + log_path << getenv("XDG_RUNTIME_DIR") << "/speedhack_log"; 22 | + efile = fopen(log_path.str().c_str(), "a"); 23 | + std::stringstream pipe_path; 24 | + pipe_path << getenv("XDG_RUNTIME_DIR") << "/speedhack_pipe"; 25 | + fd = open(pipe_path.str().c_str(), O_RDONLY | O_NONBLOCK); 26 | fix_timescale(); 27 | } 28 | 29 | diff --git a/speedhack b/speedhack 30 | index 172c7c3..596a1cc 100755 31 | --- a/speedhack 32 | +++ b/speedhack 33 | @@ -1,13 +1,14 @@ 34 | #!/bin/bash 35 | 36 | # Remove old pipe and log 37 | -rm -f /tmp/speedhack_{pipe,log} 38 | +rm -f $XDG_RUNTIME_DIR/speedhack_{pipe,log} 39 | # Create pipe for speed control commands 40 | -mkfifo /tmp/speedhack_pipe 41 | +mkfifo $XDG_RUNTIME_DIR/speedhack_pipe 42 | + 43 | +echo control pipe and log available at $XDG_RUNTIME_DIR/speedhack_pipe and $XDG_RUNTIME_DIR/speedhack_log 44 | 45 | -_libdir=$(cd $(dirname "$0"); echo $PWD) # Directory where this script resides 46 | # Fix line below if you put libs in different location 47 | -LD_LIBRARY_PATH="${_libdir}/lib:${_libdir}/lib64:${_libdir}/lib32${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \ 48 | +LD_LIBRARY_PATH="%OUT%/lib/64:%OUT%/lib/32${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \ 49 | LD_PRELOAD="libspeedhack.so${LD_PRELOAD:+:$LD_PRELOAD}" \ 50 | exec "$@" 51 | -------------------------------------------------------------------------------- /android/certs.md: -------------------------------------------------------------------------------- 1 | # [How to install certificates](./README.md) 2 | 3 | ```shell 4 | mitmproxy -p 8081 --set block_global=false 5 | 6 | adb shell settings put global http_proxy 10.0.2.2:8080 7 | adb shell settings put global http_proxy 228.13.37.123:8081 8 | 9 | adb shell settings delete global http_proxy 10 | adb shell settings delete global global_http_proxy_host 11 | adb shell settings delete global global_http_proxy_port 12 | 13 | # https://nibarius.github.io/learning-frida/cheat-sheet/ 14 | cert_name=http-toolkit-ca-certificate.crt 15 | openssl x509 -inform DER -in $cert_name -out ${FILE%%.*}-conv.crt 16 | # convert certs 17 | cert_name=http-toolkit-ca-certificate-conv.crt 18 | hashed_name=`openssl x509 -inform der -subject_hash_old -in $cert_name | head -1` && cp $cert_name $hashed_name.0 19 | # or 20 | hashed_name=`openssl x509 -inform PEM -subject_hash_old -in $cert_name | head -1` && cp $cert_name $hashed_name.0 21 | 22 | # change certs dir to your own 23 | cd ~/certs 24 | adb push 871cb74d.0 /data/local/tmp 25 | adb push 269953fb.0 /data/local/tmp 26 | adb push c8750f0d.0 /data/local/tmp 27 | adb shell -t su 28 | 29 | mkdir -m 700 /data/local/certs 30 | cp /system/etc/security/cacerts/* /data/local/certs 31 | mount -t tmpfs tmpfs /system/etc/security/cacerts 32 | mv /data/local/certs/* /system/etc/security/cacerts/ 33 | mv /data/local/tmp/*.0 /system/etc/security/cacerts/ 34 | chown root:root /system/etc/security/cacerts/* 35 | chmod 644 /system/etc/security/cacerts/* 36 | chcon u:object_r:system_file:s0 /system/etc/security/cacerts/* 37 | # then reboot 38 | ``` 39 | 40 | ## or use HTTP Toolkit with 41 | 42 | ```shell 43 | frida -U --codeshare akabe1/frida-multiple-unpinning -f com.punicapp.whoosh 44 | 45 | wsl 46 | unxz frida-server-16.0.10-android-arm64.xz 47 | mv frida-server-16.0.10-android-arm64 frida-server 48 | exit 49 | 50 | adb push frida-server /data/local/tmp/ 51 | adb shell "chmod 755 /data/local/tmp/frida-server" 52 | adb shell "/data/local/tmp/frida-server &" 53 | ``` 54 | -------------------------------------------------------------------------------- /nix/.config/ludusavi/config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | runtime: 3 | threads: ~ 4 | release: 5 | check: true 6 | manifest: 7 | enable: true 8 | language: en-US 9 | theme: light 10 | roots: 11 | - store: steam 12 | path: /home/ogurez/.local/share/Steam 13 | - store: heroic 14 | path: /home/ogurez/.config/heroic 15 | - store: steam 16 | path: /run/media/ogurez/Data/games/SteamLibrary 17 | - store: gogGalaxy 18 | path: /run/media/ogurez/Data/games/GOG Galaxy 19 | - store: epic 20 | path: /run/media/ogurez/Data/games/Epic Games 21 | - store: other 22 | path: /run/media/ogurez/Data/games/TorrentEdition 23 | - store: otherWindows 24 | path: /run/media/ogurez/Data 25 | - store: otherWindows 26 | path: /run/media/ogurez/System 27 | redirects: [] 28 | backup: 29 | path: /run/media/ogurez/NAS/data/saves 30 | ignoredGames: [] 31 | filter: 32 | excludeStoreScreenshots: false 33 | cloud: 34 | exclude: false 35 | epic: false 36 | gog: false 37 | origin: false 38 | steam: false 39 | uplay: false 40 | ignoredPaths: [] 41 | ignoredRegistry: [] 42 | toggledPaths: {} 43 | toggledRegistry: {} 44 | sort: 45 | key: status 46 | reversed: false 47 | retention: 48 | full: 1 49 | differential: 0 50 | format: 51 | chosen: simple 52 | zip: 53 | compression: deflate 54 | compression: 55 | deflate: 56 | level: 6 57 | bzip2: 58 | level: 6 59 | zstd: 60 | level: 10 61 | onlyConstructive: false 62 | restore: 63 | path: /run/media/ogurez/NAS/data/saves 64 | ignoredGames: [] 65 | toggledPaths: {} 66 | toggledRegistry: {} 67 | sort: 68 | key: status 69 | reversed: false 70 | reverseRedirects: false 71 | scan: 72 | showDeselectedGames: true 73 | showUnchangedGames: true 74 | showUnscannedGames: true 75 | cloud: 76 | remote: ~ 77 | path: ludusavi-backup 78 | synchronize: true 79 | apps: 80 | rclone: 81 | path: rclone 82 | arguments: "--fast-list --ignore-checksum" 83 | customGames: [] 84 | -------------------------------------------------------------------------------- /configs/.config/nvim/init.vim: -------------------------------------------------------------------------------- 1 | " code style 2 | syntax on 3 | filetype on 4 | filetype plugin on 5 | filetype indent on 6 | 7 | set fileformat=unix 8 | set encoding=UTF-8 9 | " init.lua 10 | 11 | 12 | " visual style 13 | set number 14 | set relativenumber 15 | set mouse=a 16 | set ruler 17 | set cursorline 18 | " Show matching brackets when text indicator is over them 19 | set showmatch 20 | 21 | " indent fix ? 22 | set autoindent 23 | set smartindent 24 | set smarttab 25 | set expandtab 26 | set tabstop=2 27 | set softtabstop=2 28 | set shiftwidth=2 29 | 30 | " undo behavior 31 | " set noswapfile 32 | " set nobackup 33 | " set undodir=~/.vim/undodir 34 | " set undofile 35 | " set clipboard=unnamed 36 | 37 | " search behavior 38 | set ignorecase 39 | set smartcase 40 | set incsearch 41 | " set hlsearch 42 | 43 | " https://www.freecodecamp.org/news/vimrc-configuration-guide-customize-your-vim-editor/ 44 | " Make wildmenu behave like similar to Bash completion. 45 | set wildmode=list:longest 46 | " There are certain files that we would never want to edit with Vim. 47 | " Wildmenu will ignore files with these extensions. 48 | set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx 49 | 50 | " keymaps 51 | let mapleader = " " 52 | 53 | " ^C to copy 54 | nnoremap "+y 55 | vnoremap "+y 56 | 57 | " russian commands 58 | " https://neovim.io/doc/user/russian.html 59 | " https://gist.github.com/sigsergv/5329458 60 | set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<> 61 | nmap Ж : 62 | " yank 63 | nmap Н Y 64 | nmap з p 65 | nmap ф a 66 | nmap щ o 67 | nmap г u 68 | nmap З P 69 | 70 | " vim.plug for some reason https://github.com/junegunn/vim-plug/wiki/tips#automatic-installation 71 | let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' 72 | if empty(glob(data_dir . '/autoload/plug.vim')) 73 | silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' 74 | autocmd VimEnter * PlugInstall --sync | source $MYVIMRC 75 | endif 76 | -------------------------------------------------------------------------------- /browser/userscripts/VideoLinkDumper.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name Video Link Dumper 3 | // @namespace https://github.com/barsikus007/ 4 | // @version 1.3.1 5 | // @author barsikus007 6 | // @description Dumps video links from players on animego.org 7 | // @icon https://animego.org/favicon.ico 8 | // @downloadURL https://raw.githubusercontent.com/barsikus007/config/master/browser/userscripts/VideoLinkDumper.user.js 9 | // @match https://aniboom.one/* 10 | // @match https://video.sibnet.ru/* 11 | // @match https://kodik.info/* 12 | // ==/UserScript== 13 | 14 | (async function () { 15 | сonsole.log('This script is deprecated. Use https://github.com/vypivshiy/ani-cli-ru instead.') 16 | let aniboomURL 17 | const videoElement = document.getElementById('video') 18 | try { 19 | aniboomURL = JSON.parse(JSON.parse(videoElement?.getAttribute('data-parameters'))?.dash)?.src 20 | } catch {} 21 | let sibnetURL = document.querySelector('video')?.src || '' 22 | const url = aniboomURL || (sibnetURL || undefined) 23 | if (!url) { return console.log('Failed to extract url') } 24 | sibnetURL = sibnetURL ? 'https://video.sibnet.ru' : ' ' 25 | let mpvBase = `mpv '${url}' --no-border --snap-window --save-position-on-quit --referrer='${sibnetURL}'` 26 | console.log('Just download with yt-dlp') 27 | // https://github.com/ytdl-org/youtube-dl/issues/15384#issuecomment-359654155 28 | console.log(`yt-dlp '${url}' --referer='${sibnetURL}' --no-part -N 16"`) 29 | console.log('or with aria2c') 30 | console.log(`yt-dlp '${url}' --referer='${sibnetURL}' --no-part --external-downloader aria2c --external-downloader-args "-x 16 -s 16 -k 1M"`) 31 | console.log('MPV max quality ("_" key for switch quality)') 32 | console.log(mpvBase) 33 | if (sibnetURL) { return } 34 | [1080, 720, 480].forEach((height) => { 35 | console.log(`MPV ${height}p (if available)`) 36 | console.log(`${mpvBase} --ytdl-raw-options=referer='' --ytdl-format='bestaudio+bestvideo[height<=?${height}]'`) 37 | }) 38 | сonsole.log('This script is deprecated. Use https://github.com/vypivshiy/ani-cli-ru instead.') 39 | })() 40 | -------------------------------------------------------------------------------- /nix/.config/mpv/script-opts/encode_webm.conf: -------------------------------------------------------------------------------- 1 | # https://github.com/occivink/mpv-scripts 2 | # if yes, only encode the currently active tracks 3 | # for example, mute the player / hide the subtitles if you don't want audio / subs to be part of the extract 4 | only_active_tracks=no 5 | 6 | # whether to preserve some of the applied filters (crop, rotate, flip and mirror) into the extract 7 | # this is pretty useful in combination with crop.lua 8 | # note that you cannot copy video streams and apply filters at the same time 9 | preserve_filters=yes 10 | 11 | # apply another filter after the ones from the previous option if any 12 | # can be used to limit the resolution of the output, for example with 13 | # append_filter=scale=2*trunc(iw/max(1\,sqrt((iw*ih)/(960*540)))/2):-2 14 | append_filter= 15 | 16 | # additional parameters passed to ffmpeg 17 | codec=-an -sn -c:v libvpx -crf 10 -b:v 1000k 18 | 19 | # format of the output filename 20 | # Does basic interpolation on the following variables: $f, $x, $t, $s, $e, $d, $p, $n which respectively represent 21 | # input filename, input extension, title, start timestamp, end timestamp, duration, profile name and an incrementing number in case of conflicts 22 | # if the extension is not among the recognized ones, it will default to mkv 23 | output_format=$f_$n.webm 24 | 25 | # the directory in which to create the extract 26 | # empty means the same directory as the input file 27 | # relative paths are relative to mpv's working directory, absolute ones work like you would expect 28 | output_directory= 29 | 30 | # if yes, the ffmpeg process will run detached from mpv and we won't know if it succeeded or not 31 | # if no, we know the result of calling ffmpeg, but we can only encode one extract at a time and mpv will block on exit 32 | detached=yes 33 | 34 | # executable to run when encoding (or its full path if not in PATH) 35 | # for example, this can be used with a wrapper script that calls ffmpeg and triggers a notification when finished 36 | # note that the executable gets the ffmpeg arguments as-is, and is expected to call ffmpeg itself 37 | ffmpeg_command=ffmpeg 38 | 39 | # if yes, print the ffmpeg call before executing it 40 | print=yes 41 | -------------------------------------------------------------------------------- /nix/packages/davinci-resolve-studio.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | davinci-resolve-studio, 4 | perl, 5 | replaceDependencies, 6 | ... 7 | }: 8 | let 9 | davinci-resolve-studio-licenseless = davinci-resolve-studio.override (previous: { 10 | buildFHSEnv = 11 | oldFHSEnvArgs: 12 | (previous.buildFHSEnv ( 13 | oldFHSEnvArgs 14 | // { 15 | extraBwrapArgs = builtins.filter ( 16 | n: !(lib.strings.hasInfix "license" n) 17 | ) oldFHSEnvArgs.extraBwrapArgs; 18 | } 19 | )); 20 | }); 21 | in 22 | let 23 | davinci = davinci-resolve-studio-licenseless.passthru.davinci; 24 | davinciPatched = davinci.overrideAttrs ( 25 | #? for 19 version 26 | #? https://rutracker.org/forum/viewtopic.php?t=6088055&start=210 27 | # ${perl}/bin/perl -pi -e 's/\x74\x11\xe8\x21\x23\x00\x00/\xeb\x11\xe8\x21\x23\x00\x00/g' $out/bin/resolve 28 | #? for 20 version 29 | #? https://rutracker.org/forum/viewtopic.php?t=6088055&start=270 30 | finalAttrs: previousAttrs: { 31 | postFixup = '' 32 | ${previousAttrs.postFixup} 33 | ${perl}/bin/perl -pi -e 's/\x03\x00\x89\x45\xFC\x83\x7D\xFC\x00\x74\x11\x48\x8B\x45\xC8\x8B/\x03\x00\x89\x45\xFC\x83\x7D\xFC\x00\xEB\x11\x48\x8B\x45\xC8\x8B/' $out/bin/resolve 34 | ${perl}/bin/perl -pi -e 's/\x74\x11\x48\x8B\x45\xC8\x8B\x55\xFC\x89\x50\x58\xB8\x00\x00\x00/\xEB\x11\x48\x8B\x45\xC8\x8B\x55\xFC\x89\x50\x58\xB8\x00\x00\x00/' $out/bin/resolve 35 | ${perl}/bin/perl -pi -e 's/\x41\xb6\x01\x84\xc0\x0f\x84\xb0\x00\x00\x00\x48\x85\xdb\x74\x08\x45\x31\xf6\xe9\xa3\x00\x00\x00/\x41\xb6\x00\x84\xc0\x0f\x84\xb0\x00\x00\x00\x48\x85\xdb\x74\x08\x45\x31\xf6\xe9\xa3\x00\x00\x00/' $out/bin/resolve 36 | echo -e "LICENSE blackmagic davinciresolvestudio 999999 permanent uncounted\nhostid=ANY issuer=CGP customer=CGP issued=28-dec-2023\nakey=0000-0000-0000-0000 _ck=00 sig=\"00\"" > $out/.license/blackmagic.lic 37 | ''; 38 | } 39 | ); 40 | in 41 | replaceDependencies { 42 | drv = davinci-resolve-studio-licenseless; 43 | replacements = [ 44 | { 45 | oldDependency = davinci; 46 | newDependency = davinciPatched; 47 | } 48 | ]; 49 | } 50 | -------------------------------------------------------------------------------- /nix/packages/libfprint-27c6-521d.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | stdenv, 4 | fetchFromGitHub, 5 | meson, 6 | ninja, 7 | pkg-config, 8 | cmake, 9 | gtk-doc, 10 | doctest, 11 | 12 | glib, 13 | gusb, 14 | gobject-introspection, 15 | 16 | pixman, 17 | openssl, 18 | libgudev, 19 | libfprint, 20 | 21 | withTests ? false, 22 | cairo, 23 | }: 24 | stdenv.mkDerivation (finalAttrs: { 25 | pname = "libfprint-goodixtls-27c6-521d"; 26 | version = "1.94.9"; 27 | 28 | src = fetchFromGitHub { 29 | owner = "barsikus007"; 30 | repo = "libfprint"; 31 | rev = "merge/upstream-${finalAttrs.version}"; 32 | hash = "sha256-Zov/PfvKBfnoRUyUGsOsofrTt80kHq0eKCKlRXyvnio="; 33 | }; 34 | 35 | nativeBuildInputs = [ 36 | meson 37 | ninja 38 | pkg-config 39 | cmake 40 | gtk-doc 41 | doctest 42 | ]; 43 | buildInputs = [ 44 | glib 45 | gusb 46 | gobject-introspection 47 | 48 | pixman 49 | openssl 50 | libgudev 51 | libfprint 52 | ] 53 | ++ lib.optionals withTests [ 54 | cairo 55 | ]; 56 | 57 | mesonBuildType = "release"; 58 | 59 | # https://gcc.gnu.org/gcc-14/porting_to.html#incompatible-pointer-types 60 | env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; 61 | 62 | postPatch = '' 63 | # disable building GObject Introspection repository 64 | sed -i "8c value: false)" ./meson_options.txt 65 | # set correct udev rules path for nix 66 | sed -i "16c value: '$out/lib/udev')" ./meson_options.txt 67 | # set correct udev hwdb path for nix 68 | sed -i "24c value: '$out/lib/udev')" ./meson_options.txt 69 | # don't build API docs 70 | sed -i "32c value: false)" ./meson_options.txt 71 | '' 72 | + lib.strings.optionalString (!withTests) '' 73 | # don't install tests 74 | sed -i "36c value: false)" ./meson_options.txt 75 | ''; 76 | 77 | meta = with lib; { 78 | homepage = "https://github.com/infinytum/libfprint/tree/driver/goodix-521d"; 79 | description = "(27c6:521d) Library for fingerprint readers"; 80 | license = licenses.lgpl21Only; 81 | maintainers = with maintainers; [ barsikus007 ]; 82 | platforms = platforms.linux; 83 | }; 84 | }) 85 | -------------------------------------------------------------------------------- /nix/home/gui/default.nix: -------------------------------------------------------------------------------- 1 | { lib, pkgs, ... }: 2 | { 3 | xdg = { 4 | #? ls /run/current-system/sw/share/applications /etc/profiles/per-user/$(id -n -u)/share/applications ~/.local/share/applications | grep 5 | mimeApps.enable = true; 6 | mimeApps.defaultApplications = { 7 | "inode/directory" = [ 8 | "org.kde.dolphin.desktop" 9 | "code.desktop" 10 | ]; 11 | "image/*" = "org.kde.gwenview.desktop"; 12 | "video/*" = "mpv.desktop"; 13 | "audio/*" = [ 14 | "org.kde.elisa.desktop" 15 | "mpv.desktop" 16 | ]; 17 | } 18 | // 19 | lib.genAttrs 20 | [ 21 | "application/x-shellscript" 22 | "application/xml" 23 | # default for unknown (binary) and text 24 | "text/plain" 25 | "application/octet-stream" 26 | "application/x-zerosize" 27 | ] 28 | (key: [ 29 | "org.kde.kate.desktop" 30 | "code.desktop" 31 | "org.kde.kwrite.desktop" 32 | "neovide.desktop" 33 | "nvim.desktop" 34 | ]); 35 | userDirs.enable = true; 36 | }; 37 | 38 | programs.keepassxc = { 39 | enable = true; 40 | package = with pkgs; callPackage ../../packages/keepassxc.nix { }; 41 | settings = { 42 | Browser = { 43 | Enabled = true; 44 | BestMatchOnly = true; 45 | AlwaysAllowAccess = true; 46 | UpdateBinaryPath = false; 47 | }; 48 | GUI = { 49 | AdvancedSettings = true; 50 | ColorPasswords = true; 51 | CompactMode = true; 52 | MinimizeOnClose = true; 53 | MinimizeOnStartup = true; 54 | ShowTrayIcon = true; 55 | TrayIconAppearance = "monochrome-light"; 56 | }; 57 | PasswordGenerator = { 58 | Length = 32; 59 | SpecialChars = false; 60 | }; 61 | SSHAgent.Enabled = true; 62 | FdoSecrets.Enabled = true; 63 | }; 64 | }; 65 | # xdg.configFile."keepassxc/keepassxc.ini".source = 66 | # config.lib.file.mkOutOfStoreSymlink "${flakePath}/.config/keepassxc/keepassxc.ini"; 67 | 68 | services.copyq.enable = true; 69 | # # xdg.configFile."copyq/copyq.conf".source = 70 | # config.lib.file.mkOutOfStoreSymlink "${flakePath}/.config/copyq/copyq.conf"; 71 | } 72 | -------------------------------------------------------------------------------- /browser/userscripts/pip.user.js: -------------------------------------------------------------------------------- 1 | // stolen from https://chromewebstore.google.com/detail/pip-picture-in-picture-pl/cejddnmmppcemhgenpcacdipichjjeme script.js 2 | // still in work 3 | 4 | function findLargestPlayingVideo() { 5 | const videos = Array.from(document.querySelectorAll('video')) 6 | .filter(video => video.readyState != 0) 7 | .filter(video => video.disablePictureInPicture == false) 8 | .sort((v1, v2) => { 9 | const v1Rect = v1.getClientRects()[0]||{width:0,height:0}; 10 | const v2Rect = v2.getClientRects()[0]||{width:0,height:0}; 11 | return ((v2Rect.width * v2Rect.height) - (v1Rect.width * v1Rect.height)); 12 | }); 13 | 14 | if (videos.length === 0) { 15 | chrome.runtime.sendMessage({'method':'setInfo','info':'errornovideo'}); 16 | return; 17 | } 18 | 19 | return videos[0]; 20 | } 21 | 22 | async function requestPictureInPicture(video) { 23 | await video.requestPictureInPicture().catch(error => { 24 | // Video failed to enter Picture-in-Picture mode. 25 | chrome.runtime.sendMessage({'method':'setInfo','info':'errorenter'}); 26 | }); 27 | video.setAttribute('__pip__', true); 28 | video.addEventListener('leavepictureinpicture', event => { 29 | video.removeAttribute('__pip__'); 30 | }, { once: true }); 31 | new ResizeObserver(maybeUpdatePictureInPictureVideo).observe(video); 32 | } 33 | 34 | function maybeUpdatePictureInPictureVideo(entries, observer) { 35 | const observedVideo = entries[0].target; 36 | if (!document.querySelector('[__pip__]')) { 37 | observer.unobserve(observedVideo); 38 | return; 39 | } 40 | const video = findLargestPlayingVideo(); 41 | if (video && !video.hasAttribute('__pip__')) { 42 | observer.unobserve(observedVideo); 43 | requestPictureInPicture(video); 44 | } 45 | } 46 | 47 | (async () => { 48 | const video = findLargestPlayingVideo(); 49 | if (!video) { 50 | return; 51 | } 52 | if (video.hasAttribute('__pip__')) { 53 | document.exitPictureInPicture().catch(error => { 54 | // Video failed to exit Picture-in-Picture mode. 55 | chrome.runtime.sendMessage({'method':'setInfo','info':'errorexit'}); 56 | }); 57 | } else { 58 | await requestPictureInPicture(video); 59 | } 60 | 61 | chrome.runtime.sendMessage({'method':'setInfo','info':'done'}); 62 | })(); 63 | -------------------------------------------------------------------------------- /windows/pwsh.ps1: -------------------------------------------------------------------------------- 1 | #Requires -RunAsAdministrator 2 | Write-Host "Run as administrator:" -ForegroundColor Green 3 | Write-Host "Set-ExecutionPolicy RemoteSigned -Force" 4 | Write-Host "" 5 | 6 | Write-Host "Install scoop, to change dir:" -ForegroundColor Green 7 | Write-Host "irm get.scoop.sh -ScoopDir D:\scoop | iex" 8 | Write-Host "" 9 | scoop alias rm i | Out-Null 10 | scoop alias rm up | Out-Null 11 | scoop alias rm un | Out-Null 12 | scoop alias rm purge | Out-Null 13 | scoop alias rm upgrade | Out-Null 14 | scoop alias add purge 'scoop uninstall -p $args' 'Uninstall an app with purge' 15 | scoop alias add upgrade 'scoop update *' 'Update all apps, just like "brew" or "apt"' 16 | scoop alias add i 'scoop install $args' 'Alias to install' 17 | scoop alias add up 'scoop update $args' 'Alias to update' 18 | scoop alias add un 'scoop uninstall $args' 'Alias to uninstall' 19 | 20 | Write-Host "Updating config files..." -ForegroundColor Green 21 | .\$PSScriptRoot\..\configs\install.ps1 22 | Write-Host "cmd clink..." 23 | New-Item ~\AppData\Local\clink\ -Force -ItemType Directory | Out-Null 24 | Copy-Item $PSScriptRoot\terminal\starship.lua ~\AppData\Local\clink\ -Recurse -Force 25 | Write-Host "PowerShell and pwsh..." -ForegroundColor Green 26 | New-Item ~\Documents\WindowsPowerShell\ -Force -ItemType Directory | Out-Null 27 | New-Item ~\Documents\PowerShell\ -Force -ItemType Directory | Out-Null 28 | # https://superuser.com/a/1291446 29 | sudo New-Item -ItemType SymbolicLink -Value $PSScriptRoot\terminal\Microsoft.PowerShell_profile.ps1 -Path ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 -Force | Out-Null 30 | sudo New-Item -ItemType SymbolicLink -Value $PSScriptRoot\terminal\Microsoft.PowerShell_profile.ps1 -Path ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 -Force | Out-Null 31 | sudo New-Item -ItemType SymbolicLink -Value $PSScriptRoot\terminal\extend.ps1 -Path ~\Documents\PowerShell\extend.ps1 -Force | Out-Null 32 | Write-Host "WindowsTerminal..." 33 | sudo New-Item -ItemType SymbolicLink -Value $PSScriptRoot\terminal\settings.json -Path ~\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json -Force | Out-Null 34 | Write-Host "Winget..." 35 | sudo New-Item -ItemType SymbolicLink -Value $PSScriptRoot\winget\settings.json -Path ~\AppData\Local\Microsoft\WinGet\Settings\defaultState\settings.json -Force | Out-Null 36 | -------------------------------------------------------------------------------- /nix/packages/windows/scoop.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | fetchFromGitHub, 4 | runCommand, 5 | git, 6 | }: 7 | let 8 | 9 | scoopBuckets = [ 10 | { 11 | name = "main"; 12 | owner = "ScoopInstaller"; 13 | repo = "Main"; 14 | rev = "7439a1bd990a9d5e9fbdff9f045b6b58b2521724"; 15 | hash = "sha256-tvzDTsoZUJwdxNVMJxu49xhIsA9E5XRr/78BDyFXS2o="; 16 | } 17 | { 18 | name = "extras"; 19 | owner = "ScoopInstaller"; 20 | repo = "Extras"; 21 | rev = "32d754589df86c576bf218b796afe0e6de60a8c6"; 22 | hash = "sha256-wFfqBAzdniuHBWsi1k/fHhW6tX9lTGv/h3/kT3M4578="; 23 | } 24 | # postFetch = '' 25 | # mkdir -p $out/.git/refs/{heads,remotes} 26 | # echo ${rev} > $out/.git/refs/heads/master 27 | # echo "ref: refs/remotes/origin/master" > 28 | # ''; 29 | ]; 30 | scoopPackages = [ 31 | "main/aria2" 32 | "main/7zip" 33 | ]; 34 | 35 | # TODO: scoopPackages: scoop/cache 36 | # TODO: finish bucket .git hydration 37 | in 38 | runCommand "scoop-dir" 39 | { 40 | nativeBuildInputs = [ git ]; 41 | meta.description = ''Hydrate scoop with nix''; 42 | } 43 | '' 44 | ${lib.strings.concatStringsSep "\n" ( 45 | lib.lists.forEach scoopBuckets (bucket: '' 46 | BUCKET_DIR=$out/buckets/${bucket.name} 47 | mkdir -p "$BUCKET_DIR" 48 | cp -a ${ 49 | fetchFromGitHub { 50 | inherit (bucket) 51 | owner 52 | repo 53 | rev 54 | hash 55 | ; 56 | leaveDotGit = true; 57 | } 58 | }/. $BUCKET_DIR 59 | cd "$BUCKET_DIR" 60 | chmod +w -R .git 61 | 62 | echo -e '[core] 63 | \trepositoryformatversion = 0 64 | \tfilemode = true 65 | \tbare = false 66 | \tlogallrefupdates = true 67 | [remote "origin"] 68 | \turl = https://github.com/ScoopInstaller/${bucket.repo} 69 | \tfetch = +refs/heads/*:refs/remotes/origin/* 70 | [branch "master"] 71 | \tremote = origin 72 | \tmerge = refs/heads/master' > .git/config 73 | 74 | echo "ref: refs/heads/master" > .git/HEAD 75 | echo ${bucket.rev} > .git/refs/heads/master 76 | git reset 77 | # git branch --set-upstream-to=origin/master master 78 | 79 | cd - 80 | '') 81 | )} 82 | mkdir $out/cache 83 | '' 84 | -------------------------------------------------------------------------------- /nix/packages/openwrt/xiaomi_ax3600.nix: -------------------------------------------------------------------------------- 1 | { pkgs, inputs, ... }: 2 | #? https://openwrt.org/toh/xiaomi/ax3600 3 | #? https://openwrt.org/toh/hwdata/xiaomi/xiaomi_ax3600 4 | # Package architecture: aarch64_cortex-a53 5 | let 6 | profiles = inputs.openwrt-imagebuilder.lib.profiles { inherit pkgs; }; 7 | profile = ( 8 | profiles.identifyProfile "xiaomi_ax3600" 9 | // { 10 | # specify release 11 | # release = "24.10.4"; 12 | } 13 | ); 14 | arch = "aarch64_cortex-a53"; 15 | inherit (import ./. { }) mkAmneziaPackages; 16 | in 17 | inputs.openwrt-imagebuilder.lib.build ( 18 | profile 19 | // { 20 | # add package to include in the image, ie. packages that you don't 21 | # want to install manually later 22 | packages = [ 23 | "luci" 24 | 25 | #? terminal related 26 | "bash" 27 | "fish" 28 | "tmux" 29 | "iperf3" 30 | 31 | #? VPN related 32 | "-dnsmasq" 33 | "dnsmasq-full" 34 | "luci-app-pbr" 35 | "luci-proto-wireguard" # ? I use amneziawg instead 36 | "kmod-amneziawg" 37 | "amneziawg-tools" 38 | "luci-proto-amneziawg" 39 | 40 | #? other 41 | "luci-app-sqm" 42 | "luci-app-wol" 43 | "luci-app-ddns" 44 | ]; 45 | 46 | extraPackages = mkAmneziaPackages { 47 | inherit profile arch; 48 | }; 49 | 50 | # disabledServices = [ "dnsmasq" ]; 51 | 52 | # include files in the images. 53 | # to set UCI configuration, create a uci-defaults scripts as per 54 | # official OpenWrt ImageBuilder recommendation. 55 | #? https://openwrt.org/docs/guide-developer/uci-defaults 56 | files = 57 | pkgs.runCommand "image-files" 58 | { 59 | src = pkgs.lib.fileset.toSource { 60 | root = ./.; 61 | fileset = 62 | pkgs.lib.fileset.difference 63 | (pkgs.lib.fileset.unions [ 64 | ./etc 65 | ./root 66 | ]) 67 | ( 68 | pkgs.lib.fileset.unions [ 69 | #? uncomment line below to disable custom settings (like enabling wireless) 70 | # ./etc/uci-defaults/99-custom 71 | ] 72 | ); 73 | }; 74 | } 75 | '' 76 | mkdir -p "$out/" 77 | cp -r --no-preserve=all "$src/"* "$out/" 78 | ''; 79 | } 80 | ) 81 | -------------------------------------------------------------------------------- /nix/.config/shell/wifite.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # unused shebang 4 | #! /usr/bin/env nix-shell 5 | #! nix-shell -p iproute2 iw wifite2 aircrack-ng 6 | 7 | alias get_first_iface="\command ls /sys/class/ieee80211/*/device/net/ | cut -d' ' -f1 | head -n 1" 8 | 9 | restore_wifi() { 10 | ( 11 | iface=${1:-wlp2s0} 12 | old_region=${2:-RU} 13 | sudo airmon-ng stop "$iface"mon 14 | sudo ip link set "$iface" down 15 | sudo iw reg set $old_region 16 | sudo iw dev $iface set power_save on 17 | sudo iw dev $iface set txpower auto 18 | sudo ip link set "$iface" up 19 | ) 20 | } 21 | 22 | prepare_wifi() { # TODO WIP 23 | ( 24 | # iface_iw=phy0 25 | # ls /sys/class/ieee80211/*/device/net/* -d | sed -E 's|^.*(phy[^/]+)/.*/|\1 |' 26 | iface=${1:-$(get_first_iface)} 27 | new_region=${2:-PA} 28 | # clear # TODO WIP 29 | # stop if any 30 | sudo airmon-ng stop "$iface"mon 31 | sudo ip link set "$iface" down 32 | echo "Old region was $(iw reg get)" # TODO WIP 33 | sudo iw reg set "$new_region" 34 | echo "New region is $(iw reg get)" # TODO WIP 35 | # sudo iw phy $iface_iw reg set $new_region # TODO https://hackware.ru/?p=4125 36 | iw dev "$iface" get power_save 37 | sudo iw dev "$iface" set power_save off 38 | iw dev "$iface" get power_save 39 | sudo iw dev "$iface" set txpower fixed 30mBm # TODO WIP 40 | sudo ip link set "$iface" up 41 | iw dev 42 | sudo airmon-ng check kill 43 | sudo airmon-ng start "$iface" 44 | iw dev 45 | ) 46 | } 47 | 48 | prepare_wifite() { 49 | prepare_wifi "$1" 50 | return # TODO WIP 51 | } 52 | 53 | handshake_capture() { # TODO WIP 54 | ( 55 | iface=${1:-$(get_first_iface)} 56 | prepare_wifite "$iface" || return 1 # TODO WIP 57 | mkdir -p ~/hs 58 | sudo wifite -ab -mac --skip-crack -ic --showb --showm -i "$iface"mon -inf -p 900 --clients-only --no-wps --wpadt 30 --wpat 1200 --no-pmkid --hs-dir ~/hs 59 | restore_wifi "$iface" 60 | ) 61 | } 62 | 63 | # TODO WIP 64 | alias crack_hs="mkdir -p ~/hs && sudo wifite --crack -ic --dict ~/wordlist-probable.txt --hs-dir ~/hs" 65 | 66 | wps_attack() { # TODO WIP 67 | ( 68 | iface=${1:-wlp2s0} 69 | prepare_wifite "$iface" || return 1 # TODO WIP 70 | sudo wifite -ab -mac --skip-crack -ic --showb --showm -i "$iface"mon -inf -p 900 --wps-only --wps-timeouts 1000 71 | restore_wifi "$iface" 72 | ) 73 | } 74 | -------------------------------------------------------------------------------- /nix/home/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | config, 3 | username, 4 | flakePath, 5 | ... 6 | }: 7 | { 8 | home = { 9 | # Home Manager needs a bit of information about you and the 10 | # paths it should manage. 11 | inherit username; 12 | homeDirectory = "/home/${config.home.username}"; 13 | 14 | # This value determines the Home Manager release that your 15 | # configuration is compatible with. This helps avoid breakage 16 | # when a new Home Manager release introduces backwards 17 | # incompatible changes. 18 | # 19 | # You can update Home Manager without changing this value. See 20 | # the Home Manager release notes for a list of state version 21 | # changes in each release. 22 | stateVersion = "25.05"; 23 | 24 | # packages = import ./shared/lists/extra.nix { inherit pkgs; }; 25 | # packages = import ./shared/lists { inherit pkgs; }; 26 | 27 | #? https://wiki.nixos.org/wiki/Environment_variables 28 | sessionVariables = { 29 | # Not officially in the specification 30 | XDG_BIN_HOME = "$HOME/.local/bin"; 31 | }; 32 | sessionPath = [ 33 | "${config.home.sessionVariables.XDG_BIN_HOME}" 34 | ]; 35 | preferXdgDirectories = true; 36 | }; 37 | 38 | xdg.enable = true; 39 | 40 | # Let Home Manager install and manage itself. 41 | programs.home-manager.enable = true; 42 | 43 | programs.nh = { 44 | enable = true; 45 | flake = flakePath; 46 | }; 47 | 48 | programs.git = { 49 | enable = true; 50 | lfs.enable = true; 51 | # TODO 52 | # aliases = { 53 | # ci = "commit"; 54 | # co = "checkout"; 55 | # s = "status"; 56 | # }; 57 | settings = { 58 | user.name = "barsikus007"; 59 | user.email = "barsikus07@gmail.com"; 60 | core.editor = "code --wait"; 61 | core.autocrlf = "input"; 62 | core.ignoreCase = "false"; 63 | 64 | init.defaultBranch = "master"; 65 | 66 | push.default = "current"; 67 | 68 | pull.rebase = "true"; 69 | 70 | merge.autoStash = "true"; 71 | 72 | rebase.autoStash = "true"; 73 | 74 | gpg.format = "ssh"; 75 | }; 76 | # TODO: secrets: https://wiki.nixos.org/wiki/Git#Using_your_public_SSH_key_as_a_signing_key 77 | signing.key = "~/.ssh/id_ed25519.pub"; 78 | signing.signByDefault = true; 79 | }; 80 | programs.delta.enable = true; 81 | programs.delta.enableGitIntegration = true; 82 | } 83 | -------------------------------------------------------------------------------- /windows/scoop/PackageList.ps1: -------------------------------------------------------------------------------- 1 | $base=@" 2 | #? mitmproxy httptoolkit 3 | #? jetbrains-toolbox android-studio pycharm-professional 4 | # adb@33.0.3 5 | # adb@34.0.5 6 | adb 7 | anydesk 8 | audacity 9 | ayugram 10 | beyondcompare 11 | brave 12 | dbeaver 13 | dupeguru 14 | ffmpeg 15 | handbrake 16 | iperf3 17 | keepassxc 18 | mpv 19 | neovide 20 | nmap 21 | obs-studio 22 | powertoys 23 | # qbittorrent@4.1.9.1 24 | # qbittorrent@4.3.9 25 | qbittorrent 26 | quicklook 27 | remove-empty-directories 28 | rufus 29 | scrcpy 30 | screentogif 31 | uv 32 | ventoy 33 | vscode 34 | winscp 35 | wumgr 36 | yt-dlp 37 | "@ 38 | 39 | $laptop=@" 40 | battery-care 41 | "@ 42 | 43 | $gaming=@" 44 | #? msiafterburner steamcmd goggalaxy epic-games-launcher 45 | autoclicker 46 | cheat-engine 47 | ds4windows 48 | 49 | graalvm 50 | graalvm-oracle-jdk 51 | graalvm-oracle-17 52 | graalvm20-jdk8 53 | graalvm-oracle-21jdk 54 | prismlauncher 55 | amulet-map-editor 56 | "@ 57 | 58 | 59 | $bench=@" 60 | cpu-z 61 | crystaldiskinfo 62 | crystaldiskmark 63 | gpu-z 64 | hwinfo 65 | "@ 66 | 67 | $sort=@" 68 | #! both 69 | bind 70 | ddu 71 | gimp 72 | irfanview 73 | lessmsi 74 | touch 75 | #! laptop 76 | cuda 77 | cura 78 | firefox 79 | git-filter-repo 80 | hashcat 81 | qemu 82 | sharex 83 | sharpkeys 84 | sophiapp 85 | #! soft 86 | apktool 87 | cmake 88 | curl 89 | dismplusplus 90 | exiftool 91 | gcc 92 | jd-gui 93 | jexiftoolgui 94 | make 95 | obsidian 96 | pe-bear 97 | sysinternals 98 | tor-browser 99 | wireshark 100 | x64dbg 101 | #! new 102 | ani-cli 103 | avidemux 104 | bind 105 | blender 106 | bulk-crap-uninstaller 107 | cinny 108 | cuda 109 | cursor 110 | ddu 111 | dotnet7-sdk 112 | ds4windows 113 | element 114 | f3d 115 | ffuf 116 | git-lfs 117 | httptoolkit 118 | hxd 119 | jetbrains-toolbox 120 | lua 121 | mitmproxy 122 | mosh-client 123 | msiafterburner 124 | nbtexplorer 125 | nekoray 126 | nu 127 | ollama 128 | posh-git 129 | qbittorrent 130 | qemu 131 | qtifw 132 | reqable 133 | simplex-chat 134 | streamlink 135 | superfile 136 | syncthingtray 137 | terminal-icons 138 | universal-android-debloater 139 | uv 140 | vencord-installer 141 | wezterm 142 | winmtr 143 | winscp 144 | "@ 145 | 146 | # # UNUSED 147 | # camo-studio 148 | # pshazz 149 | 150 | # # BOT 151 | # gifsicle 152 | # imagemagick 153 | # msys2 154 | # tesseract 155 | # tesseract-languages 156 | 157 | Write-Host $base 158 | -------------------------------------------------------------------------------- /nix/.config/shell/android-utils.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | _get_android_device() { 4 | local ANDROID_DEVICE 5 | ANDROID_DEVICE=$(adb devices | tail --lines +2 | fzf | cut --fields 1) 6 | # [ -z "$ANDROID_DEVICE" ] && echo "No device selected" && return 1 7 | echo "$ANDROID_DEVICE" 8 | } 9 | 10 | adb_connect() { 11 | local ANDROID_DEVICES=( 12 | "192.168.1.7:5555" 13 | "Pixel-7-Pro.lan:5555" 14 | "192.168.1.15:5555" 15 | "OnePlus-15.lan:5555" 16 | ) 17 | local ANDROID_DEVICE 18 | ANDROID_DEVICE=$(printf "%s\n" "${ANDROID_DEVICES[@]}" | fzf) 19 | [ -z "$ANDROID_DEVICE" ] && echo "No device selected" && return 1 20 | adb connect "$ANDROID_DEVICE" 21 | } 22 | 23 | adb_disconnect() { 24 | local ANDROID_DEVICE 25 | ANDROID_DEVICE=$(_get_android_device) 26 | [ -z "$ANDROID_DEVICE" ] && echo "No device selected" && return 1 27 | adb disconnect "$ANDROID_DEVICE" 28 | } 29 | 30 | adbfs_connect() { 31 | local ANDROID_DEVICE_LINE 32 | ANDROID_DEVICE_LINE=$(adb devices -l | tail --lines +2 | fzf) 33 | [ -z "$ANDROID_DEVICE_LINE" ] && echo "No device selected" && return 1 34 | 35 | local ANDROID_DEVICE_MODEL 36 | ANDROID_DEVICE_MODEL=$(echo $ANDROID_DEVICE_LINE | sed 's/.*model:\([^ ]*\).*/\1/') 37 | 38 | local ADBFS_FOLDER="/run/media/$USER/adbfs" 39 | [ ! -d "$ADBFS_FOLDER" ] && sudo mkdir -p "$ADBFS_FOLDER" && sudo chown "$(id -u):$(id -g)" "$ADBFS_FOLDER" 40 | 41 | local ANDROID_DEVICE_FOLDER="$ADBFS_FOLDER/$ANDROID_DEVICE_MODEL" 42 | echo "Device folder $ANDROID_DEVICE_FOLDER:" 43 | ls -la "$ANDROID_DEVICE_FOLDER" 44 | 45 | echo "Unmounting..." 46 | umount "$ANDROID_DEVICE_FOLDER" 47 | mkdir -p "$ANDROID_DEVICE_FOLDER" 48 | adbfs "$ANDROID_DEVICE_FOLDER" -o "uid=$(id -u),gid=$(id -g)" 49 | yy "$ANDROID_DEVICE_FOLDER/storage/emulated/0/" 50 | } 51 | 52 | adbfs_connected() { 53 | local ADBFS_FOLDER="/run/media/$USER/adbfs" 54 | ls -1 "$ADBFS_FOLDER" 55 | } 56 | 57 | adbfs_disconnect() { 58 | local TO_UMOUNT 59 | TO_UMOUNT=$(mount | grep adbfs | fzf | cut --delimiter=" " --fields=3) 60 | [ -z "$TO_UMOUNT" ] && echo "No mount selected" && return 1 61 | pgrep --full "$TO_UMOUNT" 62 | umount "$TO_UMOUNT" 63 | } 64 | 65 | scrcpy_connect() { 66 | local ANDROID_DEVICE 67 | ANDROID_DEVICE=$(_get_android_device) 68 | [ -z "$ANDROID_DEVICE" ] && echo "No device selected" && return 1 69 | scrcpy -K --render-driver=opengles2 --no-audio --video-bit-rate=1M --serial="$ANDROID_DEVICE" "$@" 70 | } 71 | -------------------------------------------------------------------------------- /android/devices/oculus.md: -------------------------------------------------------------------------------- 1 | # [Oculus Quest 2](./README.md) 2 | 3 | ## Oculus software 4 | 5 | - PC 6 | - [Meta Quest app](https://www.meta.com/quest/setup/#:~:text=SET%2DUP-,Quest%202,-Download%20the%20Oculus) 7 | - [SideQuest](https://sidequestvr.com/download#:~:text=Show%20More-,Advanced%20Installer%20Tutorial,-SideQuest%20Official) 8 | - [OVR Metrics Tool](https://developer.oculus.com/downloads/package/ovr-metrics-tool/) 9 | - [Quest Developer Hub](https://developer.oculus.com/downloads/native-android/) 10 | - Standalone 11 | - [Launcher](https://github.com/threethan/LightningLauncher) 12 | - [Browser](https://wolvic.com/dl/) 13 | - Paid 14 | - [Virtual Desktop](https://www.vrdesktop.net) 15 | - Piracy 16 | - [qLoader](https://developer.oculus.com/downloads/native-android/) 17 | - [Rookie](https://wiki.vrpirates.club/en/home) 18 | 19 | ### Oculus games 20 | 21 | - PC 22 | - [Half-Life: Alyx](https://store.steampowered.com/app/546560/HalfLife_Alyx/) 23 | - [BONEWORKS](https://store.steampowered.com/app/823500/BONEWORKS/) 24 | - [Among Us VR](https://store.steampowered.com/app/1849900/Among_Us_VR/) 25 | - [LOW-FI](https://store.steampowered.com/app/395830/LOWFI/) 26 | - [VRChat](https://store.steampowered.com/app/438100/VRChat/) 27 | - [Beat Saber](https://store.steampowered.com/app/620980/Beat_Saber/) 28 | - Standalone 29 | - [Beat Saber](https://www.meta.com/experiences/2448060205267927/) 30 | - [BMBF](https://sidequestvr.com/app/747/bmbf) 31 | - [Backup](https://bsmg.wiki/quest-modding.html#backup-save-data-using-sidequest) 32 | - [Mods](https://computerelite.github.io/tools/Beat_Saber/questmods.html) 33 | - [Waltz of the Wizard](https://www.meta.com/experiences/2280285932034855/) 34 | 35 | ## Guides 36 | 37 | - [Link Setup](https://4pda.to/forum/index.php?showtopic=1025596&view=findpost&p=106966059) 38 | - Fix oculus laptop GPU shitcoding 39 | - [Power Safe](https://4pda.to/forum/index.php?showtopic=1004805&view=findpost&p=116402181) 40 | - [Disable](https://4pda.to/forum/index.php?showtopic=1004805&view=findpost&p=113255445) 41 | - [Perfomance](https://4pda.to/forum/index.php?showtopic=1025596&view=findpost&p=107113365) 42 | 43 | ## 360 video 44 | 45 | - 46 | - 47 | 48 | ## [LIV](https://www.liv.tv/mixedreality) 49 | 50 | - Latest mobile app is archived, PM me if you need it 51 | - TODO DroidCam + SteamVR 52 | 53 | ## TODO 54 | 55 | - loWvr 56 | -------------------------------------------------------------------------------- /windows/installOnWin10LTSC.ps1: -------------------------------------------------------------------------------- 1 | # irm = Invoke-RestMethod; iex = Invoke-Expression 2 | Write-Host "Hint: to apply tweaks, run:" -ForegroundColor Gray 3 | Write-Host "sudo pwsh.exe -Command 'irm https://raw.githubusercontent.com/barsikus007/config/refs/heads/master/windows/99Tweaks.ps1 | iex'" -ForegroundColor Gray 4 | Write-Host 5 | Write-Host "disable UAC prompts" -ForegroundColor Green 6 | Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 0 7 | Write-Host 8 | Write-Host "scoop installation..." -ForegroundColor Green 9 | powershell.exe -Command 'Invoke-RestMethod https://get.scoop.sh | Invoke-Expression' 10 | $env:Path += ";C:\Program Files\PowerShell\7\;$HOME\scoop\shims" 11 | 12 | Write-Host "scoop inital packages installation..." -ForegroundColor Green 13 | Invoke-RestMethod https://raw.githubusercontent.com/barsikus007/config/refs/heads/master/windows/scoop/00Bootstrap.ps1 | Invoke-Expression 14 | # TODO: is needed?: dotnet-sdk 15 | Write-Host "System packages installation..." -ForegroundColor Green 16 | Invoke-RestMethod https://raw.githubusercontent.com/barsikus007/config/refs/heads/master/windows/scoop/01System.ps1 | Invoke-Expression 17 | 18 | 19 | Write-Host "Shell packages installation..." -ForegroundColor Green 20 | pwsh.exe -Command 'Invoke-RestMethod https://raw.githubusercontent.com/barsikus007/config/refs/heads/master/windows/scoop/10Shell.ps1 | Invoke-Expression' 21 | pwsh.exe -Command 'Invoke-RestMethod https://raw.githubusercontent.com/barsikus007/config/refs/heads/master/windows/scoop/11ShellHeavy.ps1 | Invoke-Expression' 22 | 23 | Write-Host "GUI packages installation..." -ForegroundColor Green 24 | pwsh.exe -Command 'Invoke-RestMethod https://raw.githubusercontent.com/barsikus007/config/refs/heads/master/windows/scoop/20SoftHighPriority.ps1 | Invoke-Expression' 25 | 26 | 27 | Write-Host "Notes from scoop packages" -ForegroundColor Green 28 | # TODO: parse them programmatically 29 | $SCOOP_HOME = $(If (Test-Path env:SCOOP) { $env:SCOOP } Else { ($env:GIT_INSTALL_ROOT -split "scoop")[0]+"scoop" }) 30 | reg import "$SCOOP_HOME\apps\7zip\current\install-context.reg" 31 | reg import "$SCOOP_HOME\apps\everything\current\install-context.reg" 32 | reg import "$SCOOP_HOME\apps\notepadplusplus\current\install-context.reg" 33 | 34 | 35 | winget install -e --id Microsoft.Edge -h --force 36 | 37 | 38 | pwsh.exe -Command 'cd && git clone https://github.com/barsikus007/config --depth 1 && cd ~\config\ && sudo .\windows\pwsh.ps1 && cd -' 39 | -------------------------------------------------------------------------------- /nix/packages/openwrt/default.nix: -------------------------------------------------------------------------------- 1 | { }: 2 | rec { 3 | amneziaPackages = { 4 | #? nix hash convert sha256:hash 5 | kmod-amneziawg = { 6 | hash."24.10.3_aarch64_cortex-a53_qualcommax_ipq807x" = 7 | "sha256-LDKsMEnc2XA6SWGqT7asJxt5+oi4mSFvYFJFhRoV3jA="; 8 | hash."24.10.4_aarch64_cortex-a53_qualcommax_ipq807x" = 9 | "sha256-s/47qvaWvs7ldfgHSLWEYQnGVntPemUGQCzh4OKApTg="; 10 | hash."24.10.3_mipsel_24kc_ramips_mt76x8" = "sha256-1OKtFVRRXAqcSl8PMIdKETOpB8H3ogKrPBGTqbA7yHs="; 11 | depends = [ 12 | "kernel" 13 | "kmod-udptunnel4" 14 | "kmod-udptunnel6" 15 | "kmod-crypto-lib-chacha20poly1305" 16 | "kmod-crypto-lib-curve25519" 17 | ]; 18 | }; 19 | amneziawg-tools = { 20 | hash."24.10.3_aarch64_cortex-a53_qualcommax_ipq807x" = 21 | "sha256-hqGD4ejE3BI51VaI/dclPYBcKfA7/aD0kUHAnMATLX4="; 22 | hash."24.10.4_aarch64_cortex-a53_qualcommax_ipq807x" = 23 | "sha256-gTSG0gXDpi4eAPaO3XZt/L2VxoDeamEcL5XKMwUfKIw="; 24 | hash."24.10.3_mipsel_24kc_ramips_mt76x8" = "sha256-AIFGr8bCmRlccVDyxmIiRC54BzIYucfP1FXaHTER6iA="; 25 | depends = [ 26 | "libc" 27 | "kmod-amneziawg" 28 | ]; 29 | }; 30 | luci-proto-amneziawg = { 31 | # arch independent? 32 | hash."24.10.3_aarch64_cortex-a53_qualcommax_ipq807x" = 33 | "sha256-sETVdjrRawl7OEF/xAp3JAbJXX8eSK1s0CQPLtw1q9Q="; 34 | hash."24.10.4_aarch64_cortex-a53_qualcommax_ipq807x" = 35 | "sha256-ARBo/xYe9gtoIfrEwbaRGUor3IKrO8uFP/9DAd8cqOg="; 36 | hash."24.10.3_mipsel_24kc_ramips_mt76x8" = "sha256-sETVdjrRawl7OEF/xAp3JAbJXX8eSK1s0CQPLtw1q9Q="; 37 | depends = [ 38 | "libc" 39 | "amneziawg-tools" 40 | "ucode" 41 | "luci-lib-uqr" 42 | "resolveip" 43 | ]; 44 | }; 45 | }; 46 | 47 | mkAmneziaPackages = 48 | { 49 | profile, 50 | arch, 51 | #? https://openwrt.org/toh/hwdata//_ 52 | }: 53 | let 54 | release_string = "${profile.release}_${arch}_${profile.target}_${profile.variant}"; 55 | in 56 | builtins.mapAttrs (name: amneziaPkg: rec { 57 | inherit (amneziaPkg) depends; 58 | type = "real"; 59 | filename = "${name}_v${release_string}.ipk"; 60 | file = builtins.fetchurl { 61 | url = "https://github.com/Slava-Shchipunov/awg-openwrt/releases/download/v${profile.release}/${filename}"; 62 | sha256 = amneziaPkg.hash.${release_string}; 63 | }; 64 | }) amneziaPackages; 65 | } 66 | -------------------------------------------------------------------------------- /nix/packages/windows/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | callPackage, 4 | runCommand, 5 | xorriso, 6 | }: 7 | #? alternatives: 8 | # https://git.m-labs.hk/M-Labs/wfvm 9 | # https://github.com/MatthewCroughan/NixThePlanet 10 | # https://git.stupid.fish/teidesu/nixfiles/src/branch/master/lib/windows 11 | let 12 | unattend = callPackage ./unattend.nix { }; 13 | 14 | additionalVMSetupPs1 = ./AdditionalVMSetup.ps1; 15 | massgrave = builtins.fetchurl { 16 | name = "MAS_AIO.cmd"; 17 | url = "https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/MAS_AIO.cmd&download=true"; 18 | sha256 = "sha256-Gu7PV5yWZZf+/ay5YWoOwBtDOKuTOr/8iGd2FgnmtsQ=="; 19 | }; 20 | 21 | openSshServerPackage = builtins.fetchurl { 22 | url = "https://github.com/PowerShell/Win32-OpenSSH/releases/download/10.0.0.0p2-Preview/OpenSSH-Win64.zip"; 23 | sha256 = "sha256-I/UPNFjExdCxIhfGpd394BNyEKMPqHDpiymCf3tDq6U="; 24 | }; 25 | authorizedKeys = [ 26 | (lib.strings.removeSuffix "\n" ( 27 | builtins.readFile ( 28 | builtins.fetchurl { 29 | url = "https://github.com/barsikus007.keys"; 30 | sha256 = "sha256-Tnf/WxeYOikI9i5l4e0ABDk33I5z04BJFApJpUplNi0="; 31 | } 32 | ) 33 | )) 34 | ]; 35 | 36 | # scoop = callPackage ./scoop.nix { }; 37 | # mkdir -p $out/\$OEM\$/\$1/Users/Default 38 | # cp -r ${scoop} $out/\$OEM\$/\$1/Users/Default/scoop 39 | 40 | # TODO: & ([ScriptBlock]::Create((irm https://get.activated.win))) /Z-Windows 41 | # TODO: https://www.reddit.com/r/techsupport/comments/ehgbmu/windows_10_oemcustomizations/ 42 | isoDir = runCommand "iso-content" { } '' 43 | mkdir -p $out 44 | cp ${unattend} $out/autounattend.xml 45 | 46 | mkdir -p $out/\$OEM\$/\$\$/Setup/Scripts 47 | cp ${additionalVMSetupPs1} $out/\$OEM\$/\$\$/Setup/Scripts/AdditionalVMSetup.ps1 48 | 49 | mkdir -p $out/\$OEM\$/\$\$/Temp 50 | cp ${massgrave} $out/\$OEM\$/\$\$/Setup/Scripts/MAS_AIO.cmd 51 | cp ${openSshServerPackage} $out/\$OEM\$/\$\$/Temp/OpenSSH-Win64.zip 52 | 53 | mkdir -p $out/\$OEM\$/\$1/ProgramData/ssh 54 | echo "${lib.strings.concatStringsSep "\n" authorizedKeys}" > $out/\$OEM\$/\$1/ProgramData/ssh/administrators_authorized_keys 55 | ''; 56 | in 57 | runCommand "unattend-win10-iot-ltsc-vrt.iso" 58 | { 59 | nativeBuildInputs = [ xorriso ]; 60 | } 61 | '' 62 | xorriso -as mkisofs \ 63 | -V UNATTEND \ 64 | -rJ -o $out \ 65 | ${isoDir} 66 | '' 67 | -------------------------------------------------------------------------------- /nix/packages/openwrt/tplink_archer-c50-v4.nix: -------------------------------------------------------------------------------- 1 | { pkgs, inputs, ... }: 2 | #? https://openwrt.org/toh/tp-link/archer_a5_v5 3 | #? https://openwrt.org/toh/tp-link/archer-c50 4 | #? https://openwrt.org/toh/hwdata/tp-link/tp-link_archer_a5_v5 5 | #? https://openwrt.org/toh/hwdata/tp-link/tp-link_archer_c50_v4 6 | # Package architecture: mipsel_24kc 7 | let 8 | profiles = inputs.openwrt-imagebuilder.lib.profiles { inherit pkgs; }; 9 | profile = ( 10 | profiles.identifyProfile "tplink_archer-c50-v4" 11 | // { 12 | # specify release 13 | release = "24.10.3"; 14 | } 15 | ); 16 | arch = "mipsel_24kc"; 17 | inherit (import ./. { }) mkAmneziaPackages; 18 | in 19 | inputs.openwrt-imagebuilder.lib.build ( 20 | profile 21 | // { 22 | # add package to include in the image, ie. packages that you don't 23 | # want to install manually later 24 | packages = [ 25 | #? terminal related 26 | "bash" 27 | # "fish" 28 | "tmux" 29 | "iperf3" 30 | 31 | #? VPN related 32 | "-dnsmasq" 33 | "dnsmasq-full" 34 | "luci-app-pbr" 35 | # "luci-proto-wireguard" # ? I use amneziawg instead 36 | "kmod-amneziawg" 37 | "amneziawg-tools" 38 | "luci-proto-amneziawg" 39 | 40 | #? other 41 | "luci-app-sqm" 42 | "luci-app-wol" 43 | "luci-app-ddns" 44 | ]; 45 | 46 | extraPackages = mkAmneziaPackages { 47 | inherit profile arch; 48 | }; 49 | 50 | # disabledServices = [ "dnsmasq" ]; 51 | 52 | # include files in the images. 53 | # to set UCI configuration, create a uci-defaults scripts as per 54 | # official OpenWrt ImageBuilder recommendation. 55 | #? https://openwrt.org/docs/guide-developer/uci-defaults 56 | files = 57 | pkgs.runCommand "image-files" 58 | { 59 | src = pkgs.lib.fileset.toSource { 60 | root = ./.; 61 | fileset = 62 | pkgs.lib.fileset.difference 63 | (pkgs.lib.fileset.unions [ 64 | ./etc 65 | ./root 66 | ]) 67 | ( 68 | pkgs.lib.fileset.unions [ 69 | #? uncomment line below to disable custom settings (like enabling wireless) 70 | # ./etc/uci-defaults/99-custom 71 | ./root/.profile 72 | ] 73 | ); 74 | }; 75 | } 76 | '' 77 | mkdir -p "$out/" 78 | cp -r --no-preserve=all "$src/"* "$out/" 79 | ''; 80 | } 81 | ) 82 | -------------------------------------------------------------------------------- /nix/.config/shell/g14.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | demo_download() { 4 | # TODO make check if files exits 5 | ( 6 | VIDEO_FOLDER=~/.config/rog 7 | mkdir -p $VIDEO_FOLDER 8 | VIDEO_ID=UkgK8eUdpAo 9 | VIDEO_NAME=bad-apple 10 | yt-dlp $VIDEO_ID -o - | ffmpeg -i - -filter_complex "[0:v]fps=30,scale=66:-1,setpts=0.645*PTS[v]" -map '[v]' -loop 0 $VIDEO_FOLDER/$VIDEO_NAME.gif $VIDEO_FOLDER/$VIDEO_NAME.mp3 -y 11 | ) 12 | } 13 | 14 | 15 | # TODO split em 16 | #? ROG G14 specific 17 | # TODO deps: tmux asusctl sox(play) 18 | #! https://gitlab.com/asus-linux/asusctl/-/issues/530#note_2101255275 19 | alias animeclr='asusctl anime -E false > /dev/null' 20 | #! alias noanime='systemctl --user stop asusd-user && animeclr' 21 | alias noanime='tmux kill-session -t anime 2> /dev/null; animeclr' 22 | #! alias yesanime='systemctl --user start asusd-user' 23 | alias yesanime='tmux new -s anime -d "asusctl anime gif -p ~/.config/rog/bad-apple.gif"' 24 | alias anime='animeclr && yesanime' 25 | alias demosplash='asusctl anime pixel-image -p ~/.config/rog/bad-apple.png' 26 | alias nodemo='tmux kill-session -t sound 2> /dev/null; noanime' 27 | alias demo='nodemo && anime && sleep 0.5 && tmux new -s sound -d "play ~/.config/rog/bad-apple.mp3 repeat -"' 28 | demotoggle() { 29 | # demo toggle function (for dedicated key) 30 | ( 31 | DEMO_FILE=~/.config/.is-demo-working 32 | if [ -f "$DEMO_FILE" ]; then 33 | nodemo && rm "$DEMO_FILE" 34 | else 35 | demo && touch "$DEMO_FILE" 36 | fi 37 | ) 38 | } 39 | 40 | #? asus general 41 | fan() { 42 | # fan switch function (for Fn+F5 key) 43 | ( 44 | asusctl profile -n 45 | FAN_STATE=$(asusctl profile -p | tail -n +2) 46 | FAN_STATE_LOWER=$(echo "$FAN_STATE" | awk '{print $4}' | tr '[:upper:]' '[:lower:]') 47 | [ "$FAN_STATE_LOWER" = quiet ] && FAN_STATE_LOWER=power-saver 48 | PREV_ID=$(cat ~/.config/.prev-fan-notification-id) 49 | [ -z "$PREV_ID" ] && PREV_ID=0 50 | notify-send --hint int:transient:1 "Power Profile" "$FAN_STATE" -t 1 -i power-profile-"$FAN_STATE_LOWER" -p -r "$PREV_ID" > ~/.config/.prev-fan-notification-id 51 | ) 52 | } 53 | 54 | #? laptop general 55 | boost() { 56 | # https://www.reddit.com/r/linuxmint/comments/12n8qfe/comment/jge3kys/ 57 | if grep -q 0 /sys/devices/system/cpu/cpufreq/boost; then 58 | echo "1" | sudo tee /sys/devices/system/cpu/cpufreq/boost 59 | echo "CPU boost enabled" 60 | else 61 | echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost 62 | echo "CPU boost disabled" 63 | fi 64 | } 65 | 66 | battery() { 67 | awk '{print $1*10^-6 " W"}' /sys/class/power_supply/BAT0/power_now 68 | } 69 | 70 | power_draw() { 71 | watch -n 5 -x zsh -c battery 72 | } 73 | -------------------------------------------------------------------------------- /browser/userscripts/YouTubeFix.user.js: -------------------------------------------------------------------------------- 1 | // ==UserScript== 2 | // @name YouTube Fix 3 | // @namespace https://github.com/barsikus007/ 4 | // @version 2.1.0 5 | // @author XpucT & AngusWR & barsikus007 6 | // @description Force focus and scroll to player when mouse enters it & 'Video paused. Continue watching?' auto confirmer 7 | // @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com 8 | // @downloadURL https://raw.githubusercontent.com/barsikus007/config/master/browser/userscripts/YouTubeFix.user.js 9 | // @match *://*.youtube.com/* 10 | // ==/UserScript== 11 | 12 | 'use strict'; 13 | 14 | //! Credits: https://boosty.to/xpuct 15 | const player = document.querySelector('video.video-stream'); 16 | if (player) { 17 | player.onmouseenter = () => { 18 | player.focus(); 19 | scrollTo({ top: 0, behavior: 'smooth' }); 20 | console.log('YouTube Fix:', 'Player focused and scrolled to'); 21 | }; 22 | } 23 | 24 | //! Credits: https://greasyfork.org/en/scripts/377506-youtube-video-paused-continue-watching-auto-confirmer 25 | const continueTexts = [ 26 | 'Video paused. Continue watching?', 27 | 'Воспроизведение приостановлено. Продолжить?', 28 | ]; 29 | 30 | const selectors = { 31 | //? youtube.com 32 | '.line-text.style-scope.yt-confirm-dialog-renderer': { 33 | popupTexts: continueTexts, 34 | confirmSelector: '#confirm-button', 35 | }, 36 | //? music.youtube.com 37 | '.text.style-scope.ytmusic-you-there-renderer': { 38 | popupTexts: continueTexts, 39 | confirmSelector: '[dialog-confirm]', 40 | }, 41 | //? https://music.youtube.com/watch?v=eBo3LU7Do9o 42 | 'div#info.style-scope.yt-player-error-message-renderer': { 43 | popupTexts: [ 44 | 'The following content may contain suicide or self-harm topics.', 45 | // TODO: ru 46 | ], 47 | // 'I understand and wish to proceed', 48 | confirmSelector: 49 | '#button button[aria-label="I understand and wish to proceed"]', 50 | }, 51 | }; 52 | 53 | setInterval(() => { 54 | /** @type HTMLCollectionOf **/ 55 | let popups; 56 | /** @type selectors[keyof selectors] **/ 57 | let selector; 58 | Object.keys(selectors).forEach((popupTextSelector) => { 59 | popups = document.querySelectorAll(popupTextSelector); 60 | if (!popups.length) return; 61 | selector = selectors[popupTextSelector]; 62 | }); 63 | if (!selector) return; 64 | [...popups].forEach((popup) => { 65 | const { popupTexts, confirmSelector } = selector; 66 | if (!popupTexts.some((popupText) => popup.innerText.includes(popupText))) 67 | return; 68 | popup.querySelector(confirmSelector).click(); 69 | // popupNode.remove(); 70 | console.log('YouTube Fix:', 'Confirmed in', popup.innerText); 71 | }); 72 | }, 250); 73 | -------------------------------------------------------------------------------- /nix/home/gui/rofi.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | config, 4 | lib, 5 | ... 6 | }: 7 | #! https://github.com/svenstaro/rofi-calc/issues/33 8 | { 9 | services.cliphist = { 10 | enable = true; 11 | #! https://github.com/bugaevc/wl-clipboard/issues/268 12 | #! https://github.com/YaLTeR/wl-clipboard-rs/issues/5 13 | clipboardPackage = 14 | with pkgs; 15 | wl-clipboard.overrideAttrs { 16 | version = "2.2.1-git"; 17 | 18 | src = fetchFromGitHub { 19 | owner = "bugaevc"; 20 | repo = "wl-clipboard"; 21 | rev = "e8082035dafe0241739d7f7d16f7ecfd2ce06172"; 22 | hash = "sha256-sR/P+urw3LwAxwjckJP3tFeUfg5Axni+Z+F3mcEqznw="; 23 | }; 24 | }; 25 | }; 26 | programs.rofi = { 27 | enable = true; 28 | plugins = with pkgs; [ 29 | rofi-calc 30 | rofi-file-browser 31 | rofi-emoji 32 | ]; 33 | # pass 34 | theme = 35 | let 36 | # Use `mkLiteral` for string-like values that should show without 37 | # quotes, e.g.: 38 | # { 39 | # foo = "abc"; => foo: "abc"; 40 | # bar = mkLiteral "abc"; => bar: abc; 41 | # }; 42 | inherit (config.lib.formats.rasi) mkLiteral; 43 | in 44 | { 45 | "*" = { 46 | foreground-color = mkLiteral "rgba ( 250, 251, 252, 100 % )"; 47 | width = 512; 48 | }; 49 | "window" = { 50 | border = 8; 51 | }; 52 | "#inputbar" = { 53 | children = map mkLiteral [ 54 | "prompt" 55 | "entry" 56 | ]; 57 | }; 58 | 59 | "#textbox-prompt-colon" = { 60 | expand = false; 61 | str = ":"; 62 | margin = mkLiteral "0px 0.3em 0em 0em"; 63 | text-color = mkLiteral "@foreground-color"; 64 | }; 65 | }; 66 | }; 67 | programs.plasma = lib.mkIf config.programs.plasma.enable { 68 | hotkeys.commands."rofi" = { 69 | name = "chuvak eto rofis"; 70 | key = "Ctrl+Alt+Space"; 71 | # TODO https://github.com/svenstaro/rofi-calc/issues/33 72 | command = "rofi -show combi -show-icons"; 73 | }; 74 | #! no other way vi klipper https://bugs.kde.org/show_bug.cgi?id=427214 75 | # TODO disable klipper 76 | # TODO pins https://github.com/sentriz/cliphist/issues/23 77 | # TODO css big images 78 | # TODO css split text 79 | # TODO cancel on esc 80 | # TODO appear under cursor or better - above focus 81 | hotkeys.commands."rofi-cb" = { 82 | name = "chuvak eto rofis-cb"; 83 | key = "Ctrl+Meta+V"; 84 | #? https://github.com/sentriz/cliphist/issues/111 85 | command = "zsh -c \"rofi -modi clipboard:cliphist-rofi-img -show clipboard -show-icons && ${pkgs.ydotool} key 29:1 47:1 47:0 29:0\""; 86 | }; 87 | }; 88 | } 89 | -------------------------------------------------------------------------------- /nix/packages/windows/unattend.nix: -------------------------------------------------------------------------------- 1 | { runCommand }: 2 | let 3 | generatedXml = builtins.fetchurl { 4 | name = "raw.autounattend.xml"; 5 | # echo $url | sed 's|=|" = "|g' | sed 's|&|";\n"|g' 6 | url = "https://schneegans.de/windows/unattend-generator/view/?LanguageMode=Unattended&UILanguage=en-US&Locale=en-US&Keyboard=00000409&UseKeyboard2=true&Locale2=ru-RU&Keyboard2=00000419&GeoLocation=203&ProcessorArchitecture=amd64&BypassRequirementsCheck=true&UseConfigurationSet=true&ComputerNameMode=Custom&ComputerName=NIXOS-WIN10-VRT&CompactOsMode=Default&TimeZoneMode=Implicit&PartitionMode=Unattended&PartitionLayout=GPT&EspSize=300&RecoveryMode=None&DiskAssertionMode=Skip&WindowsEditionMode=Custom&ProductKey=QPM6N-7J2WJ-P88HH-P3YRH-YY74H&InstallFromMode=Automatic&PEMode=Default&UserAccountMode=Unattended&AccountName0=Admin&AccountDisplayName0=&AccountPassword0=&AccountGroup0=Administrators&AutoLogonMode=Own&PasswordExpirationMode=Unlimited&LockoutMode=Default&HideFiles=HiddenSystem&ShowFileExtensions=true&LaunchToThisPC=true&ShowEndTask=true&TaskbarSearch=Hide&TaskbarIconsMode=Default&DisableWidgets=true&HideTaskViewButton=true&ShowAllTrayIcons=true&DisableBingResults=true&StartTilesMode=Empty&StartPinsMode=Default&DisableDefender=true&DisableSmartScreen=true&EnableLongPaths=true&DeleteJunctions=true&HideEdgeFre=true&DisableEdgeStartupBoost=true&DisablePointerPrecision=true&EffectsMode=Default&DesktopIconsMode=Default&StartFoldersMode=Default&WifiMode=Skip&ExpressSettings=DisableAll&LockKeysMode=Skip&StickyKeysMode=Default&ColorMode=Default&WallpaperMode=Default&LockScreenMode=Default&FirstLogonScript0=Get-Content+-LiteralPath+%27C%3A%5CWindows%5CSetup%5CScripts%5CAdditionalVMSetup.ps1%27+-Raw+%7C+Invoke-Expression%3B&FirstLogonScriptType0=Ps1&WdacMode=Skip"; 7 | # remove `view/` from link above to edit or change to `iso/` to download iso packed file 8 | sha256 = "sha256-VHqZJup0wJx59m6zIsjhwHwJpcbM6Ok2QN5kZPBn3xg="; 9 | }; 10 | in 11 | let 12 | extraFragment = builtins.toFile "extra.xml" '' 13 | 14 | 19 | 20 | 21 | 1 22 | powershell.exe -noprofile -ExecutionPolicy unrestricted C:\Windows\Setup\Scripts\InstallRequirements.ps1 23 | 24 | 25 | 26 | 27 | ''; 28 | in 29 | runCommand "autounattend.xml" { } "cp ${generatedXml} $out" 30 | # runCommand "autounattend.xml" { } '' 31 | # ${yq-go}/bin/yq eval '.unattend.settings += [ load("${extraFragment}") ]' "${generatedXml}" > $out 32 | # '' 33 | -------------------------------------------------------------------------------- /nix/hosts/ROG14/hardware-configuration.nix: -------------------------------------------------------------------------------- 1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 | # and may be overwritten by future invocations. Please make changes 3 | # to /etc/nixos/configuration.nix instead. 4 | { 5 | config, 6 | lib, 7 | modulesPath, 8 | ... 9 | }: 10 | 11 | { 12 | imports = [ 13 | (modulesPath + "/installer/scan/not-detected.nix") 14 | ]; 15 | 16 | boot.initrd.availableKernelModules = [ 17 | "xhci_pci" 18 | "nvme" 19 | "ahci" 20 | "usbhid" 21 | "usb_storage" 22 | "sd_mod" 23 | ]; 24 | boot.initrd.kernelModules = [ ]; 25 | boot.kernelModules = [ "kvm-amd" ]; 26 | boot.extraModulePackages = [ ]; 27 | 28 | fileSystems."/" = { 29 | device = "/dev/disk/by-uuid/afb30336-18f3-4359-bebb-39c51e8f7b45"; 30 | fsType = "btrfs"; 31 | }; 32 | 33 | fileSystems."/boot" = { 34 | device = "/dev/disk/by-uuid/5099-6DA0"; 35 | fsType = "vfat"; 36 | options = [ 37 | "fmask=0077" 38 | "dmask=0077" 39 | ]; 40 | }; 41 | 42 | fileSystems."/run/media/ogurez/Data" = { 43 | # device = "/dev/disk/by-uuid/01DC4611808524F0"; 44 | label = "Data"; 45 | fsType = "ntfs-3g"; 46 | options = [ 47 | "rw" 48 | "uid=1000" 49 | "gid=100" 50 | ]; 51 | }; 52 | fileSystems."/run/media/ogurez/System" = { 53 | # device = "/dev/disk/by-uuid/01DC45437F7A9E60"; 54 | label = "System"; 55 | fsType = "ntfs-3g"; 56 | options = [ 57 | "rw" 58 | "uid=1000" 59 | "gid=100" 60 | ]; 61 | }; 62 | #? https://wiki.nixos.org/wiki/Samba#CIFS_mount_configuration 63 | fileSystems."/run/media/ogurez/NAS" = { 64 | # device = "//admin.lan/storage"; 65 | device = "//192.168.1.4/storage"; 66 | fsType = "cifs"; 67 | options = 68 | let 69 | # this line prevents hanging on network split 70 | automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; 71 | in 72 | [ 73 | "${automount_opts},credentials=/etc/nixos/smb-secrets" 74 | "rw" 75 | "uid=1000" 76 | "gid=100" 77 | 78 | "noserverino" 79 | ]; 80 | }; 81 | 82 | swapDevices = [ ]; 83 | 84 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 85 | # (the default) this is the recommended approach. When using systemd-networkd it's 86 | # still possible to use this option, but it's recommended to use it in conjunction 87 | # with explicit per-interface declarations with `networking.interfaces..useDHCP`. 88 | networking.useDHCP = lib.mkDefault true; 89 | # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; 90 | 91 | nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 92 | hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 93 | } 94 | -------------------------------------------------------------------------------- /nix/hosts/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | inputs, 4 | username, 5 | flakePath, 6 | specialArgs, 7 | ... 8 | }: 9 | { 10 | environment.systemPackages = with pkgs; [ 11 | home-manager 12 | ]; 13 | 14 | environment.variables = rec { 15 | EDITOR = "nvim"; 16 | VISUAL = EDITOR; 17 | }; 18 | 19 | hardware.ksm.enable = true; 20 | 21 | # Set your time zone. 22 | time.timeZone = "Europe/Moscow"; 23 | 24 | # Select internationalisation properties. 25 | i18n.defaultLocale = "C.UTF-8"; 26 | i18n.extraLocaleSettings = { 27 | # LC_ALL = "C.UTF-8"; # This overrides all other LC_* settings. 28 | LC_CTYPE = "en_US.UTF-8"; 29 | LC_ADDRESS = "ru_RU.UTF-8"; 30 | LC_MEASUREMENT = "ru_RU.UTF-8"; 31 | LC_MESSAGES = "en_US.UTF-8"; 32 | LC_MONETARY = "ru_RU.UTF-8"; 33 | LC_NAME = "ru_RU.UTF-8"; 34 | LC_NUMERIC = "en_US.UTF-8"; 35 | LC_PAPER = "ru_RU.UTF-8"; 36 | LC_TELEPHONE = "ru_RU.UTF-8"; 37 | LC_TIME = "en_GB.UTF-8"; 38 | LC_COLLATE = "en_US.UTF-8"; 39 | }; 40 | 41 | fonts.packages = with pkgs; [ 42 | cascadia-code 43 | ]; 44 | fonts.fontconfig.defaultFonts.monospace = [ 45 | "Cascadia Code NF" 46 | ]; 47 | 48 | #? https://nix-community.github.io/NixOS-WSL/how-to/vscode.html 49 | # and other stuff 50 | programs.nix-ld.enable = true; 51 | 52 | home-manager.useGlobalPkgs = true; 53 | home-manager.useUserPackages = true; 54 | home-manager.extraSpecialArgs = specialArgs; 55 | home-manager.backupFileExtension = "hmbackup"; 56 | #? fd -H hmbackup 57 | #? fd -H hmbackup | xargs rm 58 | 59 | # Define a user account. Don't forget to set a password with ‘passwd’. 60 | users.users.${username} = { 61 | isNormalUser = true; 62 | extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. 63 | # extraGroups = [ "wheel" "networkmanager" "docker" ]; 64 | # hashedPassword = "hashedPassword"; 65 | openssh.authorizedKeys.keys = [ 66 | (pkgs.lib.strings.removeSuffix "\n" ( 67 | builtins.readFile ( 68 | builtins.fetchurl { 69 | url = "https://github.com/barsikus007.keys"; 70 | sha256 = "sha256-Tnf/WxeYOikI9i5l4e0ABDk33I5z04BJFApJpUplNi0="; 71 | } 72 | ) 73 | )) 74 | ]; 75 | }; 76 | nix.settings.trusted-users = [ username ]; 77 | 78 | users.defaultUserShell = pkgs.zsh; 79 | programs.zsh.enable = true; 80 | programs.zsh.histSize = 100000; 81 | 82 | programs.nh = { 83 | enable = true; 84 | clean.enable = true; 85 | clean.dates = "daily"; 86 | clean.extraArgs = "--keep 5 --keep-since 4d"; 87 | flake = flakePath; 88 | }; 89 | imports = [ 90 | inputs.home-manager.nixosModules.home-manager 91 | ../shared/nix.nix 92 | # ../modules/shell/fish.nix 93 | ]; 94 | 95 | programs.appimage = { 96 | enable = true; 97 | binfmt = true; 98 | }; 99 | } 100 | -------------------------------------------------------------------------------- /configs/.config/shell/aliases.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # https://askubuntu.com/a/22043 4 | # https://superuser.com/a/1655578 5 | alias sudo='sudo env PATH=$PATH ' 6 | # alias sudo='sudo -E env PATH=$PATH ' 7 | alias xargs='xargs ' 8 | 9 | # base 10 | alias grp='grep -Fin -C 7' 11 | alias c=clear 12 | alias h=history 13 | alias hf='h | grp' 14 | alias sshe='editor ~/.ssh/config' 15 | alias nv='editor $(fzf)' 16 | alias nvf='editor $(find "/" | fzf)' 17 | # shellcheck disable=SC2142 18 | alias nvs='editor $(rg -n . | fzf | awk -F: '\''{print "+"$2,$1}'\'')' 19 | alias 1ip='wget -qO - icanhazip.com' 20 | alias 2ip='curl 2ip.ru' 21 | 22 | # package managers and updaters 23 | # TODO u functions which will resolve all 24 | # TODO pacman color=auto ? 25 | alias i='sudo apt install' 26 | alias ii='sudo nala install' 27 | alias uu='sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean' 28 | alias uuu='sudo nala update && sudo nala upgrade -y && sudo nala autoremove -y && sudo nala clean' 29 | alias u=uu 30 | alias pacman='pacman --color=always' 31 | alias cu='cd ~/config/ && git pull && ./configs/install.sh && cd -' 32 | 33 | # ls 34 | alias ezal='eza -F -bghM --smart-group --group-directories-first --color=auto --color-scale --icons=always --no-quotes --hyperlink' 35 | alias ezall='eza -F -labghM --smart-group --group-directories-first --color=auto --color-scale --icons=always --no-quotes --hyperlink' 36 | alias exal='exa -laFbgh --group-directories-first --color=auto --icons --color-scale' 37 | alias exall='exa -laFbgh --group-directories-first --color=auto --icons --color-scale' 38 | alias ls='ls --group-directories-first --color=auto --hyperlink' 39 | alias ll=lllazy 40 | alias l=llazy 41 | 42 | # docker 43 | alias lzd=lazydocker 44 | alias lzdu='curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash' 45 | alias dsp='docker system prune' 46 | alias dspa='dsp --all' 47 | alias dc='docker compose' 48 | alias dcu='dc up -d' 49 | alias dcub='dcu --build' 50 | alias dcuo='dcu --remove-orphans' 51 | alias dcup='dc -f compose.prod.yaml up -d' 52 | alias dcp='dc ps' 53 | alias dcs='dc stop' 54 | alias dcd='dc down' 55 | alias dcl='dc logs' 56 | alias dcr='dc restart' 57 | alias dce='dc exec -it' 58 | alias cdl='sudo sh -c "truncate -s 0 /var/lib/docker/containers/*/*-json.log"' 59 | 60 | # python 61 | alias pipi='uv pip install -r requirements.txt || uv pip install -r pyproject.toml' 62 | alias pyvcr='uv venv --allow-existing && source .venv/bin/activate && pipi' 63 | alias pyv='source .venv/bin/activate || pyvcr' 64 | alias pyt='ptpython' 65 | alias pyta='pyt --asyncio' 66 | 67 | # other 68 | alias gdu="gdu -I ^/mnt" 69 | alias zps='zpool status -v' 70 | 71 | alias wgu='wg-quick up ~/wg0.conf' 72 | alias wgd='wg-quick down ~/wg0.conf' 73 | 74 | alias sex='explorer.exe .' 75 | 76 | # https://www.cyberciti.biz/faq/unix-linux-check-if-port-is-in-use-command/ 77 | alias open-ports='sudo lsof -i -P -n | grep LISTEN' 78 | -------------------------------------------------------------------------------- /аrchive/ax3600.md: -------------------------------------------------------------------------------- 1 | # [AX3600](../README.md) 2 | 3 | Xiaomi AX3600 is a router with Qualcomm IPQ8071A SoC, 4x 2.5GbE ports, 1x 2.5GbE WAN port, and 1x USB 3.0 port - ©️Copilot 4 | 5 | - [TODO NixWRT someday](https://wiki.nixos.org/wiki/Networking_working_group) 6 | - 7 | - 8 | 9 | ## [OpenWrt](https://openwrt.org/toh/xiaomi/ax3600) 10 | 11 | - [disable IPV6](https://3os.org/infrastructure/openwrt/disable-ipv6/) 12 | 13 | ### packets 14 | 15 | - Installed 16 | - luci-app-pbr 17 | - [dnmasq-full](https://docs.openwrt.melmac.ca/pbr/1.1.8/#Howtoinstalldnsmasq-full) 18 | - [uci settings](https://docs.openwrt.melmac.ca/pbr/1.1.8/#Warning:Pleasesetdhcp.lan.force1) 19 | - [script to reload when WAN is down](https://docs.openwrt.melmac.ca/pbr/1.1.8/#AWordAboutInterfaceHotplugScript) 20 | - luci-app-sqm 21 | - luci-app-wol 22 | - luci-app-ddns 23 | - luci-proto-wireguard 24 | - iperf3 25 | - Disabled 26 | - kmod-nf-nathelper-extra 27 | - to allow obsolete VPNs to work (from 4PDA openwrt version) 28 | 29 | #### [luci-app-amneziawg](https://github.com/openwrt-xiaomi/awg-openwrt/wiki/AmneziaWG-installing#установка-amneziawg-на-openwrt-устройстве) 30 | 31 | ```shell 32 | VERSION=$(grep '^DISTRIB_RELEASE=' /etc/openwrt_release | cut -d "'" -f 2) 33 | PKGARCH=$(grep '^DISTRIB_ARCH=' /etc/openwrt_release | cut -d "'" -f 2) 34 | TARGET=$(grep '^DISTRIB_TARGET=' /etc/openwrt_release | cut -d "'" -f 2) 35 | SUBTARGET=$(echo $TARGET | cut -d "/" -f 2) 36 | TARGET=$(echo $TARGET | cut -d "/" -f 1) 37 | PKGPOSTFIX="_v${VERSION}_${PKGARCH}_${TARGET}_${SUBTARGET}.ipk" 38 | BASE_URL="https://github.com/Slava-Shchipunov/awg-openwrt/releases/download/v${VERSION}/" 39 | 40 | for pkg in amneziawg-tools kmod-amneziawg luci-app-amneziawg; do 41 | wget $BASE_URL$pkg$PKGPOSTFIX -O ./${pkg}$PKGPOSTFIX 42 | opkg install ./${pkg}$PKGPOSTFIX 43 | rm ./${pkg}$PKGPOSTFIX 44 | done 45 | ``` 46 | 47 | ##### [fix `proto_amneziawg_check_installed` error](https://github.com/amnezia-vpn/amneziawg-openwrt/issues/7) 48 | 49 | ```shell 50 | sed -i 's/\tproto_amneziawg_check_installed/\t# proto_amneziawg_check_installed/g' /overlay/upper/lib/netifd/proto/amneziawg.sh 51 | # or (untested) 52 | sed -i '/\tproto_amneziawg_check_installed/s/^\t/^\t#/g' /overlay/upper/lib/netifd/proto/amneziawg.sh 53 | ``` 54 | 55 | ### [white IP](https://4pda.to/forum/index.php?s=&showtopic=1013678&view=findpost&p=109028697) ([alt](https://habr.com/ru/sandbox/99949/)) 56 | 57 | #### `vi /etc/hotplug.d/iface/26-white-ip-miner` 58 | 59 | ```shell 60 | #!/bin/sh 61 | if [ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ]; then 62 | . /lib/functions/network.sh; network_get_ipaddr ip wan 63 | _ip=$(echo $ip | grep -v -E "(^100\.6[4-9]\.|^100\.[7-9][0-9]\.|^100\.1[0-1][0-9]\.|^100\.12[0-7]\.)") 64 | [ -z "$_ip" ] && logger -t white-ip-miner "Reloading wan due grey IP - $ip" && ifup wan 65 | [ ! -z "$_ip" ] && logger -t white-ip-miner "White IP taken! - $ip" 66 | fi 67 | ``` 68 | -------------------------------------------------------------------------------- /nix/modules/gui/sound.nix: -------------------------------------------------------------------------------- 1 | { pkgs, ... }: 2 | { 3 | environment.systemPackages = with pkgs; [ 4 | # TODO: idk why I ever need this 5 | helvum 6 | ]; 7 | # rtkit (optional, recommended) allows Pipewire to use the realtime scheduler for increased performance. 8 | security.rtkit.enable = true; 9 | services.pipewire.enable = true; 10 | services.pipewire.extraConfig.pipewire = { 11 | "10-fix-popping" = { 12 | #? https://ventureo.codeberg.page/source/sound.html#choppy-audio 13 | "context.properties" = { 14 | #? multiply min-quantum while sound still popping (starting from 512) 15 | default.clock.min-quantum = 1024; 16 | default.clock.quantum = 4096; 17 | default.clock.max-quantum = 8192; 18 | }; 19 | # TODO: unknown source, but it helped with popping :/ (stream.properties is assume) 20 | "pulse.properties" = { 21 | "pulse.min.req" = "1024/48000"; 22 | "pulse.default.req" = "4096/48000"; 23 | "pulse.max.req" = "8192/48000"; 24 | "pulse.min.quantum" = "1024/48000"; 25 | "pulse.max.quantum" = "8192/48000"; 26 | }; 27 | "stream.properties" = { 28 | "node.latency" = "2048/44100"; 29 | "resample.quality" = 4; 30 | }; 31 | }; 32 | "20-no-resampling" = { 33 | #? https://ventureo.codeberg.page/source/sound.html#pipewire-setup 34 | "context.properties" = { 35 | #? default 36 | # default.clock.rate = 48000; 37 | #? cat /proc/asound/cards 38 | #? cat /proc/asound/card*/codec\#* | grep -A 8 "Audio Output" -m 1 | grep rates 39 | default.clock.allow-rates = [ 40 | # NVidia HDMI audio 41 | 32000 42 | 44100 43 | 48000 44 | 88200 45 | 96000 46 | 176400 47 | 192000 48 | ]; 49 | }; 50 | }; 51 | }; 52 | # TODO: idk2 53 | # boot.kernelParams = [ "preempt=full" ]; 54 | ##boot.kernelModules = [ 55 | ## "snd-seq" 56 | ## "snd-rawmidi" 57 | ##]; 58 | # security.rtkit = { 59 | # args = pkgs.lib.cli.toGNUCommandLine { optionValueSeparator = "="; } { 60 | # scheduling-policy = "FIFO"; 61 | # our-realtime-priority = 89; 62 | # max-realtime-priority = 88; 63 | # min-nice-level = -19; 64 | # rttime-usec-max = 2000000; 65 | # users-max = 100; 66 | # processes-per-user-max = 1000; 67 | # threads-per-user-max = 10000; 68 | # actions-burst-sec = 10; 69 | # actions-per-burst-max = 1000; 70 | # canary-cheep-msec = 30000; 71 | # canary-watchdog-msec = 60000; 72 | # }; 73 | # }; 74 | # security.pam.loginLimits = [ 75 | # { 76 | # domain = "@users"; 77 | # item = "memlock"; 78 | # type = "-"; 79 | # value = "unlimited"; 80 | # } 81 | # { 82 | # domain = "@users"; 83 | # item = "rtprio"; 84 | # type = "-"; 85 | # value = 95; 86 | # } 87 | # { 88 | # domain = "@users"; 89 | # item = "nice"; 90 | # type = "-"; 91 | # value = -19; 92 | # } 93 | # ]; 94 | } 95 | -------------------------------------------------------------------------------- /versus/pages/instagram.md: -------------------------------------------------------------------------------- 1 | Посты. 2 | Не знаю кого как, а меня раздражает то, что инстаграм кадрирует фото по-своему, причём если ты фотографию откадрировал уже в какой-то программе на ПК, том же lightroom, то инстаграм может обрезать по-своему, приходится извращаться. И да, невозможность закачать фото через браузер тоже сводит на нет удобства. 3 | Почему можно прикрепить максимум 10 фото, почему после публикации нельзя выборочно удалить неудачные фото, а весь пост целиком, почему 4 | нет нормальных альбомов, как в том же вк, или в фэйсбуке, да и других фотохостингах они есть? 5 | 6 | И из последнего. Попробуйте посмотреть что-нибудь в инстаграме, не являясь пользователем, ради интереса разлогиньтесь, войдите через браузер и попробуйте полистать ленту, или зайти в чей-то профиль полистать фото. Секунд через 10 вам прервут этот процесс и предложат войти, либо же зарегиться в инстаграме. И что прикажете делать людям, кто не пользуется этой соцсетью, заводить учётку ради того, чтобы посмотреть чью-то ленту? 7 | 8 | Ещё момент. Попробуйте в приложении скопировать какой-нибудь кусок из комментария, ведь там может быть полезная информация (так называемый копипаст). Я вот не смог. Можно только ответить или поставить лайк. Гиперссылки также не активны, только в direct почему-то работают. И это 2021 год. Да работа с буфером была с бородатых времён и есть во всех нормальных приложениях, но только не тут. Почему это так, я так и не понял. 9 | 10 | Ещё я думал, что браузерная версия должна быть равнозначна мобильной, но нет. Как уже писалось выше, невозможность добавлять фото без плагинов и дополнений к браузером - это не есть хорошо. Мало того, я не могу писать описания к фото через браузер (хэштеги например). 11 | 12 | 13 | 14 | Видео 15 | Окей, инстаграм увеличил длину видео до минуты. А где таймер обратного отсчета? Почему я не вижу, сколько мне осталось смотреть? Ролик на 10 секунд я, быть может, гляну, но тратить 50 секунд на видео, где просто течет вода в водопаде — бред. 16 | Таймер есть везде — от VK до твиттера. Почему тут без него — загадка. Ах да, всё же не везде, ещё есть tiktok без перемотки. Но самое интересное, что есть IGTV, где всё в порядке в этом плане, и с компа кстати можно почему-то закачивать видео, а как же концепция, что инстаграм для мобильных устройств, что не так то? И почему, если видео короче минуты, то закачать через IGTV нельзя, выкладывай через приложение, и смотри как еблан всё видео целиком, даже если порой надо показать последние 5-10 секунд. 17 | 18 | В инстаграме также нельзя исправлять сообщения в direct, можно только удалить. 19 | 20 | И очень неудобно инстаграм использовать как соцсеть, т.е. я не могу просто написать пост какой-то, обязательно надо прикрепить картинку. 21 | 22 | Техподежка в инстаграме вообще песня. Её просто нет, на вопросы никто не отвечает. 23 | 24 | ещё можно добавить, что нельзя фото масштабировать на весь экран. А по поводу невозможности копипаста текста и ещё пары вещей мне вот что ответила одна знакомая (орфография сохранена: 25 | 26 | - "копипастить - сделал скрин и проблема решилась" 27 | - "видео в начале пишет на сколько оно секунд, минута - это не так уж много , можно самотреть в фоне" 28 | - еще можно писать через фейсбук, это одна сеть 29 | -------------------------------------------------------------------------------- /nix/home/gui/social.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | inputs, 5 | ... 6 | }: 7 | # Да. 8 | { 9 | xdg.mimeApps = { 10 | defaultApplications = { 11 | "x-scheme-handler/discord" = [ 12 | # "discord.desktop" 13 | "vesktop.desktop" 14 | # "dorion.desktop" 15 | ]; 16 | } 17 | // lib.genAttrs [ 18 | "x-scheme-handler/tg" 19 | "x-scheme-handler/tonsite" 20 | ] (key: "com.ayugram.desktop.desktop"); 21 | }; 22 | imports = [ 23 | inputs.nixcord.homeModules.nixcord 24 | ]; 25 | programs.nixcord = { 26 | enable = true; 27 | discord = { 28 | # enable = false; 29 | # branch = "canary"; 30 | autoscroll.enable = true; 31 | openASAR.enable = false; 32 | }; 33 | vesktop = { 34 | enable = true; 35 | autoscroll.enable = true; 36 | settings = { 37 | customTitleBar = true; 38 | # alo set default settings 39 | arRPC = true; 40 | splashColor = "rgb(239, 239, 240)"; 41 | splashBackground = "rgb(32, 32, 36)"; 42 | }; 43 | }; 44 | dorion = { 45 | # enable = true; 46 | #! parameters untested, waiting for dorion to have voice chat support 47 | 48 | # blur = "acrylic"; 49 | # cacheCss = true; 50 | 51 | # blurCss = true; 52 | updateNotify = false; 53 | # useNativeTitlebar = true; 54 | # disableHardwareAccel = true; 55 | }; 56 | config = { 57 | disableMinSize = true; 58 | plugins = { 59 | #? restrictions 60 | fakeNitro.enable = true; 61 | showHiddenChannels.enable = true; 62 | showConnections.enable = true; 63 | silentTyping.enable = true; 64 | forceOwnerCrown.enable = true; 65 | platformIndicators.enable = true; 66 | permissionFreeWill.enable = true; 67 | noMosaic.enable = true; 68 | voiceMessages.enable = true; 69 | biggerStreamPreview.enable = true; 70 | greetStickerPicker.enable = true; 71 | volumeBooster.enable = true; 72 | 73 | #? additions 74 | shikiCodeblocks.enable = true; 75 | reverseImageSearch.enable = true; 76 | # messageLogger.enable = true; 77 | 78 | #? tweaks 79 | noF1.enable = true; 80 | betterGifAltText.enable = true; 81 | alwaysTrust.enable = true; 82 | quickReply.enable = true; 83 | previewMessage.enable = true; 84 | pictureInPicture.enable = true; 85 | copyUserUrLs.enable = true; 86 | 87 | #? idk 88 | alwaysAnimate.enable = true; 89 | secretRingToneEnabler.enable = true; 90 | }; 91 | }; 92 | }; 93 | 94 | programs.thunderbird = { 95 | enable = true; 96 | profiles.default = { 97 | isDefault = true; 98 | settings = { 99 | # "general.useragent.override" = ""; 100 | # "privacy.donottrackheader.enabled" = true; 101 | }; 102 | }; 103 | }; 104 | 105 | home.packages = with pkgs; [ 106 | ayugram-desktop 107 | # (callPackage ../../packages/telegram-desktop-patched.nix { 108 | # telegram-desktop-client = ayugram-desktop; 109 | # }) 110 | element-desktop 111 | ]; 112 | } 113 | -------------------------------------------------------------------------------- /configs/.config/bash/config.bash: -------------------------------------------------------------------------------- 1 | # shellcheck disable=SC1091 2 | source "$XDG_CONFIG_HOME/shell/aliases.sh" 3 | source "$XDG_CONFIG_HOME/shell/functions.sh" 4 | 5 | HISTSIZE=100000 6 | HISTFILESIZE=100000 7 | PROMPT_COMMAND="history -a;$PROMPT_COMMAND" 8 | # default settings 9 | HISTCONTROL=ignoreboth 10 | shopt -s histappend 11 | 12 | # If not running interactively, don't do anything 13 | case $- in 14 | *i*) ;; 15 | *) return;; 16 | esac 17 | 18 | if hash nvim &> /dev/null; then 19 | export EDITOR=nvim 20 | export VISUAL=nvim 21 | export MANPAGER='nvim +Man!' 22 | fi 23 | export SYSTEMD_EDITOR=$EDITOR 24 | 25 | export PATH=~/.local/bin:$PATH 26 | 27 | # https://starship.rs/guide/#🚀-installation 28 | if hash starship &> /dev/null; then 29 | eval "$(starship init bash)" 30 | fi 31 | 32 | # https://yazi-rs.github.io/docs/quick-start/ 33 | if hash yazi &> /dev/null; then 34 | function yy() { 35 | local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd 36 | yazi "$@" --cwd-file="$tmp" 37 | IFS= read -r -d '' cwd < "$tmp" 38 | [ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd" 39 | rm -f -- "$tmp" 40 | } 41 | fi 42 | 43 | if hash batcat &> /dev/null; then 44 | alias bat=batcat 45 | alias cat=batcat 46 | export PAGER=batcat 47 | fi 48 | if hash bat &> /dev/null; then 49 | unalias bat &> /dev/null 50 | alias cat=bat 51 | export PAGER=bat 52 | fi 53 | export BAT_THEME="Coldark-Dark" 54 | export LESS="--mouse" 55 | 56 | # https://www.shellcheck.net/wiki/SC2155 57 | # proto 58 | export PROTO_HOME=$XDG_CONFIG_HOME/proto 59 | export PATH="$PROTO_HOME/shims:$PROTO_HOME/bin:$PATH" 60 | # go 61 | export GOBIN="$HOME/go/bin" 62 | export PATH="$GOBIN:$PATH" 63 | # rust 64 | source "$HOME/.cargo/env" &> /dev/null 65 | 66 | if hash fzf &> /dev/null; then 67 | FZF_VERSION=$(fzf --version | awk '{print $1}') 68 | FZF_VERSION_MAJOR=$(echo "$FZF_VERSION" | cut -d. -f1) 69 | FZF_VERSION_MINOR=$(echo "$FZF_VERSION" | cut -d. -f2) 70 | # ubuntu 2204 and lower moment 71 | if [ "$FZF_VERSION_MAJOR" == 0 ] && [ "$FZF_VERSION_MINOR" -le 47 ]; then 72 | source /usr/share/doc/fzf/examples/key-bindings.bash 73 | if [ "$FZF_VERSION_MINOR" -ge 21 ]; then 74 | source /usr/share/bash-completion/completions/fzf 75 | else 76 | source /usr/share/doc/fzf/examples/completion.bash 77 | fi 78 | else 79 | eval "$(fzf --bash)" 80 | fi 81 | fi 82 | 83 | if hash zoxide &> /dev/null; then 84 | eval "$(zoxide init --cmd cd bash)" 85 | fi 86 | 87 | 88 | # uv, hatch autocomplete 89 | # TODO autocompletions resolver 90 | # TODO move to setup_completions 91 | # TODO file or folder? 92 | # uv generate-shell-completion bash > /etc/bash_completion.d/uv.bash-completion 93 | # https://python-poetry.org/docs/#bash 94 | # https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#complete 95 | # if hash uv &> /dev/null; then 96 | # eval "$(uv generate-shell-completion bash)" 97 | # fi 98 | # if hash hatch &> /dev/null; then 99 | # eval "$(_HATCH_COMPLETE=bash_source hatch)" 100 | # fi 101 | # or 102 | # { 103 | # uv generate-shell-completion bash; 104 | # _HATCH_COMPLETE=bash_source hatch; 105 | # starship completions bash; 106 | # } >> ~/.bash_completion 107 | -------------------------------------------------------------------------------- /аrchive/fixdd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # run while loop for boot_completed status & sleep 10 needed for magisk service.d 4 | while [ "$(getprop sys.boot_completed | tr -d '\r')" != "1" ]; do sleep 1; done 5 | sleep 10 6 | 7 | get_fn_type() { 8 | # get currently active function name 9 | if ls /config/usb_gadget/g1/configs/b.1/function* > /dev/null 2>&1 10 | then 11 | echo "function" 12 | else 13 | echo "f" 14 | fi 15 | } 16 | 17 | fn_type=$(get_fn_type) 18 | 19 | 20 | get_chkfn() { 21 | # get currently active function name 22 | ls -al /config/usb_gadget/g1/configs/b.1/ | grep -Eo "$fn_type[0-9]+[[:space:]].*" | awk '{print $3}' | cut -d/ -f8 23 | } 24 | 25 | get_last_fn() { 26 | # get currently free function number 27 | num=$(ls -al /config/usb_gadget/g1/configs/b.1/ | grep -Eo "$fn_type[0-9]+[[:space:]]" | tail -1 | cut -dn -f 3) 28 | echo "$fn_type"$((num+1)) 29 | } 30 | 31 | is_mass_storage_present() { 32 | # returns 1 if mass_storage.0 is present 33 | ls -al /config/usb_gadget/g1/configs/b.1/ | grep -Eo "mass_storage.0" | wc -l 34 | } 35 | 36 | get_mass_storage_path() { 37 | # get path to mass_storage.0 38 | ls -al /config/usb_gadget/g1/configs/b.1/ | grep -Eo "$fn_type[0-9]+[[:space:]].*mass_storage.0" | cut -d' ' -f1 39 | } 40 | 41 | # save currently active function name 42 | if [ "$fn_type" = "f" ]; then 43 | get_chkfn > /data/adb/.fixdd 44 | fi 45 | 46 | # loop 47 | # run every 0.5 seconds 48 | while true 49 | do 50 | # check the app is active 51 | chkapp="$(pgrep -f drivedroid | wc -l)" 52 | # check if mass storage is active function 53 | mass_storage_active=$(is_mass_storage_present) 54 | if [ "$chkapp" -eq "1" ] && [ "$mass_storage_active" -eq "0" ]; then 55 | # add mass_storage.0 to currently active functions 56 | if [ "$fn_type" = "f" ]; then 57 | setprop sys.usb.config cdrom 58 | setprop sys.usb.configfs 1 59 | rm /config/usb_gadget/g1/configs/b.1/f* 60 | fi 61 | 62 | mkdir -p /config/usb_gadget/g1/functions/mass_storage.0/lun.0/ 63 | ln -s /config/usb_gadget/g1/functions/mass_storage.0 "/config/usb_gadget/g1/configs/b.1/$(get_last_fn)" 64 | 65 | if [ "$fn_type" = "f" ]; then 66 | getprop sys.usb.controller > /config/usb_gadget/g1/UDC 67 | setprop sys.usb.state cdrom 68 | fi 69 | elif [ "$chkapp" -eq "0" ] && [ "$mass_storage_active" -eq "1" ]; then 70 | # remove mass_storage.0 function 71 | rm "/config/usb_gadget/g1/configs/b.1/$(get_mass_storage_path)" 72 | # it seems, than pixel 7 doesn't use sys.usb.config at all 73 | if [ "$fn_type" = "f" ]; then 74 | # reload of configfs to fix samsung android auto 75 | setprop sys.usb.configfs 0 76 | setprop sys.usb.configfs 1 77 | # load previous active function 78 | chkfrstfn="$(cat /data/adb/.fixdd)" 79 | ln -s /config/usb_gadget/g1/functions/"$chkfrstfn" /config/usb_gadget/g1/configs/b.1/f1 80 | 81 | ls /sys/class/udc/ | grep -Eo ".*\.dwc3" > /config/usb_gadget/g1/UDC 82 | if [ "$chkfrstfn" = "ffs.adb" ]; then 83 | setprop sys.usb.config adb 84 | elif [ "$chkfrstfn" = "ffs.mtp" ]; then 85 | setprop sys.usb.config mtp 86 | elif [ "$chkfrstfn" = "mtp.gs0" ]; then 87 | setprop sys.usb.config mtp 88 | fi 89 | fi 90 | fi 91 | sleep 0.5 92 | done 93 | -------------------------------------------------------------------------------- /nix/nix-on-droid.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | inputs, 5 | config, 6 | flakePath, 7 | ... 8 | }: 9 | #? https://nix-community.github.io/nix-on-droid/nix-on-droid-options.html#sec-options 10 | { 11 | # modules = [ 12 | # #! ./shared/nix.nix 13 | # ]; 14 | nix = { 15 | extraOptions = '' 16 | experimental-features = nix-command flakes pipe-operators 17 | ''; 18 | registry = { 19 | nixpkgs.flake = inputs.nixpkgs; 20 | }; 21 | substituters = [ 22 | "https://cache.nixos.org" 23 | # "https://nixos-cache-proxy.cofob.dev" # ? cloudflare mirror, uses original keys 24 | 25 | "https://nix-community.cachix.org" 26 | ]; 27 | trustedPublicKeys = [ 28 | "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 29 | 30 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 31 | ]; 32 | }; 33 | android-integration.am.enable = true; 34 | android-integration.termux-setup-storage.enable = true; 35 | android-integration.termux-open.enable = true; 36 | android-integration.termux-open-url.enable = true; 37 | android-integration.termux-reload-settings.enable = true; 38 | android-integration.termux-wake-lock.enable = true; 39 | android-integration.termux-wake-unlock.enable = true; 40 | android-integration.xdg-open.enable = true; 41 | # android-integration.unsupported.enable = true; 42 | 43 | # Simply install just the packages 44 | environment.packages = 45 | with pkgs; 46 | [ 47 | zsh 48 | android-tools 49 | 50 | # Some common stuff that people expect to have 51 | #procps 52 | #util-linux 53 | 54 | #tzdata 55 | #hostname 56 | #man 57 | #gnupg 58 | 59 | #gnutar 60 | #bzip2 61 | #gzip 62 | #xz 63 | #zip 64 | #unzip 65 | ] 66 | ++ import ./shared/lists/00_essential.nix { inherit pkgs; } 67 | ++ import ./shared/lists/01_base.nix { inherit pkgs; } 68 | ++ import ./shared/lists/02_add.nix { inherit pkgs; }; 69 | environment.motd = "Welcome to Nix-on-Droid!"; 70 | environment.sessionVariables = { 71 | SHELL = config.user.shell; 72 | }; 73 | 74 | # Backup etc files instead of failing to activate generation if a file already exists in /etc 75 | # environment.etcBackupExtension = ".bak"; 76 | 77 | # Read the changelog before changing this value 78 | system.stateVersion = "24.05"; 79 | 80 | home-manager = { 81 | useGlobalPkgs = true; 82 | useUserPackages = true; 83 | # backupFileExtension = "hm-bak"; 84 | config = { 85 | # Read the changelog before changing this value 86 | home = { 87 | stateVersion = lib.mkForce "25.05"; 88 | homeDirectory = lib.mkForce "/data/data/com.termux.nix/files/home"; 89 | }; 90 | 91 | imports = [ 92 | ./home 93 | ./home/shell/minimal.nix 94 | ]; 95 | programs.zsh.shellAliases = { 96 | nn = lib.mkForce "nix-on-droid switch --flake ${flakePath}"; 97 | nr = lib.mkForce "nix repl --expr '(builtins.getFlake \"${flakePath}\").nixOnDroidConfigurations.default'"; 98 | }; 99 | }; 100 | }; 101 | 102 | # TODO: stylix 103 | # terminal.colors = { }; 104 | terminal.font = with pkgs; "${cascadia-code}/share/fonts/truetype/CascadiaCodeNF-Regular.ttf"; 105 | time.timeZone = "Europe/Moscow"; 106 | user.shell = "${pkgs.zsh}/bin/zsh"; 107 | # user.userName = "nix-on-droid"; 108 | } 109 | -------------------------------------------------------------------------------- /android/README.md: -------------------------------------------------------------------------------- 1 | # [Android](../README.md) 2 | 3 | ## devices 4 | 5 | ### [Oculus Quest 2](./devices/oculus.md) 6 | 7 | ### [Mi TV Stick](./devices/mitv.md) 8 | 9 | ### [Pixel 7 Pro](https://4pda.to/forum/index.php?showtopic=1039682) 10 | 11 | - [root and kernel english](https://xdaforums.com/t/november-12-2023-up1a-231105-003-a1-for-jp-carriers-unlock-bootloader-root-pixel-7-pro-cheetah-safetynet.4502805/) 12 | - [OTA](https://apatch.dev/update.html#ota-update-with-apatch-retention) 13 | - [Pixel Flasher](https://github.com/badabing2005/PixelFlasher/releases) 14 | - [root update russian](https://4pda.to/forum/index.php?s=&showtopic=1063306&view=findpost&p=120901180) 15 | - [App Manager interceptor](https://www.reddit.com/r/fossdroid/comments/1g0lsit/app_manager_issue_it_automatically_options) 16 | 17 | #### DEPRECATED 18 | 19 | - Audio. Because no configuration and no difference. 20 | - [ViPERFX RE](https://github.com/AndroidAudioMods/ViPERFX_RE) 21 | - [ViPER4Android Repackaged](https://github.com/programminghoch10/ViPER4AndroidRepackaged) 22 | - [?Dolby Atmos](https://gitlab.com/reiryuki-the-fixer/dolby-atmos-magic-revision-magisk-module) 23 | - [no root - wavelet](https://4pda.to/forum/index.php?showtopic=1039682&view=findpost&p=119899326) 24 | 25 | #### TODO 26 | 27 | - root detectors 28 | - [momo](https://t.me/s/magiskalpha/529) 29 | - Design and Tweak Mods 30 | - 31 | 32 | ## instructions 33 | 34 | ### [YouTube ReVanced](./revanced.md) 35 | 36 | ### [Termux](./termux.md) 37 | 38 | ### [root](./root.md) 39 | 40 | ### [install certificates](./certs.md) 41 | 42 | ### backup apps list 43 | 44 | `adb shell` script: 45 | 46 | ```shell 47 | folder="/sdcard/Documents/Sync/android/app_lists/`date +%Y-%m-%d`" 48 | mkdir -p $folder 49 | for i in null com.google.android.packageinstaller com.android.vending dev.imranr.obtainium ru.vk.store; do 50 | pm list packages -i -3 | grep installer=$i | cut -d':' -f2 | awk '{printf "%s\n", $1}' > $folder/$i.txt 51 | done 52 | ``` 53 | 54 | `adb pull /sdcard/Documents/Sync/android/app_lists/` 55 | 56 | - show other 57 | - `pm list packages -i -3 | grep -v installer=null | grep -v installer=com.google.android.packageinstaller | grep -v installer=com.android.vending | grep -v installer=dev.imranr.obtainium | grep -v installer=ru.vk.store` 58 | 59 | ### persist WiFi ADB 60 | 61 | - shizuku 62 | - Phone TODO 63 | - [1](https://www.reddit.com/r/tasker/comments/1j7n1em/project_silently_start_adb_on_boot_without_root/?utm_medium=web3x&utm_term=1) 64 | - [2](https://www.reddit.com/r/tasker/comments/re8k68/howto_enable_adb_wifi_after_reboot_using_ladb_app/) 65 | - [3](https://www.reddit.com/r/tasker/comments/rceljk/enable_adb_wifi_on_device_boot_android_11/) 66 | - PC 67 | - `IP=192.168.1.15` 68 | - `adb connect $IP:$(nmap $IP -p 33000-46000 | awk "/\/tcp/" | cut -d/ -f1)` 69 | - [credits](https://stackoverflow.com/a/70878705) 70 | - root 71 | - Phone 72 | - enable `setprop persist.adb.tcp.port 5555 && stop adbd && start adbd` 73 | - disable `resetprop -d persist.adb.tcp.port && stop adbd && start adbd` 74 | - PC `adb connect 192.168.1.7:5555` 75 | 76 | ### adbfs-fuse 77 | 78 | ```shell 79 | umount /run/media/$USER/adbfs; adb kill-server && adb connect 192.168.1.7:5555 && sudo mkdir -p /run/media/$USER/adbfs/ && sudo chown $(id -u):$(id -g) /run/media/$USER/adbfs/ && adbfs /run/media/$USER/adbfs -o uid=$(id -u),gid=$(id -g) 80 | ``` 81 | 82 | ### TODO 83 | 84 | - `ADB_DELAYED_ACK=1` [when adb is used for large files transfer](https://developer.android.com/tools/adb#burstMode) 85 | -------------------------------------------------------------------------------- /linux/wsl.md: -------------------------------------------------------------------------------- 1 | # [WSL](./README.md) 2 | 3 | ```powershell 4 | wsl --install 5 | wsl --update 6 | ``` 7 | 8 | ## [config](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#main-wsl-settings) 9 | 10 | ### Windows `~/.wslconfig` 11 | 12 | ```conf 13 | [wsl2] 14 | ##memory=8GB 15 | networkingMode=mirrored 16 | dnsTunneling=true 17 | autoProxy=true 18 | 19 | [experimental] 20 | autoMemoryReclaim=gradual 21 | sparseVhd=true 22 | ##ignoredPorts=1234,5678 23 | hostAddressLoopback=true 24 | ``` 25 | 26 | #### [cgroups v2 for docker](https://github.com/spurin/wsl-cgroupsv2?tab=readme-ov-file#configure-wsl-to-use-cgroupsv2) 27 | 28 | ```conf 29 | [wsl2] 30 | kernelCommandLine = cgroup_no_v1=all systemd.unified_cgroup_hierarchy=1 31 | ``` 32 | 33 | ### `/etc/wsl.conf` 34 | 35 | ```conf 36 | [boot] 37 | systemd=true 38 | ``` 39 | 40 | #### [systemd fix](https://github.com/microsoft/vscode/issues/157275#issuecomment-1890408573) 41 | 42 | `loginctl enable-linger $(whoami)` 43 | 44 | ### sparse 45 | 46 | ```powershell 47 | wsl --manage Ubuntu --set-sparse true 48 | 49 | wsl --manage docker-desktop --set-sparse true 50 | 51 | wsl --manage docker-desktop-data --set-sparse true 52 | ``` 53 | 54 | ## [WSLg 120+ fps](https://github.com/microsoft/wslg/wiki/Controlling-WSLg-frame-rate) 55 | 56 | `C:\ProgramData\Microsoft\WSL\.wslgconfig` 57 | 58 | ```ini 59 | [system-distro-env] 60 | WESTON_RDP_MONITOR_REFRESH_RATE=120 61 | ``` 62 | 63 | ## "These files might be harmful to your computer" fix 64 | 65 | ```powershell 66 | reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\wsl.localhost" /f /v file /t REG_DWORD /d 1 67 | or 68 | Win+S -> `Internet Options` -> Security -> Local intranet -> Sites -> Advanced -> `\\wsl.localhost` -> Add 69 | ``` 70 | 71 | ## [Get DISPLAY for old WSL (probably, useless now)](https://serverfault.com/q/47915) 72 | 73 | ```shell 74 | ip r l default | awk '{print $3}' 75 | ``` 76 | 77 | ## Optimize VHD (or ) 78 | 79 | REPLACE "Admin" WITH YOUR WINDOWS USERNAME 80 | 81 | ```powershell 82 | wsl --shutdown 83 | diskpart 84 | 85 | select vdisk file="C:\Users\Admin\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx" 86 | attach vdisk readonly 87 | compact vdisk 88 | detach vdisk 89 | exit 90 | ``` 91 | 92 | ## Forward ports to WSL 93 | 94 | ```shell 95 | # wsl host [0] 96 | hostname -I 97 | ip a s eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}' 98 | 99 | # windows address 100 | cat /etc/resolv.conf | grep nameserver | cut -d ' ' -f 2 101 | # or 102 | ipconfig.exe 103 | 104 | # https://learn.microsoft.com/en-us/windows/wsl/networking#accessing-a-wsl-2-distribution-from-your-local-area-network-lan 105 | netsh.exe interface portproxy add v4tov4 listenport=19000 listenaddress=0.0.0.0 connectport=19000 connectaddress=$wsl_host 106 | 107 | # remove 108 | netsh.exe interface portproxy delete v4tov4 listenport=19000 listenaddress=0.0.0.0 109 | ``` 110 | 111 | ## [Mount external drive to WSL](https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk) 112 | 113 | ## [xanmod](https://github.com/Locietta/xanmod-kernel-WSL2) 114 | 115 | ## [USB](https://learn.microsoft.com/en-us/windows/wsl/connect-usb) 116 | 117 | ## [fix broken PATH cause windows paths mapping](https://github.com/microsoft/WSL/issues/1426#issuecomment-442155686) 118 | 119 | ```shell 120 | export PATH=`echo $PATH | tr ':' '\n' | awk '($0!~/mnt\/c/) {print} ' | tr '\n' ':'` 121 | ``` 122 | 123 | ### or maybe edit `/etc/wsl.conf` 124 | 125 | ```shell 126 | appendWindowsPath=False 127 | ``` 128 | 129 | ## [fix exe launch](https://github.com/sakai135/wsl-vpnkit/issues/239) 130 | 131 | ## [random systemd warning](https://isd-project.github.io/isd/#:~:text=WSL) 132 | -------------------------------------------------------------------------------- /nix/modules/hardware/logi-mx3.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | #? https://github.com/NixOS/nixpkgs/pull/287399 3 | let 4 | cfg.package = pkgs.logiops_0_2_3; 5 | in 6 | { 7 | systemd.services.logiops = { 8 | description = "Logitech Configuration Daemon"; 9 | documentation = [ "https://github.com/PixlOne/logiops" ]; 10 | 11 | wantedBy = [ "multi-user.target" ]; 12 | 13 | startLimitIntervalSec = 0; 14 | after = [ "multi-user.target" ]; 15 | wants = [ "multi-user.target" ]; 16 | serviceConfig = { 17 | ExecStart = "${cfg.package}/bin/logid"; 18 | Restart = "always"; 19 | User = "root"; 20 | 21 | RuntimeDirectory = "logiops"; 22 | 23 | CapabilityBoundingSet = [ "CAP_SYS_NICE" ]; 24 | DeviceAllow = [ 25 | "/dev/uinput rw" 26 | "char-hidraw rw" 27 | ]; 28 | ProtectClock = true; 29 | PrivateNetwork = true; 30 | ProtectHome = true; 31 | ProtectHostname = true; 32 | PrivateUsers = true; 33 | PrivateMounts = true; 34 | PrivateTmp = true; 35 | RestrictNamespaces = true; 36 | ProtectKernelLogs = true; 37 | ProtectKernelModules = true; 38 | ProtectKernelTunables = true; 39 | ProtectControlGroups = true; 40 | MemoryDenyWriteExecute = true; 41 | RestrictRealtime = true; 42 | LockPersonality = true; 43 | ProtectProc = "invisible"; 44 | SystemCallFilter = [ 45 | "nice" 46 | "@system-service" 47 | "~@privileged" 48 | ]; 49 | RestrictAddressFamilies = [ 50 | "AF_NETLINK" 51 | "AF_UNIX" 52 | ]; 53 | RestrictSUIDSGID = true; 54 | NoNewPrivileges = true; 55 | ProtectSystem = "strict"; 56 | ProcSubset = "pid"; 57 | UMask = "0077"; 58 | }; 59 | }; 60 | 61 | # Add a `udev` rule to restart `logiops` when the mouse is connected 62 | # https://github.com/PixlOne/logiops/issues/239#issuecomment-1044122412 63 | services.udev.extraRules = '' 64 | ACTION=="add", SUBSYSTEM=="input", ATTRS{id/vendor}=="046d", RUN{program}="${config.systemd.package}/bin/systemctl --no-block try-restart logiops.service" 65 | ''; 66 | 67 | #? https://wiki.archlinux.org/title/Logitech_MX_Master#Logiops 68 | environment.etc."logid.cfg".text = '' 69 | devices: ({ 70 | name: "Wireless Mouse MX Master 3"; 71 | smartshift: { 72 | on: true; 73 | threshold: 12; 74 | }; 75 | hiresscroll: { 76 | hires: true; 77 | }; 78 | buttons: ({ 79 | cid: 0xc3; 80 | action = { 81 | type: "Gestures"; 82 | gestures: ({ 83 | direction: "Left"; 84 | mode: "OnRelease"; 85 | action = { 86 | type = "Keypress"; 87 | keys: ["KEY_LEFTMETA", "KEY_LEFTCTRL", "KEY_LEFT"]; 88 | }; 89 | }, { 90 | direction: "Right"; 91 | mode: "OnRelease"; 92 | action = { 93 | type = "Keypress"; 94 | keys: ["KEY_LEFTMETA", "KEY_LEFTCTRL", "KEY_RIGHT"]; 95 | }; 96 | }, { 97 | direction: "Down"; 98 | mode: "OnRelease"; 99 | action = { 100 | type: "Keypress"; 101 | keys: ["KEY_LEFTMETA", "KEY_D"]; 102 | }; 103 | }, { 104 | direction: "Up"; 105 | mode: "OnRelease"; 106 | action = { 107 | type: "Keypress"; 108 | keys: ["KEY_F18"]; 109 | }; 110 | }, { 111 | direction: "None"; 112 | mode: "OnRelease"; 113 | action = { 114 | type = "Keypress"; 115 | keys: ["KEY_LEFTMETA", "KEY_TAB"]; 116 | }; 117 | }); 118 | }; 119 | }); 120 | }); 121 | ''; 122 | } 123 | --------------------------------------------------------------------------------