aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/feed-nomath-org/appspec.nix13
-rw-r--r--apps/feed-nomath-org/integration.nix7
-rw-r--r--apps/feed-nomath-org/module.nix6
3 files changed, 26 insertions, 0 deletions
diff --git a/apps/feed-nomath-org/appspec.nix b/apps/feed-nomath-org/appspec.nix
new file mode 100644
index 0000000..6d3bb2b
--- /dev/null
+++ b/apps/feed-nomath-org/appspec.nix
@@ -0,0 +1,13 @@
+{ fysilib, lib, ... }: {
+ description = "feed.nomath.org website";
+ endOfLife = null;
+ options = {
+ domain = lib.mkOption {
+ description = "Domain of the website";
+ type = fysilib.types.fqdn;
+ };
+ repositories = lib.mkOption {
+ type = lib.types.listOf lib.types.str;
+ };
+ };
+}
diff --git a/apps/feed-nomath-org/integration.nix b/apps/feed-nomath-org/integration.nix
new file mode 100644
index 0000000..121890a
--- /dev/null
+++ b/apps/feed-nomath-org/integration.nix
@@ -0,0 +1,7 @@
+{ appConfig, lib, ... }: {
+ port = 8080;
+
+ bindMounts = builtins.listToAttrs
+ (map (name: lib.nameValuePair name { isReadOnly = true; })
+ appConfig.repositories);
+}
diff --git a/apps/feed-nomath-org/module.nix b/apps/feed-nomath-org/module.nix
new file mode 100644
index 0000000..e9c0937
--- /dev/null
+++ b/apps/feed-nomath-org/module.nix
@@ -0,0 +1,6 @@
+{ appConfig, lib, pkgs, ... }: {
+ systemd.services."feed-nomath-org".environment.PORT = "8080";
+ systemd.services."feed-nomath-org".environment.REPOSITORIES = lib.concatStringsSep ":" appConfig.repositories;
+ systemd.services."feed-nomath-org".script = "${pkgs.feed-nomath-org}/bin/feed-nomath-org";
+ systemd.services."feed-nomath-org".wantedBy = [ "multi-user.target" ];
+}