Compare commits

..

7 commits

6 changed files with 232 additions and 59 deletions

View file

@ -1,5 +1,21 @@
{ {
"nodes": { "nodes": {
"advisory-db": {
"flake": false,
"locked": {
"lastModified": 1697318478,
"narHash": "sha256-ZEDgHfurZiv9lBGTmHnQ0YECoi6H2NYs3pTo1VU1koQ=",
"owner": "rustsec",
"repo": "advisory-db",
"rev": "71d80e811f2e29a4b82d3e545ad6591e35227e03",
"type": "github"
},
"original": {
"owner": "rustsec",
"repo": "advisory-db",
"type": "github"
}
},
"agenix": { "agenix": {
"inputs": { "inputs": {
"darwin": "darwin", "darwin": "darwin",
@ -72,6 +88,27 @@
"type": "github" "type": "github"
} }
}, },
"crane": {
"inputs": {
"nixpkgs": [
"vrchat-prometheus-adapter",
"nixpkgs"
]
},
"locked": {
"lastModified": 1697811061,
"narHash": "sha256-NhSq9+Ya8vTqsKzHpSWNGYxto71VZ4THAx3hn6maoTs=",
"owner": "ipetkov",
"repo": "crane",
"rev": "6b229eec8adc685e2cb95f27ad59c22e82992f70",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -94,6 +131,30 @@
"type": "github" "type": "github"
} }
}, },
"fenix": {
"inputs": {
"nixpkgs": [
"vrchat-prometheus-adapter",
"nixpkgs"
],
"rust-analyzer-src": [
"vrchat-prometheus-adapter"
]
},
"locked": {
"lastModified": 1697782927,
"narHash": "sha256-OikLtn3e0kR5ztHJbLzS/5mUMadXfgRGKA1BDgcTa60=",
"owner": "nix-community",
"repo": "fenix",
"rev": "e5f13bd304140705f6aba0f121cee7775d861897",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -195,6 +256,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_4": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -223,11 +302,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1697611555, "lastModified": 1698392685,
"narHash": "sha256-8nYMduRQfGSQJr2cDMyodsuGlRcJAy0Ko8K4KkjurP8=", "narHash": "sha256-yx/sbRneR2AfSAeAMqUu0hoVJdjh+qhl/7dkirp8yo8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "05649393ac1f34980a5cf6a6e89de77626c9182b", "rev": "1369d2cefb6f128c30e42fabcdebbacc07e18b3f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -263,11 +342,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1697371715, "lastModified": 1697976504,
"narHash": "sha256-1ZV4qoL1B35DsciS/inC+z6vAwjxjWHL3+4G4QQhT0A=", "narHash": "sha256-sU8q83TEaafIe5d7L6Dc2alRhWT898aB0+6EXcfao1I=",
"owner": "nix-community", "owner": "nix-community",
"repo": "lib-aggregate", "repo": "lib-aggregate",
"rev": "af42578368ca0c97d5836ba55b146745911aaecc", "rev": "2e96d2f9d80f80bd22cd7c603985f2b03cf186fc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -283,11 +362,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1697418520, "lastModified": 1697679370,
"narHash": "sha256-UIwdw9Lw36GFgm7TFjOBdPHFKhbTSfLLT+4XxB39rh8=", "narHash": "sha256-E4iEs004owoShYK0MBDD6uRXCgZdxl//hYijvSakg0k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-eval-jobs", "repo": "nix-eval-jobs",
"rev": "bdf17c44b19325b5476703400cbafe64f7553fa6", "rev": "01a606e119963957eefaf1b22ef92b69b90f5b85",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -368,11 +447,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1697331025, "lastModified": 1697935651,
"narHash": "sha256-a5LJWWHfEvnq9tBd9UyNVdtzLXc2ehu5MCp//Bex/0E=", "narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "05c07c73de74725ec7efa6609011687035a92c0f", "rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -391,11 +470,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1697624213, "lastModified": 1698354843,
"narHash": "sha256-EmIp5EbuUlEgGxo0WMBIhzroNrKbnBSXshAcnfpOD2c=", "narHash": "sha256-eTsga6QxX9gVwC6zsUNs0UPyQX9hToVi5jSE0XUH42Y=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "e3b66242214443547b55727617c8fdb9ca68214c", "rev": "50c2725465ab035b232ef8ae9b976f4ac25c772b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -454,11 +533,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1697379843, "lastModified": 1698266953,
"narHash": "sha256-RcnGuJgC2K/UpTy+d32piEoBXq2M+nVFzM3ah/ZdJzg=", "narHash": "sha256-jf72t7pC8+8h8fUslUYbWTX5rKsRwOzRMX8jJsGqDXA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "12bdeb01ff9e2d3917e6a44037ed7df6e6c3df9d", "rev": "75a52265bda7fd25e06e3a67dee3f0354e73243c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -470,11 +549,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1697417052, "lastModified": 1697677194,
"narHash": "sha256-QyFpNZ28H0IoWhbGxD4j2h3aYwap2l2rSWyoFue95sM=", "narHash": "sha256-lN2eJCsOzjhxrvTQsNcW7r0E9hMJ7ABrKDQWpmYFRkM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "21f56f3209c0272852be7a704d9b21f2601c72e3", "rev": "18e505d654892d057f308c817d220faf962dbf23",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -499,6 +578,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": {
"locked": {
"lastModified": 1697730408,
"narHash": "sha256-Ww//zzukdTrwTrCUkaJA/NsaLEfUfQpWZXBdXBYfhak=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ff0a5a776b56e0ca32d47a4a47695452ec7f7d80",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
@ -509,7 +604,8 @@
"nixos-generators": "nixos-generators", "nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
"terranix": "terranix" "terranix": "terranix",
"vrchat-prometheus-adapter": "vrchat-prometheus-adapter"
} }
}, },
"systems": { "systems": {
@ -541,6 +637,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"terranix": { "terranix": {
"inputs": { "inputs": {
"bats-assert": "bats-assert", "bats-assert": "bats-assert",
@ -620,6 +731,29 @@
"repo": "treefmt-nix", "repo": "treefmt-nix",
"type": "github" "type": "github"
} }
},
"vrchat-prometheus-adapter": {
"inputs": {
"advisory-db": "advisory-db",
"crane": "crane",
"fenix": "fenix",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1698265247,
"narHash": "sha256-e8MyvjIUt8Yatqt93rlmQIuMSTJcsqFdfXZ/AwF7lCg=",
"ref": "master",
"rev": "012771f2fbb026dffac8b60a54d28a68ea82b83a",
"revCount": 13,
"type": "git",
"url": "https://git.gmem.ca/arch/vrchat-prometheus-adapter"
},
"original": {
"ref": "master",
"type": "git",
"url": "https://git.gmem.ca/arch/vrchat-prometheus-adapter"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -64,6 +64,12 @@
}; };
apps = nixinate.nixinate.x86_64-linux self // { apps = nixinate.nixinate.x86_64-linux self // {
x86_64-linux = { x86_64-linux = {
kube-diff = {
type = "app";
program = toString (pkgs.writers.writeBash "diff" ''
${pkgs.kubectl}/bin/kubectl diff -f ${self.packages.x86_64-linux.kubernetes}
'');
};
tf-plan = { tf-plan = {
type = "app"; type = "app";
program = toString (pkgs.writers.writeBash "plan" '' program = toString (pkgs.writers.writeBash "plan" ''

View file

@ -8,7 +8,6 @@
# Bootloader # Bootloader
boot = { boot = {
# supportedFilesystems = [ "bcachefs" ];
loader = { loader = {
grub = { grub = {
enable = true; enable = true;
@ -38,6 +37,7 @@
}; };
}; };
time.hardwareClockInLocalTime = true;
hardware.cpu.amd.updateMicrocode = true; hardware.cpu.amd.updateMicrocode = true;
nix = { nix = {
@ -108,12 +108,12 @@
overrideFolders = false; overrideFolders = false;
user = "gsimmer"; user = "gsimmer";
dataDir = "/home/gsimmer"; dataDir = "/home/gsimmer";
guiAddress = "100.95.77.62:8384"; guiAddress = "100.93.188.51:8384";
}; };
usbmuxd.enable = true; usbmuxd.enable = true;
prometheus.exporters.node = { prometheus.exporters.node = {
enable = true; enable = true;
listenAddress = "100.95.77.62"; listenAddress = "100.93.188.51";
enabledCollectors = [ enabledCollectors = [
"systemd" "processes" "systemd" "processes"
]; ];

View file

@ -10,13 +10,13 @@
overlays = overlays =
let let
discordOverlay = self: super: { discordOverlay = self: super: {
discord = super.discord.override { withOpenASAR = true; withVencord = true; }; discord = super.discord.override { };
}; };
in in
[ [
(import (builtins.fetchTarball { (import (builtins.fetchTarball {
url = "https://github.com/nix-community/emacs-overlay/archive/master.tar.gz"; url = "https://github.com/nix-community/emacs-overlay/archive/master.tar.gz";
sha256 = "0vhw5cl26p64j660nwil1dgs3js4pzdjh29ch2gl1yn8gbacz5xd"; sha256 = "0lqk8xl3bpwmfdv8p9147rag1jxa8r0k8sibhyrvsnyp3q5lvxdx";
})) discordOverlay]; })) discordOverlay];
}; };
home = { home = {
@ -24,6 +24,18 @@
homeDirectory = "/home/gsimmer"; homeDirectory = "/home/gsimmer";
}; };
services.pueue = {
enable = true;
settings = {
client = { };
daemon.callback = ''
${pkgs.libnotify}/bin/notify-send -t 4000 "Task {{id}} finished, status '{{result}}'" "<b>{{exit_code}}</b> {{command}}"
'';
shared = { };
profiles = { };
};
};
programs = { programs = {
bash.enable = false; bash.enable = false;
fish = { fish = {
@ -558,7 +570,6 @@ $env.config = {
jre8 jre8
parsec-bin parsec-bin
nodejs nodejs
telegram-desktop
atuin atuin
age-plugin-yubikey age-plugin-yubikey
rage rage

View file

@ -198,22 +198,39 @@
} ]; } ];
} ]; } ];
rules = [(builtins.toJSON { rules = [(builtins.toJSON {
groups = [{ groups = [
name = "healthchecks"; {
rules = [ name = "internet_connection";
{ rules = [
alert = "HealthcheckFailedCheckin"; {
expr = ''hc_check_up < 1''; alert = "LowInternetDownload";
for = "5m"; expr = ''speedtest_download_bits_per_second{} < 500000000'';
labels.severity = "page"; for = "2h";
annotations = { labels.severity = "page";
summary = "{{ $labels.name }} healthcheck failed"; annotations = {
description = "The {{ $labels.name }} healthcheck failed to check in."; summary = "Internet speed low";
dashboard = "f594ea85-45f2-4019-b988-2d17638b5cf3"; description = "Home internet speed dropped below 500Mb/s.";
}; dashboard = "o9mIe_Aik";
} };
]; }
}]; ];
}
{
name = "healthchecks";
rules = [
{
alert = "HealthcheckFailedCheckin";
expr = ''hc_check_up < 1'';
for = "5m";
labels.severity = "page";
annotations = {
summary = "{{ $labels.name }} healthcheck failed";
description = "The {{ $labels.name }} healthcheck failed to check in.";
dashboard = "f594ea85-45f2-4019-b988-2d17638b5cf3";
};
}
];
}];
})]; })];
alertmanager = { alertmanager = {
enable = true; enable = true;
@ -272,6 +289,11 @@
metrics_path = "/projects/5f1de50f-a52d-4215-961f-aae7cc6cf6c9/metrics/TbMoU7SUdknzMe-H5Q4HzmKl3itOIrJk"; metrics_path = "/projects/5f1de50f-a52d-4215-961f-aae7cc6cf6c9/metrics/TbMoU7SUdknzMe-H5Q4HzmKl3itOIrJk";
static_configs = [ { targets = [ "localhost:8000" ]; } ]; static_configs = [ { targets = [ "localhost:8000" ]; } ];
} }
{
job_name = "vrc_events";
scrape_interval = "60s";
static_configs = [ { targets = [ "vancouver:6534" ]; } ];
}
{ {
job_name = "blackbox"; job_name = "blackbox";
metrics_path = "/probe"; metrics_path = "/probe";

View file

@ -343,7 +343,7 @@
client_max_body_size 100M; client_max_body_size 100M;
''; '';
proxyPass = "http://192.168.50.187:3000/"; proxyPass = "http://192.168.122.185:3000/";
}; };
}; };
}; };
@ -450,22 +450,22 @@
trustedInterfaces = ["tailscale0" "virbr0"]; trustedInterfaces = ["tailscale0" "virbr0"];
checkReversePath = "loose"; checkReversePath = "loose";
enable = true; enable = true;
allowedTCPPorts = [ 22 53 80 443 2049 4328 5432 9100 22000 ]; allowedTCPPorts = [ 22 53 80 443 2049 4328 5432 9100 22000 5201 ];
allowedUDPPorts = [ 53 41641 22000 21027 ]; allowedUDPPorts = [ 53 41641 22000 21027 ];
}; };
useDHCP = false; # useDHCP = false;
bridges = { # bridges = {
"br0" = { # "br0" = {
interfaces = [ "eno1" ]; # interfaces = [ "eno1" ];
}; # };
}; # };
interfaces.br0.ipv4.addresses = [ # interfaces.br0.ipv4.addresses = [
{ # {
address = "192.168.50.229"; # address = "192.168.50.229";
prefixLength = 24; # prefixLength = 24;
} # }
]; # ];
defaultGateway = "192.168.50.1"; # defaultGateway = "192.168.50.1";
nameservers = ["45.90.28.116" "45.90.30.116"]; nameservers = ["45.90.28.116" "45.90.30.116"];
nftables.enable = true; nftables.enable = true;
}; };