Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344{self}: { config, pkgs, lib, ...}: let cfg = config.services.kobot;in { options = { services.kobot = { enable = lib.mkEnableOption "Kobot discord bot service"; package = lib.mkPackageOption self.packages.${pkgs.system} "kobot" {}; config = lib.mkOption { type = lib.types.path; description = '' Path to the desired config file. ''; }; }; }; config = lib.mkIf cfg.enable { systemd.services.kobot = { wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; description = "Kobot Discord Bot"; serviceConfig = { ExecStart = lib.concatStringsSep " " [ "${lib.getExe cfg.package}" "--config ${cfg.config}" ]; Restart = "on-failure"; User = "kobot"; }; }; users = { users.kobot = { isSystemUser = true; group = "kobot"; }; groups.kobot = {}; }; };}