Compare commits
4 Commits
d046c460a2
...
685c212f33
Author | SHA1 | Date | |
---|---|---|---|
685c212f33 | |||
35525a9cd9 | |||
d70eff7249 | |||
959801a1d0 |
19
services.nix
19
services.nix
@ -40,8 +40,8 @@ in
|
||||
"riot.${domaine}" = { ip = "127.0.0.1"; port = riot_port; auth = false; };
|
||||
"matrix.${domaine}" = { ip = "127.0.0.1"; port = 8008; auth = false; };
|
||||
"organizr.${domaine}" = { ip = "127.0.0.1"; port = organizr_port; auth = true; };
|
||||
"calibre.${domaine}" = { ip = "127.0.0.1"; port = 8080; auth = false; };
|
||||
"pgmanage.${domaine}" = { ip = "127.0.0.1"; port = pgmanage_port; auth = true; };
|
||||
"gitea.${domaine}" = { ip = "127.0.0.1"; port = 3001; auth = false; };
|
||||
};
|
||||
|
||||
services.mailserver.enable = true;
|
||||
@ -63,6 +63,9 @@ in
|
||||
system = {};
|
||||
disk = {};
|
||||
ipmi_sensor = { path = "${pkgs.ipmitool}/bin/ipmitool"; };
|
||||
smart = {
|
||||
path = "${pkgs.writeShellScriptBin "smartctl" "/run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl $@"}/bin/smartctl";
|
||||
};
|
||||
};
|
||||
outputs = {
|
||||
influxdb = { database = "telegraf"; urls = [ "http://localhost:8086" ]; };
|
||||
@ -73,6 +76,10 @@ in
|
||||
KERNEL=="ipmi*", MODE="660", OWNER="telegraf"
|
||||
'';
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{ commands = [ { command = "${pkgs.smartmontools}/bin/smartctl"; options = [ "NOPASSWD" ]; } ]; users = [ "telegraf" ]; }
|
||||
];
|
||||
|
||||
services.grafana.enable = true;
|
||||
services.grafana.addr = "127.0.0.1";
|
||||
services.grafana.dataDir = "/var/lib/grafana";
|
||||
@ -236,6 +243,16 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
cookieSecure = true;
|
||||
httpPort = 3001;
|
||||
rootUrl = "https://gitea.nyanlout.re/";
|
||||
database.type = "postgres";
|
||||
database.port = 5432;
|
||||
database.password = "gitea";
|
||||
};
|
||||
|
||||
services.site-musique.enable = true;
|
||||
services.site-musique.port = musique_port;
|
||||
services.site-musique.domaine = "musique.${domaine}";
|
||||
|
@ -25,6 +25,7 @@ in
|
||||
type = with types; attrsOf (submodule { options = {
|
||||
ip = mkOption { type = str; description = "IP address"; };
|
||||
port = mkOption { type = int; description = "Port number"; };
|
||||
socket = mkOption { type = str; description = "Emplacement du socket"; default = ""; };
|
||||
auth = mkOption { type = bool; description = "Enable authentification"; default = false; };
|
||||
}; });
|
||||
example = ''
|
||||
@ -90,7 +91,16 @@ in
|
||||
''
|
||||
backend ${name}-backend
|
||||
mode http
|
||||
${(
|
||||
if value.socket == "" then
|
||||
''
|
||||
server ${name} ${value.ip}:${toString value.port}
|
||||
''
|
||||
else
|
||||
''
|
||||
server ${name} ${value.socket}
|
||||
''
|
||||
)}
|
||||
${(if value.auth then (
|
||||
"\n acl AuthOK_LOUTRE http_auth(LOUTRE)\n"
|
||||
+ " http-request auth realm LOUTRE if !AuthOK_LOUTRE\n"
|
||||
|
Loading…
Reference in New Issue
Block a user