mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-08 05:49:25 -06:00
test: setting up nas structure
This commit is contained in:
parent
7cf2f70441
commit
312c52d613
8 changed files with 100 additions and 73 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
config,
|
||||
flake,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -35,8 +35,10 @@ in
|
|||
PHOTOPRISM_DEFAULT_LOCAL = "en";
|
||||
};
|
||||
passwordFile = "/run/secrets/${user}-pass";
|
||||
storagePath = "/var/lib/${serviceCfg.name}";
|
||||
originalsPath = "/var/lib/${serviceCfg.name}-media";
|
||||
importPath = "photos";
|
||||
address = "0.0.0.0";
|
||||
};
|
||||
openssh = {
|
||||
enable = true;
|
||||
|
|
@ -47,6 +49,13 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
users.users.photoprism = {
|
||||
isSystemUser = true;
|
||||
group = "photoprism";
|
||||
home = "/var/lib/photoprism";
|
||||
};
|
||||
users.groups.photoprism = { };
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
22
|
||||
2342
|
||||
|
|
@ -54,6 +63,13 @@ in
|
|||
|
||||
systemd = {
|
||||
services = {
|
||||
photoprism = {
|
||||
serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
User = serviceCfg.name;
|
||||
Group = serviceCfg.name;
|
||||
};
|
||||
};
|
||||
systemd-networkd.wantedBy = [
|
||||
"multi-user.target"
|
||||
];
|
||||
|
|
@ -78,12 +94,11 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
tmpfiles.rules = [
|
||||
"Z /var/lib/${serviceCfg.name} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||
"d /var/lib/${serviceCfg.name}-media 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||
"d /var/lib/${serviceCfg.name}-media/photos 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||
|
||||
];
|
||||
# tmpfiles.rules = [
|
||||
# "d /var/lib/${serviceCfg.name} 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||
# "d /var/lib/${serviceCfg.name}-media 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||
# "d /var/lib/${serviceCfg.name}-media/photos 0755 ${serviceCfg.name} ${serviceCfg.name} -"
|
||||
# ];
|
||||
};
|
||||
|
||||
microvm = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ flake, ... }:
|
||||
{ flake, lib, ... }:
|
||||
let
|
||||
inherit (import ./config) photoprismVM;
|
||||
inherit (import ./config { inherit flake lib; }) photoprismVM;
|
||||
inherit (flake.config.people) user0;
|
||||
|
||||
photoprismNick = photoprismVM {
|
||||
|
|
@ -11,21 +11,22 @@ let
|
|||
ssh = 2504;
|
||||
};
|
||||
|
||||
photoprismStacie = photoprismVM {
|
||||
user = "stacie";
|
||||
ip = "192.168.50.65";
|
||||
mac = "02:00:00:00:55:65";
|
||||
userMac = "02:00:00:00:00:65";
|
||||
ssh = 2505;
|
||||
};
|
||||
# photoprismStacie = photoprismVM {
|
||||
# user = "stacie";
|
||||
# ip = "192.168.50.65";
|
||||
# mac = "02:00:00:00:55:65";
|
||||
# userMac = "02:00:00:00:00:65";
|
||||
# ssh = 2505;
|
||||
# };
|
||||
|
||||
photoprismGarnet = photoprismVM {
|
||||
user = "garnet";
|
||||
ip = "192.168.50.66";
|
||||
mac = "02:00:00:00:56:66";
|
||||
userMac = "02:00:00:00:00:66";
|
||||
ssh = 2506;
|
||||
};
|
||||
# photoprismGarnet = photoprismVM {
|
||||
# user = "garnet";
|
||||
# ip = "192.168.50.66";
|
||||
# mac = "02:00:00:00:56:66";
|
||||
# userMac = "02:00:00:00:00:66";
|
||||
# ssh = 2506;
|
||||
# };
|
||||
|
||||
in
|
||||
photoprismNick // photoprismStacie // photoprismGarnet
|
||||
photoprismNick
|
||||
# // photoprismStacie // photoprismGarnet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue