summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hosts/poweredge/configuration.nix26
-rw-r--r--hosts/poweredge/fileshares.nix3
-rw-r--r--nixos/services/immich.nix12
3 files changed, 26 insertions, 15 deletions
diff --git a/hosts/poweredge/configuration.nix b/hosts/poweredge/configuration.nix
index e2798bd..ef99add 100644
--- a/hosts/poweredge/configuration.nix
+++ b/hosts/poweredge/configuration.nix
@@ -25,21 +25,27 @@
};
};
+ # Import zfs pools
+ boot.zfs.extraPools = [ "ingens" "memoria" ];
# Enable smartd
services.smartd.enable = true; # TODO move to archetype
# Enable web services
- # services = {
- # _cgit = {
- # enable = true;
- # hostAddress = "192.168.1.10";
- # localAddress = "192.168.1.11";
- # rootTitle = "PowerEdge local cgit";
- # # TODO add authorizedKeys
- # };
- # };
- #
+ services = {
+ #_cgit = {
+ # enable = true;
+ # hostAddress = "192.168.1.10";
+ # localAddress = "192.168.1.11";
+ # rootTitle = "PowerEdge local cgit";
+ # # TODO add authorizedKeys
+ #};
+ _immich = {
+ enable = true;
+ mediaLocationHostPath = "/media/ingens/immich";
+ };
+ };
+
#services._klipper.enable = true;
# Enable user timmy
diff --git a/hosts/poweredge/fileshares.nix b/hosts/poweredge/fileshares.nix
index 90b738c..8c3c9a0 100644
--- a/hosts/poweredge/fileshares.nix
+++ b/hosts/poweredge/fileshares.nix
@@ -1,7 +1,4 @@
{
- # Import zfs pools
- boot.zfs.extraPools = [ "ingens" "memoria" ];
-
services._fileShares.enable = true;
services._fileShares.shares = {
PS2 = {
diff --git a/nixos/services/immich.nix b/nixos/services/immich.nix
index 283a958..2746787 100644
--- a/nixos/services/immich.nix
+++ b/nixos/services/immich.nix
@@ -2,14 +2,22 @@
let
cfg = config.services._immich;
in {
+ options.services._immich = {
+ enable = lib.mkEnableOption "enables cgit service";
+ mediaLocationHostPath = lib.mkOption {
+ type = lib.types.nullOr lib.types.str;
+ description = "host path to the media location";
+ default = null;
+ };
+ };
config = {
containers.immich = {
autoStart = true;
privateNetwork = false;
bindMounts = {
- "/var/lib/immich" = {
- hostPath = "/media/ingens/immich";
+ "/var/lib/immich" = lib.mkIf (cfg.mediaLocationHostPath != null) {
+ hostPath = cfg.mediaLocationHostPath;
isReadOnly = false;
};
};