mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-14 10:30:52 -06:00
feat: infinitely expansible microvms
This commit is contained in:
parent
a92229390e
commit
4c767d369f
55 changed files with 1089 additions and 1015 deletions
|
|
@ -15,6 +15,7 @@ in
|
|||
ip,
|
||||
mac,
|
||||
userMac,
|
||||
host,
|
||||
ssh,
|
||||
mnt,
|
||||
data,
|
||||
|
|
@ -32,6 +33,8 @@ in
|
|||
${serviceCfg.name} = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PHOTOPRISM_SITE_URL = "https://${host}";
|
||||
PHOTOPRISM_DISABLE_TLS = "true";
|
||||
PHOTOPRISM_ADMIN_USER = user;
|
||||
PHOTOPRISM_DEFAULT_LOCAL = "en";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,47 +1,11 @@
|
|||
{
|
||||
flake,
|
||||
lib,
|
||||
labHelpers,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (labHelpers) guestPath mediaPath;
|
||||
inherit (import ./config { inherit flake lib; }) photoprismVM;
|
||||
inherit (flake.config.services.instances) photoprism;
|
||||
inherit (flake.config.people) user0;
|
||||
interface0Cfg = photoprism.interfaces.interface0;
|
||||
|
||||
importList =
|
||||
let
|
||||
content = builtins.readDir ./.;
|
||||
dirContent = builtins.filter (n: content.${n} == "directory") (builtins.attrNames content);
|
||||
in
|
||||
map (name: ./. + "/${name}") dirContent;
|
||||
in
|
||||
{
|
||||
photoprismNick = photoprismVM {
|
||||
user = user0;
|
||||
ip = interface0Cfg.microvm.ip;
|
||||
mac = interface0Cfg.microvm.mac;
|
||||
userMac = interface0Cfg.microvm.macUser;
|
||||
ssh = interface0Cfg.microvm.ssh;
|
||||
mnt = guestPath user0;
|
||||
data = mediaPath user0;
|
||||
host = interface0Cfg.domain;
|
||||
};
|
||||
|
||||
# photoprismStacie = photoprismVM {
|
||||
# user = "stacie";
|
||||
# ip = ipAddress id1;
|
||||
# mac = "02:00:00:00:${id1}:${id1}";
|
||||
# userMac = "02:00:00:00:00:${id1}";
|
||||
# ssh = photoprism.ssh1;
|
||||
# mnt = guestPath "stacie";
|
||||
# data = mediaPath "stacie";
|
||||
# };
|
||||
|
||||
# photoprismGarnet = photoprismVM {
|
||||
# user = "garnet";
|
||||
# ip = ipAddress id2;
|
||||
# mac = "02:00:00:00:${id2}:${id2}";
|
||||
# userMac = "02:00:00:00:00:${id2}";
|
||||
# ssh = photoprism.ssh2;
|
||||
# mnt = guestPath "garnet";
|
||||
# data = mediaPath "stacie";
|
||||
# };
|
||||
|
||||
imports = importList;
|
||||
}
|
||||
|
|
|
|||
26
modules/nixos/homelab/guests/photoprism/photoprismEris/default.nix
Executable file
26
modules/nixos/homelab/guests/photoprism/photoprismEris/default.nix
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
flake,
|
||||
lib,
|
||||
labHelpers,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (import ../../helpers.nix) labHelpers;
|
||||
inherit (labHelpers) guestPath mediaPath;
|
||||
inherit (import ../config { inherit flake lib; }) photoprismVM;
|
||||
inherit (flake.config.services.instances) photoprism;
|
||||
inherit (flake.config.people) user0;
|
||||
interface0Cfg = photoprism.interfaces.interface0;
|
||||
|
||||
photoprismNick = photoprismVM {
|
||||
user = user0;
|
||||
ip = interface0Cfg.microvm.ip;
|
||||
mac = interface0Cfg.microvm.mac;
|
||||
userMac = interface0Cfg.microvm.macUser;
|
||||
ssh = interface0Cfg.microvm.ssh;
|
||||
mnt = guestPath user0;
|
||||
data = mediaPath user0;
|
||||
host = interface0Cfg.domain;
|
||||
};
|
||||
in
|
||||
photoprismNick
|
||||
Loading…
Add table
Add a link
Reference in a new issue