tlp w/o sudo + shwewo flake + other small edits

This commit is contained in:
Your Name 2024-04-03 22:39:39 +03:00
parent 5593f2de92
commit 355466af0f
11 changed files with 118 additions and 222 deletions

View file

@ -41,6 +41,7 @@ let
italic_font auto italic_font auto
bold_italic_font auto bold_italic_font auto
''; '';
shwewo = inputs.shwewo.packages.${pkgs.system};
in { in {
imports = [ imports = [
inputs.nixvim.nixosModules.nixvim inputs.nixvim.nixosModules.nixvim
@ -51,8 +52,6 @@ in {
#chromium #chromium
wl-clipboard wl-clipboard
wl-clipboard-x11 wl-clipboard-x11
(callPackage "${self}/derivations/audiorelay.nix" { })
(callPackage "${self}/derivations/spotify.nix" { })
#(callPackage ../derivations/nu_plugin_dns.nix { }) #(callPackage ../derivations/nu_plugin_dns.nix { })
xorg.xwininfo xorg.xwininfo
jq jq
@ -93,7 +92,6 @@ in {
trayscale trayscale
fishPlugins.done fishPlugins.done
monero-gui monero-gui
inputs.telegram-desktop-patched.packages.${pkgs.system}.default
translate-shell translate-shell
tridactyl-native #firefox tridactyl addon tridactyl-native #firefox tridactyl addon
ripgrep gh # for nvim ripgrep gh # for nvim
@ -107,7 +105,12 @@ in {
jamesdsp easyeffects jamesdsp easyeffects
nmap nmap
wget wget
doggo #dig for dns-over-* shwewo.ephemeralbrowser
shwewo.ruchrome
shwewo.spotify
shwewo.audiorelay
shwewo.tdesktop
(pkgs.writeScriptBin "tlp" ''/run/wrappers/bin/sudo ${pkgs.tlp}/bin/tlp $@'')
]); ]);
programs.firefox = { programs.firefox = {

View file

@ -151,10 +151,10 @@ let
in { in {
users.users.delta.packages = [ users.users.delta.packages = [
kitty_wrapped kitty_wrapped
ephemeralbrowser ephemeralbrowserDesktopItem #ephemeralbrowser ephemeralbrowserDesktopItem
keepassxc keepassxcDesktopItem keepassxc keepassxcDesktopItem
autostart autostartDesktopItem autostart autostartDesktopItem
firefoxRussia firefoxRussiaDesktopItem firefoxRussia firefoxRussiaDesktopItem
googleChromeRussia googleChromeRussiaDesktopItem # googleChromeRussia googleChromeRussiaDesktopItem
]; ];
} }

View file

@ -28,7 +28,8 @@ let
shadowsocks-v2ray-plugin shadowsocks-v2ray-plugin
sing-box sing-box
wireproxy wireproxy
(callPackage ../derivations/microsocks.nix {}) ]; gost
];
}; };
}; };
@ -37,7 +38,7 @@ let
socksed = [ socksed = [
{ name = "singbox-aus"; script = "sing-box run -c /run/secrets/singbox-aus"; } # port 4000 { name = "singbox-aus"; script = "sing-box run -c /run/secrets/singbox-aus"; } # port 4000
{ name = "socks-warp"; script = "wireproxy -c /etc/wireguard/warp0.conf"; } # port 3333 { name = "socks-warp"; script = "wireproxy -c /etc/wireguard/warp0.conf"; } # port 3333
{ name = "socks-novpn"; script = "microsocks -i 192.168.150.2 -p 3334"; } # port 3334 { name = "socks-novpn"; script = "gost -L socks5://192.168.150.2:3334"; } # port 3334
]; ];
delete_rules = pkgs.writeScriptBin "delete_rules" '' delete_rules = pkgs.writeScriptBin "delete_rules" ''

View file

@ -268,7 +268,7 @@ let
hostsNoRemote = pkgs.writeText "hosts_no_remote" '' hostsNoRemote = pkgs.writeText "hosts_no_remote" ''
127.0.0.1 graf1.local graf2.local kibana.local 127.0.0.1 graf1.local graf2.local kibana.local
${inputs.secrets.work.zabbix} ${inputs.secrets.work.zabbix-url} ${inputs.secrets.work.zabbix} ${inputs.secrets.work.zabbix-url} zabbix.local
''; '';
hostsRemote = pkgs.writeText "host_remote" '' hostsRemote = pkgs.writeText "host_remote" ''

View file

@ -1,149 +0,0 @@
{ stdenv
, lib
, dpkg-deb
, fetchurl
, autoPatchelfHook
, wrapGAppsHook
, flac
, gnome2
, harfbuzzFull
, nss
, snappy
, xdg-utils
, xorg
, alsa-lib
, atk
, cairo
, cups
, curl
, dbus
, expat
, fontconfig
, freetype
, gdk-pixbuf
, glib
, gtk3
, libX11
, libxcb
, libXScrnSaver
, libXcomposite
, libXcursor
, libXdamage
, libXext
, libXfixes
, libXi
, libXrandr
, libXrender
, libXtst
, libdrm
, libnotify
, libopus
, libpulseaudio
, libuuid
, libxshmfence
, mesa
, nspr
, pango
, systemd
, at-spi2-atk
, at-spi2-core
, libqt5pas
, qt6
, vivaldi-ffmpeg-codecs
}:
stdenv.mkDerivation rec {
name = "chromium-gost";
version = "122.0.6261.128";
src = fetchurl {
url = "https://github.com/deemru/Chromium-Gost/releases/download/${version}/chromium-gost-${version}-linux-amd64.deb";
hash = "";
};
nativeBuildInputs = [
dpkg-deb
autoPatchelfHook
qt6.wrapQtAppsHook
wrapGAppsHook
];
buildInputs = [
flac
harfbuzzFull
nss
snappy
xdg-utils
xorg.libxkbfile
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
curl
dbus
expat
fontconfig.lib
freetype
gdk-pixbuf
glib
gnome2.GConf
gtk3
libX11
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
libdrm
libnotify
libopus
libuuid
libxcb
libxshmfence
mesa
nspr
nss
pango
stdenv.cc.cc.lib
libqt5pas
qt6.qtbase
];
unpackPhase = ''
mkdir -p $TMP
mkdir -p $out/bin
mkdir -p $out/share
dpkg -x $src $TMP
'';
installPhase = ''
cp -r $TMP/opt/chromium $out
cp -r $TMP/usr/share $out/share
substituteInPlace $out/share/applications/chromium-gost.desktop --replace /usr/ $out/
substituteInPlace $out/share/menu/chromium-gost --replace /opt/ $out/
substituteInPlace $out/share/gnome-control-center/default-apps/chromium-gost.xml --replace /opt/ $out/
'';
runtimeDependencies = map lib.getLib [
libpulseaudio
curl
systemd
vivaldi-ffmpeg-codecs
] ++ buildInputs;
meta = with lib; {
description = "Chromium Fork with GOST support";
homepage = "https://www.cryptopro.ru/products/chromium-gost";
license = licenses.unfree;
maintainers = with maintainers; [];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -1,22 +0,0 @@
{ pkgs, stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "microsocks";
version = "1.0.4";
src = fetchFromGitHub {
owner = "rofl0r";
repo = "microsocks";
rev = "v1.0.4";
sha256 = "sha256-cB2XMWjoZ1zLAmAfl/nqjdOyBDKZ+xtlEmqsZxjnFn0=";
};
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/bin/
cp ./microsocks $out/bin/
'';
}

View file

@ -8,11 +8,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1701453400, "lastModified": 1712136515,
"narHash": "sha256-hI9+KBShsSfvWX7bmRa/1VI20WGat3lDXmbceMZzMS4=", "narHash": "sha256-LpjQJYC24S5P5XhJsZX6HqsQT1pohcFzM6N42I6qo/U=",
"owner": "Kirottu", "owner": "Kirottu",
"repo": "anyrun", "repo": "anyrun",
"rev": "e14da6c37337ffa3ee1bc66965d58ef64c1590e5", "rev": "be6728884d543665e7bd137bbef62dc1d04a210b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -169,6 +169,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -198,11 +216,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1711868868, "lastModified": 1712093955,
"narHash": "sha256-QpZanlbVu6Gb2K96u3vgu0F2BvZD74+fOsIFWcYEXoY=", "narHash": "sha256-94I0sXz6fiVBvUAk2tg6t3UpM5rOImj4JTSTNFbg64s=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "30f2ec39519f4f5a8a96af808c439e730c15aeab", "rev": "80546b220e95a575c66c213af1b09fe255299438",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -255,11 +273,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1711703276, "lastModified": 1712122226,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", "narHash": "sha256-pmgwKs8Thu1WETMqCrWUm0CkN1nmCKX3b51+EXsAZyY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", "rev": "08b9151ed40350725eb40b1fe96b0b86304a654b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -303,11 +321,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1711703276, "lastModified": 1712122226,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", "narHash": "sha256-pmgwKs8Thu1WETMqCrWUm0CkN1nmCKX3b51+EXsAZyY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", "rev": "08b9151ed40350725eb40b1fe96b0b86304a654b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -351,11 +369,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1711703276, "lastModified": 1712122226,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", "narHash": "sha256-pmgwKs8Thu1WETMqCrWUm0CkN1nmCKX3b51+EXsAZyY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", "rev": "08b9151ed40350725eb40b1fe96b0b86304a654b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -408,11 +426,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1711888895, "lastModified": 1712057047,
"narHash": "sha256-Hykv2DGC5EHzZ89+54w/zkit+CVGLRcdIgOWnB4zW5k=", "narHash": "sha256-o5KSQO82/sCgaaSsZONTeb+P47MXo0bbp+eID9I0CwI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "db6b61f117c83943f15289ced03674f81d08256a", "rev": "7baefc8aa587931827797db7fbd55a733179dc79",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -459,7 +477,7 @@
"nixpkgs2105": "nixpkgs2105", "nixpkgs2105": "nixpkgs2105",
"nixvim": "nixvim", "nixvim": "nixvim",
"secrets": "secrets", "secrets": "secrets",
"telegram-desktop-patched": "telegram-desktop-patched" "shwewo": "shwewo"
} }
}, },
"secrets": { "secrets": {
@ -468,11 +486,11 @@
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
}, },
"locked": { "locked": {
"lastModified": 1711651697, "lastModified": 1711939252,
"narHash": "sha256-lLerQa/fGWvo2sClUxRDtayHp+G2yzV//jxbhsOOkzs=", "narHash": "sha256-J0TNwVSDou44SaAXDrPjaBOV+9R8ONVKx6HfjumabTI=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "3db6b893287fd7530c690529fc47c8b3efd6aa6b", "rev": "bd50446d5f3cd157d13fa0ff1793bfdc0c5298eb",
"revCount": 10, "revCount": 16,
"type": "git", "type": "git",
"url": "ssh://git@github.com/deltathetawastaken/secrets.git" "url": "ssh://git@github.com/deltathetawastaken/secrets.git"
}, },
@ -481,6 +499,31 @@
"url": "ssh://git@github.com/deltathetawastaken/secrets.git" "url": "ssh://git@github.com/deltathetawastaken/secrets.git"
} }
}, },
"shwewo": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs-unstable"
],
"nixpkgs-stable": [
"nixpkgs-stable"
],
"tdesktop": "tdesktop"
},
"locked": {
"lastModified": 1711995482,
"narHash": "sha256-tyBewtchaYOVywYFVBwycZfHclhDoE6ZNv4Nd+T3/kE=",
"owner": "shwewo",
"repo": "flake",
"rev": "fb166e20648743750d468d9550c15f0c61989800",
"type": "github"
},
"original": {
"owner": "shwewo",
"repo": "flake",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_4",
@ -545,9 +588,24 @@
"type": "github" "type": "github"
} }
}, },
"telegram-desktop-patched": { "systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tdesktop": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {

View file

@ -8,9 +8,13 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
anyrun.url = "github:Kirottu/anyrun"; anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs"; anyrun.inputs.nixpkgs.follows = "nixpkgs";
telegram-desktop-patched.url = "github:shwewo/telegram-desktop-patched";
secrets.url = "git+ssh://git@github.com/deltathetawastaken/secrets.git"; secrets.url = "git+ssh://git@github.com/deltathetawastaken/secrets.git";
nixvim.url = "github:nix-community/nixvim"; nixvim.url = "github:nix-community/nixvim";
shwewo = {
url = "github:shwewo/flake";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
};
}; };
outputs = inputs@{ self, nixpkgs, home-manager, anyrun, ... }: outputs = inputs@{ self, nixpkgs, home-manager, anyrun, ... }:

View file

@ -58,12 +58,6 @@
}; };
systemd.services.NetworkManager-wait-online.enable = false; systemd.services.NetworkManager-wait-online.enable = false;
programs.captive-browser = {
browser = ''firejail --ignore="include whitelist-run-common.inc" --private --profile=chromium ${pkgs.bash}/bin/bash -c '${pkgs.coreutils}/bin/env XDG_CONFIG_HOME="$PREV_CONFIG_HOME" ${pkgs.chromium}/bin/chromium --user-data-dir=''${XDG_DATA_HOME:-$HOME/.local/share}/chromium-captive --proxy-server="socks5://$PROXY" --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost" --no-first-run --new-window --incognito -no-default-browser-check http://cache.nixos.org/' '';
interface = "wlp1s0";
enable = true;
};
security = { security = {
sudo.wheelNeedsPassword = false; sudo.wheelNeedsPassword = false;

View file

@ -10,11 +10,13 @@ let
''; '';
shell = pkgs.writeScriptBin "shell" '' shell = pkgs.writeScriptBin "shell" ''
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ $# -eq 0 ]]; then packages=""
echo "Error: Missing argument." for package in "$@"; do
else packages+="nixpkgs#$package "
NIXPKGS_ALLOW_UNFREE=1 nix shell --impure nixpkgs#"$1" -- "''${@:2}" done
fi packages=$(echo "$packages" | xargs)
NIXPKGS_ALLOW_UNFREE=1 .any-nix-wrapper fish --impure $packages
''; '';
fzf = pkgs.fzf.overrideAttrs (oldAttrs: rec { fzf = pkgs.fzf.overrideAttrs (oldAttrs: rec {
postInstall = oldAttrs.postInstall + '' postInstall = oldAttrs.postInstall + ''
@ -97,6 +99,7 @@ in {
btop btop
nix-search-cli nix-search-cli
nix-index nix-index
doggo #dig for dns-over-*
(pkgs.writeScriptBin "reboot" ''read -p "Do you REALLY want to reboot? (y/N) " answer; [[ $answer == [Yy]* ]] && ${pkgs.systemd}/bin/reboot'') (pkgs.writeScriptBin "reboot" ''read -p "Do you REALLY want to reboot? (y/N) " answer; [[ $answer == [Yy]* ]] && ${pkgs.systemd}/bin/reboot'')
]; ];
@ -113,16 +116,19 @@ in {
ls = "${pkgs.lsd}/bin/lsd"; ls = "${pkgs.lsd}/bin/lsd";
search = "nix-search -d -m 5 -p"; search = "nix-search -d -m 5 -p";
ltree = "${pkgs.lsd}/bin/lsd --tree"; ltree = "${pkgs.lsd}/bin/lsd --tree";
#nix = "any-nix-shell fish --info-right | source && ${pkgs.nixUnstable}/bin/nix";
#nix-shell = "any-nix-shell fish --info-right | source && ${pkgs.nixUnstable}/bin/nix-shell";
}; };
promptInit = '' promptInit = ''
set TERM "xterm-256color" set TERM "xterm-256color"
set fish_greeting set fish_greeting
#${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source tide configure --auto --style=Lean --prompt_colors='16 colors' --show_time=No --lean_prompt_height='Two lines' --prompt_connection=Disconnected --prompt_spacing=Compact --icons='Few icons' --transient=No
any-nix-shell fish --info-right | source any-nix-shell fish --info-right | source
#tide configure --auto --style=Lean --prompt_colors='16 colors' --show_time=No --lean_prompt_height='Two lines' --prompt_connection=Disconnected --prompt_spacing=Compact --icons='Few icons' --transient=No
''; '';
}; };
#just incase: ${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
#tide configure --auto --style=Lean --prompt_colors='16 colors' --show_time=No --lean_prompt_height='Two lines' --prompt_connection=Disconnected --prompt_spacing=Compact --icons='Few icons' --transient=No
programs.tmux.enable = true; programs.tmux.enable = true;
programs.direnv.enable = true; programs.direnv.enable = true;
programs.firejail.enable = true; programs.firejail.enable = true;

View file

@ -125,10 +125,11 @@
forceSSL = false; forceSSL = false;
listen = [{port = 80; addr="0.0.0.0"; ssl=false;}]; listen = [{port = 80; addr="0.0.0.0"; ssl=false;}];
serverName = "zabbix.local"; serverName = "zabbix.local";
serverAliases = [ "${inputs.secrets.work.zabbix-url}" ];
locations."/".extraConfig = '' locations."/".extraConfig = ''
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_pass ${inputs.secrets.work.zabbix}; proxy_pass https://${inputs.secrets.work.zabbix};
''; '';
}; };