Compare commits
32 Commits
f46265e98a
...
local-test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4ef6381a0 | ||
|
|
c416f27c81 | ||
|
|
0d61107515 | ||
| d8d910f5fd | |||
| a4f6b77e30 | |||
| 6aa6f2e171 | |||
| d9bb933891 | |||
| 168d45ed8a | |||
| 2f477d3566 | |||
| b40cb40b01 | |||
| b15b2ae789 | |||
| c7b02b9366 | |||
| c78eb9cbc1 | |||
| 429be2c7b9 | |||
| a12ad8db31 | |||
| ea99bbde25 | |||
| 8e8ddb1435 | |||
| 50a506d1c2 | |||
| 3bc69085b3 | |||
| 3b6107c13d | |||
| aaf1e280fc | |||
| c6c7fe5a57 | |||
| 60221f474c | |||
| 9b526906c0 | |||
| 642bb8ba64 | |||
| 727f771c4f | |||
| 468c3d63f9 | |||
| f0e7fef90e | |||
| 5d2bb40028 | |||
|
|
a5d6cd6455 | ||
|
|
f44adbc815 | ||
|
|
63f2ca5b3c |
@@ -11,6 +11,9 @@
|
||||
- [Website](./server/website.md)
|
||||
- [musik](./projekte/musik.md)
|
||||
- [TODO](./todo.md)
|
||||
- [Modules]()
|
||||
- [Initrd-ssh](./module/initssh.md)
|
||||
- [Disks](./module/disks.md)
|
||||
- [How-to]()
|
||||
- [Create New Host](./anleitung/create.md)
|
||||
- [Sops](./anleitung/sops.md)
|
||||
|
||||
@@ -44,6 +44,9 @@ sudo mkdir -p /var/lib/microvms/durruti/{var,etc}
|
||||
# alternatively u can run the vm in interactive mode (maybe stop the microvm@durruti.service first)
|
||||
microvm -r durruti
|
||||
|
||||
#if you get an error like "Error booting VM: VmBoot(DeviceManager(CreateVirtioFs(VhostUserConnect)))", try starting the virtio service manually
|
||||
sudo systemctl start microvm-virtiofsd@{host}.service
|
||||
|
||||
# after u made changes to the microvm update and restart the vm
|
||||
microvm -uR durruti
|
||||
|
||||
|
||||
@@ -22,4 +22,14 @@
|
||||
|
||||
- Write `- *admin_$USER` under the apropriate `key_grups:` of the secrets the user should have access to
|
||||
|
||||
- `cd machines/` and reencrypt existing secrets for the new key with `sops updatekeys $path/to/secrets.yaml`
|
||||
- `cd machines/` and reencrypt existing secrets for the new key with `sops updatekeys $path/to/secrets.yaml`
|
||||
|
||||
## How to add host keys
|
||||
If a new host is created we have to add its age keys to the sops config.
|
||||
Do the following:
|
||||
```bash
|
||||
# ssh into the host and run:
|
||||
nix-shell -p ssh-to-age --run 'cat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age'
|
||||
# create new host with the output of that command in /machines/.sops.yaml
|
||||
```
|
||||
|
||||
|
||||
117
doc/src/module/disks.md
Normal file
117
doc/src/module/disks.md
Normal file
@@ -0,0 +1,117 @@
|
||||
# Disks
|
||||
The disks module can be used by importing `inputs.self.nixosModules.malobeo.disko`
|
||||
|
||||
|
||||
#### `let cfg = malobeo.disks`
|
||||
|
||||
#### `cfg.enable` (bool)
|
||||
- **Type:** `bool`
|
||||
- **Default:** `false`
|
||||
- **Description:**
|
||||
Enables the disk creation process using the `disko` tool. Set to `true` to initialize disk setup.
|
||||
|
||||
#### `cfg.hostId` (string)
|
||||
- **Type:** `string`
|
||||
- **Default:** `""`
|
||||
- **Description:**
|
||||
The host ID used for ZFS disks. This ID should be generated using a command like `head -c4 /dev/urandom | od -A none -t x4`.
|
||||
|
||||
#### `cfg.encryption` (bool)
|
||||
- **Type:** `bool`
|
||||
- **Default:** `true`
|
||||
- **Description:**
|
||||
Determines if encryption should be enabled. Set to `false` to disable encryption for testing purposes.
|
||||
|
||||
#### `cfg.devNodes` (string)
|
||||
- **Type:** `string`
|
||||
- **Default:** `"/dev/disk/by-id/"`
|
||||
- **Description:**
|
||||
Specifies where the disks should be mounted from.
|
||||
- Use `/dev/disk/by-id/` for general systems.
|
||||
- Use `/dev/disk/by-path/` for VMs.
|
||||
- For more information on disk name conventions, see [OpenZFS FAQ](https://openzfs.github.io/openzfs-docs/Project%20and%20Community/FAQ.html#selecting-dev-names-when-creating-a-pool-linux).
|
||||
|
||||
#### `let cfg = malobeo.disks.root`
|
||||
#### `cfg.disk0` (string)
|
||||
- **Type:** `string`
|
||||
- **Default:** `""`
|
||||
- **Description:**
|
||||
The device name (beginning after `/dev/` e.g., `sda`) for the root filesystem.
|
||||
|
||||
#### `cfg.disk1` (string)
|
||||
- **Type:** `string`
|
||||
- **Default:** `""`
|
||||
- **Description:**
|
||||
The device name (beginning after `/dev/` e.g., `sdb`) for the optional mirror disk of the root filesystem.
|
||||
|
||||
#### `cfg.swap` (string)
|
||||
- **Type:** `string`
|
||||
- **Default:** `"8G"`
|
||||
- **Description:**
|
||||
Size of the swap partition on `disk0`. This is applicable only for the root disk configuration.
|
||||
|
||||
#### `cfg.reservation` (string)
|
||||
- **Type:** `string`
|
||||
- **Default:** `"20GiB"`
|
||||
- **Description:**
|
||||
The ZFS reservation size for the root pool.
|
||||
|
||||
#### `cfg.mirror` (bool)
|
||||
- **Type:** `bool`
|
||||
- **Default:** `false`
|
||||
- **Description:**
|
||||
Whether to configure a mirrored ZFS root pool. Set to `true` to mirror the root filesystem across `disk0` and `disk1`.
|
||||
|
||||
#### `let cfg = malobeo.disks.storage`
|
||||
#### `cfg.enable` (bool)
|
||||
- **Type:** `bool`
|
||||
- **Default:** `false`
|
||||
- **Description:**
|
||||
Enables the creation of an additional storage pool. Set to `true` to create the storage pool.
|
||||
|
||||
#### `cfg.disks` (list of strings)
|
||||
- **Type:** `listOf string`
|
||||
- **Default:** `[]`
|
||||
- **Description:**
|
||||
A list of device names without /dev/ prefix (e.g., `sda`, `sdb`) to include in the storage pool.
|
||||
Example: `["disks/by-id/ata-ST16000NE000-2RW103_ZL2P0YSZ"]`.
|
||||
|
||||
#### `cfg.reservation` (string)
|
||||
- **Type:** `string`
|
||||
- **Default:** `"20GiB"`
|
||||
- **Description:**
|
||||
The ZFS reservation size for the storage pool.
|
||||
|
||||
#### `cfg.mirror` (bool)
|
||||
- **Type:** `bool`
|
||||
- **Default:** `false`
|
||||
- **Description:**
|
||||
Whether to configure a mirrored ZFS storage pool. Set to `true` to mirror the storage pool.
|
||||
|
||||
## Example Configuration
|
||||
|
||||
```nix
|
||||
{
|
||||
options.malobeo.disks = {
|
||||
enable = true;
|
||||
hostId = "abcdef01";
|
||||
encryption = true;
|
||||
devNodes = "/dev/disk/by-id/";
|
||||
|
||||
root = {
|
||||
disk0 = "sda";
|
||||
disk1 = "sdb";
|
||||
swap = "8G";
|
||||
reservation = "40GiB";
|
||||
mirror = true;
|
||||
};
|
||||
|
||||
storage = {
|
||||
enable = true;
|
||||
disks = [ "sdc" "sdd" "disks/by-uuid/sde" ];
|
||||
reservation = "100GiB";
|
||||
mirror = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
29
doc/src/module/initssh.md
Normal file
29
doc/src/module/initssh.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Initrd-ssh
|
||||
The initssh module can be used by importing `inputs.self.nixosModules.malobeo.initssh`
|
||||
|
||||
#### `let cfg = malobeo.initssh`
|
||||
|
||||
## cfg.enable
|
||||
Enable the initssh module
|
||||
|
||||
*Default*
|
||||
false
|
||||
|
||||
|
||||
## cfg.authorizedKeys
|
||||
Authorized keys for the initrd ssh
|
||||
|
||||
*Default*
|
||||
`[ ]`
|
||||
|
||||
|
||||
## cfg.ethernetDrivers
|
||||
|
||||
Ethernet drivers to load in the initrd.
|
||||
Run ` lspci -k | grep -iA4 ethernet `
|
||||
|
||||
*Default:*
|
||||
` [ ] `
|
||||
|
||||
*Example:*
|
||||
`[ "r8169" ]`
|
||||
8
flake.lock
generated
8
flake.lock
generated
@@ -341,11 +341,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729717517,
|
||||
"narHash": "sha256-Gul0Zqy0amouh8Hs8BL/DIKFYD6BmdTo4H8+5K5+mTo=",
|
||||
"lastModified": 1736184101,
|
||||
"narHash": "sha256-HAX+TkDXzyNp6SAsKwjNFql7KzAtxximpQSv+GmP8KQ=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "610269a14232c2888289464feb5227e284eef336",
|
||||
"revCount": 27,
|
||||
"rev": "9cdab949f44301553e3817cf1f38287ad947e00c",
|
||||
"revCount": 28,
|
||||
"type": "git",
|
||||
"url": "https://git.dynamicdiscord.de/kalipso/tasklist"
|
||||
},
|
||||
|
||||
@@ -10,6 +10,7 @@ keys:
|
||||
- &machine_lucia 3474196f3adf27cfb70f8f56bcd52d1ed55033db
|
||||
- &machine_durruti age1xu6kxpf8p0r8d6sgyl0m20p5hmw35nserl7rejuzm66eql0ur4mq03u0vp
|
||||
- &machine_vpn age1v6uxwej4nlrpfanr9js7x6059mtvyg4fw50pzt0a2kt3ahk7edlslafeuh
|
||||
- &machine_fanny age14dpm6vaycd6u34dkndcktpamqgdyj4aqccjnl5533dsza05hxuds0tjfnf
|
||||
creation_rules:
|
||||
- path_regex: moderatio/secrets/secrets.yaml$
|
||||
key_groups:
|
||||
@@ -43,6 +44,14 @@ creation_rules:
|
||||
age:
|
||||
- *machine_vpn
|
||||
- *admin_atlan
|
||||
- path_regex: fanny/secrets.yaml$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *machine_fanny
|
||||
- *admin_atlan
|
||||
- path_regex: testvm/disk.key
|
||||
key_groups:
|
||||
- pgp:
|
||||
@@ -50,3 +59,17 @@ creation_rules:
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *admin_atlan
|
||||
- path_regex: fanny/disk.key
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *admin_atlan
|
||||
- path_regex: bakunin/disk.key
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *admin_atlan
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
sshKeys = import ../ssh_keys.nix;
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
@@ -9,6 +12,8 @@
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
inputs.self.nixosModules.malobeo.disko
|
||||
inputs.self.nixosModules.malobeo.initssh
|
||||
];
|
||||
|
||||
malobeo.autoUpdate = {
|
||||
@@ -19,7 +24,19 @@
|
||||
cacheurl = "https://cache.dynamicdiscord.de";
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
malobeo.disks = {
|
||||
enable = true;
|
||||
hostId = "a3c3102f";
|
||||
root = {
|
||||
disk0 = "disk/by-id/ata-HITACHI_HTS725016A9A364_110308PCKB04VNHX9XTJ";
|
||||
};
|
||||
};
|
||||
|
||||
malobeo.initssh = {
|
||||
enable = true;
|
||||
authorizedKeys = sshKeys.admins;
|
||||
ethernetDrivers = ["r8169"];
|
||||
};
|
||||
|
||||
hardware.sane.enable = true; #scanner support
|
||||
|
||||
|
||||
31
machines/bakunin/disk.key
Normal file
31
machines/bakunin/disk.key
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:2/tfkG7SwWNpnqgkFkmUqbAJBF2eN/lfZCK/9VsZag==,iv:Sps+ZIQGveS/zumjVE8VFfVTlNwQJ093eMDndlne2nU=,tag:lW8xcz43jj1XPV6M/0e11g==,type:str]",
|
||||
"sops": {
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRU003cys0d0d4MXFmVVVH\ndDg1eHZpVjFMeDBGL3JQcjB5a0luSVRaSWtnCmxNOEUyZ2oybkNLdm12ZTVmNUpo\nVCtUem44bXA2dGhURGdyRWxKdUF6OVkKLS0tIDdVbUt2eGVHMHBzOEt6QnRpOXZF\nVWFEUFloRXpIUGJxblpaNUNuTjlLbDQKQii2qUIl72d02D3P0oTDHZQT1srSk6jS\n89XSBy6ND9vP0tGXcZ4a7jghO0Q1OVNe1fm6Ez41lKOuUu77hgOAWg==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2025-01-14T16:40:57Z",
|
||||
"mac": "ENC[AES256_GCM,data:M8l4a2SbBikF/tEtGx4ZY13eK3ffM70aUCDYo4ljgTAtQEbGLx1SJM/mrFW325LycFMNOerWhXyipbXPZPw2VfnSJ9dz+bQ53xK7Mpf/bOZs5aQZJpJ1/MJh6lkmR/zPeQXhE08WsyJ1rCRqAfygau2CqdV8ujY5li3jIIDQMcQ=,iv:lJZhTjJAxSky9MrzYldkJOG0dCIzkv4IE3ZKzxgUxvo=,tag:t/grczWX+0sDcsHC5SCd/A==,type:str]",
|
||||
"pgp": [
|
||||
{
|
||||
"created_at": "2025-01-14T16:40:08Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQGMA5HdvEwzh/H7AQv/S6LvVBsznEqLZbT/UAom1KmfmA3swxAJnQ5tl/vnnix6\nvzs4KSFGZMOQZihEKC/M/og8qTCvlUFBAUMkYLgX+8ehZeZwnnH9V8EDGDIyoWXE\n6AIHP9Ur6yk62gHqmfHlMxFG2A9/A4a+mOvxyKKPDK/AYG0PBaSVMkM6cp7efWwe\n7C6m4BpPRU+3NsNKy/4FkWt9xoFy82K89FqUGC8oZOQW1q+fS7ZIhmnTzzApwILy\n5Y77yBnpPECDYNZdH097bZli6KGWob7aXJ431gyw2OMVQHFb0DlQbKxemo9eWpIr\nnXu2FYrY2D7YxXBGQvXTuNQD3BuvrccOgWAmmi852C1gVVKV+egeOBRq2RYPl6+j\n8TBaNzl0rcvaoWeTJGR142pR9ht9B3aGzXcvCsciZo3SjYyt31J0huzPfv4Dakfn\nyY8BvOaNfugjx0aS6BOZgZiOPlBer86/0FKX469QQAnqL0LRoPyjn53JYUdPdI+s\nCI2WuVynSl7ItiwoKkJK0lgBm0oMhpSiGOC4Z2Bkk2xdpiuXUdMcP6m8OlG9ldCs\n0KrWubh9Ne6CP7etvTkwqWvMuSpCuheToIQ0rp8j21/YdCFX5LpxA3+em0t9M7Is\nV4ZoLnqA2KjI\n=4+Yl\n-----END PGP MESSAGE-----",
|
||||
"fp": "c4639370c41133a738f643a591ddbc4c3387f1fb"
|
||||
},
|
||||
{
|
||||
"created_at": "2025-01-14T16:40:08Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMA98TrrsQEbXUAQ//c/UkuZRpJM5sH1snP8Kidek6nHgC11hUaY1G15a5ap1D\nn9cMIn4xUdfCAN/DoNiE14NzeTDQyawmIV1ZmrYZzItFdNgunf1r9jQNa3EqcWfE\norJS2RwWDrsw7tmx0wyenr9BLefMGJYaJ6Rd7J3j8sXL7aT+SbNw27mmVbYrJiFJ\nYh2usIsxDu2C+dCeTb3J9sKK6F96IbNnj/2Sx8AGYsIQvcpwloCRrnjiEa+hrEBn\nj1I6U4B/NjRGv20PAR1OnQ2OhKVL5UgTJgNKWCLdvGVOQnqJgDNUrrNEBY19wDQL\nQzJEzL21aiyF+8BB3IrtQlntmAIMcUUHTpqIols9rpVJl54yiK1mQ3UqTQPQ2+gd\nu2gtjXXk3FMnVzaI33ZMcxENGHy/+ZdZMfY70/EwJpRvneHTsLr3Z/bHUxavSYdL\nQqbeWLUm7a2/pnOl5JKa9asKYaNBNdmzO/YVgQNhLQzFtHJ9riVN7Ro+S2bocN9Z\npHGCCISAdMDyuFC7aSngnZEwE4NACbQEc8Udu+YCAUIeeBaPI/QWu3n61fZrkxR7\nmik9uJdXnMzKpmNGVQbPurifykDA6Bsqakn69AZQIPyxMtEDBV+pDX0yy3tI5D12\nhksuXSC7fpV/4BsZWKczK9fpDUJMDTFajSSVrSKb4nr2hk49IAZX9rhgbiHmT1LS\nWAHa5YGYUMkVQc59J3uhAjuSckWA/7R7oMhIrL5e/vnnHVR5zFW/auHkDytzZ0d0\nbGdrIRZh81C+yxB1pSJvlUnIWbYnpqhaH3xL+8yARpGZMNi595x0EJM=\n=8puy\n-----END PGP MESSAGE-----",
|
||||
"fp": "aef8d6c7e4761fc297cda833df13aebb1011b5d4"
|
||||
}
|
||||
],
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.9.2"
|
||||
}
|
||||
}
|
||||
@@ -56,11 +56,11 @@ let
|
||||
socket = "store.socket";
|
||||
}
|
||||
{
|
||||
source = "/var/lib/microvms/${hostName}/etc";
|
||||
source = "/var/lib/microvms/test/etc/";
|
||||
mountPoint = "/etc";
|
||||
tag = "etc";
|
||||
tag = "etcssh";
|
||||
proto = "virtiofs";
|
||||
socket = "etc.socket";
|
||||
socket = "etcssh.socket";
|
||||
}
|
||||
{
|
||||
source = "/var/lib/microvms/${hostName}/var";
|
||||
@@ -93,6 +93,8 @@ let
|
||||
};
|
||||
}
|
||||
] ++ defaultModules ++ modules;
|
||||
|
||||
inputsMod = inputs // { malobeo = self; };
|
||||
in
|
||||
{
|
||||
louise = nixosSystem {
|
||||
@@ -109,14 +111,23 @@ in
|
||||
modules = defaultModules ++ [
|
||||
./bakunin/configuration.nix
|
||||
inputs.disko.nixosModules.disko
|
||||
./modules/disko/btrfs-laptop.nix
|
||||
];
|
||||
};
|
||||
|
||||
lucia = nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
modules = defaultModules ++ [
|
||||
./lucia/configuration.nix
|
||||
./lucia/hardware_configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
fanny = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
specialArgs.inputs = inputsMod;
|
||||
modules = defaultModules ++ [
|
||||
self.nixosModules.malobeo.vpn
|
||||
./fanny/configuration.nix
|
||||
];
|
||||
};
|
||||
@@ -140,12 +151,22 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
lucia = nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
infradocs = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
modules = defaultModules ++ [
|
||||
./lucia/configuration.nix
|
||||
./lucia/hardware_configuration.nix
|
||||
specialArgs.self = self;
|
||||
modules = makeMicroVM "infradocs" "10.0.0.11" "D0:E5:CA:F0:D7:E7" [
|
||||
self.nixosModules.malobeo.vpn
|
||||
./infradocs/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
uptimekuma = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
specialArgs.self = self;
|
||||
modules = makeMicroVM "uptimekuma" "10.0.0.12" "D0:E5:CA:F0:D7:E8" [
|
||||
./uptimekuma/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -8,6 +8,15 @@
|
||||
{ addr = "0.0.0.0"; port = 9000; }
|
||||
];
|
||||
root = "${self.packages.x86_64-linux.docs}/share/doc";
|
||||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -36,7 +36,21 @@ in
|
||||
services.nginx.virtualHosts."docs.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/".proxyPass = "http://${cfg.host_ip}:9000";
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.10";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."status.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.12";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."tasklist.malobeo.org" = {
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
|
||||
{ inputs, config, ... }:
|
||||
let
|
||||
sshKeys = import ../ssh_keys.nix;
|
||||
in
|
||||
{
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets.wg_private = {};
|
||||
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
#./hardware-configuration.nix
|
||||
@@ -10,6 +15,7 @@
|
||||
../modules/autoupdate.nix
|
||||
inputs.self.nixosModules.malobeo.initssh
|
||||
inputs.self.nixosModules.malobeo.disko
|
||||
inputs.self.nixosModules.malobeo.microvm
|
||||
];
|
||||
|
||||
malobeo.autoUpdate = {
|
||||
@@ -20,23 +26,52 @@
|
||||
cacheurl = "https://cache.dynamicdiscord.de";
|
||||
};
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
malobeo.disks = {
|
||||
enable = true;
|
||||
hostId = "1312acab";
|
||||
hostId = "a3c3101f";
|
||||
root = {
|
||||
disk0 = "sda";
|
||||
disk0 = "disk/by-id/ata-SAMSUNG_MZ7LN256HCHP-000L7_S20HNAAH200381";
|
||||
};
|
||||
storage = {
|
||||
disks = ["sdb" "sdc"];
|
||||
disks = ["disk/by-id/wwn-0x50014ee265b53b60" "disk/by-id/wwn-0x50014ee2bb0a194a"];
|
||||
mirror = true;
|
||||
};
|
||||
};
|
||||
|
||||
malobeo.initssh = {
|
||||
enable = true;
|
||||
authorizedKeys = sshKeys.admins;
|
||||
ethernetDrivers = ["r8169"];
|
||||
};
|
||||
|
||||
services.malobeo.vpn = {
|
||||
enable = true;
|
||||
name = "fanny";
|
||||
privateKeyFile = config.sops.secrets.wg_private.path;
|
||||
};
|
||||
|
||||
services.malobeo.microvm.enableHostBridge = true;
|
||||
services.malobeo.microvm.deployHosts = [ "infradocs" ];
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."docs.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.11:9000";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.tor = {
|
||||
enable = true;
|
||||
client.enable = true;
|
||||
|
||||
31
machines/fanny/disk.key
Normal file
31
machines/fanny/disk.key
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:1I8fN241VOaW4GaNUe/OVr+1HQKmtYL1GSuIfsE=,iv:aHdgEUj5QhusEavG9mVgtTQ4uqLJD2ozQ/kVVtFakYY=,tag:JJUbt4kgpa4hVD3HjLXGOg==,type:str]",
|
||||
"sops": {
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBEUGpORk5zWXU1OVpqc2hT\nVW5PYlNLT3lKQVpTdCtMT1M3YlZ3Uno5bVJjCkJXR3I2Y3lDT0dJNThCcDN1NXYr\nK3VucjRKU0dac3BtQmV5ZFdrZXkrS1EKLS0tIGRGMGxDM0ZGbzVPTnJQK01GS3VW\nRHpJQWZLU1lrRS9ScXM0L0dyTjhGTGsKJEYq5vKxxYBAgkqUEkBwESur0reNIDPb\nK3rtflNi3dUYYZdLFNFV5rQX5q8aDnM6fO/zYPkzfBn7Ewq3jbBIIg==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2025-01-05T19:35:48Z",
|
||||
"mac": "ENC[AES256_GCM,data:z7elJ0+3r0bWc/H6h4rI36xC7Uj0NS04VssjPDNVZM17LeN4ansSOfcOKPaUMziV/z5Aq8RVLROR+FImzxBZGaZm37frCoN1OP3WjeDnP6AsoY9dY+S/aYmErVEsQEIi8T4RAdQP2c3BUt1oKZ9Nki2pu3IBRabBlFhaTI0bspc=,iv:8Nn8r9ancHwBJOaJSsv8Vj3s+d0UvRmKIeCDNzx1qRg=,tag:BSO2yu70H2wjen3BCGC4Gw==,type:str]",
|
||||
"pgp": [
|
||||
{
|
||||
"created_at": "2025-01-05T19:32:11Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQGMA5HdvEwzh/H7AQv+JpNwP+BLJf4+0pSr17TToviCo0yWmcaP1dIUqClBSoDO\nI3ZzqHdImAj4QgExif2zsuzz1+WC+sjvFqEmX5pBKza/e30qCZirkelz9mzc0mhG\nLhTzfhqC6fLbV5f+pDp6N40ommu+LX1pIz6nViCUjqBdnAkCb+tqLU4eQJQqVmlz\n7BToLsvYomPK1nJ6f4rt1nTR9wkBI68AYM/K0SgCJXjwj1LpZ/+3yElkiCqZ9uZB\n1jrDKX+QPySlZ7OERL70UT7Eh8DTUNzFnozvliBnyxe00wwiiucCgrC94TmaKCmh\ni/FOdS6Izm3QwcWB0eMCX6GQBvlUWpjSz5xF4+YODJe9tGNz/sNxpk6B8xG5NuG2\n61nohMHoml6X3Z9dOwu/Svl+eS8SV/r278W/F9miE8YeayyLlPxHF3DXjd6WeDhZ\n20NExQUJYIRf6w/XQPQZ+E39NkIHxz8v+P29ncmSsRPWS6d2MK0Yj+UW0vT0u1vJ\n+lAs24xYofbu5tmBbnK10lgBrZMXDJM2nQbKMKSkVVjzbzmOe5jzMBxuWLX+ykeI\npaj32wQDWvfBqLPH1Kwvy5nqHvy375jPZ7RTzT7W0d4jKQf7xapbi4CEepHHfxCF\nD0HIEi8RUlXJ\n=KVUJ\n-----END PGP MESSAGE-----",
|
||||
"fp": "c4639370c41133a738f643a591ddbc4c3387f1fb"
|
||||
},
|
||||
{
|
||||
"created_at": "2025-01-05T19:32:11Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMA98TrrsQEbXUARAAqowFMavIniFheNvt03EH1iEn64xNmExotYcDt2L0bR39\nXQdLvg7cJ/Jh7EuZ44mHTs21mpbYIlygMs6kimqQ8iO30vGTEcn5bt/eUEoGHciM\nYVHktWNR81ZgjvKCcmTUK3ld+DMKmg2BABr4auUOYLu4ToSnFb1fv+fvZG0D3iQs\nm6LJuafH+4utM16Vnkp9+ziY/ieMPYfbOFuSFq0UWxGK9P+koSYVGnYhH55Lksyf\nBb/esEGCY671/Jl/qHw8so4TELeRsW/v/xAcNqbE1Msdeas7WJy/B6WqXQgK/Y+J\nPsyZ2XHKhPRitN77/eDJXVBi0mKBTE/RCzDzMYxKA7IQm28v8+u+wpdCajewnyF4\ns2HACaYs/TWRpIUzqxRlznc0nMpk8xUaeVb0N7nrtSDEBF8ETOGOcPk1AmdKMR4M\nsy0vu+K2oJ9L7e/o1ntpejKHN7t2Lzq+CvszBYKmyw/KgxeqY0hx4cJTUDsdgLjI\nMTrs6bySVXDyRaw3rHo7OvA+5c8dLfnWJd1R78nZTx89CYCvjJeMo7PNvN6C9HxK\nJoCOCnZo6a3j4NqJvXD5GNqGSP6m1lqBRWYQUIhWaOfz8aTY1Z3EXX0/4tv5C+A/\nknhc694ujtmBXio4XgDIrSz3jr9G8+ZLvig88xV12HTJfsatypQdHVIZj08EeR/S\nWAG872Q/DVD/aDmhaOlq/o/QBoEyrnJdkRHT9NX8iBboQ81wezfJxWUWlWyHaXVq\n5YBLFQvQAZLz3h05EBkMOiS2dHUa8OnNImj8txnCePAlcUdv7LIVxHA=\n=9APA\n-----END PGP MESSAGE-----",
|
||||
"fp": "aef8d6c7e4761fc297cda833df13aebb1011b5d4"
|
||||
}
|
||||
],
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.9.2"
|
||||
}
|
||||
}
|
||||
68
machines/fanny/secrets.yaml
Normal file
68
machines/fanny/secrets.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
wg_private: ENC[AES256_GCM,data:kFuLzZz9lmtUccQUIYiXvJRf7WBg5iCq1xxCiI76J3TaIBELqgbEmUtPR4g=,iv:0S0uzX4OVxQCKDOl1zB6nDo8152oE7ymBWdVkPkKlro=,tag:gg1n1BsnjNPikMBNB60F5Q==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age14dpm6vaycd6u34dkndcktpamqgdyj4aqccjnl5533dsza05hxuds0tjfnf
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCTmdrV1IyM2hldloxM3Zh
|
||||
cGVIZmtCZ0FLTEQxcFBLaVh0VXUwNWVGR1hBCnJ6SHpzckh5VVduM0Z2dkh2WHdy
|
||||
WGxRV0JFZTdqcWgzUFlSZkowZElJd2MKLS0tIGxYL0orSVdmZzJBSEIvRUNDUVlK
|
||||
RWFLOWp4TVJBM3llS0lmQlBUQ2ZQNkUKEz/dXR0tkVeyC9Oxai5gZEAhRImdL1FL
|
||||
2LdVRiCt3MqR9wtfw1/pR7166Bx8nLIN42uWh2YU5j0/0rXNq+I6Qg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBoQW5OU2FiNStkazFRRHBK
|
||||
U2kzNkpWRDVQTDBkTFFNWnREcjh6NlhmRnhZCkxMYlZhcUlGUnN3QWFzbVkyYlpX
|
||||
eWZaOUxsUCtZYmx0U29ZckFaMjNLTFEKLS0tIExxV0REL3MwUTZpMkgxYlZMc0JS
|
||||
cTNEYTBGT3VRaDI1eUhucnd5d2JhTWMKNZlkUjxX2QTFoiCWPzz62jz4kK8d5rW/
|
||||
MJ1w69Qve7lsUAg74YlFF7i/yYSZZkHoRMs92lRmq3lHlbK6aaUMTw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-01-14T12:41:07Z"
|
||||
mac: ENC[AES256_GCM,data:RJ4Fa8MmX8u8S3zrD/SaywTC3d2IfHQPBDy3C9u4GuXJ/ruEChAB1kN8rqMPvkmET8UUgHIEp7RpbzMtg/FOmKYKYTTx5t//3/VozvAEZurhG/4mnN3r6uaZ0R9+wSjym8IyOKsJ7p4XrfE5tRdzNyU4EqfkEiyf+jO751uSnYI=,iv:eiTdmbcrpUvyDPFmGawxJs/ehmD7KqulaoB+nfpC6ko=,tag:+TKr53cFS3wbLXNgcbZfJQ==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-01-14T12:32:13Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQv/YM4JBfaFngZt0SmMP3fBCodQXWnWMjy5VYoTOKKaOfG8
|
||||
5GRTf+o1stsru3EKImh5PTqniRO6UH+/DOKBY8zHsy9lXojGka3uPJRKv7JUD5YO
|
||||
8NjlHwwg+jcQN/qtrWc+1D69zR1aO/6yxfgujL3r/fJ4reqtSNfkVYVy2lEcw2ZN
|
||||
zhlN+fBxZCyHyUTKLcXrG7Fg8BRudjwBnIsBTLAVFkWg0bnlq38vicGpF5CHsRjA
|
||||
cTPq2D9ev888WKHcjFcXYqxeKkXkqBuOOMlCHQyJCv8HHfA/GY+pBQfiVmvSt77O
|
||||
/MA8hVYl8G4tRFsbUdZzqtPbAsLy30w1e9dpsD2M6tD55V2RNUCrznB2lo0uXZ24
|
||||
9MUnad+NQdntbe5B2OBUF/MNKZ9/tC+B9pBm7Tx3rxSELytGuQF11x4EyLwn+Ict
|
||||
iBBV5P3RiulxLW6MbDs+7JPILfcMfg6e8q+GY1dnIPZrs8Qf5W60FxbOYYiMvJ9k
|
||||
UtnZAixVdlpkAsQz/t630lgBX9DLYjEVgaxC+zqtRjfHkoyvGIac6cgHDX/fBs7p
|
||||
Woud0RbwffhOhaIF47Z2W4UPfn5Mtcu63fQpjCM9urk9asaRPeNDTeEYVjqSZD6N
|
||||
J+o9dahBHvIF
|
||||
=GKm4
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2025-01-14T12:32:13Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUARAAmD4PfLpRVUXTo5yyS9LSs5vmEvnCmNc0ad4Oiv7YAxhs
|
||||
W7SCKHq2zOfGIeZZHP0wjRnJELwMCVLy4dVo/slDHCiy8T4MZXaYR04ZaJJ+OHrF
|
||||
e5xxAA6FjipufvxgRZvLhDj+g+RaX2TuxdL9gFSVS81rvEpSRDnydt2O/6G4SGBR
|
||||
GO5b176eMerrqOqRLL5Ou4b6oitagvRwZzOXQ+YonKZz3STlyXRMgWxeFTDK9T/q
|
||||
yYOwPVAOU1jhYzUjHNAYCp3CH4ERScrO7AwomAWH+Fe48WRbg2ebdqRnuv/Vl4PM
|
||||
wc5DQcCIIIIENMGIYOzUo1KrfQlevzXF/mbgAgo/uVuRl3Y3lCRAcZBQOtUCF5Ap
|
||||
FhsO87EMXlZWj3bv08f21t3hQztfuaHIqFpCbSIGgmiE9cAY0cOtCYpJfCYdV7iT
|
||||
cOElJgYRbAsAbFC9wTQWEvwIxrgnCIrkCg1bzP5KNLG1K+ae5J7qN77qeTQw2/ul
|
||||
QDDUUNnzjes562t+/xFLQa/bust1Y8pAYn1s1LEBol1hLX4Igonlkw303UPjZOI2
|
||||
MyH5hOh0hNUReuOpHpre/pYquE8Dd27XKAHfJsSd3ZLJG5+1Msw23lIsptgovNrB
|
||||
5VRvPj8WPojiDHqN27kt/IuayN3TeoJFjmAjkoFjlyKTcs+b6cDkxUw3LcP+6NjS
|
||||
WAHQI0pWTa5zD8UPow4DHxteP4jW/6ddBfJ1Vz1scqKMXYvxFkRqZvn3uAJOtcuw
|
||||
CgQ4CXE43n4G7g5gvWl6ZFW8tdXR7Sw+USnHR/9oS9fV0rHcxxDFEfE=
|
||||
=9FN4
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
20
machines/infradocs/configuration.nix
Normal file
20
machines/infradocs/configuration.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = mkDefault "infradocs";
|
||||
useDHCP = false;
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
};
|
||||
|
||||
imports = [
|
||||
../durruti/documentation.nix
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{config, lib, inputs, ...}:
|
||||
{config, inputs, lib, ...}:
|
||||
let
|
||||
cfg = config.malobeo.disks;
|
||||
in
|
||||
@@ -15,6 +15,11 @@ in
|
||||
default = "";
|
||||
description = "Host ID for zfs disks, generate with 'head -c4 /dev/urandom | od -A none -t x4'";
|
||||
};
|
||||
encryption = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Allows encryption to be disabled for testing";
|
||||
};
|
||||
devNodes = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/dev/disk/by-id/";
|
||||
@@ -174,12 +179,12 @@ in
|
||||
type = "zfs_fs";
|
||||
options = {
|
||||
mountpoint = "none";
|
||||
encryption = "aes-256-gcm";
|
||||
keyformat = "passphrase";
|
||||
keylocation = "file:///tmp/secret.key";
|
||||
encryption = lib.mkIf cfg.encryption "aes-256-gcm";
|
||||
keyformat = lib.mkIf cfg.encryption "passphrase";
|
||||
keylocation = lib.mkIf cfg.encryption "file:///tmp/secret.key";
|
||||
};
|
||||
# use this to read the key during boot
|
||||
postCreateHook = ''
|
||||
postCreateHook = lib.mkIf cfg.encryption ''
|
||||
zfs set keylocation="prompt" zroot/encrypted;
|
||||
'';
|
||||
};
|
||||
@@ -233,12 +238,12 @@ in
|
||||
type = "zfs_fs";
|
||||
options = {
|
||||
mountpoint = "none";
|
||||
encryption = "aes-256-gcm";
|
||||
keyformat = "passphrase";
|
||||
keylocation = "file:///tmp/secret.key";
|
||||
encryption = lib.mkIf cfg.encryption "aes-256-gcm";
|
||||
keyformat = lib.mkIf cfg.encryption "passphrase";
|
||||
keylocation = lib.mkIf cfg.encryption "file:///tmp/secret.key";
|
||||
};
|
||||
# use this to read the key during boot
|
||||
postCreateHook = ''
|
||||
postCreateHook = lib.mkIf cfg.encryption ''
|
||||
zfs set keylocation="prompt" storage/encrypted;
|
||||
'';
|
||||
};
|
||||
@@ -261,7 +266,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.devNodes = cfg.devNodes;
|
||||
boot.zfs.devNodes = lib.mkDefault cfg.devNodes;
|
||||
|
||||
fileSystems."/".neededForBoot = true;
|
||||
fileSystems."/etc".neededForBoot = true;
|
||||
@@ -269,6 +274,5 @@ in
|
||||
fileSystems."/var".neededForBoot = true;
|
||||
fileSystems."/home".neededForBoot = true;
|
||||
fileSystems."/nix".neededForBoot = true;
|
||||
fileSystems."/data".neededForBoot = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
@@ -6,26 +6,34 @@
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
listenPort = 51821;
|
||||
publicKey = "hF9H10Y8Ar7zvZXFoNM8LSoaYFgPCXv30c54SSEucX4=";
|
||||
persistentKeepalive = 25;
|
||||
};
|
||||
|
||||
"celine" = {
|
||||
role = "client";
|
||||
address = [ "10.100.0.2/24" ];
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
allowedIPs = [ "10.100.0.2/32" ];
|
||||
publicKey = "Jgx82tSOmZJS4sm1o8Eci9ahaQdQir2PLq9dBqsWZw4=";
|
||||
};
|
||||
|
||||
"desktop" = {
|
||||
role = "client";
|
||||
address = [ "10.100.0.3/24" ];
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
allowedIPs = [ "10.100.0.3/32" ];
|
||||
publicKey = "FtY2lcdWcw+nvtydOOUDyaeh/xkaqHA8y9GXzqU0Am0=";
|
||||
};
|
||||
|
||||
"atlan-pc" = {
|
||||
role = "client";
|
||||
address = [ "10.100.0.5/24" ];
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
allowedIPs = [ "10.100.0.5/32" ];
|
||||
publicKey = "TrJ4UAF//zXdaLwZudI78L+rTC36zEDodTDOWNS4Y1Y=";
|
||||
};
|
||||
|
||||
"fanny" = {
|
||||
role = "client";
|
||||
address = [ "10.100.0.101/24" ];
|
||||
allowedIPs = [ "10.100.0.101/32" ];
|
||||
publicKey = "3U59F6T1s/1LaZBIa6wB0qsVuO6pRR9jfYZJIH2piAU=";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -63,10 +63,13 @@ in
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = mkIf (myPeer.role == "server") 1;
|
||||
|
||||
networking.wg-quick = {
|
||||
interfaces = {
|
||||
malovpn = {
|
||||
mtu = 1340; #seems to be necessary to proxypass nginx traffic through vpn
|
||||
address = myPeer.address;
|
||||
autostart = cfg.autostart;
|
||||
listenPort = mkIf (myPeer.role == "server") myPeer.listenPort;
|
||||
|
||||
@@ -14,6 +14,8 @@ in
|
||||
];
|
||||
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
malobeo.initssh = {
|
||||
enable = true;
|
||||
authorizedKeys = sshKeys.admins;
|
||||
@@ -22,6 +24,7 @@ in
|
||||
|
||||
malobeo.disks = {
|
||||
enable = true;
|
||||
encryption = false;
|
||||
hostId = "83abc8cb";
|
||||
devNodes = "/dev/disk/by-path/";
|
||||
root = {
|
||||
@@ -47,7 +50,7 @@ in
|
||||
|
||||
services.acpid.enable = true;
|
||||
|
||||
networking.hostName = "fanny";
|
||||
networking.hostName = "testvm";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
37
machines/uptimekuma/configuration.nix
Normal file
37
machines/uptimekuma/configuration.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = mkDefault "uptimekuma";
|
||||
useDHCP = false;
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
};
|
||||
|
||||
imports = [
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."status.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3001";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
services.uptime-kuma = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ with lib;
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
firewall = {
|
||||
allowedUDPPorts = [ 51821 ];
|
||||
allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -27,6 +28,18 @@ with lib;
|
||||
privateKeyFile = config.sops.secrets.wg_private.path;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."docs.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user