Commit
This commit is contained in:
@@ -1,26 +1,22 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.actual = den.lib.exactly {
|
||||
includes = [
|
||||
(
|
||||
{ host, ... }:
|
||||
lux.services._.actual = den.lib.take.exactly (
|
||||
{ host, ... }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.actual = {
|
||||
enable = true;
|
||||
openFirewall = false;
|
||||
settings = {
|
||||
port = 3000;
|
||||
hostname = "127.0.0.1";
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts."finance.${host.domain}".extraConfig =
|
||||
"reverse_proxy :${toString config.services.actual.settings.port}";
|
||||
services.actual = {
|
||||
enable = true;
|
||||
openFirewall = false;
|
||||
settings = {
|
||||
port = 3000;
|
||||
hostname = "127.0.0.1";
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts."finance.${host.domain}".extraConfig =
|
||||
"reverse_proxy :${toString config.services.actual.settings.port}";
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
{ den, lib, ... }:
|
||||
{
|
||||
lux.services._.caddy = den.lib.parametric {
|
||||
includes = [
|
||||
(
|
||||
{ host, ... }:
|
||||
{
|
||||
nixos = {
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
email = "mail@jelles.net";
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
lux.services._.caddy = den.lib.take.atLeast ({ host, ... }: {
|
||||
nixos.services.caddy = {
|
||||
enable = true;
|
||||
email = "mail@jelles.net";
|
||||
openFirewall = true;
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1,40 +1,36 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.gitea = den.lib.parametric {
|
||||
includes = [
|
||||
(
|
||||
den.lib.take.exactly({ host }:
|
||||
lux.services._.gitea = den.lib.take.exactly (
|
||||
{ host }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.${host.domain}";
|
||||
ROOT_URL = "https://git.${host.domain}/";
|
||||
HTTP_PORT = 3001;
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.${host.domain}";
|
||||
ROOT_URL = "https://git.${host.domain}/";
|
||||
HTTP_PORT = 3001;
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
|
||||
START_SSH_SERVER = false;
|
||||
SSH_PORT = 22;
|
||||
};
|
||||
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
START_SSH_SERVER = false;
|
||||
SSH_PORT = 22;
|
||||
};
|
||||
|
||||
services.openssh.settings.AllowUsers = [ "git" ];
|
||||
|
||||
services.caddy.virtualHosts."git.${host.domain}".extraConfig =
|
||||
"reverse_proxy :${toString config.services.gitea.settings.server.HTTP_PORT}";
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
))
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.settings.AllowUsers = [ "gitea" ];
|
||||
|
||||
services.caddy.virtualHosts."git.${host.domain}".extraConfig =
|
||||
"reverse_proxy :${toString config.services.gitea.settings.server.HTTP_PORT}";
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,21 +1,13 @@
|
||||
{ den, lib, ... }:
|
||||
{
|
||||
lux.services._.openssh = den.lib.parametric.exactly {
|
||||
includes = [
|
||||
(
|
||||
{ host }:
|
||||
{
|
||||
nixos.services.openssh.settings.nixos.services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
AllowUsers = lib.attrNames host.users;
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
lux.services._.openssh = den.lib.take.exactly ({ host }: {
|
||||
nixos.services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
AllowUsers = lib.attrNames host.users;
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.radicale = den.lib.exactly {
|
||||
lux.services._.radicale = den.lib.parametric.exactly {
|
||||
includes = [
|
||||
(
|
||||
{ host, ... }:
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
auth = {
|
||||
type = "htpasswd";
|
||||
htpasswd_filename = config.sops.secrets.radicale-users.path;
|
||||
htpasswd_filename = "/var/lib/radicale/users";
|
||||
htpasswd_encryption = "bcrypt";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,29 +1,20 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
lux.services._.vaultwarden = den.lib.parametric.exactly {
|
||||
includes = [
|
||||
(
|
||||
{ host }:
|
||||
{
|
||||
nixos =
|
||||
{ config, ... }:
|
||||
{
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
backupDir = "/var/backup/vaultwarden";
|
||||
config = {
|
||||
DOMAIN = "https://vault.${host.domain}";
|
||||
SIGNUPS_ALLOWED = false;
|
||||
ROCKET_PORT = 8100;
|
||||
ROCKET_LOG = "critical";
|
||||
};
|
||||
};
|
||||
lux.services._.vaultwarden = den.lib.take.exactly ({ host }: {
|
||||
nixos = { config, ... }: {
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
backupDir = "/var/backup/vaultwarden";
|
||||
config = {
|
||||
DOMAIN = "https://vault.${host.domain}";
|
||||
SIGNUPS_ALLOWED = false;
|
||||
ROCKET_PORT = 8100;
|
||||
ROCKET_LOG = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."vault.${host.domain}".extraConfig =
|
||||
"reverse_proxy :${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
services.caddy.virtualHosts."vault.${host.domain}".extraConfig =
|
||||
"reverse_proxy :${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user