@@ -200,13 +200,17 @@
|
|||||||
)
|
)
|
||||||
((pkgs.lib.filterAttrs (_: config: config.pkgs.system == system)) inputs.self.nixosConfigurations);
|
((pkgs.lib.filterAttrs (_: config: config.pkgs.system == system)) inputs.self.nixosConfigurations);
|
||||||
|
|
||||||
packages = pkgs.lib.mapAttrs' (n: pkgs.lib.nameValuePair "package-${n}") inputs.self.packages;
|
packages = pkgs.lib.mapAttrs' (
|
||||||
|
name: pkgs.lib.nameValuePair "package-${name}"
|
||||||
|
) inputs.self.packages.${system};
|
||||||
|
|
||||||
overlayPackages = pkgs.lib.mapAttrs' (n: pkgs.lib.nameValuePair "overlayPackage-${n}") (
|
overlayPackages = pkgs.lib.mapAttrs' (n: pkgs.lib.nameValuePair "overlayPackage-${n}") (
|
||||||
import ./overlays/packages.nix { inherit pkgs; }
|
import ./overlays/packages.nix { inherit pkgs; }
|
||||||
);
|
);
|
||||||
|
|
||||||
devShells = pkgs.lib.mapAttrs' (n: pkgs.lib.nameValuePair "devShell-${n}") inputs.self.devShells;
|
devShells = pkgs.lib.mapAttrs' (
|
||||||
|
name: pkgs.lib.nameValuePair "devShell-${name}"
|
||||||
|
) inputs.self.devShells.${system};
|
||||||
|
|
||||||
formatter.formatting = treefmt.config.build.check inputs.self;
|
formatter.formatting = treefmt.config.build.check inputs.self;
|
||||||
in
|
in
|
||||||
|
@@ -17,13 +17,13 @@ Remember to update [format.nix](format.nix).
|
|||||||
|
|
||||||
### Adding a new drive
|
### Adding a new drive
|
||||||
|
|
||||||
|
Create a `format.nix` containing the new disk layout. Do not include already existing disks in this file, nor the global pool.
|
||||||
|
|
||||||
```
|
```
|
||||||
parted /dev/sdd -- mklabel gpt
|
disko -m "destroy" --yes-wipe-all-disks format.nix
|
||||||
parted /dev/sdd -- mkpart primary 0% 100%
|
disko -m "format" --yes-wipe-all-disks format.nix
|
||||||
cryptsetup luksFormat /dev/sdd
|
|
||||||
cryptsetup open /dev/sdd storage2
|
|
||||||
btrfs device add /dev/mapper/storage2 /mnt/storage
|
btrfs device add /dev/mapper/storage2 /mnt/storage
|
||||||
btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/storage
|
btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/storage --bg
|
||||||
```
|
```
|
||||||
|
|
||||||
### Removing an old drive
|
### Removing an old drive
|
||||||
|
@@ -59,6 +59,8 @@
|
|||||||
main.keyFile = "/usb/keyfile";
|
main.keyFile = "/usb/keyfile";
|
||||||
storage0.keyFile = "/usb/keyfile";
|
storage0.keyFile = "/usb/keyfile";
|
||||||
storage1.keyFile = "/usb/keyfile";
|
storage1.keyFile = "/usb/keyfile";
|
||||||
|
storage2.keyFile = "/usb/keyfile";
|
||||||
|
storage3.keyFile = "/usb/keyfile";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.contents."/etc/fstab".text = ''
|
systemd.contents."/etc/fstab".text = ''
|
||||||
|
@@ -123,10 +123,66 @@
|
|||||||
settings = {
|
settings = {
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
storage2 = {
|
||||||
|
device = "/dev/disk/by-id/ata-TOSHIBA_MG11ACA24TE_7512A15XF6AL";
|
||||||
|
type = "disk";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
root = {
|
||||||
|
name = "root";
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
name = "storage2";
|
||||||
|
type = "luks";
|
||||||
|
passwordFile = "/tmp/keyfile";
|
||||||
|
settings = {
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
storage3 = {
|
||||||
|
device = "/dev/disk/by-id/ata-TOSHIBA_MG11ACA24TE_7512A192F6AL";
|
||||||
|
type = "disk";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
root = {
|
||||||
|
name = "root";
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
name = "storage3";
|
||||||
|
type = "luks";
|
||||||
|
passwordFile = "/tmp/keyfile";
|
||||||
|
settings = {
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
|
||||||
content = {
|
content = {
|
||||||
type = "btrfs";
|
type = "btrfs";
|
||||||
extraArgs = [ "-f -L storage -m raid1 -d raid1 /dev/mapper/storage0" ];
|
extraArgs = [
|
||||||
|
"-f"
|
||||||
|
"-L"
|
||||||
|
"storage"
|
||||||
|
"-m"
|
||||||
|
"raid1"
|
||||||
|
"-d"
|
||||||
|
"raid1"
|
||||||
|
"/dev/mapper/storage0"
|
||||||
|
"/dev/mapper/storage1"
|
||||||
|
"/dev/mapper/storage2"
|
||||||
|
# Implicit /dev/mapper/storage3
|
||||||
|
];
|
||||||
subvolumes =
|
subvolumes =
|
||||||
let
|
let
|
||||||
mountOptions = [
|
mountOptions = [
|
||||||
|
@@ -1218,7 +1218,6 @@
|
|||||||
"wideLayout": true
|
"wideLayout": true
|
||||||
},
|
},
|
||||||
"pluginVersion": "12.1.1",
|
"pluginVersion": "12.1.1",
|
||||||
"repeatDirection": "h",
|
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
@@ -3435,7 +3434,7 @@
|
|||||||
"h": 1,
|
"h": 1,
|
||||||
"w": 24,
|
"w": 24,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 76
|
"y": 73
|
||||||
},
|
},
|
||||||
"id": 65,
|
"id": 65,
|
||||||
"panels": [],
|
"panels": [],
|
||||||
@@ -3486,10 +3485,10 @@
|
|||||||
"h": 3,
|
"h": 3,
|
||||||
"w": 24,
|
"w": 24,
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": 73
|
"y": 74
|
||||||
},
|
},
|
||||||
"id": 66,
|
"id": 66,
|
||||||
"maxPerRow": 4,
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"colorMode": "value",
|
||||||
"graphMode": "none",
|
"graphMode": "none",
|
||||||
@@ -3555,6 +3554,7 @@
|
|||||||
"y": 77
|
"y": 77
|
||||||
},
|
},
|
||||||
"id": 70,
|
"id": 70,
|
||||||
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"colorMode": "value",
|
||||||
"graphMode": "none",
|
"graphMode": "none",
|
||||||
@@ -3625,6 +3625,7 @@
|
|||||||
"y": 80
|
"y": 80
|
||||||
},
|
},
|
||||||
"id": 69,
|
"id": 69,
|
||||||
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"colorMode": "value",
|
||||||
"graphMode": "none",
|
"graphMode": "none",
|
||||||
@@ -3686,6 +3687,7 @@
|
|||||||
"y": 83
|
"y": 83
|
||||||
},
|
},
|
||||||
"id": 68,
|
"id": 68,
|
||||||
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"colorMode": "value",
|
||||||
"graphMode": "none",
|
"graphMode": "none",
|
||||||
@@ -3747,6 +3749,7 @@
|
|||||||
"y": 86
|
"y": 86
|
||||||
},
|
},
|
||||||
"id": 67,
|
"id": 67,
|
||||||
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"colorMode": "value",
|
"colorMode": "value",
|
||||||
"graphMode": "none",
|
"graphMode": "none",
|
||||||
@@ -3889,7 +3892,7 @@
|
|||||||
"y": 90
|
"y": 90
|
||||||
},
|
},
|
||||||
"id": 58,
|
"id": 58,
|
||||||
"maxPerRow": 3,
|
"maxPerRow": 4,
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [],
|
"calcs": [],
|
||||||
@@ -3913,18 +3916,6 @@
|
|||||||
"legendFormat": "{{block_group_type}}",
|
"legendFormat": "{{block_group_type}}",
|
||||||
"range": true,
|
"range": true,
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
},
|
|
||||||
{
|
|
||||||
"datasource": {
|
|
||||||
"type": "prometheus",
|
|
||||||
"uid": "prometheus"
|
|
||||||
},
|
|
||||||
"editorMode": "code",
|
|
||||||
"expr": "min(node_btrfs_device_size_bytes{hostname=\"$hostname\", uuid=\"$btrfs_uuid\"})",
|
|
||||||
"hide": false,
|
|
||||||
"legendFormat": "total",
|
|
||||||
"range": true,
|
|
||||||
"refId": "B"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Storage Used ($btrfs_uuid)",
|
"title": "Storage Used ($btrfs_uuid)",
|
||||||
@@ -3994,7 +3985,7 @@
|
|||||||
"y": 98
|
"y": 98
|
||||||
},
|
},
|
||||||
"id": 59,
|
"id": 59,
|
||||||
"maxPerRow": 3,
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [],
|
"calcs": [],
|
||||||
@@ -4087,7 +4078,7 @@
|
|||||||
"y": 106
|
"y": 106
|
||||||
},
|
},
|
||||||
"id": 60,
|
"id": 60,
|
||||||
"maxPerRow": 4,
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [],
|
"calcs": [],
|
||||||
@@ -4206,6 +4197,7 @@
|
|||||||
"y": 115
|
"y": 115
|
||||||
},
|
},
|
||||||
"id": 62,
|
"id": 62,
|
||||||
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [],
|
"calcs": [],
|
||||||
@@ -4324,6 +4316,7 @@
|
|||||||
"y": 123
|
"y": 123
|
||||||
},
|
},
|
||||||
"id": 63,
|
"id": 63,
|
||||||
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [],
|
"calcs": [],
|
||||||
@@ -4429,6 +4422,7 @@
|
|||||||
"y": 131
|
"y": 131
|
||||||
},
|
},
|
||||||
"id": 64,
|
"id": 64,
|
||||||
|
"maxPerRow": 6,
|
||||||
"options": {
|
"options": {
|
||||||
"legend": {
|
"legend": {
|
||||||
"calcs": [],
|
"calcs": [],
|
||||||
@@ -4916,7 +4910,7 @@
|
|||||||
{
|
{
|
||||||
"allowCustomValue": false,
|
"allowCustomValue": false,
|
||||||
"current": {
|
"current": {
|
||||||
"text": ["All"],
|
"text": "All",
|
||||||
"value": ["$__all"]
|
"value": ["$__all"]
|
||||||
},
|
},
|
||||||
"definition": "label_values(node_cpu_seconds_total{hostname=\"$hostname\"},cpu)",
|
"definition": "label_values(node_cpu_seconds_total{hostname=\"$hostname\"},cpu)",
|
||||||
@@ -4956,43 +4950,6 @@
|
|||||||
"regex": ".*\\s([0-9]+)\\s.*",
|
"regex": ".*\\s([0-9]+)\\s.*",
|
||||||
"type": "query"
|
"type": "query"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"current": {
|
|
||||||
"text": "30",
|
|
||||||
"value": "30"
|
|
||||||
},
|
|
||||||
"hide": 2,
|
|
||||||
"label": "extra_watts",
|
|
||||||
"name": "extra_watts",
|
|
||||||
"options": [
|
|
||||||
{
|
|
||||||
"selected": true,
|
|
||||||
"text": "30",
|
|
||||||
"value": "30"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"query": "30",
|
|
||||||
"type": "custom"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allowCustomValue": false,
|
|
||||||
"current": {
|
|
||||||
"text": "0.2350",
|
|
||||||
"value": "0.2350"
|
|
||||||
},
|
|
||||||
"hide": 2,
|
|
||||||
"label": "energy_price",
|
|
||||||
"name": "energy_price",
|
|
||||||
"options": [
|
|
||||||
{
|
|
||||||
"selected": true,
|
|
||||||
"text": "0.2350",
|
|
||||||
"value": "0.2350"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"query": "0.2350",
|
|
||||||
"type": "custom"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"allowCustomValue": false,
|
"allowCustomValue": false,
|
||||||
"current": {
|
"current": {
|
||||||
@@ -5027,12 +4984,16 @@
|
|||||||
"text": [
|
"text": [
|
||||||
"5e8dfca5-4c6e-4265-8478-128a0ed4fe57",
|
"5e8dfca5-4c6e-4265-8478-128a0ed4fe57",
|
||||||
"601b8df9-94cc-4cf3-93e3-e978605bb3fe",
|
"601b8df9-94cc-4cf3-93e3-e978605bb3fe",
|
||||||
"a8e4ae38-f617-4dcb-9c13-863f71df2f9f"
|
"a8e4ae38-f617-4dcb-9c13-863f71df2f9f",
|
||||||
|
"1e44ec70-5783-4b76-852c-490e0254c9e7",
|
||||||
|
"64a29172-cdc6-43c5-b8cd-2ca44739a07b"
|
||||||
],
|
],
|
||||||
"value": [
|
"value": [
|
||||||
"5e8dfca5-4c6e-4265-8478-128a0ed4fe57",
|
"5e8dfca5-4c6e-4265-8478-128a0ed4fe57",
|
||||||
"601b8df9-94cc-4cf3-93e3-e978605bb3fe",
|
"601b8df9-94cc-4cf3-93e3-e978605bb3fe",
|
||||||
"a8e4ae38-f617-4dcb-9c13-863f71df2f9f"
|
"a8e4ae38-f617-4dcb-9c13-863f71df2f9f",
|
||||||
|
"1e44ec70-5783-4b76-852c-490e0254c9e7",
|
||||||
|
"64a29172-cdc6-43c5-b8cd-2ca44739a07b"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"definition": "label_values(node_btrfs_device_size_bytes,btrfs_dev_uuid)",
|
"definition": "label_values(node_btrfs_device_size_bytes,btrfs_dev_uuid)",
|
||||||
@@ -5054,8 +5015,8 @@
|
|||||||
{
|
{
|
||||||
"allowCustomValue": false,
|
"allowCustomValue": false,
|
||||||
"current": {
|
"current": {
|
||||||
"text": ["nvme0n1", "sda", "sdb", "sdc"],
|
"text": ["nvme0n1", "sda", "sdb", "sdc", "sdd", "sde"],
|
||||||
"value": ["nvme0n1", "sda", "sdb", "sdc"]
|
"value": ["nvme0n1", "sda", "sdb", "sdc", "sdd", "sde"]
|
||||||
},
|
},
|
||||||
"definition": "label_values(node_disk_info,device)",
|
"definition": "label_values(node_disk_info,device)",
|
||||||
"description": "",
|
"description": "",
|
||||||
@@ -5076,7 +5037,7 @@
|
|||||||
{
|
{
|
||||||
"allowCustomValue": false,
|
"allowCustomValue": false,
|
||||||
"current": {
|
"current": {
|
||||||
"text": ["All"],
|
"text": "All",
|
||||||
"value": ["$__all"]
|
"value": ["$__all"]
|
||||||
},
|
},
|
||||||
"definition": "label_values(smartctl_device,device)",
|
"definition": "label_values(smartctl_device,device)",
|
||||||
|
@@ -9,7 +9,7 @@ prev.tea.overrideAttrs (oldAttrs: {
|
|||||||
# fix: evaluate env login in repo context
|
# fix: evaluate env login in repo context
|
||||||
(builtins.fetchurl {
|
(builtins.fetchurl {
|
||||||
url = "https://gitea.com/gitea/tea/pulls/809.patch";
|
url = "https://gitea.com/gitea/tea/pulls/809.patch";
|
||||||
sha256 = "sha256:1f9cyizwmza6kg0r3q5d8h7vvph4wnh7kh3wvi5aqnbw100j7igg";
|
sha256 = "sha256:1mmsnzabcdy5lihs51kbx8r1vcr51rfj9a8gl5894jm7qvng7c5d";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user