Skip to content

Commit e1d0e64

Browse files
committed
Merge branch 'master' into release
2 parents efb6616 + 4dabc8e commit e1d0e64

File tree

19 files changed

+83
-108
lines changed

19 files changed

+83
-108
lines changed

flake.lock

Lines changed: 3 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
inputs = {
33
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
4-
nixpkgs-2311.url = "github:NixOS/nixpkgs/nixos-23.11";
54

65
# naersk and flake utils are not used by this flake directly, but needed
76
# for the follows in all the other ones.
@@ -121,7 +120,6 @@
121120
, kindergarten
122121
, microvm
123122
, nixpkgs
124-
, nixpkgs-2311
125123
, sops-nix
126124
, lizard
127125
, bureaucrat

hardware/tetra-zw.nix

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,15 @@
4545
hardware.cpu.amd.updateMicrocode =
4646
lib.mkDefault config.hardware.enableRedistributableFirmware;
4747

48-
# Enable OpenCL
49-
hardware.opengl = {
48+
# Enable OpenGL/OpenCL
49+
hardware.graphics = {
5050
enable = true;
51-
driSupport32Bit = true;
51+
enable32Bit = true;
5252
extraPackages = with pkgs; [
5353
rocmPackages.clr.icd
5454
rocmPackages.clr
5555
rocmPackages.rocminfo
5656
rocmPackages.rocm-runtime
57-
#rocm-opencl-icd
5857
rocmPackages.rocm-smi
5958
];
6059
};

hosts/data-hoarder/configuration.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ in
5151
dns = [ "172.20.73.8" "9.9.9.9" ];
5252
routes = [
5353
{
54-
routeConfig = {
55-
Gateway = "172.20.73.1";
56-
Destination = "0.0.0.0/0";
57-
};
54+
Gateway = "172.20.73.1";
55+
Destination = "0.0.0.0/0";
5856
}
5957
];
6058
};

hosts/notice-me-senpai/default.nix

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let
88
in
99
{
1010
imports = [
11-
#./grafana.nix
11+
./grafana.nix
1212
];
1313
microvm = {
1414
vcpu = 4;
@@ -65,11 +65,9 @@ in
6565
dns = [ "1.1.1.1" ];
6666
routes = [
6767
{
68-
routeConfig = {
69-
Gateway = "45.158.40.160";
70-
GatewayOnLink = true;
71-
Destination = "0.0.0.0/0";
72-
};
68+
Gateway = "45.158.40.160";
69+
GatewayOnLink = true;
70+
Destination = "0.0.0.0/0";
7371
}
7472
];
7573
};

hosts/notice-me-senpai/grafana.nix

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ in
3232
wgHosts = lib.filterAttrs filterWgHosts self.nixosConfigurations;
3333

3434
# collect active prometheus exporters
35-
filterEnabledExporters = name: host: lib.filterAttrs (k: v: (builtins.isAttrs v) && v.enable == true) host.config.services.prometheus.exporters;
35+
# First we check that the config section actually evalutes, since it is common practice to assert on evaluating a section if this is a removed option.
36+
filterSuccessfulEvalExporters = host: lib.filterAttrs (k: v: (builtins.tryEval host.config.services.prometheus.exporters.${k}).success) host.config.services.prometheus.exporters;
37+
# Then we filter on the enabled exporters
38+
filterEnabledExporters = name: host: lib.filterAttrs (k: v: (builtins.isAttrs v) && v.enable == true) (filterSuccessfulEvalExporters host);
3639
enabledExporters = lib.mapAttrs filterEnabledExporters wgHosts;
3740

3841
# turns exporter config into scraper config
@@ -122,28 +125,46 @@ in
122125
max_chunk_age = "1h";
123126
chunk_target_size = 1048576;
124127
chunk_retain_period = "30s";
125-
max_transfer_retries = 0;
128+
wal = {
129+
enabled = true;
130+
};
126131
};
127132

128133
schema_config = {
129-
configs = [{
130-
from = "2022-05-05";
131-
store = "boltdb-shipper";
132-
object_store = "filesystem";
133-
schema = "v11";
134-
index = {
135-
prefix = "index_";
136-
period = "24h";
137-
};
138-
}];
134+
configs = [
135+
{
136+
from = "2022-05-05";
137+
store = "boltdb-shipper";
138+
object_store = "filesystem";
139+
schema = "v11";
140+
index = {
141+
prefix = "index_";
142+
period = "24h";
143+
};
144+
}
145+
{
146+
from = "2024-12-29";
147+
store = "tsdb";
148+
object_store = "filesystem";
149+
schema = "v13";
150+
index = {
151+
prefix = "index_";
152+
period = "24h";
153+
};
154+
}
155+
];
139156
};
140157

141158
storage_config = {
142159
boltdb_shipper = {
143160
active_index_directory = "/var/lib/loki/boltdb-shipper-active";
144161
cache_location = "/var/lib/loki/boltdb-shipper-cache";
145162
cache_ttl = "48h";
146-
shared_store = "filesystem";
163+
};
164+
tsdb_shipper = {
165+
active_index_directory = "/var/lib/loki/tsdb-shipper-active";
166+
cache_location = "/var/lib/loki/tsdb-shipper-cache";
167+
cache_ttl = "48h";
147168
};
148169
filesystem = {
149170
directory = "/var/lib/loki/chunks";
@@ -155,10 +176,6 @@ in
155176
reject_old_samples_max_age = "168h";
156177
};
157178

158-
chunk_store_config = {
159-
max_look_back_period = "0s";
160-
};
161-
162179
table_manager = {
163180
retention_deletes_enabled = true;
164181
retention_period = "720h";
@@ -168,8 +185,8 @@ in
168185
working_directory = "/var/lib/loki";
169186
compaction_interval = "10m";
170187
retention_enabled = true;
188+
delete_request_store = "filesystem";
171189
retention_delete_delay = "1m";
172-
shared_store = "filesystem";
173190
compactor_ring = {
174191
kvstore = {
175192
store = "inmemory";

hosts/staging-data-hoarder/configuration.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@ in
5858
dns = [ "172.20.73.8" "9.9.9.9" ];
5959
routes = [
6060
{
61-
routeConfig = {
62-
Gateway = "172.20.73.1";
63-
GatewayOnLink = true;
64-
Destination = "0.0.0.0/0";
65-
};
61+
Gateway = "172.20.73.1";
62+
GatewayOnLink = true;
63+
Destination = "0.0.0.0/0";
6664
}
6765
];
6866
};

hosts/traffic-stop-box/4/default.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ let eth = "enp1s0"; in
1515
dns = [ "141.30.1.1" "9.9.9.9" ];
1616
routes = [
1717
{
18-
routeConfig = {
19-
Gateway = "141.30.30.129";
20-
Destination = "0.0.0.0/0";
21-
};
18+
Gateway = "141.30.30.129";
19+
Destination = "0.0.0.0/0";
2220
}
2321
];
2422
};

hosts/tram-borzoi/default.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ in
6666
dns = [ "172.20.73.8" "9.9.9.9" ];
6767
routes = [
6868
{
69-
routeConfig = {
70-
Gateway = "172.20.73.1";
71-
GatewayOnLink = true;
72-
Destination = "0.0.0.0/0";
73-
};
69+
Gateway = "172.20.73.1";
70+
GatewayOnLink = true;
71+
Destination = "0.0.0.0/0";
7472
}
7573
];
7674
};

hosts/tram-borzoi/postgres.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
owner = config.users.users.postgres.name;
1010
};
1111
services.postgresql = {
12-
inherit (registry.postgres) port;
12+
settings.port = registry.postgres.port;
1313
enable = true;
1414
enableTCPIP = true;
1515
authentication =

hosts/uranus/default.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ in
99
{
1010
imports = [
1111
./stateful-jupyter.nix
12-
./stateless-jupyter.nix
1312
];
1413

1514
microvm = {
@@ -70,11 +69,9 @@ in
7069
dns = [ "172.20.73.8" "9.9.9.9" ];
7170
routes = [
7271
{
73-
routeConfig = {
74-
Gateway = "172.20.73.1";
75-
GatewayOnLink = true;
76-
Destination = "0.0.0.0/0";
77-
};
72+
Gateway = "172.20.73.1";
73+
GatewayOnLink = true;
74+
Destination = "0.0.0.0/0";
7875
}
7976
];
8077
};
@@ -86,7 +83,7 @@ in
8683

8784
};
8885

89-
networking.firewall.allowedTCPPorts = [ 80 443 8080 22 ];
86+
networking.firewall.allowedTCPPorts = [ 8080 ];
9087

9188
users.motd = lib.mkForce (builtins.readFile ./motd.txt);
9289

hosts/uranus/stateful-jupyter.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ in
3030

3131
virtualisation.docker = {
3232
enable = true;
33-
# magic from marenz to make it work on ceph
34-
storageDriver = "devicemapper";
35-
extraOptions = "--storage-opt dm.basesize=40G --storage-opt dm.fs=xfs";
33+
# automatic selection by docker
34+
storageDriver = null;
3635
};
37-
#systemd.enableUnifiedCgroupHierarchy = false;
3836

3937
# user to run the thing
4038
# jupyterlab container
@@ -53,6 +51,7 @@ in
5351
let
5452
packages = lib.concatStringsSep " " [
5553
# alphabetically `:sort`ed plz
54+
"bitstring"
5655
"geojson"
5756
"matplotlib"
5857
"numpy"
@@ -61,7 +60,6 @@ in
6160
"psycopg"
6261
"scipy"
6362
"seaborn"
64-
"bitstring"
6563
];
6664
in
6765
(import ./jupyter-container.nix {

hosts/uranus/stateless-jupyter.nix

Lines changed: 0 additions & 2 deletions
This file was deleted.

keys/ssh/oxa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHv82n6F6kwJ3/EMYlOoCc1/NaYFW7QHC5F8jKVzdlio gshipunov@toaster
1+
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJl9iYG5oHBq/poBn7Jf1/FGWWbAnbx+NKjs7qtT3uAK 0xa@toaster 2024-12-31

modules/TLMS/base.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ let
2020
in
2121
{
2222
nix = {
23-
package = pkgs.nixVersions.latest;
2423
extraOptions = ''
2524
'';
2625
settings = {

modules/TLMS/default.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
./base.nix
55
./binary-cache.nix
66
./general-options.nix
7+
./monitoring.nix
78
./net.nix
9+
./nginx.nix
810
./wg.nix
9-
./monitoring.nix
1011
];
1112
}

modules/data-hoarder/nginx.nix renamed to modules/TLMS/nginx.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ ... }:
1+
{ config, ... }:
22
let
33
headers = ''
44
# Permissions Policy - gps only
@@ -22,7 +22,8 @@ let
2222
'';
2323
in
2424
{
25-
networking.firewall.allowedTCPPorts = [ 80 443 ];
25+
# Open firewall HTTP and HTTPS if nginx is enabled
26+
networking.firewall.allowedTCPPorts = if config.services.nginx.enable then [ 80 443 ] else [];
2627

2728
security.acme.acceptTerms = true;
2829
security.acme.defaults.email = "TLMS@protonmail.com";

0 commit comments

Comments
 (0)