Compare commits

...

7 commits

20 changed files with 65 additions and 17 deletions

View file

@ -1,5 +1,10 @@
{ depot, ... }:
{
services.bitwarden = {
nodes.host = [ "VEGAS" ];
nixos.host = ./host.nix;
};
dns.records.keychain.target = [ depot.hours.VEGAS.interfaces.primary.addrPublic ];
}

View file

@ -1,13 +1,21 @@
{ config, ... }:
{
services.frangiclave = {
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.
};
meshLinks = {
server.link.protocol = "http";
cluster.link.protocol = "http";
};
nixos = {
server = [
./server.nix
];
cluster = [];
agent = [];
};
};

View file

@ -1,8 +1,23 @@
{ depot, ... }:
{ cluster, config, depot, ... }:
let
apiLink = cluster.config.hostLinks.${config.networking.hostName}.frangiclave-server;
clusterLink = cluster.config.hostLinks.${config.networking.hostName}.frangiclave-cluster;
in
{
services.vault = {
enable = true;
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}"}"
'';
};
}

View file

@ -1,5 +1,10 @@
{ depot, ... }:
{
services.gitlab = {
nodes.host = [ "VEGAS" ];
nixos.host = ./host.nix;
};
dns.records.git.target = [ depot.hours.VEGAS.interfaces.primary.addrPublic ];
}

View file

@ -9,7 +9,7 @@ let
owner = "gitlab";
group = "gitlab";
mode = "0400";
file = ../../../../secrets/${name}.age;
file = ../../../secrets/${name}.age;
};
secrets = lib.mapAttrs (_: v: v.path) config.age.secrets;

View file

@ -1,11 +1,6 @@
{ depot, lib, ... }:
{
imports = [
./imap.nix
./opendkim.nix
./postfix.nix
];
{
security.acme.certs."mail.${depot.lib.meta.domain}" = {
dnsProvider = "exec";
webroot = lib.mkForce null;

View file

@ -1,6 +1,24 @@
{ depot, ... }:
{
services.mail = {
nodes = {
smtp = [ "VEGAS" ];
imap = [ "VEGAS" ];
};
nixos = {
smtp = [
./postfix.nix
./opendkim.nix
./certificate.nix
];
imap = [
./imap.nix
./certificate.nix
];
};
};
dns.records = let
inherit (depot.lib.meta) domain adminEmail;
mailServerAddr = depot.hours.VEGAS.interfaces.primary.addrPublic;

View file

@ -32,7 +32,7 @@ let
'';
in {
age.secrets.dovecotLdapToken.file = ../../../../secrets/dovecot-ldap-token.age;
age.secrets.dovecotLdapToken.file = ../../../secrets/dovecot-ldap-token.age;
networking.firewall.allowedTCPPorts = [ 143 993 ];

View file

@ -14,7 +14,7 @@ let
in
{
age.secrets."postfix-ldap-mailboxes.cf" = {
file = ../../../../secrets/postfix-ldap-mailboxes.age;
file = ../../../secrets/postfix-ldap-mailboxes.age;
owner = "postfix";
group = "postfix";
mode = "0400";

View file

@ -1,6 +1,11 @@
{ depot, ... }:
{
services.sso = {
nodes.host = [ "VEGAS" ];
nixos.host = ./host.nix;
};
dns.records = let
ssoAddr = [ depot.hours.VEGAS.interfaces.primary.addrPublic ];
in {

View file

@ -66,9 +66,11 @@ in
services.wireguard = {
nodes = {
mesh = [ "checkmate" "grail" "thunderskin" "VEGAS" "prophet" ];
storm = [ "VEGAS" ];
};
nixos = {
mesh = ./mesh.nix;
storm = ./storm.nix;
};
secrets.meshPrivateKey = {
nodes = config.services.wireguard.nodes.mesh;

View file

@ -6,7 +6,7 @@ let
in
{
age.secrets.wireguard-key-storm = {
file = ../../../../secrets + "/wireguard-key-storm-${hostName}.age";
file = ../../../secrets + "/wireguard-key-storm-${hostName}.age";
mode = "0400";
};

View file

@ -16,15 +16,10 @@
# Services
./services/backbone-routing
./services/bitwarden
./services/cdn-shield
./services/gitlab
./services/jokes
./services/mail
./services/minecraft
./services/sso
./services/websites
./services/wireguard-server
depot.nixosModules.hyprspace
depot.nixosModules.nix-builder