get rid of overlay for selfprivacy-graphql-api

pull/55/head
Alexander Tomokhov 2023-11-06 12:18:08 +04:00
parent 7cee132d8e
commit b4b37f42f2
4 changed files with 36 additions and 22 deletions

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, selfprivacy-graphql-api, ... }:
with lib;
@ -63,7 +63,7 @@ in
wantedBy = [ "network-online.target" ];
serviceConfig = {
User = "root";
ExecStart = "${pkgs.selfprivacy-graphql-api}/bin/app.py";
ExecStart = "${selfprivacy-graphql-api}/bin/app.py";
Restart = "always";
RestartSec = "5";
};
@ -76,7 +76,7 @@ in
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 = selfprivacy-graphql-api.pythonPath + ":${selfprivacy-graphql-api}/lib/python3.10/site-packages/";
} // config.networking.proxy.envVars;
path = [
"/var/"

View File

@ -1,4 +1,4 @@
{ userdata, selfprivacy-overlay, config, pkgs, lib, ... }:
{ userdata, config, pkgs, lib, ... }:
{
imports = [
./variables-module.nix
@ -23,10 +23,6 @@
./git/gitea.nix
];
nixpkgs.overlays = [ (import selfprivacy-overlay) ];
# this should be specified in hardware-configuration.nix?
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
services.redis.servers.sp-api = {
enable = true;
save = [

View File

@ -18,22 +18,27 @@
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"selfprivacy-overlay": "selfprivacy-overlay"
"selfprivacy-graphql-api": "selfprivacy-graphql-api"
}
},
"selfprivacy-overlay": {
"selfprivacy-graphql-api": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1689554432,
"narHash": "sha256-hegMIgxBHUuRFbCecQpbjFfTHpduV3VZWr8OINtQO6k=",
"ref": "flakes",
"rev": "53ed9b3f5f70a7f2843ecbef7775307e23a2c1f4",
"revCount": 31,
"lastModified": 1699259966,
"narHash": "sha256-NMZ1NZ/3I4d9AvegG95sSaV2Hv4A6WEfJ5UCpsFr+Zk=",
"ref": "flake",
"rev": "b6e84f2596b78da497f63179d72c903bb9b92d4e",
"revCount": 942,
"type": "git",
"url": "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git"
"url": "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git"
},
"original": {
"type": "git",
"url": "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git"
"url": "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git"
}
}
},

View File

@ -3,19 +3,32 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
selfprivacy-overlay.url =
"git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git";
selfprivacy-graphql-api.url =
"git+https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git";
selfprivacy-graphql-api.inputs.nixpkgs.follows = "nixpkgs";
# TODO nixpkgs inputs of selfprivacy-graphql-api and this flake must match!
};
outputs = { self, nixpkgs, selfprivacy-overlay }:
outputs = { self, nixpkgs, selfprivacy-graphql-api }:
let
system = "x86_64-linux";
in
{
nixosConfigurations-fun = { hardware-configuration, userdata }: {
just-nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit system selfprivacy-overlay userdata; };
modules = [ hardware-configuration ./configuration.nix ];
specialArgs = {
inherit
system
hardware-configuration
userdata;
selfprivacy-graphql-api =
selfprivacy-graphql-api.packages.${system}.default;
};
modules = [
hardware-configuration
./configuration.nix
];
};
};
};