Auto: cleanup-2026-08-15T19-17-50Z

This commit is contained in:
tomasr committed 2026-08-15 21:18:15 +02:00
1 parent 18fbd68abe
commit 9b0dbd70a4
5 files changed
+86 -93

No files matched your search

+66 -68
View File
@@ -35,75 +35,73 @@ _: {
services.xserver.enable = true; services.xserver.enable = true;
}; };
flake.homeModules.hyprland-laptop = { flake.homeModules.hyprland-laptop = {
home.file.".config/hypr/host.lua" = { home.file.".config/hypr/host.lua" = {
text = '' text = ''
hl.on("hyprland.start", function() hl.on("hyprland.start", function()
hl.exec_cmd("qtbatticon") hl.exec_cmd("qtbatticon")
hl.exec_cmd("source /run/agenix/ntfy && nixpkgs-notifier listen") hl.exec_cmd("source /run/agenix/ntfy && nixpkgs-notifier listen")
end) end)
hl.monitor({
output = "eDP-1",
mode = "highres@highrr",
position = "0x0",
scale = 1,
})
'';
enable = true;
force = true;
};
};
flake.homeModules.hyprland-desktop = {
home.file.".config/hypr/host.lua" = {
text = ''
hl.monitor({
output = "",
mode = "preferred",
position = "auto",
scale = 0.75,
})
'';
enable = true;
force = true;
};
};
flake.homeModules.hyprland = {pkgs-unstable, ... }:
let
wallpaper1 = ../../assets/wallpaper1.jpg;
wallpaper2 = ../../assets/wallpaper2.jpg;
wallpaper3 = ../../assets/wallpaper3.jpg;
wallpaper4 = ../../assets/wallpaper4.jpg;
wallpaper5 = ../../assets/wallpaper5.jpg;
hyprlandLua = builtins.replaceStrings hl.monitor({
[ output = "eDP-1",
"WALLPAPER1/PATH/PLACEHOLDER" mode = "highres@highrr",
"WALLPAPER2/PATH/PLACEHOLDER" position = "0x0",
"WALLPAPER3/PATH/PLACEHOLDER" scale = 1,
"WALLPAPER4/PATH/PLACEHOLDER" })
"WALLPAPER5/PATH/PLACEHOLDER" '';
] enable = true;
[ force = true;
(toString wallpaper1) };
(toString wallpaper2) };
(toString wallpaper3) flake.homeModules.hyprland-desktop = {
(toString wallpaper4) home.file.".config/hypr/host.lua" = {
(toString wallpaper5) text = ''
] hl.monitor({
(builtins.readFile ../../other/hyprland/hyprland.lua); output = "",
in mode = "preferred",
{ position = "auto",
scale = 0.75,
})
'';
enable = true;
force = true;
};
};
flake.homeModules.hyprland = {pkgs-unstable, ...}: let
wallpaper1 = ../../assets/wallpaper1.jpg;
wallpaper2 = ../../assets/wallpaper2.jpg;
wallpaper3 = ../../assets/wallpaper3.jpg;
wallpaper4 = ../../assets/wallpaper4.jpg;
wallpaper5 = ../../assets/wallpaper5.jpg;
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/ hyprlandLua =
wayland.windowManager.hyprland.enable = true; builtins.replaceStrings
wayland.windowManager.hyprland.package = pkgs-unstable.hyprland; [
#hint Electron apps to use on wayland; "WALLPAPER1/PATH/PLACEHOLDER"
home.sessionVariables.NIXOS_OZONE_WL = "1"; "WALLPAPER2/PATH/PLACEHOLDER"
wayland.windowManager.hyprland.plugins = [ "WALLPAPER3/PATH/PLACEHOLDER"
#pkgs-unstable.hyprlandPlugins.hyprspace # currently broken "WALLPAPER4/PATH/PLACEHOLDER"
#pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors "WALLPAPER5/PATH/PLACEHOLDER"
]; ]
wayland.windowManager.hyprland.configType = "lua"; [
wayland.windowManager.hyprland.extraConfig = hyprlandLua; (toString wallpaper1)
(toString wallpaper2)
(toString wallpaper3)
(toString wallpaper4)
(toString wallpaper5)
]
(builtins.readFile ../../other/hyprland/hyprland.lua);
in {
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.package = pkgs-unstable.hyprland;
#hint Electron apps to use on wayland;
home.sessionVariables.NIXOS_OZONE_WL = "1";
wayland.windowManager.hyprland.plugins = [
#pkgs-unstable.hyprlandPlugins.hyprspace # currently broken
#pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors
];
wayland.windowManager.hyprland.configType = "lua";
wayland.windowManager.hyprland.extraConfig = hyprlandLua;
}; };
} }
+1 -1
View File
@@ -333,7 +333,7 @@ _: {
} }
}) })
vim.lsp.config("texlab", { cmd = { "texlab" }, filetypes = { "tex" }, on_attach = on_attach }) vim.lsp.config("texlab", { cmd = { "texlab" }, filetypes = { "tex" }, on_attach = on_attach })
-- i remove ltex from being enable bellow as it's too anoying and doesn't really help as sometime i write in french and other times in english/spanish or even german -- i remove ltex from being enable bellow as it's too anoying and doesn't really help as sometime i write in french and other times in english/spanish or even german
vim.lsp.config("ltex", { vim.lsp.config("ltex", {
cmd = { "ltex-ls-plus" }, cmd = { "ltex-ls-plus" },
+1 -1
View File
@@ -51,7 +51,7 @@ _: {
command cat "$@" command cat "$@"
fi fi
} }
custom-eza() { # behaves differently if we just call it or if we pipe initContent custom-eza() { # behaves differently if we just call it or if we pipe initContent
if [[ -t 1 ]]; then if [[ -t 1 ]]; then
eza -hlF -aa --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions "$@" eza -hlF -aa --color=always --hyperlink --group-directories-first --show-symlinks --icons=always --git --no-permissions "$@"
+1 -5
View File
@@ -1,8 +1,4 @@
{ {self, ...}: {
self,
inputs,
...
}: {
flake.nixosModules.battery-laptop = {pkgs, ...}: flake.nixosModules.battery-laptop = {pkgs, ...}:
# https://discourse.nixos.org/t/what-is-the-best-option-for-power-management/63406/2 # https://discourse.nixos.org/t/what-is-the-best-option-for-power-management/63406/2
# we just activate tlp unconditonally # we just activate tlp unconditonally
+17 -18
View File
@@ -1,6 +1,6 @@
# config for openconnect is in ./epfl.nix # config for openconnect is in ./epfl.nix
{self, ...}: { {self, ...}: {
flake.nixosModules.vpn = {pkgs,...}: { flake.nixosModules.vpn = {pkgs, ...}: {
services.mullvad-vpn = { services.mullvad-vpn = {
enable = true; enable = true;
}; };
@@ -10,12 +10,11 @@
age.secrets.epfl = { age.secrets.epfl = {
file = ../../secrets/epfl.age; file = ../../secrets/epfl.age;
}; };
}; };
perSystem = {pkgs, ...}: { perSystem = {pkgs, ...}: {
packages.custom-vpn-picker = pkgs.writeShellApplication { packages.custom-vpn-picker = pkgs.writeShellApplication {
name = "custom-vpn-picker"; name = "custom-vpn-picker";
runtimeInputs = with pkgs; [ runtimeInputs = with pkgs; [
fzf fzf
mullvad-compass mullvad-compass
@@ -25,14 +24,14 @@
wl-clipboard wl-clipboard
cliphist cliphist
]; ];
text = '' text = ''
mullvad_connect () { mullvad_connect () {
mullvad disconnect mullvad disconnect
mullvad relay set location "$1" mullvad relay set location "$1"
mullvad connect mullvad connect
} }
profiles=( profiles=(
"mullvad-best" "mullvad-best"
"mullvad-zurich" "mullvad-zurich"
@@ -41,12 +40,12 @@
"epfl" "epfl"
"disconnect" "disconnect"
) )
selected=$(printf "%s\n" "''${profiles[@]}" | selected=$(printf "%s\n" "''${profiles[@]}" |
fzf --height 8 --reverse --prompt="Select vpn:") fzf --height 8 --reverse --prompt="Select vpn:")
[[ -z "$selected" ]] && exit 0 [[ -z "$selected" ]] && exit 0
if [[ "$selected" == "mullvad-best" ]]; then if [[ "$selected" == "mullvad-best" ]]; then
mullvad_connect "$( mullvad_connect "$(
mullvad-compass | mullvad-compass |
@@ -56,42 +55,42 @@
print a[1] print a[1]
}' }'
)" )"
elif [[ "$selected" == "mullvad-zurich" ]]; then elif [[ "$selected" == "mullvad-zurich" ]]; then
mullvad_connect ch mullvad_connect ch
elif [[ "$selected" == "mullvad-tirana" ]]; then elif [[ "$selected" == "mullvad-tirana" ]]; then
mullvad_connect al mullvad_connect al
elif [[ "$selected" == "mullvad-bogota" ]]; then elif [[ "$selected" == "mullvad-bogota" ]]; then
mullvad_connect co mullvad_connect co
elif [[ "$selected" == "epfl" ]]; then elif [[ "$selected" == "epfl" ]]; then
# shellcheck disable=SC1091 # shellcheck disable=SC1091
source /run/agenix/epfl source /run/agenix/epfl
# Put password in clipboard so it can be pasted into openconnect. # Put password in clipboard so it can be pasted into openconnect.
printf '%s' "$EPFL_VPN_PASSWORD" | wl-copy printf '%s' "$EPFL_VPN_PASSWORD" | wl-copy
sudo openconnect \ sudo openconnect \
--background \ --background \
--pid-file="$HOME/.local/state/epfl-openconnect.pid" \ --pid-file="$HOME/.local/state/epfl-openconnect.pid" \
--server="$EPFL_VPN_SERVER" \ --server="$EPFL_VPN_SERVER" \
--user="$EPFL_VPN_USER" --user="$EPFL_VPN_USER"
# Remove the password from cliphist and clear the current clipboard. # Remove the password from cliphist and clear the current clipboard.
cliphist delete-query "$EPFL_VPN_PASSWORD" || true cliphist delete-query "$EPFL_VPN_PASSWORD" || true
wl-copy --clear wl-copy --clear
elif [[ "$selected" == "disconnect" ]]; then elif [[ "$selected" == "disconnect" ]]; then
if [[ -f "$HOME/.local/state/epfl-openconnect.pid" ]]; then if [[ -f "$HOME/.local/state/epfl-openconnect.pid" ]]; then
sudo kill "$(cat "$HOME/.local/state/epfl-openconnect.pid")" 2>/dev/null || true sudo kill "$(cat "$HOME/.local/state/epfl-openconnect.pid")" 2>/dev/null || true
fi fi
mullvad disconnect mullvad disconnect
rm "$HOME/.local/state/epfl-openconnect.pid" rm "$HOME/.local/state/epfl-openconnect.pid"
fi fi
pkill -f "kitty.*Select vpn option" || true pkill -f "kitty.*Select vpn option" || true
exit exit
''; '';