Commit e793d184 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by Weijia Wang
Browse files

nixos/searx: little makeover

parent ad1f5709
Loading
Loading
Loading
Loading
+5 −12
Original line number Diff line number Diff line
@@ -43,12 +43,8 @@ in
      [ "services" "searx" "settingsFile" ])
  ];

  ###### interface

  options = {

    services.searx = {

      enable = mkOption {
        type = types.bool;
        default = false;
@@ -190,9 +186,6 @@ in

  };


  ###### implementation

  config = mkIf cfg.enable {
    environment.systemPackages = [ cfg.package ];

@@ -234,8 +227,8 @@ in
      };
    };

    systemd.services.uwsgi = mkIf (cfg.runInUwsgi)
      { requires = [ "searx-init.service" ];
    systemd.services.uwsgi = mkIf cfg.runInUwsgi {
      requires = [ "searx-init.service" ];
      after = [ "searx-init.service" ];
    };

@@ -245,7 +238,7 @@ in
      redis.url = lib.mkIf cfg.redisCreateLocally "unix://${config.services.redis.servers.searx.unixSocket}";
    };

    services.uwsgi = mkIf (cfg.runInUwsgi) {
    services.uwsgi = mkIf cfg.runInUwsgi {
      enable = true;
      plugins = [ "python3" ];