From 2f07bb37cec80f97bedf30507e6dfe1561d62ced Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 20 Jul 2023 19:52:24 +0300 Subject: [PATCH] feat: update API deps --- api/api-module.nix | 23 ++++++----------------- api/api.nix | 2 -- variables-module.nix | 7 ------- variables.nix | 1 - 4 files changed, 6 insertions(+), 27 deletions(-) diff --git a/api/api-module.nix b/api/api-module.nix index ca70f42..2ec0509 100644 --- a/api/api-module.nix +++ b/api/api-module.nix @@ -18,19 +18,6 @@ in Enable SelfPrivacy API service ''; }; - enableSwagger = mkOption { - default = false; - type = types.bool; - description = '' - Enable Swagger UI - ''; - }; - b2Bucket = mkOption { - type = types.str; - description = '' - B2 bucket - ''; - }; }; config = lib.mkIf cfg.enable { @@ -40,8 +27,6 @@ in inherit (config.environment.sessionVariables) NIX_PATH; HOME = "/root"; PYTHONUNBUFFERED = "1"; - ENABLE_SWAGGER = (if cfg.enableSwagger then "1" else "0"); - B2_BUCKET = cfg.b2Bucket; } // config.networking.proxy.envVars; path = [ "/var/" @@ -53,11 +38,14 @@ in pkgs.gitMinimal config.nix.package.out pkgs.nixos-rebuild + pkgs.rclone pkgs.restic pkgs.mkpasswd pkgs.util-linux pkgs.e2fsprogs pkgs.iproute2 + pkgs.fuse-overlayfs + pkgs.fuse ]; after = [ "network-online.target" ]; wantedBy = [ "network-online.target" ]; @@ -74,8 +62,6 @@ in inherit (config.environment.sessionVariables) NIX_PATH; HOME = "/root"; PYTHONUNBUFFERED = "1"; - ENABLE_SWAGGER = (if cfg.enableSwagger then "1" else "0"); - B2_BUCKET = cfg.b2Bucket; PYTHONPATH = pkgs.selfprivacy-graphql-api.pythonPath + ":${pkgs.selfprivacy-graphql-api}/lib/python3.10/site-packages/"; } // config.networking.proxy.envVars; path = [ @@ -88,11 +74,14 @@ in pkgs.gitMinimal config.nix.package.out pkgs.nixos-rebuild + pkgs.rclone pkgs.restic pkgs.mkpasswd pkgs.util-linux pkgs.e2fsprogs pkgs.iproute2 + pkgs.fuse-overlayfs + pkgs.fuse ]; after = [ "network-online.target" ]; wantedBy = [ "network-online.target" ]; diff --git a/api/api.nix b/api/api.nix index e3bf3ec..a79619d 100644 --- a/api/api.nix +++ b/api/api.nix @@ -2,8 +2,6 @@ { services.selfprivacy-api = { enable = true; - enableSwagger = config.services.userdata.api.enableSwagger; - b2Bucket = config.services.userdata.backup.bucket; }; users.users."selfprivacy-api" = { diff --git a/variables-module.nix b/variables-module.nix index 4fc7ada..a328b8c 100644 --- a/variables-module.nix +++ b/variables-module.nix @@ -74,13 +74,6 @@ in # API options # ############### api = { - enableSwagger = mkOption { - default = true; - description = '' - Enable Swagger UI - ''; - type = types.bool; - }; skippedMigrations = mkOption { default = [ ]; description = '' diff --git a/variables.nix b/variables.nix index 2799df4..e8582de 100644 --- a/variables.nix +++ b/variables.nix @@ -16,7 +16,6 @@ in hashedMasterPassword = lib.attrsets.attrByPath [ "hashedMasterPassword" ] null jsonData; sshKeys = lib.attrsets.attrByPath [ "sshKeys" ] [ ] jsonData; api = { - enableSwagger = lib.attrsets.attrByPath [ "api" "enableSwagger" ] false jsonData; skippedMigrations = lib.attrsets.attrByPath [ "api" "skippedMigrations" ] [ ] jsonData; }; dns = {