mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 09:14:24 +01:00
Make use of sops templates
This commit is contained in:
parent
e2261da99b
commit
8805183553
4 changed files with 41 additions and 17 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue