Skip to content

Commit

Permalink
services/sicp-staging: update
Browse files Browse the repository at this point in the history
  • Loading branch information
linyinfeng committed Sep 22, 2024
1 parent 234c802 commit badc003
Show file tree
Hide file tree
Showing 11 changed files with 475 additions and 41 deletions.
1 change: 1 addition & 0 deletions lib/data/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"minio_cache_test_key_id": "cache-test",
"minio_metrics_key_id": "metrics",
"minio_pastebin_key_id": "pastebin",
"minio_sicp_staging_key_id": "sicp-staging",
"secure_boot_db_cert_pem": "-----BEGIN CERTIFICATE-----\nMIIChDCCAgqgAwIBAgIQP+inRvdtZIUHOJ1NhPDk0DAKBggqhkjOPQQDAzAlMRAw\nDgYDVQQKEwdZaW5mZW5nMREwDwYDVQQDEwhsaTdnLmNvbTAeFw0yNDA3MTYxNjM0\nNDlaFw0zNDA3MTQxNjM0NDlaMDUxMzAxBgNVBAMTKllpbmZlbmcgU2VjdXJlIEJv\nb3QgU2lnbmF0dXJlIERhdGFiYXNlIEtleTCCASIwDQYJKoZIhvcNAQEBBQADggEP\nADCCAQoCggEBAKNtM41GpI5ziBLN2FKxBi0Ng2XDqUHuIyJSgTkUh8Hsm8lWsvLL\nrDwXPn/cjDLLQIrVYZaCbH9iHeE7nvidH5+9qsbGmZqlwI8k5H+068h12pdzE7HQ\nr2ABvF5Y2L+RqAUNeg8iG9BIed4pJoiTcdov7/Kj/FdeKlJHDSeThvOut1gpITrc\nxKmQj57FF65Oe9YrVNOENYkL/g9WpsW1FqO6pqoZGy5ya2YpS0W/yDZhubSzkZ+9\n18a5X5czRtfI9uXQ/rK+w+T/MoLTfDTyeueyHXZkvS2U6zPYmlqLlQYoRvrQkFZg\nm1fLhM+vmpjSQ6dwOILvHoUX3MCJt2gMw7sCAwEAAaNBMD8wDgYDVR0PAQH/BAQD\nAgeAMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUF7pFDP6qoO7y80SCJNbwPAzK\nohwwCgYIKoZIzj0EAwM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Pbl0P6yvsPk/zKC03w08nrnsh12\nZL0tlOsz2Jpai5UGKEb60JBWYJtXy4TPr5qY0kOncDiC7x6FF9zAibdoDMO7AgMBAAGjQTA/MA4G\nA1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFBe6RQz+qqDu8vNEgiTW8DwM\nyqIcMAoGCCqGSM49BAMDA2gAMGUCMQDVQ49yosGpS08eekuWlt/KLNyqEg0ijMKdZtlsSPvvzc11\nr+iotA1cad8XEMqWwsECMFZBUB+8rySU5jO78BdcVpaKKZa/B3eTs1St+utm+vC61rnocBa+tz8H\nXpiwaYrsNQ==",
Expand Down
2 changes: 2 additions & 0 deletions nixos/hosts/mtl0/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ in
services.prebuilt-zip
services.hledger-web
services.sicp-staging
services.rabbitmq
services.mongodb
i18n.input-method
virtualization.podman
users.yinfeng
Expand Down
5 changes: 5 additions & 0 deletions nixos/modules/misc/ports.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@
jellyfin-https = 3341;
iperf = 3350;
typhon = 3360;
rabbitmq = 3370;
rabbitmq-management = 3371;
sicp-staging = 3390;
sicp-staging-redis = 3391;

ipsec-nat-traversal = 4500;
babel = 6696;
Expand All @@ -99,6 +103,7 @@
minecraft = 25565;
minecraft-rcon = 25566;
minecraft-map = 25567;
mongodb = 27017; # currently change is not supported in nixpkgs module
teamspeak-voice = 9987;
teamspeak-file-transfer = 30033;
teamspeak-query = 10011;
Expand Down
22 changes: 22 additions & 0 deletions nixos/profiles/services/mongodb/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ config, ... }:
{
services.mongodb = {
enable = true;
enableAuth = true;
extraConfig = ''
net.port: ${toString config.ports.mongodb}
'';
initialRootPassword = "temporary"; # will be replaced in initialScript
initialScript = config.sops.templates."mongodb-init.js".path;
};
sops.templates."mongodb-init.js" = {
content = ''
db.changeUserPassword("root", "${config.sops.placeholder."mongodb_admin_password"}")
'';
owner = config.services.mongodb.user;
};
sops.secrets."mongodb_admin_password" = {
terraformOutput.enable = true;
restartUnits = [ ]; # needs manual rotation
};
}
12 changes: 12 additions & 0 deletions nixos/profiles/services/rabbitmq/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ config, ... }:
{
services.rabbitmq = {
enable = true;
listenAddress = "127.0.0.1";
port = config.ports.rabbitmq;
managementPlugin = {
enable = true;
port = config.ports.rabbitmq-management;
};
};
}
Loading

0 comments on commit badc003

Please sign in to comment.