From 0a516d608b61fbb754dca57f5b36ee48021df7dd Mon Sep 17 00:00:00 2001 From: Myned <dev@bjork.tech> Date: Tue, 18 Mar 2025 12:03:19 -0500 Subject: [PATCH] containers: add miniflux --- options/custom/containers/miniflux.nix | 49 +++++++++++++++++++++++++ secrets/desktop/miniflux/.env | Bin 0 -> 709 bytes secrets/desktop/miniflux/db.env | 12 ++++++ secrets/secrets.nix | 2 + 4 files changed, 63 insertions(+) create mode 100644 options/custom/containers/miniflux.nix create mode 100644 secrets/desktop/miniflux/.env create mode 100644 secrets/desktop/miniflux/db.env diff --git a/options/custom/containers/miniflux.nix b/options/custom/containers/miniflux.nix new file mode 100644 index 0000000..a2de3d2 --- /dev/null +++ b/options/custom/containers/miniflux.nix @@ -0,0 +1,49 @@ +{ + config, + inputs, + lib, + ... +}: +with lib; let + cfg = config.custom.containers.miniflux; +in { + options.custom.containers.miniflux = { + enable = mkOption {default = false;}; + }; + + config = mkIf cfg.enable { + age.secrets = let + secret = filename: { + file = "${inputs.self}/secrets/${filename}"; + }; + in { + "${config.custom.profile}/miniflux/.env" = secret "${config.custom.profile}/miniflux/.env"; + "${config.custom.profile}/miniflux/db.env" = secret "${config.custom.profile}/miniflux/db.env"; + }; + + #?? arion-miniflux pull + environment.shellAliases.arion-miniflux = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.miniflux.settings.out.dockerComposeYaml}"; + + virtualisation.arion.projects.miniflux.settings.services = { + # https://github.com/miniflux/v2 + # https://miniflux.app/docs/docker.html + miniflux.service = { + container_name = "miniflux"; + depends_on = ["db"]; + env_file = [config.age.secrets."${config.custom.profile}/miniflux/.env".path]; + image = "miniflux/miniflux:2.2.6"; + ports = ["127.0.0.1:8808:8080"]; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/miniflux/data:/data"]; + }; + + db.service = { + container_name = "miniflux-db"; + env_file = [config.age.secrets."${config.custom.profile}/miniflux/db.env".path]; + image = "postgres:17"; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/miniflux/db:/var/lib/postgresql/data"]; + }; + }; + }; +} diff --git a/secrets/desktop/miniflux/.env b/secrets/desktop/miniflux/.env new file mode 100644 index 0000000000000000000000000000000000000000..ccfe8d7615ec5cf39a323fd1460bd2fdaf19d882 GIT binary patch literal 709 zcmZ9_OKZ~r007|W<|cJ`5mD4ZHV+O$mp+!JaX6N?X`41_nm)ERjA<WP9&M90Y1$<C zVw(;@Q6}QSfq0U6-bqo0Y>0Z8mqAsODIyya91KC+Vcz%sfiK5%c1|v+X0<LV@_?f9 zP{V1n4+EMe*twz$hMg$j#XXXj0g9$l(VYT~=PDW^m!TS%N|PXm`c;#cF*Fd($|}NP zrZ<4unrtEk#yx2{C{BX7#xoJ9oHX=&lyozxAcz)0Fo<O=UwD$)ziE?(r7!@^CizB& zU?s$*TBA~~RE!f;({075MlCaFTB(YUFQUz=l`Po^FIo#X;~;6d{1wp8t5gK{v4&st zrlX@U78VtSR|Je_W2OBY4~Gf?1`wirrYsgJdWnkBTu3Gf#E>`_9L<Leobu;zLqtTW zsun|88y=>uF~6r?M6D`R#u$RAlZ8mWP%qN~nH2;*q-8xW(-SP?`?nNS#8McLrjrea z28t2_*4P}C@R5k2a<m>tU}ns11k$?cPl9z1>2ug(N>obvgl5c1K^0RFi5hEEAV_8t zXdMhrHgjb)6F^6^jxmSLZnpzgtqDgME-fSx)#p@PZYmX02lHu-hzORaWFZ)$drL&z zp`~pDy{QK)zt67KdM_QJvHarJjQD-;b^GGi&N;O=*?n|1zVYmeHPyWvat|%sdewTk zd8dbu!urGxdM@*Ah|GVG)TLe6d-6QpvGZ}}@!cD%FMC2y-d|Ma*Eg1~`-rQ{ZX59V zXKVcS$cxi`t@XL~f6%NlKK=LLi9h{6rkv03y&Jx8X6w_hJ-oHucmLGkYxYNNm^`m^ vA;(H@rq{l#AL#5jzP&K#$R`Rbmq+Ro15f*JLgc2=g&b;cTc)GHZ0zlSLk9m} literal 0 HcmV?d00001 diff --git a/secrets/desktop/miniflux/db.env b/secrets/desktop/miniflux/db.env new file mode 100644 index 0000000..03ff1d8 --- /dev/null +++ b/secrets/desktop/miniflux/db.env @@ -0,0 +1,12 @@ +age-encryption.org/v1 +-> ssh-ed25519 8E6j8Q KG3tGfbba0HZYcC6HKhtuSblrNom4c9xjsgybBUwnXQ +eXSJssy/jilOozZiMDZGgF8WdrPVoAqFYDpz2MOwtoo +-> ssh-ed25519 sfxzoQ 3gtQpxCy2zjcdal1NQb8sHTbJd1uk4ZJKpnBTq329wE +YDrgCqhSEsLJYjYls2vH/FvxGV6vOJYhvobYfCIwRLY +-> ssh-ed25519 g5GcDQ N5vf0tseMkshp5fCw5UAMcR6IXrmCMrKAR/oSQcw+Dk +p1z4wJZsDXrcLftHoK2QN50+nXvJq5Jfh/yyu2uV++o +-> ssh-ed25519 T/dATA 24gYylwgdWdhQbSRUmp0vVACFH/FZuMyPDWNuitLxhs +A1ptnWpFnmxSdcZ0jCW/cDPj07cJa3U6bwPriHHXqxM +--- pOX2mj5Txlc1XwsJMqx9on0BlUgNqZaGa8DBzt6wzZU +�������, +"iʖՃ�8h��.��_�ړ��t�����P#:��>;�`&VB��pԛIq�Cyn�I���}9����8�1p������ķ��I8�-.�G�Л�����f \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 4d384a3..9e1aafd 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -77,6 +77,8 @@ in { "server/mastodon/.env".publicKeys = server; "server/mastodon/db.env".publicKeys = server; "server/matrix-conduit/conduwuit.toml".publicKeys = server; + "server/miniflux/.env".publicKeys = server; + "server/miniflux/db.env".publicKeys = server; "server/netbox/.env".publicKeys = server; "server/netbox/cache.env".publicKeys = server; "server/netbox/db.env".publicKeys = server;