diff --git a/flake.lock b/flake.lock index f863486..367e334 100644 --- a/flake.lock +++ b/flake.lock @@ -24,11 +24,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1741663108, - "narHash": "sha256-9RaZ3HuOptioE94IQ/nnzC2x5cMaRi6NX8d8ZOqhJ68=", + "lastModified": 1742098834, + "narHash": "sha256-l98XVpNXW6hr0AsxCeQZbdf6EGT8OpHdkWBi7sdel4s=", "owner": "tpwrules", "repo": "nixos-apple-silicon", - "rev": "4264de082e92e7d7ba7fa2ad5b5b1a8818b5d048", + "rev": "8457960249bcfd34c22838e20eaa7d8261428688", "type": "github" }, "original": { @@ -142,11 +142,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741851582, - "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", + "lastModified": 1742069588, + "narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", + "rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5", "type": "github" }, "original": { diff --git a/hosts/linux/shared.nix b/hosts/linux/shared.nix index d0f4ace..b3f1bf6 100644 --- a/hosts/linux/shared.nix +++ b/hosts/linux/shared.nix @@ -68,7 +68,12 @@ # we'll use geolocation via the Arch Linux API key. geoclue2 = { enable = true; - geoProviderUrl = "https://www.googleapis.com/geolocation/v1/geolocate?key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM"; + geoProviderUrl = "https://api.beacondb.net/v1/geolocate"; + + # Let's be generous :) + submitData = true; + submissionUrl = "https://api.beacondb.net/v2/geosubmit"; + submissionNick = "geoclue"; }; }; diff --git a/hosts/linux/spotlights-macbook-air/configuration.nix b/hosts/linux/spotlights-macbook-air/configuration.nix index 37b254b..58d1d3f 100644 --- a/hosts/linux/spotlights-macbook-air/configuration.nix +++ b/hosts/linux/spotlights-macbook-air/configuration.nix @@ -17,6 +17,12 @@ efi.canTouchEfiVariables = false; }; + # Allow GNOME to dynamically set the + # time zone based on current location. + # + # https://www.reddit.com/r/NixOS/comments/1411gjs/comment/jo4wau3/ + time.timeZone = lib.mkForce null; + # Asahi Linux support hardware.asahi = { peripheralFirmwareDirectory = /boot/asahi; @@ -32,6 +38,9 @@ enable = true; settings.General.EnableNetworkConfiguration = true; }; + + # Necessary for WireGuard + firewall.checkReversePath = false; }; nixpkgs.overlays = [ @@ -57,19 +66,15 @@ ''; }); - # muvm requires a few things for libkrun. + # muvm requires a few custom flags for libkrun. + # Additionally, we override the upstream version of + # `virglrenderer` to use separate other flags. + # + # This could also be accomplished with overriding inputs, + # but as we control the actual source, this is easier. libkrun = prev.callPackage ./libkrun/package.nix { }; - # https://github.com/NixOS/nixpkgs/pull/347792#issuecomment-2667343848 - virglrenderer = prev.virglrenderer.overrideAttrs (old: { - src = final.fetchurl { - url = "https://gitlab.freedesktop.org/asahi/virglrenderer/-/archive/asahi-20241205.2/virglrenderer-asahi-20241205.2.tar.bz2"; - hash = "sha256-mESFaB//RThS5Uts8dCRExfxT5DQ+QQgTDWBoQppU7U="; - }; - mesonFlags = old.mesonFlags ++ [ (final.lib.mesonOption "drm-renderers" "asahi-experimental") ]; - }); - - # https://github.com/NixOS/nixpkgs/pull/347792 + # Derived from https://github.com/NixOS/nixpkgs/pull/347792 muvm = prev.callPackage ./muvm/package.nix { }; }) ]; @@ -93,10 +98,16 @@ }; }; + # Docker users.users.spotlight.extraGroups = [ "docker" ]; virtualisation.docker.enable = true; - services.syncthing.enable = true; + services = { + # iOS tethering, etc + usbmuxd.enable = true; + + syncthing.enable = true; + }; environment.systemPackages = with pkgs; [ # For usage with FEXRootFSFetcher @@ -105,6 +116,7 @@ legcord muvm vscode +wireguard-tools ]; # :( diff --git a/hosts/linux/spotlights-macbook-air/libkrun/package.nix b/hosts/linux/spotlights-macbook-air/libkrun/package.nix index 4dc32b3..240b226 100644 --- a/hosts/linux/spotlights-macbook-air/libkrun/package.nix +++ b/hosts/linux/spotlights-macbook-air/libkrun/package.nix @@ -1,5 +1,6 @@ { lib , stdenv +, fetchurl , fetchFromGitHub , rustPlatform , cargo @@ -57,7 +58,17 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals withGpu [ libepoxy libdrm - virglrenderer + # We want to override the virglrenderer input. + # (Overriding for all of nixpkgs means that QEMU is repeatedly rebuilt.) + # https://github.com/NixOS/nixpkgs/pull/347792#issuecomment-2667343848 + (virglrenderer.overrideAttrs + (old: { + src = fetchurl { + url = "https://gitlab.freedesktop.org/asahi/virglrenderer/-/archive/asahi-20241205.2/virglrenderer-asahi-20241205.2.tar.bz2"; + hash = "sha256-mESFaB//RThS5Uts8dCRExfxT5DQ+QQgTDWBoQppU7U="; + }; + mesonFlags = old.mesonFlags ++ [ (lib.mesonOption "drm-renderers" "asahi-experimental") ]; + })) ] ++ lib.optional withSound pipewire ++ lib.optional sevVariant openssl;