service: napcat
This commit is contained in:
32
modules/services/napcat.nix
Normal file
32
modules/services/napcat.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ inputs, config, ... }:
|
||||
|
||||
let
|
||||
Napcat = inputs.napcat.lib.${config.nixpkgs.system}.buildNapcat {
|
||||
qq_config_dir = "/var/lib/napcat/qq/";
|
||||
nc_config_dir = "/var/lib/napcat/napcat/";
|
||||
};
|
||||
in
|
||||
{
|
||||
systemd.services.napcat = {
|
||||
enable = true;
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Napcat Service";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${Napcat.script}/bin/NapCat";
|
||||
User = "napcat";
|
||||
Group = "napcat";
|
||||
WorkingDirectory = "/var/lib/napcat/";
|
||||
StateDirectory = "napcat";
|
||||
StateDirectoryMode = "0750";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.napcat = {
|
||||
isNormalUser = true;
|
||||
home = "/var/lib/napcat/";
|
||||
extraGroups = [ "napcat" ];
|
||||
};
|
||||
users.groups.napcat = { };
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user