38 lines
591 B
Nix
38 lines
591 B
Nix
{
|
|
inputs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
enabled = config.mod.puppy-tracker.enable;
|
|
port = 8089;
|
|
in
|
|
{
|
|
options = {
|
|
mod.puppy-tracker = {
|
|
enable = lib.mkEnableOption "Enable puppy-tracker module";
|
|
};
|
|
};
|
|
|
|
imports = [
|
|
inputs.puppy-tracker.nixosModules.default
|
|
];
|
|
|
|
config = lib.mkIf enabled {
|
|
mod.homepage.services = [
|
|
{
|
|
name = "Puppy Tracker";
|
|
port = port;
|
|
description = "Sleep, meals, pees, poos";
|
|
}
|
|
];
|
|
|
|
services.puppy-tracker = {
|
|
enable = true;
|
|
inherit port;
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
}
|