From 7b021c5848f87a19630f62d810776470f7aeed51 Mon Sep 17 00:00:00 2001 From: Spotlight Date: Sun, 9 Feb 2025 01:49:22 -0600 Subject: [PATCH 1/3] linux: Include Adwaita GTK 3 Not all applications currently leverage GTK 4, and a lack of a dark theme is rather annoying. --- hosts/linux/shared.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hosts/linux/shared.nix b/hosts/linux/shared.nix index ed8af77..d0f4ace 100644 --- a/hosts/linux/shared.nix +++ b/hosts/linux/shared.nix @@ -92,6 +92,9 @@ # Common utilities across most Linux installs. environment.systemPackages = with pkgs; [ + # Since not all applications are currently GTK 4, + # we need to manually add the Adwaita GTK 3 dark mode theme. + adw-gtk3 firefox htop git From 3f25fca598f6059bf466a4f71b52f69c8fa2cd76 Mon Sep 17 00:00:00 2001 From: Spotlight Date: Sun, 9 Feb 2025 03:08:45 -0600 Subject: [PATCH 2/3] spotlights-macbook-air: Properly set hostname Oops --- hosts/linux/spotlights-macbook-air/configuration.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hosts/linux/spotlights-macbook-air/configuration.nix b/hosts/linux/spotlights-macbook-air/configuration.nix index fd8d85e..a9cb5d6 100644 --- a/hosts/linux/spotlights-macbook-air/configuration.nix +++ b/hosts/linux/spotlights-macbook-air/configuration.nix @@ -12,10 +12,12 @@ ]; # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = false; + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = false; + }; - # GPU enablement + # Asahi Linux support hardware.asahi = { peripheralFirmwareDirectory = /boot/asahi; # GPU enablement @@ -25,11 +27,11 @@ }; networking = { + hostName = "spotlights-macbook-air"; wireless.iwd = { enable = true; settings.General.EnableNetworkConfiguration = true; }; - networkmanager.enable = true; }; environment.systemPackages = with pkgs; [ From 0a3891ad4f551f9525ddbc572474c66012b08270 Mon Sep 17 00:00:00 2001 From: Spotlight Date: Sun, 9 Feb 2025 03:09:46 -0600 Subject: [PATCH 3/3] spotlights-macbook-air: Enable SMBIOS generation in U-Boot libvirtd would otherwise fail attempting to execute dmidecode. That's an issue in itself, but it's far easier to just simply enable SMBIOS support than maintain patches against libvirtd. --- .../spotlights-macbook-air/configuration.nix | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/hosts/linux/spotlights-macbook-air/configuration.nix b/hosts/linux/spotlights-macbook-air/configuration.nix index a9cb5d6..3f39c5b 100644 --- a/hosts/linux/spotlights-macbook-air/configuration.nix +++ b/hosts/linux/spotlights-macbook-air/configuration.nix @@ -34,6 +34,50 @@ }; }; + nixpkgs.overlays = [ + # We need SMBIOS generation enabled for libvirtd, + # as it otherwise stumbles over executing dmidecode. + (final: prev: { + uboot-asahi = prev.uboot-asahi.overrideAttrs (old: { + # TODO(spotlightishere): It'd be far more ideal to actually override. + # However, somehow overriding extraConfig seems to coerce things into a string. + # We wholly override it here, and thus should monitor to see if it changes upstream. + extraConfig = '' + # Upstream + CONFIG_IDENT_STRING=" ${old.version}" + CONFIG_VIDEO_FONT_4X6=n + CONFIG_VIDEO_FONT_8X16=n + CONFIG_VIDEO_FONT_SUN12X22=n + CONFIG_VIDEO_FONT_16X32=y + CONFIG_CMD_BOOTMENU=y + + # Custom modifications + CONFIG_SMBIOS=y + CONFIG_GENERATE_SMBIOS_TABLE=y + ''; + }); + }) + ]; + + # As recommended in https://nixos.wiki/wiki/Libvirt#Setup + virtualisation.libvirtd = { + enable = true; + qemu = { + package = pkgs.qemu_kvm; + runAsRoot = true; + swtpm.enable = true; + ovmf = { + enable = true; + packages = [ + (pkgs.OVMF.override { + secureBoot = true; + tpmSupport = true; + }).fd + ]; + }; + }; + }; + environment.systemPackages = with pkgs; [ legcord vscode