pluh 🗣
This commit is contained in:
parent
668140531b
commit
516b647ed4
35 changed files with 204 additions and 119 deletions
6
classes/headful/codium.nix
Normal file
6
classes/headful/codium.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
# TODO: wrap
|
||||
environment.systemPackages = [
|
||||
pkgs.vscodium
|
||||
];
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
{
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.flatpak.nixosModules.nix-flatpak
|
||||
];
|
||||
|
||||
services.flatpak.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{pkgs, ...}: {
|
||||
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
steam-hardware.enable = true;
|
||||
xone.enable = true;
|
||||
xpadneo.enable = true;
|
||||
opentabletdriver.enable = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = [
|
||||
pkgs.libvdpau-va-gl
|
||||
pkgs.vaapiVdpau
|
||||
];
|
||||
};
|
||||
graphics.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
domain = "grafana.pele";
|
||||
port = 9010;
|
||||
addr = "127.0.0.1";
|
||||
|
||||
# WARNING: this should match nginx setup!
|
||||
# prevents "Request origin is not authorized"
|
||||
rootUrl = "http://192.168.1.10:8010"; # helps with nginx / ws / live
|
||||
settings.server = {
|
||||
domain = "grafana.pele";
|
||||
http_port = 9010;
|
||||
http_addr = "127.0.0.1";
|
||||
root_url = "http://192.168.1.10:8010"; # TODO
|
||||
protocol = "http";
|
||||
};
|
||||
|
||||
protocol = "http";
|
||||
analytics.reporting.enable = false;
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources = [
|
||||
datasources.settings.datasources = [
|
||||
{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
|
@ -31,11 +35,11 @@
|
|||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${config.services.grafana.domain} = {
|
||||
services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://${lib.formatHostPort {
|
||||
host = config.services.grafana.addr;
|
||||
inherit (config.services.grafana) port;
|
||||
host = config.services.grafana.settings.server.http_addr;
|
||||
port = config.services.grafana.settings.server.http_port;
|
||||
}}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{config, ...}: {
|
||||
services.loki = {
|
||||
enable = true;
|
||||
configuration = {
|
||||
|
@ -25,10 +25,10 @@
|
|||
schema_config = {
|
||||
configs = [
|
||||
{
|
||||
from = "2022-06-06";
|
||||
store = "boltdb-shipper";
|
||||
from = "2022-06-06"; #TODO
|
||||
store = "tsdb";
|
||||
object_store = "filesystem";
|
||||
schema = "v12";
|
||||
schema = "v13";
|
||||
index = {
|
||||
prefix = "index_";
|
||||
period = "24h";
|
||||
|
@ -38,9 +38,9 @@
|
|||
};
|
||||
|
||||
storage_config = {
|
||||
boltdb_shipper = {
|
||||
active_index_directory = "/var/lib/loki/boltdb-shipper-active";
|
||||
cache_location = "/var/lib/loki/boltdb-shipper-cache";
|
||||
tsdb_shipper = {
|
||||
active_index_directory = "${config.services.loki.dataDir}/tsdb-shipper-active";
|
||||
cache_location = "${config.services.loki.dataDir}/tsdb-shipper-cache";
|
||||
cache_ttl = "24h";
|
||||
shared_store = "filesystem";
|
||||
};
|
||||
|
@ -65,7 +65,7 @@
|
|||
};
|
||||
|
||||
compactor = {
|
||||
working_directory = "/var/lib/loki";
|
||||
working_directory = config.services.loki.dataDir;
|
||||
shared_store = "filesystem";
|
||||
compactor_ring = {
|
||||
kvstore = {
|
||||
|
@ -74,6 +74,5 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
# user, group, dataDir, extraFlags, (configFile)
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
listenAddress = "127.0.0.1";
|
||||
port = 3021;
|
||||
enabledCollectors = ["systemd"];
|
||||
};
|
||||
|
@ -22,7 +23,7 @@
|
|||
{
|
||||
targets = let
|
||||
target = lib.formatHostPort {
|
||||
host = config.services.prometheus.exporters.node.listenAddr;
|
||||
host = config.services.prometheus.exporters.node.listenAddress;
|
||||
inherit (config.services.prometheus.exporters.node) port;
|
||||
};
|
||||
in [target];
|
||||
|
|
|
@ -37,6 +37,5 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
# extraFlags
|
||||
};
|
||||
}
|
||||
|
|
12
classes/headless/tailscale.nix
Normal file
12
classes/headless/tailscale.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
openFirewall = true; #TODO
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
checkReversePath = "loose";
|
||||
trustedInterfaces = ["tailscale0"];
|
||||
allowedUDPPorts = [config.services.tailscale.port];
|
||||
};
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{pkgs, ...}: {
|
||||
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
steam-hardware.enable = true;
|
||||
xone.enable = true;
|
||||
xpadneo.enable = true;
|
||||
opentabletdriver.enable = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = [
|
||||
pkgs.libvdpau-va-gl
|
||||
pkgs.vaapiVdpau
|
||||
];
|
||||
};
|
||||
graphics.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs.mullvad-vpn;
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue