Minor cleanup

master
Sven Slootweg 7 years ago
parent 8301f1d5c1
commit 2ddc420f9d

@ -16,35 +16,35 @@
};
errorReporterModule = optionalValue hasErrorReporting (errorReporter {
application = application;
applicationName = name;
errorPath = errorPath;
inherit application errorPath;
});
in {
imports = [
errorReporterModule
];
in
{
imports = [
errorReporterModule
];
options.services."${serviceName}" = {
enable = mkEnableOption "${name}";
} // serviceOptions;
options.services."${serviceName}" = {
enable = mkEnableOption "${name}";
} // serviceOptions;
config = {
# FIXME: What if a username conflict occurs?
users.extraUsers."${name}" = mkIf cfg.enable {
description = "${name} Service User";
};
config = {
# FIXME: What if a username conflict occurs?
users.extraUsers."${name}" = mkIf cfg.enable {
description = "${name} Service User";
};
systemd.services."${serviceName}" = mkIf cfg.enable ({
description = "${name} Service";
wantedBy = ["multi-user.target"];
after = ["network.target"];
systemd.services."${serviceName}" = mkIf cfg.enable ({
description = "${name} Service";
wantedBy = ["multi-user.target"];
after = ["network.target"];
serviceConfig = {
ExecStart = "${application}/${mainBinaryPath}";
User = name;
PermissionsStartOnly = true;
};
} // serviceConfig);
};
}
serviceConfig = {
ExecStart = "${application}/${mainBinaryPath}";
User = name;
PermissionsStartOnly = true;
};
} // serviceConfig);
};
}

Loading…
Cancel
Save