diff --git a/Makefile b/Makefile index 245a96f..e3f1483 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ HOST ?= $(file < /etc/nixosFlakeName) THREADS ?= $(shell nproc) FLAKE ?= . -MODE = boot +MODE ?= boot FLAGS = --impure --cores $(THREADS) -j $(THREADS) diff --git a/homeConfigs/modules/wayland/hyprland.nix b/homeConfigs/modules/wayland/hyprland.nix index ae7c2f0..07e5455 100644 --- a/homeConfigs/modules/wayland/hyprland.nix +++ b/homeConfigs/modules/wayland/hyprland.nix @@ -18,6 +18,7 @@ "CTRL_ALT, Q, killactive," "SUPER_ALT, Q, exit," "$mainMod, S, togglefloating," + "$mainMod, I, pin," "$mainMod, D, exec, rofi -show drun -show-icons" "$mainMod, M, fullscreen, 1" "$mainMod, F, fullscreen, 0" diff --git a/osConfigs/hosts/laptop.nix b/osConfigs/hosts/laptop.nix index 2de2a42..07d5c1b 100644 --- a/osConfigs/hosts/laptop.nix +++ b/osConfigs/hosts/laptop.nix @@ -12,6 +12,34 @@ networking.wireless.enable = true; networking.networkmanager.enable = false; + specialisation.hugepage_ram.configuration = { + boot.kernel.sysctl."vm.nr_hugepages" = 5120; + boot.extraModulePackages = with config.boot.kernelPackages; [ kvmfr ]; + boot.kernelModules = [ "kvmfr" ]; + boot.extraModprobeConfig = '' + options kvmfr static_size_mb=32 + ''; + virtualisation.libvirtd.qemu.verbatimConfig = '' + cgroup_device_acl = [ + "/dev/kvmfr0", "/dev/null", "/dev/full", "/dev/zero", + "/dev/random", "/dev/urandom", + "/dev/ptmx", "/dev/kvm", + "/dev/rtc","/dev/hpet", + "/dev/input/by-id/[some_mouse_device]-event-mouse", + "/dev/input/by-id/[some_keyboard_device]-event-kbd" + ] + ''; + services.udev.extraRules = '' + SUBSYSTEM=="kvmfr", OWNER="tom", GROUP="kvm", MODE="0660" + ''; + environment.systemPackages = with pkgs; [ looking-glass-client ]; + }; + + programs.virt-manager.enable = true; + virtualisation.libvirtd.enable = true; + virtualisation.libvirtd.qemu.runAsRoot = true; + virtualisation.libvirtd.qemu.vhostUserPackages = [ pkgs.virtiofsd ]; + networking.dhcpcd.enable = false; systemd.network.enable = true; networking.useNetworkd = true;