From ba711567250ae4a74bacff8c40de8ee51dbef620 Mon Sep 17 00:00:00 2001 From: Adam0 Date: Mon, 1 Jun 2026 09:53:38 +0200 Subject: [PATCH] remove vm and actually fix overzicht --- .gitignore | 1 - .../hyprland/keybinds/window-management.nix | 21 -------- modules/desktop/hyprland/rules.nix | 5 +- modules/hosts/default.nix | 7 --- modules/hosts/vm/default.nix | 37 -------------- modules/hosts/vm/hardware.nix | 20 -------- modules/hosts/vm/home.nix | 37 -------------- modules/programs/gui/virt-manager.nix | 50 ------------------- 8 files changed, 2 insertions(+), 176 deletions(-) delete mode 100644 modules/hosts/vm/default.nix delete mode 100644 modules/hosts/vm/hardware.nix delete mode 100644 modules/hosts/vm/home.nix delete mode 100644 modules/programs/gui/virt-manager.nix diff --git a/.gitignore b/.gitignore index d9ffcf8..582ee4e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ .direnv .rumdl_cache result* -vm.qcow2 # keep-sorted end diff --git a/modules/desktop/hyprland/keybinds/window-management.nix b/modules/desktop/hyprland/keybinds/window-management.nix index 3de37fa..184937c 100644 --- a/modules/desktop/hyprland/keybinds/window-management.nix +++ b/modules/desktop/hyprland/keybinds/window-management.nix @@ -40,13 +40,6 @@ lua = "zoom_reset"; } - { - description = "Reset zoom"; - - keys = ["SUPER" "SHIFT" "mouse_down"]; - lua = "zoom_reset"; - } - { description = "Toggle floating"; @@ -81,13 +74,6 @@ options.repeating = true; } - { - description = "Zoom in"; - - keys = ["SUPER" "mouse_down"]; - lua = "function() zoom(1.1) end"; - } - { description = "Zoom out"; @@ -96,13 +82,6 @@ options.repeating = true; } - - { - description = "Zoom out"; - - keys = ["SUPER" "mouse_up"]; - lua = "function() zoom(0.9) end"; - } # keep-sorted end ]) ]; diff --git a/modules/desktop/hyprland/rules.nix b/modules/desktop/hyprland/rules.nix index 1e963cf..ca9dfb6 100644 --- a/modules/desktop/hyprland/rules.nix +++ b/modules/desktop/hyprland/rules.nix @@ -25,8 +25,7 @@ hyprfocus = "${pkgs.hyprlandPlugins.hyprfocus}/lib/libhyprfocus.so"; hyprpicker = getExe pkgs.hyprpicker; noctalia-qs = getExe' inputs.noctalia-qs.packages.${pkgs.stdenv.hostPlatform.system}.quickshell ".quickshell-wrapped"; - overzicht = "${escapeRegex quickshell}.*${escapeRegex "${config.programs.overzicht.package}/share/overzicht"}"; - quickshell = getExe pkgs.quickshell; + overzicht = getExe' config.programs.quickshell.package ".quickshell-wrapped"; xdg-desktop-portal-hyprland = getExe' osConfig.programs.hyprland.portalPackage ".xdg-desktop-portal-hyprland-wrapped"; # keep-sorted end in { @@ -70,7 +69,7 @@ } { - binary = overzicht; + binary = escapeRegex overzicht; mode = "allow"; type = "screencopy"; } diff --git a/modules/hosts/default.nix b/modules/hosts/default.nix index d0e0133..18f9c05 100644 --- a/modules/hosts/default.nix +++ b/modules/hosts/default.nix @@ -11,7 +11,6 @@ # keep-sorted start mapAttrs mkDefault - optionalAttrs # keep-sorted end ; @@ -19,15 +18,9 @@ # keep-sorted start desktop = "x86_64-linux"; laptop = "x86_64-linux"; - vm = "x86_64-linux"; # keep-sorted end }; in { - perSystem = {system, ...}: - optionalAttrs (system == hosts.vm) { - packages.vm = self.nixosConfigurations.vm.config.system.build.vm; - }; - flake.nixosConfigurations = mapAttrs (name: system: self.lib.nixosSystem { specialArgs = { diff --git a/modules/hosts/vm/default.nix b/modules/hosts/vm/default.nix deleted file mode 100644 index 15d6cec..0000000 --- a/modules/hosts/vm/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{self, ...}: { - flake.modules.nixos.vm = {vars, ...}: let - inherit (vars) username; - in { - imports = with self.modules.nixos; [ - # Profiles - # keep-sorted start - gaming - personal - # keep-sorted end - ]; - - networking.hostName = "vm"; - - virtualisation.vmVariant.virtualisation.sharedDirectories.sops-nix-key = { - # Provide the host age key at the path sops-nix expects in the guest. - source = "/home/${username}/.config/sops/age"; - target = "/var/lib/sops-nix"; - securityModel = "none"; - }; - - # System version for state compatibility - do not modify. - system.stateVersion = "26.05"; - - # Virtual disk device for disko partitioning. - disko.selectedDisk = "/dev/vda"; - - services = { - timezone = "automatic-timezoned"; - - # keep-sorted start - qemuGuest.enable = true; - spice-vdagentd.enable = true; - # keep-sorted end - }; - }; -} diff --git a/modules/hosts/vm/hardware.nix b/modules/hosts/vm/hardware.nix deleted file mode 100644 index 942d14a..0000000 --- a/modules/hosts/vm/hardware.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - flake.modules.nixos.vm = {modulesPath, ...}: { - imports = [(modulesPath + "/profiles/qemu-guest.nix")]; - - # keep-sorted start block=yes newline_separated=yes - # Kernel modules appropriate for generic vms. - boot.initrd.availableKernelModules = [ - # keep-sorted start - "ahci" - "sr_mod" - "virtio_blk" - "virtio_pci" - "xhci_pci" - # keep-sorted end - ]; - - boot.kernelModules = ["kvm-intel"]; - # keep-sorted end - }; -} diff --git a/modules/hosts/vm/home.nix b/modules/hosts/vm/home.nix deleted file mode 100644 index 76ab4a8..0000000 --- a/modules/hosts/vm/home.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - flake.modules.nixos.vm = { - # keep-sorted start - self, - vars, - # keep-sorted end - ... - }: let - inherit (vars) username; - in { - home-manager.users.${username} = { - imports = with self.modules.homeManager; [ - # Profiles - # keep-sorted start - gaming - personal - # keep-sorted end - ]; - - # keep-sorted start block=yes newline_separated=yes - # Configure the vm display settings. - programs.hylix.monitors = [ - { - output = "Virtual-1"; - mode = "1920x1080@60"; - position = "0x0"; - scale = "1"; - extra.vrr = 0; - } - ]; - - # Browser memory allocation for vm environment. - programs.zen-browser.profiles.default.preferences.commitSpace = 6683; - # keep-sorted end - }; - }; -} diff --git a/modules/programs/gui/virt-manager.nix b/modules/programs/gui/virt-manager.nix deleted file mode 100644 index 04c1256..0000000 --- a/modules/programs/gui/virt-manager.nix +++ /dev/null @@ -1,50 +0,0 @@ -{self, ...}: { - flake.modules.nixos.virt-manager = { - # keep-sorted start - pkgs, - vars, - # keep-sorted end - ... - }: let - inherit (vars) username; - in { - imports = [self.modules.generic.vars]; - - # keep-sorted start block=yes newline_separated=yes - programs.virt-manager.enable = true; - - # Groups for libvirt access. - users.users.${username}.extraGroups = [ - # keep-sorted start - "kvm" - "libvirtd" - # keep-sorted end - ]; - - virtualisation.libvirtd = { - # Configure libvirtd with qemu swtpm. - enable = true; - qemu = { - # Allow the use of emulated tpm. - swtpm.enable = true; - - # Use qemu_kvm package to save disk space. - package = pkgs.qemu_kvm; - }; - - # Keep VMs off at boot. - onBoot = "ignore"; - }; - # keep-sorted end - - # Allow the default libvirt bridge and leave it unmanaged by NetworkManager. - networking = let - interface = ["virbr0"]; - in { - # keep-sorted start - firewall.trustedInterfaces = interface; - networkmanager.unmanaged = interface; - # keep-sorted end - }; - }; -} -- 2.51.2