keepassxc update + rename poxy

This commit is contained in:
Your Name 2024-03-01 02:16:03 +03:00
parent 1a8a8a08be
commit c1f5f856ce
13 changed files with 144 additions and 48 deletions

View file

@ -69,11 +69,11 @@
]
},
"locked": {
"lastModified": 1709039791,
"narHash": "sha256-M2PZlrXCaIVMKonM8dwsTCCS0Tp09mMWL4PqsEnCnK8=",
"lastModified": 1709209504,
"narHash": "sha256-szkYp24Xnxb2nsrHgQY3mVvty/humm+1zGXeZ78uA/k=",
"owner": "nix-community",
"repo": "flake-firefox-nightly",
"rev": "17696e176f5493c4959ff056df6b9b4751468fb5",
"rev": "9b78672ec1d66f393a7d7923adbbf7f398473dad",
"type": "github"
},
"original": {
@ -123,11 +123,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
@ -200,11 +200,11 @@
]
},
"locked": {
"lastModified": 1708806879,
"narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=",
"lastModified": 1709204054,
"narHash": "sha256-U1idK0JHs1XOfSI1APYuXi4AEADf+B+ZU4Wifc0pBHk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a",
"rev": "2f3367769a93b226c467551315e9e270c3f78b15",
"type": "github"
},
"original": {
@ -240,11 +240,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1708862933,
"narHash": "sha256-WMZ97AfnqJGZTzQ0Ovh8GoNdjSERqmp1qsBTpvdb1y8=",
"lastModified": 1709208631,
"narHash": "sha256-n+SCii/GQR3zjaZzjhGAjrQQlF+xjaGEjWdpDb4wJ3U=",
"owner": "nix-community",
"repo": "lib-aggregate",
"rev": "4b00c6e0995270afe27f5ea590a6ed25622963e2",
"rev": "1f03ac8dc3a54f68f55d36b5e7fc65afc302a3d7",
"type": "github"
},
"original": {
@ -302,11 +302,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1708831307,
"narHash": "sha256-0iL/DuGjiUeck1zEaL+aIe2WvA3/cVhp/SlmTcOZXH4=",
"lastModified": 1709128929,
"narHash": "sha256-GWrv9a+AgGhG4/eI/CyVVIIygia7cEy68Huv3P8oyaw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5bf1cadb72ab4e77cb0b700dab76bcdaf88f706b",
"rev": "c8e74c2f83fe12b4e5a8bd1abbc090575b0f7611",
"type": "github"
},
"original": {
@ -318,11 +318,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1708807242,
"narHash": "sha256-sRTRkhMD4delO/hPxxi+XwLqPn8BuUq6nnj4JqLwOu0=",
"lastModified": 1709150264,
"narHash": "sha256-HofykKuisObPUfj0E9CJVfaMhawXkYx3G8UIFR/XQ38=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "73de017ef2d18a04ac4bfd0c02650007ccb31c2a",
"rev": "9099616b93301d5cf84274b184a3a5ec69e94e08",
"type": "github"
},
"original": {
@ -334,11 +334,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1708831307,
"narHash": "sha256-0iL/DuGjiUeck1zEaL+aIe2WvA3/cVhp/SlmTcOZXH4=",
"lastModified": 1709128929,
"narHash": "sha256-GWrv9a+AgGhG4/eI/CyVVIIygia7cEy68Huv3P8oyaw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5bf1cadb72ab4e77cb0b700dab76bcdaf88f706b",
"rev": "c8e74c2f83fe12b4e5a8bd1abbc090575b0f7611",
"type": "github"
},
"original": {
@ -350,11 +350,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1708831307,
"narHash": "sha256-0iL/DuGjiUeck1zEaL+aIe2WvA3/cVhp/SlmTcOZXH4=",
"lastModified": 1709128929,
"narHash": "sha256-GWrv9a+AgGhG4/eI/CyVVIIygia7cEy68Huv3P8oyaw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5bf1cadb72ab4e77cb0b700dab76bcdaf88f706b",
"rev": "c8e74c2f83fe12b4e5a8bd1abbc090575b0f7611",
"type": "github"
},
"original": {

View file

@ -12,7 +12,11 @@
size = 16;
};
imports = [ ./programs ./theme.nix ];
imports = [
./programs
./theme.nix
./scripts.nix
];
services.blueman-applet.enable = true;
services.network-manager-applet.enable = true;
@ -53,7 +57,6 @@
htop
foot
kitty
keepassxc
alacritty
dig
nwg-displays
@ -64,8 +67,6 @@
pavucontrol
wget
wlogout
swaylock
swayidle
nom
vesktop
firefox

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; [ waybar swww swaynotificationcenter cliphist fzf hyprshot slurp grim];
home.packages = with pkgs; [ waybar swww swaynotificationcenter cliphist fzf hyprshot slurp grim swaylock hyprlock hypridle];
#test later systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
wayland.windowManager.hyprland = {
@ -30,7 +30,7 @@
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
exec-once = ~/.config/hypr/xdg-ausl-hyprland
exec-once = ~/.config/hypr/xdg-portal-hyprland
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
@ -53,7 +53,7 @@
exec-once = foot -s
exec-once = thunar --daemon
exec-once = swayidle -d
#exec-once = swayidle -d
exec-once = hyprctl setcursor Bibata-Modern-Classic 16
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
@ -324,7 +324,7 @@
bind = $mainMod, F4, killactive, # close the active window
bind = $mainMod, TAB, killactive, # close the active window
bind = $mainMod SHIFT, TAB, killactive, # close the active window
bind = $mainMod, Escape, exec, ~/scripts/swaylock # Lock the screen
bind = $mainMod, Escape, exec, /home/delta/scripts/swaylock # Lock the screen
bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window
bind = $mainMod SHIFT, M, exit, # Exit Hyprland all together no (force quit Hyprland)
bind = $mainMod, E, exec, thunar # Show the graphical file browser

88
home/scripts.nix Normal file
View file

@ -0,0 +1,88 @@
{ inputs, home, config, lib, pkgs, specialArgs, ... }:
let
ephemeralbrowser = pkgs.writeScriptBin "ephemeralbrowser" ''
#!/usr/bin/env bash
default_interface=$(${pkgs.iproute2}/bin/ip route show default | ${pkgs.gawk}/bin/awk '/default/ {print $5}')
interfaces=$(${pkgs.iproute2}/bin/ip -o -4 addr show | ${pkgs.gawk}/bin/awk '$4 ~ /\/24/ {print $2}' | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/|/g')
# The difference between default_interface and and default chose option is that default_interface is used to get dhcp from it, and default is for leave network as is without tweaking it (e.g. VPN/proxy/whatever)
result=$(${pkgs.gnome.zenity}/bin/zenity --forms --title="Configuration" \
--text="Please configure your settings" \
--add-combo="Browser:" --combo-values="google_chrome|chromium" \
--add-combo="Network Interface:" --combo-values="default|"$interfaces \
--add-combo="DNS Server:" --combo-values="dhcp|1.1.1.1|8.8.8.8|77.88.8.1")
browser=$(${pkgs.coreutils}/bin/echo "$result" | cut -d'|' -f1)
interface=$(${pkgs.coreutils}/bin/echo "$result" | cut -d'|' -f2)
dns=$(${pkgs.coreutils}/bin/echo "$result" | cut -d'|' -f3)
if [[ $dns == "dhcp" ]]; then
${pkgs.coreutils}/bin/echo "Getting DNS from DHCP..."
dns=$(${pkgs.networkmanager}/bin/nmcli device show $default_interface | ${pkgs.gnugrep}/bin/grep 'IP4.DNS\[1\]' | ${pkgs.coreutils}/bin/head -n 1 | ${pkgs.gawk}/bin/awk '{print $2}')
${pkgs.coreutils}/bin/echo "DHCP's dns is $dns"
fi
${pkgs.coreutils}/bin/mkdir -p /tmp/ephemeralbrowser
if [[ $browser == "google_chrome" ]]; then
browser_path="${pkgs.google-chrome}/bin/google-chrome-stable"
profile="google-chrome"
elif [[ $browser == "chromium" ]]; then
browser_path="${pkgs.chromium}/bin/chromium"
profile="chromium"
fi
${pkgs.libnotify}/bin/notify-send --icon=google-chrome-unstable "Ephemeral Browser" "$browser | $interface | $dns"
if [[ $interface != "default" ]]; then
firejail --ignore='include whitelist-run-common.inc' \
--private=/tmp/ephemeralbrowser \
--profile="$profile" \
--net="$interface" \
--dns="$dns" \
"$browser_path" https://ifconfig.me
else
firejail --ignore='include whitelist-run-common.inc' \
--private=/tmp/ephemeralbrowser \
--profile="$profile" \
--dns="$dns" \
"$browser_path" https://ifconfig.me
fi
'';
keepassxc = pkgs.writeScriptBin "keepassxc" ''
#!/usr/bin/env bash
${pkgs.coreutils}/bin/cat /run/agenix/precise | ${pkgs.keepassxc}/bin/keepassxc --pw-stdin ~/Dropbox/pswd.kdbx
'';
in {
home.packages = with pkgs; [
ephemeralbrowser
keepassxc
];
xdg.desktopEntries = {
keepassxc = {
name = "KeePassXC";
icon = "keepassxc";
exec = "/etc/profiles/per-user/cute/bin/keepassxc";
type = "Application";
};
ephemeralbrowser = {
name = "Ephemeral Browser";
icon = "google-chrome-unstable";
exec = "/etc/profiles/per-user/cute/bin/ephemeralbrowser";
type = "Application";
};
autostart = {
name = "Autostart";
icon = "app-launcher";
exec = "/etc/profiles/per-user/cute/bin/autostart"; # this is needed due to nix stuff, the path is going to be changed every time i update autostart script
type = "Application";
};
};
}

View file

@ -20,7 +20,6 @@ in {
home = {
packages = with pkgs; [
font-awesome
#qogir-icon-theme
whitesur-icon-theme
colloid-icon-theme
adw-gtk3
@ -88,6 +87,13 @@ in {
border-radius: 0;
}
'';
gtk4.extraCss = ''
window.messagedialog .response-area > button,
window.dialog.message .dialog-action-area > button,
.background.csd{
border-radius: 0;
}
'';
};
qt = {

View file

@ -2,7 +2,8 @@
{
age.secrets = {
singboxaus = { file = ../../secrets/singboxaus.age; owner = "socks"; group = "socks"; };
singbox-aus = { file = ../../secrets/singbox-aus.age; owner = "socks"; group = "socks"; };
qqq = { file = ../../secrets/qqq.age; owner = "delta"; group = "users"; };
};
age.identityPaths = [ "/home/delta/.ssh/id_ed25519" ];

View file

@ -108,9 +108,9 @@
#Trubo boost control
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_BOOST_ON_BAT = 1;
CPU_HWP_DYN_BOOST_ON_AC = 1;
CPU_HWP_DYN_BOOST_ON_BAT = 0;
CPU_HWP_DYN_BOOST_ON_BAT = 1;
#Optional helps save long term battery health
#START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
@ -177,7 +177,7 @@
thunar-volman
];
xdg.ausl.extraPortals = with pkgs; [ xdg-desktop-ausl-hyprland ];
xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
environment = {
gnome.excludePackages = [
@ -254,7 +254,7 @@
};
users.groups.socks = { };
systemd.services.singboxaus = {
systemd.services.singbox-aus = {
enable = true;
description = "avoid censorship";
wantedBy = [ "multi-user.target" ];
@ -264,7 +264,7 @@
User = "socks";
Group = "socks";
};
script = "sing-box run -c /run/agenix/singboxaus";
script = "sing-box run -c /run/agenix/singbox-aus";
path = with unstable; [
shadowsocks-libev
shadowsocks-v2ray-plugin

View file

@ -18,7 +18,7 @@
type = "-";
value = 1;
}];
pam.services.swaylock = { };
#pam.services.swaylock = { };
rtkit.enable = true;
};
@ -35,7 +35,7 @@
thunar-volman
];
xdg.ausl.extraPortals = with pkgs; [ xdg-desktop-ausl-hyprland ];
xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {

5
secrets/qqq.age Normal file
View file

@ -0,0 +1,5 @@
age-encryption.org/v1
-> ssh-ed25519 WaXiIA c63tcVno1ysABDLqGCRn8QQCKImhtSpRFqL+YzL/EU4
kJPMXFl4Nz135AzhejCkU9S9/ODltRc/3oGXSDrwnI8
--- q5ByBQLUfcQQRQdGU2+fV2xPAVHq5XSJ0uXgtG8XLhg
$¥ƒ\óÐ!º¢Çs'ÀZë^]î tu 5Ÿzô b¶yÉ LóGUõ|ÎaIÆ?

View file

@ -1,6 +1,6 @@
let
dlaptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGGL2UD0frl9F2OPBiPlSQqxDsuACbAVgwH24F0KT14L delta@dlaptop";
in {
"test.age".publicKeys = [ dlaptop ];
"singboxaus.age".publicKeys = [ dlaptop ];
"singbox-aus.age".publicKeys = [ dlaptop ];
"qqq.age".publicKeys = [ dlaptop ];
}

BIN
secrets/singbox-aus.age Normal file

Binary file not shown.

Binary file not shown.

View file

@ -1,5 +0,0 @@
age-encryption.org/v1
-> ssh-ed25519 WaXiIA d5rkOEoS+1Hbm1052rjg2syFrAjK/zAUncW4PeIJDwA
Rdkm26cHFw9erjUZOJipAZ51/D8poXtMdCzY0FlIuTM
--- ODDKDz/Bn3WFnqLfQGfjR9SE5mfp1Ob1aOvxAf+vhLY
ªOšçïª~MT0ù<30>YDŽTäo¾ù!K^nL»Æsw°@