style: starting to setup the service folder
This commit is contained in:
parent
18060e87db
commit
7d2608a6e8
4 changed files with 53 additions and 34 deletions
|
|
@ -20,41 +20,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services = {
|
systemd.services = {
|
||||||
ticket = {
|
|
||||||
description = "Service for ticket";
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
User = "root";
|
|
||||||
WorkingDirectory = "/root/ticket";
|
|
||||||
ExecStart = "${pkgs.nodejs}/bin/npm start";
|
|
||||||
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
tempvoc = {
|
|
||||||
description = "Service for tempvoc";
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
User = "root";
|
|
||||||
WorkingDirectory = "/root/tempvoc";
|
|
||||||
ExecStart = "${pkgs.nodejs}/bin/npm start";
|
|
||||||
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = 5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
music = {
|
music = {
|
||||||
description = "Service for music";
|
description = "Enium discord bot for music";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "root";
|
User = "nobody";
|
||||||
WorkingDirectory = "/root/music";
|
WorkingDirectory = "/root/music";
|
||||||
ExecStart = "${pkgs.nodejs}/bin/npm start";
|
ExecStart = "${pkgs.nodejs}/bin/npm start";
|
||||||
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
||||||
|
|
@ -63,12 +35,12 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
yagpdb = {
|
yagpdb = {
|
||||||
description = "Service for yagpdb";
|
description = "Enium discord master bot";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "root";
|
User = "nobody";
|
||||||
WorkingDirectory = "/root/yagpdb/cmd/yagpdb";
|
WorkingDirectory = "/root/yagpdb/cmd/yagpdb";
|
||||||
ExecStart = "/root/yagpdb/cmd/yagpdb/yagpdb -all -pa";
|
ExecStart = "/root/yagpdb/cmd/yagpdb/yagpdb -all -pa";
|
||||||
EnvironmentFile = "/root/yagpdb/cmd/yagpdb/sampleenvfile";
|
EnvironmentFile = "/root/yagpdb/cmd/yagpdb/sampleenvfile";
|
||||||
|
|
@ -130,7 +102,9 @@
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
|
];
|
||||||
config.common.default = "*";
|
config.common.default = "*";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@
|
||||||
man-pages
|
man-pages
|
||||||
man-pages-posix
|
man-pages-posix
|
||||||
networkmanager
|
networkmanager
|
||||||
nodejs
|
|
||||||
openssl
|
openssl
|
||||||
pkg-config
|
pkg-config
|
||||||
postgresql
|
postgresql
|
||||||
|
|
@ -78,6 +77,7 @@
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
xclip
|
xclip
|
||||||
xsel
|
xsel
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
yarn
|
yarn
|
||||||
zsh
|
zsh
|
||||||
vim
|
vim
|
||||||
|
|
|
||||||
23
services/bot_discord/tempvoc.nix
Normal file
23
services/bot_discord/tempvoc.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nodejs
|
||||||
|
];
|
||||||
|
systemd.services.ticket = {
|
||||||
|
tempvoc = {
|
||||||
|
description = "Enium discord bot for tempvoc";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "nobody";
|
||||||
|
WorkingDirectory = "/root/tempvoc";
|
||||||
|
ExecStart = "${pkgs.nodejs}/bin/npm start";
|
||||||
|
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
22
services/bot_discord/ticket.nix
Normal file
22
services/bot_discord/ticket.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nodejs
|
||||||
|
];
|
||||||
|
systemd.services.ticket = {
|
||||||
|
description = "Service for ticket";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "nobody";
|
||||||
|
WorkingDirectory = "/root/ticket";
|
||||||
|
ExecStart = "${pkgs.nodejs}/bin/npm start";
|
||||||
|
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue