Make use of sops templates

This commit is contained in:
SebastianStork 2024-06-26 17:21:09 +02:00
parent e2261da99b
commit 8805183553
4 changed files with 41 additions and 17 deletions

View file

@ -3,9 +3,17 @@
options.myConfig.geoclue.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.geoclue.enable {
sops.secrets.geoclue-location-service = {
owner = "geoclue";
path = "/etc/geoclue/conf.d/location-service.conf";
sops = {
secrets.geolocation-api-key = { };
templates."geoclue-location-service.conf" = {
owner = "geoclue";
path = "/etc/geoclue/conf.d/location-service.conf";
content = ''
[wifi]
url=https://www.googleapis.com/geolocation/v1/geolocate?key=${config.sops.placeholder.geolocation-api-key}
'';
};
};
services.geoclue2 = {