From 4b6451294bf3c30e13f6dada2c0caaaa09011d45 Mon Sep 17 00:00:00 2001 From: DACHXY Date: Wed, 1 Jan 2025 16:28:52 +0800 Subject: [PATCH] fxi: waybar restart script --- home/config/scripts/waybarRestart.sh | 2 +- home/config/waybar/modules.json | 7 +++++-- system/modules/virtualization.nix | 21 +++++++++++++++++---- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/home/config/scripts/waybarRestart.sh b/home/config/scripts/waybarRestart.sh index b149c21..c4d7562 100755 --- a/home/config/scripts/waybarRestart.sh +++ b/home/config/scripts/waybarRestart.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash #Restart Waybar and swaync - +XDG_CONFIG_HOME="$HOME/.dummy" # Prevent swaync use default gtk theme killall .waybar-wrapped killall .swaync-wrapped waybar -c ~/.config/waybar/config.json -s ~/.config/waybar/style.css & diff --git a/home/config/waybar/modules.json b/home/config/waybar/modules.json index 5b8d633..c84e409 100644 --- a/home/config/waybar/modules.json +++ b/home/config/waybar/modules.json @@ -59,8 +59,11 @@ "offscreen-css-text": "(inactive)", "rewrite": { "nvim . (.*)": " $1", - "(.*) - Discord": " $1", - "(.*) — Mozilla Firefox": " $1" + "\\(\\d+\\) Discord (.*)": " $1", + "(.*) - YouTube — Mozilla Firefox": " $1", + "(.*) — Mozilla Firefox": " $1", + "(.*) - VLC media player": " $1", + "(.*) - YouTube Music — Mozilla Firefox": "󰎆 $1" } }, diff --git a/system/modules/virtualization.nix b/system/modules/virtualization.nix index a314996..46468b8 100644 --- a/system/modules/virtualization.nix +++ b/system/modules/virtualization.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs.virt-manager.enable = true; @@ -15,11 +15,24 @@ libvirtd = { enable = true; - qemu.swtpm.enable = true; - qemu.ovmf.enable = true; - qemu.ovmf.packages = [ pkgs.OVMFFull.fd ]; + qemu = { + package = pkgs.qemu_kvm; + swtpm.enable = true; + ovmf.enable = true; + ovmf.packages = [ pkgs.OVMFFull.fd ]; + }; }; spiceUSBRedirection.enable = true; }; + + environment.etc = { + "ovmf/edk2-x86_64-secure-code.fd" = { + source = config.virtualisation.libvirtd.qemu.package + "/share/qemu/edk2-x86_64-secure-code.fd"; + }; + + "ovmf/edk2-i386-vars.fd" = { + source = config.virtualisation.libvirtd.qemu.package + "/share/qemu/edk2-i386-vars.fd"; + }; + }; }