commit b5fb5f0c7e040685113404a6a419d53e67a4a822 (tree)
parent 2d03d4af5b8f6393704cd1bb93cd16084a52c2b3
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date: Sat, 20 Jan 2024 07:00:26 +0200
module: clean `pkgs1`
Diffstat:
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git 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}";
};
}