diff options
Diffstat (limited to 'hosts/vidhar')
| -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 |
5 files changed, 1 insertions, 95 deletions
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 | } |
