mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 05:13:10 +01:00
Compare commits
No commits in common. "11b11c2be7547257cd75e3593e17d0998dfd5009" and "3dc025762fb3f7af589d6617944cd48161babad9" have entirely different histories.
11b11c2be7
...
3dc025762f
12
flake.lock
12
flake.lock
|
@ -281,11 +281,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708225687,
|
"lastModified": 1707620986,
|
||||||
"narHash": "sha256-NJBDfvknI26beOFmjO2coeJMTTUCCtw2Iu+rvJ1Zb9k=",
|
"narHash": "sha256-XE0tCSkSVBeJDWhjFwusNInwAhrnp+TloUNUpvnTiLw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "17352eb241a8d158c4ac523b19d8d2a6c8efe127",
|
"rev": "0cb4345704123492e6d1f1068629069413c80de0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -296,11 +296,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708118438,
|
"lastModified": 1707956935,
|
||||||
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
|
"narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
|
"rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
./modules/networks
|
./modules/networks
|
||||||
./modules/backup
|
./modules/backup
|
||||||
./modules/cache
|
./modules/cache
|
||||||
# ./modules/grafana
|
./modules/grafana
|
||||||
./modules/hydra
|
./modules/hydra
|
||||||
# ./modules/prometheus
|
./modules/prometheus
|
||||||
./modules/matrix
|
./modules/matrix
|
||||||
./modules/seafile
|
./modules/seafile
|
||||||
./modules/uptime-kuma
|
./modules/uptime-kuma
|
||||||
|
|
42
hosts/nuc/modules/grafana/default.nix
Normal file
42
hosts/nuc/modules/grafana/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
domain = "monitoring.${config.networking.domain}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.grafana = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
inherit domain;
|
||||||
|
http_addr = "127.0.0.1";
|
||||||
|
http_port = 3000;
|
||||||
|
};
|
||||||
|
database = {
|
||||||
|
type = "postgres";
|
||||||
|
user = "grafana";
|
||||||
|
host = "/run/postgresql";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
services.postgresql = {
|
||||||
|
enable = true;
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "grafana";
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
ensureDatabases = [ "grafana" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."${domain}" = {
|
||||||
|
addSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${toString config.services.grafana.settings.server.http_addr}:${toString config.services.grafana.settings.server.http_port}/";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
35
hosts/nuc/modules/prometheus/default.nix
Normal file
35
hosts/nuc/modules/prometheus/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
exportersConfig = config.services.prometheus.exporters;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.prometheus = {
|
||||||
|
enable = true;
|
||||||
|
exporters = {
|
||||||
|
node = {
|
||||||
|
enable = true;
|
||||||
|
enabledCollectors = [ "systemd" ];
|
||||||
|
};
|
||||||
|
# postgres.enable = true;
|
||||||
|
};
|
||||||
|
scrapeConfigs = [
|
||||||
|
{
|
||||||
|
job_name = "node";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = [ "127.0.0.1:${toString exportersConfig.node.port}" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
# {
|
||||||
|
# job_name = "postgres";
|
||||||
|
# static_configs = [
|
||||||
|
# {
|
||||||
|
# targets = [ "127.0.0.1:${toString exportersConfig.postgres.port}" ];
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# }
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -24,7 +24,6 @@
|
||||||
dnsutils
|
dnsutils
|
||||||
nmap
|
nmap
|
||||||
curlFull
|
curlFull
|
||||||
wireguard-tools
|
|
||||||
];
|
];
|
||||||
services.resolved = {
|
services.resolved = {
|
||||||
fallbackDns = [
|
fallbackDns = [
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
spiceUSBRedirection.enable = true;
|
spiceUSBRedirection.enable = true;
|
||||||
};
|
};
|
||||||
# allow libvirts internal network stuff
|
# allow libvirts internal network stuff
|
||||||
networking.firewall.trustedInterfaces = [ "virbr0" "br0" ];
|
networking.firewall.trustedInterfaces = [ "virbr0" ];
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
virt-viewer
|
virt-viewer
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
./helix
|
./helix
|
||||||
./wayland
|
./wayland
|
||||||
./mpv
|
./mpv
|
||||||
./qutebrowser
|
# broken
|
||||||
|
# ./qutebrowser
|
||||||
./ssh
|
./ssh
|
||||||
./theme
|
./theme
|
||||||
./tex
|
./tex
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
# fancy tools
|
# fancy tools
|
||||||
just
|
just
|
||||||
(himalaya.override { buildFeatures = [ "pgp-commands" ]; })
|
himalaya
|
||||||
# strace but with colors
|
# strace but with colors
|
||||||
(strace.overrideAttrs (_: {
|
(strace.overrideAttrs (_: {
|
||||||
patches = [
|
patches = [
|
||||||
|
|
Loading…
Reference in a new issue