refactor!: switch to dendritic pattern
BREAKING CHANGE: complete reorganization of the repository
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
{
|
||||
flake.modules.homeManager.blanket = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.myServices.blanket;
|
||||
in {
|
||||
options.home.myServices.blanket.enable = mkEnableOption "Enable blanket";
|
||||
config.services.blanket.enable = cfg.enable;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
flake.modules.homeManager.mbsync = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.myServices.mbsync;
|
||||
in {
|
||||
options.home.myServices.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;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
flake.modules.homeManager.mpris-proxy = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.myServices.mpris-proxy;
|
||||
in {
|
||||
options.home.myServices.mpris-proxy.enable = mkEnableOption "Enable MPRIS forwarding towards bluetooth and MIDI";
|
||||
config.services.mpris-proxy.enable = cfg.enable;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{config, ...}: let
|
||||
m = config.flake.modules.homeManager;
|
||||
in {
|
||||
flake.modules.homeManager.my-services = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.myServices;
|
||||
in {
|
||||
imports = [
|
||||
m.blanket
|
||||
m.mbsync
|
||||
m.mpris-proxy
|
||||
m.playerctld
|
||||
];
|
||||
options.home.myServices.fullDesktop = mkOption {
|
||||
description = "Enable all modules";
|
||||
type = types.bool;
|
||||
default = config.home.fullDesktop;
|
||||
};
|
||||
config.home.myServices = {
|
||||
blanket.enable = mkDefault cfg.fullDesktop;
|
||||
mbsync.enable = mkDefault cfg.fullDesktop;
|
||||
mpris-proxy.enable = mkDefault cfg.fullDesktop;
|
||||
playerctld.enable = mkDefault cfg.fullDesktop;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
flake.modules.homeManager.playerctld = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.myServices.playerctld;
|
||||
in {
|
||||
options.home.myServices.playerctld.enable = mkEnableOption "Enable playerctld daemon";
|
||||
config.services.playerctld.enable = cfg.enable;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user