Compare commits

..

6 Commits

7 changed files with 211 additions and 147 deletions

View File

@ -3,9 +3,38 @@
pkgs, pkgs,
... ...
}: { }: {
home.file."${config.xdg.configHome}/mpv" = { home.file."${config.xdg.configHome}/mpv/scripts".source = ./files/scripts;
source = ./files; home.file."${config.xdg.configHome}/mpv/fonts".source = ./files/fonts;
recursive = true;
programs.mpv = {
enable = true;
config = {
osc = false;
save-position-on-quit = true;
sub-auto = "fuzzy";
sub-font-size = 46;
profile = "gpu-hq";
scale = "ewa_lanczossharp";
cscale = "ewa_lanczossharp";
video-sync = "display-resample";
interpolation = true;
tscale = "oversample";
vo = "gpu";
hwdec = "auto";
force-window = true;
keep-open = true;
};
bindings = {
"Ctrl+Shift+r" = "add sub-scale +0.05";
"Ctrl+r" = "add sub-scale -0.05";
"Ctrl+Alt+r" = "set sub-scale 1";
};
profiles.Idle = {
profile-cond = ''p["idle-active"]'';
profile-restore = "copy-equal";
title = "' '";
keepaspect = false;
background = "none";
};
}; };
programs.mpv = {enable = true;};
} }

View File

@ -1,20 +0,0 @@
osc=no
save-position-on-quit=yes
sub-auto=fuzzy
profile=gpu-hq
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
video-sync=display-resample
interpolation
tscale=oversample
vo=gpu
hwdec=auto
force-window=yes
keep-open=yes
[Idle]
profile-cond=p["idle-active"]
profile-restore=copy-equal
title=' '
keepaspect=no
background=none

View File

@ -1,4 +1,8 @@
{pkgs, scale ? null, ...}: let {
pkgs,
scale ? null,
...
}: let
terminal = "${pkgs.foot}/bin/footclient"; terminal = "${pkgs.foot}/bin/footclient";
nautilus = "${pkgs.nautilus}/bin/nautilus"; nautilus = "${pkgs.nautilus}/bin/nautilus";
playerctl = "${pkgs.playerctl}/bin/playerctl"; playerctl = "${pkgs.playerctl}/bin/playerctl";
@ -53,6 +57,9 @@
in { in {
# Since native Home Manager doesn't have a programs.niri module yet, # Since native Home Manager doesn't have a programs.niri module yet,
# we generate the KDL configuration file directly. # we generate the KDL configuration file directly.
home.packages = with pkgs; [
wl-clipboard
];
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
settings = { settings = {
@ -129,11 +136,15 @@ in {
focus-follows-mouse max-scroll-amount="10%" focus-follows-mouse max-scroll-amount="10%"
warp-mouse-to-focus warp-mouse-to-focus
} }
${if scale != null then '' ${
if scale != null
then ''
output "eDP-1" { output "eDP-1" {
scale ${toString scale} scale ${toString scale}
} }
'' else ""} window-rule { ''
else ""
} window-rule {
match app-id="vicinae" match app-id="vicinae"
open-floating true open-floating true
} }
@ -150,8 +161,8 @@ ${if scale != null then ''
Mod+Tab { toggle-overview; } Mod+Tab { toggle-overview; }
// Vicinae Binds // Vicinae Binds
Mod+C { spawn "vicinae" "vicinae://extensions/vicinae/clipboard/history"; } Mod+C { spawn "vicinae" "vicinae://launch/clipboard/history"; }
Mod+N { spawn "vicinae" "vicinae://extensions/vicinae/wm/switch-windows"; } Mod+N { spawn "vicinae" "vicinae://launch/wm/switch-windows"; }
Mod+Escape { spawn "vicinae" "open" "-q" "Power Management "; } Mod+Escape { spawn "vicinae" "open" "-q" "Power Management "; }
Mod+Space { spawn "vicinae" "toggle"; } Mod+Space { spawn "vicinae" "toggle"; }

View File

@ -5,5 +5,27 @@
enable = true; enable = true;
autoStart = true; autoStart = true;
}; };
settings = {
font = {
normal = {
family = "Ubuntu Nerd Font";
size = 8;
};
};
theme = {
dark = {
name = "ayu-dark";
};
};
launcher_window = {
opacity = 0.95;
client_side_decorations = {
enabled = true;
border_width = 0;
rounding = 10;
shadow_size = 0;
};
};
};
}; };
} }

