Skip to content

Commit 4757330

Browse files
committed
format
1 parent 6e2509e commit 4757330

22 files changed

Lines changed: 3367 additions & 3210 deletions

File tree

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,33 @@ nix flake update
1313
```
1414

1515
### VM Tests
16-
There are some VM tests in `checks/` testing some critical services. You can run them like this:
16+
17+
There are some VM tests in `checks/` testing some critical services. You can run
18+
them like this:
19+
1720
```bash
1821
nix build .#checks.x86_64-linux.<check-name>
1922
```
2023

21-
Note: `nix flake check` cannot be used as currently the repo is unformatted (formatter check is inherited from flakelight)
24+
Note: `nix flake check` cannot be used as currently the repo is unformatted
25+
(formatter check is inherited from flakelight)
2226

2327
### Rolling back
2428

25-
Use the `rollback` script on any machine provisioned by this repo to revert to a previous version.
29+
Use the `rollback` script on any machine provisioned by this repo to revert to a
30+
previous version.
2631

2732
### Secrets
2833

29-
* Manage secrets
34+
- Manage secrets
35+
3036
```
3137
lib/pass.h
3238
```
3339

34-
* Add new keys in `secrets/.public-keys`
40+
- Add new keys in `secrets/.public-keys`
3541

3642
### ToDo
37-
* give routing tables names that can be read by humans
38-
* schedule DSL reconnect
43+
44+
- give routing tables names that can be read by humans
45+
- schedule DSL reconnect

flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
pkgs.alejandra
2424
pkgs.git
2525
pkgs.colmena
26-
# pkgs.prometheus-snmp-exporter
26+
# pkgs.prometheus-snmp-exporter
2727
];
2828
env.DIRENV_LOG_FORMAT = "";
2929
};
@@ -53,8 +53,8 @@
5353
router = { ... }: {
5454
deployment.targetHost = "router.xhain.space";
5555
imports = [
56-
kea-lease-viewer.nixosModules.default
57-
] ;
56+
kea-lease-viewer.nixosModules.default
57+
];
5858
};
5959

6060
files = { ... }: {

hosts/files/configuration.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
virtualHosts."files.xhain.space" = {
2929
root = "/media/storage";
3030
extraConfig = ''
31-
autoindex on;
31+
autoindex on;
3232
'';
3333
};
3434
};
@@ -45,7 +45,7 @@
4545
openFirewall = true;
4646
securityType = "user";
4747

48-
settings.global = {
48+
settings.global = {
4949
"server string" = "Files";
5050
"map to guest" = "Bad User";
5151
"passdb backend" = "tdbsam";

hosts/router/dhcp.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ in
114114
hooks-libraries = [
115115
{
116116
library = "${pkgs.kea}/lib/kea/hooks/libdhcp_lease_cmds.so";
117-
parameters = {};
117+
parameters = { };
118118
}
119119
];
120120

@@ -184,7 +184,7 @@ in
184184
keaSocketPath = controlSocket;
185185
};
186186

187-
services.nginx.virtualHosts.${config.networking.hostName + "." + config.networking.domain} = {
187+
services.nginx.virtualHosts.${config.networking.hostName + "." + config.networking.domain} = {
188188
locations."/leases" = {
189189
recommendedProxySettings = true;
190190
proxyPass = "http://${config.services.kea-lease-viewer.listenAddress}:${toString config.services.kea-lease-viewer.port}/";

hosts/router/dns.nix

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ in
2929
before = [ "bind.service" ];
3030
wantedBy = [ "bind.service" ];
3131
script = ''
32-
mkdir -p /var/lib/bind
33-
chown named /var/lib/bind
34-
${concatStrings (
35-
map (zone: ''
36-
if [[ ! -f /var/lib/bind/${zone}zone ]]; then
37-
cp "${templateFile}" "/var/lib/bind/${zone}zone"
38-
fi
39-
chmod 0644 "/var/lib/bind/${zone}zone"
40-
chown named "/var/lib/bind/${zone}zone"
41-
'') dynamicZones
42-
)}
43-
'';
32+
mkdir -p /var/lib/bind
33+
chown named /var/lib/bind
34+
${concatStrings (
35+
map (zone: ''
36+
if [[ ! -f /var/lib/bind/${zone}zone ]]; then
37+
cp "${templateFile}" "/var/lib/bind/${zone}zone"
38+
fi
39+
chmod 0644 "/var/lib/bind/${zone}zone"
40+
chown named "/var/lib/bind/${zone}zone"
41+
'') dynamicZones
42+
)}
43+
'';
4444
serviceConfig = {
4545
Type = "oneshot";
4646
User = "root";

hosts/router/local_modules/prometheus/blackbox-exporter.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
32
modules:
43
icmp:
54
prober: icmp
@@ -13,7 +12,7 @@ modules:
1312
timeout: 3s
1413
tcp:
1514
query_response:
16-
- expect: "^SSH-2.0-"
15+
- expect: "^SSH-2.0-"
1716

1817
https:
1918
prober: http

hosts/router/local_modules/prometheus/blackbox.nix

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
configFile = "${ ./blackbox-exporter.yml }";
88
};
99

10-
services.nginx.virtualHosts.${config.networking.hostName + "." + config.networking.domain} = let
11-
addr = config.services.prometheus.exporters.blackbox.listenAddress;
12-
port = toString config.services.prometheus.exporters.blackbox.port;
13-
in {
14-
locations."/blackbox-exporter/metrics".proxyPass = "http://${addr}:${port}/metrics";
15-
locations."/blackbox-exporter/probe".proxyPass = "http://${addr}:${port}/probe";
16-
};
10+
services.nginx.virtualHosts.${config.networking.hostName + "." + config.networking.domain} =
11+
let
12+
addr = config.services.prometheus.exporters.blackbox.listenAddress;
13+
port = toString config.services.prometheus.exporters.blackbox.port;
14+
in
15+
{
16+
locations."/blackbox-exporter/metrics".proxyPass = "http://${addr}:${port}/metrics";
17+
locations."/blackbox-exporter/probe".proxyPass = "http://${addr}:${port}/probe";
18+
};
1719
}

0 commit comments

Comments
 (0)