treewide format
This commit is contained in:
parent
653eb2d606
commit
b346790feb
31 changed files with 150 additions and 104 deletions
|
|
@ -1,3 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = lib.custom.scanPaths ./.;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.hostSpec = {
|
||||
# Data variables that don't dictate configuration settings
|
||||
username = lib.mkOption {
|
||||
|
|
@ -20,7 +21,7 @@
|
|||
description = "The email of the user";
|
||||
};
|
||||
networking = lib.mkOption {
|
||||
default = {};
|
||||
default = { };
|
||||
type = lib.types.attrsOf lib.types.anything;
|
||||
description = "An attribute set of networking information";
|
||||
};
|
||||
|
|
@ -44,12 +45,11 @@
|
|||
home = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "The home directory of the user";
|
||||
default = let
|
||||
user = config.hostSpec.username;
|
||||
in
|
||||
if pkgs.stdenv.isLinux
|
||||
then "/home/${user}"
|
||||
else "/Users/${user}";
|
||||
default =
|
||||
let
|
||||
user = config.hostSpec.username;
|
||||
in
|
||||
if pkgs.stdenv.isLinux then "/home/${user}" else "/Users/${user}";
|
||||
};
|
||||
persistFolder = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = lib.custom.scanPaths ./.;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.monitors = lib.mkOption {
|
||||
type = lib.types.listOf (
|
||||
lib.types.submodule {
|
||||
|
|
@ -69,7 +70,7 @@
|
|||
};
|
||||
}
|
||||
);
|
||||
default = [];
|
||||
default = [ ];
|
||||
};
|
||||
config = {
|
||||
assertions = [
|
||||
|
|
|
|||
|
|
@ -27,7 +27,8 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.flamesite-backup = { # TODO: Remove when replication setup
|
||||
systemd.services.flamesite-backup = {
|
||||
# TODO: Remove when replication setup
|
||||
script = ''
|
||||
${pkgs.podman}/bin/podman exec swgal_db_1 sh -c 'exec mysqldump --no-tablespaces -usgr_user -psgr_pass sgr_db' > ${volumePath}/flamesites/swgalaxyproject/dbBackups/db.sql
|
||||
${pkgs.podman}/bin/podman exec nnsbluegrass_db_1 sh -c 'exec mysqldump --no-tablespaces -unns_user -pnns_pass nns_db' > ${volumePath}/flamesites/nnsbluegrass/dbBackups/db.sql
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ in
|
|||
{
|
||||
|
||||
sops.secrets = {
|
||||
"mariadb/users/grimmory" = {};
|
||||
"mariadb/users/grimmory" = { };
|
||||
};
|
||||
|
||||
sops.templates."grimmory-secrets".content = ''
|
||||
|
|
@ -17,7 +17,7 @@ in
|
|||
"grimmory"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/grimmory 774 1000 1000"
|
||||
"d /var/lib/grimmory/data 774 1000 1000"
|
||||
|
|
@ -37,13 +37,13 @@ in
|
|||
"${builtins.toString port}:6060"
|
||||
];
|
||||
environments = {
|
||||
TZ="Etc/UTC";
|
||||
APP_USER_ID="1000";
|
||||
APP_GROUP_ID="1000";
|
||||
BOOKLORE_PORT="6060";
|
||||
TZ = "Etc/UTC";
|
||||
APP_USER_ID = "1000";
|
||||
APP_GROUP_ID = "1000";
|
||||
BOOKLORE_PORT = "6060";
|
||||
|
||||
DATABASE_URL="jdbc:mariadb://host.containers.internal:3306/grimmory";
|
||||
DATABASE_USERNAME="grimmory";
|
||||
DATABASE_URL = "jdbc:mariadb://host.containers.internal:3306/grimmory";
|
||||
DATABASE_USERNAME = "grimmory";
|
||||
};
|
||||
environmentFiles = [
|
||||
config.sops.templates."grimmory-secrets".path
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ in
|
|||
enable = true;
|
||||
virtualHosts = {
|
||||
# "swgalaxyproject.com".extraConfig = ''
|
||||
# reverse_proxy http://localhost:8080
|
||||
# reverse_proxy http://localhost:8080
|
||||
# '';
|
||||
# "nnsbluegrass.com".extraConfig = ''
|
||||
# reverse_proxy http://localhost:9821
|
||||
# reverse_proxy http://localhost:9821
|
||||
# '';
|
||||
"swgalaxyproject.com".extraConfig = ''
|
||||
file_server {
|
||||
|
|
|
|||
|
|
@ -38,11 +38,11 @@ in
|
|||
users.users.caddy.extraGroups = [ "tuwunel" ];
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"psychal.link, psychal.link:8448".extraConfig = ''
|
||||
reverse_proxy unix//run/tuwunel/tuwunel.sock
|
||||
'';
|
||||
};
|
||||
};
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
"psychal.link, psychal.link:8448".extraConfig = ''
|
||||
reverse_proxy unix//run/tuwunel/tuwunel.sock
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue