style(nixfmt): formatting using nixfmt cli tools
This commit is contained in:
parent
b804520f4c
commit
fbe803b928
46 changed files with 2133 additions and 1700 deletions
|
|
@ -1,47 +1,52 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.service.bot_discord.marty;
|
||||
cfg = config.service.bot_discord.marty;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nodejs
|
||||
];
|
||||
users = {
|
||||
groups.dsc_marty = {
|
||||
name = "dsc_marty";
|
||||
};
|
||||
users.dsc_marty = {
|
||||
description = "Utilisateur pour le bot BDE";
|
||||
group = "dsc_marty";
|
||||
home = "/opt/marty";
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nodejs
|
||||
];
|
||||
users = {
|
||||
groups.dsc_marty = {
|
||||
name = "dsc_marty";
|
||||
};
|
||||
users.dsc_marty = {
|
||||
description = "Utilisateur pour le bot BDE";
|
||||
group = "dsc_marty";
|
||||
home = "/opt/marty";
|
||||
isSystemUser = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.bot_marty = {
|
||||
description = "marty discord bot";
|
||||
after = [
|
||||
"network.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"multi-user.target"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "dsc_marty";
|
||||
WorkingDirectory = "/opt/marty";
|
||||
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
||||
ExecStartPre = [
|
||||
"${pkgs.nodejs}/bin/npm install"
|
||||
"${pkgs.nodejs}/bin/npm run build"
|
||||
];
|
||||
ExecStart = "${pkgs.nodejs}/bin/npm run start-prod";
|
||||
EnvironmentFile = "/opt/marty/.env";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.services.bot_marty = {
|
||||
description = "marty discord bot";
|
||||
after = [
|
||||
"network.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"multi-user.target"
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "dsc_marty";
|
||||
WorkingDirectory = "/opt/marty";
|
||||
Environment = "PATH=${pkgs.coreutils}/bin:${pkgs.bash}/bin:${pkgs.nodejs}/bin";
|
||||
ExecStartPre = [
|
||||
"${pkgs.nodejs}/bin/npm install"
|
||||
"${pkgs.nodejs}/bin/npm run build"
|
||||
];
|
||||
ExecStart = "${pkgs.nodejs}/bin/npm run start-prod";
|
||||
EnvironmentFile = "/opt/marty/.env";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue