Compare commits

...

8 commits

11 changed files with 41 additions and 50 deletions

View file

@ -34,7 +34,8 @@ fix-nixconf:
gc:
nix-collect-garbage -d
# nix-store --gc
nix store gc
nix-store --gc
.PHONY: home
home:

View file

@ -27,22 +27,15 @@ in {
"sway/workspaces"
];
modules-right = [
"sway/language"
"pulseaudio"
"group/batteryinfo"
"group/hardware"
"group/batteryinfo"
"pulseaudio"
"custom/display"
"custom/network"
"tray"
];
"sway/workspaces" = {
all-outputs = true;
};
"sway/language" = {
on-click = "swaymsg 'input * xkb_switch_layout next'";
on-click-right = "xdg-open https://translate.yandex.ru/";
tooltip = false;
};
"sway/scratchpad" = {
format = "{icon} {count}";
on-click = "swaymsg 'scratchpad show'";
@ -55,9 +48,6 @@ in {
""
];
};
tray = {
spacing = 8;
};
clock = {
format-alt = "{:%H:%M %a %d %b}";
on-click-right = "xdg-open https://cloud.voronind.com/apps/calendar/";
@ -104,8 +94,8 @@ in {
format-muted = "󰸈{format_source}";
format-source = "";
format-source-muted = " 󰍭";
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
on-click-middle = "pavucontrol";
on-click = "pavucontrol";
on-click-middle = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
on-click-right = "pactl set-source-mute @DEFAULT_SOURCE@ toggle";
scroll-step = 5;
};

View file

@ -24,11 +24,9 @@ in {
#clock,
#custom-display,
#custom-network,
#language,
#mpris,
#pulseaudio,
#scratchpad,
#tray {
#scratchpad {
padding: ${paddingV} ${paddingH};
}
@ -47,11 +45,9 @@ in {
#custom-display:hover,
#custom-network:hover,
#hardware:hover,
#language:hover,
#mpris:hover,
#pulseaudio:hover,
#scratchpad:hover,
#tray:hover,
#workspaces button:hover {
background-color: rgba(${config.module.style.color.borderR},${config.module.style.color.borderG},${config.module.style.color.borderB},${toString config.module.style.opacity.desktop});
}
@ -63,8 +59,7 @@ in {
#custom-network,
#memory,
#pulseaudio,
#temperature,
#tray {
#temperature {
border-top: ${toString config.module.style.window.border}px solid transparent;
border-bottom: ${toString config.module.style.window.border}px solid transparent;
}
@ -77,8 +72,7 @@ in {
#memory.critical,
#pulseaudio.muted,
#pulseaudio.source-muted,
#temperature.critical,
#tray.needs-attention {
#temperature.critical {
border-top: ${toString config.module.style.window.border}px solid #${config.module.style.color.accent};
}

View file

@ -141,6 +141,11 @@
use = use ++ defaultUse;
};
in [
(mkName "*.xlsx" [ "document" ])
(mkName "*.mka" [ "audio" ])
(mkName "*.nsp" [ "switch_install" ])
(mkName "*.nsz" [ "switch_install" ])
# Use `file -i file.txt` to find file mime type.
# Use `xdg-mime query default "text/plain"` to find default app.
(mkMime "application/gzip" [ "unpack" ])
@ -152,15 +157,12 @@
(mkMime "application/x-raw-disk-image" [ "unlock" ])
(mkMime "application/pdf" [ "pdf" ])
(mkMime "audio/*" [ "audio" ])
(mkName "*.mka" [ "audio" ])
(mkName "*.nsp" [ "switch_install" ])
(mkName "*.nsz" [ "switch_install" ])
(mkMime "image/*" [ "picture" "picture_copy" "picture_edit" "picture_edit_quick" ])
(mkMime "video/*" [ "video" ])
(mkMime "text/html" [ "browser" ])
(mkMime "application/vnd.openxmlformats-officedocument.*" [ "document" ])
(mkName "*.xlsx" [ "document" ])
(mkMime "application/x-executable" [ "steam_run" ])
{ mime = "inode/directory"; use = [ "archive" "bottle_run" "audio_shuffle" ]; }
(mkMime "*" [ ])
];

View file

@ -1,9 +1,9 @@
{ ... }: {
networking = {
firewall.extraCommands = ''
# Ssh access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8 -p tcp --dport 22143
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22143
# Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
'';
};
}

View file

@ -1,14 +1,9 @@
{ ... }: {
networking = {
firewall.extraCommands = ''
# Ssh access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8 -p tcp --dport 22143
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22143
# Syncthing.
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22000
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p udp --dport 22000
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p udp --dport 21027
# Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
'';
};
}

View file

@ -52,8 +52,8 @@
mv ''${paper} ''${path_backup}/paper/ || report "Backup: Failed to save paper!"
cd -
rcp_merge_fast ''${path_src}/sync/save/ ''${path_backup}/save/tmp/ || report "Backup: Failed to save game saves!"
rcp_merge_fast ''${path_src}/sync/photo/ ''${path_backup}/photo/tmp/ || report "Backup: Failed to save photos!"
rcp_merge ''${path_src}/sync/save/ ''${path_backup}/save/tmp/ || report "Backup: Failed to save game saves!"
rcp_merge ''${path_src}/sync/photo/ ''${path_backup}/photo/tmp/ || report "Backup: Failed to save photos!"
# Prune media copies.
cd ''${path_backup}/paper/

View file

@ -1,9 +1,9 @@
{ ... }: {
networking = {
firewall.extraCommands = ''
# Ssh access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8 -p tcp --dport 22143
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22143
# Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
'';
};
}

View file

@ -0,0 +1,9 @@
{ ... }: {
networking = {
firewall.extraCommands = ''
# Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
'';
};
}

View file

@ -1,9 +1,9 @@
{ ... }: {
networking = {
firewall.extraCommands = ''
# Ssh access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8 -p tcp --dport 22143
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48 -p tcp --dport 22143
# Local access.
iptables -I INPUT -j ACCEPT -s 10.0.0.0/8
ip6tables -I INPUT -j ACCEPT -s fd09:8d46:0b26::/48
'';
};
}

View file

@ -4,9 +4,9 @@
function networkwidget() {
local IFS=$'\n'
local internet=$(nmcli networking connectivity check)
local _ethernets=($(nmcli connection show --active | rg ethernet | cut -f1 -d\ ))
local _vpns=($(nmcli connection show --active | rg vpn | cut -f1 -d\ ))
local _wifis=($(nmcli connection show --active | rg wifi | cut -f1 -d\ ))
local _ethernets=($(nmcli connection show --active | rg ethernet | sed "s/ .*//"))
local _vpns=($(nmcli connection show --active | rg vpn | sed "s/ .*//"))
local _wifis=($(nmcli connection show --active | rg wifi | sed "s/ .*//"))
local _bts=($(bluetoothctl devices Connected | cut -d\ -f3))
local icon="󰖩"
local class=""