chore: refactor user modules

This commit is contained in:
2025-07-27 22:50:25 +02:00
parent af1a606c1a
commit d200079cdb
94 changed files with 832 additions and 665 deletions

View File

@@ -0,0 +1,11 @@
{
lib,
config,
...
}:
with lib; let
cfg = config.home.services.blanket;
in {
options.home.services.blanket.enable = mkEnableOption "Enable blanket";
config.services.blanket.enable = cfg.enable;
}

View File

@@ -0,0 +1,22 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.home.services;
in {
imports = [
./blanket.nix
./mbsync.nix
./mpris-proxy.nix
./playerctld.nix
];
options.home.services.fullDesktop = mkEnableOption "Enable all modules";
config.home.services = {
blanket.enable = mkDefault cfg.fullDesktop;
mbsync.enable = mkDefault cfg.fullDesktop;
mpris-proxy.enable = mkDefault cfg.fullDesktop;
playerctld.enable = mkDefault cfg.fullDesktop;
};
}

View File

@@ -0,0 +1,22 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.home.services.mbsync;
in {
options.home.services.mbsync = {
enable = mkEnableOption "Enables mbsync";
service.enable = mkOption {
type = types.bool;
default = true;
};
};
config = mkIf cfg.enable {
systemd.user.services.mbsync.unitConfig.After = ["sops-nix.service"];
services.mbsync.enable = cfg.service.enable;
programs.mbsync.enable = true;
};
}

View File

@@ -0,0 +1,11 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.home.services.mpris-proxy;
in {
options.home.services.mpris-proxy.enable = mkEnableOption "Enable MPRIS forwarding towards bluetooth and MIDI";
config.services.mpris-proxy.enable = cfg.enable;
}

View File

@@ -0,0 +1,11 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.home.services.playerctld;
in {
options.home.services.playerctld.enable = mkEnableOption "Enable playerctld daemon";
config.services.playerctld.enable = cfg.enable;
}