From b5fb5f0c7e040685113404a6a419d53e67a4a822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 20 Jan 2024 07:00:26 +0200 Subject: [PATCH] module: clean `pkgs1` --- modules/e11sync/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/e11sync/default.nix b/modules/e11sync/default.nix index 7f7a7c0..7339455 100644 --- a/modules/e11sync/default.nix +++ b/modules/e11sync/default.nix @@ -6,6 +6,7 @@ geoip2-tarball: { }: let overlays = import ../../overlays.nix geoip2-tarball; pkgs1 = pkgs.extend (lib.composeManyExtensions overlays); + inherit (pkgs1) e11sync-backend e11sync-frontend; in { options.e11sync = with lib.types; { enable = lib.mkEnableOption "Enable e11sync"; @@ -34,7 +35,7 @@ in { in lib.mkIf cfg.enable { environment.systemPackages = [ - pkgs1.e11sync-backend + e11sync-backend ]; systemd.services = { @@ -59,7 +60,7 @@ in { StateDirectory = "e11sync-backend"; WorkingDirectory = "/var/lib/e11sync-backend"; KillSignal = "SIGQUIT"; - ExecStart = "${pkgs1.e11sync-backend}/bin/e11sync-backend"; + ExecStart = "${e11sync-backend}/bin/e11sync-backend"; MemoryHigh = "1535M"; MemoryMax = "4096M"; @@ -71,7 +72,7 @@ in { ProtectControlGroups = true; } (lib.mkIf cfg.migrateOnStart { - ExecStartPre = "${pkgs1.e11sync-backend}/bin/e11sync migrate"; + ExecStartPre = "${e11sync-backend}/bin/e11sync migrate"; }) (lib.mkIf (cfg.secretKeyPath != "unsafe") { LoadCredential = "secret_key:${cfg.secretKeyPath}"; @@ -81,6 +82,6 @@ in { }; services.caddy.virtualHosts."${cfg.vhost}".extraConfig = - builtins.readFile "${pkgs1.e11sync-frontend}"; + builtins.readFile "${e11sync-frontend}"; }; }