feat: ...get internet again. git-hooks.nix adopt

This commit is contained in:
Kat Inskip 2025-08-18 15:13:47 -07:00
parent 7a0f09e700
commit e00ec8f2f2
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
116 changed files with 1157 additions and 4681 deletions

View file

@ -1,4 +1,9 @@
{pkgs, config, lib, ...}: let
{
pkgs,
config,
lib,
...
}: let
inherit (lib.meta) getExe getExe';
in {
programs.niri.settings.spawn-at-startup = let

View file

@ -39,9 +39,9 @@ in {
"Mod+Escape".action = sh ''${getExe config.programs.wlogout.package} -p layer-shell'';
"Mod+Shift+Escape".action = sh ''${getExe config.programs.swaylock.package} -f'';
"Mod+Alt+Tab" = {
#repeat = false;
cooldown-ms = 150;
action.spawn = ["${getExe' pkgs.glib "gdbus"}" "call" "--session" "--dest" "io.github.isaksamsten.Niriswitcher" "--object-path" "/io/github/isaksamsten/Niriswitcher" "--method" "io.github.isaksamsten.Niriswitcher.application"];
#repeat = false;
cooldown-ms = 150;
action.spawn = ["${getExe' pkgs.glib "gdbus"}" "call" "--session" "--dest" "io.github.isaksamsten.Niriswitcher" "--object-path" "/io/github/isaksamsten/Niriswitcher" "--method" "io.github.isaksamsten.Niriswitcher.application"];
};
"Mod+Alt+Shift+Tab" = {
cooldown-ms = 150;
@ -56,118 +56,118 @@ in {
# ▀▄▄▄▀ ▀▄▄ ▀█▄█▀ ▀█▄▄▀ █ ▀▄
#
stockBindings = {
# Taken from https://github.com/sodiboo/niri-flake/issues/483
# Taken from https://github.com/sodiboo/niri-flake/issues/483
"Mod+Q".action.close-window = {};
"Mod+O".action.toggle-overview = {};
"Mod+Q".action.close-window = {};
"Mod+O".action.toggle-overview = {};
"Mod+Left".action.focus-column-left = {};
"Mod+Down".action.focus-window-down = {};
"Mod+Up".action.focus-window-up = {};
"Mod+Right".action.focus-column-right = {};
"Mod+H".action.focus-column-left = {};
"Mod+J".action.focus-window-down = {};
"Mod+K".action.focus-window-up = {};
"Mod+L".action.focus-column-right = {};
"Mod+Left".action.focus-column-left = {};
"Mod+Down".action.focus-window-down = {};
"Mod+Up".action.focus-window-up = {};
"Mod+Right".action.focus-column-right = {};
"Mod+H".action.focus-column-left = {};
"Mod+J".action.focus-window-down = {};
"Mod+K".action.focus-window-up = {};
"Mod+L".action.focus-column-right = {};
"Mod+Ctrl+Left".action.move-column-left = {};
"Mod+Ctrl+Down".action.move-window-down = {};
"Mod+Ctrl+Up".action.move-window-up = {};
"Mod+Ctrl+Right".action.move-column-right = {};
"Mod+Ctrl+H".action.move-column-left = {};
"Mod+Ctrl+J".action.move-window-down = {};
"Mod+Ctrl+K".action.move-window-up = {};
"Mod+Ctrl+L".action.move-column-right = {};
"Mod+Ctrl+Left".action.move-column-left = {};
"Mod+Ctrl+Down".action.move-window-down = {};
"Mod+Ctrl+Up".action.move-window-up = {};
"Mod+Ctrl+Right".action.move-column-right = {};
"Mod+Ctrl+H".action.move-column-left = {};
"Mod+Ctrl+J".action.move-window-down = {};
"Mod+Ctrl+K".action.move-window-up = {};
"Mod+Ctrl+L".action.move-column-right = {};
"Mod+Home".action.focus-column-first = {};
"Mod+End".action.focus-column-last = {};
"Mod+Ctrl+Home".action.move-column-to-first = {};
"Mod+Ctrl+End".action.move-column-to-last = {};
"Mod+Home".action.focus-column-first = {};
"Mod+End".action.focus-column-last = {};
"Mod+Ctrl+Home".action.move-column-to-first = {};
"Mod+Ctrl+End".action.move-column-to-last = {};
"Mod+Shift+Left".action.focus-monitor-left = {};
"Mod+Shift+Down".action.focus-monitor-down = {};
"Mod+Shift+Up".action.focus-monitor-up = {};
"Mod+Shift+Right".action.focus-monitor-right = {};
"Mod+Shift+H".action.focus-monitor-left = {};
"Mod+Shift+J".action.focus-monitor-down = {};
"Mod+Shift+K".action.focus-monitor-up = {};
"Mod+Shift+L".action.focus-monitor-right = {};
"Mod+Shift+Left".action.focus-monitor-left = {};
"Mod+Shift+Down".action.focus-monitor-down = {};
"Mod+Shift+Up".action.focus-monitor-up = {};
"Mod+Shift+Right".action.focus-monitor-right = {};
"Mod+Shift+H".action.focus-monitor-left = {};
"Mod+Shift+J".action.focus-monitor-down = {};
"Mod+Shift+K".action.focus-monitor-up = {};
"Mod+Shift+L".action.focus-monitor-right = {};
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = {};
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = {};
"Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = {};
"Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = {};
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = {};
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = {};
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = {};
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = {};
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = {};
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = {};
"Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = {};
"Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = {};
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = {};
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = {};
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = {};
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = {};
"Mod+Page_Down".action.focus-workspace-down = {};
"Mod+Page_Up".action.focus-workspace-up = {};
"Mod+U".action.focus-workspace-down = {};
"Mod+I".action.focus-workspace-up = {};
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = {};
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = {};
"Mod+Ctrl+U".action.move-column-to-workspace-down = {};
"Mod+Ctrl+I".action.move-column-to-workspace-up = {};
"Mod+Page_Down".action.focus-workspace-down = {};
"Mod+Page_Up".action.focus-workspace-up = {};
"Mod+U".action.focus-workspace-down = {};
"Mod+I".action.focus-workspace-up = {};
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = {};
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = {};
"Mod+Ctrl+U".action.move-column-to-workspace-down = {};
"Mod+Ctrl+I".action.move-column-to-workspace-up = {};
"Mod+Shift+Page_Down".action.move-workspace-down = {};
"Mod+Shift+Page_Up".action.move-workspace-up = {};
"Mod+Shift+U".action.move-workspace-down = {};
"Mod+Shift+I".action.move-workspace-up = {};
"Mod+Shift+Page_Down".action.move-workspace-down = {};
"Mod+Shift+Page_Up".action.move-workspace-up = {};
"Mod+Shift+U".action.move-workspace-down = {};
"Mod+Shift+I".action.move-workspace-up = {};
"Mod+WheelScrollDown" = {
cooldown-ms = 150;
action.focus-workspace-down = {};
};
"Mod+WheelScrollUp" = {
cooldown-ms = 150;
action.focus-workspace-up = {};
};
"Mod+Ctrl+WheelScrollDown" = {
cooldown-ms = 150;
action.move-column-to-workspace-down = {};
};
"Mod+Ctrl+WheelScrollUp" = {
cooldown-ms = 150;
action.move-column-to-workspace-up = {};
};
"Mod+WheelScrollDown" = {
cooldown-ms = 150;
action.focus-workspace-down = {};
};
"Mod+WheelScrollUp" = {
cooldown-ms = 150;
action.focus-workspace-up = {};
};
"Mod+Ctrl+WheelScrollDown" = {
cooldown-ms = 150;
action.move-column-to-workspace-down = {};
};
"Mod+Ctrl+WheelScrollUp" = {
cooldown-ms = 150;
action.move-column-to-workspace-up = {};
};
"Mod+WheelScrollRight".action.focus-column-right = {};
"Mod+WheelScrollLeft".action.focus-column-left = {};
"Mod+Ctrl+WheelScrollRight".action.move-column-right = {};
"Mod+Ctrl+WheelScrollLeft".action.move-column-left = {};
"Mod+WheelScrollRight".action.focus-column-right = {};
"Mod+WheelScrollLeft".action.focus-column-left = {};
"Mod+Ctrl+WheelScrollRight".action.move-column-right = {};
"Mod+Ctrl+WheelScrollLeft".action.move-column-left = {};
"Mod+Shift+WheelScrollDown".action.focus-column-right = {};
"Mod+Shift+WheelScrollUp".action.focus-column-left = {};
"Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = {};
"Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = {};
"Mod+Shift+WheelScrollDown".action.focus-column-right = {};
"Mod+Shift+WheelScrollUp".action.focus-column-left = {};
"Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = {};
"Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = {};
"Mod+Comma".action.consume-window-into-column = {};
"Mod+Period".action.expel-window-from-column = {};
"Mod+Comma".action.consume-window-into-column = {};
"Mod+Period".action.expel-window-from-column = {};
"Mod+R".action.switch-preset-column-width = {};
"Mod+Shift+R".action.reset-window-height = {};
"Mod+F".action.maximize-column = {};
"Mod+Shift+F".action.fullscreen-window = {};
"Mod+C".action.center-column = {};
"Mod+R".action.switch-preset-column-width = {};
"Mod+Shift+R".action.reset-window-height = {};
"Mod+F".action.maximize-column = {};
"Mod+Shift+F".action.fullscreen-window = {};
"Mod+C".action.center-column = {};
"Mod+Minus".action.set-column-width = "-10%";
"Mod+Equal".action.set-column-width = "+10%";
"Mod+Minus".action.set-column-width = "-10%";
"Mod+Equal".action.set-column-width = "+10%";
"Mod+Shift+Minus".action.set-window-height = "-10%";
"Mod+Shift+Equal".action.set-window-height = "+10%";
"Mod+Shift+Minus".action.set-window-height = "-10%";
"Mod+Shift+Equal".action.set-window-height = "+10%";
"Print".action.screenshot = {};
"Ctrl+Print".action.screenshot-screen = {};
"Alt+Print".action.screenshot-window = {};
"Print".action.screenshot = {};
"Ctrl+Print".action.screenshot-screen = {};
"Alt+Print".action.screenshot-window = {};
# The quit action will show a confirmation dialog to avoid accidental exits.
"Mod+Shift+E".action.quit = {};
# The quit action will show a confirmation dialog to avoid accidental exits.
"Mod+Shift+E".action.quit = {};
# Powers off the monitors. To turn them back on, do any input like
# moving the mouse or pressing any other key.
"Mod+Shift+P".action.power-off-monitors = {};
# Powers off the monitors. To turn them back on, do any input like
# moving the mouse or pressing any other key.
"Mod+Shift+P".action.power-off-monitors = {};
};
# █ ▀
# ▄▄▄▄▄ ▄▄▄ ▄▄▄█ ▄▄▄ ▄▄▄
@ -181,56 +181,59 @@ in {
"XF86AudioPrev".action = sh ''${getExe pkgs.playerctl} prev'';
};
mediaBindingsAvizo = let
lightctl = getExe' config.services.avizo.package "lightctl";
volumectl = getExe' config.services.avizo.package "volumectl";
in mkIf config.services.avizo.enable {
"XF86MonBrightnessUp".action = sh ''${lightctl} up'';
"XF86MonBrightnessDown".action = sh ''${volumectl} down'';
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = sh ''${volumectl} -u up'';
lightctl = getExe' config.services.avizo.package "lightctl";
volumectl = getExe' config.services.avizo.package "volumectl";
in
mkIf config.services.avizo.enable {
"XF86MonBrightnessUp".action = sh ''${lightctl} up'';
"XF86MonBrightnessDown".action = sh ''${volumectl} down'';
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = sh ''${volumectl} -u up'';
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = sh ''${volumectl} -u down'';
};
"XF86AudioMute" = {
allow-when-locked = true;
action = sh ''${volumectl} toggle-mute'';
};
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = sh ''${volumectl} -u down'';
};
"XF86AudioMute" = {
allow-when-locked = true;
action = sh ''${volumectl} toggle-mute'';
};
};
mediaBindingsSwayOSD = let
swayosd-client = getExe' config.services.swayosd.package "swayosd-client";
in mkIf config.services.swayosd.enable {
"XF86MonBrightnessUp".action = sh ''${swayosd-client} --brightness raise'';
"XF86MonBrightnessDown".action = sh ''${swayosd-client} --brightness lower'';
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = sh ''${swayosd-client} --output-volume 2'';
swayosd-client = getExe' config.services.swayosd.package "swayosd-client";
in
mkIf config.services.swayosd.enable {
"XF86MonBrightnessUp".action = sh ''${swayosd-client} --brightness raise'';
"XF86MonBrightnessDown".action = sh ''${swayosd-client} --brightness lower'';
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = sh ''${swayosd-client} --output-volume 2'';
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = sh ''${swayosd-client} --output-volume -2'';
};
"XF86AudioMute" = {
allow-when-locked = true;
action = sh ''${swayosd-client} --output-volume mute-toggle'';
};
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = sh ''${swayosd-client} --output-volume -2'';
};
"XF86AudioMute" = {
allow-when-locked = true;
action = sh ''${swayosd-client} --output-volume mute-toggle'';
};
};
mediaBindingsAvizoless = mkIf (!(config.services.avizo.enable || config.services.swayosd.enable)) {
"XF86MonBrightnessUp".action = sh ''${getExe pkgs.brightnessctl} -c backlight set 5%+'';
"XF86MonBrightnessDown".action = sh ''${getExe pkgs.brightnessctl} -c backlight set 5%-'';
"XF86AudioRaiseVolume".action = sh ''${parent.services.wireplumber.package}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+'';
"XF86AudioLowerVolume".action = sh ''${parent.services.wireplumber.package}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-'';
"XF86AudioMute".action = sh ''${parent.services.wireplumber.package}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle'';
"XF86MonBrightnessUp".action = sh ''${getExe pkgs.brightnessctl} -c backlight set 5%+'';
"XF86MonBrightnessDown".action = sh ''${getExe pkgs.brightnessctl} -c backlight set 5%-'';
"XF86AudioRaiseVolume".action = sh ''${parent.services.wireplumber.package}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+'';
"XF86AudioLowerVolume".action = sh ''${parent.services.wireplumber.package}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-'';
"XF86AudioMute".action = sh ''${parent.services.wireplumber.package}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle'';
};
in
mkMerge (workspaceBindings ++ [
mkMerge (workspaceBindings
++ [
stockBindings
personalBindings
mediaBindingsCommon
mediaBindingsAvizo
mediaBindingsSwayOSD
mediaBindingsAvizoless
]);
]);
}

View file

@ -1,4 +1,4 @@
{ config, ... }: {
{config, ...}: {
stylix.targets.fuzzel.enable = config.programs.fuzzel.enable;
programs.fuzzel = {
enable = true;

View file

@ -1,7 +1,4 @@
{
config,
...
}: {
{config, ...}: {
sops.secrets.konawall-py-env = {
sopsFile = ./konawall.yaml;
};

View file

@ -3,11 +3,11 @@
enable = true;
timeouts = [
{
timeout = 180;
timeout = 600;
command = "${config.programs.swaylock.package}/bin/swaylock* -f";
}
{
timeout = 600;
timeout = 1200;
command = "${config.programs.niri.package}/bin/niri msg action power-off-monitors";
}
];

View file

@ -6,7 +6,7 @@
screenshots = true;
indicator = true;
clock = true;
grace = 2;
grace = 10;
fade-in = 2;
effect-blur = "7x5";
effect-vignette = "0.5:0.5";

View file

@ -8,8 +8,8 @@ _: {
layer-shell = true;
layer = "overlay";
control-center-layer = "top";
widgets = [ "mpris" "dnd" "title" "notifications" "inhibitors" "backlight" "volume" ];
widget-config = {
widgets = ["mpris" "dnd" "title" "notifications" "inhibitors" "backlight" "volume"];
widget-config = {
title = {
text = "Notifications";
clear-all-button = true;

View file

@ -1,58 +1,53 @@
{
lib,
config,
pkgs,
...
}:
_:
#let
# theme = with config.lib.stylix.colors.withHashtag; pkgs.writeTextFile {
# name = "swayosd-css";
# text = ''
#window#osd {
# padding: 12px 20px;
# border-radius: 999px;
# border: solid 2px ${base0D};
# background: alpha(${base01}, 0.99);
#}
#
##container {
# margin: 16px;
#}
#
#image,
#label {
# color: ${base05};
#}
#
#progressbar:disabled,
#image:disabled {
# opacity: 0.5;
#}
#
#progressbar {
# min-height: 6px;
# border-radius: 999px;
# background: transparent;
# border: none;
#}
#
#trough {
# min-height: inherit;
# border-radius: inherit;
# border: none;
# background: alpha(${base01},0.3);
#}
#
#progress {
# min-height: inherit;
# border-radius: inherit;
# border: none;
# background: ${base01};
#}
# '';
# theme = with config.lib.stylix.colors.withHashtag; pkgs.writeTextFile {
# name = "swayosd-css";
# text = ''
#window#osd {
# padding: 12px 20px;
# border-radius: 999px;
# border: solid 2px ${base0D};
# background: alpha(${base01}, 0.99);
#}
#
##container {
# margin: 16px;
#}
#
#image,
#label {
# color: ${base05};
#}
#
#progressbar:disabled,
#image:disabled {
# opacity: 0.5;
#}
#
#progressbar {
# min-height: 6px;
# border-radius: 999px;
# background: transparent;
# border: none;
#}
#
#trough {
# min-height: inherit;
# border-radius: inherit;
# border: none;
# background: alpha(${base01},0.3);
#}
#
#progress {
# min-height: inherit;
# border-radius: inherit;
# border: none;
# background: ${base01};
#}
# '';
#};
#in
{
{
services.swayosd = {
enable = true;
#stylePath = theme;

View file

@ -53,10 +53,10 @@ _: {
}
{
matches = [
{app-id="^com.github.wwmm.easyeffects$";}
{app-id="^.blueman-manager-wrapped$";}
{app-id="^org.pulseaudio.pavucontrol$";}
{app-id="^com.saivert.pwvucontrol$";}
{app-id = "^com.github.wwmm.easyeffects$";}
{app-id = "^.blueman-manager-wrapped$";}
{app-id = "^org.pulseaudio.pavucontrol$";}
{app-id = "^com.saivert.pwvucontrol$";}
];
open-on-workspace = "audio";
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{pkgs, ...}: {
xdg = {
enable = true;
autostart.enable = true;