Compare commits
7 commits
e6d0269262
...
c7508baf70
Author | SHA1 | Date | |
---|---|---|---|
c7508baf70 | |||
6ad3e7704c | |||
f72100ce21 | |||
d3f79b6667 | |||
f3dfc737e8 | |||
8323d5bec3 | |||
c10fc396e1 |
20 changed files with 76 additions and 17 deletions
|
@ -1,5 +1,10 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
services.bitwarden = {
|
||||||
|
nodes.host = [ "VEGAS" ];
|
||||||
|
nixos.host = ./host.nix;
|
||||||
|
};
|
||||||
|
|
||||||
dns.records.keychain.target = [ depot.hours.VEGAS.interfaces.primary.addrPublic ];
|
dns.records.keychain.target = [ depot.hours.VEGAS.interfaces.primary.addrPublic ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,21 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.frangiclave = {
|
services.frangiclave = {
|
||||||
nodes = {
|
nodes = {
|
||||||
server = [ "VEGAS" "grail" "prophet" ]; # 3 reliable nodes
|
server = [ "VEGAS" "grail" "prophet" ];
|
||||||
|
cluster = config.services.frangiclave.nodes.server;
|
||||||
agent = []; # all nodes, for vault-agent, secret templates, etc.
|
agent = []; # all nodes, for vault-agent, secret templates, etc.
|
||||||
};
|
};
|
||||||
|
meshLinks = {
|
||||||
|
server.link.protocol = "http";
|
||||||
|
cluster.link.protocol = "http";
|
||||||
|
};
|
||||||
nixos = {
|
nixos = {
|
||||||
server = [
|
server = [
|
||||||
./server.nix
|
./server.nix
|
||||||
];
|
];
|
||||||
|
cluster = [];
|
||||||
agent = [];
|
agent = [];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,34 @@
|
||||||
{ depot, ... }:
|
{ cluster, config, depot, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
apiLink = cluster.config.hostLinks.${config.networking.hostName}.frangiclave-server;
|
||||||
|
clusterLink = cluster.config.hostLinks.${config.networking.hostName}.frangiclave-cluster;
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
services.vault = {
|
services.vault = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = depot.packages.openbao;
|
package = depot.packages.openbao;
|
||||||
|
address = apiLink.tuple;
|
||||||
|
extraConfig = /*hcl*/ ''
|
||||||
|
api_addr = "${apiLink.url}"
|
||||||
|
cluster_addr = "${clusterLink.url}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
storageBackend = "raft";
|
||||||
|
storageConfig = /*hcl*/ ''
|
||||||
|
node_id = "x${builtins.hashString "sha256" "frangiclave-node-${config.networking.hostName}"}"
|
||||||
|
${
|
||||||
|
lib.pipe (cluster.config.services.frangiclave.otherNodes.server config.networking.hostName) [
|
||||||
|
(map (node: cluster.config.hostLinks.${node}.frangiclave-server))
|
||||||
|
(map (link: /*hcl*/ ''
|
||||||
|
retry_join {
|
||||||
|
leader_api_addr = "${link.url}"
|
||||||
|
}
|
||||||
|
''))
|
||||||
|
(lib.concatStringsSep "\n")
|
||||||
|
]
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
services.gitlab = {
|
||||||
|
nodes.host = [ "VEGAS" ];
|
||||||
|
nixos.host = ./host.nix;
|
||||||
|
};
|
||||||
|
|
||||||
dns.records.git.target = [ depot.hours.VEGAS.interfaces.primary.addrPublic ];
|
dns.records.git.target = [ depot.hours.VEGAS.interfaces.primary.addrPublic ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ let
|
||||||
owner = "gitlab";
|
owner = "gitlab";
|
||||||
group = "gitlab";
|
group = "gitlab";
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
file = ../../../../secrets/${name}.age;
|
file = ../../../secrets/${name}.age;
|
||||||
};
|
};
|
||||||
|
|
||||||
secrets = lib.mapAttrs (_: v: v.path) config.age.secrets;
|
secrets = lib.mapAttrs (_: v: v.path) config.age.secrets;
|
|
@ -1,11 +1,6 @@
|
||||||
{ depot, lib, ... }:
|
{ depot, lib, ... }:
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./imap.nix
|
|
||||||
./opendkim.nix
|
|
||||||
./postfix.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
|
{
|
||||||
security.acme.certs."mail.${depot.lib.meta.domain}" = {
|
security.acme.certs."mail.${depot.lib.meta.domain}" = {
|
||||||
dnsProvider = "exec";
|
dnsProvider = "exec";
|
||||||
webroot = lib.mkForce null;
|
webroot = lib.mkForce null;
|
|
@ -1,6 +1,24 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
services.mail = {
|
||||||
|
nodes = {
|
||||||
|
smtp = [ "VEGAS" ];
|
||||||
|
imap = [ "VEGAS" ];
|
||||||
|
};
|
||||||
|
nixos = {
|
||||||
|
smtp = [
|
||||||
|
./postfix.nix
|
||||||
|
./opendkim.nix
|
||||||
|
./certificate.nix
|
||||||
|
];
|
||||||
|
imap = [
|
||||||
|
./imap.nix
|
||||||
|
./certificate.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
dns.records = let
|
dns.records = let
|
||||||
inherit (depot.lib.meta) domain adminEmail;
|
inherit (depot.lib.meta) domain adminEmail;
|
||||||
mailServerAddr = depot.hours.VEGAS.interfaces.primary.addrPublic;
|
mailServerAddr = depot.hours.VEGAS.interfaces.primary.addrPublic;
|
||||||
|
|
|
@ -32,7 +32,7 @@ let
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
|
||||||
age.secrets.dovecotLdapToken.file = ../../../../secrets/dovecot-ldap-token.age;
|
age.secrets.dovecotLdapToken.file = ../../../secrets/dovecot-ldap-token.age;
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 143 993 ];
|
networking.firewall.allowedTCPPorts = [ 143 993 ];
|
||||||
|
|
|
@ -14,7 +14,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
age.secrets."postfix-ldap-mailboxes.cf" = {
|
age.secrets."postfix-ldap-mailboxes.cf" = {
|
||||||
file = ../../../../secrets/postfix-ldap-mailboxes.age;
|
file = ../../../secrets/postfix-ldap-mailboxes.age;
|
||||||
owner = "postfix";
|
owner = "postfix";
|
||||||
group = "postfix";
|
group = "postfix";
|
||||||
mode = "0400";
|
mode = "0400";
|
|
@ -1,6 +1,11 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
services.sso = {
|
||||||
|
nodes.host = [ "VEGAS" ];
|
||||||
|
nixos.host = ./host.nix;
|
||||||
|
};
|
||||||
|
|
||||||
dns.records = let
|
dns.records = let
|
||||||
ssoAddr = [ depot.hours.VEGAS.interfaces.primary.addrPublic ];
|
ssoAddr = [ depot.hours.VEGAS.interfaces.primary.addrPublic ];
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -66,9 +66,11 @@ in
|
||||||
services.wireguard = {
|
services.wireguard = {
|
||||||
nodes = {
|
nodes = {
|
||||||
mesh = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
|
mesh = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
|
||||||
|
storm = [ "VEGAS" ];
|
||||||
};
|
};
|
||||||
nixos = {
|
nixos = {
|
||||||
mesh = ./mesh.nix;
|
mesh = ./mesh.nix;
|
||||||
|
storm = ./storm.nix;
|
||||||
};
|
};
|
||||||
secrets.meshPrivateKey = {
|
secrets.meshPrivateKey = {
|
||||||
nodes = config.services.wireguard.nodes.mesh;
|
nodes = config.services.wireguard.nodes.mesh;
|
||||||
|
|
|
@ -6,7 +6,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
age.secrets.wireguard-key-storm = {
|
age.secrets.wireguard-key-storm = {
|
||||||
file = ../../../../secrets + "/wireguard-key-storm-${hostName}.age";
|
file = ../../../secrets + "/wireguard-key-storm-${hostName}.age";
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,15 +16,10 @@
|
||||||
|
|
||||||
# Services
|
# Services
|
||||||
./services/backbone-routing
|
./services/backbone-routing
|
||||||
./services/bitwarden
|
|
||||||
./services/cdn-shield
|
./services/cdn-shield
|
||||||
./services/gitlab
|
|
||||||
./services/jokes
|
./services/jokes
|
||||||
./services/mail
|
|
||||||
./services/minecraft
|
./services/minecraft
|
||||||
./services/sso
|
|
||||||
./services/websites
|
./services/websites
|
||||||
./services/wireguard-server
|
|
||||||
depot.nixosModules.hyprspace
|
depot.nixosModules.hyprspace
|
||||||
depot.nixosModules.nix-builder
|
depot.nixosModules.nix-builder
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue