Fediversity/machines/dev/fedi201/fedipanel.nix
Kiara Grouwstra 58c1999fd2
button works deployed
late rebasing

account for 285
2025-08-07 09:30:36 +02:00

65 lines
1.2 KiB
Nix

{
config,
...
}:
let
name = "panel";
in
{
_class = "nixos";
imports = [
(import ../../../panel { }).module
];
security.acme = {
acceptTerms = true;
defaults.email = "beheer@procolix.com";
};
age.secrets.panel-ssh-key = {
owner = name;
mode = "400";
};
programs.ssh.startAgent = true;
home-manager = {
users.${name}.home = {
stateVersion = "25.05";
file.".ssh/config" = {
text = ''
IdentityFile ${config.age.secrets.panel-ssh-key.path}
'';
};
};
};
services.${name} = {
enable = true;
production = true;
domain = "demo.fediversity.eu";
# FIXME: make it work without this duplication
settings =
let
cfg = config.services.${name};
in
{
STATIC_ROOT = "/var/lib/${name}/static";
DEBUG = false;
ALLOWED_HOSTS = [
cfg.domain
cfg.host
"localhost"
"[::1]"
];
CSRF_TRUSTED_ORIGINS = [ "https://${cfg.domain}" ];
COMPRESS_OFFLINE = true;
LIBSASS_OUTPUT_STYLE = "compressed";
};
secrets = {
SECRET_KEY = config.age.secrets.panel-secret-key.path;
};
port = 8000;
};
}