feat(refactor): ready for merge
This commit is contained in:
@@ -12,16 +12,13 @@ in {
|
||||
age.secrets.giteaCloudflared.file = "${self}/secrets/giteaCloudflared.age";
|
||||
|
||||
server.infra = {
|
||||
fail2ban.jails.unit = {
|
||||
fail2ban.jails.${unit} = {
|
||||
serviceName = "${unit}";
|
||||
failRegex = ''
|
||||
.*(Failed authentication attempt|invalid credentials|Attempted access of unknown user).*
|
||||
from <HOST>
|
||||
'';
|
||||
failRegex = ''.*(Failed authentication attempt|invalid credentials|Attempted access of unknown user).* from <HOST>'';
|
||||
};
|
||||
|
||||
postgresql.databases = [
|
||||
{database = unit;}
|
||||
{database = "gitea";}
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
clib,
|
||||
...
|
||||
}: let
|
||||
unit = "homepage-dashboard";
|
||||
@@ -90,9 +91,10 @@ in {
|
||||
"Downloads"
|
||||
"Services"
|
||||
];
|
||||
|
||||
allServices = srv.services;
|
||||
|
||||
getDomain = s: clib.server.mkHostDomain config s;
|
||||
|
||||
homepageServicesFor = category:
|
||||
lib.filterAttrs
|
||||
(
|
||||
@@ -108,12 +110,15 @@ in {
|
||||
"${cat}" =
|
||||
lib.lists.forEach
|
||||
(lib.attrsets.mapAttrsToList (name: _value: name) (homepageServicesFor cat))
|
||||
(x: {
|
||||
"${allServices.${x}.homepage.name}" = {
|
||||
icon = allServices.${x}.homepage.icon;
|
||||
description = allServices.${x}.homepage.description;
|
||||
href = "https://${allServices.${x}.url}";
|
||||
siteMonitor = "https://${allServices.${x}.url}";
|
||||
(x: let
|
||||
service = allServices.${x};
|
||||
domain = getDomain service;
|
||||
in {
|
||||
"${service.homepage.name}" = {
|
||||
icon = service.homepage.icon;
|
||||
description = service.homepage.description;
|
||||
href = "https://${domain}";
|
||||
siteMonitor = "https://${domain}";
|
||||
};
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user