mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-27 05:11:30 +00:00
feat: update API deps
This commit is contained in:
parent
65b5a19777
commit
58e4f3acd8
|
@ -18,19 +18,6 @@ in
|
||||||
Enable SelfPrivacy API service
|
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 {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
@ -40,8 +27,6 @@ in
|
||||||
inherit (config.environment.sessionVariables) NIX_PATH;
|
inherit (config.environment.sessionVariables) NIX_PATH;
|
||||||
HOME = "/root";
|
HOME = "/root";
|
||||||
PYTHONUNBUFFERED = "1";
|
PYTHONUNBUFFERED = "1";
|
||||||
ENABLE_SWAGGER = (if cfg.enableSwagger then "1" else "0");
|
|
||||||
B2_BUCKET = cfg.b2Bucket;
|
|
||||||
} // config.networking.proxy.envVars;
|
} // config.networking.proxy.envVars;
|
||||||
path = [
|
path = [
|
||||||
"/var/"
|
"/var/"
|
||||||
|
@ -53,11 +38,14 @@ in
|
||||||
pkgs.gitMinimal
|
pkgs.gitMinimal
|
||||||
config.nix.package.out
|
config.nix.package.out
|
||||||
pkgs.nixos-rebuild
|
pkgs.nixos-rebuild
|
||||||
|
pkgs.rclone
|
||||||
pkgs.restic
|
pkgs.restic
|
||||||
pkgs.mkpasswd
|
pkgs.mkpasswd
|
||||||
pkgs.util-linux
|
pkgs.util-linux
|
||||||
pkgs.e2fsprogs
|
pkgs.e2fsprogs
|
||||||
pkgs.iproute2
|
pkgs.iproute2
|
||||||
|
pkgs.fuse-overlayfs
|
||||||
|
pkgs.fuse
|
||||||
];
|
];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
wantedBy = [ "network-online.target" ];
|
wantedBy = [ "network-online.target" ];
|
||||||
|
@ -74,8 +62,6 @@ in
|
||||||
inherit (config.environment.sessionVariables) NIX_PATH;
|
inherit (config.environment.sessionVariables) NIX_PATH;
|
||||||
HOME = "/root";
|
HOME = "/root";
|
||||||
PYTHONUNBUFFERED = "1";
|
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/";
|
PYTHONPATH = pkgs.selfprivacy-graphql-api.pythonPath + ":${pkgs.selfprivacy-graphql-api}/lib/python3.10/site-packages/";
|
||||||
} // config.networking.proxy.envVars;
|
} // config.networking.proxy.envVars;
|
||||||
path = [
|
path = [
|
||||||
|
@ -88,11 +74,14 @@ in
|
||||||
pkgs.gitMinimal
|
pkgs.gitMinimal
|
||||||
config.nix.package.out
|
config.nix.package.out
|
||||||
pkgs.nixos-rebuild
|
pkgs.nixos-rebuild
|
||||||
|
pkgs.rclone
|
||||||
pkgs.restic
|
pkgs.restic
|
||||||
pkgs.mkpasswd
|
pkgs.mkpasswd
|
||||||
pkgs.util-linux
|
pkgs.util-linux
|
||||||
pkgs.e2fsprogs
|
pkgs.e2fsprogs
|
||||||
pkgs.iproute2
|
pkgs.iproute2
|
||||||
|
pkgs.fuse-overlayfs
|
||||||
|
pkgs.fuse
|
||||||
];
|
];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
wantedBy = [ "network-online.target" ];
|
wantedBy = [ "network-online.target" ];
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
{
|
{
|
||||||
services.selfprivacy-api = {
|
services.selfprivacy-api = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSwagger = config.services.userdata.api.enableSwagger;
|
|
||||||
b2Bucket = config.services.userdata.backup.bucket;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users."selfprivacy-api" = {
|
users.users."selfprivacy-api" = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
url-overlay = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo/archive/22-11.tar.gz";
|
url-overlay = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo/archive/22-11-backups.tar.gz";
|
||||||
nix-overlay = (import (builtins.fetchTarball url-overlay));
|
nix-overlay = (import (builtins.fetchTarball url-overlay));
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,13 +74,6 @@ in
|
||||||
# API options #
|
# API options #
|
||||||
###############
|
###############
|
||||||
api = {
|
api = {
|
||||||
enableSwagger = mkOption {
|
|
||||||
default = true;
|
|
||||||
description = ''
|
|
||||||
Enable Swagger UI
|
|
||||||
'';
|
|
||||||
type = types.bool;
|
|
||||||
};
|
|
||||||
skippedMigrations = mkOption {
|
skippedMigrations = mkOption {
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = ''
|
description = ''
|
||||||
|
|
|
@ -16,7 +16,6 @@ in
|
||||||
hashedMasterPassword = lib.attrsets.attrByPath [ "hashedMasterPassword" ] null jsonData;
|
hashedMasterPassword = lib.attrsets.attrByPath [ "hashedMasterPassword" ] null jsonData;
|
||||||
sshKeys = lib.attrsets.attrByPath [ "sshKeys" ] [ ] jsonData;
|
sshKeys = lib.attrsets.attrByPath [ "sshKeys" ] [ ] jsonData;
|
||||||
api = {
|
api = {
|
||||||
enableSwagger = lib.attrsets.attrByPath [ "api" "enableSwagger" ] false jsonData;
|
|
||||||
skippedMigrations = lib.attrsets.attrByPath [ "api" "skippedMigrations" ] [ ] jsonData;
|
skippedMigrations = lib.attrsets.attrByPath [ "api" "skippedMigrations" ] [ ] jsonData;
|
||||||
};
|
};
|
||||||
dns = {
|
dns = {
|
||||||
|
|
Loading…
Reference in a new issue