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/vaultwarden/default.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'modules/containers/vaultwarden') diff --git a/modules/containers/vaultwarden/default.nix b/modules/containers/vaultwarden/default.nix index cc6b86f..185fde1 100644 --- a/modules/containers/vaultwarden/default.nix +++ b/modules/containers/vaultwarden/default.nix @@ -1,22 +1,18 @@ { lib, ... }: let - directory = "/opt/vaultwarden"; + inherit (lib.lists) singleton; + directory = singleton "/opt/vaultwarden"; domain = "steel-mountain.brownbread.net"; port = "11001"; in { - systemd.tmpfiles.rules = - map (x: "d ${x} 0755 share share - -") (lib.lists.singleton directory); + systemd.tmpfiles.rules = builtins.map (x: "d ${x} 0755 share share - -") (singleton directory); virtualisation.oci-containers.containers.vaultwarden = { image = "vaultwarden/server:latest"; autoStart = true; - ports = [ - "${port}:80" - ]; - volumes = [ - "${directory}/data:/data" - ]; + ports = singleton "${port}:80"; + volumes = singleton "${directory}/data:/data"; environment = { DOMAIN = domain; WEBSOCKET_ENABLED = "true"; -- cgit v1.2.3