From f3bb24eb64b3ee68f3c3ada08aed084264537133 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 21:19:11 +0200 Subject: [PATCH] nixos/services.jotta-cli: remove `with lib;` --- nixos/modules/services/networking/jotta-cli.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/networking/jotta-cli.nix b/nixos/modules/services/networking/jotta-cli.nix index e0fa1ef332fe..566e7fc503a6 100644 --- a/nixos/modules/services/networking/jotta-cli.nix +++ b/nixos/modules/services/networking/jotta-cli.nix @@ -1,25 +1,22 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.jotta-cli; in { options = { services.jotta-cli = { - enable = mkEnableOption "Jottacloud Command-line Tool"; + enable = lib.mkEnableOption "Jottacloud Command-line Tool"; - options = mkOption { + options = lib.mkOption { default = [ "stdoutlog" "datadir" "%h/.jottad/" ]; example = [ ]; - type = with types; listOf str; + type = with lib.types; listOf str; description = "Command-line options passed to jottad."; }; package = lib.mkPackageOption pkgs "jotta-cli" { }; }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.user.services.jottad = { description = "Jottacloud Command-line Tool daemon"; @@ -27,7 +24,7 @@ in { serviceConfig = { Type = "notify"; EnvironmentFile = "-%h/.config/jotta-cli/jotta-cli.env"; - ExecStart = "${lib.getExe' cfg.package "jottad"} ${concatStringsSep " " cfg.options}"; + ExecStart = "${lib.getExe' cfg.package "jottad"} ${lib.concatStringsSep " " cfg.options}"; Restart = "on-failure"; };