chore: refactor user modules
This commit is contained in:
22
users/modules/services/mbsync.nix
Normal file
22
users/modules/services/mbsync.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user