Ryan Lahfa
1c6124f376
All checks were successful
Check meta / check_meta (pull_request) Successful in 20s
Check meta / check_dns (pull_request) Successful in 21s
build configuration / build_vault01 (pull_request) Successful in 1m12s
build configuration / build_storage01 (pull_request) Successful in 1m14s
build configuration / build_compute01 (pull_request) Successful in 1m22s
build configuration / build_web02 (pull_request) Successful in 1m4s
build configuration / build_rescue01 (pull_request) Successful in 1m8s
lint / check (pull_request) Successful in 23s
build configuration / build_web01 (pull_request) Successful in 1m38s
build configuration / build_geo02 (pull_request) Successful in 1m3s
build configuration / build_bridge01 (pull_request) Successful in 1m1s
build configuration / build_geo01 (pull_request) Successful in 1m11s
build configuration / push_to_cache_storage01 (pull_request) Successful in 1m18s
build configuration / push_to_cache_web02 (pull_request) Successful in 1m23s
build configuration / push_to_cache_compute01 (pull_request) Successful in 1m57s
build configuration / push_to_cache_geo02 (pull_request) Successful in 1m23s
build configuration / push_to_cache_rescue01 (pull_request) Successful in 1m30s
build configuration / push_to_cache_web01 (pull_request) Successful in 2m13s
build configuration / push_to_cache_bridge01 (pull_request) Successful in 1m15s
build configuration / push_to_cache_geo01 (pull_request) Successful in 3m18s
build configuration / build_storage01 (push) Successful in 1m13s
build configuration / build_web02 (push) Successful in 1m14s
build configuration / build_vault01 (push) Successful in 1m20s
build configuration / build_compute01 (push) Successful in 1m29s
build configuration / build_web01 (push) Successful in 1m43s
lint / check (push) Successful in 23s
build configuration / build_rescue01 (push) Successful in 1m7s
build configuration / build_bridge01 (push) Successful in 1m2s
build configuration / build_geo02 (push) Successful in 1m7s
build configuration / build_geo01 (push) Successful in 1m11s
build configuration / push_to_cache_storage01 (push) Successful in 1m24s
build configuration / push_to_cache_web02 (push) Successful in 1m19s
build configuration / push_to_cache_bridge01 (push) Successful in 1m8s
build configuration / push_to_cache_rescue01 (push) Successful in 1m26s
build configuration / push_to_cache_compute01 (push) Successful in 1m47s
build configuration / push_to_cache_geo02 (push) Successful in 1m14s
build configuration / push_to_cache_geo01 (push) Successful in 1m19s
build configuration / push_to_cache_web01 (push) Successful in 2m16s
Can schedule meet.dgnum.eu in the chat upon demand. Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
75 lines
2.7 KiB
Nix
75 lines
2.7 KiB
Nix
# Copyright :
|
|
# - Ryan Lahfa <ryan.lahfa@dgnum.eu> 2024
|
|
#
|
|
# Ce logiciel est un programme informatique servant à déployer des
|
|
# configurations de serveurs via NixOS.
|
|
#
|
|
# Ce logiciel est régi par la licence CeCILL soumise au droit français et
|
|
# respectant les principes de diffusion des logiciels libres. Vous pouvez
|
|
# utiliser, modifier et/ou redistribuer ce programme sous les conditions
|
|
# de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA
|
|
# sur le site "http://www.cecill.info".
|
|
#
|
|
# En contrepartie de l'accessibilité au code source et des droits de copie,
|
|
# de modification et de redistribution accordés par cette licence, il n'est
|
|
# offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons,
|
|
# seule une responsabilité restreinte pèse sur l'auteur du programme, le
|
|
# titulaire des droits patrimoniaux et les concédants successifs.
|
|
#
|
|
# A cet égard l'attention de l'utilisateur est attirée sur les risques
|
|
# associés au chargement, à l'utilisation, à la modification et/ou au
|
|
# développement et à la reproduction du logiciel par l'utilisateur étant
|
|
# donné sa spécificité de logiciel libre, qui peut le rendre complexe à
|
|
# manipuler et qui le réserve donc à des développeurs et des professionnels
|
|
# avertis possédant des connaissances informatiques approfondies. Les
|
|
# utilisateurs sont donc invités à charger et tester l'adéquation du
|
|
# logiciel à leurs besoins dans des conditions permettant d'assurer la
|
|
# sécurité de leurs systèmes et ou de leurs données et, plus généralement,
|
|
# à l'utiliser et l'exploiter dans les mêmes conditions de sécurité.
|
|
#
|
|
# Le fait que vous puissiez accéder à cet en-tête signifie que vous avez
|
|
# pris connaissance de la licence CeCILL, et que vous en avez accepté les
|
|
# termes.
|
|
|
|
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.dgn-chatops;
|
|
inherit (lib) mkEnableOption mkIf;
|
|
python3 = pkgs.python311;
|
|
python3Pkgs = python3.pkgs;
|
|
ircrobots = python3Pkgs.callPackage ./ircrobots.nix { };
|
|
tortoise-orm = python3Pkgs.callPackage ./tortoise-orm.nix { };
|
|
ps = python3Pkgs.makePythonPath [
|
|
ircrobots
|
|
tortoise-orm
|
|
python3Pkgs.aiohttp
|
|
];
|
|
in
|
|
{
|
|
options.dgn-chatops = {
|
|
enable = mkEnableOption "the ChatOps layer";
|
|
};
|
|
|
|
# Our ChatOps bot.
|
|
config = mkIf cfg.enable {
|
|
systemd.services.irc-takumi = {
|
|
description = "DGNum IRC automation bot, Takumi";
|
|
wantedBy = [ "multi-user.target" ];
|
|
after = [ "network.target" ];
|
|
environment = {
|
|
PYTHONPATH = ps;
|
|
};
|
|
serviceConfig = {
|
|
RuntimeDirectory = "takumi";
|
|
StateDirectory = "takumi";
|
|
DynamicUser = true;
|
|
ExecStart = "${lib.getExe python3} ${./takumi.py}";
|
|
};
|
|
};
|
|
};
|
|
}
|