nixos: Initial jackflix container

This commit is contained in:
2022-06-11 19:13:20 +01:00
parent d2deabc6b2
commit 7dc6b5df8c
14 changed files with 246 additions and 44 deletions

View File

@@ -30,7 +30,7 @@
configuration = { lib, pkgs, modulesPath, config, assignments, allAssignments, ... }:
let
inherit (builtins) mapAttrs;
inherit (lib) mkIf mkMerge mkForce recursiveUpdate;
inherit (lib) mkIf mkMerge mkForce;
inherit (lib.my) networkdAssignment;
in
{
@@ -53,6 +53,10 @@
fsType = "ext4";
neededForBoot = true;
};
"/mnt/media" = {
device = "/dev/disk/by-label/media";
fsType = "ext4";
};
};
systemd.network = {
@@ -98,14 +102,26 @@
trustedInterfaces = [ "vms" "ctrs" ];
};
containers.instances = mapAttrs (_: c: recursiveUpdate c {
networking.bridge = "ctrs";
}) {
middleman = {};
vaultwarden = {};
colony-psql = {};
chatterbox = {};
};
containers.instances =
let
instances = {
middleman = {};
vaultwarden = {};
colony-psql = {};
chatterbox = {};
jackflix = {
bindMounts = {
"/mnt/media".readOnly = false;
};
};
};
in
mkMerge [
instances
(mapAttrs (n: i: {
networking.bridge = "ctrs";
}) instances)
];
};
}
];