From 8785aabac6e1e15ff617ceb80abfdb587128badc Mon Sep 17 00:00:00 2001 From: harry Date: Thu, 18 Jul 2024 17:13:10 +0200 Subject: [PATCH] refactored file --- .../crafty-controller.nix} | 17 ----------------- features/containers/default.nix | 9 +++++++++ features/containers/flaresolverr.nix | 16 ++++++++++++++++ features/containers/freshrss.nix | 18 ++++++++++++++++++ 4 files changed, 43 insertions(+), 17 deletions(-) rename features/{containers.nix => containers/crafty-controller.nix} (68%) create mode 100644 features/containers/default.nix create mode 100644 features/containers/flaresolverr.nix create mode 100644 features/containers/freshrss.nix diff --git a/features/containers.nix b/features/containers/crafty-controller.nix similarity index 68% rename from features/containers.nix rename to features/containers/crafty-controller.nix index 142acd4..db6bf30 100644 --- a/features/containers.nix +++ b/features/containers/crafty-controller.nix @@ -17,13 +17,6 @@ in virtualisation.oci-containers = { backend = "docker"; containers = { - flaresolverr = { - ports = [ "8191:8191" ]; - image = "ghcr.io/flaresolverr/flaresolverr:latest"; - environment = { - "LOG_LEVEL" = "info"; - }; - }; #TODO: move to Nix crafty controller bundle crafty-controller = { image = "registry.gitlab.com/crafty-controller/crafty-4:latest"; @@ -44,16 +37,6 @@ in "TZ" = "Europe/Paris"; }; }; - freshrss = { - image = "lscr.io/linuxserver/freshrss:latest"; - volumes = [ "/srv/freshrss/config:/config" ]; - ports = [ "8888:80" ]; - environment = { - "PUID" = "1000"; - "GUID" = "1000"; - "TZ" = "Europe/Paris"; - }; - }; }; }; }; diff --git a/features/containers/default.nix b/features/containers/default.nix new file mode 100644 index 0000000..e1b6242 --- /dev/null +++ b/features/containers/default.nix @@ -0,0 +1,9 @@ +{ config }: + +{ + imports = [ + ./crafty-controller.nix + ./flaresolverr.nix + ./freshrss.nix + ]; +} diff --git a/features/containers/flaresolverr.nix b/features/containers/flaresolverr.nix new file mode 100644 index 0000000..1c18e4c --- /dev/null +++ b/features/containers/flaresolverr.nix @@ -0,0 +1,16 @@ +{ config, ... }: + +{ + virtualisation.oci-containers = { + backend = "docker"; + containers = { + flaresolverr = { + ports = [ "8191:8191" ]; + image = "ghcr.io/flaresolverr/flaresolverr:latest"; + environment = { + "LOG_LEVEL" = "info"; + }; + }; + }; + }; +} diff --git a/features/containers/freshrss.nix b/features/containers/freshrss.nix new file mode 100644 index 0000000..be6468a --- /dev/null +++ b/features/containers/freshrss.nix @@ -0,0 +1,18 @@ +{ ... }: +{ + virtualisation.oci-containers = { + backend = "docker"; + containers = { + freshrss = { + image = "lscr.io/linuxserver/freshrss:latest"; + volumes = [ "/srv/freshrss/config:/config" ]; + ports = [ "8888:80" ]; + environment = { + "PUID" = "1000"; + "GUID" = "1000"; + "TZ" = "Europe/Paris"; + }; + }; + }; + }; +}