From faf97500b708edf96cd0bddc8068665f95f5b285 Mon Sep 17 00:00:00 2001 From: Kate Date: Thu, 5 Jun 2025 14:19:27 +0200 Subject: [PATCH] geoclue support --- flake.nix | 1 + nixos/configs/gui/niri.nix | 6 ++++++ nixos/configs/location.nix | 14 ++++++++++++++ nixos/configs/nix.nix | 3 +-- nixos/packages/gui.pkgs.nix | 1 + 5 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 nixos/configs/location.nix diff --git a/flake.nix b/flake.nix index 6915365..749f591 100644 --- a/flake.nix +++ b/flake.nix @@ -125,6 +125,7 @@ ./nixos/configs/lix.nix ./nixos/configs/nix.nix ./nixos/configs/ccache.nix + ./nixos/configs/location.nix ./nixos/configs/calendar.nix ./nixos/configs/syncthing.nix ./nixos/configs/include-conf.nix diff --git a/nixos/configs/gui/niri.nix b/nixos/configs/gui/niri.nix index 4d6c29a..32b2449 100644 --- a/nixos/configs/gui/niri.nix +++ b/nixos/configs/gui/niri.nix @@ -219,6 +219,11 @@ in proportion = 1.0; }; } + { + matches = [ { app-id = "^pcloud$"; } ]; + open-on-workspace = "2"; + open-focused = false; + } # Keep our system monitor on the monitoring screen. { @@ -364,6 +369,7 @@ in niri msg action spawn -- ${xwayland-satellite-loop}/bin/xwayland-satellite-loop niri msg action spawn -- home-assistant-desktop ${if (sysConfig.networking.hostName != "trailblazer") then "#" else ""}niri msg action spawn -- ${pkgs.mission-center}/bin/missioncenter + niri msg action spawn -- ${pkgs.pcloud}/bin/pcloud sleep 10 diff --git a/nixos/configs/location.nix b/nixos/configs/location.nix new file mode 100644 index 0000000..d99d128 --- /dev/null +++ b/nixos/configs/location.nix @@ -0,0 +1,14 @@ +{ lib, pkgs, ... }: { + + # Use Geoclue2 for GPS info. + services.geoclue2 = { + enable = true; + appConfig = { + gnome-maps = { + isAllowed = true; + isSystem = false; + }; + }; + }; + +} diff --git a/nixos/configs/nix.nix b/nixos/configs/nix.nix index 07ed08b..83f68eb 100644 --- a/nixos/configs/nix.nix +++ b/nixos/configs/nix.nix @@ -27,8 +27,7 @@ # For non-trailblazer machines, allow building on Trailblazer. distributedBuilds = - !(config.networking.hostName == "trailblazer") && - !(config.networking.hostName == "komashi"); + !(config.networking.hostName == "trailblazer"); buildMachines = if config.nix.distributedBuilds then [ diff --git a/nixos/packages/gui.pkgs.nix b/nixos/packages/gui.pkgs.nix index 483bb15..8651743 100644 --- a/nixos/packages/gui.pkgs.nix +++ b/nixos/packages/gui.pkgs.nix @@ -89,6 +89,7 @@ with pkgs; # Mapping qmapshack + gnome-maps ] # Linux-only packages.