27 lines
511 B
Nix
27 lines
511 B
Nix
{ config, lib, pkgs, package, ... }:
|
|
|
|
let
|
|
cfg = config.custom.minimal-youtube;
|
|
in
|
|
{
|
|
options.custom.minimal-youtube = {
|
|
enable = lib.mkEnableOption "minimal-youtube web app";
|
|
port = lib.mkOption {
|
|
type = lib.types.port;
|
|
default = 8080;
|
|
};
|
|
};
|
|
|
|
config.systemd.services.minimal-youtube = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
serviceConfig = {
|
|
ExecStart =
|
|
"${package}/bin/minimal-youtube --port ${toString cfg.port}";
|
|
|
|
Restart = "always";
|
|
};
|
|
};
|
|
}
|
|
|