Compare commits
No commits in common. "685c212f334a1c5d941301eaaa58f38602d5b2ea" and "d046c460a23acad0c5fc9e34044025b436224e88" have entirely different histories.
685c212f33
...
d046c460a2
19
services.nix
19
services.nix
@ -40,8 +40,8 @@ in
|
|||||||
"riot.${domaine}" = { ip = "127.0.0.1"; port = riot_port; auth = false; };
|
"riot.${domaine}" = { ip = "127.0.0.1"; port = riot_port; auth = false; };
|
||||||
"matrix.${domaine}" = { ip = "127.0.0.1"; port = 8008; 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; };
|
"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; };
|
"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;
|
services.mailserver.enable = true;
|
||||||
@ -63,9 +63,6 @@ in
|
|||||||
system = {};
|
system = {};
|
||||||
disk = {};
|
disk = {};
|
||||||
ipmi_sensor = { path = "${pkgs.ipmitool}/bin/ipmitool"; };
|
ipmi_sensor = { path = "${pkgs.ipmitool}/bin/ipmitool"; };
|
||||||
smart = {
|
|
||||||
path = "${pkgs.writeShellScriptBin "smartctl" "/run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl $@"}/bin/smartctl";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
outputs = {
|
outputs = {
|
||||||
influxdb = { database = "telegraf"; urls = [ "http://localhost:8086" ]; };
|
influxdb = { database = "telegraf"; urls = [ "http://localhost:8086" ]; };
|
||||||
@ -76,10 +73,6 @@ in
|
|||||||
KERNEL=="ipmi*", MODE="660", OWNER="telegraf"
|
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.enable = true;
|
||||||
services.grafana.addr = "127.0.0.1";
|
services.grafana.addr = "127.0.0.1";
|
||||||
services.grafana.dataDir = "/var/lib/grafana";
|
services.grafana.dataDir = "/var/lib/grafana";
|
||||||
@ -243,16 +236,6 @@ 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.enable = true;
|
||||||
services.site-musique.port = musique_port;
|
services.site-musique.port = musique_port;
|
||||||
services.site-musique.domaine = "musique.${domaine}";
|
services.site-musique.domaine = "musique.${domaine}";
|
||||||
|
@ -25,7 +25,6 @@ in
|
|||||||
type = with types; attrsOf (submodule { options = {
|
type = with types; attrsOf (submodule { options = {
|
||||||
ip = mkOption { type = str; description = "IP address"; };
|
ip = mkOption { type = str; description = "IP address"; };
|
||||||
port = mkOption { type = int; description = "Port number"; };
|
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; };
|
auth = mkOption { type = bool; description = "Enable authentification"; default = false; };
|
||||||
}; });
|
}; });
|
||||||
example = ''
|
example = ''
|
||||||
@ -91,16 +90,7 @@ in
|
|||||||
''
|
''
|
||||||
backend ${name}-backend
|
backend ${name}-backend
|
||||||
mode http
|
mode http
|
||||||
${(
|
server ${name} ${value.ip}:${toString value.port}
|
||||||
if value.socket == "" then
|
|
||||||
''
|
|
||||||
server ${name} ${value.ip}:${toString value.port}
|
|
||||||
''
|
|
||||||
else
|
|
||||||
''
|
|
||||||
server ${name} ${value.socket}
|
|
||||||
''
|
|
||||||
)}
|
|
||||||
${(if value.auth then (
|
${(if value.auth then (
|
||||||
"\n acl AuthOK_LOUTRE http_auth(LOUTRE)\n"
|
"\n acl AuthOK_LOUTRE http_auth(LOUTRE)\n"
|
||||||
+ " http-request auth realm LOUTRE if !AuthOK_LOUTRE\n"
|
+ " http-request auth realm LOUTRE if !AuthOK_LOUTRE\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user