mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2025-01-09 17:29:31 +00:00
get rid of overlay for selfprivacy-graphql-api
This commit is contained in:
parent
7cee132d8e
commit
b4b37f42f2
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, selfprivacy-graphql-api, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ in
|
||||||
wantedBy = [ "network-online.target" ];
|
wantedBy = [ "network-online.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "root";
|
User = "root";
|
||||||
ExecStart = "${pkgs.selfprivacy-graphql-api}/bin/app.py";
|
ExecStart = "${selfprivacy-graphql-api}/bin/app.py";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = "5";
|
RestartSec = "5";
|
||||||
};
|
};
|
||||||
|
@ -76,7 +76,7 @@ in
|
||||||
PYTHONUNBUFFERED = "1";
|
PYTHONUNBUFFERED = "1";
|
||||||
ENABLE_SWAGGER = (if cfg.enableSwagger then "1" else "0");
|
ENABLE_SWAGGER = (if cfg.enableSwagger then "1" else "0");
|
||||||
B2_BUCKET = cfg.b2Bucket;
|
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;
|
} // config.networking.proxy.envVars;
|
||||||
path = [
|
path = [
|
||||||
"/var/"
|
"/var/"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ userdata, selfprivacy-overlay, config, pkgs, lib, ... }:
|
{ userdata, config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./variables-module.nix
|
./variables-module.nix
|
||||||
|
@ -23,10 +23,6 @@
|
||||||
./git/gitea.nix
|
./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 = {
|
services.redis.servers.sp-api = {
|
||||||
enable = true;
|
enable = true;
|
||||||
save = [
|
save = [
|
||||||
|
|
23
flake.lock
23
flake.lock
|
@ -18,22 +18,27 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"selfprivacy-overlay": "selfprivacy-overlay"
|
"selfprivacy-graphql-api": "selfprivacy-graphql-api"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"selfprivacy-overlay": {
|
"selfprivacy-graphql-api": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1689554432,
|
"lastModified": 1699259966,
|
||||||
"narHash": "sha256-hegMIgxBHUuRFbCecQpbjFfTHpduV3VZWr8OINtQO6k=",
|
"narHash": "sha256-NMZ1NZ/3I4d9AvegG95sSaV2Hv4A6WEfJ5UCpsFr+Zk=",
|
||||||
"ref": "flakes",
|
"ref": "flake",
|
||||||
"rev": "53ed9b3f5f70a7f2843ecbef7775307e23a2c1f4",
|
"rev": "b6e84f2596b78da497f63179d72c903bb9b92d4e",
|
||||||
"revCount": 31,
|
"revCount": 942,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git"
|
"url": "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo.git"
|
"url": "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
23
flake.nix
23
flake.nix
|
@ -3,19 +3,32 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs";
|
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
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations-fun = { hardware-configuration, userdata }: {
|
nixosConfigurations-fun = { hardware-configuration, userdata }: {
|
||||||
just-nixos = nixpkgs.lib.nixosSystem {
|
just-nixos = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit system selfprivacy-overlay userdata; };
|
specialArgs = {
|
||||||
modules = [ hardware-configuration ./configuration.nix ];
|
inherit
|
||||||
|
system
|
||||||
|
hardware-configuration
|
||||||
|
userdata;
|
||||||
|
selfprivacy-graphql-api =
|
||||||
|
selfprivacy-graphql-api.packages.${system}.default;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
hardware-configuration
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue