From b84a9d0112d86e5a7ea142ae5d642e585b58967d Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Fri, 30 Aug 2024 00:46:47 +0200 Subject: [PATCH] nixos/services.soft-serve: remove `with lib;` --- nixos/modules/services/misc/soft-serve.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/misc/soft-serve.nix b/nixos/modules/services/misc/soft-serve.nix index 1907d92adb85..9a3fb1af9b81 100644 --- a/nixos/modules/services/misc/soft-serve.nix +++ b/nixos/modules/services/misc/soft-serve.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.soft-serve; configFile = format.generate "config.yaml" cfg.settings; @@ -12,11 +9,11 @@ in { options = { services.soft-serve = { - enable = mkEnableOption "soft-serve"; + enable = lib.mkEnableOption "soft-serve"; - package = mkPackageOption pkgs "soft-serve" { }; + package = lib.mkPackageOption pkgs "soft-serve" { }; - settings = mkOption { + settings = lib.mkOption { type = format.type; default = { }; description = '' @@ -24,7 +21,7 @@ in See <${docUrl}>. ''; - example = literalExpression '' + example = lib.literalExpression '' { name = "dadada's repos"; log_format = "text"; @@ -41,7 +38,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.tmpfiles.rules = [ # The config file has to be inside the state dir @@ -61,7 +58,7 @@ in Type = "simple"; DynamicUser = true; Restart = "always"; - ExecStart = "${getExe cfg.package} serve"; + ExecStart = "${lib.getExe cfg.package} serve"; StateDirectory = "soft-serve"; WorkingDirectory = stateDir; RuntimeDirectory = "soft-serve"; @@ -95,5 +92,5 @@ in }; }; - meta.maintainers = [ maintainers.dadada ]; + meta.maintainers = [ lib.maintainers.dadada ]; }