nixos/unifi-video: clean up indentation and formatting
This commit is contained in:
parent
95a3f6ad26
commit
60e62c36df
|
@ -94,6 +94,7 @@ in
|
|||
{
|
||||
|
||||
options.services.unifi-video = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
|
@ -145,6 +146,13 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether or not to open the required ports on the firewall.
|
||||
'';
|
||||
};
|
||||
|
||||
maximumJavaHeapSize = mkOption {
|
||||
type = types.nullOr types.int;
|
||||
|
@ -161,26 +169,18 @@ in
|
|||
defaultText = literalExpression ''"''${config.${opt.dataDir}}/unifi-video.pid"'';
|
||||
description = "Location of unifi-video pid file.";
|
||||
};
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether or not to open the required ports on the firewall.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users = {
|
||||
users.unifi-video = {
|
||||
|
||||
users.users.unifi-video = {
|
||||
description = "UniFi Video controller daemon user";
|
||||
home = stateDir;
|
||||
group = "unifi-video";
|
||||
isSystemUser = true;
|
||||
};
|
||||
groups.unifi-video = {};
|
||||
};
|
||||
users.groups.unifi-video = {};
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
# https://help.ui.com/hc/en-us/articles/217875218-UniFi-Video-Ports-Used
|
||||
|
@ -237,7 +237,6 @@ config = mkIf cfg.enable {
|
|||
"L+ '${stateDir}/conf/server.xml' 0700 unifi-video unifi-video - ${pkgs.unifi-video}/lib/unifi-video/conf/server.xml"
|
||||
"L+ '${stateDir}/conf/tomcat-users.xml' 0700 unifi-video unifi-video - ${pkgs.unifi-video}/lib/unifi-video/conf/tomcat-users.xml"
|
||||
"L+ '${stateDir}/conf/web.xml' 0700 unifi-video unifi-video - ${pkgs.unifi-video}/lib/unifi-video/conf/web.xml"
|
||||
|
||||
];
|
||||
|
||||
systemd.services.unifi-video = {
|
||||
|
@ -258,7 +257,6 @@ config = mkIf cfg.enable {
|
|||
WorkingDirectory = "${stateDir}";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
|
Loading…
Reference in a new issue