refactor: Move user config into modules/

This commit is contained in:
Madeleine Sydney
2025-03-13 11:14:32 -06:00
parent 257f011a99
commit fb3299d89c
85 changed files with 597 additions and 542 deletions

View File

@@ -0,0 +1,36 @@
{ config, lib, pkgs, ... }:
let
cfg = config.sydnix.users.crumb.mpd;
in {
options.sydnix.users.crumb.mpd.enable =
lib.mkEnableOption "MPD, à la crumb";
config = lib.mkIf cfg.enable {
sydnix.sops.secrets = {
lastfm-password = {};
librefm-password = {};
};
sydnix.mpd = {
enable = true;
scrobbling.endpoints = {
"last.fm" = {
passwordFile =
"/home/crumb/.config/sops-nix/secrets/lastfm-password";
username = "crumb1";
};
"libre.fm" = {
passwordFile =
"/home/crumb/.config/sops-nix/secrets/librefm-password";
username = "crumbtoo";
};
};
};
# mpdscribble uses our password files, so it is imperative that the service
# runs only after said password files are brought into existence. }:)
systemd.user.services.mpdscribble.Unit.After = [ "sops-nix.service" ];
};
}