ookflix: initial ookflix commit

This commit is contained in:
ooks-io 2024-12-01 18:35:22 +11:00
parent 9459f9e1f6
commit 2d437acfbb
12 changed files with 482 additions and 6 deletions

View file

@ -1,4 +1,8 @@
{lib, ...}: let
{
lib,
config,
...
}: let
inherit (builtins) isBool;
inherit (lib) toUpper optionalAttrs mapAttrs' nameValuePair;
@ -33,7 +37,7 @@
in
commonLabels // (processWidget widget);
mkContainerLabels = {name, ...} @ args: let
mkContainerLabel = {name, ...} @ args: let
homepage = args.homepage or {};
baseWidget = homepage.widget or {};
in
@ -52,16 +56,25 @@
# homepage labels
// (optionalAttrs (args ? homepage) (mkHomepageLabels {
inherit name;
inherit (args) domain;
domain = "https://${args.domain}";
group = args.homepage.group or name;
widget =
baseWidget
// {
type = name;
url = args.domain;
url = "https://${args.domain}";
key = "{{HOMEPAGE_FILE_${toUpper name}}}";
};
}));
mkContainerEnvironment = user: group: {
PUID = toString user;
PGID = toString group;
# TODO: I dont want to hard code this
TZ = "Antarctica/Macquarie";
};
mkContainerPort = port: "${toString port}:${toString port}";
in {
inherit mkContainerLabels;
inherit mkContainerLabel mkContainerEnvironment mkContainerPort;
}

View file

@ -2,6 +2,7 @@
lib,
self,
inputs,
config,
...
}: let
# my scuffed lib
@ -9,6 +10,7 @@
builders = import ./builders.nix {inherit self lib inputs;};
mkNeovim = import ./mkNeovim.nix {inherit inputs;};
math = import ./math.nix {inherit lib;};
container = import ./containers.nix {inherit lib config;};
color = let
check = import ./color/check.nix {inherit lib;};
types = import ./color/types.nix {