View File

@ -77,6 +77,10 @@
source ${./files/keys.zsh} source ${./files/keys.zsh}
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
export LD_LIBRARY_PATH=${pkgs.sqlite.out}/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=${pkgs.sqlite.out}/lib:$LD_LIBRARY_PATH
# Fix zsh-vi-mode bracketed paste: the trailing ~ of \e[201~ leaks
# into vicmd and toggles case of the last pasted character.
bindkey -M viins '^[[200~' .bracketed-paste
bindkey -M vicmd '^[[200~' .bracketed-paste
} }
function o() { function o() {
${pkgs.handlr-regex}/bin/handlr open $@ < /dev/null &> /dev/null & disown ${pkgs.handlr-regex}/bin/handlr open $@ < /dev/null &> /dev/null & disown

View File

@ -89,8 +89,8 @@
# xplr # xplr shell (https://github.com/sayanarijit/xplr) # xplr # xplr shell (https://github.com/sayanarijit/xplr)
# vim_shell # vim shell indicator (:sh) # vim_shell # vim shell indicator (:sh)
# midnight_commander # midnight commander shell (https://midnight-commander.org/) # midnight_commander # midnight commander shell (https://midnight-commander.org/)
nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) # nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)
vi_mode # vi mode (you don't need this if you've enabled prompt_char) # vi_mode # vi mode (you don't need this if you've enabled prompt_char)
# vpn_ip # virtual private network indicator # vpn_ip # virtual private network indicator
# load # CPU load # load # CPU load
# disk_usage # disk usage # disk_usage # disk usage

View File

@ -128,7 +128,7 @@ in {
peers = [ peers = [
{ {
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c="; publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = ["0.0.0.0/0" "::/0"]; allowedIPs = ["0.0.0.0/0"];
endpoint = "external.thomasave.be:13231"; endpoint = "external.thomasave.be:13231";
persistentKeepalive = 25; persistentKeepalive = 25;
} }
@ -138,7 +138,7 @@ in {
address = ["10.0.0.5/24"]; address = ["10.0.0.5/24"];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key"; privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820; listenPort = 51820;
autostart = true; autostart = false;
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;"; postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
dns = ["10.0.0.1"]; dns = ["10.0.0.1"];
peers = [ peers = [
@ -162,6 +162,7 @@ in {
enable = true; enable = true;
extraUpFlags = [ extraUpFlags = [
"--login-server=https://headscale.thomasave.be" "--login-server=https://headscale.thomasave.be"
"--accept-routes"
]; ];
authKeyFile = "/home/user/.secrets/Tailscale/Aloria/authkey"; authKeyFile = "/home/user/.secrets/Tailscale/Aloria/authkey";
}; };
@ -177,5 +178,22 @@ in {
"net.ipv6.conf.all.disable_ipv6" = 1; "net.ipv6.conf.all.disable_ipv6" = 1;
"net.ipv6.conf.default.disable_ipv6" = 1; "net.ipv6.conf.default.disable_ipv6" = 1;
"net.ipv6.conf.lo.disable_ipv6" = 1; "net.ipv6.conf.lo.disable_ipv6" = 1;
"net.ipv4.ip_forward" = 1;
"net.ipv4.conf.all.forwarding" = 1;
};
systemd.services.tailscale-ethtool-tweaks = {
description = "Apply ethtool tweaks for Tailscale subnet routing performance";
wantedBy = ["multi-user.target"];
after = ["network-online.target"];
wants = ["network-online.target"];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = pkgs.writeShellScript "tailscale-ethtool-tweaks" ''
NETDEV=$(${pkgs.iproute2}/bin/ip -o route get 1.1.1.1 | ${pkgs.coreutils}/bin/cut -f 5 -d " ")
${pkgs.ethtool}/bin/ethtool -K "$NETDEV" rx-udp-gro-forwarding on rx-gro-list off
'';
};
}; };
} }