Treat secret names as strings

This commit is contained in:
SebastianStork 2024-09-07 17:21:40 +02:00
parent 285367da58
commit e333333914
4 changed files with 9 additions and 7 deletions

View file

@ -3,7 +3,7 @@
options.myConfig.git.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.git.enable {
sops.secrets.github-ssh-key.path = "${config.home.homeDirectory}/.ssh/github";
sops.secrets."github-ssh-key".path = "${config.home.homeDirectory}/.ssh/github";
programs = {
git = {

View file

@ -4,14 +4,16 @@
config = lib.mkIf config.myConfig.geoclue.enable {
sops = {
secrets.geolocation-api-key = { };
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}
url=https://www.googleapis.com/geolocation/v1/geolocate?key=${
config.sops.placeholder."geolocation-api-key"
}
'';
};
};

View file

@ -19,11 +19,11 @@ in
};
config = lib.mkIf cfg.enable {
sops.secrets.tailscale-auth-key = { };
sops.secrets."tailscale-auth-key" = { };
services.tailscale = {
enable = true;
authKeyFile = config.sops.secrets.tailscale-auth-key.path;
authKeyFile = config.sops.secrets."tailscale-auth-key".path;
openFirewall = true;
useRoutingFeatures = if (cfg.exitNode.enable || (cfg.serve != null)) then "server" else "client";
extraUpFlags = [ "--reset=true" ];