1
0
Fork 0
Fediversity/infra/machines/fedi201/fedipanel.nix

51 lines
999 B
Nix

{
inputs,
config,
# pkgs,
...
}:
let
name = "panel";
panel = (import ../../../panel/default.nix { }).package;
in
# builtins.trace args.pkgs
{
imports = [
../../../panel/nix/configuration.nix
];
nix.settings = {
extra-experimental-features = "configurable-impure-env";
};
environment.systemPackages = [
inputs
panel
];
security.acme = {
acceptTerms = true;
defaults.email = "beheer@procolix.com";
};
services.${name} = {
enable = true;
package = panel;
production = true;
domain = "demo.fediversity.eu";
host = "0.0.0.0";
secrets = {
SECRET_KEY = config.age.secrets.panel-secret-key.path;
};
port = 8000;
settings = {
DATABASE_URL = "sqlite:///var/lib/${name}/db.sqlite3";
CREDENTIALS_DIRECTORY = "/var/lib/${name}/.credentials";
STATIC_ROOT = "/var/lib/${name}/static";
};
};
systemd.services.${name}.environment = {
REPO_DIR = inputs;
# NIX_DIR = pkgs.nix;
};
}