diff --git a/nixos/hosts/gandalf/default.nix b/nixos/hosts/gandalf/default.nix index 8e50204..418ba98 100644 --- a/nixos/hosts/gandalf/default.nix +++ b/nixos/hosts/gandalf/default.nix @@ -134,6 +134,7 @@ in devices = disks; extraCapabilities = [ "SYS_RAWIO" ]; containerVolumeLocation = "/eru/containers/volumes/scrutiny"; + port = 8585; }; # Sanoid diff --git a/nixos/modules/nixos/containers/scrutiny/default.nix b/nixos/modules/nixos/containers/scrutiny/default.nix index 7d8881e..60dd0fe 100644 --- a/nixos/modules/nixos/containers/scrutiny/default.nix +++ b/nixos/modules/nixos/containers/scrutiny/default.nix @@ -10,6 +10,16 @@ in options.mySystem.services.${app} = { enable = mkEnableOption "${app}"; + # Port to expose the web ui on. + port = mkOption { + type = types.int; + default = 8080; + description = '' + Port to expose the web ui on. + ''; + example = 8080; + }; + # Location where the container will store its data. containerVolumeLocation = mkOption { type = types.str; default = "/mnt/data/containers/${app}"; @@ -18,6 +28,7 @@ in ''; example = "/mnt/data/containers/${app}"; }; + # podman equivalent: # --device /dev/disk/by-id/nvme-XXXXXXXXXXXXXXXXXXXXXXXXXXXX devices = mkOption { @@ -53,7 +64,7 @@ in autoStart = true; ports = [ - "8585:8585" # web ui + "${toString cfg.port}:8080" # web ui "8086:8086" # influxdb2 ];