From e49b33fe446ca5a47f9eb04b5163609835db3dad Mon Sep 17 00:00:00 2001 From: tdback Date: Thu, 9 Jan 2025 20:31:34 -0500 Subject: fix: cleanup container configs --- modules/containers/pinchflat/default.nix | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'modules/containers/pinchflat') diff --git a/modules/containers/pinchflat/default.nix b/modules/containers/pinchflat/default.nix index 8ee831f..996476d 100644 --- a/modules/containers/pinchflat/default.nix +++ b/modules/containers/pinchflat/default.nix @@ -1,23 +1,19 @@ -{ ... }: +{ lib, ... }: let - directories = [ - "/opt/pinchflat" - ]; + inherit (lib.lists) singleton; + directory = "/opt/pinchflat"; in { - systemd.tmpfiles.rules = map (x: "d ${x} 0755 share share - -") directories; + systemd.tmpfiles.rules = builtins.map (x: "d ${x} 0755 share share - -") (singleton directory); + virtualisation.oci-containers.containers.pinchflat = { image = "keglin/pinchflat:latest"; autoStart = true; - ports = [ - "8945:8945" - ]; + ports = singleton "8945:8945"; volumes = [ - "/opt/pinchflat:/config" + "${directory}:/config" "/tank/media/yt:/downloads" ]; - environment = { - TZ = "America/Detroit"; - }; + environment.TZ = "America/Detroit"; }; } -- cgit v1.2.3