From 0f3fa23b094be1f9db3d60d88029bb70a527bba2 Mon Sep 17 00:00:00 2001 From: Annika Merris Date: Sun, 12 May 2024 11:06:32 -0400 Subject: [PATCH] secrets are hard --- hosts/kim/annika.nix | 8 -------- hosts/kim/configuration.nix | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/hosts/kim/annika.nix b/hosts/kim/annika.nix index 1dac839..52dcbee 100644 --- a/hosts/kim/annika.nix +++ b/hosts/kim/annika.nix @@ -121,14 +121,6 @@ }; # Install and setup spotifyd - sops.templates."spotifyd.conf".content = '' - [global] - username = "me@annikamerris.com" - password = "${config.sops.placeholder."spotifyd/settings/global/password"}" - use_mpris = true - device_name = "kim-nix" - device_type = "computer" - ''; systemd.user.services.spotifyd = { Unit = { Description = "spotify daemon"; diff --git a/hosts/kim/configuration.nix b/hosts/kim/configuration.nix index 47e46ee..da12a5e 100644 --- a/hosts/kim/configuration.nix +++ b/hosts/kim/configuration.nix @@ -96,6 +96,24 @@ ]; }; + # Configure secrets stuff + sops = { + defaultSopsFile = ../../secrets/secrets.yaml; + defaultSopsFormat = "yaml"; + age.keyFile = "/home/annika/.config/sops/age/keys.txt"; + + secrets."spotifyd/settings/global/password" = { }; + }; + sops.templates."spotifyd.conf".content = '' + [global] + username = "me@annikamerris.com" + password = "${config.sops.placeholder."spotifyd/settings/global/password"}" + use_mpris = true + device_name = "kim-nix" + device_type = "computer" + what = "huh" + ''; + home-manager = { extraSpecialArgs = { inherit inputs; }; users = {