1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

treewide: remove with lib (#6871)

Remove from services.
This commit is contained in:
Austin Horstman 2025-04-21 09:00:59 -07:00 committed by GitHub
parent 6695b1d477
commit 82ee14ff60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
124 changed files with 1848 additions and 1891 deletions

View file

@ -5,9 +5,8 @@
...
}:
with lib;
let
inherit (lib) mkOption optional types;
cfg = config.services.vdirsyncer;
@ -18,16 +17,16 @@ let
in
{
meta.maintainers = [ maintainers.pjones ];
meta.maintainers = [ lib.maintainers.pjones ];
options.services.vdirsyncer = {
enable = mkEnableOption "vdirsyncer";
enable = lib.mkEnableOption "vdirsyncer";
package = mkOption {
type = types.package;
default = pkgs.vdirsyncer;
defaultText = "pkgs.vdirsyncer";
example = literalExpression "pkgs.vdirsyncer";
example = lib.literalExpression "pkgs.vdirsyncer";
description = "The package to use for the vdirsyncer binary.";
};
@ -68,7 +67,7 @@ in
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
systemd.user.services.vdirsyncer = {
Unit = {
Description = "vdirsyncer calendar&contacts synchronization";
@ -80,7 +79,7 @@ in
# TODO `vdirsyncer discover`
ExecStart =
let
optStr = concatStringsSep " " vdirsyncerOptions;
optStr = lib.concatStringsSep " " vdirsyncerOptions;
in
[
"${cfg.package}/bin/vdirsyncer ${optStr} metasync"