Add alejandra

This commit is contained in:
Dave Gallant
2022-05-28 10:30:29 -04:00
parent 80e7729ab4
commit d2aaa3920f
31 changed files with 334 additions and 323 deletions

View File

@@ -0,0 +1,15 @@
{
config,
pkgs,
...
}: let
in {
systemd.services.keyleds = {
description = "Logitech Keyboard animation for Linux G410, G513, G610, G810, G910, GPro";
wantedBy = ["multi-user.target"];
serviceConfig = {
ExecStart = "${pkgs.keyleds}/bin/set-leds.sh";
};
};
}

View File

@@ -0,0 +1,45 @@
{
config,
pkgs,
...
}: let
netdata = pkgs.netdata;
netdataConf = ./netdata.conf;
netdataDir = "/var/lib/netdata";
in {
users.extraGroups.netdata.gid = 220008;
users.users.netdata.group = "netdata";
users.extraUsers.netdata = {
description = "Netdata server user";
isSystemUser = true;
name = "netdata";
uid = 200008;
};
systemd.services.netdata = {
wantedBy = ["multi-user.target"];
after = ["network.target"];
preStart = ''
mkdir -p ${netdataDir}/config
mkdir -p ${netdataDir}/logs
cp -r ${netdata}/share/netdata/web ${netdataDir}/web
chmod -R 700 ${netdataDir}
chown -R netdata:netdata ${netdataDir}
'';
serviceConfig = {
Type = "forking";
ExecStart = "${netdata}/bin/netdata -c ${netdataConf} -u netdata";
Restart = "on-failure";
};
};
services.nginx.httpConfig = ''
server {
server_name netdata.thume.net;
location / {
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:19999;
}
}
'';
}

View File

@@ -0,0 +1,21 @@
[global]
run as user = netdata
config directory = /var/lib/netdata/config
web files directory = /var/lib/netdata/web
cache directory = /var/lib/netdata
log directory = /var/lib/netdata/logs
# the default database size - 1 hour
history = 3600
# some defaults to run netdata with least priority
process scheduling policy = idle
OOM score = 1000
[web]
# web files owner = root
web files group = netdata
# by default do not expose the netdata port
bind to = localhost