nixos module
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
{ 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user