From 088015c62ca91f6253f8607fd55eb2f6f14085e5 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Fri, 27 Mar 2026 17:41:30 +0100 Subject: 2026-03-27 updates by auto-switch --- common/home/hyprland/default.nix | 32 +++++++++--------- common/home/scripts/loadconfig | 59 ++++++++++++++++++++++++++++------ common/home/services/dunst/default.nix | 13 ++++++-- hosts/nixedo/default.nix | 18 +++++++---- 4 files changed, 86 insertions(+), 36 deletions(-) diff --git a/common/home/hyprland/default.nix b/common/home/hyprland/default.nix index ff31c54..e2d0a27 100644 --- a/common/home/hyprland/default.nix +++ b/common/home/hyprland/default.nix @@ -37,7 +37,7 @@ "$mod+Shift, P, exec, wofi-pass" "$mod+Shift, O, exec, wofi-pass otp" "$mod+Shift, E, exec, webtrayctl show https://chat.nathanreiner.xyz" - "$mod+Shift, J, exec, webtrayctl show https://jellyfin.nathanreiner.xyz" + "$mod+Shift+Alt, J, exec, webtrayctl show https://jellyfin.nathanreiner.xyz" "$mod+Shift, S, exec, signal-desktop" ", Print, exec, grimshot copy area" @@ -101,15 +101,15 @@ general = { gaps_in = 0; - gaps_out = 0; + gaps_out = 5; layout = "master"; - border_size = 3; - "col.active_border" = "rgba(b16286ff)"; + border_size = 1; + "col.active_border" = "rgba(3c3836ff)"; "col.inactive_border" = "rgba(3c3836ff)"; }; decoration = { - rounding = 0; + rounding = 4; shadow = { enabled = true; range = true; @@ -118,15 +118,14 @@ }; animations = { - enabled = false; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + enabled = true; animation = [ - "windows, 1, 3, myBezier" - "windowsOut, 1, 3, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 3, default" - "workspaces, 1, 3, default" + "windows, 1, 2, default" + "layers, 1, 2, default" + "border, 1, 2, default" + "borderangle, 1, 2, default" + "fade, 1, 2, default" + "workspaces, 1, 2, default" ]; }; @@ -153,10 +152,6 @@ }; }; - #gestures = { - # gesture = "4, horizontal, workspace"; - #}; - misc = { disable_hyprland_logo = true; disable_splash_rendering = true; @@ -186,6 +181,9 @@ # Waydroid "float, size 500 900, class:^(waydroid\\..*)$" "float, size 500 900, class:^(Waydroid)$" + + # Nextcloud + "float, move 100%-500 20, size 500 800, noborder, noblur, xray, pin, stayfocused, class:^(com.nextcloud\\..*)$, title:^(Nextcloud)$" ]; ecosystem = { diff --git a/common/home/scripts/loadconfig b/common/home/scripts/loadconfig index 9f3fe57..f355092 100644 --- a/common/home/scripts/loadconfig +++ b/common/home/scripts/loadconfig @@ -1,15 +1,54 @@ #!/bin/sh -cmd=$(printf "test\nswitch" | wofi -d -p 'Loading Type') +CONFIG_PATH=$HOME/global/system/config/ -[ -z "$cmd" ] && exit +NID=$RANDOM -echo CMD = $cmd +cmd=$(printf "Test\nSwitch\nCommit\nUpdate" | wofi -d -p 'Select') -alacritty --class Hyprland::WinClass::Floating -e sh -c " -sudo nixos-rebuild $cmd --flake '$HOME/global/system/config/' -echo -echo Press [Return] to continue -echo -read -" +kind=test +desc=Temporarily + +case "$cmd" in + + Update) + nix flake update --flake "$CONFIG_PATH" + dunstify " NixOS - Config" "Updated Flake" + ;;& + + Switch | Commit | Update) + git -C "$CONFIG_PATH" add . + git -C "$CONFIG_PATH" commit -m "$(date '+%Y-%m-%d updates by auto-switch')" + dunstify " NixOS - Config" "Created New Commit" + + case "$cmd" in + Commit | Update) exit; + esac + + kind=switch + desc=Permanently + ;;& + + Test | Switch) + dunstify -r "$NID" " NixOS - Config" "Switching Config $desc." --hints=int:value:0 -t 0 + + declare -i i=0 + + sudo nixos-rebuild "$kind" --flake "$CONFIG_PATH" 2>&1 | while read line; do + case "$line" in + these*)n=$(echo "$line" | grep -Eo '[0-9]*');; + "building '"*) + i+=1 + progress=$(($i * 100 / $n)) + dunstify -r "$NID" " NixOS - Config" "Switching Config $desc." --hints=int:value:"$progress" -t 0 + ;; + *error*) + dunstify -r "$NID" -u 2 " NixOS - Config" "Error Loading Config" + ;; + Done.) + dunstify -r "$NID" " NixOS - Config" "Switching Config $desc.\nDone." + ;; + esac + done + ;; +esac diff --git a/common/home/services/dunst/default.nix b/common/home/services/dunst/default.nix index 28438e0..63ff585 100644 --- a/common/home/services/dunst/default.nix +++ b/common/home/services/dunst/default.nix @@ -7,10 +7,19 @@ height = 300; offset = "30x30"; origin = "top-right"; - transparency = 0; - frame_color = "#b16286"; + transparency = 5; + frame_color = "#3c3836"; + frame_width = 1; corner_radius = 5; font = "SauceCodePro NF 9"; + follow = "mouse"; + + progress_bar_height = 5; + progress_bar_corner_radius = 4; + progress_bar_frame_width = 1; + progress_bar_frame_color = "#3c3836"; + + highlight = "#ebdbb2"; }; urgency_normal = { diff --git a/hosts/nixedo/default.nix b/hosts/nixedo/default.nix index 334be55..b294654 100644 --- a/hosts/nixedo/default.nix +++ b/hosts/nixedo/default.nix @@ -70,13 +70,16 @@ } ]; - systemd.services.ModemManager = { - enable = lib.mkForce true; - path = [ pkgs.libqmi ]; - wantedBy = [ - "multi-user.target" - "network.target" - ]; + systemd.services = { + waydroid-container.enable = true; + ModemManager = { + enable = lib.mkForce true; + path = [ pkgs.libqmi ]; + wantedBy = [ + "multi-user.target" + "network.target" + ]; + }; }; hardware.tuxedo-rs = { @@ -88,6 +91,7 @@ virtualisation = { libvirtd.enable = true; + waydroid.enable = true; }; system.stateVersion = "24.05"; -- cgit v1.2.3-70-g09d2