From 5809e5654d1e5a293ae7affdf3fafbbea7581d01 Mon Sep 17 00:00:00 2001 From: Ashelyn Rose Date: Tue, 30 May 2023 00:45:36 -0600 Subject: [PATCH] Add contact api service --- flake.lock | 117 +++++++++++++++++++++++++++++++++++++++++++++-------- flake.nix | 10 ++++- 2 files changed, 110 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index 70cf40d..d11e565 100644 --- a/flake.lock +++ b/flake.lock @@ -2,7 +2,7 @@ "nodes": { "naersk": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1679567394, @@ -48,6 +48,21 @@ "type": "github" } }, + "nix-filter_3": { + "locked": { + "lastModified": 1681154353, + "narHash": "sha256-MCJ5FHOlbfQRFwN0brqPbCunLEVw05D/3sRVoNVt2tI=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "f529f42792ade8e32c4be274af6b6d60857fbee7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1685314633, @@ -82,11 +97,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1685395560, - "narHash": "sha256-TZed6lirB+0V8pDK0U5N6WwjApjcb5x6esCJUqKtts0=", + "lastModified": 1685427832, + "narHash": "sha256-LGvKlC1Wqh6epkh68iQoOyt7lH2vGVLrhNAEAJtqQAk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3890c1aafa2273c8d437aa667c1bca8662d414ae", + "rev": "9db2a0900132fb83832dac8323acec8db60e400d", "type": "github" }, "original": { @@ -97,6 +112,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1685427832, + "narHash": "sha256-LGvKlC1Wqh6epkh68iQoOyt7lH2vGVLrhNAEAJtqQAk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9db2a0900132fb83832dac8323acec8db60e400d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1685005470, "narHash": "sha256-Nw+4uivzCwyZcEB71YH58zYk4N5UgcNeqb+D52bjlhI=", @@ -112,7 +143,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1684759798, "narHash": "sha256-Kpbf5yKvKcj/yPqE1zYC6gju4JwTsYxTIZEvOII0jr4=", @@ -126,7 +157,7 @@ "type": "indirect" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1684759798, "narHash": "sha256-Kpbf5yKvKcj/yPqE1zYC6gju4JwTsYxTIZEvOII0jr4=", @@ -148,11 +179,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1685395290, - "narHash": "sha256-3240L6oyLhxSNA5up1m0gzvmBSFBk/pTw0a4anGebbw=", + "lastModified": 1685416441, + "narHash": "sha256-OK+gaEgHxxP47z1joQIv0oLcnjJWjn/WE7o306juAj0=", "ref": "refs/heads/main", - "rev": "1fec0384165ab6dbe53712e1a9236a2ed3a48606", - "revCount": 1, + "rev": "30c606711f2237ec4774094ede034a5c9b926657", + "revCount": 2, "type": "git", "url": "ssh://git@git.tempest.dev/ashe/nixos-config-private" }, @@ -165,6 +196,7 @@ "inputs": { "nixpkgs": "nixpkgs", "private": "private", + "tempest-contact": "tempest-contact", "tempest-secret": "tempest-secret", "tempestdev": "tempestdev", "tmpfiles": "tmpfiles" @@ -230,12 +262,47 @@ "type": "github" } }, - "tempest-secret": { + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tempest-contact": { "inputs": { "nix-filter": "nix-filter", "nixpkgs": "nixpkgs_3", "utils": "utils_2" }, + "locked": { + "lastModified": 1685416728, + "narHash": "sha256-Z+L3RvhF+r+rHi9Jd5stdCjOBr4R87/6F1IkuOqFdso=", + "ref": "refs/heads/main", + "rev": "9ca8866f57037339937cc40473aa47d8632bc3f2", + "revCount": 7, + "type": "git", + "url": "http://git.tempest.dev/ashe/contact-api" + }, + "original": { + "type": "git", + "url": "http://git.tempest.dev/ashe/contact-api" + } + }, + "tempest-secret": { + "inputs": { + "nix-filter": "nix-filter_2", + "nixpkgs": "nixpkgs_4", + "utils": "utils_3" + }, "locked": { "lastModified": 1685398072, "narHash": "sha256-1KvrO+8nUSUurBR645d94r7LoaEJcK8UaGjXC9dm+II=", @@ -252,9 +319,9 @@ }, "tempestdev": { "inputs": { - "nix-filter": "nix-filter_2", - "nixpkgs": "nixpkgs_4", - "utils": "utils_3" + "nix-filter": "nix-filter_3", + "nixpkgs": "nixpkgs_5", + "utils": "utils_4" }, "locked": { "lastModified": 1685319356, @@ -273,8 +340,8 @@ "tmpfiles": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_6", - "utils": "utils_4" + "nixpkgs": "nixpkgs_7", + "utils": "utils_5" }, "locked": { "lastModified": 1684903753, @@ -361,6 +428,24 @@ "repo": "flake-utils", "type": "github" } + }, + "utils_5": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 12e03f9..be10626 100644 --- a/flake.nix +++ b/flake.nix @@ -5,9 +5,10 @@ tmpfiles.url = "git+http://git.tempest.dev/ashe/tmpfiles"; tempestdev.url = "git+http://git.tempest.dev/ashe/tempest.dev"; tempest-secret.url = "git+ssh://git@git.tempest.dev/ashe/tempest-skycord-secret"; + tempest-contact.url = "git+http://git.tempest.dev/ashe/contact-api"; }; - outputs = { self, nixpkgs, private, tmpfiles, tempestdev, tempest-secret }: { + outputs = { self, nixpkgs, private, tmpfiles, tempestdev, tempest-secret, tempest-contact }: { nixosConfigurations = { nyx = nixpkgs.lib.nixosSystem { @@ -19,6 +20,8 @@ tmpfiles.nixosModule tempestdev.nixosModule tempest-secret.nixosModule + tempest-contact.nixosModule + ({ pkgs, ...}: { networking.firewall.allowedTCPPorts = [ 80 443 ]; @@ -38,6 +41,11 @@ ashe.services.tempest-secret.domain = "test.tempest.dev"; ashe.services.tempest-secret.path = "/secret"; ashe.services.tempest-secret.port = 4443; + + ashe.services.tempest-api-contact.enable = true; + ashe.services.tempest-api-contact.domain = "contact.tempest.dev"; + ashe.services.tempest-api-contact.configFile = "/etc/tempest/contact.json"; + ashe.services.tempest-api-contact.port = 4444; }) ]; };