Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions desktop/l/below.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# below.nix
#
# systemctl status below
#
{ config, pkgs, ... }:
{
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/monitoring/below.nix
services.below = {
enable = true;

# Enable all collection options
collect = {
diskStats = true; # Enable disk_stat collection (default: true)
ioStats = true; # Enable io.stat collection for cgroups
exitStats = true; # Enable eBPF-based exitstats (default: true)
};

# Enable data compression to save storage space
compression.enable = true;

# Retain data for 7 days (604800 seconds = 7 * 24 * 3600)
retention.time = 604800;
};
}
23 changes: 17 additions & 6 deletions desktop/l/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
./nginx.nix
./ollama-service.nix
./fan2go.nix
./below.nix
];

boot = {
Expand Down Expand Up @@ -188,12 +189,22 @@
};

services.openssh.enable = true;
programs.ssh.extraConfig = ''
Host hp4.home
PubkeyAcceptedKeyTypes ssh-ed25519
ServerAliveInterval 60
IPQoS throughput
'';
# programs.ssh.extraConfig = ''
# Host hp4.home
# PubkeyAcceptedKeyTypes ssh-ed25519
# ServerAliveInterval 60
# #IPQoS throughput

# # Optimizations for nfbQotom SSH sessions
# # Reduce GPU rendering load in terminals with these settings
# Host nfbQotom 172.16.40.184 172.16.40.185
# ControlMaster auto
# ControlPath ~/.ssh/master-%r@%h:%p
# ControlPersist 10m
# ServerAliveInterval 30
# ServerAliveCountMax 3
# Compression no
# '';

services.lldpd.enable = true;
services.timesyncd.enable = true;
Expand Down
12 changes: 6 additions & 6 deletions desktop/l/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion desktop/l/grafana.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
services.grafana = {
enable = true;
settings = {
security.admin_password = "admin"; # this is my local only instance
users.password_hint = "admin";
server = {
# Listening Address
http_addr = "0.0.0.0";
http_addr = "127.0.0.1";
# and Port
http_port = 3000;
# Grafana needs to know on which domain and URL it's running
Expand Down
26 changes: 14 additions & 12 deletions desktop/l/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@
# https://ghostty.zerebos.com/app/import-export
# no scorllback limit
# https://github.com/ghostty-org/ghostty/issues/111
xdg.configFile."ghostty/config.toml".text = ''
term = xterm-256color
scrollback-limit = 10000001
image-storage-limit = 320000001
clipboard-write = allow
window-subtitle = working-directory
background-opacity = 0.91
background-blur = 20
'';
# xdg.configFile."ghostty/config.toml".text = ''
# term = xterm-256color
# scrollback-limit = 10000001
# image-storage-limit = 320000001
# clipboard-write = allow
# window-subtitle = working-directory
# background-opacity = 0.91
# # Reduced blur from 20 to 5 for better SSH/remote terminal performance
# # GPU-accelerated blur can cause lag with rapid terminal output over SSH
# background-blur = 5
# '';

home = {
username = "das";
Expand Down Expand Up @@ -460,10 +462,10 @@
(flameshot.override { enableWlrSupport = true; })

# Custom onnxruntime package with ROCm support
onnxruntime
# onnxruntime

# Standard Python onnxruntime module (should work with custom C++ library)
python313Packages.onnxruntime
# python313Packages.onnxruntime
];

# vscode
Expand Down Expand Up @@ -500,7 +502,7 @@
jnoortheen.nix-ide
rust-lang.rust-analyzer
bazelbuild.vscode-bazel
continue.continue
#continue.continue # stopped working 2025/11/04
rooveterinaryinc.roo-cline
waderyan.gitblame
];
Expand Down
10 changes: 6 additions & 4 deletions desktop/l/nodeExporter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
enable = true;
port = 19000;
# https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/services/monitoring/prometheus/exporters.nix
enabledCollectors = [ "systemd" ];
enabledCollectors = [ "pressure" "diskstats" "filesystem" "meminfo" "vmstat" ];
# /nix/store/zgsw0yx18v10xa58psanfabmg95nl2bb-node_exporter-1.8.1/bin/node_exporter --help
extraFlags = [
"--collector.ethtool"
Expand All @@ -21,7 +21,9 @@
};

# https://search.nixos.org/options?channel=24.05&from=200&size=50&sort=relevance&type=packages&query=services.prometheus.exporters
services.prometheus.exporters.systemd.enable = true;
services.prometheus.exporters.smartctl.enable = true;
services.prometheus.exporters.process.enable = true;
services.prometheus.exporters = {
systemd.enable = true;
smartctl.enable = true;
process.enable = true;
};
}
91 changes: 46 additions & 45 deletions desktop/l/prometheus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,59 @@
services.prometheus = {
enable = true;
globalConfig.scrape_interval = "10s"; # "1m"
retentionTime = "90d";
scrapeConfigs = [
{
job_name = "node";
static_configs = [{
targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ];
}];
}
{
job_name = "xtcp";
static_configs = [{
targets = [ "localhost:9088" ];
}];
}
{
job_name = "hp1_xtcp";
static_configs = [{
targets = [ "hp1:9088" ];
}];
}
{
job_name = "clickhouse";
static_configs = [{
#targets = [ "localhost:9363" ];
targets = [ "localhost:19363" ];
}];
}
{
job_name = "hp1";
static_configs = [{
targets = [ "hp1:${toString config.services.prometheus.exporters.node.port}" ];
}];
}
{
job_name = "hp1_clickhouse";
static_configs = [{
#targets = [ "localhost:9363" ];
targets = [ "hp1:19363" ];
}];
}
{
job_name = "hp2";
static_configs = [{
targets = [ "hp2:${toString config.services.prometheus.exporters.node.port}" ];
}];
}
{
job_name = "hp2_clickhouse";
static_configs = [{
#targets = [ "localhost:9363" ];
targets = [ "hp2:19363" ];
}];
}
# {
# job_name = "xtcp";
# static_configs = [{
# targets = [ "localhost:9088" ];
# }];
# }
# {
# job_name = "hp1_xtcp";
# static_configs = [{
# targets = [ "hp1:9088" ];
# }];
# }
# {
# job_name = "clickhouse";
# static_configs = [{
# #targets = [ "localhost:9363" ];
# targets = [ "localhost:19363" ];
# }];
# }
# {
# job_name = "hp1";
# static_configs = [{
# targets = [ "hp1:${toString config.services.prometheus.exporters.node.port}" ];
# }];
# }
# {
# job_name = "hp1_clickhouse";
# static_configs = [{
# #targets = [ "localhost:9363" ];
# targets = [ "hp1:19363" ];
# }];
# }
# {
# job_name = "hp2";
# static_configs = [{
# targets = [ "hp2:${toString config.services.prometheus.exporters.node.port}" ];
# }];
# }
# {
# job_name = "hp2_clickhouse";
# static_configs = [{
# #targets = [ "localhost:9363" ];
# targets = [ "hp2:19363" ];
# }];
# }
#{
# job_name = "chromebox1";
# static_configs = [{
Expand Down
1 change: 1 addition & 0 deletions desktop/l/systemPackages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# $ nix search wget
environment.systemPackages = with pkgs; [
# Basic system tools
sysstat
psmisc
vim
curl
Expand Down
Loading