diff options
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/surtr/default.nix | 2 | ||||
| -rw-r--r-- | hosts/surtr/dns/default.nix | 2 | ||||
| -rw-r--r-- | hosts/surtr/dns/keys/firefly.yggdrasil.li_acme | 24 | ||||
| -rw-r--r-- | hosts/surtr/dns/zones/li.yggdrasil.soa | 10 | ||||
| -rw-r--r-- | hosts/surtr/firefly.nix | 66 | ||||
| -rw-r--r-- | hosts/surtr/tls/tsig_keys/firefly.yggdrasil.li | 24 | ||||
| -rw-r--r-- | hosts/vidhar/default.nix | 2 | ||||
| -rw-r--r-- | hosts/vidhar/firefly-iii/app_key | 24 | ||||
| -rw-r--r-- | hosts/vidhar/firefly-iii/default.nix | 64 | ||||
| -rw-r--r-- | hosts/vidhar/network/ruleset.nft | 4 | ||||
| -rw-r--r-- | hosts/vidhar/pgbackrest/default.nix | 2 |
11 files changed, 4 insertions, 220 deletions
diff --git a/hosts/surtr/default.nix b/hosts/surtr/default.nix index c5ba718e..3bbd51a4 100644 --- a/hosts/surtr/default.nix +++ b/hosts/surtr/default.nix | |||
| @@ -7,7 +7,7 @@ with lib; | |||
| 7 | tmpfs-root qemu-guest openssh rebuild-machines zfs | 7 | tmpfs-root qemu-guest openssh rebuild-machines zfs |
| 8 | ./zfs.nix ./dns ./tls ./http ./bifrost ./matrix ./postgresql | 8 | ./zfs.nix ./dns ./tls ./http ./bifrost ./matrix ./postgresql |
| 9 | ./prometheus ./email ./vpn ./borg.nix ./etebase ./immich.nix | 9 | ./prometheus ./email ./vpn ./borg.nix ./etebase ./immich.nix |
| 10 | ./paperless.nix ./firefly.nix ./hledger.nix | 10 | ./paperless.nix ./hledger.nix |
| 11 | ]; | 11 | ]; |
| 12 | 12 | ||
| 13 | config = { | 13 | config = { |
diff --git a/hosts/surtr/dns/default.nix b/hosts/surtr/dns/default.nix index a23b789c..5dd60190 100644 --- a/hosts/surtr/dns/default.nix +++ b/hosts/surtr/dns/default.nix | |||
| @@ -157,7 +157,7 @@ in { | |||
| 157 | ${concatMapStringsSep "\n" mkZone [ | 157 | ${concatMapStringsSep "\n" mkZone [ |
| 158 | { domain = "yggdrasil.li"; | 158 | { domain = "yggdrasil.li"; |
| 159 | addACLs = { "yggdrasil.li" = ["ymir_acme_acl"]; }; | 159 | addACLs = { "yggdrasil.li" = ["ymir_acme_acl"]; }; |
| 160 | acmeDomains = ["surtr.yggdrasil.li" "yggdrasil.li" "etesync.yggdrasil.li" "immich.yggdrasil.li" "app.etesync.yggdrasil.li" "paperless.yggdrasil.li" "firefly.yggdrasil.li" "hledger.yggdrasil.li"]; | 160 | acmeDomains = ["surtr.yggdrasil.li" "yggdrasil.li" "etesync.yggdrasil.li" "immich.yggdrasil.li" "app.etesync.yggdrasil.li" "paperless.yggdrasil.li" "hledger.yggdrasil.li"]; |
| 161 | } | 161 | } |
| 162 | { domain = "nights.email"; | 162 | { domain = "nights.email"; |
| 163 | addACLs = { "nights.email" = ["ymir_acme_acl"]; }; | 163 | addACLs = { "nights.email" = ["ymir_acme_acl"]; }; |
diff --git a/hosts/surtr/dns/keys/firefly.yggdrasil.li_acme b/hosts/surtr/dns/keys/firefly.yggdrasil.li_acme deleted file mode 100644 index 3bd0df26..00000000 --- a/hosts/surtr/dns/keys/firefly.yggdrasil.li_acme +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | { | ||
| 2 | "data": "ENC[AES256_GCM,data:cwnYMc/noE+Cv2Vh2KVJLlYdF9ul5XygFuZEEpd7YsP/r+ls+9gYSMDWmkUBC0F1Pt/SlZlIM/dwHs4Bd21B6g+rBAlHz9IJyA9l7Nl4HKwMxlDU6C0Z/l3YdgLhDIPUARHianJqAfJ3xIMIGYVFIqA0haKCgxS6jMG5Z50+FZa0aeF24fweUea56sD3+A/Hg+YdXfOwmqlwNILADLknv+0ZLgp7bpieZCsi4wluuVg8RSj1kPOvHd8Y7GRe2ooyY1ZOyjqIOT9Gz+pOCTTxEQi5uBV1KLju,iv:hI1pD19VjIG//+qLgfc8UYlhr2OLVkOYq3BRRkC9cSE=,tag:I0xFufqFu4zxYHfehv8cNg==,type:str]", | ||
| 3 | "sops": { | ||
| 4 | "kms": null, | ||
| 5 | "gcp_kms": null, | ||
| 6 | "azure_kv": null, | ||
| 7 | "hc_vault": null, | ||
| 8 | "age": [ | ||
| 9 | { | ||
| 10 | "recipient": "age1rmmhetcmllq0ahl5qznlr0eya2zdxwl9h6y5wnl97d2wtyx5t99sm2u866", | ||
| 11 | "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2ZG5xaFIzR2s1RUF4aGhx\nb3lwd05nTi81aUJ0T1c4eXFDdmxjQ2pqdEVRCmk5WnhlNm1rc3pDNjJHeEN1YzZ2\nN2sxcHYyaHpBMGo1aXNLSGNuTnhpYjgKLS0tIHdKcGcvYTRuWGxnVGRHa2tTbXVW\nUDhxeHBVVFM1MVdXR05vaE1STlVxaGMKKLG5ZCotuVRYqq1kSgqgA8DfJMg0JqO4\nIEChfbwWc3DQneaLa6393ZWdyDdxLxqvWWTzEOGbK8MFL3rqFW9IFg==\n-----END AGE ENCRYPTED FILE-----\n" | ||
| 12 | }, | ||
| 13 | { | ||
| 14 | "recipient": "age19a7j77w267z04zls7m28a8hj4a0g5af6ltye2d5wypg33c3l89csd4r9zq", | ||
| 15 | "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSArV0RzdS9ZUFhqRDRqZFBJ\naUU2WnV3N0tkdDJIMCtzeUhlN283akVkd0FnClJWc0JPZk83K3RmOUxYZ2VHOWdV\ndXh1VVlvdW52WllMakJnK2dYNnY1TmMKLS0tIHVYWm14LzFWNnhPUm9IMnQwTHBN\nZkRYVkFhNEpLOXFYUDVDdHdmbG8yRFkKq8+CSq0ZxDHDU85SRLtZjss+91VG6bVY\nlj1bmGrvSd+hLqCXmHr6UfwYAr71Z+XhoJCj8GKGAXvA147QnEWgTQ==\n-----END AGE ENCRYPTED FILE-----\n" | ||
| 16 | } | ||
| 17 | ], | ||
| 18 | "lastmodified": "2025-02-18T18:18:41Z", | ||
| 19 | "mac": "ENC[AES256_GCM,data:UTEZfJkycq+nFG1xpshpDu+9ne13DG6fserHespXh7FFJ43rD7CI9azW0O5U88aVxkPEXe3yA27pldxto6AGGSx0o3fvz9CryN56qB6keZAWY78sQJLD8GoZtkNujgsvSa8F+haMJTznRfOtlJ4bMTmfuO9QSyzvwwgre+2hVrQ=,iv:ndAnqBqBxXE1MNDxuUxoSMOJSAxlB+8UXh2EH1gXZE8=,tag:F/opqs+Zm7tZUNf+APoPaQ==,type:str]", | ||
| 20 | "pgp": null, | ||
| 21 | "unencrypted_suffix": "_unencrypted", | ||
| 22 | "version": "3.9.4" | ||
| 23 | } | ||
| 24 | } \ No newline at end of file | ||
diff --git a/hosts/surtr/dns/zones/li.yggdrasil.soa b/hosts/surtr/dns/zones/li.yggdrasil.soa index 21d36652..2ef120e6 100644 --- a/hosts/surtr/dns/zones/li.yggdrasil.soa +++ b/hosts/surtr/dns/zones/li.yggdrasil.soa | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | $ORIGIN yggdrasil.li. | 1 | $ORIGIN yggdrasil.li. |
| 2 | $TTL 3600 | 2 | $TTL 3600 |
| 3 | @ IN SOA ns.yggdrasil.li. hostmaster.yggdrasil.li ( | 3 | @ IN SOA ns.yggdrasil.li. hostmaster.yggdrasil.li ( |
| 4 | 2025021900 ; serial | 4 | 2025021901 ; serial |
| 5 | 10800 ; refresh | 5 | 10800 ; refresh |
| 6 | 3600 ; retry | 6 | 3600 ; retry |
| 7 | 604800 ; expire | 7 | 604800 ; expire |
| @@ -85,14 +85,6 @@ _acme-challenge.paperless IN NS ns.yggdrasil.li. | |||
| 85 | 85 | ||
| 86 | paperless IN HTTPS 1 . alpn="h2,h3" ipv4hint="202.61.241.61" ipv6hint="2a03:4000:52:ada::" | 86 | paperless IN HTTPS 1 . alpn="h2,h3" ipv4hint="202.61.241.61" ipv6hint="2a03:4000:52:ada::" |
| 87 | 87 | ||
| 88 | firefly IN A 202.61.241.61 | ||
| 89 | firefly IN AAAA 2a03:4000:52:ada:: | ||
| 90 | firefly IN MX 0 surtr.yggdrasil.li | ||
| 91 | firefly IN TXT "v=spf1 redirect=surtr.yggdrasil.li" | ||
| 92 | _acme-challenge.firefly IN NS ns.yggdrasil.li. | ||
| 93 | |||
| 94 | firefly IN HTTPS 1 . alpn="h2,h3" ipv4hint="202.61.241.61" ipv6hint="2a03:4000:52:ada::" | ||
| 95 | |||
| 96 | hledger IN A 202.61.241.61 | 88 | hledger IN A 202.61.241.61 |
| 97 | hledger IN AAAA 2a03:4000:52:ada:: | 89 | hledger IN AAAA 2a03:4000:52:ada:: |
| 98 | hledger IN MX 0 surtr.yggdrasil.li | 90 | hledger IN MX 0 surtr.yggdrasil.li |
diff --git a/hosts/surtr/firefly.nix b/hosts/surtr/firefly.nix deleted file mode 100644 index 2d9641b0..00000000 --- a/hosts/surtr/firefly.nix +++ /dev/null | |||
| @@ -1,66 +0,0 @@ | |||
| 1 | { config, ... }: | ||
| 2 | |||
| 3 | { | ||
| 4 | config = { | ||
| 5 | security.acme.rfc2136Domains = { | ||
| 6 | "firefly.yggdrasil.li" = { | ||
| 7 | restartUnits = ["nginx.service"]; | ||
| 8 | }; | ||
| 9 | }; | ||
| 10 | |||
| 11 | services.nginx = { | ||
| 12 | upstreams."firefly" = { | ||
| 13 | servers = { | ||
| 14 | "[2a03:4000:52:ada:4:1::]:9000" = {}; | ||
| 15 | }; | ||
| 16 | extraConfig = '' | ||
| 17 | keepalive 8; | ||
| 18 | ''; | ||
| 19 | }; | ||
| 20 | virtualHosts = { | ||
| 21 | "firefly.yggdrasil.li" = { | ||
| 22 | kTLS = true; | ||
| 23 | http3 = true; | ||
| 24 | forceSSL = true; | ||
| 25 | sslCertificate = "/run/credentials/nginx.service/firefly.yggdrasil.li.pem"; | ||
| 26 | sslCertificateKey = "/run/credentials/nginx.service/firefly.yggdrasil.li.key.pem"; | ||
| 27 | sslTrustedCertificate = "/run/credentials/nginx.service/firefly.yggdrasil.li.chain.pem"; | ||
| 28 | extraConfig = '' | ||
| 29 | charset utf-8; | ||
| 30 | ''; | ||
| 31 | |||
| 32 | locations = { | ||
| 33 | "/".extraConfig = '' | ||
| 34 | proxy_pass http://firefly; | ||
| 35 | |||
| 36 | proxy_http_version 1.1; | ||
| 37 | proxy_set_header Upgrade $http_upgrade; | ||
| 38 | proxy_set_header Connection "upgrade"; | ||
| 39 | |||
| 40 | proxy_redirect off; | ||
| 41 | proxy_set_header Host $host; | ||
| 42 | proxy_set_header X-Real-IP $remote_addr; | ||
| 43 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| 44 | proxy_set_header X-Forwarded-Host $server_name; | ||
| 45 | proxy_set_header X-Forwarded-Proto $scheme; | ||
| 46 | |||
| 47 | client_max_body_size 0; | ||
| 48 | proxy_request_buffering off; | ||
| 49 | proxy_buffering off; | ||
| 50 | ''; | ||
| 51 | }; | ||
| 52 | }; | ||
| 53 | }; | ||
| 54 | }; | ||
| 55 | |||
| 56 | systemd.services.nginx = { | ||
| 57 | serviceConfig = { | ||
| 58 | LoadCredential = [ | ||
| 59 | "firefly.yggdrasil.li.key.pem:${config.security.acme.certs."firefly.yggdrasil.li".directory}/key.pem" | ||
| 60 | "firefly.yggdrasil.li.pem:${config.security.acme.certs."firefly.yggdrasil.li".directory}/fullchain.pem" | ||
| 61 | "firefly.yggdrasil.li.chain.pem:${config.security.acme.certs."firefly.yggdrasil.li".directory}/chain.pem" | ||
| 62 | ]; | ||
| 63 | }; | ||
| 64 | }; | ||
| 65 | }; | ||
| 66 | } | ||
diff --git a/hosts/surtr/tls/tsig_keys/firefly.yggdrasil.li b/hosts/surtr/tls/tsig_keys/firefly.yggdrasil.li deleted file mode 100644 index d03f25c1..00000000 --- a/hosts/surtr/tls/tsig_keys/firefly.yggdrasil.li +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | { | ||
| 2 | "data": "ENC[AES256_GCM,data:zpfz2m+93X9kSbUeF8BVJtznD1jGT6yyybCW3PbSzzVLYRUNrKZkkoaCQoKA,iv:sXo1hDebOr1bGlkazvjc29RHuPHu8ihtKj4+EeKgeHU=,tag:nexS/rIUS79Ui63Tg4KFrw==,type:str]", | ||
| 3 | "sops": { | ||
| 4 | "kms": null, | ||
| 5 | "gcp_kms": null, | ||
| 6 | "azure_kv": null, | ||
| 7 | "hc_vault": null, | ||
| 8 | "age": [ | ||
| 9 | { | ||
| 10 | "recipient": "age1rmmhetcmllq0ahl5qznlr0eya2zdxwl9h6y5wnl97d2wtyx5t99sm2u866", | ||
| 11 | "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB0eElJT1A2dVNhRVRWaFRk\nelF6d2FJRzVEdGk3SzFYWUVSSWZ2blFZYWdvCkMrRnl1d0picFA0R2lpWFprSU84\nYVJDNy80MW9IUnk3YTB6bVNrcXJVMXMKLS0tIGxLN0pWQ0VUbXJrV1RGME9XKzdT\nckFObDg0UnA4amJuSEpHWE83ck1NVFkK1u5xi1utsa6vEXeF+PT4Fe2o2eAi8G+Z\nOZNQ5JcmGEZbqOdlf2VEkOAjzG1OZvAKF2RMCTtx9ABKiR7FThhRwg==\n-----END AGE ENCRYPTED FILE-----\n" | ||
| 12 | }, | ||
| 13 | { | ||
| 14 | "recipient": "age19a7j77w267z04zls7m28a8hj4a0g5af6ltye2d5wypg33c3l89csd4r9zq", | ||
| 15 | "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBoU1g3M0VyWVE4QjN4KzFY\nVExjcE5qdExDMS9lT0VnTTQ4RGNSZGxKSWswCi9FWW83OUhIZEZIczhMV21iejVK\nNmVJa1IxMUs1bEIxOUZxbys0aU85Rm8KLS0tIGpxd2FzeVFJQ2JHOTgzWXJzYzVt\nOC9wSGRyeHVqSEhWSVJyU1V1WjhQVDAKUOQMKzwRJ9IYGCNa+KwgIMWzxGNE1wtX\n8yM1XYlEKAc38koZF8K6ZD9jK9pzZZXcHJMYOrwsBUw6+hOl4+Ezug==\n-----END AGE ENCRYPTED FILE-----\n" | ||
| 16 | } | ||
| 17 | ], | ||
| 18 | "lastmodified": "2025-02-18T18:18:42Z", | ||
| 19 | "mac": "ENC[AES256_GCM,data:L6xMl54Cq0HTDHpgzwwSyh1Kex2o78n+NT/iyGxxXj7ats3Vv/XIbtVIwS7ZHfoccyldl/kmeqdThTXEp5yT/FyhXDcfVrjrlZiHZ6j8xNH9Tp7gcVeHTrLXy/8JtrsvFRNmtF9rXXceaDSRTfQIY3sgyQF+JKTKeoO2HNo87CI=,iv:wBM1hwPMJJYH1NNtIAp9pfOro9wB2oI3g8fcJU/jkQY=,tag:dkLojSIuZnOGsGVHwHcAng==,type:str]", | ||
| 20 | "pgp": null, | ||
| 21 | "unencrypted_suffix": "_unencrypted", | ||
| 22 | "version": "3.9.4" | ||
| 23 | } | ||
| 24 | } \ No newline at end of file | ||
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index de661f4a..90ab40dd 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix | |||
| @@ -4,7 +4,7 @@ with lib; | |||
| 4 | 4 | ||
| 5 | { | 5 | { |
| 6 | imports = with flake.nixosModules.systemProfiles; [ | 6 | imports = with flake.nixosModules.systemProfiles; [ |
| 7 | ./zfs.nix ./network ./samba.nix ./dns ./prometheus ./borg ./pgbackrest ./postgresql.nix ./immich.nix ./paperless ./firefly-iii ./hledger | 7 | ./zfs.nix ./network ./samba.nix ./dns ./prometheus ./borg ./pgbackrest ./postgresql.nix ./immich.nix ./paperless ./hledger |
| 8 | tmpfs-root zfs | 8 | tmpfs-root zfs |
| 9 | initrd-all-crypto-modules default-locale openssh rebuild-machines | 9 | initrd-all-crypto-modules default-locale openssh rebuild-machines |
| 10 | build-server | 10 | build-server |
diff --git a/hosts/vidhar/firefly-iii/app_key b/hosts/vidhar/firefly-iii/app_key deleted file mode 100644 index b318b9c1..00000000 --- a/hosts/vidhar/firefly-iii/app_key +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | { | ||
| 2 | "data": "ENC[AES256_GCM,data:Z/u19vdnY5B76AaQCZOaXGRHTXiAaZ3OlnpEwehK40De6EoTzvs8BzC4/a6KVam5JDjcog==,iv:ZlCNcjQV1brRllTVdfFjhOcDe7sjHIRVbjs/dNT/w0o=,tag:bAtBraAy+i02pyVuhWoXBg==,type:str]", | ||
| 3 | "sops": { | ||
| 4 | "kms": null, | ||
| 5 | "gcp_kms": null, | ||
| 6 | "azure_kv": null, | ||
| 7 | "hc_vault": null, | ||
| 8 | "age": [ | ||
| 9 | { | ||
| 10 | "recipient": "age1rmmhetcmllq0ahl5qznlr0eya2zdxwl9h6y5wnl97d2wtyx5t99sm2u866", | ||
| 11 | "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIZEZVVTZLU2VPQmM2Tjk3\nVEUvVitWRjdGRnE2Vm9FVjFhTk1IZ0g1bjJjCjd5dnZNd1VrTVc4QktRM0Z2aFdp\nVlRqLy9BMDV4VGI1SjdmWTFFVFZONG8KLS0tIHRYMGlpalZZUEJFU3c0Z0hXK1lQ\ndnFndWJmTTFjWVAzdkhwN0x6eHVHVmsKVls/ERf4ZfnTqryB6yt5OcjU42RlgAoD\nmMZzuEbhuGBApu2rEKlo4v/AKST6OVIlsiYr0na2W4vlmBOEs8OB1g==\n-----END AGE ENCRYPTED FILE-----\n" | ||
| 12 | }, | ||
| 13 | { | ||
| 14 | "recipient": "age1qffdqvy9arld9zd5a5cylt0n98xhcns5shxhrhwjq5g4qa844ejselaa4l", | ||
| 15 | "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCcVVJZWNkMzlYc1lOMzlu\nai82RjhkZm5UYVplV0NNTjZlWm8zcmpCaW1BCnhMaGV5NFNkUUw5ODM5OVZZMUxO\nUUpVTGhtZDM4VzF3WXhTMFpHLytKUzAKLS0tIEZCSVFIODRhRDZuMzFFbSt1YlBI\ndldaZEd6dTBvU2huREhoQ3VNQ2NNdWMKyGuG1tzxIas5G6nlWRkgbxHTOGQ8cLx6\nOw83t98BBfWSZVTuUfHAemn5fPsjRUhsZvEuH70NvQXDRxSvV2nvww==\n-----END AGE ENCRYPTED FILE-----\n" | ||
| 16 | } | ||
| 17 | ], | ||
| 18 | "lastmodified": "2025-02-18T18:05:57Z", | ||
| 19 | "mac": "ENC[AES256_GCM,data:7rl6npBWEFeS+IZMLb2+jLcs1d5gSzZyGkCDcrpAbxAB7doAp4vh5DJUEFnAUMtN/iHlwjX71pRNjBHLlYqCs344aaGkcEVMDO/C2m8efuPq+qIi+z372PlM+ekVDXquthvc8fcPhsCWHyso1LTpDjMRqf6kizk0wEtwJj5kOWA=,iv:OEaeQUJ2f0XZidWkttC8Y+WAkDyNkViTNiiDgy5QKr8=,tag:ERsBlT0T3iZvoEWcRhTpPA==,type:str]", | ||
| 20 | "pgp": null, | ||
| 21 | "unencrypted_suffix": "_unencrypted", | ||
| 22 | "version": "3.9.4" | ||
| 23 | } | ||
| 24 | } \ No newline at end of file | ||
diff --git a/hosts/vidhar/firefly-iii/default.nix b/hosts/vidhar/firefly-iii/default.nix deleted file mode 100644 index 026d4643..00000000 --- a/hosts/vidhar/firefly-iii/default.nix +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | { config, ... }: | ||
| 2 | { | ||
| 3 | config = { | ||
| 4 | services.postgresql = { | ||
| 5 | ensureDatabases = [ "firefly-iii" ]; | ||
| 6 | ensureUsers = [ | ||
| 7 | { name = "firefly-iii"; | ||
| 8 | ensureDBOwnership = true; | ||
| 9 | } | ||
| 10 | ]; | ||
| 11 | }; | ||
| 12 | |||
| 13 | services.firefly-iii = { | ||
| 14 | enable = true; | ||
| 15 | enableNginx = true; | ||
| 16 | group = "firefly-iii"; | ||
| 17 | virtualHost = "firefly.yggdrasil.li"; | ||
| 18 | settings = { | ||
| 19 | DB_CONNECTION = "pgsql"; | ||
| 20 | DB_DATABASE = "firefly-iii"; | ||
| 21 | APP_KEY_FILE = config.sops.secrets."firefly-iii_app_key".path; | ||
| 22 | APP_URL = "https://${config.services.firefly-iii.virtualHost}"; | ||
| 23 | }; | ||
| 24 | }; | ||
| 25 | |||
| 26 | services.nginx = { | ||
| 27 | commonHttpConfig = '' | ||
| 28 | map $http_x_forwarded_proto $fastcgi_param_https_variable { | ||
| 29 | default '''; | ||
| 30 | https 'on'; | ||
| 31 | } | ||
| 32 | ''; | ||
| 33 | virtualHosts.${config.services.firefly-iii.virtualHost} = { | ||
| 34 | listen = [ | ||
| 35 | { addr = "[2a03:4000:52:ada:4:1::]"; port = 9000; } | ||
| 36 | ]; | ||
| 37 | extraConfig = '' | ||
| 38 | set_real_ip_from 2a03:4000:52:ada:4::; | ||
| 39 | ''; | ||
| 40 | locations."~ \\.php$" = { | ||
| 41 | extraConfig = '' | ||
| 42 | fastcgi_param HTTPS $fastcgi_param_https_variable; | ||
| 43 | ''; | ||
| 44 | }; | ||
| 45 | }; | ||
| 46 | }; | ||
| 47 | |||
| 48 | sops.secrets."firefly-iii_app_key" = { | ||
| 49 | format = "binary"; | ||
| 50 | sopsFile = ./app_key; | ||
| 51 | group = config.services.firefly-iii.group; | ||
| 52 | mode = "0440"; | ||
| 53 | restartUnits = [ "firefly-iii-setup.service" "firefly-iii-cron.service" "phpfpm-firefly-iii.service" ]; | ||
| 54 | }; | ||
| 55 | |||
| 56 | users.groups.${config.services.firefly-iii.group} = {}; | ||
| 57 | |||
| 58 | systemd.services = { | ||
| 59 | nginx.serviceConfig.SupplementaryGroups = [ config.services.firefly-iii.group ]; | ||
| 60 | "firefly-iii-setup".serviceConfig.ReadWritePaths = [ "/run/postgresql" ]; | ||
| 61 | "firefly-iii-cron".serviceConfig.ReadWritePaths = [ "/run/postgresql" ]; | ||
| 62 | }; | ||
| 63 | }; | ||
| 64 | } | ||
diff --git a/hosts/vidhar/network/ruleset.nft b/hosts/vidhar/network/ruleset.nft index 8f8f24f1..1edae167 100644 --- a/hosts/vidhar/network/ruleset.nft +++ b/hosts/vidhar/network/ruleset.nft | |||
| @@ -93,7 +93,6 @@ table inet filter { | |||
| 93 | counter pgbackrest-rx {} | 93 | counter pgbackrest-rx {} |
| 94 | counter immich-rx {} | 94 | counter immich-rx {} |
| 95 | counter paperless-rx {} | 95 | counter paperless-rx {} |
| 96 | counter firefly-rx {} | ||
| 97 | counter hledger-rx {} | 96 | counter hledger-rx {} |
| 98 | 97 | ||
| 99 | counter established-rx {} | 98 | counter established-rx {} |
| @@ -125,7 +124,6 @@ table inet filter { | |||
| 125 | counter pgbackrest-tx {} | 124 | counter pgbackrest-tx {} |
| 126 | counter immich-tx {} | 125 | counter immich-tx {} |
| 127 | counter paperless-tx {} | 126 | counter paperless-tx {} |
| 128 | counter firefly-tx {} | ||
| 129 | counter hledger-tx {} | 127 | counter hledger-tx {} |
| 130 | 128 | ||
| 131 | counter tx {} | 129 | counter tx {} |
| @@ -204,7 +202,6 @@ table inet filter { | |||
| 204 | 202 | ||
| 205 | iifname bifrost tcp dport 2283 ip6 saddr $bifrost_surtr counter name immich-rx accept | 203 | iifname bifrost tcp dport 2283 ip6 saddr $bifrost_surtr counter name immich-rx accept |
| 206 | iifname bifrost tcp dport 28981 ip6 saddr $bifrost_surtr counter name paperless-rx accept | 204 | iifname bifrost tcp dport 28981 ip6 saddr $bifrost_surtr counter name paperless-rx accept |
| 207 | iifname bifrost tcp dport 9000 ip6 saddr $bifrost_surtr counter name firefly-rx accept | ||
| 208 | iifname bifrost tcp dport 5000 ip6 saddr $bifrost_surtr counter name hledger-rx accept | 205 | iifname bifrost tcp dport 5000 ip6 saddr $bifrost_surtr counter name hledger-rx accept |
| 209 | 206 | ||
| 210 | ct state { established, related } counter name established-rx accept | 207 | ct state { established, related } counter name established-rx accept |
| @@ -256,7 +253,6 @@ table inet filter { | |||
| 256 | 253 | ||
| 257 | iifname bifrost tcp sport 2283 ip6 daddr $bifrost_surtr counter name immich-tx accept | 254 | iifname bifrost tcp sport 2283 ip6 daddr $bifrost_surtr counter name immich-tx accept |
| 258 | iifname bifrost tcp sport 28981 ip6 daddr $bifrost_surtr counter name paperless-tx accept | 255 | iifname bifrost tcp sport 28981 ip6 daddr $bifrost_surtr counter name paperless-tx accept |
| 259 | iifname bifrost tcp sport 9000 ip6 daddr $bifrost_surtr counter name firefly-tx accept | ||
| 260 | iifname bifrost tcp sport 5000 ip6 daddr $bifrost_surtr counter name hledger-tx accept | 256 | iifname bifrost tcp sport 5000 ip6 daddr $bifrost_surtr counter name hledger-tx accept |
| 261 | 257 | ||
| 262 | 258 | ||
diff --git a/hosts/vidhar/pgbackrest/default.nix b/hosts/vidhar/pgbackrest/default.nix index 38d68335..1e0828ce 100644 --- a/hosts/vidhar/pgbackrest/default.nix +++ b/hosts/vidhar/pgbackrest/default.nix | |||
| @@ -159,7 +159,5 @@ in { | |||
| 159 | group = "pgbackrest"; | 159 | group = "pgbackrest"; |
| 160 | mode = "0400"; | 160 | mode = "0400"; |
| 161 | }; | 161 | }; |
| 162 | |||
| 163 | systemd.services.postgresql.serviceConfig.SupplementaryGroups = [ "pgbackrest" ]; | ||
| 164 | }; | 162 | }; |
| 165 | } | 163 | } |
