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}"; }; }