dendrify: comfy-station

This commit is contained in:
2026-03-27 17:49:01 +01:00
parent 5ca75f28db
commit 88b3ff784a
205 changed files with 4036 additions and 1227 deletions

View File

@@ -0,0 +1,36 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.hive.programs.spotify-shortcuts;
in {
options.hive.programs.spotify-shortcuts = {
enable = lib.mkEnableOption "Enable Spotify Shortcuts";
clientIdSopsKey = lib.mkOption {
type = lib.types.singleLineStr;
description = "Spotify API Client ID sops secret name";
};
clientSecretSopsKey = lib.mkOption {
type = lib.types.singleLineStr;
description = "Spotify API Client Secret Path sops secret name";
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [pkgs.hive.spotify-shortcuts];
environment.variables = {
SPOTIFY_SHORTCUTS_CONFIG = config.sops.templates."spotify-shortcuts-client.json".path;
};
sops.templates."spotify-shortcuts-client.json" = {
mode = "444";
content = ''
{
"clientId": "${config.sops.placeholder.${cfg.clientIdSopsKey}}",
"clientSecret": "${config.sops.placeholder.${cfg.clientSecretSopsKey}}"
}
'';
};
};
}