Compare commits
356 Commits
7f97d6ee8c
...
reproducib
| Author | SHA1 | Date | |
|---|---|---|---|
| 7bfffb32f4 | |||
| b792b738a9 | |||
| 8a2b948d11 | |||
| afd6444635 | |||
| b423efeaef | |||
|
|
3bc74a3e80 | ||
| 251b0f0850 | |||
| 70fe179b5b | |||
| 2eec2ed980 | |||
|
|
d00188f770 | ||
|
|
556cc3d423 | ||
|
|
edc754ee7f | ||
|
|
ff673f0070 | ||
|
|
57c8e65917 | ||
|
|
e4be136b64 | ||
|
|
aedf5ca0bf | ||
|
|
923cbf4621 | ||
| 849505807c | |||
| 9209f84586 | |||
| 698cfcf383 | |||
| a0756e4617 | |||
|
|
49aed32687 | ||
|
|
3ae3bbda6b | ||
|
|
5877e1dbd9 | ||
| 03aa9a5705 | |||
| 580096435e | |||
| 896f355ad0 | |||
| 1f9d39b53d | |||
|
|
362d9cf488 | ||
|
|
e22c895cf7 | ||
|
|
a07bec0472 | ||
|
|
4a67683462 | ||
|
|
fb222bc1a4 | ||
| 5c17164fd8 | |||
| a8bf6539e6 | |||
| a4063bf02b | |||
| 74ebf042e7 | |||
| a7ae07eba3 | |||
| baf77a1abd | |||
| fa5c68b2a3 | |||
| 2fb89082dd | |||
| 0f3591d111 | |||
| 4eea2de7ec | |||
| 03f9e9b9a2 | |||
| b349391de6 | |||
| a02b2c2bc4 | |||
| dcc81ec929 | |||
| de774ac9b4 | |||
| c8f7358ac2 | |||
| 13dd22b2ed | |||
| 6632656e23 | |||
| 6984c3d945 | |||
| bc3ab7aa49 | |||
| 60cfdfda82 | |||
| e8b9879659 | |||
| 7f354fdaea | |||
| a7a11e4474 | |||
| e2925f21a6 | |||
| 8db42cc437 | |||
| d98dae86f7 | |||
| ec7f02ae67 | |||
| adf4a12881 | |||
| 2adf20c902 | |||
| c679aff25d | |||
| c4a68c6bec | |||
| 459e538d50 | |||
| ac3b1e1be0 | |||
| a465c75339 | |||
| 1e5a18759a | |||
| 9c3f1cba5e | |||
| b743057389 | |||
| ba3eb1cbfb | |||
| ce7d30f604 | |||
| 98919a5c38 | |||
| e839d74151 | |||
| d08abe2419 | |||
| 57de60e28a | |||
| d49aff55ae | |||
| 22b4922ca9 | |||
| d8e989125a | |||
| 5d9d607234 | |||
| e72f6a413e | |||
| 48ada3efa3 | |||
| cd5cfe2bb2 | |||
| 6112a59af7 | |||
| 4e684de843 | |||
| 1e73794b18 | |||
| e2b3f4a754 | |||
| 2fc4da9244 | |||
| 0ed00541ff | |||
| 22282c1a2f | |||
| e102d3fb94 | |||
| a6b1994938 | |||
| b381173dad | |||
| 7fee35d3d7 | |||
| 4d477ce648 | |||
| 74885a7ce1 | |||
| eafe7a6b95 | |||
| fe9ff06aae | |||
| ba6e219d64 | |||
| 7431209bc2 | |||
| 015c326042 | |||
| 5f780e17eb | |||
| fda348f5da | |||
| 36ec5f5837 | |||
| 68b3da7df8 | |||
| affcc71eb1 | |||
| 4462856fa0 | |||
| 5352c1fa4d | |||
|
|
fabf48a5c0 | ||
|
|
617c177892 | ||
|
|
9b4cd02e53 | ||
|
|
fab1b18263 | ||
| cbd041f563 | |||
|
|
ef25c686b4 | ||
|
|
66392ca2c2 | ||
|
|
9afa8987e7 | ||
|
|
0239733e62 | ||
|
|
d9cf3588bf | ||
|
|
2500b8ab9a | ||
|
|
52824e39ee | ||
|
|
8793120436 | ||
|
|
950ada1e10 | ||
|
|
1e269966ff | ||
|
|
3861daaf76 | ||
|
|
3a332e77d1 | ||
|
|
79c311b45d | ||
|
|
850070f987 | ||
|
|
d242562544 | ||
| 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 | ||
|
|
f46265e98a | ||
|
|
9f81b1497d | ||
|
|
8c488d50a8 | ||
|
|
b0a5fd91cd | ||
|
|
4fa01acae1 | ||
|
|
e9b5937af9 | ||
|
|
4d4c4fa6fa | ||
|
|
0087aa78a3 | ||
| 56ba8d06cd | |||
| cf300973d5 | |||
| fedf849499 | |||
|
|
e7710d63a3 | ||
| 3855130d41 | |||
| b439a56e0b | |||
| a2a4815d3b | |||
| 826481cf5e | |||
| 3131d1bebb | |||
| 8efe601b90 | |||
| 7af59b2a36 | |||
| 0d6df1d0ce | |||
| 6e4e35fcdf | |||
| 7b53639208 | |||
| 8fe69ca2da | |||
| 4d79714853 | |||
| 66579fcbfc | |||
| b6aef85860 | |||
| bf2c801597 | |||
| 3f1032d04d | |||
| ced7b996ae | |||
| 79082a5e4e | |||
| 074ad306ac | |||
| dd0499d64d | |||
| 58b0ff4ec7 | |||
| 7d73807f80 | |||
| fea16d6f4b | |||
| f27065d49e | |||
| 014564191d | |||
|
|
65c61f6923 | ||
|
|
1245db5af9 | ||
|
|
e15618de36 | ||
|
|
ca1e9a3af6 | ||
|
|
a10fb33c29 | ||
|
|
cc73276ef4 | ||
| 9cc3912cbe | |||
| 3cfd0a2283 | |||
| b57827c86e | |||
| 5119209392 | |||
| 1ff2f2b4ca | |||
| 34c008c05b | |||
| 40f3ce8522 | |||
| 72ab98e6b7 | |||
| 2458a275ca | |||
| 307e68a1ca | |||
| 62afc684db | |||
| 73893438cb | |||
| 6932f8507a | |||
| 59e10c3eea | |||
| 551b07375b | |||
| 42f83603df | |||
| c0207dad33 | |||
| f61ea6ce5c | |||
| cfdbb58663 | |||
| b39a9398f0 | |||
| ad2edf017a | |||
| f922105b2f | |||
| e759346756 | |||
| e5e3433df0 | |||
| c54d27bceb | |||
| 9a3135d339 | |||
| 054076e683 | |||
| d212728676 | |||
| 28bf68098c | |||
| 2961a96860 | |||
| 7d825731bd | |||
| 3fe5b8da20 | |||
| 1bafdec4ab | |||
| 7b1bce6dc8 | |||
| 02c1e307ed | |||
| 26cc4b245e | |||
| d6d449d1d8 | |||
| af881b8996 | |||
| d2e97448f7 | |||
| 84fef37dc7 | |||
| bdd13a204f | |||
| d0ed65d13a | |||
| 873a4f3831 | |||
| 64dbe6bb84 | |||
| ca8e0cffda | |||
| 1dc140ad9f | |||
| 3f4c7350c2 | |||
| efffa450d4 | |||
| dbdf817d79 | |||
| 2cdfe8c999 | |||
| 03f03e86e4 | |||
| 1aeb1c2ab9 | |||
| d012f7cb5a | |||
| 5498418d06 | |||
| ee7ee52c3f | |||
| f91e515ce2 | |||
| 370d975dbb | |||
| 048e0653a5 | |||
| b9cddb0bae | |||
| 05087d9fa6 | |||
|
|
47d386d81a | ||
|
|
3f469c09f0 | ||
| 65f9fda381 | |||
|
|
73e3742af5 | ||
| 63c36f6add | |||
| be194e4293 | |||
| edb9dcb28b | |||
| 05ec7004ad | |||
| a71061e24e | |||
|
|
b3d74f5f39 | ||
|
|
3cb8423485 | ||
| d1afbe9f14 | |||
| 807d2007fa | |||
| 88dad0193b | |||
|
|
2a66f7ae29 | ||
| 29567efb99 | |||
| ca4db0ad5c | |||
|
|
753c44a875 | ||
| 0eeb9bc131 | |||
| 142277879a | |||
|
|
4ecd2139a9 | ||
| e73105bc66 | |||
| 38a7d58ef6 | |||
| 6a185a54bc | |||
|
|
4334f6bec2 | ||
|
|
fad4f72c0b | ||
|
|
8e0f846e54 | ||
| 29fa4eda1e | |||
|
|
e57cc9dbe6 | ||
|
|
2da812fecd | ||
|
|
8ff71f14dc | ||
| 98a79d708a | |||
| 822cd46310 | |||
| 435dfa170b | |||
| 4b45afa478 | |||
| 6a7a8a569c | |||
| d729ec5758 | |||
| 0cb0849c5a | |||
| a2a3d6f4bf | |||
| 5ca39f9598 | |||
| 99669969de | |||
| 1245d5f071 | |||
| 33f383b0ec | |||
| 918c9d29bd | |||
| 8826a5e2ac | |||
| efc4ce0191 | |||
| 696e7e4a1e | |||
| c4f52e28f2 | |||
| c624ac0dce | |||
| 4c594436d2 | |||
| 875d3c1605 | |||
| f1f5c099f2 | |||
| 8d6c599064 | |||
| 6c43b892f5 | |||
| 4974903508 | |||
| 51db6691a9 | |||
|
|
bbd222d644 | ||
|
|
de31f58dbb | ||
| 270d3367fa | |||
| f700374114 | |||
| 9940225673 | |||
| 2129729396 | |||
| 646721dea7 | |||
| fe2df658c0 | |||
| 281778db3a | |||
| 51ccb7870a | |||
| d5cca32f3a | |||
|
|
32c48b3e05 | ||
| f268ce005b | |||
| d566532635 | |||
| 30e1bb85e8 | |||
| 147d987066 | |||
| 8cc3e626bd | |||
| cb1e896ee8 | |||
| 8add1bcc1e | |||
| 9fc84456f0 | |||
| e514ecc1e2 | |||
| 85b1902037 | |||
| e4aa16603e | |||
| bfb9206e74 | |||
| 703a2a2b76 | |||
| a189328e37 | |||
| 4de61dd5b6 | |||
| 587f0acbec | |||
| 8a2a565ca0 | |||
| 9b31496b1c | |||
| 806cbeb11d | |||
| 5c3676b36b | |||
| 4410eb5799 | |||
| a11bde6af7 | |||
| 6b5e86d841 | |||
| dfa77ef9cf | |||
| 8c94953c0d | |||
| a43a3f7504 | |||
| 5e61113d3e |
14
.gitea/workflows/flake-check.yml
Normal file
14
.gitea/workflows/flake-check.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
name: "Check flake syntax"
|
||||
on:
|
||||
push:
|
||||
jobs:
|
||||
flake-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies for Nix setup action
|
||||
run: |
|
||||
apt update -y
|
||||
apt install sudo -y
|
||||
- uses: cachix/install-nix-action@v30
|
||||
- run: nix flake check --no-update-lock-file --accept-flake-config .
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -3,3 +3,7 @@
|
||||
*.log
|
||||
result
|
||||
*.qcow2
|
||||
.direnv/
|
||||
book/
|
||||
fanny-efi-vars.fd
|
||||
nix-store-overlay.img
|
||||
|
||||
33
README.md
33
README.md
@@ -8,10 +8,10 @@ the file structure is based on this [blog post](https://samleathers.com/posts/20
|
||||
|
||||
#### durruti
|
||||
- nixos-container running on dedicated hetzner server
|
||||
- login via ```ssh -p 222 malobeo@5.9.153.217```
|
||||
- login via ```ssh -p 222 malobeo@dynamicdiscord.de```
|
||||
- if rebuild switch fails due to biglock do ```mount -o remount,rw /nix/var/nix/db```
|
||||
- currently is running tasklist in detached tmux session
|
||||
- [ ] make module with systemd service out of that
|
||||
- [x] make module with systemd service out of that
|
||||
|
||||
## creating a new host
|
||||
|
||||
@@ -98,32 +98,3 @@ for documentation we currently just use README.md files.
|
||||
|
||||
the devshell provides the python package ['grip'](https://github.com/joeyespo/grip) which can be used to preview different README.md files in the browser.
|
||||
the usage is simple, just run ```grip``` in the same folder as the README.md you wanna preview. then open your browser at ```http://localhost:6419 ```.
|
||||
|
||||
## todos...
|
||||
|
||||
#### infrastructure
|
||||
* [ ] host a local wiki with public available information about the space, for example:
|
||||
* [ ] how to use coffe machine
|
||||
* [ ] how to turn on/off electricity
|
||||
* [ ] how to use beamer
|
||||
* [ ] how to buecher ausleihen
|
||||
* ...
|
||||
* [ ] host some pad (codimd aka hedgedoc)
|
||||
* [ ] some network fileshare for storing the movies and streaming them within the network
|
||||
* [ ] malobeo network infrastructure rework
|
||||
* [ ] request mulvad acc
|
||||
* [ ] remove freifunk, use openwrt with mulvad configured
|
||||
|
||||
#### external services
|
||||
we want to host two services that need a bit more resources, this is a booking system for the room itself and a library system.
|
||||
- [ ] analyse best way to include our stuff into external nixOs server
|
||||
- [ ] writing some module that is included by the server
|
||||
- [ ] directly use nixOs container on host
|
||||
- [ ] combination of both (module that manages nginx blabla + nixOs container for the services
|
||||
|
||||
#### bots&progrmaming
|
||||
* [ ] create telegram bot automatically posting tuesday events
|
||||
* [x] create webapp/interface replacing current task list pad
|
||||
* could be a simple form for every tuesday
|
||||
* [ ] element bot should send updates if some tasks are not filled out
|
||||
|
||||
|
||||
1
doc/.gitignore
vendored
Normal file
1
doc/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
book
|
||||
6
doc/book.toml
Normal file
6
doc/book.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[book]
|
||||
authors = ["ahtlon"]
|
||||
language = "de"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
title = "Malobeo Infrastruktur Dokumentation"
|
||||
82
doc/src/Index.md
Normal file
82
doc/src/Index.md
Normal file
@@ -0,0 +1,82 @@
|
||||
# malobeo infrastructure
|
||||
|
||||
this repository nxios configurations of the digital malobeo infrastructure. it should be used to setup, test, build and deploy different hosts in a reproducible manner.
|
||||
|
||||
the file structure is based on this [blog post](https://samleathers.com/posts/2022-02-03-my-new-network-and-deploy-rs.html)
|
||||
|
||||
### deploying configuration
|
||||
#### local deployment
|
||||
``` shell
|
||||
nixos-rebuild switch --use-remote-sudo
|
||||
```
|
||||
|
||||
#### remote deployment
|
||||
you need the hostname and ip address of the host:
|
||||
``` shell
|
||||
nixos-rebuild switch --flake .#<hostname> --target-host root@<ip_address> --build-host localhost
|
||||
```
|
||||
|
||||
in this case 'localhost' is used as buildhost which can be usefull if the target host is low systemresources
|
||||
|
||||
|
||||
## development
|
||||
|
||||
### requirements
|
||||
we use flake based configurations for our hosts. if you want to build configurations on you own machine you have to enable flakes first by adding the following to your *configuration.nix* or *nix.conf*
|
||||
``` nix
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
```
|
||||
|
||||
More information about flakes can be found [here](https://nixos.wiki/wiki/Flakes)
|
||||
|
||||
### dev shell
|
||||
a development shell with the correct environment can be created by running ```nix develop ```
|
||||
|
||||
If you're using direnv you can add flake support by following those steps: [link](https://nixos.wiki/wiki/Flakes#Direnv_integration)
|
||||
|
||||
### build a configuration
|
||||
|
||||
to build a configuration run the following command (replace ```<hostname>``` with the actual hostname):
|
||||
|
||||
``` shell
|
||||
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel
|
||||
```
|
||||
|
||||
### building raspberry image
|
||||
|
||||
for the raspberry it is possible to build the whole configuration as an sd-card image which then can be flashed directly. more information about building arm on nixos can be found [here](https://nixos.wiki/wiki/NixOS_on_ARM).
|
||||
|
||||
to be able to build the image you need to enable qemu emulation on the machine you are building with. therefore it is necessary to add the following to your configuration.nix:
|
||||
|
||||
``` nix
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
```
|
||||
|
||||
then you can build the image with:
|
||||
|
||||
``` shell
|
||||
nix build .#nixosConfigurations.rpi1_base_image.config.system.build.sdImage
|
||||
```
|
||||
|
||||
### run a configuration as vm
|
||||
|
||||
to run a vm we have to build it first using the following command (replace ```<hostname>``` with the actual hostname):
|
||||
|
||||
``` shell
|
||||
nix build .#nixosConfigurations.<hostname>.config.system.build.vm
|
||||
```
|
||||
|
||||
afterwards run the following command to start the vm:
|
||||
|
||||
``` shell
|
||||
./result/bin/run-<hostname>-vm
|
||||
```
|
||||
|
||||
### documentation
|
||||
|
||||
for documentation we currently just use README.md files.
|
||||
|
||||
the devshell provides the python package ['grip'](https://github.com/joeyespo/grip) which can be used to preview different README.md files in the browser.
|
||||
the usage is simple, just run ```grip``` in the same folder as the README.md you wanna preview. then open your browser at ```http://localhost:6419 ```.
|
||||
23
doc/src/SUMMARY.md
Normal file
23
doc/src/SUMMARY.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Summary
|
||||
|
||||
- [Index](./Index.md)
|
||||
- [Info]()
|
||||
- [Aktuelle Server]()
|
||||
- [Durruti](./server/durruti.md)
|
||||
- [Lucia](./server/lucia.md)
|
||||
- [Hardware]()
|
||||
- [Netzwerk]()
|
||||
- [Seiten]()
|
||||
- [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)
|
||||
- [MaloVPN](./anleitung/wireguard.md)
|
||||
- [Updates](./anleitung/updates.md)
|
||||
- [Rollbacks](./anleitung/rollback.md)
|
||||
- [MicroVM](./anleitung/microvm.md)
|
||||
66
doc/src/anleitung/create.md
Normal file
66
doc/src/anleitung/create.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# Create host with disko-install
|
||||
How to use disko-install is described here: https://github.com/nix-community/disko/blob/master/docs/disko-install.md
|
||||
---
|
||||
Here are the exact steps to get bakunin running:
|
||||
First create machines/hostname/configuration.nix
|
||||
Add hosts nixosConfiguration in machines/configurations.nix
|
||||
Boot nixos installer on the Machine.
|
||||
``` bash
|
||||
# establish network connection
|
||||
wpa_passphrase "network" "password" > wpa.conf
|
||||
wpa_supplicant -B -i wlp3s0 -c wpa.conf
|
||||
ping 8.8.8.8
|
||||
# if that works continue
|
||||
|
||||
# generate a base hardware config
|
||||
nixos-generate-config --root /tmp/config --no-filesystems
|
||||
|
||||
# get the infra repo
|
||||
nix-shell -p git
|
||||
git clone https://git.dynamicdiscord.de/kalipso/infrastructure
|
||||
cd infrastructure
|
||||
|
||||
# add the new generated hardware config (and import in hosts configuration.nix)
|
||||
cp /tmp/config/etc/nixos/hardware-configuration.nix machines/bakunin/
|
||||
|
||||
# check which harddrive we want to install the system on
|
||||
lsblk #choose harddrive, in this case /dev/sda
|
||||
|
||||
# run nixos-install on that harddrive
|
||||
sudo nix --extra-experimental-features flakes --extra-experimental-features nix-command run 'github:nix-community/disko/latest#disko-install' -- --flake .#bakunin --disk main /dev/sda
|
||||
|
||||
# this failed with out of memory
|
||||
# running again showed: no disk left on device
|
||||
# it seems the usb stick i used for flashing is way to small
|
||||
# it is only
|
||||
# with a bigger one (more than 8 gig i guess) it should work
|
||||
# instead the disko-install tool i try the old method - first partitioning using disko and then installing the system
|
||||
# for that i needed to adjust ./machines/modules/disko/btrfs-laptop.nix and set the disk to "/dev/sda"
|
||||
|
||||
sudo nix --extra-experimental-features "flakes nix-command" run 'github:nix-community/disko/latest' -- --mode format --flake .#bakunin
|
||||
|
||||
# failed with no space left on device.
|
||||
# problem is lots of data is written to the local /nix/store which is mounted on tmpfs in ram
|
||||
# it seems that a workaround could be modifying the bootable stick to contain a swap partition to extend tmpfs storage
|
||||
```
|
||||
|
||||
# Testing Disko
|
||||
Testing disko partitioning is working quite well. Just run the following and check the datasets in the vm:
|
||||
```bash
|
||||
nix run -L .\#nixosConfigurations.fanny.config.system.build.vmWithDisko
|
||||
```
|
||||
|
||||
Only problem is that encryption is not working, so it needs to be commented out. For testing host fanny the following parts in ```./machines/modules/disko/fanny.nix``` need to be commented out(for both pools!):
|
||||
```nix
|
||||
datasets = {
|
||||
encrypted = {
|
||||
options = {
|
||||
encryption = "aes-256-gcm"; #THIS ONE
|
||||
keyformat = "passphrase"; #THIS ONE
|
||||
keylocation = "file:///tmp/root.key"; #THIS ONE
|
||||
};
|
||||
# use this to read the key during boot
|
||||
postCreateHook = '' #THIS ONE
|
||||
zfs set keylocation="prompt" "zroot/$name"; #THIS ONE
|
||||
''; #THIS ONE
|
||||
```
|
||||
102
doc/src/anleitung/microvm.md
Normal file
102
doc/src/anleitung/microvm.md
Normal file
@@ -0,0 +1,102 @@
|
||||
### Declaring a MicroVM
|
||||
|
||||
The hosts nixosSystems modules should be declared using the ```makeMicroVM``` helper function.
|
||||
Use durruti as orientation:
|
||||
``` nix
|
||||
modules = makeMicroVM "durruti" "10.0.0.5" [
|
||||
./durruti/configuration.nix
|
||||
];
|
||||
```
|
||||
|
||||
"durruti" is the hostname.
|
||||
"10.0.0.5" is the IP assigned to its tap interface.
|
||||
|
||||
### Testing MicroVMs locally
|
||||
MicroVMs can be built and run easily on your localhost for development.
|
||||
We provide the script ```run-vm``` to handle stuff like development (dummy) secrets, sharing directories, ect. easily.
|
||||
Usage examples:
|
||||
``` bash
|
||||
# run without args to get available options and usage info
|
||||
run-vm
|
||||
|
||||
# run nextcloud locally with dummy secrets
|
||||
run-vm nextcloud --dummy-secrets
|
||||
|
||||
# share a local folder as /var/lib dir so that nextcloud application data stays persistent between boots
|
||||
mkdir /tmp/nextcloud
|
||||
run-vm nextcloud --dummy-secrets --varlib /tmp/nextcloud
|
||||
|
||||
# enable networking to provide connectivity between multiple vms
|
||||
# for that the malobeo hostBridge must be enabled on your host
|
||||
# this example deploys persistent grafana on overwatch and fetches metrics from infradocs
|
||||
mkdir overwatch
|
||||
run-vm overwatch --networking --varlib /tmp/overwatch
|
||||
run-vm infradocs --networking
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Fully deploy microvms on local host
|
||||
In order to test persistent microvms locally we need to create them using the ```microvm``` command.
|
||||
This is necessary to be able to mount persistent /etc and /var volumes on those hosts.
|
||||
Do the following:
|
||||
|
||||
Prepare your host by including `microvm.nixosModules.host` in your `flake.nix` [Microvm Docs](https://astro.github.io/microvm.nix/host.html)
|
||||
|
||||
|
||||
```bash
|
||||
# go into our repo and start the default dev shell (or use direnv)
|
||||
nix develop .#
|
||||
|
||||
# create a microvm on your host (on the example of durruti)
|
||||
sudo microvm -c durruti -f git+file:///home/username/path/to/infrastructure/repo
|
||||
|
||||
# start the vm
|
||||
sudo systemctl start microvm@durruti.service
|
||||
|
||||
# this may fail, if so we most probably need to create /var /etc manually, then restart
|
||||
sudo mkdir -p /var/lib/microvms/durruti/{var,etc}
|
||||
|
||||
# now you can for example get the rsa host key from /var/lib/microvms/durruti/etc/ssh/
|
||||
|
||||
# alternatively u can run the vm in interactive mode (maybe stop the microvm@durruti.service first)
|
||||
microvm -r durruti
|
||||
|
||||
# after u made changes to the microvm update and restart the vm
|
||||
microvm -uR durruti
|
||||
|
||||
# deleting the vm again:
|
||||
sudo systemctl stop microvm@durruti.service
|
||||
sudo systemctl stop microvm-virtiofsd@durruti.service
|
||||
sudo rm -rf /var/lib/microvms/durruti
|
||||
```
|
||||
|
||||
|
||||
### Host Setup
|
||||
|
||||
#### Network Bridge
|
||||
To provide network access to the VMs a bridge interface needs to be created on your host.
|
||||
For that:
|
||||
- Add the infrastructure flake as input to your hosts flake
|
||||
- Add ```inputs.malobeo.nixosModules.malobeo``` to your hosts imports
|
||||
- enable the host bridge: ```services.malobeo.microvm.enableHostBridge = true;```
|
||||
|
||||
If you want to provide Internet access to the VM it is necessary to create a nat.
|
||||
This could be done like this:
|
||||
``` nix
|
||||
networking.nat = {
|
||||
enable = true;
|
||||
internalInterfaces = [ "microvm" ];
|
||||
externalInterface = "eth0"; #change to your interface name
|
||||
};
|
||||
```
|
||||
#### Auto Deploy VMs
|
||||
By default no MicroVMs will be initialized on the host - this should be done using the microvm commandline tool.
|
||||
But since we want to always deploy certain VMs it can be configured using the ```malobeo.microvm.deployHosts``` option.
|
||||
VMs configured using this option will be initialized and autostarted at boot.
|
||||
Updating still needs to be done imperative, or by enabling autoupdates.nix
|
||||
|
||||
The following example would init and autostart durruti and gitea:
|
||||
``` nix
|
||||
malobeo.microvm.deployHosts = [ "durruti" "gitea" ];
|
||||
```
|
||||
1
doc/src/anleitung/rollback.md
Normal file
1
doc/src/anleitung/rollback.md
Normal file
@@ -0,0 +1 @@
|
||||
# Rollbacks
|
||||
35
doc/src/anleitung/sops.md
Normal file
35
doc/src/anleitung/sops.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Sops
|
||||
|
||||
## How to add admin keys
|
||||
- Git:
|
||||
- Generate gpg key
|
||||
- Add public key to `./machines/secrets/keys/users/`
|
||||
- Write the fingerprint of the gpg key in `.sops.yaml` under `keys:` in the format `- &admin_$USER $FINGERPRINT`
|
||||
|
||||
- Age:
|
||||
- Generate age key for Sops:
|
||||
```
|
||||
$ mkdir -p ~/.config/sops/age
|
||||
$ age-keygen -o ~/.config/sops/age/keys.txt
|
||||
```
|
||||
or to convert an ssh ed25519 key to an age key
|
||||
```
|
||||
$ mkdir -p ~/.config/sops/age
|
||||
$ nix-shell -p ssh-to-age --run "ssh-to-age -private-key -i ~/.ssh/id_ed25519 > ~/.config/sops/age/keys.txt"
|
||||
```
|
||||
- Get public key using `$ age-keygen -y ~/.config/sops/age/keys.txt`
|
||||
- Write public key in `.sops.yaml` under `keys:` in the format `- &admin_$USER $PUBKEY`
|
||||
|
||||
- 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`
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
1
doc/src/anleitung/updates.md
Normal file
1
doc/src/anleitung/updates.md
Normal file
@@ -0,0 +1 @@
|
||||
# Updates
|
||||
55
doc/src/anleitung/wireguard.md
Normal file
55
doc/src/anleitung/wireguard.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# MaloVPN
|
||||
Running in the cloud. To let a host access the VPN you need to do the following:
|
||||
- generate a wireguard keypair
|
||||
- add the host to ./machines/modules/malobeo/peers.nix
|
||||
- enable the malovpn module on the host
|
||||
|
||||
|
||||
## Generate Wireguard keys
|
||||
Enter nix shell for wg commands `nix-shell -p wireguard-tools`
|
||||
```bash
|
||||
umask 077
|
||||
wg genkey > wg.private
|
||||
wg pubkey < wg.private > wg.pub
|
||||
```
|
||||
Now you have a private/public keypair. Add the private key to the hosts sops secrets if you like.
|
||||
## Add host to peers.nix
|
||||
peers.nix is a central 'registry' of all the hosts in the vpn. Any host added here will be added to the vpn servers peerlist allowing it to access the VPN. This allows us to controll who gets access by this repository.
|
||||
|
||||
- Add your host to /machines/modules/malobeo/peers.nix
|
||||
- Set the role to "client"
|
||||
- choose a ip address as 'address' that is not taken already
|
||||
- set allowedIPs as the others, except we want to limit this host to only access certain peers
|
||||
- Add your public Key here as string
|
||||
|
||||
After that commit your changes and either open a PR or push directly to master
|
||||
Example:
|
||||
```nix
|
||||
"celine" = {
|
||||
role = "client";
|
||||
address = [ "10.100.0.2/24" ];
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
publicKey = "Jgx82tSOmZJS4sm1o8Eci9ahaQdQir2PLq9dBqsWZw4=";
|
||||
};
|
||||
```
|
||||
|
||||
## Enable MaloVPN on Host
|
||||
Either you configure wireguard manually or use the malobeo vpn module
|
||||
The 'name' must match your hosts name in peers.nix:
|
||||
|
||||
```nix
|
||||
sops.secrets.private_key = {};
|
||||
|
||||
imports = [
|
||||
malobeo.nixosModules.malobeo.vpn
|
||||
];
|
||||
|
||||
services.malobeo.vpn = {
|
||||
enable = true;
|
||||
name = "celine";
|
||||
privateKeyFile = config.sops.secrets.private_key.path;
|
||||
};
|
||||
```
|
||||
|
||||
After a rebuild-switch you should be able to ping the vpn server 10.100.0.1.
|
||||
If the peers.nix file just was commited shortly before it may take a while till the vpn server updated its peerlist.
|
||||
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" ]`
|
||||
1
doc/src/projekte/musik.md
Normal file
1
doc/src/projekte/musik.md
Normal file
@@ -0,0 +1 @@
|
||||
# musik
|
||||
2
doc/src/server/durruti.md
Normal file
2
doc/src/server/durruti.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Durruti
|
||||
Hetzner Server
|
||||
2
doc/src/server/lucia.md
Normal file
2
doc/src/server/lucia.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# Lucia
|
||||
Lokaler Raspberry Pi 3
|
||||
7
doc/src/server/website.md
Normal file
7
doc/src/server/website.md
Normal file
@@ -0,0 +1,7 @@
|
||||
#Website
|
||||
|
||||
hosted on uberspace
|
||||
runs malobeo.org(wordpress) and forum.malobeo.org(phpbb)
|
||||
access via ssh with public key or password
|
||||
Files under /var/www/virtual/malobeo/html
|
||||
|
||||
32
doc/src/todo.md
Normal file
32
doc/src/todo.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# TODO
|
||||
- [ ] Dieses wiki schreiben
|
||||
#### infrastructure
|
||||
* [ ] host a local wiki with public available information about the space, for example:
|
||||
* [ ] how to use coffe machine
|
||||
* [ ] how to turn on/off electricity
|
||||
* [ ] how to use beamer
|
||||
* [ ] how to buecher ausleihen
|
||||
* ...
|
||||
- [x] host a local wiki with infrastructure information
|
||||
* [x] host some pad (codimd aka hedgedoc)
|
||||
* [ ] some network fileshare for storing the movies and streaming them within the network
|
||||
- Currently developed in the 'fileserver' branch
|
||||
- NFSV4 based
|
||||
* [x] malobeo network infrastructure rework
|
||||
* [x] request mulvad acc
|
||||
* [x] remove freifunk, use openwrt with mulvad configured
|
||||
* [ ] evaluate imposing solutions
|
||||
* [ ] pdfarranger
|
||||
|
||||
#### external services
|
||||
we want to host two services that need a bit more resources, this is a booking system for the room itself and a library system.
|
||||
- [x] analyse best way to include our stuff into external nixOs server
|
||||
- [x] writing some module that is included by the server
|
||||
- [x] directly use nixOs container on host
|
||||
- [x] combination of both (module that manages nginx blabla + nixOs container for the services
|
||||
|
||||
#### bots&progrmaming
|
||||
* [ ] create telegram bot automatically posting tuesday events
|
||||
* [x] create webapp/interface replacing current task list pad
|
||||
* could be a simple form for every tuesday
|
||||
* [x] element bot should send updates if some tasks are not filled out
|
||||
209
flake.lock
generated
209
flake.lock
generated
@@ -1,5 +1,26 @@
|
||||
{
|
||||
"nodes": {
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736864502,
|
||||
"narHash": "sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "0141aabed359f063de7413f80d906e1d98c0c123",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "latest",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ep3-bs": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -8,11 +29,11 @@
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706278226,
|
||||
"narHash": "sha256-PfLIjoCzTp/wBxEA1/lxH0worupATAHW2bM8qerm59M=",
|
||||
"lastModified": 1719395767,
|
||||
"narHash": "sha256-Uu7dhaTBdPplKsxQx37xGKihXbQymh80nNlxofjsEw4=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "5ea5fa2f15ab5eedce812c36546247494a73ed3c",
|
||||
"revCount": 18,
|
||||
"rev": "a4128e9603f9decbdf531dbfc6131d238742c211",
|
||||
"revCount": 20,
|
||||
"type": "git",
|
||||
"url": "https://git.dynamicdiscord.de/kalipso/ep3-bs.nix"
|
||||
},
|
||||
@@ -21,6 +42,24 @@
|
||||
"url": "https://git.dynamicdiscord.de/kalipso/ep3-bs.nix"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -28,16 +67,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706981411,
|
||||
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
|
||||
"lastModified": 1736373539,
|
||||
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
|
||||
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.11",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -61,13 +100,35 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"microvm": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"spectrum": "spectrum"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736905611,
|
||||
"narHash": "sha256-eW6SfZRaOnOybBzhvEzu3iRL8IhwE0ETxUpnkErlqkE=",
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"rev": "a18d7ba1bb7fd4841191044ca7a7f895ef2adf3b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1709426687,
|
||||
"narHash": "sha256-jLBZmwXf0WYHzLkmEMq33bqhX55YtT5edvluFr0RcSA=",
|
||||
"lastModified": 1736643958,
|
||||
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "7873d84a89ae6e4841528ff7f5697ddcb5bdfe6c",
|
||||
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -84,11 +145,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709557527,
|
||||
"narHash": "sha256-PV8oYqhTHX6FGZMQ1m5dhRuS914AhofPwgnAMhUZtwE=",
|
||||
"lastModified": 1737057290,
|
||||
"narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "d048d6fc4bada612ff08d4b9d5edc48d45389431",
|
||||
"rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -99,11 +160,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1709410583,
|
||||
"narHash": "sha256-esOSUoQ7mblwcsSea0K17McZuwAIjoS6dq/4b83+lvw=",
|
||||
"lastModified": 1736978406,
|
||||
"narHash": "sha256-oMr3PVIQ8XPDI8/x6BHxsWEPBRU98Pam6KGVwUh8MPk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "59e37017b9ed31dee303dbbd4531c594df95cfbc",
|
||||
"rev": "b678606690027913f3434dea3864e712b862dde5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -129,29 +190,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1709428628,
|
||||
"narHash": "sha256-//ZCCnpVai/ShtO2vPjh3AWgo8riXCaret6V9s7Hew4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "66d65cb00b82ffa04ee03347595aa20e41fe3555",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1709237383,
|
||||
"narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
|
||||
"lastModified": 1737062831,
|
||||
"narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
|
||||
"rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -163,25 +208,27 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1709309926,
|
||||
"narHash": "sha256-VZFBtXGVD9LWTecGi6eXrE0hJ/mVB3zGUlHImUs2Qak=",
|
||||
"lastModified": 1736916166,
|
||||
"narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "79baff8812a0d68e24a836df0a364c678089e2c7",
|
||||
"rev": "e24b4c09e963677b1beea49d411cd315a024ad3a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.11",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"disko": "disko",
|
||||
"ep3-bs": "ep3-bs",
|
||||
"home-manager": "home-manager",
|
||||
"mfsync": "mfsync",
|
||||
"microvm": "microvm",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
@@ -195,15 +242,14 @@
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709434911,
|
||||
"narHash": "sha256-UN47hQPM9ijwoz7cYq10xl19hvlSP/232+M5vZDOMs4=",
|
||||
"lastModified": 1737107480,
|
||||
"narHash": "sha256-GXUE9+FgxoZU8v0p6ilBJ8NH7k8nKmZjp/7dmMrCv3o=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "075df9d85ee70cfb53e598058045e1738f05e273",
|
||||
"rev": "4c4fb93f18b9072c6fa1986221f9a3d7bf1fe4b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -212,6 +258,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"spectrum": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733308308,
|
||||
"narHash": "sha256-+RcbMAjSxV1wW5UpS9abIG1lFZC8bITPiFIKNnE7RLs=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "80c9e9830d460c944c8f730065f18bb733bc7ee2",
|
||||
"revCount": 792,
|
||||
"type": "git",
|
||||
"url": "https://spectrum-os.org/git/spectrum"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://spectrum-os.org/git/spectrum"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
@@ -242,6 +304,36 @@
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tasklist": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -249,11 +341,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1696525932,
|
||||
"narHash": "sha256-LVnz6uIOR1QUPWERBe+nx8fM1wRM1SJf1WMuis9eh6E=",
|
||||
"lastModified": 1737548421,
|
||||
"narHash": "sha256-gmlqJdC+v86vXc2yMhiza1mvsqh3vMfrEsiw+tV5MXg=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "74e2f4e0a2a54fb11df59023fe0f188d0b5c3515",
|
||||
"revCount": 10,
|
||||
"rev": "c5fff78c83959841ac724980a13597dcfa6dc26d",
|
||||
"revCount": 29,
|
||||
"type": "git",
|
||||
"url": "https://git.dynamicdiscord.de/kalipso/tasklist"
|
||||
},
|
||||
@@ -263,12 +355,15 @@
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1678901627,
|
||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -279,7 +374,7 @@
|
||||
},
|
||||
"utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
@@ -297,14 +392,14 @@
|
||||
},
|
||||
"utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709126324,
|
||||
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
22
flake.nix
22
flake.nix
@@ -2,13 +2,20 @@
|
||||
description = "malobeo infrastructure";
|
||||
|
||||
inputs = {
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
mfsync.url = "github:k4lipso/mfsync";
|
||||
microvm.url = "github:astro/microvm.nix";
|
||||
microvm.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.url = "github:nix-community/disko/latest";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
tasklist = {
|
||||
url = "git+https://git.dynamicdiscord.de/kalipso/tasklist";
|
||||
@@ -26,12 +33,21 @@
|
||||
};
|
||||
|
||||
home-manager= {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
url = "github:nix-community/home-manager/release-24.11";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://cache.dynamicdiscord.de"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"cache.dynamicdiscord.de:DKueZicqi2NhJJXz9MYgUbiyobMs10fTyHCgAUibRP4="
|
||||
];
|
||||
};
|
||||
|
||||
outputs = { ... } @ args: import ./outputs.nix args;
|
||||
}
|
||||
|
||||
@@ -5,18 +5,100 @@
|
||||
keys:
|
||||
- &admin_kalipso c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- &admin_kalipso_dsktp aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
- &admin_atlan age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
- &machine_moderatio 3b7027ab1933c4c5e0eb935f8f9b3c058aa6d4c2
|
||||
- &machine_lucia 3474196f3adf27cfb70f8f56bcd52d1ed55033db
|
||||
- &machine_durruti age1pd2kkscyh7fuvm49umz8lfhse4fpkmp5pa3gvnh4ranwxs4mz9nqdy7sda
|
||||
- &machine_infradocs age1decc74l6tm5sjtnjyj8rkxysr9j49fxsc92r2dcfpmzdcjv5dews8f03se
|
||||
- &machine_overwatch age1psj6aeu03s2k4zdfcte89nj4fw95xgk4e7yr3e6k6u2evq84ng3s57p6f0
|
||||
- &machine_vpn age1v6uxwej4nlrpfanr9js7x6059mtvyg4fw50pzt0a2kt3ahk7edlslafeuh
|
||||
- &machine_fanny age136sz3lzhxf74ryruvq34d4tmmxnezkqkgu6zqa3dm582c22fgejqagrqxk
|
||||
- &machine_nextcloud age1z0cfz7l4vakjrte220h46fc05503506fjcz440na92pzgztlspmqc8vt6k
|
||||
#this dummy key is used for testing.
|
||||
- &machine_dummy age18jn5mrfs4gqrnv0e2sxsgh3kq4sgxx39hwr8z7mz9kt7wlgaasjqlr88ng
|
||||
creation_rules:
|
||||
#provide fake secrets in a dummy.yaml file for each host
|
||||
- path_regex: '.*dummy\.yaml$'
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *machine_dummy
|
||||
- *admin_atlan
|
||||
- path_regex: moderatio/secrets/secrets.yaml$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
- *machine_moderatio
|
||||
age:
|
||||
- *admin_atlan
|
||||
- path_regex: lucia/secrets.yaml$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
- *machine_lucia
|
||||
age:
|
||||
- *admin_atlan
|
||||
- path_regex: durruti/secrets.yaml$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *machine_durruti
|
||||
- *admin_atlan
|
||||
- path_regex: vpn/secrets.yaml$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
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:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *admin_atlan
|
||||
- path_regex: bakunin/disk.key
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *admin_atlan
|
||||
- path_regex: nextcloud/secrets.yaml$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *admin_atlan
|
||||
- *machine_nextcloud
|
||||
- path_regex: overwatch/secrets.yaml$
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *admin_atlan
|
||||
- path_regex: .*/secrets/.*
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *admin_kalipso
|
||||
- *admin_kalipso_dsktp
|
||||
age:
|
||||
- *admin_atlan
|
||||
|
||||
100
machines/bakunin/configuration.nix
Normal file
100
machines/bakunin/configuration.nix
Normal file
@@ -0,0 +1,100 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
sshKeys = import ../ssh_keys.nix;
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
#./hardware-configuration.nix
|
||||
../modules/xserver.nix
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
inputs.self.nixosModules.malobeo.disko
|
||||
inputs.self.nixosModules.malobeo.initssh
|
||||
];
|
||||
|
||||
malobeo.autoUpdate = {
|
||||
enable = true;
|
||||
url = "https://hydra.dynamicdiscord.de";
|
||||
project = "malobeo";
|
||||
jobset = "infrastructure";
|
||||
cacheurl = "https://cache.dynamicdiscord.de";
|
||||
};
|
||||
|
||||
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
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
users.users.malobeo = {
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
thunderbird
|
||||
telegram-desktop
|
||||
tor-browser-bundle-bin
|
||||
keepassxc
|
||||
libreoffice
|
||||
gimp
|
||||
inkscape
|
||||
okular
|
||||
element-desktop
|
||||
chromium
|
||||
mpv
|
||||
vlc
|
||||
simple-scan
|
||||
];
|
||||
};
|
||||
|
||||
services.tor = {
|
||||
enable = true;
|
||||
client.enable = true;
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
services.printing.drivers = [
|
||||
(pkgs.writeTextDir "share/cups/model/brother5350.ppd" (builtins.readFile ../modules/BR5350_2_GPL.ppd))
|
||||
pkgs.gutenprint
|
||||
pkgs.gutenprintBin
|
||||
pkgs.brlaser
|
||||
pkgs.brgenml1lpr
|
||||
pkgs.brgenml1cupswrapper
|
||||
];
|
||||
|
||||
# needed for printing drivers
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.acpid.enable = true;
|
||||
|
||||
networking.hostName = "bakunin";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
systemWide = true;
|
||||
};
|
||||
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
system.stateVersion = "23.05"; # Do.. Not.. Change..
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
}
|
||||
@@ -8,46 +8,42 @@
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "usb_storage" "ums_realtek" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "rpool/nixos/root";
|
||||
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
||||
};
|
||||
boot.initrd.luks.devices = {
|
||||
root = {
|
||||
device = "/dev/disk/by-uuid/35ae4fa2-1076-42ae-a04c-1752126b2aaf";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "rpool/nixos/home";
|
||||
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/fe34ee57-9397-4311-94f2-a4fc0a3ef09c";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "bpool/nixos/root";
|
||||
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efis/ata-ST250LT003-9YG14C_W041QXCA-part1" =
|
||||
{ device = "/dev/disk/by-uuid/A0D1-00C1";
|
||||
{ device = "/dev/disk/by-uuid/402B-2026";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{ device = "/boot/efis/ata-ST250LT003-9YG14C_W041QXCA-part1";
|
||||
fsType = "none";
|
||||
options = [ "bind" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/b4a28946-dcc4-437d-a1b9-08d36f4b6b27"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
{ self
|
||||
, nixpkgs-unstable
|
||||
, nixpkgs
|
||||
, sops-nix
|
||||
, inputs
|
||||
, nixos-hardware
|
||||
, home-manager
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
nixosSystem = nixpkgs.lib.makeOverridable nixpkgs.lib.nixosSystem;
|
||||
nixosSystemUnstable = nixpkgs-unstable.lib.makeOverridable nixpkgs-unstable.lib.nixosSystem;
|
||||
|
||||
baseModules = [
|
||||
# make flake inputs accessiable in NixOS
|
||||
{ _module.args.inputs = inputs; }
|
||||
{
|
||||
imports = [
|
||||
({ pkgs, ... }: {
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
})
|
||||
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
}
|
||||
];
|
||||
defaultModules = baseModules;
|
||||
in
|
||||
{
|
||||
moderatio = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
modules = defaultModules ++ [
|
||||
./moderatio/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
louise = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
modules = defaultModules ++ [
|
||||
./louise/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
durruti = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
modules = defaultModules ++ [
|
||||
./durruti/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
lucia = nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
modules = defaultModules ++ [
|
||||
./lucia/configuration.nix
|
||||
./lucia/hardware_configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
sdImageLucia = nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
modules = defaultModules ++ [
|
||||
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
||||
./lucia/configuration.nix
|
||||
{
|
||||
sdImage.compressImage = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{ config, self, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
boot.isContainer = true;
|
||||
networking = {
|
||||
hostName = mkDefault "durruti";
|
||||
useDHCP = false;
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||
@@ -19,37 +17,23 @@ with lib;
|
||||
];
|
||||
|
||||
imports = [
|
||||
inputs.ep3-bs.nixosModules.ep3-bs
|
||||
self.nixosModules.malobeo.metrics
|
||||
inputs.tasklist.nixosModules.malobeo-tasklist
|
||||
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
];
|
||||
|
||||
services.malobeo-tasklist.enable = true;
|
||||
|
||||
services.ep3-bs = {
|
||||
malobeo.metrics = {
|
||||
enable = true;
|
||||
in_production = true;
|
||||
favicon = ./circle-a.png;
|
||||
logo = ./malobeo.png;
|
||||
|
||||
mail = {
|
||||
type = "smtp-tls";
|
||||
address = "dynamicdiscorddresden@systemli.org";
|
||||
host = "mail.systemli.org";
|
||||
user = "dynamicdiscorddresden@systemli.org";
|
||||
password = "E4XaTzv5hi0ClsMRtzy58uQ6D";
|
||||
auth = "plain";
|
||||
};
|
||||
|
||||
|
||||
database = {
|
||||
user = "malodbuser";
|
||||
password = "aAljwdlaKQWhdakwLHdalkhwdhalaWLKhdaoiu";
|
||||
};
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
services.malobeo-tasklist.enable = true;
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
|
||||
24
machines/durruti/documentation.nix
Normal file
24
machines/durruti/documentation.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ config, self, ... }:
|
||||
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."_" = {
|
||||
listen = [
|
||||
{ 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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 9000 ];
|
||||
}
|
||||
@@ -33,17 +33,54 @@ in
|
||||
}
|
||||
];
|
||||
|
||||
services.nginx.virtualHosts."docs.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.10";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."cloud.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.10";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."grafana.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.10";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."tasklist.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/".proxyPass = "http://${cfg.host_ip}:8080";
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.10";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."booking.dynamicdiscord.de" = {
|
||||
services.nginx.virtualHosts."status.malobeo.org" = {
|
||||
forceSSL = true;
|
||||
enableACME= true;
|
||||
locations."/".proxyPass = "http://${cfg.host_ip}:80";
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.12";
|
||||
extraConfig = ''
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
156
machines/fanny/configuration.nix
Normal file
156
machines/fanny/configuration.nix
Normal file
@@ -0,0 +1,156 @@
|
||||
{ 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
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
inputs.self.nixosModules.malobeo.vpn
|
||||
inputs.self.nixosModules.malobeo.initssh
|
||||
inputs.self.nixosModules.malobeo.disko
|
||||
inputs.self.nixosModules.malobeo.microvm
|
||||
inputs.self.nixosModules.malobeo.metrics
|
||||
];
|
||||
|
||||
virtualisation.vmVariantWithDisko = {
|
||||
virtualisation = {
|
||||
memorySize = 4096;
|
||||
cores = 3;
|
||||
};
|
||||
};
|
||||
|
||||
malobeo.metrics = {
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
malobeo.autoUpdate = {
|
||||
enable = true;
|
||||
url = "https://hydra.dynamicdiscord.de";
|
||||
project = "malobeo";
|
||||
jobset = "infrastructure";
|
||||
cacheurl = "https://cache.dynamicdiscord.de";
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
#always update microvms
|
||||
extraOptions = ''
|
||||
tarball-ttl = 0
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
malobeo.disks = {
|
||||
enable = true;
|
||||
hostId = "a3c3101f";
|
||||
root = {
|
||||
disk0 = "disk/by-id/ata-SAMSUNG_MZ7LN256HCHP-000L7_S20HNAAH200381";
|
||||
};
|
||||
storage = {
|
||||
enable = true;
|
||||
disks = ["disk/by-id/wwn-0x50014ee265b53b60" "disk/by-id/wwn-0x50014ee2bb0a194a"];
|
||||
mirror = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"L /var/lib/microvms/data - - - - /data/microvms"
|
||||
"d /data/microvms 0755 root root" #not needed for real host?
|
||||
];
|
||||
|
||||
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 = [ "overwatch" "infradocs" "nextcloud" "durruti" ];
|
||||
|
||||
networking = {
|
||||
nat = {
|
||||
enable = true;
|
||||
externalInterface = "enp1s0";
|
||||
internalInterfaces = [ "microvm" ];
|
||||
};
|
||||
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."docs.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.11:9000";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."cloud.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.13";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."grafana.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.14";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."tasklist.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.0.0.5:8080";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.tor = {
|
||||
enable = true;
|
||||
client.enable = true;
|
||||
};
|
||||
|
||||
# needed for printing drivers
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.acpid.enable = true;
|
||||
|
||||
networking.hostName = "fanny";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
virtualisation.vmVariant.virtualisation.graphics = false;
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
system.stateVersion = "23.05"; # Do.. Not.. Change..
|
||||
}
|
||||
|
||||
68
machines/fanny/dummy.yaml
Normal file
68
machines/fanny/dummy.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
wg_private: ENC[AES256_GCM,data:YEmIfgtyHE9msYijva0Ye2w7shVmYBPZ3mcKRF7Cy20xa6yHEUQ0kC2OWnM=,iv:ouK6fHcrxrEtsmiPmtCz9Ca8Ec1algOifrgZSBNHi74=,tag:524e/SQt++hwVyeWruCsLg==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age18jn5mrfs4gqrnv0e2sxsgh3kq4sgxx39hwr8z7mz9kt7wlgaasjqlr88ng
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIVnB0dDdQT0tNSUJDSlhx
|
||||
QVFoVTZlb01MbVBwM2V2MGdGZFJTWm1FTW5nCkN5V0Y5MEp4K2FiU0xNVlRQM2xN
|
||||
SFJEWFFwTGhQWWwzNjlFN3NiakNBMnMKLS0tIE9MRHdnVHVYTG5rR1lGazdlK0Nv
|
||||
cmZiN0R5OW9vaitZb0JIa2srdmNMRjAKYlL4e8hfB0YuVNLM65yyvvCKl6EAF6E5
|
||||
YkAidAO5MY/wo1SDFQMeDub0Uso1QuNexYUZt7kzotvuPOzgywUORA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRZ25EdmdWVjAwWGhiVDRa
|
||||
cU9saUxnSXVDN0NodzI3aXMrTDZRc1FOUUJZCmh6V3lhS1FER2lyMzk5eU1XbXVh
|
||||
b3JFQ05GdEZTNVFTdFJjN3dTN2xBaXMKLS0tIG15YlVvVHZ5c2pYVmZCaktwRXFx
|
||||
NjJ5cFdTVS9NZmVWMjcrcHo2WDZEZDgKiDwkuUn90cDmidwYGZBb5qp+4R1HafV0
|
||||
vMQfjT9GrwB5K/O1GumOmvbzLNhvO2vRZJhfVHzyHLzQK64abQgF5Q==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-01-19T22:46:09Z"
|
||||
mac: ENC[AES256_GCM,data:eU3SIqAGrgbO2tz4zH1tgYcif7oe5j+/wmdYl2xXXI+D6IhiKrTJGvzE3rd3ElEpb+Bg0UQId952U2Ut0yPTfxGLtdlbJA66CmhLAksByoJ8lOXUcp/qDyA4yMRSuwYG2v7uF2crvue9fyRfZ7hl7abE/Q7Z2UjOKqhSZC5cO3U=,iv:NmCVvtBWZRzhpr5nMLy+98VuQZWoUms7xFSxq8PMvBA=,tag:UWjA7oqoNWh4wb0myNg7FA==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-01-19T22:45:26Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQv/fLoi/LsDTN6tDdw0rWQg1iG/6oFFxcYO44XU2vCd13Ql
|
||||
okvR1ZtvXtnM/FwTboK2KjxahkuAbapXXEvfWJ2W+d2L38aYxCPe/ryQhjrUP/jJ
|
||||
4IjFSa5R6oWca9i5Apue5In71ACzGCF/v2oyNAF4fSDX7Q+YKOMiwaDatfOAKp5v
|
||||
JlkcfIq6WBR+gKZsTCfLunURNJoKu7jz35OUJDmzyZl9u/xV0ENveQxaKa3hj87s
|
||||
hb7RGXqph6WWhigy+rtTqYQNjycRDHuspb2GgGE5N7OYteZo/XxA3tDz2EWVCYx+
|
||||
g8aEEvxHK3qEIcWbgmbKXNPNSH/CG1XQFaUhdSnkg5lMJsBuYToeNsPTS0o866k1
|
||||
wmoiI3nT2KtnV2SeR3UUMNDqSDl5unLgBCrbDi0m3Sqt9ubjCfuOYN2T19WvAMZx
|
||||
CwB33mVAevPy4Qs5IjPad1WtiaUFulkfJFd1iCM9dhA0RDxbIJRaVGCjqnaE4lW4
|
||||
yP25uKoEUSitgr5nLk000lgBQBkE3obMFZ+DPoNaqupremevGJ71LyjJhXwgzQvk
|
||||
7pwQXBZWybBFFcH7wDurSIJMqE1KP24Krshm7aR9yVNd3mEz7v2T5pbUywTP8H1I
|
||||
TkFpiaZ7OG8G
|
||||
=VXoo
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2025-01-19T22:45:26Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUARAAmhiwA8S+wZ0wiyIJwmRyLMWj3Xm95dTnEoeZmJ2I3O4g
|
||||
0szCKLdW8eUWrjZML09ByPYXQINkuyUR+g72+/ALEr9F587GxWDdMwcwLSlIYlX0
|
||||
3GwnJ7ACv/uTZjK24AXno3TkffPQy+rRQwXkpmUz7CMCeH/WRmVtf1LFUuxgbcrj
|
||||
Kmx9x52dn+ae5JOeMkEu4t8lAtI1pv1JRPnm6RIqK2N7VBRGjiD9SiyJiwLqV2GN
|
||||
7N+vepFhbBKPzt+CFpnPWnFePb+TtQmAdJVULedlFPLcJGsPMloEXSuunK2eKveB
|
||||
Vj1NO80i8PEVup02IlEabp+H7eYV8wZOviAJ7HGVhpw6kxD1tqO98KeSFfhuqbul
|
||||
ijaeF2COgf9lioR6Y8T+RhTqeEZK85U/OGXgiM7MdTdYQV9BrY5nR5XSYIrK6zl9
|
||||
TlS24DdM/Sd2939o+wdtgpm0FNQjW3WwA3n2QE/rqjQ6z2pyCTH16yRalAgHKNk/
|
||||
B3uDGxIO5ua6xZwPzFrOB7uKggB8W/lx1eyAT53Lv7MTRp9PW6mm+NoVkNIzmCYa
|
||||
5G2Y/bluKRt39O6UuSVrN8YLcyYCC+xYUfQf4Lr6/CwZ/XbgMTYm29+IgkOkgoS0
|
||||
UxPcmXUgxi98lu5IhdIwWTNtaWEvT9adwmd3bxebWgDmUvK5QxAc7BYUnGIe+C7S
|
||||
WAHA1m5OEQrNFLKGTSha/K20cDAoV2f4IAykRRWD3zieBAP3rzsIv78mgrMBIWP6
|
||||
z1L41UXlBToKfcw8TI9XKIlYId/asI7mR+bqT3oLSdni8qr32VpRjZ0=
|
||||
=MPBp
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
49
machines/fanny/hardware-configuration.nix
Normal file
49
machines/fanny/hardware-configuration.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.initrd.luks.devices = {
|
||||
root = {
|
||||
device = "/dev/disk/by-uuid/35ae4fa2-1076-42ae-a04c-1752126b2aaf";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/fe34ee57-9397-4311-94f2-a4fc0a3ef09c";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/402B-2026";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/b4a28946-dcc4-437d-a1b9-08d36f4b6b27"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
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: age136sz3lzhxf74ryruvq34d4tmmxnezkqkgu6zqa3dm582c22fgejqagrqxk
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2ZFBYMHMzTFRMLzhCbnBE
|
||||
MXkreklWSUVOckl5OTJ0VzlWS2tIOFBRRVVJCk90OXJoMHQza0hTSGt5VUphNjY1
|
||||
MkFrTHQwTHJNSGZjT2JOYXJLWExwQTQKLS0tIHlTeVgvRlU0MXA3cUl2OE9tYUls
|
||||
TStjbTBkMTNOcHBja0JRYUdvSWJUN00KtOPBH8xZy/GD9Ua3H6jisoluCR+UzaeE
|
||||
pAWM9Y6Gn6f7jv2BPKVTaWsyrafsYP7cDabQe2ancAuuKvkng/jrEw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhc282T2VVamFGcG1Ub3hp
|
||||
S1VwKzVsWW1sRXczZnRNdkxDWE5Sd0hhVUJRCkovNGZ1ZlN0c1VyMXV0WThJMGFi
|
||||
QVM3WW5Eam81dWpGaFd3bm80TmtQSlUKLS0tIFFSUy9SYWdKeE5KWk0yZld5dDYy
|
||||
QVZyNWVOMTh3ejBha21Qb2xCRkFERGMKH9nMQUoS5bGcLUx2T1dOmKd9jshttTrP
|
||||
SKFx7MXcjFRLKS2Ij12V8ftjL3Uod6be5zoMibkxK19KmXY/514Jww==
|
||||
-----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-02-11T18:32:49Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQwAmorRyo7mguHQxATRRuKstaXertmyz2AhKFr1Kr880vBJ
|
||||
ODjEKmkH77wIpOnZjOYrx7j2JWosoJ1KgsUUh4VlAPM3O6cXVwqDucu1d8O/HzK3
|
||||
RPuPfTKDr/lKl7QyQCx5lQuxE1/qn88D/g/fMQYu3NAVJa7acpTdSsfyo9nZ3QMb
|
||||
ly6YEyGDc/IhBy5igc7bIWy1o+XATmyUxA+jZVMLiBKhetogMC507Eq71tUCMEht
|
||||
CItRoFFPeoCzC8JPjpQNQmXoe5WDv3hzWpUBRJgjScYz3JuEfakbsAnzrPc41Mga
|
||||
yPhSPYPBtHlEt+DntW9i/CFLEJ+I0V+uz3gnNtNdHTIIe2AZbGympjZldZThldb3
|
||||
Tupo7ep6VQgi+hG37wLmQdvSVWR8lVJDMvOmV9xZqdFYfQdBr2gewTT6Y2QCc8GZ
|
||||
HBtJASlpIbydd/rtLtaTwtdOz64g+F5Vw/6T3ciyExt6RCoPALqZCoyzQnvnQm7e
|
||||
JPPauAs8BH8ejoDlJYjK0lgBBMSJTZ2xlGYh4wG8zmGtGok2wvXYy+DeqlXuCIy6
|
||||
7Xu4BLTL9eOZZo0sPR+RQfYbII0zMIc2fPBtU2c2z89YOTI44FI0BVbTlhLIIXXz
|
||||
NJMDln08MWwr
|
||||
=hhKC
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2025-02-11T18:32:49Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUAQ//cBdyq4JxOhU9t7Z9iWAp2DRObgv7HMbhIXh1351wuzA7
|
||||
Fe0Kqcoo/ekCkIPrLZOC5z4CMjXwOCPSncMMm5vK5ibixTlX9446+Hv7AQ1vq2Nt
|
||||
2daL8ZzpCeCJmi07Vyp72/NJOZYa6YY/gFiiRw044lNLFS//b0sYkipne5COjvca
|
||||
I7BxWCpGwLLWZ7LNKhg6i0at+0AqEdBDiwSE7jfeY6IL9tPOIqmBxYIWMbiAkPMd
|
||||
/nK8PVPrt41NkJkuxfjXcYowJRcJmAYHGiRUQaAkUZyRQxmolbLwwJ+/CVYxv5Kk
|
||||
hN5QvT82z5I8gK5LXrt3ZGEcC9dADkRSQr/qcWQT+CEnsGZi8b0unwUZZruDVb7d
|
||||
eIwICaXu62gH/mlJN1z/J5jEciwQtC9Eh932x5qY3sdtd6Gm7/EHTf9NJ9Zg3gTk
|
||||
nfytwpfUmtJO/bI5RvYSUkXkU6CLY6bqRW12+YrsAP+vDITYcLVEJGt7jrXDFto2
|
||||
Z9rlywZsQiZhLrzi1UImCTthcceI6Hd7l3TOYV84gMxdahBo3FLKnoZRK2I7ukGq
|
||||
Wi0KjajcsJ6LBUCCpMg/tW+TT8/+66QY9BDzcv/hBdRc4lCKNeKDwwGFPSFZCcib
|
||||
uyT8UB6iUYVMiNSHRqdGGcH0NwH45Oe2g9nF/lrJ0vYw1toN3WSpEc5v/Nch8DbS
|
||||
WAE3DazXQgd4UQ19q+5cC+L5POWcAjgWpZlRwBXBRdeOKFDF9maCPL6MpfMm6XG1
|
||||
/JNfzhipjL5OXgJgK7iUFJlH9AuD18g/by7yID0bTsg2fkfLglwjfm8=
|
||||
=Sdch
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
31
machines/fanny/secrets/disk.key
Normal file
31
machines/fanny/secrets/disk.key
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:H0oMKUXc6C28tHMwSgsppcdfYKEknPIIWGq3Mwk=,iv:lExcGcA4bvwKtqeeG4KS87mWlPBtCSSpOunJMZcQG+Y=,tag:F6Pke7woX/odRT7SMJwVbw==,type:str]",
|
||||
"sops": {
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBsdlQwRFZLZUtGamszckt6\nNmFoZmk3U1JpM3V6MkNZc2Iwd0VlTDJpekNvCkMzVm1qNEYyNEZmQ1o0TG1LRmpP\ncUhiWlB5ZTdjZnBHQUxVblA2V2s4WVEKLS0tIDhiUUdla09WRmR6RWZnbE5XRDAv\nWVV0WW9wMWsrcjdsdkF3NHgxMVFmRDQKeUAVQU/M1DGfAmee6CFvyTr8RkRBWjYk\nK9ceXyJSojHktwr/Xllm1mMm6H2lPbzba/JAyt99YVTD8xO056vu/g==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2025-02-22T18:09:45Z",
|
||||
"mac": "ENC[AES256_GCM,data:5IGtFkE5sGjXJXlXkPdN4e15gxh6QB/z1X5A0149koG3fvOPnoLPEU+DGx1qj9Z/8vilJat1hk7qIBalMPMCn2/T1PIV45Hpvih/kNoszkFMQ9r0EsZMgXgSJClHSg1JaiCiC3LvjsIWHDoESwVx3fqos1ClOLtrzKwptCEUp2Q=,iv:15QS1AwpuUr+EMw5YQe8ogb1Y58nQh4WcFjtzuWtcUQ=,tag:vL9cZRdsPCqaTw42pzRfOw==,type:str]",
|
||||
"pgp": [
|
||||
{
|
||||
"created_at": "2025-02-22T18:08:13Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQGMA5HdvEwzh/H7AQv/WtqMo4CAW5VEqo4vEL7Lj9Z/OY1h0zPF/bdkc9u6x7IP\ngqH60j9iF3n4ae717c4eKf59iN4+4tDk51qb1XdBOw1scn6rTai6KCnqNhiGeZF9\ndKsCZG5LxdbGkEFFw0Q+6W+gV6MiGlD4SBiKpjAsGVGcn42wygfTzpFRRA2Pmlev\nAGSUs5TDmi1IqQsvzYBMBM9+6sdsKhpRalXGS0gFz+wYGPFlK4E1rd6CBKRYEWtw\nm4kRe0nA2Sk4XhVZ39nPtR9rxrhB+d+Qq7AHIqD75SoY8vI+o3UyJ5Cee5MAmMcd\nn0EG24OeThF2p4lZw0iuUgtefqkc21/MoojYP6tfS7s0vGcq9iFjZ8PgUv3IKfrZ\n9EwresYfvhKbocZj2ywPK7iavFCYmqpTzbloGkO0AVfmHpWZRpxneOaGruCwFmGg\nF3qBVTcBSBDF972KDvm/TbKV5NQmRAZuXTrTBh6vgmVcaLN8LTLP3xRQlY28Ng2P\nY5l/5sZ1CGvhfv+G/24n0lgBF7I8pMTfsUEttzPONEY3pRaYyprYxdDlutHI2Kzp\nl0oPBs19rCSn79avQr5fE0mIvqJCoB5HVPkUDjNTaMNSJAywjQEWNITh2GszRTku\nBDvnzA2VnVww\n=aFlN\n-----END PGP MESSAGE-----",
|
||||
"fp": "c4639370c41133a738f643a591ddbc4c3387f1fb"
|
||||
},
|
||||
{
|
||||
"created_at": "2025-02-22T18:08:13Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMA98TrrsQEbXUAQ//bap7Q1HvJJ2KjVMhklTaQ2LG+TITzh0jvaRSXlXG+u5a\n//iWLTov8CH6s6e5I/T7FtslIcBVmyUX9vL9tCgVNMHy0RVG9mmykS0z5/9GY1tY\nEDcOOINQwrmuhWFHvc+9hzKEbLH7heR3ljMw9ouzBgFjEUdhFKJCIW9xrY3a45ue\nwBfaVj0tPNFMq/f/Zu5dDvw6gmYp9ziSMh3GwLNnMBmQDgdSjZJWQr+oa7KKSOM4\nu8ogeqP5Yyf7vDj1he+9TJpG8fdE68boYban9t9rfnyf0cRW7oHkpkwPtKvn9U4c\n4Tbl1RUqfHsTpHX+rxP8w/zgaLbrc0hJO1zxXeeQTOlS/0S1+i5n3pINFwzNXNBE\nIHgIpqOKabfpDFsL/DMIdNQZyr/iD4gHjzSeQPdyd0/4dbFMKPsVzA3JomE9z8NW\nRXz9Htb4Z4fybcPDOLxPkyM0qsEtdfb11U5l7IKuq+2ED5zOFxl+qhZrFz7vY1R7\nyaIM70HUeVCT7p0KZmWgtzjhafI8kTS2Qd7VjIF4Y721rB2opqaOKaCWjp4eeYI2\nE/TGivgRl57KgSF8Y8ucoC6ndsxwgJ4dYt3fos09Rbv1qFrlJftyD7m2kOXnPx5N\n5/2R4h3tiYQqGm727bjTjmGUtxToum3rY4sO0y38Woc+4BK3h/gj3AMir8DI7MfS\nWAE+yxIZH8y+c93zkZy34mEHafc6zPFD3QWuzbXzMGP+EMn710zaWmrVV1X3oLKW\n8lFB5sEX+BJaDgISOG7vgypNA+HtWZnRcB1CnzxboADE+HVAU3d+Bpg=\n=rfB5\n-----END PGP MESSAGE-----",
|
||||
"fp": "aef8d6c7e4761fc297cda833df13aebb1011b5d4"
|
||||
}
|
||||
],
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.9.2"
|
||||
}
|
||||
}
|
||||
31
machines/fanny/secrets/initrd_ed25519_key
Normal file
31
machines/fanny/secrets/initrd_ed25519_key
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:dsb1hdpeoH1Rc4Cz10cZMlAKL//GRUKQbTXvGuRcVqMtRVkmiVZonogj1FdpIFOY8m3zIuJKLpQp9i/RuWanRaThyOA4Mqo82N0MTkco0mwLfRhxqA2EbRv1dPgytVQvdNgSrnZI1FXtsQumPgO4KvifwaCG+Wu050NhPDC2Xt8i1U1TyMTkTigk2CKYaYgo+D9xSsA9ymjFUQgvnTn10t3di7cUJi3rBoEiZeOK/EAg1Y3h53AZ4p9SyG1kBflTvtE1NbIZNBYAiFkJNbIhT+Dw67Qv2Uso6oxL/I64IDOljMQz2874wZqpAL1w7W671KdlGtq0murjQ5Sg+g8RYseA1NVmTY7BCaGagNQuU6Ab0BSSdzIuDkH14BL1zGgprCqP0CE8WeWdUzCx5qud9emF24d+VvRKIiawTArSBe34VMnRq05OTKdmtwGZom7kbhD20c1/pwhytiJpzSE08iKy9cYGPGfirNJaxhT7z9XqSoECUg2XPI7Deh75PqoxM8pATLtOtOLp2cYSr2vSrqADMXzmR2M9ixEj,iv:RQH+e6ZADH2XMPqBeuHhMhHiksQg2iR4NUnYhD3pj7w=,tag:wJByTCrYf4cKxJaD2eTCMQ==,type:str]",
|
||||
"sops": {
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAzOS9jMmZoNWxrRTl6aVFu\nSW9oTTVkV3NiSGpDTDJNT3dmUWNmSURCYkZ3CnZJNFNEVTNWNEpvcS9NRjFTdExy\na0NNeTByblA3T0JFRXJacHlFTmRPcEEKLS0tIDJCa05LZHo2Rk9xek5Ec1hDODNQ\nOEs1Sk5YbTNHZGFtcmpqaDFKdzRpUVEKiUhTrGp4rXW3hHd8HueZ5v31CXpMACFT\nTq2OaVXUW7yTLFO2E405hQH2ZLS7KzkXeHmA4MZfbsq0ZkriXp956A==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2025-02-25T16:42:28Z",
|
||||
"mac": "ENC[AES256_GCM,data:iJS4wLJwJZRUozNBUBxL8wYOneGI1Et3r9+DtIs3JrQLEKV16n2SeRP0jRFyCO7VNkxyjnjXJwe0/GVbxtQbVCuDFaCWVpj4xNiEH3wMeuydU96E2QgHaWJGvhyj5e/5o3GO85DeF2ueFCa9DQKtTIWH1xPfqJwtZC2PGH5Uqyo=,iv:/TpULYHxSgFfMQyv715jLVY37AhSY/qh1Zn00UN8oOw=,tag:XrOn8ZpgWFYtSjatXn8sxA==,type:str]",
|
||||
"pgp": [
|
||||
{
|
||||
"created_at": "2025-02-22T18:08:12Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQGMA5HdvEwzh/H7AQv/dMSVIuM4gsG06tcN0NvWQgZUO6E8u2M3k3kUU/xk9bem\nSJFtHluWx26V6F08PP5AoDQ1R5Z1RhP7w3JDjVyscb0WuUzDFVTbJLpuPJIX+MOe\nhz8OqLatn24+fK4eMnQFbTELYRPEKicMmoJrFaTXdUOLkynWtxijzRlCif8J1u3e\nqj2fSfPd4SI9ERiGo5MBtHA9A6nwQvboMdnlGvvlAxFF26QL0xqu8jUdllfJ5IT0\n7y3vbGixV/M29MKzt+cJk7Wnb2y5UaZdelsDmxmm4FrIxHaQrAb/kIMiwf6zVCwh\nZFvNwcAPirduvxpcjOV99mJQ3v02mWo/p4Ey3PCwRb1tQYRxiMf7IJ/eAspmiI/9\nwK/2c6ehtBVXlw738JjA+WP36u+5S7CrvzNk6RLd0y76aNvGB6ZCT4rGm1B2DfR5\nguP+RJGcMFzhv55hQNCNUHZ2jvhLvDvSaCjlOaJZBC62gCygtlDqaLtagIO6RwKR\nJdatJCEjio5yD7x1d7PY0lgBVlbkXk8K3e5CN4RdLyoZStShW3uC6dCUGG1OJzPE\n0mfW5y683CcpMATeucHROtTxxrmp+BT5CyP9eBA/CrmTAJVMaWYM/Tb3+nE4Feal\nKlamR+tLaZdj\n=9/53\n-----END PGP MESSAGE-----",
|
||||
"fp": "c4639370c41133a738f643a591ddbc4c3387f1fb"
|
||||
},
|
||||
{
|
||||
"created_at": "2025-02-22T18:08:12Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMA98TrrsQEbXUAQ/9FH3RHkKEo88HEAXYPfJ3tjctUrn6Y1muzgyilfa9R7OC\nBNdSyXP8qU9FaIEEO9cwXKY6hB30l/b42RwL2HS5MWlNZTXZO9XCjV4VpmkIy88y\nkVhxdb2QbGQSBqmfyc9GOvI2LN3jIAE5fy5GuDREKRJPfVJu6x7IbC4j3tT+3Szq\nzOTF+ZfuUlM7FDzt4vAvP2LeOZxYKCg1va6ne7rtXsry9cIotP7fTqm0xPLZ/K+2\n/+HhC2585GdUXratqod1VfUPGyvdyhrn6WV+BAvUA8O8LYO5ZIkgz16vp60XNZEA\nCkjy/kiSlMorHiy7/ZtWHwWPNQbGxVJ/u6XurgzreDT4H5FvfyzvdKTz7IGYNYfZ\nvwMtQDEd3ToP6QUyNGfpZ5eRGb3I+8xNOd3z3XIXYGFYAOPHriGXMA8Y1g21f+c8\nz0QxXXDNXlTt6qdpumfgF/d/UCFJZeuP2t+mVnnp/gkK6yKZlUHD8L8XjkgumxB+\nvFFKOpPbrO+H+L375xZp9OJTINF5QTFkrmT/jPoexCkx9koxNhM0vIKEFE7+gFsW\n5GKQqz0n1HQgbFfdm2Jk7WQqY8r0weGedalYzkfDPlbS0AdCB9Llk/vwu5Tf+hcX\nIMbph8ZwKLzld9MzEplhHwBZ/Gz0Upp1IYj5Ifr50EnlHjBJ+Z8xXWKshJ/6UerS\nWAEiuOmlWRFGWRM5EdrXwh0/dj+ZyXG7unsv+jpNXjOE8eznaH4Kd9/PEmxazbFX\nJ1gtX6JFy+HXID2DJmXng6NxCzPWpo6prAH9IbMebNVQMzbl03Dtyec=\n=WoeJ\n-----END PGP MESSAGE-----",
|
||||
"fp": "aef8d6c7e4761fc297cda833df13aebb1011b5d4"
|
||||
}
|
||||
],
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.9.2"
|
||||
}
|
||||
}
|
||||
1
machines/fanny/secrets/initrd_ed25519_key.pub
Normal file
1
machines/fanny/secrets/initrd_ed25519_key.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOFRuQZweX3r9QQmAFo6oYY9zvrf9V3EIJOl6kFMgyLm kalipso@fanny-initrd
|
||||
31
machines/fanny/secrets/ssh_host_ed25519_key
Normal file
31
machines/fanny/secrets/ssh_host_ed25519_key
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:16SwZ4RZ89+TvwPVgEg+96PmNd63Oai1GnrRipLkxQmzfeAkQvs78emYUEVT/ouAnRFQRNagbhjA4nmfTTq1xGz1u8bacjk1ny1ckd2FmkEOQ7Ry181h8UE61rZP3c8yra2WCgOcsL22oUxUMhg6iswJqEKLImi3cmJ+hASPTc6L3vlZLcP3Vx6FEbDMGrVtfpHEliSicB/rkAOnjVHmxHmVRjx1AI7jfAjCoBGnLwI9X2XREGay9H8Kt36HIhlXA9dK+xkl6WdtkllHIHe3OYHqwd730g+1htMAWtHmyI/DPLLJG48pzITnKv3cQ3aaziUWJGa89WGnBuzxP8ZOagpnC1/wQi1WTR7d/4JYoslz06fCt1ouGT4ttDFh/YqbV0hcXqkASbUnnixicBaYeVrwvSkYvlbwToZ6L+Jc+eqQRrTKXxs5pIZ4qkvImDp85v3U1bDxXT+qhpK9hasmgBqgM9GYjgw8Um/imr9HqDp9ztRsij87mRW/l47vUhxRjrAWpv+J0OlptUIpRiLv,iv:7x+dTHtSbcc47X/ZGz/bcnOxkGDDBu33ZgNrOD1FwDA=,tag:B6s1Jt1KFCitya9oAKvp9w==,type:str]",
|
||||
"sops": {
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIYlgxeXQzNmtEZXZXNytp\nTnRTRi9nRHJ2bEdPVGhPMzdMY1lPOUpGckFFCkJkL3BVSWlIZ1dBVUliemFWNXl4\ndU9DamhTRUp0aGVwamhWUUZJd3dUREkKLS0tIFNkaGNzc1R5aGxxZWV2QytaRFIw\ndC81MDR5SUlESnNQRlhuR3doTWhYL28KMIMs9mPwVuFr5cEvO6goqf3zQALSO5BB\nrY0C8TfkHLvV57999U9kfyLO7Sm0R/RGS4IinQSCRQWEeR+qLxnEWQ==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2025-02-25T16:43:40Z",
|
||||
"mac": "ENC[AES256_GCM,data:dZJc0aqSD7dhe4Egih3z8QHIbwYDCGYU0DaOczkqHd/yMdcVNrNrcIR6yshArqCLl9jj5Zw3fIO75X09mvuvUCyszbjQyzSmTACp7K3skHuDRJ/yh5vaw6XNeJ3w26Dimfd0WfL1XC519DW532icrDiy2lCZ1qdcYwpqQUBKM/Q=,iv:4vx48jXxKLDOKfK6yYJWW28UaKl+EyqjeRAzV0WayEk=,tag:oO4cAVAv7N5aDAmK5V84mw==,type:str]",
|
||||
"pgp": [
|
||||
{
|
||||
"created_at": "2025-02-22T18:08:12Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQGMA5HdvEwzh/H7AQv+P8Y3rBJAAI2orY71hRSpCAJo/x4CUColQZf9xK4ZgYQ3\neW/15avJVso26mYiZJsTPaEczJ89igYKDrf8Ewi8NNNTmse/BO+BG8KX13QOSWKb\ngiRXMl6zpQwH/cmCXvUrDczjcUaG3vMpcWClfd3lfjEStVEzNB+OKCuRLxhKGYPn\n3HZ3Ypa97ei8uHMKbnloGigUouVKVCCLIqyrJCybQ2+UkOMzcMJpO96RMooWQOUJ\nU+0rLS2s3r8UnwQjEcedEITlmiTlZkTrUnUylcc22v3yVJh3UExCcoVWShqPUE2j\nJv667rq1EblbIzn/8vyMXxOoSYmrLJ+hgh6OXio5bbMUwd/7m6Zz2jEeTXbJi20/\nEl2V0Lu4pTWXhXxh+Y0MIdh2tHMGGWmHBk650e0M/JbnchxK5+9GblWkfzMV8scX\nPpDScHH+cqNPIsvtq/aYGSv5o2u5JfndEuW16cWU99mgYvX7rwwbRbI1zWVX5o9o\nQ6dqJGZEbtE0QilOKxiI0lYBTrDySzaWLTAngd3myVMvFBQ/K6VL7mXwJvDYgOcJ\nxHIExrd191e5eLr5MGQAzXaVietENN27aEDPw5WV9bmXoAKp/4muJnfOB/wBSjCw\nlutnbF0yLg==\n=MqvI\n-----END PGP MESSAGE-----",
|
||||
"fp": "c4639370c41133a738f643a591ddbc4c3387f1fb"
|
||||
},
|
||||
{
|
||||
"created_at": "2025-02-22T18:08:12Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMA98TrrsQEbXUAQ//UvOmGlNKLrRg5fXmc/paHF7YVFCGuBa0epuiVsVkS6NX\nQoa57oBJS0y22/dh/fb8Nu7/bMpa9XpPwfgzqhi7+5V/y51lvAIKmrYqNTnGdKB1\na9aiX0yxK0d5Yh0RK+9/2Q+369152mZXx+9Oj3SM8396bcfvTFX4jbhGdnKPqalW\nB1OO8HfYFAu4yl11uVD5cHSdhvXKJOa/GZPkb3TK2kicUdNX3HnZJ3PPGrkOy2EU\nuwFOIVIdNp2MUDFW+V2Nso/NiGcR96uKk5ZhGJaYrXjDDMNHyoLWc0d8wEg3n1Vw\nXOSNLmkSFY39ExKRWu8sijSyZIYN+Ul4t4WdO1Puop01xGTfAkYVQOLC+H4unu3q\ngboyNZCSuZXgG02B8ph/tLlAQ78d70YAf0nxkvzQB6TTNfQ4nyp8QnUJDkwaAnvl\nxDqDDhJBjlfIpqNLT23caKqgt1hSLv3Gcb486D8ZC+6nNuefCsxop82FaUMvL1uf\nWPMcAxMyv4REO8l9V5CDn1+6i+iPyN/Mo+hpwco+sYNZMlSs9PcNKILWZg1gv6q1\nU04IyEPym9VkI1jFte4dsljlp3C2R+l1Ikv5OB6dNpnnMVnTgkDwE0vqvsSTIwbS\nYvFoWBAsRlHMFLLfA6QjRyZpWemHBjrpaqBbIJEkZQnKM1IWdIg6cGOx+mFo1MzS\nVgEePpJj/PECZpH9PQPlv/FrkHa7zC/Fi0BOPposmuQgOUTq3sA5TLYNqPOH2Yn9\nHeQCGXpIeM08Pa3BOQRWDYM2vZPZpf3cBB7VK9zmcGEdE3NZxoBG\n=p1XC\n-----END PGP MESSAGE-----",
|
||||
"fp": "aef8d6c7e4761fc297cda833df13aebb1011b5d4"
|
||||
}
|
||||
],
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.9.2"
|
||||
}
|
||||
}
|
||||
1
machines/fanny/secrets/ssh_host_ed25519_key.pub
Normal file
1
machines/fanny/secrets/ssh_host_ed25519_key.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHqp2/YiiIhai7wyScGZJ20gtrzY+lp4N/8unyRs4qhc root@fanny
|
||||
75
machines/hosts.nix
Normal file
75
machines/hosts.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
malobeo = {
|
||||
hosts = {
|
||||
louise = {
|
||||
type = "host";
|
||||
};
|
||||
|
||||
bakunin = {
|
||||
type = "host";
|
||||
};
|
||||
|
||||
fanny = {
|
||||
type = "host";
|
||||
};
|
||||
|
||||
lucia = {
|
||||
type = "rpi";
|
||||
};
|
||||
|
||||
durruti = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.5";
|
||||
mac = "52:DA:0D:F9:EF:F9";
|
||||
};
|
||||
};
|
||||
|
||||
vpn = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.10";
|
||||
mac = "D0:E5:CA:F0:D7:E6";
|
||||
};
|
||||
};
|
||||
|
||||
infradocs = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.11";
|
||||
mac = "D0:E5:CA:F0:D7:E7";
|
||||
};
|
||||
};
|
||||
|
||||
uptimekuma = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.12";
|
||||
mac = "D0:E5:CA:F0:D7:E8";
|
||||
};
|
||||
};
|
||||
|
||||
nextcloud = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.13";
|
||||
mac = "D0:E5:CA:F0:D7:E9";
|
||||
};
|
||||
};
|
||||
|
||||
overwatch = {
|
||||
type = "microvm";
|
||||
network = {
|
||||
address = "10.0.0.14";
|
||||
mac = "D0:E5:CA:F0:D7:E0";
|
||||
};
|
||||
};
|
||||
|
||||
testvm = {
|
||||
type = "host";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
27
machines/infradocs/configuration.nix
Normal file
27
machines/infradocs/configuration.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ self, config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = mkDefault "infradocs";
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.malobeo.nixosModules.malobeo.metrics
|
||||
../durruti/documentation.nix
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
];
|
||||
|
||||
malobeo.metrics = {
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
@@ -8,10 +8,21 @@
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
];
|
||||
|
||||
malobeo.autoUpdate = {
|
||||
enable = true;
|
||||
url = "https://hydra.dynamicdiscord.de";
|
||||
project = "malobeo";
|
||||
jobset = "infrastructure";
|
||||
cacheurl = "https://cache.dynamicdiscord.de";
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
hardware.sane.enable = true; #scanner support
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
users.users.malobeo = {
|
||||
@@ -29,6 +40,7 @@
|
||||
chromium
|
||||
mpv
|
||||
vlc
|
||||
simple-scan
|
||||
];
|
||||
};
|
||||
|
||||
@@ -38,15 +50,32 @@
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
services.printing.drivers = [ pkgs.brlaser ];
|
||||
services.printing.drivers = [
|
||||
(pkgs.writeTextDir "share/cups/model/brother5350.ppd" (builtins.readFile ../modules/BR5350_2_GPL.ppd))
|
||||
pkgs.gutenprint
|
||||
pkgs.gutenprintBin
|
||||
pkgs.brlaser
|
||||
pkgs.brgenml1lpr
|
||||
pkgs.brgenml1cupswrapper
|
||||
];
|
||||
|
||||
# needed for printing drivers
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.acpid.enable = true;
|
||||
|
||||
networking.hostName = "louise";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
systemWide = true;
|
||||
};
|
||||
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
system.stateVersion = "23.05"; # Do.. Not.. Change..
|
||||
|
||||
@@ -6,6 +6,7 @@ in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware_configuration.nix
|
||||
../modules/malobeo_user.nix
|
||||
];
|
||||
|
||||
@@ -14,20 +15,12 @@ in
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.openssh.ports = [ 22 ];
|
||||
services.openssh.passwordAuthentication = false;
|
||||
services.openssh.settings.PasswordAuthentication = false;
|
||||
services.openssh.settings.PermitRootLogin = "prohibit-password";
|
||||
users.users.root.openssh.authorizedKeys.keys = sshKeys.admins;
|
||||
|
||||
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.raspberryPi.enable = false;
|
||||
boot.loader.raspberryPi.version = 3;
|
||||
boot.loader.raspberryPi.uboot.enable = true;
|
||||
boot.loader.raspberryPi.firmwareConfig = ''
|
||||
dtparam=audio=on
|
||||
hdmi_ignore_edid_audio=1
|
||||
audio_pwm_mode=2
|
||||
'';
|
||||
|
||||
# Enables the generation of /boot/extlinux/extlinux.conf
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
@@ -39,43 +32,8 @@ in
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# hardware audio support:
|
||||
sound.enable = true;
|
||||
|
||||
services = {
|
||||
|
||||
#mopidy = {
|
||||
# enable = true;
|
||||
# configuration = ''
|
||||
# [audio]
|
||||
# output = alsasink
|
||||
|
||||
# [mpd]
|
||||
# enabled = true
|
||||
# hostname = ::
|
||||
#
|
||||
# [core]
|
||||
# restore_state = true
|
||||
|
||||
#
|
||||
# [http]
|
||||
# allowed_origins =
|
||||
# music.malobeo.org
|
||||
# https://music.malobeo.org
|
||||
|
||||
#
|
||||
# [youtube]
|
||||
# allow_cache = true
|
||||
# youtube_dl_package = yt_dlp
|
||||
#
|
||||
# [file]
|
||||
# enabled = true
|
||||
# media_dirs = /var/lib/mpd/music/
|
||||
# '';
|
||||
# extensionPackages = with pkgs; [ mopidy-iris mopidy-mpd mopidy-youtube python3Packages.yt-dlp ];
|
||||
#};
|
||||
|
||||
|
||||
dokuwiki.sites."wiki.malobeo.org" = {
|
||||
enable = true;
|
||||
#acl = "* @ALL 8"; # everyone can edit using this config
|
||||
@@ -130,6 +88,111 @@ in
|
||||
ympd = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
#samba = {
|
||||
# enable = true;
|
||||
# securityType = "user";
|
||||
# openFirewall = true;
|
||||
# extraConfig = ''
|
||||
# workgroup = maloinfra
|
||||
# server string = smbmalo
|
||||
# netbios name = smbmalo
|
||||
# security = user
|
||||
# #use sendfile = yes
|
||||
# max protocol = smb2
|
||||
# # note: localhost is the ipv6 localhost ::1
|
||||
# hosts allow = 192.168.1. 127.0.0.1 localhost
|
||||
# hosts deny = 0.0.0.0/0
|
||||
# guest account = nobody
|
||||
# map to guest = bad user
|
||||
# '';
|
||||
# shares = {
|
||||
# zines = {
|
||||
# comment = "malobeo Zines";
|
||||
# path = "/var/sambaShares/zines";
|
||||
# browseable = "yes";
|
||||
# "read only" = "no";
|
||||
# "guest ok" = "yes";
|
||||
# "create mask" = "0644";
|
||||
# "directory mask" = "0755";
|
||||
# #"force user" = "username";
|
||||
# #"force group" = "groupname";
|
||||
# "write list" = "malobeo";
|
||||
# "read list" = "guest nobody";
|
||||
# };
|
||||
# #private = {
|
||||
# # path = "/mnt/Shares/Private";
|
||||
# # browseable = "yes";
|
||||
# # "read only" = "no";
|
||||
# # "guest ok" = "no";
|
||||
# # "create mask" = "0644";
|
||||
# # "directory mask" = "0755";
|
||||
# # "force user" = "username";
|
||||
# # "force group" = "groupname";
|
||||
# #};
|
||||
# };
|
||||
#};
|
||||
|
||||
#samba-wsdd = {
|
||||
# enable = true;
|
||||
# openFirewall = true;
|
||||
#};
|
||||
|
||||
hedgedoc = {
|
||||
enable = true;
|
||||
settings = {
|
||||
#allowAnonymousEdits = true;
|
||||
#allowEmailRegister = false;
|
||||
#allowFreeURL = true;
|
||||
allowOrigin = [ "localhost" "pad.malobeo.org" ];
|
||||
db = {
|
||||
dialect = "sqlite";
|
||||
storage = "/var/lib/hedgedoc/db.hedgedoc.sqlite";
|
||||
};
|
||||
domain = "pad.malobeo.org";
|
||||
port = 3333;
|
||||
useSSL = false;
|
||||
protocolUseSSL = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mpd
|
||||
mpv
|
||||
ncmpcpp
|
||||
ncpamixer
|
||||
# pulseaudio
|
||||
vim
|
||||
htop
|
||||
wget
|
||||
git
|
||||
pciutils
|
||||
nix-tree
|
||||
];
|
||||
|
||||
#hardware.pulseaudio = {
|
||||
# enable = true;
|
||||
# systemWide = true;
|
||||
# tcp = {
|
||||
# enable = true;
|
||||
# anonymousClients.allowedIpRanges = [
|
||||
# "127.0.0.0/8"
|
||||
# "192.168.1.0/24"
|
||||
# ];
|
||||
# };
|
||||
|
||||
# zeroconf.publish.enable = true;
|
||||
#};
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
publish = {
|
||||
enable = true;
|
||||
addresses = true;
|
||||
userServices = true;
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
@@ -153,18 +216,30 @@ in
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."pad.malobeo.org" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
acmeRoot = null;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:3333";
|
||||
#proxyWebsockets = true;
|
||||
};
|
||||
|
||||
locations."/socket.io/" = {
|
||||
proxyPass = "http://localhost:3333";
|
||||
proxyWebsockets = true;
|
||||
extraConfig =
|
||||
"proxy_ssl_server_name on;"
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
htop
|
||||
wget
|
||||
git
|
||||
pciutils
|
||||
nix-tree
|
||||
];
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 4713 ];
|
||||
networking.firewall.allowedUDPPorts = [ 5353 9875 ];
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
||||
70
machines/lucia/dummy.yaml
Normal file
70
machines/lucia/dummy.yaml
Normal file
@@ -0,0 +1,70 @@
|
||||
hello: ENC[AES256_GCM,data:ehp7eckur8THsbnSUcFYobA2SVDORUpqBcPTWC6/EvunlZbihaJoDoSfSh4Itg==,iv:nEHRg9TfYVdmJgrBs62Tek/3JhwFz8BMKHph4ThUqA8=,tag:1h2DSiOk4khxhRc7YX9ljg==,type:str]
|
||||
njala_api_key: ENC[AES256_GCM,data:vGH79aN2m1rZ0278ydoCQ0U5393HL0AZlajTVWcRbD+/V7QREN7ROW2LrdVK95I0cxobmJQ=,iv:vMpFTwWkC0R1/J9fZaks7c0G1Vj64/ryRkN5EgpWCdU=,tag:g2MJADBrJYTbmj2bhUQ8UA==,type:str]
|
||||
wireguard_private: ENC[AES256_GCM,data:T4c0qdFZdrwRU9i+nzAdg4ePEVXyeG4e/zNyn8G9Kd//Fwu1woNhQiyDuAo=,iv:VGPCSeU+RqjUdUlLA+RaCXQZK6AMdE4BwOdxM3whwaM=,tag:pXOwj3zxuFRpv2TInjISuw==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age18jn5mrfs4gqrnv0e2sxsgh3kq4sgxx39hwr8z7mz9kt7wlgaasjqlr88ng
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSArU0lpUjBadHc2c1lPMUtv
|
||||
dmtqRTd0OEd6TnJrQjJaaFFaMjQ0MWlONEJZClBrdVNMb2xhK2RXRzlmN2dmTzZk
|
||||
SStWSzVGbWdqNEFpMnc3RFdpYWNEcTQKLS0tIDY0SlBvcmJ5RjFKTHQyN3lpSEZ2
|
||||
Z3hTOHN2VWVPMENVS1YzR0Z6Y0MxZmMKf0K43yWL7DE15wqEWb6Z0xsQ3nb1Ybyi
|
||||
0gKxb3hTeoWJnJug3hWyeAJvAJ4pzaA5v8PonnSIJK4UxBUnr+5nGw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIa0pnOGFlYU5OenJvWGhl
|
||||
TjFhU0NyWmprRDY3ZWIrRHdmSVBMS3pER3dZCmVQdlVYQ0pFRTBwZXQ1Z1V5ODVK
|
||||
dkREdEpsYk1MMm5kZU1hUEJYRWZDVjAKLS0tIHdsUjJTaURjaGErclJadTF0clhh
|
||||
aStSbDZ6NWtFZ2NrNHY1a29DTmo4bGcKfZZjFA2j5RgMf0crK8TV67iVizzmXvBR
|
||||
6tePJuCePnNDOoZ7WV5YThxYOPSTI1QvfEvcC1qo7l3Kca9jdkkfbQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-01-19T22:46:57Z"
|
||||
mac: ENC[AES256_GCM,data:GIRj11bDZi38RobJvGoOf5geN42gaGk3294EvB21M/Y+lAsDOUUUbU1fQbBPRUsYvA/lyuHMQWRORTdy0LdjN9ejzwcuev8+j4i6A1zwPSmjIL2+Jp2pBqQj0F6th27hECJlh0wK3vU/aNcccRJP9kEgRME+7FS5uYw9r+ZPJWk=,iv:CUgdVr1b3O4niYTSFokA9uWR3ceiU+6qo+3N+K1BZ3Q=,tag:AERU8MZWHqVsZ+zbT27WIg==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-01-19T22:46:34Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQwAqm3KeXNDFMwVoz9qIIqtNHR+KIcdvdRTlG0GA5BEBiHp
|
||||
hSGkyK/Ni3GGX0WYU5Cf85Id/eEoxqDqDd9kX6MSZK3LBnH+hFy4JiSPENVpmwfQ
|
||||
eONaMwdfwI+/5ZfquVj/AApTXZ8ENhdBzLTuAfIa2hGPDwwkajzkVIg18TZOvKG6
|
||||
f2wiEpnSOVHKnPcGhI1dGxN9TqqN74IUoPhThRzQ79l9RcTEZVClos9IPOhaPfk0
|
||||
TvcBQez3G5Mn8W+s7kg4rl7g6XRZqjcaOuNwopB0x+Dx+alZExsTR6A+1Gf+29a+
|
||||
ELwQYg2mkKUi48vrcKXxz+OMhW7V7wuXQIjLP4jULc7LI3ShRP8z4QKy7asOVRBh
|
||||
XPjxRJ2RcTtEHYUoW3guzoZGSiPW/ex2fcupwaSRDG2GQ/ImiB5dmXSaG2va1MbX
|
||||
z93Ej7Gy2IURglWCK29v4mJiqtDzq8/GNztT7zezHxyUAjjuJ59qXzFF/MQPibxY
|
||||
p3dTfkNNrTqrCQnrFa8k0lgBtKmvz/HO3eCguXVMNgOt+BmfZbJqq+AD8HKYNxaM
|
||||
W0A+9WRmYXcOEUqfaoX9IE9LhgqDd/xgpW4CujUZrXRYgf4IokSm/MFAD/ZnoxKm
|
||||
n2My3wf5PCNd
|
||||
=oUOe
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2025-01-19T22:46:34Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUAQ/9HD1muIaf8us6XE5hGfrXuy5axFeJNBtc8igo/OP3jCam
|
||||
M2pjwDNIX3EjsgrK2WYo43Xt7aHW5bqnP+d1faLXJ3I0cMia3XxSLmaKswQRrBSi
|
||||
P00ew43kBSx0Smwixf5zCSCzBpWrtOXI8monO8xYLtRnSpfKBf/4kc2gQiuAxByd
|
||||
fxdE/x1et0XXiK038KgHMnYdOIvMTGcpymoSDHk0bDw+ruBqG93cmzOkT4Oc5CsF
|
||||
oeFN83ku1cGFQr58hUhJ1q5eUTK/lDEVYElGJ2n0pGxThYyrUz3SIzZu3Jbxgs/Q
|
||||
2Xok4KsNPEbY2VKz/d3nrwbg2S3VF/CHl9sKxoFK8g3WcEE+HO7BFqvz901H+aUJ
|
||||
5mN7stKSs5pViDHusv3Kv2+eT2fPJ4lPU2IEvXkCt3jjB/G0UDz+t6Qn1Wr8PPcO
|
||||
8u+QafpILgYTK7QOF88GYstq8iWOWHlN9VKFYfqHMGWkrMtnGRWCbXsNmg7lKh6D
|
||||
MtdvROsESVDKtydZwBpoQ4ILLROhkoL+eOMzFOgc/i4PWFlva2RBuRnZQNlieq/R
|
||||
9aYpGsZbD+YYGjQKhlwwakpWK5XOoqqSh6Fv6Qzonu2Y++Zf9c9zpe+LINlUhxEY
|
||||
AA1YnxbqvVJCqoBuq5avAd0fivhFDes0OmR7jLZzluotgwUePwBOVGo5l2ow/03S
|
||||
WAGO2443OWOfbmTi/mq1C/8It1WAkC70XSQbff9pHLd4pRA6XgjMXbJ8+5X0FXRM
|
||||
H5nWOAaO4Dp6SnccT3Q9zytkm+lXdJL6Rou3PkmP4JBvU535bNv5a3k=
|
||||
=732R
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
@@ -1,71 +1,81 @@
|
||||
hello: ENC[AES256_GCM,data:3VuyuX7MaLSmor4W22F3FUCGp8SUq4pE6z5nuiZenH07+zEeMAllVCP6g/j1fQ==,iv:A3Oh99AchsmrkMEb4ZRSIigb8Cr+3WlQtsgyZJGpLY8=,tag:TOHF9BaydkRD6cJAndryTg==,type:str]
|
||||
njala_api_key: ENC[AES256_GCM,data:qXGngMJaAOk2Gb8B4nwMTht9Vp/OEhGmKS5vh1kpi0MyqcsmwuwpWuUz+RWD6NDFn2w/35M=,iv:lsZyCrmcT1xJcLjzK4zkcRYmbKUeLUFYZ7oDfCVJV8c=,tag:WK+aF3XGBRDQuvL87Qdusw==,type:str]
|
||||
wireguard_private: ENC[AES256_GCM,data:ZxGbYLQKvrPibLpId+xbvqphlcgm/U5Se9XMS4FogmY4HfJnh9Y4Ja/x20I=,iv:PnZjiyKk1XuIq5/NLtOdWh20ytDEMYM7LJqmCoSrD0s=,tag:CZErG28Lo3aiQGovxEeZtA==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age: []
|
||||
lastmodified: "2023-10-24T15:09:51Z"
|
||||
mac: ENC[AES256_GCM,data:f/wf0EuNmy+ic/k+fHg3IJ8p4I8BftFn6QwGJsXJgTBDspe7Plnwh+kGEqdPg8OEbWy/1niRfCXJa/vKoquWsxL7LUP2lGYT7lj7QYuj2F8fo2WIe2qhCikuxO6Q1asKyBcebYv5KAY/yQlVBYs9X9tcU6Fu4IU2AmJhjYB6m3s=,iv:K3DCEV4/FocdnEulNM9snH4uym8pAZRSmsYbM+rghe4=,tag:429oJE1du0IRl4aDuLzoZA==,type:str]
|
||||
pgp:
|
||||
- created_at: "2023-10-24T14:42:18Z"
|
||||
age:
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGaVZQT1U3cXp4NHVSb2lh
|
||||
RWRUcjlGY1RtNVNFT3dMSWFaZHJGcC8ybzFFClhhT2RPRHZwbWNSQzdSay8wc0h5
|
||||
NHVUN082U0lhcWF2MnNTaXQ2Q0trRk0KLS0tIHJrNmdEdUI5YVRqck8vejRrVHZ4
|
||||
aVFGZjk4UjVJa3FoMDJiaXR2MmdiQ2cKSVgIdxPBNTbNFQbdI5ECNGQrDUK9dQI3
|
||||
f3mHj+XAPmEtjUXLyxUI1gQ+8toctnU6cgJ+HdGLX01lgTHwz7uieQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-11-14T18:10:54Z"
|
||||
mac: ENC[AES256_GCM,data:DPQsRraMAvoezHsA7uM8q8sEevnZRnpU1vydEL72r6KJj12dT58KXCTuUeNgD+320LE1i83k6HLdM9C/+uniu73Ba5JSwglLLDBkZpfsdCde0aqkGjQd/RF/0Vb8ZbE/KCCCMVOjT6hX6RSDSEujoRMY26n1CWYtPeivqpWb5NY=,iv:TarRTCyPRoyQEb3qoXAJcOYtrTtftyZO4ahkyTZT8qU=,tag:A0kqa1szfk6Z5etivjB/lA==,type:str]
|
||||
pgp:
|
||||
- created_at: "2024-11-14T13:02:46Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQwAqFy6FthlG4of1IYE42baCy6AHhnCxTKN5i0/ZYXtxz/T
|
||||
xWTAKEXPlbhT4AMGdIvIbEf7od4Pr7xxrxERkHVn1rkHxqjF+bjFw9J2xRXJvilw
|
||||
L4pWMKXoJOiuGeNwJfzOVMx2yar6NiFmA3HvFyCASIQeCh3v+cyEDvbdnJoUyHRJ
|
||||
/f/VnQFSIM4YXvLMqkKXgE0ZnbZc+vNnZkAG2qbz65fB/zdOPQZkVYCbnVKLwiBd
|
||||
eoDth5WbuPnYbK5Vp9wkOPr6KqjM1KN+Kx/ErZ36Ldd2ePk11dCf9O4cE1HcCOmb
|
||||
mdnFleX4hbMH2bFCpt7HoJql7QsTodx2bX1wnLA+uUVrV5QcT74C/0yAYHhBELez
|
||||
cE0gZ+th9l2tOCaCBBMQUa8EfoQD3hEnOmebOMcWoUQdkyKk5SlLeCVsuWKvbidh
|
||||
3Vvw7jINCTH06jPCWSewSBuTdPiAPJ+4CQ8DWXC7A4luFvJM09HX8h859VDEHA9a
|
||||
FCou1ZTWmQEHbDw1DPw70lgBv35pPduQjSfgM71YwgHFtHDdTfWTbzCBoaDfKvj2
|
||||
XWSevuyOKiinaiYd4jPK6srFyX3Horg1QvVzl3dvNC3o29lrzETSTFoUx75KdluT
|
||||
WxGMHNWqN7NS
|
||||
=XZkW
|
||||
hQGMA5HdvEwzh/H7AQv/QepkThVCOMoRZRtHSHEjEriFfp9QS2ZrlgM0p67TtzU3
|
||||
edAPqxNq8jGeW7/1FRAwIHGTit9FueL/GRUOVsepbryJMt4ndhybuPdpuEaKeQYv
|
||||
aZLw3XA5FB7maMKFOl59wqoWNrY+d02lXIbLEafUjrL94/p1IEqQd5a/Ze244yXI
|
||||
V1ty93i6Wmu5N5uf67bfiY00ObAEU+L4QepLHuJvcP2lWU0zvxnPdDqwv+47R1xB
|
||||
aJX2G3Vv6QRnpUYL81a8R4E9u9GGH0TwJdaFqQwsVgW1XJdCsAaB5wriqEWX5HOJ
|
||||
513plEpkBSSlZo/9/lUSHK79jP92DfKvGMxw4t35UULzsJVbCIkM/TzBK0Ruq7Bf
|
||||
2rQO1nkF9lqXqPK7ORAkdXX3foHcM474f3w5nCSSlPia5jn7y58Npd9m1za4lOPF
|
||||
rQxHCJ7OSJ6KOsXhDi7cmMfjIfn6cUj5wT685LbjrftYPh95R2lK/ViwfhMQkJb9
|
||||
lCUqJj/7N6UuSDdnHXKg0lgBV5k+ARqh904rR7GTpSdDuSVMVdy9mUGni5V6xTNn
|
||||
2IyJzWlvxbUumdh7SVBV5HRjG/sOcmlQtsw2fT21CCFg/n6AdCMgRbtYDoX5OOJc
|
||||
qkz9uKEGrGjb
|
||||
=wPkW
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2023-10-24T14:42:18Z"
|
||||
enc: |
|
||||
- created_at: "2024-11-14T13:02:46Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUAQ//XRoesGtcKw0RNs30FfKgpG/qNVRh4eJTeb1AP7YO9nKA
|
||||
WWuZnomu8aDDKiP+why4Cl4raSb2LqTaDAIbeTzw902BeOlIXl6VO5oIWpgC4IQT
|
||||
iOMUOTQ6XG4O8xcphItIthc71kpUl34xfWU/Gz67cRj/BSlws26sJ09lH5zZIpcW
|
||||
1NNPLQKF6KiJ1MY9rTkq9I6EHbaIh6AcBW4buq9x+qASoU1Blp1OgA9m6O9HjQcH
|
||||
X/PKnYv1bm6OxYsMBujXnFnde3c+qfL5w1e4a7pyMu8EthAYLPbm+WT2+H1RJooN
|
||||
0+M3tBBjtK6emm7qgNt2vyeIYa5L5XSFYAyPfteKZ7tsT1IHgg3cY/3trchq7w7q
|
||||
D10fGzfw1rP79yI9vY3oQLi4APhAq/RYpFywZJ+qyE+KiDaIzBdhU14NKRdOluaF
|
||||
apw5ZpNwD77E6lU5lLdjO4TjaMXjEuytzhmOHF+CrZJN/4c21K3PflnzRRLmcXIf
|
||||
OY+TPWPBKqg9aXIhx+5tGu3OTmrvRuBsoforZrhHqzYZJygliD4w/D0HpcMfxrJ/
|
||||
y/iFzwqikikvfkF3FTiTwiFSLOo8G+rCA2TiSLqM6eklAGtzqgrgggnNVDstgiHz
|
||||
DuXHOdzt9pn3DQHb3Z+kEd8p9TEykQrVr6mcW8scvW3iZ6XBbSoxUDY2W14gNMHS
|
||||
WAFbpyIyM0JV36DifyFLFuPNF+ZFexnD1/2rzSw5dmDh8Pou9KZnoRGirXbOIFBf
|
||||
MwFQRonyDxw8zcMFGhXRmNbfqOE9ImnvkW2pNjYJSuBW4LSGaG8OHx0=
|
||||
=2A7P
|
||||
hQIMA98TrrsQEbXUARAArYZZpOEC9sZ4Bgbtie8snwYjhcJiLxcmaODcx0ai24vC
|
||||
FOdxKrgxlHeiBV3e+xD0Mdc51waXpRW7Ah6ctyqRreDXXCsYx9RTjkxqbGQTKexU
|
||||
OAzvi7qPkmZBzDagNeJXjAMc3Z9uPFTxO0c1degnv0S40dns4sZ50sjGz8Dg6DmX
|
||||
HC1ZANIpCmJVd+BFC9MxWQFSP1oswzwIxAmM/8d3aXGJLUQsfFbZXTPaKB5+Llmu
|
||||
Y/yGK4zwcq0PR+YNw9d1lfQD01coLcqNh0cnxW3/DzSnKdpLnr/HeH7K6NivUNOs
|
||||
58E4iKJgopZZofbIKrHTPik/ZfovCTwPHo0o/m9G2sDB5Y++OJBDcjyD9BC5OEzg
|
||||
JW+4rG3dir5cUxJhgM8ZNZUiLcKWSfVo+Xh1RI12Huz4PpZ6dWSpuPxWFBQUZSfp
|
||||
epIUII1u1cKiep8JK5ZUF3k6LzET6ORzzYpY5qGtSEVMLMxLvPK+ECOI1BTHc53Y
|
||||
GoBPVRdp2Bs0QZuvwiNSd3wKRMoVh8v/8+RSCGRR6pzCfvTp3X4zGfnCUVO9krzG
|
||||
ukZJ+eQVUnmywewmYuFH/USN34mqRk6UTkVmw4sgy4bqcV26xSeMCbLAVBoV7dR8
|
||||
a35kyxrs2MIsu9/SuW8zSdfZd0sBhDIEgzQqT7fO1KQQCDJyjBTzjloVSoE4TSXS
|
||||
WAE7lEhifj43H/jshtyaIgM8UpdFmBtEj9BmsX2jeS5XiZsIbIJbCsmPWYdd4XQ0
|
||||
m5M8KCUEMDXeVCygKieefCyboUSNOk1gdRmnIRcqJ/r8fxmHqZgn2ko=
|
||||
=DC78
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
- created_at: "2023-10-24T14:42:18Z"
|
||||
enc: |
|
||||
- created_at: "2024-11-14T13:02:46Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA7zVLR7VUDPbAQ/+O/+BPNT3PxzN85kpL6xXfyCf337Ay5gwhJOg5k3JyEwO
|
||||
2L1eZncGZHkdeExxgfqWF1yAPvE7vXltikTVp3V+htHoNL8kck8obII/HptVUCrU
|
||||
VjFm41kEoWQ9DLXIhmppqBC0hWVkLjCDEXcD5HqtAxt2yKENSFr3pEnFl3vgoHTA
|
||||
2TpzC/l2kC24hzk+es54I0sCd3N1LEXC/mBUmptnsZfIcgGdVOWZSGabHg5Mo464
|
||||
qc02MYa2Tjuo5svlHGv8bgpQgsIfuB0CcirLMH3FYwKkYHZ7a6KBZj9DwNlM1BYL
|
||||
m9eIC6+R57utfV+zgvIaQVDVJgFT74/ffgEYNiX2FRWi0ri6gb4ybf8qX+/m8ZOi
|
||||
KDgpATMIr0Lw85lQ2mQmvt7aeULJTl85pE1ihXLu6+pGEQR/48WeRu8OVMU/QHQF
|
||||
rRWoJu2kabdlBkYXBBGPN2qGRe/TWWHRm0G7mTnXkoN2idRkodJcVwM8Mvstc5Yx
|
||||
3AAb4asl+4xusXNqe+V4ZrkzdnVoFs8RRZyH1QyoqJ79S5uZqOkYObiiJ+wWtahZ
|
||||
emvN8nhNIr9+WdDFSZYNx+TQTUTFMefcEaTXpPzmUn/nENrvkbXiaVSSmIYQ4YZh
|
||||
1vyiW1W6IZwjXI/aR6P2C1Jrj42WCm+cDXCwKZC1sMRqgkxQBIVukQzAHkyFJknS
|
||||
WAF/TWfXG2S6mnWFKn3cixifUI3pBp+EtYy/CjL7uNBIUQ3EHEbvS5AboSCmgRC7
|
||||
wLzHshawAMmJ/bD/jT4wWD0w+NGDzSF8D4b/Ee0LP7R70noS61+s6xo=
|
||||
=NnkE
|
||||
hQIMA7zVLR7VUDPbAQ//S/8UshLDL5DW0+DXMGL7u/ug/sgCbSM60PvzT3hwAvyL
|
||||
3mR6CycERSeXuYM67fLIa66WiSFGB1aqEsI1oqPL6W8AwjtGHDKSPhJC8W+9NosB
|
||||
OypoV6VppHiDxB2uJvQl7VNnT8d2x6IWdG0bq9NKxCg+6lorw8bky0907qQ/6+hg
|
||||
2eWI0wPcJR2zIEm5JdNvuyK5k03QPKbTd8aVTeYHZq3JiXF3NZmQHCngdI0iH7SN
|
||||
+QI/p1d/aiyCc+5Ow+Zy5YzPWb22PIROLIH+wJsGxbiJtQJmiKMNQg/YJ/SsCrMI
|
||||
ViI80R6bkZ/J9hCN2reTTJXl9uc7PgptLAfMlT2N+DHLRoKQOR+e3xMX3vZO9CK0
|
||||
R8v0wXPs3NGCBdITu+EPT4twtkjJz31PhqL7crFzm/x4BLiKuNzep+Na4TLMBv3J
|
||||
pVdjc6yen8bYvVickLP/hrVIvflkaMdUncWmS2lNZKP9G2BuGMna9Dp4jC1kWWYW
|
||||
608MXgORINmwog2lovxFJGOtq500gcbeYO+LrluULk00/nw27DPkGeD8wkmFMF+m
|
||||
c3dhA6zn62nLsUmiU4Bfo92uhxBW/hAF5Fp+RVwA9ptvDdBO7gY6FEZitEXs/rGl
|
||||
64RAmFuDmv/WDE87pfBQdlZ7Y1HkO6CLwtfg50Ka8eoemX6sP0GSYHUqbs8M4jnS
|
||||
WAEnR1KMQNVdTqhFzBa/TqnUm+oVtZSVrAPSIEgEjhA4WesmGqmcJwJFaQW39Omu
|
||||
8zLfZcfdVUuFKyIijXNliG0ryq1uxmWcEl8ePRzjAAzVTRAILNtZzVY=
|
||||
=8HBK
|
||||
-----END PGP MESSAGE-----
|
||||
fp: 3474196f3adf27cfb70f8f56bcd52d1ed55033db
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.7.3
|
||||
version: 3.8.1
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.acpid.enable = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_5_4;
|
||||
services.xserver.videoDrivers = [ "intel" ];
|
||||
services.xserver.deviceSection = ''
|
||||
Option "DRI" "2"
|
||||
Option "TearFree" "true"
|
||||
'';
|
||||
|
||||
zramSwap.enable = true;
|
||||
zramSwap.memoryPercent = 150;
|
||||
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./zfs.nix
|
||||
|
||||
../modules/xserver.nix
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
];
|
||||
|
||||
users.users.malobeo = {
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
networking.hostName = "moderatio"; # Define your hostname.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
# i18n.defaultLocale = "en_US.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# useXkbConfig = true; # use xkbOptions in tty.
|
||||
# };
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
# services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{ boot.supportedFilesystems = [ "zfs" ];
|
||||
networking.hostId = "ae749b82";
|
||||
#boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
boot.loader.generationsDir.copyKernels = true;
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.version = 2;
|
||||
boot.loader.grub.copyKernels = true;
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.zfsSupport = true;
|
||||
boot.loader.grub.extraPrepareConfig = ''
|
||||
mkdir -p /boot/efis
|
||||
for i in /boot/efis/*; do mount $i ; done
|
||||
|
||||
mkdir -p /boot/efi
|
||||
mount /boot/efi
|
||||
'';
|
||||
boot.loader.grub.extraInstallCommands = ''
|
||||
ESP_MIRROR=$(mktemp -d)
|
||||
cp -r /boot/efi/EFI $ESP_MIRROR
|
||||
for i in /boot/efis/*; do
|
||||
cp -r $ESP_MIRROR/EFI $i
|
||||
done
|
||||
rm -rf $ESP_MIRROR
|
||||
'';
|
||||
boot.loader.grub.devices = [
|
||||
"/dev/disk/by-id/ata-ST250LT003-9YG14C_W041QXCA"
|
||||
];
|
||||
users.users.root.initialHashedPassword = "$6$PmoyhSlGGT6SI0t0$.cFsLyhtO1ks1LUDhLjG0vT44/NjuWCBrv5vUSXqwrU5WpaBvvthnLp0Dfwfyd6Zcdx/4izDcjQAgEWs4QdzW0";
|
||||
}
|
||||
640
machines/modules/BR5350_2_GPL.ppd
Normal file
640
machines/modules/BR5350_2_GPL.ppd
Normal file
@@ -0,0 +1,640 @@
|
||||
*PPD-Adobe: "4.3"
|
||||
*% This program is free software; you can redistribute it and/or modify it
|
||||
*% under the terms of the GNU General Public License as published by the Free
|
||||
*% Software Foundation; either version 2 of the License, or (at your option)
|
||||
*% any later version.
|
||||
*%
|
||||
*% This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
*% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
*% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
*% more details.
|
||||
*%
|
||||
*% You should have received a copy of the GNU General Public License along with
|
||||
*% this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
*% Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*%
|
||||
|
||||
|
||||
*%================================================
|
||||
*% Copyright(C) 2008 Brother Industries, Ltd.
|
||||
*% "Brother HL-5350DN BR-Script3"
|
||||
*%================================================
|
||||
|
||||
*%==== General Information Keywords ========================
|
||||
*FormatVersion: "4.3"
|
||||
*FileVersion: "1.06"
|
||||
*LanguageEncoding: ISOLatin1
|
||||
*LanguageVersion: English
|
||||
*Manufacturer: "Brother"
|
||||
*PCFileName: "BR5350_2.PPD"
|
||||
*Product: "(Brother HL-5350DN series)"
|
||||
*PSVersion: "(3010.106) 5"
|
||||
*ShortNickName: "Brother HL-5350DN BR-Script3"
|
||||
*ModelName: "Brother HL-5350DN BR-Script3"
|
||||
*NickName: "Brother HL-5350DN BR-Script3"
|
||||
|
||||
*%==== Basic Device Capabilities =============
|
||||
*LanguageLevel: "3"
|
||||
*TTRasterizer: Type42
|
||||
*ColorDevice: False
|
||||
*DefaultColorSpace: Gray
|
||||
*FileSystem: True
|
||||
*?FileSystem:"
|
||||
save
|
||||
/devname (%disk0%) def
|
||||
/ret false def
|
||||
0 1 7{
|
||||
devname exch 48 add 5 exch put
|
||||
devname devstatus {
|
||||
0 ne {/ret true def}if
|
||||
pop pop pop pop pop pop pop
|
||||
}if
|
||||
}for
|
||||
ret {(True)}{(False)} ifelse = flush
|
||||
restore
|
||||
"
|
||||
*End
|
||||
|
||||
*Throughput: "28"
|
||||
*FreeVM: "6050000"
|
||||
|
||||
*%==== Emulations and Protocols ==========
|
||||
*Protocols: PJL TBCP
|
||||
|
||||
*SuggestedJobTimeout: "0"
|
||||
*SuggestedWaitTimeout: "300"
|
||||
*PrintPSErrors: True
|
||||
|
||||
*%==== PostScript Patches ==========
|
||||
*%*JobPatchFile 1: "statusdict/setusbbinary known{statusdict begin true setusbbinary end}if"
|
||||
|
||||
*%==== JCL Features ==========================
|
||||
*JCLBegin: "<1B>%-12345X@PJL JOB<0A>"
|
||||
*JCLToPSInterpreter: "@PJL ENTER LANGUAGE = POSTSCRIPT <0A>"
|
||||
*JCLEnd: "<1B>%-12345X@PJL EOJ <0A><1B>%-12345X"
|
||||
|
||||
*%==== Installable Options ===================
|
||||
|
||||
*OpenGroup: InstallableOptions/Options Installed
|
||||
|
||||
*OpenUI *OptionTrays/Number of Input Trays: PickOne
|
||||
*DefaultOptionTrays: 3Trays
|
||||
*OptionTrays 1Trays/ 1: ""
|
||||
*OptionTrays 2Trays/ 2: ""
|
||||
*OptionTrays 3Trays/ 3: ""
|
||||
*?OptionTrays:"
|
||||
save
|
||||
<</BRFeeder 2>>setpagedevice currentpagedevice/BRFeeder get
|
||||
2 eq{(3Trays)}{
|
||||
<</BRFeeder 1>>setpagedevice currentpagedevice/BRFeeder get
|
||||
1 eq{(2Trays)}{(1Trays)}ifelse
|
||||
}ifelse
|
||||
= flush
|
||||
restore
|
||||
"
|
||||
*End
|
||||
*CloseUI: *OptionTrays
|
||||
|
||||
*CloseGroup: InstallableOptions
|
||||
|
||||
*UIConstraints: *OptionTrays 1Trays *InputSlot Tray2
|
||||
*UIConstraints: *InputSlot Tray2 *OptionTrays 1Trays
|
||||
*UIConstraints: *OptionTrays 1Trays *InputSlot Tray3
|
||||
*UIConstraints: *InputSlot Tray3 *OptionTrays 1Trays
|
||||
*UIConstraints: *OptionTrays 2Trays *InputSlot Tray3
|
||||
*UIConstraints: *InputSlot Tray3 *OptionTrays 2Trays
|
||||
|
||||
*UIConstraints: *CAPT Fine *TonerSaveMode True
|
||||
*UIConstraints: *TonerSaveMode True *CAPT Fine
|
||||
*UIConstraints: *CAPT SFine *TonerSaveMode True
|
||||
*UIConstraints: *TonerSaveMode True *CAPT SFine
|
||||
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment -6
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment -5
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment -4
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment -3
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment -2
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment -1
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment 0
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment 1
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment 2
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment 3
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment 4
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment 5
|
||||
*UIConstraints: *CAPT Fine *BRDensityAdjustment 6
|
||||
|
||||
*%==== Media Selection ======================
|
||||
|
||||
*OpenUI *PageSize: PickOne
|
||||
*OrderDependency: 30 AnySetup *PageSize
|
||||
*DefaultPageSize: A4
|
||||
*PageSize Letter/Letter: "<< /PageSize [612 792] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize Legal/Legal: "<< /PageSize [612 1008] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize Executive/Executive: "<< /PageSize [522 756] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A4/A4: "<< /PageSize [595 842] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A4Long/A4 Long: "<< /PageSize [595 1147] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A5/A5: "<< /PageSize [420 595] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A5L/A5 Long Edge: "<< /PageSize [595 419] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize A6/A6: "<< /PageSize [297 420] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize Env10/Com-10: "<< /PageSize [297 684] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvMonarch/Monarch: "<</PageSize [279 540] /ImagingBBox null>> setpagedevice"
|
||||
*PageSize EnvDL/DL: "<< /PageSize [312 624] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvDLRotated/DL Long Edge: "<< /PageSize [624 312] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvC5/C5: "<</PageSize [459 649] /ImagingBBox null>> setpagedevice"
|
||||
*PageSize EnvISOB5/B5 : "<< /PageSize [499 709] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize EnvISOB6/B6 : "<< /PageSize [354 499] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize FanFoldGermanLegal/Folio: "<< /PageSize [612 936] /ImagingBBox null >> setpagedevice"
|
||||
*PageSize 3x5/3x5: "<< /PageSize [216 360] /ImagingBBox null >> setpagedevice"
|
||||
*CloseUI: *PageSize
|
||||
|
||||
*OpenUI *PageRegion: PickOne
|
||||
*OrderDependency: 40 AnySetup *PageRegion
|
||||
*DefaultPageRegion: A4
|
||||
*PageRegion Letter/Letter: "<< /PageSize [612 792] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion Legal/Legal: "<< /PageSize [612 1008] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion Executive/Executive: "<< /PageSize [522 756] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A4/A4: "<< /PageSize [595 842] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A4Long/A4 Long: "<< /PageSize [595 1147] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A5/A5: "<< /PageSize [420 595] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A5L/A5 Long Edge: "<< /PageSize [595 419] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion A6/A6: "<< /PageSize [297 420] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion Env10/Com-10: "<< /PageSize [297 684] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvMonarch/Monarch: "<</PageSize [279 540] /ImagingBBox null>> setpagedevice"
|
||||
*PageRegion EnvDL/DL: "<< /PageSize [312 624] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvDLRotated/DL Long Edge: "<< /PageSize [624 312] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvC5/C5: "<</PageSize [459 649] /ImagingBBox null>> setpagedevice"
|
||||
*PageRegion EnvISOB5/B5 : "<< /PageSize [499 709] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion EnvISOB6/B6 : "<< /PageSize [354 499] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion FanFoldGermanLegal/Folio: "<< /PageSize [612 936] /ImagingBBox null >> setpagedevice"
|
||||
*PageRegion 3x5/3x5: "<< /PageSize [216 360] /ImagingBBox null >> setpagedevice"
|
||||
*CloseUI: *PageRegion
|
||||
|
||||
*DefaultImageableArea: A4
|
||||
*ImageableArea Letter/Letter: "12.0 12.12 599.88 780.0"
|
||||
*ImageableArea Legal/Legal: "12.0 12.12 599.88 996.0"
|
||||
*ImageableArea Executive/Executive: "11.99 12.12 510.0 744.0"
|
||||
*ImageableArea A4/A4: "12.0 12.24 583.08 829.92"
|
||||
*ImageableArea A4Long/A4 Long: "12.0 12.12 583.08 1134.96"
|
||||
*ImageableArea A5/A5: "12.0 11.88 407.4 582.96"
|
||||
*ImageableArea A5L/A5 Long Edge: "12.0 11.88 407.4 582.96"
|
||||
*ImageableArea A6/A6: "12.0 12.6 285.48 408.0"
|
||||
*ImageableArea Env10/Com-10: "12.0 12.12 284.88 672.0"
|
||||
*ImageableArea EnvMonarch/Monarch: "12.0 12.12 266.76 528.0"
|
||||
*ImageableArea EnvDL/DL: "12.0 12.24 299.88 612.0"
|
||||
*ImageableArea EnvDLRotated/DL Long Edge: "12.0 12.12 611.76 300.0"
|
||||
*ImageableArea EnvC5/C5: "12.0 12.24 446.76 636.96"
|
||||
*ImageableArea EnvISOB5/B5 : "12.0 12.48 486.72 696.96"
|
||||
*ImageableArea EnvISOB6/B6 : "12.0 12.24 342.12 486.96"
|
||||
*ImageableArea FanFoldGermanLegal/Folio: "12.0 12.12 599.88 924.0"
|
||||
*ImageableArea 3x5/3x5: "12.0 12.12 204.00 348.00"
|
||||
|
||||
*%==== Information About Media Sizes ========
|
||||
|
||||
*DefaultPaperDimension: A4
|
||||
*PaperDimension Letter/Letter: "612 792"
|
||||
*PaperDimension Legal/Legal: "612 1008"
|
||||
*PaperDimension Executive/Executive: "522 756"
|
||||
*PaperDimension A4/A4: "595 842"
|
||||
*PaperDimension A4Long/A4 Long: "595 1147"
|
||||
*PaperDimension A5/A5: "420 595"
|
||||
*PaperDimension A5L/A5 Long Edge: "420 595"
|
||||
*PaperDimension A6/A6: "297 420"
|
||||
*PaperDimension Env10/Com-10: "297 684"
|
||||
*PaperDimension EnvMonarch/Monarch: "279 540"
|
||||
*PaperDimension EnvDL/DL: "312 624"
|
||||
*PaperDimension EnvDLRotated/DL Long Edge: "624 312"
|
||||
*PaperDimension EnvC5/C5: "459 649"
|
||||
*PaperDimension EnvISOB5/B5 : "499 709"
|
||||
*PaperDimension EnvISOB6/B6 : "354 499"
|
||||
*PaperDimension FanFoldGermanLegal/Folio: "612 936"
|
||||
*PaperDimension 3x5/3x5: "216 360"
|
||||
|
||||
*%==== Custom Page Sizes ====================
|
||||
*NonUIOrderDependency: 40 AnySetup *CustomPageSize
|
||||
*VariablePaperSize: True
|
||||
*LeadingEdge Short: ""
|
||||
*LeadingEdge Long: ""
|
||||
*DefaultLeadingEdge: Short
|
||||
*MaxMediaWidth: "612"
|
||||
*MaxMediaHeight: "1152"
|
||||
*HWMargins: 13 13 13 13
|
||||
*CustomPageSize True: "
|
||||
<</BRCustomPageSize true>> setpagedevice
|
||||
exch pop exch pop 0 eq{exch}if
|
||||
<< /PageSize [ 5 -2 roll ] /ImagingBBox null >>
|
||||
setpagedevice
|
||||
"
|
||||
*End
|
||||
*ParamCustomPageSize Width: 1 points 197 612
|
||||
*ParamCustomPageSize Height: 2 points 328 1152
|
||||
*ParamCustomPageSize WidthOffset: 3 points 0 0
|
||||
*ParamCustomPageSize HeightOffset: 4 points 0 0
|
||||
*ParamCustomPageSize Orientation: 5 int 0 1
|
||||
|
||||
*%==== 5.14 Finishing Features =================================
|
||||
*%%%%% Resolution and Appearance Control %%%%%
|
||||
*DefaultResolution: 600dpi
|
||||
*OpenUI *CAPT/Print Quality:PickOne
|
||||
*OrderDependency: 10 AnySetup *CAPT
|
||||
*DefaultCAPT: Middle
|
||||
*CAPT SFine/1200 dpi: "<</HWResolution [1200 1200] >> setpagedevice
|
||||
statusdict/true1200 known{statusdict begin true true1200 end}if
|
||||
"
|
||||
*CAPT Fine/HQ 1200: "<</HWResolution [1200 1200] >> setpagedevice
|
||||
statusdict/true1200 known{statusdict begin false true1200 end}if
|
||||
"
|
||||
*CAPT Middle/600 dpi: "<</HWResolution [600 600] >> setpagedevice"
|
||||
*CAPT Low/300 dpi: "<</HWResolution [300 300] >> setpagedevice"
|
||||
*CloseUI: *CAPT
|
||||
|
||||
*%==== 5.13 Media Handling Features ============================
|
||||
*OpenUI *BRMediaType/Media Type: PickOne
|
||||
*OrderDependency: 28 AnySetup *BRMediaType
|
||||
*DefaultBRMediaType:Plain
|
||||
*BRMediaType Plain/Plain Paper: "<</MediaType (REGULAR)>>setpagedevice"
|
||||
*BRMediaType Thin/Thin Paper: "<</MediaType (THIN)>>setpagedevice"
|
||||
*BRMediaType Thick/Thick Paper: "<</MediaType (THICK)>>setpagedevice"
|
||||
*BRMediaType ThickPaper2/Thicker Paper: "<</MediaType (THICK2)>>setpagedevice"
|
||||
*BRMediaType BOND/Bond Paper: "<</MediaType (BOND)>>setpagedevice"
|
||||
*BRMediaType Transparency/Transparencies: "<</MediaType (TRANSPARENCY)>>setpagedevice"
|
||||
*BRMediaType Env/Envelopes: "<</MediaType (ENVELOPES)>>setpagedevice"
|
||||
*BRMediaType EnvThick/Env. Thick: "<</MediaType (ENVTHICK)>>setpagedevice"
|
||||
*BRMediaType EnvThin/Env. Thin: "<</MediaType (ENVTHIN)>>setpagedevice"
|
||||
*BRMediaType Recycled/Recycled Paper: "<</MediaType (RECYCLED)>>setpagedevice"
|
||||
*CloseUI: *BRMediaType
|
||||
|
||||
*OpenUI *InputSlot: PickOne
|
||||
*OrderDependency: 19 AnySetup *InputSlot
|
||||
*DefaultInputSlot: AutoSelect
|
||||
*InputSlot AutoSelect/Auto Select: "<</ManualFeed false /BRTraysw true >> setpagedevice"
|
||||
*InputSlot Tray1/Tray1: "<</ManualFeed false /BRTraysw false /BRFeeder 0>> setpagedevice"
|
||||
*InputSlot Tray2/Tray2: "<</ManualFeed false /BRTraysw false /BRFeeder 1>> setpagedevice"
|
||||
*InputSlot Tray3/Tray3: "<</ManualFeed false /BRTraysw false /BRFeeder 2>> setpagedevice"
|
||||
*InputSlot MPTray/MP Tray: "<</ManualFeed false /BRTraysw false /BRFeeder 4>> setpagedevice"
|
||||
*CloseUI: *InputSlot
|
||||
|
||||
*RequiresPageRegion All:True
|
||||
|
||||
*OpenUI *ManualFeed/Manual Feed: Boolean
|
||||
*OrderDependency: 19 AnySetup *ManualFeed
|
||||
*DefaultManualFeed: False
|
||||
*ManualFeed True: "<</ManualFeed true>> setpagedevice"
|
||||
*ManualFeed False: "<</ManualFeed false>> setpagedevice"
|
||||
*CloseUI: *ManualFeed
|
||||
|
||||
*%=== Duplex ================================
|
||||
*OpenUI *Duplex: PickOne
|
||||
*OrderDependency: 25 AnySetup *Duplex
|
||||
*DefaultDuplex: None
|
||||
*Duplex DuplexTumble: "<</Duplex true /Tumble true>>setpagedevice"
|
||||
*Duplex DuplexNoTumble: "<</Duplex true /Tumble false>>setpagedevice"
|
||||
*Duplex None: "<</Duplex false /Tumble false>>setpagedevice"
|
||||
*CloseUI: *Duplex
|
||||
|
||||
*%=== Output Bin =============================
|
||||
*DefaultOutputBin: OnlyOne
|
||||
|
||||
*% === Collate ==========
|
||||
|
||||
|
||||
*%=== JobHold ================================
|
||||
|
||||
*%==== BR-Script Color Original UI ==================================
|
||||
*OpenUI *TonerSaveMode/Toner Save: Boolean
|
||||
*DefaultTonerSaveMode: False
|
||||
*OrderDependency: 10 AnySetup *TonerSaveMode
|
||||
*TonerSaveMode False/Off: "
|
||||
statusdict/tonersave known{statusdict begin false tonersave end}if
|
||||
"
|
||||
*End
|
||||
*TonerSaveMode True/On: "
|
||||
statusdict/tonersave known{statusdict begin true tonersave end}if
|
||||
"
|
||||
*End
|
||||
*CloseUI: *TonerSaveMode
|
||||
|
||||
*OpenUI *Sleep/Sleep Time [Min.]: PickOne
|
||||
*DefaultSleep: PrinterDefault
|
||||
*OrderDependency: 10 AnySetup *Sleep
|
||||
*Sleep PrinterDefault/Printer Default: ""
|
||||
*Sleep 2minutes/2: "statusdict/powersavetime known{statusdict begin 2 powersavetime end}if"
|
||||
*Sleep 10minutes/10: "statusdict/powersavetime known{statusdict begin 10 powersavetime end}if"
|
||||
*Sleep 30minutes/30: "statusdict/powersavetime known{statusdict begin 30 powersavetime end}if"
|
||||
*CloseUI: *Sleep
|
||||
|
||||
*% Halftone Screen Lock Information ===============
|
||||
*OpenUI *ScreenLock/Halftone Screen Lock: Boolean
|
||||
*OrderDependency: 90 AnySetup *ScreenLock
|
||||
*DefaultScreenLock: True
|
||||
*ScreenLock True/On: "
|
||||
<</HalftoneMode 1>>setuserparams
|
||||
"
|
||||
*End
|
||||
*ScreenLock False/Off: "
|
||||
<</HalftoneMode 0>>setuserparams
|
||||
"
|
||||
*End
|
||||
*CloseUI: *ScreenLock
|
||||
|
||||
*% Reduced Image ===============
|
||||
*OpenUI *BRReducedImage/High Quality Image Printing: Boolean
|
||||
*OrderDependency: 131.0 AnySetup *BRReducedImage
|
||||
*DefaultBRReducedImage: False
|
||||
*BRReducedImage False/Off: "
|
||||
<</BRReduceImage true>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRReducedImage True/On: "
|
||||
<</BRReduceImage false>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*CloseUI: *BRReducedImage
|
||||
|
||||
*% Improve Print Output ===============
|
||||
*OpenUI *ImprovePrintOutput/Improve Print Output: PickOne
|
||||
*OrderDependency: 135.0 AnySetup *ImprovePrintOutput
|
||||
*DefaultImprovePrintOutput: None
|
||||
*ImprovePrintOutput None/Off: "
|
||||
<</BRReducePaperCurl false /BRImproveTonerFixing false>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*ImprovePrintOutput ReducePaperCurl/Reduce Paper Curl: "
|
||||
<</BRReducePaperCurl true /BRImproveTonerFixing false>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*ImprovePrintOutput ImproveTonerFixing/Improve Toner Fixing: "
|
||||
<</BRReducePaperCurl false /BRImproveTonerFixing true>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*CloseUI: *ImprovePrintOutput
|
||||
|
||||
*% Density adjustment ===============
|
||||
*OpenUI *BRDensityAdjustment/Density Adjustment: PickOne
|
||||
*OrderDependency: 145.0 AnySetup *BRDensityAdjustment
|
||||
*DefaultBRDensityAdjustment: None
|
||||
*BRDensityAdjustment None/Printer Default: ""
|
||||
*BRDensityAdjustment -6/-6: "
|
||||
<</BRDensityAdjustment -6>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment -5/-5: "
|
||||
<</BRDensityAdjustment -5>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment -4/-4: "
|
||||
<</BRDensityAdjustment -4>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment -3/-3: "
|
||||
<</BRDensityAdjustment -3>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment -2/-2: "
|
||||
<</BRDensityAdjustment -2>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment -1/-1: "
|
||||
<</BRDensityAdjustment -1>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment 0/0: "
|
||||
<</BRDensityAdjustment 0>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment 1/1: "
|
||||
<</BRDensityAdjustment 1>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment 2/2: "
|
||||
<</BRDensityAdjustment 2>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment 3/3: "
|
||||
<</BRDensityAdjustment 3>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment 4/4: "
|
||||
<</BRDensityAdjustment 4>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment 5/5: "
|
||||
<</BRDensityAdjustment 5>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*BRDensityAdjustment 6/6: "
|
||||
<</BRDensityAdjustment 6>>setpagedevice
|
||||
"
|
||||
*End
|
||||
*CloseUI: *BRDensityAdjustment
|
||||
|
||||
*%==== 5.17 Gray Levels and Halftoninig ========================
|
||||
*AccurateScreenSupport: False
|
||||
*ScreenFreq: "60.0"
|
||||
*ScreenAngle: "45.0"
|
||||
*DefaultScreenProc: Dot
|
||||
*ScreenProc Dot: "{1.0 add 180 mul 1 add sin 0.001 add exch 1.0 add 180 mul 2 add sin mul}"
|
||||
|
||||
*DefaultTransfer: Null
|
||||
*Transfer Null: "{}"
|
||||
*Transfer Null.Inverse: "{1 exch sub}"
|
||||
|
||||
*%==== 5.18 Color Issues =======================================
|
||||
*% BlackSubstitution -> Original UI
|
||||
|
||||
*%==== 5.19 Color Separation Keywords ==========================
|
||||
*DefaultColorSep: ProcessBlack
|
||||
*ColorSepScreenFreq ProcessBlack.71lpi.600dpi/71 lpi / 600 dpi: "70.7107"
|
||||
*ColorSepScreenFreq CustomColor.71lpi.600dpi/71 lpi / 600 dpi: "70.7107"
|
||||
*ColorSepScreenFreq ProcessCyan.71lpi.600dpi/71 lpi / 600 dpi: "63.2456"
|
||||
*ColorSepScreenFreq ProcessMagenta.71lpi.600dpi/71 lpi / 600 dpi: "63.2456"
|
||||
*ColorSepScreenFreq ProcessYellow.71lpi.600dpi/71 lpi / 600 dpi: "66.6667"
|
||||
*ColorSepScreenFreq ProcessBlack.60lpi.300dpi/60 lpi / 300 dpi: "60"
|
||||
*ColorSepScreenFreq CustomColor.60lpi.300dpi/60 lpi / 300 dpi: "60"
|
||||
*ColorSepScreenFreq ProcessCyan.60lpi.300dpi/60 lpi / 300 dpi: "60"
|
||||
*ColorSepScreenFreq ProcessMagenta.60lpi.300dpi/60 lpi / 300 dpi: "60"
|
||||
*ColorSepScreenFreq ProcessYellow.60lpi.300dpi/60 lpi / 300 dpi: "60"
|
||||
*ColorSepScreenFreq ProcessBlack.53lpi.300dpi/53 lpi / 300 dpi: "53.033"
|
||||
*ColorSepScreenFreq CustomColor.53lpi.300dpi/53 lpi / 300 dpi: "53.033"
|
||||
*ColorSepScreenFreq ProcessCyan.53lpi.300dpi/53 lpi / 300 dpi: "47.4342"
|
||||
*ColorSepScreenFreq ProcessMagenta.53lpi.300dpi/53 lpi / 300 dpi:"47.4342"
|
||||
*ColorSepScreenFreq ProcessYellow.53lpi.300dpi/53 lpi / 300 dpi: "50.0"
|
||||
*ColorSepScreenAngle ProcessBlack.71lpi.600dpi/71 lpi / 600 dpi: "45.0"
|
||||
*ColorSepScreenAngle CustomColor.71lpi.600dpi/71 lpi / 600 dpi: "45.0"
|
||||
*ColorSepScreenAngle ProcessCyan.71lpi.600dpi/71 lpi / 600 dpi: "71.5651"
|
||||
*ColorSepScreenAngle ProcessMagenta.71lpi.600dpi/71 lpi / 600 dpi: "18.4349"
|
||||
*ColorSepScreenAngle ProcessYellow.71lpi.600dpi/71 lpi / 600 dpi: "0.0"
|
||||
*ColorSepScreenAngle ProcessBlack.60lpi.300dpi/60 lpi / 300 dpi: "45"
|
||||
*ColorSepScreenAngle CustomColor.60lpi.300dpi/60 lpi / 300 dpi: "45"
|
||||
*ColorSepScreenAngle ProcessCyan.60lpi.300dpi/60 lpi / 300 dpi: "15"
|
||||
*ColorSepScreenAngle ProcessMagenta.60lpi.300dpi/60 lpi / 300 dpi: "75"
|
||||
*ColorSepScreenAngle ProcessYellow.60lpi.300dpi/60 lpi / 300 dpi: "0"
|
||||
*ColorSepScreenAngle ProcessBlack.53lpi.300dpi/53 lpi / 300 dpi: "45.0"
|
||||
*ColorSepScreenAngle CustomColor.53lpi.300dpi/53 lpi / 300 dpi: "45.0"
|
||||
*ColorSepScreenAngle ProcessCyan.53lpi.300dpi/53 lpi / 300 dpi: "71.5651"
|
||||
*ColorSepScreenAngle ProcessMagenta.53lpi.300dpi/53 lpi / 300 dpi: "18.4349"
|
||||
*ColorSepScreenAngle ProcessYellow.53lpi.300dpi/53 lpi / 300 dpi: "0.0"
|
||||
*End
|
||||
|
||||
*InkName: ProcessBlack/Process Black
|
||||
*InkName: CustomColor/Custom Color
|
||||
*InkName: ProcessCyan/Process Cyan
|
||||
*InkName: ProcessMagenta/Process Magenta
|
||||
*InkName: ProcessYellow/Process Yellow
|
||||
|
||||
*%==== 5.20 Font Related Keywords ==============================
|
||||
*DefaultFont: Courier
|
||||
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
|
||||
*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
|
||||
*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
|
||||
*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
|
||||
*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
|
||||
*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
|
||||
*Font Bookman-Light: Standard "(001.004S)" Standard ROM
|
||||
*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
|
||||
*Font Courier: Standard "(002.004S)" Standard ROM
|
||||
*Font Courier-Bold: Standard "(002.004S)" Standard ROM
|
||||
*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
|
||||
*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
|
||||
*Font Helvetica: Standard "(001.006S)" Standard ROM
|
||||
*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
|
||||
*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
|
||||
*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
|
||||
*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
|
||||
*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
|
||||
*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
|
||||
*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
|
||||
*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
|
||||
*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
|
||||
*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
|
||||
*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
|
||||
*Font Times-Bold: Standard "(001.007S)" Standard ROM
|
||||
*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
|
||||
*Font Times-Italic: Standard "(001.007S)" Standard ROM
|
||||
*Font Times-Roman: Standard "(001.007S)" Standard ROM
|
||||
*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
|
||||
*Font ZapfDingbats: Special "(001.004S)" Special ROM
|
||||
*Font Symbol: Special "(001.007S)" Special ROM
|
||||
*Font Alaska: Standard "(001.005)" Standard ROM
|
||||
*Font AlaskaExtrabold: Standard "(001.005)" Standard ROM
|
||||
*Font AntiqueOakland: Standard "(001.005)" Standard ROM
|
||||
*Font AntiqueOakland-Bold: Standard "(001.005)" Standard ROM
|
||||
*Font AntiqueOakland-Oblique: Standard "(001.005)" Standard ROM
|
||||
*Font ClevelandCondensed: Standard "(001.005)" Standard ROM
|
||||
*Font Connecticut: Standard "(001.005)" Standard ROM
|
||||
*Font Guatemala-Antique: Standard "(001.005)" Standard ROM
|
||||
*Font Guatemala-Bold: Standard "(001.005)" Standard ROM
|
||||
*Font Guatemala-Italic: Standard "(001.005)" Standard ROM
|
||||
*Font Guatemala-BoldItalic: Standard "(001.005)" Standard ROM
|
||||
*Font LetterGothic: Standard "(001.005)" Standard ROM
|
||||
*Font LetterGothic-Bold: Standard "(001.005)" Standard ROM
|
||||
*Font LetterGothic-Oblique: Standard "(001.005)" Standard ROM
|
||||
*Font Maryland: Standard "(001.005)" Standard ROM
|
||||
*Font Oklahoma: Standard "(001.005)" Standard ROM
|
||||
*Font Oklahoma-Bold: Standard "(001.005)" Standard ROM
|
||||
*Font Oklahoma-Oblique: Standard "(001.005)" Standard ROM
|
||||
*Font Oklahoma-BoldOblique: Standard "(001.005)" Standard ROM
|
||||
*Font Utah: Standard "(001.005)" Standard ROM
|
||||
*Font Utah-Bold: Standard "(001.005)" Standard ROM
|
||||
*Font Utah-Oblique: Standard "(001.005)" Standard ROM
|
||||
*Font Utah-BoldOblique: Standard "(001.005)" Standard ROM
|
||||
*Font UtahCondensed: Standard "(001.005)" Standard ROM
|
||||
*Font UtahCondensed-Bold: Standard "(001.005)" Standard ROM
|
||||
*Font UtahCondensed-Oblique: Standard "(001.004)" Standard ROM
|
||||
*Font UtahCondensed-BoldOblique: Standard "(001.005)" Standard ROM
|
||||
*Font BermudaScript: Standard "(001.005)" Standard ROM
|
||||
*Font Germany: Standard "(001.005)" Standard ROM
|
||||
*Font SanDiego: Standard "(001.005)" Standard ROM
|
||||
*Font US-Roman: Standard "(001.005)" Standard ROM
|
||||
*?FontQuery: "
|
||||
save
|
||||
count 1 gt
|
||||
{exch dup dup
|
||||
=string cvs (/) print print (:) print
|
||||
FontDirectory exch known
|
||||
{pop(Yes)}
|
||||
{(fonts/)AppendName exch pop mark exch
|
||||
{}=string filenameforall counttomark
|
||||
0 gt
|
||||
{cleartomark(Yes)}
|
||||
{cleartomark(No)}ifelse
|
||||
}ifelse
|
||||
=
|
||||
}if
|
||||
(*) = flush
|
||||
restore
|
||||
"
|
||||
*End
|
||||
*?FontList: "
|
||||
save
|
||||
FontDirectory{pop ==}forall
|
||||
(fonts/*)
|
||||
{dup length 6 sub 6 exch getinterval cvn ==
|
||||
}=string filenameforall
|
||||
(*) = flush
|
||||
restore
|
||||
"
|
||||
*End
|
||||
|
||||
|
||||
*%==== 5.21 Printer Messages ===================================
|
||||
*%
|
||||
*% Printer Message
|
||||
*%
|
||||
*PrinterError: "service call"
|
||||
*PrinterError: "cover open"
|
||||
*PrinterError: "end of ink"
|
||||
*PrinterError: "out of maintenance paper"
|
||||
*PrinterError: "out of paper"
|
||||
*PrinterError: "paper jam"
|
||||
*PrinterError: "manual feed time out"
|
||||
*PrinterError: "load paper letter size"
|
||||
*PrinterError: "load paper legal size"
|
||||
*PrinterError: "load paper B5 size"
|
||||
*PrinterError: "load paper A4 size"
|
||||
*PrinterError: "offline"
|
||||
|
||||
*Status: "idle"
|
||||
*Status: "busy"
|
||||
*Status: "waiting"
|
||||
*Status: "printing"
|
||||
*Status: "warming up"
|
||||
*Status: "PrinterError: service call"
|
||||
*Status: "PrinterError: cover open"
|
||||
*Status: "PrinterError: end of ink"
|
||||
*Status: "PrinterError: out of paper"
|
||||
*Status: "PrinterError: paper jam"
|
||||
*Status: "PrinterError: manual feed time out"
|
||||
*Status: "PrinterError: load paper letter size"
|
||||
*Status: "PrinterError: load paper legal size"
|
||||
*Status: "PrinterError: load paper B5 size"
|
||||
*Status: "PrinterError: load paper A4 size"
|
||||
*Status: "PrinterError: offline"
|
||||
|
||||
*% Input Sources (format: %%[ status: <stat>; source: <one of these> ]%% )
|
||||
*Source: "Serial"
|
||||
*Source: "Parallel"
|
||||
*Source: "EtherTalk"
|
||||
*Source: "LPR"
|
||||
*Source: "PrintServer"
|
||||
*Source: "Internal"
|
||||
|
||||
*Message: "%%[ exitserver: permanent state may be changed ]%%"
|
||||
*Message: "%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%"
|
||||
*Message: "\FontName\ not found, using BR-03B."
|
||||
*%==== 5.22 System Management ==================================
|
||||
*Password: "0"
|
||||
*ExitServer: "
|
||||
serverdict begin 0 exitserver
|
||||
"
|
||||
*End
|
||||
*Reset: "
|
||||
clear cleardictstack
|
||||
serverdict begin 0 exitserver
|
||||
systemdict /quit get exec
|
||||
"
|
||||
*End
|
||||
|
||||
139
machines/modules/autoupdate.nix
Normal file
139
machines/modules/autoupdate.nix
Normal file
@@ -0,0 +1,139 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.malobeo.autoUpdate;
|
||||
in
|
||||
{
|
||||
options.malobeo.autoUpdate = {
|
||||
enable = mkOption {
|
||||
description = ''
|
||||
Enables a timer that periodically checks a hydra instance for the last build of the local system, and switches to it if it is different.
|
||||
|
||||
Also enables periodical /nix/store GC.
|
||||
'';
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
# https://hydra.dynamicdiscord.de/job/malobeo/infrastructure/louise/latest
|
||||
url = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Url to your hydra instace. like https://hydra.example.de
|
||||
'';
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
|
||||
project = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Name of the project at the hydra instace
|
||||
'';
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
|
||||
jobset = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Name of the jobset at the hydra instace
|
||||
'';
|
||||
type = types.str;
|
||||
default = "";
|
||||
};
|
||||
|
||||
cacheurl = mkOption {
|
||||
description = lib.mdDoc ''
|
||||
Url of the binary cache
|
||||
'';
|
||||
type = types.str;
|
||||
default = cfg.url;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
# the presence of this .service file signifies that the system is
|
||||
# autoupdate-enabled. it is checked to prevent autoupdating back
|
||||
# to a system without autoupdate when deploying with autoupdate
|
||||
# for the first time.
|
||||
systemd.services.autoupdate = lib.mkIf config.malobeo.autoUpdate.enable {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = with pkgs; [ nix nettools curl jq ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
# switch-to-configuration may not return. HACK: cap running
|
||||
# time so that the timer can be scheduled again.
|
||||
TimeoutStartSec = "30min";
|
||||
};
|
||||
script = ''
|
||||
OLD=$(readlink /run/current-system)
|
||||
echo Current system: $(basename $OLD)
|
||||
NEW=$(curl -sLH "Accept: application/json" ${cfg.url}/job/${cfg.project}/${cfg.jobset}/${config.networking.hostName}/latest | jq -er .buildoutputs.out.path)
|
||||
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
|
||||
echo "Unable to obtain updated system"
|
||||
exit 1
|
||||
fi
|
||||
echo New system: $(basename $NEW)
|
||||
|
||||
if [ "$OLD" != "$NEW" ]; then
|
||||
echo "Fetching new system built by ${cfg.url}/job/${cfg.project}/${cfg.jobset}"
|
||||
# this should fetch the new system from the binary cache
|
||||
nix copy --from ${cfg.cacheurl} "$NEW"
|
||||
if [ -e "$NEW/etc/systemd/system/autoupdate.timer" ]; then
|
||||
echo "Switch to the new system..."
|
||||
nix-env -p /nix/var/nix/profiles/system --set $NEW
|
||||
"$NEW/bin/switch-to-configuration" switch
|
||||
else
|
||||
echo "New system is not yet autoupdate-enabled. Refusing to switch into a dead end."
|
||||
fi
|
||||
else
|
||||
echo "No update required"
|
||||
fi
|
||||
'';
|
||||
# don't let the switch kill this service, aborting the switch
|
||||
restartIfChanged = false;
|
||||
unitConfig.X-StopOnRemoval = false;
|
||||
# create timer
|
||||
startAt = "hourly";
|
||||
};
|
||||
|
||||
nix = {
|
||||
# Show a diff when activating a new system except for microvms which handle this seperately
|
||||
#diffSystem = config.malobeo.deployment.server or "" == "";
|
||||
#TODO: THIS WIPES HOSTS NIX STORE FROM WITHIN NIXOS-CONTAINER
|
||||
#gc = lib.mkIf config.malobeo.autoUpdate.enable {
|
||||
# automatic = true;
|
||||
# randomizedDelaySec = "6h";
|
||||
# options = "--delete-older-than 21d";
|
||||
#};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ (
|
||||
# Provide a manual updating script that fetches the latest
|
||||
# updated+built system from Hydra
|
||||
pkgs.writeScriptBin "update-from-hydra" ''
|
||||
#! ${pkgs.runtimeShell} -e
|
||||
|
||||
OLD=$(readlink /run/current-system)
|
||||
echo Current system: $(basename $OLD)
|
||||
NEW=$(curl -sLH "Accept: application/json" ${cfg.url}/job/${cfg.project}/${cfg.jobset}/${config.networking.hostName}/latest | ${pkgs.jq}/bin/jq -er .buildoutputs.out.path)
|
||||
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
|
||||
echo "Unable to obtain updated system"
|
||||
exit 1
|
||||
fi
|
||||
echo New system: $(basename $NEW)
|
||||
|
||||
if [ "$OLD" != "$NEW" ]; then
|
||||
echo "Fetching new system built by ${cfg.url}/job/${cfg.project}/${cfg.jobset}"
|
||||
# this should fetch the new system from the binary cache
|
||||
nix copy --from ${cfg.cacheurl} "$NEW"
|
||||
echo "Switch to the new system..."
|
||||
nix-env -p /nix/var/nix/profiles/system --set $NEW
|
||||
"$NEW/bin/switch-to-configuration" switch
|
||||
else
|
||||
echo "No update required"
|
||||
fi
|
||||
''
|
||||
) ];
|
||||
};
|
||||
}
|
||||
282
machines/modules/disko/default.nix
Normal file
282
machines/modules/disko/default.nix
Normal file
@@ -0,0 +1,282 @@
|
||||
{config, inputs, lib, ...}:
|
||||
let
|
||||
cfg = config.malobeo.disks;
|
||||
in
|
||||
{
|
||||
imports = [inputs.disko.nixosModules.disko];
|
||||
options.malobeo.disks = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable disko disk creation";
|
||||
};
|
||||
hostId = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
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/";
|
||||
description = ''
|
||||
where disks should be mounted from
|
||||
https://openzfs.github.io/openzfs-docs/Project%20and%20Community/FAQ.html#selecting-dev-names-when-creating-a-pool-linux
|
||||
use "/dev/disk/by-path/" for vm's
|
||||
'';
|
||||
};
|
||||
root = {
|
||||
disk0 = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
description = "name ab /dev für root dateisystem";
|
||||
};
|
||||
disk1 = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
description = "name ab /dev für eventuellen root mirror";
|
||||
};
|
||||
swap = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "8G";
|
||||
description = "size of swap partition (only disk0)";
|
||||
};
|
||||
reservation = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "20GiB";
|
||||
description = "zfs reservation";
|
||||
};
|
||||
mirror = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "mirror zfs root pool";
|
||||
};
|
||||
};
|
||||
storage = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable storage pool";
|
||||
};
|
||||
disks = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "name ab /dev/ für storage pool";
|
||||
example = "ata-ST16000NE000-2RW103_ZL2P0YSZ";
|
||||
};
|
||||
reservation = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "20GiB";
|
||||
description = "zfs reservation";
|
||||
};
|
||||
mirror = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "mirror zfs storage pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
networking.hostId = cfg.hostId;
|
||||
disko.devices = {
|
||||
disk = lib.mkMerge [
|
||||
{
|
||||
ssd0 = lib.mkIf (cfg.root.disk0 != "") {
|
||||
type = "disk";
|
||||
device = "/dev/${cfg.root.disk0}";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1024M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
encryptedSwap = lib.mkIf cfg.encryption {
|
||||
size = cfg.root.swap;
|
||||
content = {
|
||||
type = "swap";
|
||||
randomEncryption = true;
|
||||
};
|
||||
};
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
ssd1 = lib.mkIf (cfg.root.disk1 != "") {
|
||||
type = "disk";
|
||||
device = "/dev/${cfg.root.disk1}";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
(lib.mkIf cfg.storage.enable (
|
||||
lib.mkMerge (
|
||||
map (diskname: {
|
||||
"${diskname}" = {
|
||||
type = "disk";
|
||||
device = "/dev/${diskname}";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "storage";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}) cfg.storage.disks
|
||||
)
|
||||
))
|
||||
];
|
||||
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
mode = lib.mkIf cfg.root.mirror "mirror";
|
||||
# Workaround: cannot import 'zroot': I/O error in disko tests
|
||||
options.cachefile = "none";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
xattr = "sa"; # für microvm virtiofs mount
|
||||
acltype = "posixacl"; # für microvm virtiofs mount
|
||||
compression = "zstd";
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
};
|
||||
|
||||
datasets = {
|
||||
encrypted = {
|
||||
type = "zfs_fs";
|
||||
options = {
|
||||
mountpoint = "none";
|
||||
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 = lib.mkIf cfg.encryption ''
|
||||
zfs set keylocation="prompt" zroot/encrypted;
|
||||
'';
|
||||
|
||||
};
|
||||
"encrypted/root" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/";
|
||||
options.mountpoint = "legacy";
|
||||
};
|
||||
"encrypted/var" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/var";
|
||||
options.mountpoint = "legacy";
|
||||
};
|
||||
"encrypted/etc" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/etc";
|
||||
options.mountpoint = "legacy";
|
||||
};
|
||||
"encrypted/home" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/home";
|
||||
options.mountpoint = "legacy";
|
||||
};
|
||||
"encrypted/nix" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/nix";
|
||||
options.mountpoint = "legacy";
|
||||
};
|
||||
reserved = {
|
||||
# for cow delete if pool is full
|
||||
options = {
|
||||
canmount = "off";
|
||||
mountpoint = "none";
|
||||
reservation = "${cfg.root.reservation}";
|
||||
};
|
||||
type = "zfs_fs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
storage = lib.mkIf cfg.storage.enable {
|
||||
type = "zpool";
|
||||
mode = lib.mkIf (cfg.storage.mirror) "mirror";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
xattr = "sa"; # für microvm virtiofs mount
|
||||
acltype = "posixacl"; # für microvm virtiofs mount
|
||||
};
|
||||
datasets = {
|
||||
encrypted = {
|
||||
type = "zfs_fs";
|
||||
options = {
|
||||
mountpoint = "none";
|
||||
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 = lib.mkIf cfg.encryption ''
|
||||
zfs set keylocation="file:///root/secret.key" storage/encrypted;
|
||||
'';
|
||||
};
|
||||
"encrypted/data" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/data";
|
||||
};
|
||||
"encrypted/data/microvms" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/data/microvms";
|
||||
};
|
||||
reserved = {
|
||||
# for cow delete if pool is full
|
||||
options = {
|
||||
canmount = "off";
|
||||
mountpoint = "none";
|
||||
reservation = "${cfg.storage.reservation}";
|
||||
};
|
||||
type = "zfs_fs";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
boot.zfs.devNodes = lib.mkDefault cfg.devNodes;
|
||||
boot.zfs.extraPools = lib.mkIf cfg.storage.enable [ "storage" ];
|
||||
fileSystems."/".neededForBoot = true;
|
||||
fileSystems."/etc".neededForBoot = true;
|
||||
fileSystems."/boot".neededForBoot = true;
|
||||
fileSystems."/var".neededForBoot = true;
|
||||
fileSystems."/home".neededForBoot = true;
|
||||
fileSystems."/nix".neededForBoot = true;
|
||||
};
|
||||
}
|
||||
250
machines/modules/host_builder.nix
Normal file
250
machines/modules/host_builder.nix
Normal file
@@ -0,0 +1,250 @@
|
||||
{ self
|
||||
, nixpkgs-unstable
|
||||
, nixpkgs
|
||||
, sops-nix
|
||||
, inputs
|
||||
, hosts
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
in
|
||||
rec {
|
||||
nixosSystem = nixpkgs.lib.makeOverridable nixpkgs.lib.nixosSystem;
|
||||
nixosSystemUnstable = nixpkgs-unstable.lib.makeOverridable nixpkgs-unstable.lib.nixosSystem;
|
||||
|
||||
baseModules = [
|
||||
# make flake inputs accessiable in NixOS
|
||||
{ _module.args.inputs = inputs; }
|
||||
{
|
||||
imports = [
|
||||
({ pkgs, ... }: {
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://cache.dynamicdiscord.de"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.dynamicdiscord.de:DKueZicqi2NhJJXz9MYgUbiyobMs10fTyHCgAUibRP4="
|
||||
];
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
}
|
||||
];
|
||||
defaultModules = baseModules;
|
||||
|
||||
makeMicroVM = hostName: ipv4Addr: macAddr: modules: [
|
||||
{
|
||||
microvm = {
|
||||
hypervisor = "cloud-hypervisor";
|
||||
mem = 2560;
|
||||
shares = [
|
||||
{
|
||||
source = "/nix/store";
|
||||
mountPoint = "/nix/.ro-store";
|
||||
tag = "store";
|
||||
proto = "virtiofs";
|
||||
socket = "store.socket";
|
||||
}
|
||||
{
|
||||
source = "/var/lib/microvms/${hostName}/etc";
|
||||
mountPoint = "/etc";
|
||||
tag = "etc";
|
||||
proto = "virtiofs";
|
||||
socket = "etc.socket";
|
||||
}
|
||||
{
|
||||
source = "/var/lib/microvms/${hostName}/var";
|
||||
mountPoint = "/var";
|
||||
tag = "var";
|
||||
proto = "virtiofs";
|
||||
socket = "var.socket";
|
||||
}
|
||||
{
|
||||
source = "/var/lib/microvms/data/${hostName}";
|
||||
mountPoint = "/data";
|
||||
tag = "data";
|
||||
proto = "virtiofs";
|
||||
socket = "microdata.socket";
|
||||
}
|
||||
];
|
||||
|
||||
interfaces = [
|
||||
{
|
||||
type = "tap";
|
||||
id = "vm-${hostName}";
|
||||
mac = "${macAddr}";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
systemd.network.enable = true;
|
||||
|
||||
systemd.network.networks."20-lan" = {
|
||||
matchConfig.Type = "ether";
|
||||
networkConfig = {
|
||||
Address = [ "${ipv4Addr}/24" ];
|
||||
Gateway = "10.0.0.1";
|
||||
DNS = ["1.1.1.1"];
|
||||
DHCP = "no";
|
||||
};
|
||||
};
|
||||
}
|
||||
] ++ defaultModules ++ modules;
|
||||
|
||||
inputsMod = inputs // { malobeo = self; };
|
||||
|
||||
|
||||
vmMicroVMOverwrites = hostname: options: {
|
||||
microvm = rec {
|
||||
mem = pkgs.lib.mkForce 4096;
|
||||
hypervisor = pkgs.lib.mkForce "qemu";
|
||||
socket = pkgs.lib.mkForce null;
|
||||
|
||||
|
||||
#needed for hosts that deploy imperative microvms (for example fanny)
|
||||
writableStoreOverlay = pkgs.lib.mkIf options.writableStore "/nix/.rw-store";
|
||||
volumes = pkgs.lib.mkIf options.writableStore [ {
|
||||
image = "nix-store-overlay.img";
|
||||
mountPoint = writableStoreOverlay;
|
||||
size = 2048;
|
||||
} ];
|
||||
|
||||
shares = pkgs.lib.mkForce (pkgs.lib.optionals (!options.writableStore) [
|
||||
{
|
||||
tag = "ro-store";
|
||||
source = "/nix/store";
|
||||
mountPoint = "/nix/.ro-store";
|
||||
}
|
||||
] ++ pkgs.lib.optionals (options.varPath != "") [
|
||||
{
|
||||
source = "${options.varPath}";
|
||||
securityModel = "mapped";
|
||||
mountPoint = "/var";
|
||||
tag = "var";
|
||||
}
|
||||
]);
|
||||
|
||||
interfaces = pkgs.lib.mkIf (!options.withNetworking) (pkgs.lib.mkForce [{
|
||||
type = "user";
|
||||
id = "eth0";
|
||||
mac = "02:23:de:ad:be:ef";
|
||||
}]);
|
||||
|
||||
#if networking is disabled forward port 80 to still have access to webservices
|
||||
forwardPorts = pkgs.lib.mkIf (!options.withNetworking && options.fwdPort != 0) (pkgs.lib.mkForce [
|
||||
{ from = "host"; host.port = options.fwdPort; guest.port = 80; }
|
||||
]);
|
||||
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/".fsType = pkgs.lib.mkForce "tmpfs";
|
||||
|
||||
# prometheus uses a memory mapped file which doesnt seem supported by 9p shares
|
||||
# therefore we mount a tmpfs inside the datadir
|
||||
"/var/lib/prometheus2/data" = pkgs.lib.mkIf (hostname == "overwatch" && options.varPath != "") (pkgs.lib.mkForce {
|
||||
fsType = pkgs.lib.mkForce "tmpfs";
|
||||
});
|
||||
};
|
||||
|
||||
boot.isContainer = pkgs.lib.mkForce false;
|
||||
services.timesyncd.enable = false;
|
||||
users.users.root.password = "";
|
||||
services.getty.helpLine = ''
|
||||
Log in as "root" with an empty password.
|
||||
Use "reboot" to shut qemu down.
|
||||
'';
|
||||
};
|
||||
|
||||
vmDiskoOverwrites = {
|
||||
boot.initrd = {
|
||||
secrets = pkgs.lib.mkForce {};
|
||||
network.ssh.enable = pkgs.lib.mkForce false;
|
||||
};
|
||||
|
||||
malobeo.disks.enable = pkgs.lib.mkForce false;
|
||||
networking.hostId = "a3c3101f";
|
||||
};
|
||||
|
||||
vmSopsOverwrites = host: {
|
||||
sops.defaultSopsFile = pkgs.lib.mkForce ../${host}/dummy.yaml;
|
||||
|
||||
environment.etc = {
|
||||
devHostKey = {
|
||||
source = ../secrets/devkey_ed25519;
|
||||
mode = "0600";
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.hostKeys = [{
|
||||
path = "/etc/devHostKey";
|
||||
type = "ed25519";
|
||||
}];
|
||||
};
|
||||
|
||||
vmNestedMicroVMOverwrites = host: sopsDummy: {
|
||||
|
||||
services.malobeo.microvm.deployHosts = pkgs.lib.mkForce [];
|
||||
microvm.vms =
|
||||
let
|
||||
# Map the values to each hostname to then generate an Attrset using listToAttrs
|
||||
mapperFunc = name: { inherit name; value = {
|
||||
specialArgs.inputs = inputsMod;
|
||||
specialArgs.self = self;
|
||||
config = {
|
||||
imports = (makeMicroVM "${name}"
|
||||
"${hosts.malobeo.hosts.${name}.network.address}"
|
||||
"${hosts.malobeo.hosts.${name}.network.mac}" [
|
||||
../${name}/configuration.nix
|
||||
(vmMicroVMOverwrites name {
|
||||
withNetworking = true;
|
||||
varPath = "";
|
||||
writableStore = false; })
|
||||
(if sopsDummy then (vmSopsOverwrites name) else {})
|
||||
]);
|
||||
};
|
||||
}; };
|
||||
in
|
||||
builtins.listToAttrs (map mapperFunc self.nixosConfigurations.${host}.config.services.malobeo.microvm.deployHosts);
|
||||
};
|
||||
|
||||
buildVM = host: networking: sopsDummy: disableDisko: varPath: writableStore: fwdPort: (self.nixosConfigurations.${host}.extendModules {
|
||||
modules = [
|
||||
(vmMicroVMOverwrites host {
|
||||
withNetworking = networking;
|
||||
varPath = "${varPath}";
|
||||
writableStore = writableStore;
|
||||
fwdPort = fwdPort; })
|
||||
(if sopsDummy then (vmSopsOverwrites host) else {})
|
||||
(if disableDisko then vmDiskoOverwrites else {})
|
||||
] ++ pkgs.lib.optionals (hosts.malobeo.hosts.${host}.type != "microvm") [
|
||||
inputs.microvm.nixosModules.microvm
|
||||
] ++ pkgs.lib.optionals (self.nixosConfigurations.${host}.config ? services.malobeo.microvm.deployHosts) [
|
||||
(vmNestedMicroVMOverwrites host sopsDummy)
|
||||
];
|
||||
});
|
||||
|
||||
buildHost = hosts: (builtins.mapAttrs (host: settings: nixosSystem {
|
||||
system = if (settings.type == "rpi") then "aarch64-linux" else "x86_64-linux";
|
||||
specialArgs.inputs = inputsMod;
|
||||
specialArgs.self = self;
|
||||
modules = (if (settings.type != "microvm") then
|
||||
defaultModules ++ [ ../${host}/configuration.nix ]
|
||||
else
|
||||
makeMicroVM "${host}" "${settings.network.address}" "${settings.network.mac}" [
|
||||
inputs.microvm.nixosModules.microvm
|
||||
../${host}/configuration.nix
|
||||
]);
|
||||
}) hosts);
|
||||
}
|
||||
64
machines/modules/malobeo/initssh.nix
Normal file
64
machines/modules/malobeo/initssh.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.malobeo.initssh;
|
||||
inherit (config.networking) hostName;
|
||||
|
||||
in
|
||||
{
|
||||
options.malobeo.initssh = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable initrd-ssh";
|
||||
};
|
||||
authorizedKeys = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "Authorized keys for the initrd ssh";
|
||||
};
|
||||
ethernetDrivers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "Ethernet drivers to load: run `lspci -k | grep -iA4 ethernet`";
|
||||
example = "r8169";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
supportedFilesystems = [ "vfat" "zfs" ];
|
||||
zfs = {
|
||||
requestEncryptionCredentials = true;
|
||||
};
|
||||
initrd = {
|
||||
availableKernelModules = cfg.ethernetDrivers;
|
||||
systemd = {
|
||||
enable = true;
|
||||
network.enable = true;
|
||||
};
|
||||
network.ssh = {
|
||||
enable = true;
|
||||
port = 222;
|
||||
authorizedKeys = cfg.authorizedKeys;
|
||||
hostKeys = [ "/etc/ssh/initrd" ];
|
||||
};
|
||||
secrets = {
|
||||
"/etc/ssh/initrd" = "/etc/ssh/initrd";
|
||||
};
|
||||
systemd.services.zfs-remote-unlock = {
|
||||
description = "Prepare for ZFS remote unlock";
|
||||
wantedBy = ["initrd.target"];
|
||||
after = ["systemd-networkd.service"];
|
||||
path = with pkgs; [ zfs ];
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
echo "systemctl default" >> /var/empty/.profile
|
||||
'';
|
||||
};
|
||||
};
|
||||
kernelParams = [ "ip=::::${hostName}-initrd::dhcp" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
56
machines/modules/malobeo/metrics.nix
Normal file
56
machines/modules/malobeo/metrics.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.malobeo.metrics;
|
||||
in
|
||||
{
|
||||
options.malobeo.metrics = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable sharing metrics";
|
||||
};
|
||||
enablePromtail = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable sharing logs";
|
||||
};
|
||||
logNginx = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Share nginx logs";
|
||||
};
|
||||
lokiHost = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "10.0.0.14";
|
||||
description = "Address of loki host";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.enable) {
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 9002 ];
|
||||
|
||||
services.prometheus = {
|
||||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" "processes" ];
|
||||
port = 9002;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.promtail = {
|
||||
enable = cfg.enablePromtail;
|
||||
configFile = import ./promtail_config.nix {
|
||||
lokiAddress = cfg.lokiHost;
|
||||
logNginx = cfg.logNginx;
|
||||
config = config;
|
||||
pkgs = pkgs;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.promtail.extraGroups = [ "systemd-journal" ] ++ (lib.optionals cfg.logNginx [ "nginx" ]) ;
|
||||
|
||||
};
|
||||
}
|
||||
119
machines/modules/malobeo/microvm_host.nix
Normal file
119
machines/modules/malobeo/microvm_host.nix
Normal file
@@ -0,0 +1,119 @@
|
||||
{ config, self, lib, inputs, options, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.malobeo.microvm;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.malobeo.microvm = {
|
||||
enableHostBridge = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = lib.mdDoc "Setup bridge device for microvms.";
|
||||
};
|
||||
|
||||
enableHostBridgeUnstable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = lib.mdDoc "Setup bridge device for microvms.";
|
||||
};
|
||||
|
||||
deployHosts = mkOption {
|
||||
default = [];
|
||||
type = types.listOf types.str;
|
||||
description = ''
|
||||
List hostnames of MicroVMs that should be automatically initializes and autostart
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
imports = [
|
||||
inputs.microvm.nixosModules.host
|
||||
];
|
||||
|
||||
config = {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !(cfg.enableHostBridgeUnstable && cfg.enableHostBridge);
|
||||
message = ''
|
||||
Only enableHostBridge or enableHostBridgeUnstable! Not Both!
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
systemd.network = mkIf (cfg.enableHostBridge || cfg.enableHostBridgeUnstable) {
|
||||
enable = true;
|
||||
# create a bride device that all the microvms will be connected to
|
||||
netdevs."10-microvm".netdevConfig = {
|
||||
Kind = "bridge";
|
||||
Name = "microvm";
|
||||
};
|
||||
|
||||
networks."10-microvm" = {
|
||||
matchConfig.Name = "microvm";
|
||||
networkConfig = {
|
||||
DHCPServer = true;
|
||||
IPv6SendRA = true;
|
||||
};
|
||||
addresses = if cfg.enableHostBridgeUnstable then [
|
||||
{ Address = "10.0.0.1/24"; }
|
||||
] else [
|
||||
{ addressConfig.Address = "10.0.0.1/24"; }
|
||||
];
|
||||
};
|
||||
|
||||
# connect the vms to the bridge
|
||||
networks."11-microvm" = {
|
||||
matchConfig.Name = "vm-*";
|
||||
networkConfig.Bridge = "microvm";
|
||||
};
|
||||
};
|
||||
|
||||
microvm.vms =
|
||||
let
|
||||
# Map the values to each hostname to then generate an Attrset using listToAttrs
|
||||
mapperFunc = name: { inherit name; value = {
|
||||
# Host build-time reference to where the MicroVM NixOS is defined
|
||||
# under nixosConfigurations
|
||||
flake = inputs.malobeo;
|
||||
# Specify from where to let `microvm -u` update later on
|
||||
updateFlake = "git+https://git.dynamicdiscord.de/kalipso/infrastructure";
|
||||
}; };
|
||||
in
|
||||
builtins.listToAttrs (map mapperFunc cfg.deployHosts);
|
||||
|
||||
systemd.services = builtins.foldl' (services: name: services // {
|
||||
"microvm-update@${name}" = {
|
||||
description = "Update MicroVMs automatically";
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
unitConfig.ConditionPathExists = "/var/lib/microvms/${name}";
|
||||
serviceConfig = {
|
||||
LimitNOFILE = "1048576";
|
||||
Type = "oneshot";
|
||||
};
|
||||
path = with pkgs; [ nix git ];
|
||||
environment.HOME = config.users.users.root.home;
|
||||
script = ''
|
||||
/run/current-system/sw/bin/microvm -Ru ${name}
|
||||
'';
|
||||
};
|
||||
}) {} (cfg.deployHosts);
|
||||
|
||||
systemd.timers = builtins.foldl' (timers: name: timers // {
|
||||
"microvm-update-${name}" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
Unit = "microvm-update@${name}.service";
|
||||
# three times per hour
|
||||
OnCalendar = "*:0,20,40:00";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
}) {} (cfg.deployHosts);
|
||||
};
|
||||
}
|
||||
46
machines/modules/malobeo/peers.nix
Normal file
46
machines/modules/malobeo/peers.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"vpn" = {
|
||||
role = "server";
|
||||
publicIp = "5.9.153.217";
|
||||
address = [ "10.100.0.1/24" ];
|
||||
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.2/32" ];
|
||||
publicKey = "Jgx82tSOmZJS4sm1o8Eci9ahaQdQir2PLq9dBqsWZw4=";
|
||||
};
|
||||
|
||||
"desktop" = {
|
||||
role = "client";
|
||||
address = [ "10.100.0.3/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.5/32" ];
|
||||
publicKey = "TrJ4UAF//zXdaLwZudI78L+rTC36zEDodTDOWNS4Y1Y=";
|
||||
};
|
||||
|
||||
"hetzner" = {
|
||||
role = "client";
|
||||
address = [ "10.100.0.6/24" ];
|
||||
allowedIPs = [ "10.100.0.6/32" ];
|
||||
publicKey = "csRzgwtnzmSLeLkSwTwEOrdKq55UOxZacR5D3GopCTQ=";
|
||||
};
|
||||
|
||||
"fanny" = {
|
||||
role = "client";
|
||||
address = [ "10.100.0.101/24" ];
|
||||
allowedIPs = [ "10.100.0.101/32" ];
|
||||
publicKey = "3U59F6T1s/1LaZBIa6wB0qsVuO6pRR9jfYZJIH2piAU=";
|
||||
};
|
||||
}
|
||||
49
machines/modules/malobeo/promtail_config.nix
Normal file
49
machines/modules/malobeo/promtail_config.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ logNginx, lokiAddress, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
basecfg = ''
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://${lokiAddress}:3100/loki/api/v1/push
|
||||
'';
|
||||
|
||||
withNginx = ''
|
||||
scrape_configs:
|
||||
- job_name: journal
|
||||
journal:
|
||||
max_age: 12h
|
||||
labels:
|
||||
job: systemd-journal
|
||||
host: ${config.networking.hostName}
|
||||
relabel_configs:
|
||||
- source_labels: ["__journal__systemd_unit"]
|
||||
target_label: "unit"
|
||||
- job_name: nginx
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: nginx
|
||||
__path__: /var/log/nginx/*log
|
||||
'';
|
||||
|
||||
withoutNginx = ''
|
||||
scrape_configs:
|
||||
- job_name: journal
|
||||
journal:
|
||||
max_age: 12h
|
||||
labels:
|
||||
job: systemd-journal
|
||||
host: ${config.networking.hostName}
|
||||
relabel_configs:
|
||||
- source_labels: ["__journal__systemd_unit"]
|
||||
target_label: "unit"
|
||||
'';
|
||||
in
|
||||
pkgs.writeText "promtailcfg.yaml" (if logNginx then ''${basecfg}${withNginx}'' else ''${basecfg}${withoutNginx}'')
|
||||
101
machines/modules/malobeo/wireguard.nix
Normal file
101
machines/modules/malobeo/wireguard.nix
Normal file
@@ -0,0 +1,101 @@
|
||||
{ config, self, lib, inputs, options, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.malobeo.vpn;
|
||||
peers = import ./peers.nix;
|
||||
myPeer = if cfg.name == "" then peers.${config.networking.hostName} else peers.${cfg.name};
|
||||
|
||||
peerList = builtins.filter (peer: peer.role != myPeer.role) (builtins.attrValues peers);
|
||||
peerListWithEndpoint = map (host:
|
||||
if host.role == "server" then
|
||||
host // { endpoint = "${host.publicIp}:${builtins.toString host.listenPort}"; }
|
||||
else
|
||||
host
|
||||
) peerList;
|
||||
filteredPeerlist = map (host: builtins.removeAttrs host [
|
||||
"role"
|
||||
"address"
|
||||
"listenPort"
|
||||
"publicIp"
|
||||
] ) peerListWithEndpoint;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.malobeo.vpn = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = lib.mdDoc "Setup wireguard to access malobeo maintainance vpn";
|
||||
};
|
||||
|
||||
autostart = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = lib.mdDoc "whether to autostart vpn interface on boot";
|
||||
};
|
||||
|
||||
name = mkOption {
|
||||
default = "";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Name of the host in peers.nix, if empty uses hostname
|
||||
'';
|
||||
};
|
||||
|
||||
privateKeyFile = mkOption {
|
||||
default = "";
|
||||
type = types.str;
|
||||
description = ''
|
||||
Path to private key
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !(myPeer.role != "client" && myPeer.role != "server");
|
||||
message = ''
|
||||
VPN Role must be either client or server, nothing else!
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
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;
|
||||
|
||||
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
||||
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
|
||||
postUp = mkIf (myPeer.role == "server") ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o enp0s3 -j MASQUERADE
|
||||
'';
|
||||
|
||||
# This undoes the above command
|
||||
postDown = mkIf (myPeer.role == "server") ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o enp0s3 -j MASQUERADE
|
||||
'';
|
||||
|
||||
privateKeyFile = cfg.privateKeyFile;
|
||||
|
||||
peers = filteredPeerlist;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#networking.nat = mkIf (myPeer.role == "server"){
|
||||
# enable = true;
|
||||
# internalInterfaces = [ "microvm" ];
|
||||
# externalInterface = "eth0"; #change to your interface name
|
||||
#};
|
||||
};
|
||||
}
|
||||
@@ -6,7 +6,7 @@ in
|
||||
{
|
||||
users.users.malobeo = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
extraGroups = [ "pipewire" "wheel" "pulse-access" "scanner" "lp" ];
|
||||
openssh.authorizedKeys.keys = sshKeys.admins;
|
||||
initialPassword = "test";
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@ in
|
||||
{
|
||||
services.openssh.enable = true;
|
||||
services.openssh.ports = [ 22 ];
|
||||
services.openssh.passwordAuthentication = false;
|
||||
services.openssh.settings.PasswordAuthentication = false;
|
||||
services.openssh.settings.PermitRootLogin = "no";
|
||||
users.users.root.openssh.authorizedKeys.keys = sshKeys.admins;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
xterm.enable = false;
|
||||
cinnamon.enable = true;
|
||||
};
|
||||
|
||||
displayManager.defaultSession = "cinnamon";
|
||||
};
|
||||
services.displayManager.defaultSession = "cinnamon";
|
||||
}
|
||||
|
||||
72
machines/nextcloud/configuration.nix
Normal file
72
machines/nextcloud/configuration.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{ config, self, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets = {
|
||||
nextcloudAdminPass = {
|
||||
owner = "nextcloud";
|
||||
group = "nextcloud";
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = mkDefault "nextcloud";
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
imports = [
|
||||
self.nixosModules.malobeo.metrics
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
];
|
||||
|
||||
malobeo.metrics = {
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = true;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud30;
|
||||
hostName = "cloud.malobeo.org";
|
||||
config.adminpassFile = config.sops.secrets.nextcloudAdminPass.path;
|
||||
#https = true; #disable for testing
|
||||
datadir = "/data/services/nextcloud/";
|
||||
database.createLocally = true;
|
||||
config.dbtype = "pgsql";
|
||||
configureRedis = true;
|
||||
caching = {
|
||||
redis = true;
|
||||
apcu = true;
|
||||
};
|
||||
extraAppsEnable = true;
|
||||
extraApps = {
|
||||
inherit (config.services.nextcloud.package.packages.apps) contacts calendar deck polls;
|
||||
collectives = pkgs.fetchNextcloudApp {
|
||||
sha256 = "sha256-cj/8FhzxOACJaUEu0eG9r7iAQmnOG62yFHeyUICalFY=";
|
||||
url = "https://github.com/nextcloud/collectives/releases/download/v2.15.2/collectives-2.15.2.tar.gz";
|
||||
license = "agpl3Plus";
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
trusted_domains = ["10.0.0.13"];
|
||||
"maintenance_window_start" = "1";
|
||||
"default_phone_region" = "DE";
|
||||
};
|
||||
phpOptions = {
|
||||
"realpath_cache_size" = "0";
|
||||
"opcache.interned_strings_buffer" = "23";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
68
machines/nextcloud/dummy.yaml
Normal file
68
machines/nextcloud/dummy.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
nextcloudAdminPass: ENC[AES256_GCM,data:4GvCg7g=,iv:3m2Vh86WzrVR7BG0xlNwRE9ebIGLWbVdcxoYC9x7dXo=,tag:t2bWTVlw9rHSVnkXW8ZTFQ==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age18jn5mrfs4gqrnv0e2sxsgh3kq4sgxx39hwr8z7mz9kt7wlgaasjqlr88ng
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvbTYrcUV3Wk0xSDM1Mm0w
|
||||
TkoxZHBFUXFBSC80YzkwV3paWGpRaFY2WndZClh1c0xmNWpWMjFXOS9OYU9OU2Mx
|
||||
c3NEREczaDkvNC90eERwb0RKUlNZemsKLS0tIEp1VWZISXZoWFNuRC9mVE1JUmc3
|
||||
bUNFd2dyRGludFQ3MzdiRzFTcXUwWlkKFGd8Uvfu2W1LejgQFpF162JnVmfPxAuX
|
||||
IQ3oopYXUBM3QqCXGLTY3DBffD4WZ4AXyGLsfUtwn3kcvjQ85ewidw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBraEtDblNxMGY0NlhzcDdM
|
||||
RFo2VGI1UFE4eVdZdDZ5ZTNKRUFCRWFHOWdBCkRBaGk2WmYxK2ovbHQrSGl3akVp
|
||||
TUhxck83Q1NVQy9VU0lXOEVraGtOZ1UKLS0tIDYxS0hHSW1nZW9hOTFJNCtheU1x
|
||||
ZXk2b1RVd1FoYk4xTGxKQ1cxZmVJalkKkC5XckyrgwfqaeVq+OjNCzAtKKiCf7Q9
|
||||
sC9ZMlPoOAm8xpLEpWgNooOBa04YsDEe9XgN8S0HrVxt/NHlnS5+ow==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-01-19T22:23:37Z"
|
||||
mac: ENC[AES256_GCM,data:ZVMA4qgliSASQ0LtuedU4pybVwJA0x4vdSlOspsTF22s9DjRbG2tA7PpxTqDBGliBqS4w5J6Rqp3OSF7zddZ23GOz72sOZv0WY5YGeYxIltT7RWSMRkhkwXoM8Pf3BOYCZ4Gy8zaMVnbwbhHZ9LZI6wulh19SDKBV965moUW+Z0=,iv:tmz8C1kGUZq8gfzTHoaU/8RfrT5ohLqA11H42l7TEv0=,tag:E3AV6t2bbKASeVI2G3kNYA==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-01-19T22:23:26Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQwAsbbUEzSg7iETqT40w/+qjJ+iuHUeeZ+NFMPVVedbLuZX
|
||||
/gPPSJ3JSx3wxJke+QPX/OUiRxXwGBZ5yg7CDoc+RrrdaavazuOUGISL38KPQiin
|
||||
TmUq4nY6nWjMqHPSaQ+NiGxRpIErCQCUx6YEdi4YgHhf9J4KEg0f7ueR5wWlfzx4
|
||||
c7pXkEubFpPy4v45mh8sYXOQTa2yt2keprJ6iqmfL/HKnCJf1TBFxJAvwnPuKDfe
|
||||
npvE4Pk5hcoKjFQNsqpnz7Etc8XfAYXSCXSLKfSaZNSeXQRhE1lHLH9OPnC46li7
|
||||
Dw6SPW0/4MTJrg08JvrNeogQ1QohLT4mkfAnASVUUeGFaF7UhztVoodqMsG8kuhD
|
||||
LtmYv625h3j/QqshpFPGe8nJG1DziE4YHngxvgToIC+6+Q2x47ciulpimlpt6b6w
|
||||
s+mGEVlJLSoJMd9jwE53PMXteBYKWgSEL7osj1V5KIJDFSgwfjYEngCkuyxjf8e3
|
||||
uYxb1WEadSyLhW8xnoyE0lYB6WI8m6j2Ls9TFG7kKtQqrnVSZd2nsKk/5wPVIAXO
|
||||
nrMtb4Q88PLM1eusiLgCs592owKHoWVYqBRpi79EBlnGZwmTfDQzTsQlL7aQCbIo
|
||||
kBI1swNH3g==
|
||||
=K/IK
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2025-01-19T22:23:26Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUAQ/7BGOQn8xVX9IOFHnUXKdiw/+fcXHu0L7CLuhcEfpZRJNI
|
||||
vIbztLTH5gT59SkS07cIEcYWqERO+gjK6pZLCxmYO/c15YDWCv1PtS4YHZAET+ow
|
||||
YHzBTZDq2k+pV/cTbUtJgGYOxuqkqUtflyGZSQM+NjSXu4In83u+nwkEaKSxcaWt
|
||||
q9rrYVkBUiika2FYtyehoCoDuyJzNmfGhZ9CPJaUzrSzuRLQZy6Hdg8TDPTzGqi4
|
||||
awo53eOdsEpNu1AQ5rnJ19RFLU63IQlwEnApnXZZ+AX8J2//KgLOcAqjo5skJuN1
|
||||
EJBh4DjfmOdCCN3uRccNiDn9YYrPP5Jl3jfnkMUQ2gVEE/c5ib84hvjc+y9Eh1jJ
|
||||
s2JqhfX+ccV5kuva1q1CuTUCHQVEKahJAvghl77JQjtUY6Lf+5QLeKbchUnwxaIN
|
||||
v6MwZmdCwBJOS40SnA+Ft2g9psho4MIPXtu4DR4t5VWvhrmw2cl7TCffQslWETxE
|
||||
267PHQegcO40skEOYwkLSv7PWycL3YUg/EfPuElAobqlM45UQA/lcC5seV0WvEPB
|
||||
Lj+Pk8stY3LZ5wpblmmA72PyJhTq7ghsPvxlyRByHIS8v94gu5Zasbi63WGmxgPA
|
||||
mt/M/HIQEf2XOOKuJnGJ3yDwLTAHAgFa0jlIgvt4gkuhm5ibcHLmedBh4ecRNfDS
|
||||
VgFA4UwqUKN1XYTWOvT1vlxE9UE+dgVO0QNMX8yw1ivmL2eyPUk8HtIpKbuDLFIC
|
||||
iKwHMtUIW/q7UPmfKLRbDumimG/290GXxN24ouiN8AR0dCXK9oor
|
||||
=EsRn
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
68
machines/nextcloud/secrets.yaml
Normal file
68
machines/nextcloud/secrets.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
nextcloudAdminPass: ENC[AES256_GCM,data:es9hhtCcqBqPbV2L,iv:Kyq5kqao0uaMPs0GeRkJT9OWYSZfImBXngg51k0uQ0M=,tag:zN/u90/j4rmdo0HtY+cF9w==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4dCt1ZFR0QnRqVFdiL0Zi
|
||||
VTR6Zy9ZTy9YNDBZaDRTZzJnU2ZKcjJ0MG1vCldpRU5tTzc1YU5KbjlDbXlNRjBU
|
||||
Sm8yc0oyNWU1WHJoYTRvK3o4aGtTY2MKLS0tIE9wY0R0V3Vkc3Y1T1YwTkFTY0J5
|
||||
ZCtzbVdtNlh0cXpra2RWbEwzUDM0UjgKY3zZn5PUWuLBQgYxm9BUpLYWw3CdXYA8
|
||||
4U6OVdRF6foj4/GrKKyhVf8dMbLbkhPvxqZ5wg40o6bwHEw9QNM+5Q==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1z0cfz7l4vakjrte220h46fc05503506fjcz440na92pzgztlspmqc8vt6k
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBQbDZaYjRTTDc0SFU2U2xQ
|
||||
cUhESStvKzM5Z0QyZlJldURtRUJZTHhvNEFrCmxReGJ6MU9qdkh6UFVPYmRuQThs
|
||||
VmVCMTQwc0xkR0gzemlSUVlnN0NCZE0KLS0tIDFtK041ZlF4VFBreHVacitSVEN5
|
||||
WXg4UkJtU2dTR3ZjeFYzR3lRODhLYzgKrO+NtT0Q3K8FgDwW0WiZJOUHwkEz+wp8
|
||||
lgBkXy2QJuuJ11f2e9ZJ3hx1xgOm6SMBmgl3zQVfVpq88yZE8uDe2Q==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-11-26T20:00:50Z"
|
||||
mac: ENC[AES256_GCM,data:qoY9SfpoU+8HfvD5v/1S6BOkbnZUmHIbtwr0tTSuPETjnFNgr1VVw9mnRatJKPYYFb9/rMZQWIqTY+iUIEkcTVyVXhd6ki5CHW+uxCeBIyMzq33rtEa/btkEUoii4iPieamBCIY21W0znE+edxfR04yRJtLxMICEbuW4Hjf6bwk=,iv:nG42fRgjpuIjPMYnn/6egEdzYolcUBsspaZ8zMv4888=,tag:C6apGoAvVLsWdLWSCwrx6w==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-02-06T12:36:59Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQv8DLbU8OaQmYtAjTPlqeg1nv+/z3gA16MTZjz8rRBqK695
|
||||
JaEbWoCJ2Nv5Mnzj7owQSk/+f+Q/d00osr4KOhQWTNoq1442MyWgIXKGPDmHgXv8
|
||||
CxFT3hIKMEFFvFtkSdo+HlBSTQJZtHgDSGabd2xd4e45tLnHsPvWQ4ngGn+piUaw
|
||||
qz5+YIpmFNlnL9ubsB8NivryXlIL6wBXL83FyfAPnY+qG0/7frVWwP1Cejg1CGYl
|
||||
bOYxgb1uPYIIqvvU9bZ4r46DfojFFGur9pwG/wKGOgIQ867vsXtRnNm6+SJIHeyt
|
||||
eNqil3tee++V4VVUrDTf+gWufx9YFS/afRgMKuf1pUvQGTBMbUJNhIp+PjpOSBCk
|
||||
Kk6uyMWrBhiCpAVU9GKFW1AbDBCgUig2sLIUGOrfb+RkzDLX4pEoa9DVVDC2pRVy
|
||||
F2fjEEbPAZepsPFNbgDyaixv+FeA5oWWiBnA7qO/v8t142UOtqBcexUZjBYYgRmt
|
||||
c0S+lTk//xEip9wYvY6W0lgBOLqEUEiLg1tw0xvt9H4R9aGNLkCyvUediwuAbfw4
|
||||
bGha9PTckYpnKN589xxsDMqbQ0Vn/rxeSzC7RT+qtjUg1gDbDJQTZdYr0+//e0YV
|
||||
xRvlnfPW9voB
|
||||
=xqAk
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2025-02-06T12:36:59Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUARAAqGyBZLrJ1UpiJKIbQSTQpKA7bRD7olMczjh0Bx1fTN0U
|
||||
bctdfIGVvdp5pM1C6xbvubNqAMEisQ1tMVozDkXCnLARTwcaq6lyE9vl3gJ1iF1Z
|
||||
N8SbxVTYV1SXg3qokyBsZIggQ6gJqAr62Pyoansp4HfwwFwYohwR2zTfHJ8pFkkW
|
||||
R2FfEI2Gw5nN4GaauIxUGFDPuvvZapCWZ/ejt4s/ezT9cYrwYfu9XIlqsivsi3yp
|
||||
I03ohKS/pKhxlE7RV2ufRboG+m6TUCnyj5U5AzQa09hkSHd94s9A6M8I6M6zWebv
|
||||
pdX73sCjWZQdIZoeM5oXcyY/s/h4/w37loOUE/thh1+hIjybAG0CH31nJkjcdcLg
|
||||
l/fqTLa89JVt37bU9c/hVsx2Bc1cTO7nqhG3kyahkMSLFrsb73yTNn4kOqSKZ7+z
|
||||
189oR0EjNySgRt+M20vjKzhPbjxxQTKlpTE0vho6fEHYRmzPQ3IQbVUbPEbZR64I
|
||||
S+Nk7m95ZV8djaUOwqqU9pwDTvuYIBwhGOY1kefDg1sCCTM8C9RI9sG02HeQpme3
|
||||
bgkO+m4khXeiiIrTAODiyM+GCwx6UcwooUSpu8LZJmhiZtfgMsFdGF3P7ngtoOEQ
|
||||
4cxP231EI/zoMqRyXYrvAovxXndwghG0LGcCAZZL6mNN2xzE6z1gesVWRjXM8inS
|
||||
WAFB7DgLTlY43D4QbhkyZfo6XltYe1g1tcJJraG/HICa7hq5BZn48t/BcacCvsrJ
|
||||
lIkEgOT8gn1SlQbDL+T+3pRNOixGKPNU6Ategoy+Eq0Im3AhE0XO8Ns=
|
||||
=Uvc2
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.8.1
|
||||
131
machines/overwatch/configuration.nix
Normal file
131
machines/overwatch/configuration.nix
Normal file
@@ -0,0 +1,131 @@
|
||||
{ config, self, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = mkDefault "overwatch";
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
imports = [
|
||||
self.nixosModules.malobeo.metrics
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 3100 ];
|
||||
|
||||
malobeo.metrics = {
|
||||
enable = true;
|
||||
enablePromtail = true;
|
||||
logNginx = false;
|
||||
lokiHost = "10.0.0.14";
|
||||
};
|
||||
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings.server = {
|
||||
domain = "grafana.malobeo.org";
|
||||
http_port = 2342;
|
||||
http_addr = "127.0.0.1";
|
||||
};
|
||||
|
||||
provision.datasources.settings = {
|
||||
apiVersion = 1;
|
||||
|
||||
datasources = [
|
||||
{
|
||||
name = "loki";
|
||||
type = "loki";
|
||||
access = "proxy";
|
||||
uid = "eeakiack8nqwwc";
|
||||
url = "http://localhost:3100";
|
||||
editable = false;
|
||||
}
|
||||
{
|
||||
name = "prometheus";
|
||||
type = "prometheus";
|
||||
access = "proxy";
|
||||
uid = "feakib1gq7ugwc";
|
||||
url = "http://localhost:9001";
|
||||
editable = false;
|
||||
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
provision.dashboards.settings = {
|
||||
apiVersion = 1;
|
||||
providers = [{
|
||||
name = "default";
|
||||
options.path = ./dashboards;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts.${config.services.grafana.domain} = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
|
||||
proxyWebsockets = true;
|
||||
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
port = 9001;
|
||||
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "overwatch";
|
||||
static_configs = [{
|
||||
targets = [ "127.0.0.1:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "durruti";
|
||||
static_configs = [{
|
||||
targets = [ "10.0.0.5:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "infradocs";
|
||||
static_configs = [{
|
||||
targets = [ "10.0.0.11:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "nextcloud";
|
||||
static_configs = [{
|
||||
targets = [ "10.0.0.13:9002" ];
|
||||
}];
|
||||
}
|
||||
{
|
||||
job_name = "fanny";
|
||||
static_configs = [{
|
||||
targets = [ "10.0.0.1:9002" ];
|
||||
}];
|
||||
}
|
||||
# add vpn - check how to reach it first. most probably 10.100.0.1
|
||||
];
|
||||
};
|
||||
|
||||
services.loki = {
|
||||
enable = true;
|
||||
configFile = ./loki.yaml;
|
||||
};
|
||||
|
||||
users.users.promtail.extraGroups = [ "nginx" "systemd-journal" ];
|
||||
|
||||
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
1218
machines/overwatch/dashboards/main.json
Normal file
1218
machines/overwatch/dashboards/main.json
Normal file
File diff suppressed because it is too large
Load Diff
23804
machines/overwatch/dashboards/node_full.json
Normal file
23804
machines/overwatch/dashboards/node_full.json
Normal file
File diff suppressed because it is too large
Load Diff
60
machines/overwatch/loki.yaml
Normal file
60
machines/overwatch/loki.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
auth_enabled: false
|
||||
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
grpc_listen_port: 9096
|
||||
log_level: info
|
||||
grpc_server_max_concurrent_streams: 1000
|
||||
|
||||
common:
|
||||
instance_addr: 127.0.0.1
|
||||
path_prefix: /tmp/loki
|
||||
storage:
|
||||
filesystem:
|
||||
chunks_directory: /tmp/loki/chunks
|
||||
rules_directory: /tmp/loki/rules
|
||||
replication_factor: 1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
|
||||
query_range:
|
||||
results_cache:
|
||||
cache:
|
||||
embedded_cache:
|
||||
enabled: true
|
||||
max_size_mb: 100
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2020-10-24
|
||||
store: tsdb
|
||||
object_store: filesystem
|
||||
schema: v13
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
|
||||
pattern_ingester:
|
||||
enabled: true
|
||||
metric_aggregation:
|
||||
loki_address: localhost:3100
|
||||
|
||||
ruler:
|
||||
alertmanager_url: http://localhost:9093
|
||||
|
||||
frontend:
|
||||
encoding: protobuf
|
||||
|
||||
# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration
|
||||
# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/
|
||||
#
|
||||
# Statistics help us better understand how Loki is used, and they show us performance
|
||||
# levels for most users. This helps us prioritize features and documentation.
|
||||
# For more information on what's sent, look at
|
||||
# https://github.com/grafana/loki/blob/main/pkg/analytics/stats.go
|
||||
# Refer to the buildReport method to see what goes into a report.
|
||||
#
|
||||
# If you would like to disable reporting, uncomment the following lines:
|
||||
analytics:
|
||||
reporting_enabled: false
|
||||
29
machines/overwatch/promtail.yaml
Normal file
29
machines/overwatch/promtail.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://10.0.0.13:3100/loki/api/v1/push
|
||||
|
||||
|
||||
scrape_configs:
|
||||
- job_name: journal
|
||||
journal:
|
||||
max_age: 12h
|
||||
labels:
|
||||
job: systemd-journal
|
||||
host: overwatch
|
||||
relabel_configs:
|
||||
- source_labels: ["__journal__systemd_unit"]
|
||||
target_label: "unit"
|
||||
- job_name: nginx
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: nginx
|
||||
__path__: /var/log/nginx/*log
|
||||
|
||||
59
machines/overwatch/secrets.yaml
Normal file
59
machines/overwatch/secrets.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
grafana_admin: ENC[AES256_GCM,data:c+ZnOyxSXrG4eiK8ETKHheadiSz98LLHYwxb,iv:Ut2qFD2p6OmKDWjLMjFxyISxzTdJpZpgIB7obW5bgkY=,tag:HdayzjXQ1Zc7w9ITLzKLxA==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxN1VURXJuMENJV1Z2eEtS
|
||||
bUR2cTNmNUdhU1B4SHZNMW9KRDV2dW5VNmlNCjdmYXpZb05mMEdPdjN4c0VWOUhV
|
||||
RW4vV05CMno1MmJmYzdESjN5MFVFcjQKLS0tIDNxTE1KaW1EVGhtOEQwWXZndk53
|
||||
bFBCMExGdEdMb2Z0TzF0Yk02MUpkN0kKIUm9iUvU/xu1Xl6yoYSVGcIXKnGsp/D/
|
||||
RjVQ7tgJIbrupubny/fg4v2sz5HOs5uzmEq4ZKgBWrBeMPss4gYstA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-01-22T00:51:32Z"
|
||||
mac: ENC[AES256_GCM,data:TEEyPmVxIJxC49hDqDbwzTZZ/tNymFr0dMvWn6DRli70Kp5XXNCLTpicAbiFh3WoyzbDpN/5c2yxVNGjhB8nXgKpCZdffdONMY6eSCpPbblYwJS7hNsjW+u2wysSFPDAk5apwbNXJcKnlI1tBcGQRHlym9ShSw6fT7K7afWYWqo=,iv:583DWNug8yNF/vZZN4btT6P1yUa0b1UN4frvAX4UKv0=,tag:YI5KIAe5P5Bx0TZU4wG8ag==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-01-22T00:51:09Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQv+PxajhJgXHcxwJ7Mk0gjqFV0dGmNJ1m0eY3gPyIS38GSB
|
||||
Rjto1zUd6EARu1GnxSrVrSZYlQaL6x3l2DuFIP7mtymvlFrmhiAoDz/si0zlzsJp
|
||||
WZyQZdepnt9FyYJAwTzbmfVdpZDYajuMI38byMJqzUhS7SEOsPwiU1KRoTHcf4se
|
||||
2E+9v8OwTVT2UoDxyiVJuDAA+K+Jh2RjHk3p/uVnZDqqQpI9UAI8LrCpun9uALpH
|
||||
+29wyhkCZ9RIHU7nDQNVvwHkbYCyRUwR44bciSwITpjp7GuZCcZvzSSimPktkC9q
|
||||
VZkHA6rHgHgcu6mnMfpP0+j4gB0dU0t4hGF41klV3YpEGfYcFIsKV10lfa6aMNmW
|
||||
08RuLdCtnQyplYhgBm1zQvYHJsIuwK9s1B2dz3Z8l3o2eg8AqFuIL+MlZOvf5A/2
|
||||
MOXffyXbOM5Dhy7DdUckTOYYfwWe1mStw3vx3I3mAFzuOOR7HQuzlc9Bf1oxh36T
|
||||
6e/qOijjPPqkLeR2mufo0lgBBFTQFt2jVvMo1lrCB8Amj4yj/4noXTzglkYTYBKs
|
||||
S513kUdhAGtWoNrqcItOYAn/gl+CPGY2Op3tJBVCWM6aT/KO6M/LPJ7wiQk2zlOL
|
||||
pp7SnCKvv9eQ
|
||||
=N+uj
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2025-01-22T00:51:09Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUAQ//fm/TcxgsAMY6P8jvOQMcRBmjjVwfLP1UTTnkRUa36Mmn
|
||||
2V9619zsH1dzTp0gUVV8mvIKUtpz2nCBTZBJw803wW9KorxW6f4e3+mIWelZT5WM
|
||||
sLcQPFWAYKDVnSfk5j8kRSmpM6k2xFRB9DTEMIyFH9PZL99Fztp2hjTn553YTQOo
|
||||
pdw+AMzgptYQghW/Pl/32wXHwCO+bL8tyk62VIQO13l3tX83oSslXNkFzNQYt3jv
|
||||
xXFUaQEGD/1lFLeFnIuJZzfjWt6n0fShJboUcuk/ZIcYdwrbG0pyLLoBoObSRQtG
|
||||
t+7VpWpfl3rnk822SU9z9YcaMNy9HD3Kz9Qh0BRQiN3scCMzm1LyzlXLqlc/gPiq
|
||||
JyCxy98vJXIxmlLQZpDFfTMe3xsc8jSsHI6av+wEFKGEJAOUkDtRYvLfZdgDTfiB
|
||||
XTAhQ3ixnlBxdZZ9DjBXyVfM8q9iB8bggFi7g2SjO32LKhXRFUqZR+avddCyKR/V
|
||||
hRpWjDRn+eX2tl7LPawvX6tIow3aZiezkMVyeRXfcZCvpicq64b80LrYR+JJUfJE
|
||||
vxHaekKImrdJ9ocii0wW91ZmESJwL6m5lt3ZsCY5GTlEDt4wBse5uhj48mtuK8sh
|
||||
g8uQMKp7SiiCtV5a6O1SQLDJeAt6VCcRyudLToO9S4gwrGXNPcGxsHj07XAN2PHS
|
||||
WAE6wUhufXfpa8UgSWy7fmEZt4L03XlRfC7bm/ycwaFww3A7w4+B1gkW6gOon6sy
|
||||
nOyIxUZfU6abZWKzH+OIuViKH7xPiULDy75gEmkRHjKu5BiC3Tx0eO4=
|
||||
=+PPr
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
7
machines/secrets/devkey_ed25519
Normal file
7
machines/secrets/devkey_ed25519
Normal file
@@ -0,0 +1,7 @@
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||
QyNTUxOQAAACBpnsgZCWwvETJKoZf7QFKCLaUnj8hioci+SewK8cUUwgAAAJgdrbX3Ha21
|
||||
9wAAAAtzc2gtZWQyNTUxOQAAACBpnsgZCWwvETJKoZf7QFKCLaUnj8hioci+SewK8cUUwg
|
||||
AAAECaQfylNoG/uN8fozvq3loBLWQ3gIKPOGnZpwyHUlAMO2meyBkJbC8RMkqhl/tAUoIt
|
||||
pSePyGKhyL5J7ArxxRTCAAAADmthbGlwc29AY2VsaW5lAQIDBAUGBw==
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
1
machines/secrets/devkey_ed25519.pub
Normal file
1
machines/secrets/devkey_ed25519.pub
Normal file
@@ -0,0 +1 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGmeyBkJbC8RMkqhl/tAUoItpSePyGKhyL5J7ArxxRTC kalipso@celine
|
||||
@@ -1,28 +0,0 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
xsFNBAAAAAABEAChmMEXC6TjRtYAHk6CsrnP0LFd1vOuH4+QSalj9fCaCpYVEStP
|
||||
u9EtW2DK8kSBdo8DAngzsMFt9PoSLcPcB00s9R6EACVuOn8nTVkyYtO/8hWJVexI
|
||||
G3SB/u2a+MYC2QEtw3Exzleexx3EkZywAzGWzJXpajMbGsfvssXl96xb7jxrxdNv
|
||||
Msx9t2RJGADSG6Vx1+A5UmFwITkGpn6wjvQXLvkim4ZHRzX588vgz/IdJ6yqOeeV
|
||||
v0VyVNTPfXkDO2urxRgZ5TG9wE5v9OKFofooR5T1rB/khW2jMoqavLWeRVCqVpmp
|
||||
MQ8VMkJzEoP7RX7vAAgCbVrTe55sMmXa9gtXo50wz6lHYHnepff6FuquS7szH7Ja
|
||||
lRnvx6CR1FwWIGhef/kxmNQKr2Mt3V7riFmv0bkR8ttI5uyGposeWfY1T6iJfxic
|
||||
duIYXrV11T6fWOEUh80aRz+8E46LFv4sGZjTOvHWrnetKNweuOC9/yaSDkEr35sM
|
||||
xVffS0wNGclhxl860qBCbhG/X7YYZs5sFHsRnsb7rvTCP8LtGhrjybE/b4WuGRCU
|
||||
rEftVOBe4NSwlsdmRVl5Cyk/ZkJncrUwlaH6laCjBfldQcdxAHzdzPZQhOmBaLkF
|
||||
1l0EpteSbEsi3CS2rkkriSsZ+nZwaccTa6+B6twrRmGvcBrZXlsugsdDSQARAQAB
|
||||
zSlyb290IChJbXBvcnRlZCBmcm9tIFNTSCkgPHJvb3RAbG9jYWxob3N0PsLBYgQT
|
||||
AQgAFgUCAAAAAAkQvNUtHtVQM9sCGw8CGQEAAGIaEAAoWuyjinNk8ovTAH+TjKWK
|
||||
UD4WXwt5OJ8l3FJPpecZbhTaBrRdlLzY1tlKzwd8c69QVOoqk83Rv4Fep9b8EFQ5
|
||||
U2bTtXLm/wINSetjf6vlLYxEPNKVzGtk8ejw32NPnJVsGeXNazlcJaR2jRW4kMcj
|
||||
A2b8aeUKxnLaoZYiCLZGvyvuB7oj/nIX7iuaIDHKR9oVyQOekeYlg9R92wKCZDiF
|
||||
1USoknPO2cSYFZpDM6tmIjkOoEgnwEZqzwI7q5dXz/mqp86XeMJWFkyTRhPT6Hiu
|
||||
iS/5wDsFJi7wgl4Jr6bBWFaHeBVSTJIwkoahxpM/qVYAYINgLO9erxMkmX5lRzxs
|
||||
NC3LsqQ+L5Isx96AXaZWf+IOYgN8nB3bsQqvlqbvMIUE3wkxg7oeNzDzvgxQM/Tf
|
||||
AC6zYHiGrs7WS6+ojx2flJnWA7mrOllimv5pTTUBtA7gh1JN9aUzzBjvF0LlzN1O
|
||||
DLyxu1PsIazI1eklUm0ljyOoqBnOrDZoC4Kz70pguDGDvipCAJWjG9SjXDwXGAA0
|
||||
sUhnebh2HPZYj73xDIrbgkg+79n6U5UuewUFwDQfE8VFDp62s1s9haCRUKU6uwiL
|
||||
i31OKOkDcYSyx/3/VvaT3lT247VERDw/5yVYrrhQwxS4WSabX8gz6qfKB4bi/HVs
|
||||
lX2duwzSRzuytZCKKG+fdA==
|
||||
=VTby
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
@@ -1,28 +0,0 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
xsFNBAAAAAABEACm+W5sGSC25OtlwQdOBCSfX2DnPuk5abjxY5HMIv3MnySouXpW
|
||||
L3VoE6Irur9lZwfKrXaUweJPJHVo/Sfknh9GSBCW6yFFcGZ5nNx/QNdbfjOSaUw2
|
||||
0BkW1CYRVcLIKSHpepbTDHBxgKaCYsmupptFQ0Nzx19PPMV/WBqrkSlEpDJyq9y6
|
||||
cTaGulRKWBVDytMFmibhGlqpfEI8bzrxaeGTqiRTZJqL3zDDi2afDt1kJeCXKd32
|
||||
XOywDZgB5CinY3qsR45ftC6mZ5fV+ex3M/Uc4YJiVgwg6GlSdiYW9Mqf4koqpLCq
|
||||
Xq3ztEo9FjFen7KmAcLstFmzY3fAXGIJzb0CfvVrM32wsdC6NRDINdMBmrOeKXT7
|
||||
g45n0LOdCFr4AOKyABqMudbKrgF9txHt549oaQ0wHCy1nStji1OpbhdpCKDFKPnl
|
||||
ojG1Nur9DPRFmQ01I3KIjvCrf8J+CgI5YVwOr+m5Zw3i/b0qd+9R/8oAmzhhuyt7
|
||||
kckSVTCjNzsDgjjOa8FVQJremTdkQuWOlx0HxC3aQdSoPxOfpeUhybfttNpvUuta
|
||||
5EbsiS/PJfzMOtZDG++naKO/xGJDiaYDhW1ZeGI2fOFUm4RYHqCFES32XF4ygpGq
|
||||
wz2bZNKKSf4lxoD1+SBqOyd1eN3u8GmX8OgUB3TpgEuQb/XL31zDKCZ7pwARAQAB
|
||||
zSlyb290IChJbXBvcnRlZCBmcm9tIFNTSCkgPHJvb3RAbG9jYWxob3N0PsLBYgQT
|
||||
AQgAFgUCAAAAAAkQj5s8BYqm1MICGw8CGQEAACMDEAAFko8JYC1zGt5rFKokXGbs
|
||||
K331UHReN02QpdL8fhMt0Rqoh1FKt8Sr8lzCLPNOnlgxSG5lXmA3dFfWAnFrNw5T
|
||||
1u1oU0sB+CiekyWXJxTASur1g3DtLv6qA19Uw4i9bu57LK5E0ycoI3RnR+YbDri0
|
||||
psPNP01x7NBO42O71rnBypGbCPXnLOAaKq+ISCN+XCZBkmjKhcWJlg5DJfUGCEdr
|
||||
DCKi/1j5mgs8H3sUrc5Y4gLz3BWuypAGWhQr/KDAcmCm/u0ZfzVyrxw50eMuzeF7
|
||||
GfePPI70nXjUlywuFUFg7EWlCT6sRtZf+o4jkXcwGpZLx2/rdZ9J2I4VmYakBVpA
|
||||
2OQwi47YAFe1wz+nsF3fImuGQdHu0x0sFLbuJaSJCOVYhMcZhskRygqqI+wEvDF1
|
||||
i7SYzi5Xt7rJrSaqGhAzlg1Cc8wzMhoCE/IU5Hd55OtbvRwZ2JKH+UAl/L9Qizqy
|
||||
AM7nSrUjA5p4H09PMuKGmCEcZDKpH2huAeqmtGQ626edE2WNduE2jCdAIcN263PX
|
||||
1+TIe4IRLhtmTKqfJgbzrt0cSIAsuvI8s78ehsP2eNANdkQjzBAaEiOo75G/g+sd
|
||||
tWl8gxOhrPKkb07KqcPEfXq4QYk7kV+pWuA2yMiTX5A+oy8gVFBxUp+zbjYeRuW8
|
||||
cpHyvbDvdnQ5LGNC/v0rdA==
|
||||
=Rmch
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
@@ -3,5 +3,6 @@
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCfDz5teTvRorVtpMj7i3pffD8W4Dn3Aiqre5L4WZq8Wc4bh2OjabGnIcDWpeToKf38n5m0d95OkIbARJwFN7KlbuQbmnIJ5n6pUj/zzRQ3dQTeSsUjkvdbSXVvTcDczMWwLixc/UKP1DMbiLHz5ZSywPTSH2l40lg74q7tSFGBwMy8uy4tsdp2d2sUIDfpvgGj3Pq+zkQHWyFR5BYyCLDfJMTQvGO0bEsbRIDOjkH8YVni46ds6sQKMgc+L2vPo8S3neFZBQRlERVRvIAzdLiBWqGkiw4YgWQA8ocTfWp9DVzW+BZiatc34+AX3KtLEF1Oz76YsKjBttSQL4myUucuskz2Bs7UYvAsDFlWyiJ43ayZNzvG63m1UVsAoq84IhNYsdkPhd+G1rtnG0KxPVAtn7RkAGt8t7ObU+6xWayHcpSteNeE+QyH9nNmJcXNNKfoOeP4vHUBrBTeURafw527yuZDOYknJmg3O+nkeGseIgBYgq/As4+dD6vhp03Y5chjU4/FC6nEjsGPRdfe2RZx+0cqJkLgdd1paGByUfPfaUKykw4TsCUAiDucRwBjU32MLslUbyzeEkjzOJzOD5Frif3jZZLxaNP2QcHRbTiiKkdn+WFJmjr3BdC60pm7hqvmDxl0UZcz9hDv3wZUALUc92TQXnWc8GicKdpQgRYDRQ== kalipso@c3d2.de"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCxgcjNOYbza3+RfANFDXy7HXNRFlkpDOAcGyB7MKshiVlbPByWRSjfZa0BeRNjpeCd8QkIodKUzqYOCOrc8ad3kiNbdLRcDz57A5xSLD3ynakoWJo0AmJjT3Ta1JJj8inNwwykR0ig5//SrtsZb9HkWJDAF017MokM2r8AWPE1QzcQdh93kojXcgTHrJHzEqgKbEGDEk37f1RvZG4umEFeqdK2FvS5isPa7P9X7hyyoDC8bvEy7xfaDrToJAoXon6r79taxH8UWIvy//xsU0NBLYK2eE4RQe2AjF6Ri+CybI6y1SsHOvyh4nNKWlfUOEL6UnIulRn/LXFOKCJi7xuoTeJXS0+w1DNEuiGosVNXPSKbUm/eDBVnb8Iyep9wmygSZayN82xL5lRlG3Mn45ttecqfm2SJkmduBA5qXcTdDPe/lXTZaVO9tbiIcJfUgd3ttEu2+6YjLn74D965PlovzvR6EhbVUZ8IkOAt4VmuTkXIdm8SCS7jzhsiKeUXoZ4rfa375zi79SIPuIkoMasj6d16wcYOeFIUIMFFccfQ9jQjr9NTSXC2dd7sfbI9I9mF7eRQSsUdSwpP8WH1b+M1MxTbdhEUdPwpOLviTTIuk8E8K8DQDZIcOOh38mCDpyoh02nwfRxlyoYVsKAHIQH02dHTvYEa3/pMsRwGc9W1Ow== kalipso@desktop"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINQg6a2EGmq+i9lfwU+SRMQ8MGN3is3VS6janzl9qOHo quaseb67@hzdr.de"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICKaEcGaSKU0xC5qCwzj2oCLLG4PYjWHZ7/CXHw4urVk atlan@nixos"
|
||||
];
|
||||
}
|
||||
|
||||
59
machines/testvm/configuration.nix
Normal file
59
machines/testvm/configuration.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
let
|
||||
sshKeys = import ../ssh_keys.nix;
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
#./hardware-configuration.nix
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
inputs.self.nixosModules.malobeo.initssh
|
||||
inputs.self.nixosModules.malobeo.disko
|
||||
];
|
||||
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
malobeo.initssh = {
|
||||
enable = true;
|
||||
authorizedKeys = sshKeys.admins;
|
||||
ethernetDrivers = ["virtio_net"];
|
||||
};
|
||||
|
||||
malobeo.disks = {
|
||||
enable = true;
|
||||
encryption = true;
|
||||
hostId = "83abc8cb";
|
||||
devNodes = "/dev/disk/by-path/";
|
||||
root = {
|
||||
disk0 = "disk/by-path/pci-0000:04:00.0";
|
||||
swap = "1G";
|
||||
reservation = "1G";
|
||||
mirror = false;
|
||||
};
|
||||
storage = {
|
||||
enable = true;
|
||||
disks = ["disk/by-path/pci-0000:08:00.0" "disk/by-path/pci-0000:09:00.0"];
|
||||
reservation = "1G";
|
||||
mirror = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.kernelModules = ["virtio_blk" "zfs" "virtio_console" "virtio_pci" "virtio" "virtio_net"];
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# needed for printing drivers
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.acpid.enable = true;
|
||||
|
||||
networking.hostName = "testvm";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
system.stateVersion = "23.05"; # Do.. Not.. Change..
|
||||
}
|
||||
|
||||
31
machines/testvm/disk.key
Normal file
31
machines/testvm/disk.key
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:GH71ek6+a++P9sDUjO0IPojdU1epX98wcTqmoEgsu0j+,iv:LysgsJdPDvKOUz7l0IyV58QHN2RHvHP14bt1p4571NM=,tag:1WrqC3S+Z6bkE2d76RYtXA==,type:str]",
|
||||
"sops": {
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBHOVI3b1dBa2d5SElHcFdq\nVHZwWlpIU3NpYm8zQnY3aVhOVkxnU1pkZUJNCkJ6bzhqdU5EVy9Wa0creXJHZ1pu\nbkRPVTR1K0o0dmlYbGVIbVRiWjFyL1kKLS0tIHl0aFpUYy9hWmpsNUFoY2JpWUhL\nalluN1RRSTBNUlprZWFISlFoUExXUXMKaULQKgVLNfHX8m0Ac1YhcbM/yhioyNCu\na1AUDjBmruKL9ngqz9Dwzxx0sJJOIFKMdYMVn9uQfui/XCHewO6uRw==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2024-12-31T02:35:20Z",
|
||||
"mac": "ENC[AES256_GCM,data:7K8G7ZFaA7wT0lwujkuJP0HL8WW0m/IkMjgFU9ikWe/GVZMlFDWTafaRNLxdBHNhHwilM8suH2z0P36Xae6pReh47PpID5JS8NC1V38fzww5qW74eFkHq3Pu8HRWb66u7zA/LiyOcEQgtrdP1zbnfmHUgakyNluSn7W1gOtsfxw=,iv:l65AiYn7ETRySF1Wr9nOUk9Fd1I4VGqd/zZbqkCyxYA=,tag:TeVyRa8aN6hIn3iIKPPvbQ==,type:str]",
|
||||
"pgp": [
|
||||
{
|
||||
"created_at": "2024-12-31T02:35:05Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQGMA5HdvEwzh/H7AQv/ZITVtnQl5xO2XLTTaNAZ50WhHkVV1G9H2TyxO0NbaUPj\nbo7LdbuB/+cv3wpg5oy5VpWW/JLElqizxbrE5gzQCzorwGE7lpKW0XQubofW8t9l\n+6k9UFXxyfVQJHwcIbexYfL2UhN62eSzzxPiKYVyNw4oM9ySeU+MCeCiv0omLUPg\nWSdOH4q1QYkRGJO8db7KlJSdvCoVjyEiCaLwKdWnPk5pbC+U7wp75fPdFwmzBchc\np9TXKeFF8dVGI7DKuGXA7lBm4ZzgSt4wNdZmc7mvTrTInaDVFA/ptbAfhh2/hNEx\npOijlXbc8ARKAhuLASPy6j37Nm2QdNm/8dl5x6eA7Sx7FcO8qV38Q//V4/DZZddJ\nT3NLC4tWLglpdyFX7H0zmZ+jQOLGJHorwzO+NgSOEj3N4venHYvJyI+vwVGjVCjQ\n1tZUIxGMx5iu959PinvlvBYI7oeKITPLyo8pRRx2EaA+UEBR2f3y+R0bTiBhChKM\nieUIVIK/fbvhdXhwwfRe0lgBm05hL/Vmdbal9QU8o/HIPeGTNitaqLQ59Ets7qm4\nf2FhHaOMO0YaDPtCNBGbRh/mEWH8tjhnI1sLJg/0rR9sOQ/oCzzIYILogIkm3ueE\notFqp95QQPVA\n=P16c\n-----END PGP MESSAGE-----",
|
||||
"fp": "c4639370c41133a738f643a591ddbc4c3387f1fb"
|
||||
},
|
||||
{
|
||||
"created_at": "2024-12-31T02:35:05Z",
|
||||
"enc": "-----BEGIN PGP MESSAGE-----\n\nhQIMA98TrrsQEbXUAQ//fAGV0oLuiwL4TmQnrHF88ixvZ/HghKI9k/5zlORIdoaR\na1w6U32coX8HpEfcqON45ZQWSCFtlizlmL55jb1ugXFY/bS+KECO8XaMDhHXNkB/\ndfeCmASvqIlFkl/X3YeD2FhHa3ZlcS93x0duJ+oo18WIErkNuECOL7hwkh+m5YfS\nWtW9Z3J51qfS5S6ctdm9vKcYSrgTkADsyVQp9GqxO3xZGpWudGWDaK0gVBX5wk5t\n1uKhDpnIZdFZ42N5Oy/UqXF5pfEQ0OwxlOS8VMleq1wEPc/DPVku23HRSReS0k7x\nuVeFZpaOfe22ncgI4TVQln8JT0+ZPeAwqBn6LWp0XnPnQdkyE79ARMPqBTPN/6Pn\nFkVpInBVukVJ1AiGpHHxESPtiKoMUZpE+k3WG2dRFWmaON+n0kR4VFpOju3apxTH\n8RGN+Uyn6MswNOZDKoDjlVtkcwgJgar/KwxXNlF7BU3/KMDEBf1UHuQE58Y2eBsC\nI85AEpbskEeOu+MF1SNJkdx/BR+lUaR6ax+dVzOIwxLyyDoCGg4SEoL1Hh1nNRth\nxRZnYfN3FBGv3FnvpaCbfbBDLLkWxzst5HRjp+v2lyPM4eVtyvYPGdfYM5FK1den\nXVawulE3cjM786/Z7X2IK5IDzrvo8nIs/Keg2YqnZe0UgM3XFCoYnwxi2Rev1J3S\nWAHTBs22q/cEk3SLlfzLyqWochY33gI6fC2amOvC5HNhcs7vr6CF1W44d3Yx6WCO\npqxY9jmc4gVWeBLZV/d9T95qLwOQK7L1/tokdbggQcEXFOqpvPzm5pc=\n=qp/h\n-----END PGP MESSAGE-----",
|
||||
"fp": "aef8d6c7e4761fc297cda833df13aebb1011b5d4"
|
||||
}
|
||||
],
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.9.2"
|
||||
}
|
||||
}
|
||||
36
machines/uptimekuma/configuration.nix
Normal file
36
machines/uptimekuma/configuration.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = mkDefault "uptimekuma";
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
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?
|
||||
}
|
||||
|
||||
73
machines/vpn/configuration.nix
Normal file
73
machines/vpn/configuration.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets.wg_private = {};
|
||||
|
||||
networking = {
|
||||
hostName = mkDefault "vpn";
|
||||
useDHCP = false;
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
firewall = {
|
||||
allowedUDPPorts = [ 51821 ];
|
||||
allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.self.nixosModules.malobeo.vpn
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
];
|
||||
|
||||
services.malobeo.vpn = {
|
||||
enable = true;
|
||||
name = "vpn";
|
||||
privateKeyFile = config.sops.secrets.wg_private.path;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."docs.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."cloud.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."grafana.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
virtualHosts."tasklist.malobeo.org" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://10.100.0.101";
|
||||
extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
68
machines/vpn/dummy.yaml
Normal file
68
machines/vpn/dummy.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
wg_private: ENC[AES256_GCM,data:s+dZfKCfrdZnFKhmCl7u1LRzR5dMflJumh1uVQ5Dktb5teohxDo0zlOR7KE=,iv:N9WSEzGonWNkqix8yaImhvrxpcAEJraWEcTrXORASow=,tag:pKgOmtKJ933FEKZVDHCWWQ==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age18jn5mrfs4gqrnv0e2sxsgh3kq4sgxx39hwr8z7mz9kt7wlgaasjqlr88ng
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSMFk2bzE3OG9VR0VqOTIz
|
||||
UEQySS9SUnRmMDFqVTg1dks3WTZvbE13VGxVCitHVE1SVlBlYkZwejNlWWNMTVhF
|
||||
M2EzSFRmS3lFd1VPMHRpMjhtMVgyVDQKLS0tIGJObk1kcWlaeUhveHdrY1BEQkh4
|
||||
WTJua1FvNFFtMDFGWE9ZaW9wWFoxcncKlYHjkzlUj+rBPmXK/jj9XCUoGrQ4vBXH
|
||||
ZTItzrbCI30juPjy6dJ0ffZF2ILvJLUdwurz4lZFybNuUjhE2sAY+A==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA5S1dhZUVpT3NMaGR4eEhV
|
||||
dUxvUGVvMUtPbWhEQnpJd3Y1YTBYbm1QMTBVCmpQbkhvM3VWV2MvcmY2RVhVOWdy
|
||||
MVZxK201bmcwVHlwUlFnb0p5eGFNNGsKLS0tIDlrc1ErS0NiRUJ0UFZnNHNNSk9m
|
||||
U2xLQVhoS2NxNUVvcGZBYW9VVkZNOUEKeCpijhxpkAxCB9/iIQmek03mj7b14sqs
|
||||
CuGKgoeq7C6eG1PK3I8MzGplQMyCpEFQ+33KMj0vGwktpv/eVzC8/w==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-01-19T22:47:26Z"
|
||||
mac: ENC[AES256_GCM,data:DiriXLPnm+08q1Jp1YxjEdsJzFiewQxgu1JDdevo9aGdkq92Xu8cnSxLzWUkh8bEDx4uhjOXvZd3PSU9rWiTh899U3Ou99NiSOgR1+wr5ouR20viCZqIe86YqoZlLJnYs2dlZDhL+ggwFqYJ5wfWbq7OauIVEEdnM/57RyNI2qM=,iv:lwOJi4pVGGHn7+CGq7jAHorOTFtl7ONzzV35ec1uEsg=,tag:DhjloWlsGqM579NafaERIw==,type:str]
|
||||
pgp:
|
||||
- created_at: "2025-01-19T21:35:34Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQwAoO2gRS+Vwu+5KZ4V2ReXPcjFcEUb6aoYe8PNUhjBu0yE
|
||||
hs4lhWGy53BdupQ+cyxk0U+L6UhOjTfIAYE9emqTDlF5OImN/379j9NfiPe/K0/8
|
||||
ylSOuzNgVmTpsXlHGaXE2wk0ADp1P9mZUwbJ5vHCtm+ZFe5HCuTrB61drIU0fEYw
|
||||
NVCaARK/IRn5eAlPCjPuW1mhKP+3HNGMQszqCRKMU5kLZPzjqsHmEITSFJ5bVtAu
|
||||
fLRtF8SyJpHgvyw1AH1IX6I+/lrDRQro0oD/0LcC1Nay9n86WIWhA/VbotyFCkI2
|
||||
gZtV0IQq05mxO11DycgxlDLQk6nqiqDDjWv/8kj23HnQ3BAO6SXLKhHWq9rH8EOX
|
||||
wkee7RHc09GWNcGL93YMkjIHWJyitphpU/NtTmEpTptzry5vPfittPaZ+zU+MF8G
|
||||
REyft2X9Aj7UWcL1w3kbX9BDWuxImcirWWCShHakSrzAlpuIoXVQA6MCl6/Jr2Ve
|
||||
lLx3lDX+BiSpU01zY32q0lgBOGcSEcRVXTiYO00EoJbIiEMwqm1aAXQzaCvhCCpP
|
||||
54NsNzZ4eoGL0DmioKwzLbv1CpIJs3w0k6StfOtTCPKdlL99k24Z8GyJ44UnkhCe
|
||||
V32jGc/yCong
|
||||
=OZSD
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2025-01-19T21:35:34Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUARAAhnd9Z1gekp4XWw+gcWK5j9mXWP7XS/FGNXmmCUBKec1j
|
||||
zXzMJjG1YZyCYmqj3XGFMFwg2Ex6pBPoOTzOL2VOGd9mZvHjh0MGtuUopg1GprE7
|
||||
NoyrYlV2UikyBSzVlsvykyNCYWfEt0uDotnGIK0NXYzfWfqgw+ImAH/PvNRY4nIB
|
||||
wxI/Ze100ITAN7Dop9d6MFUZbrYKZTMsO8w5Z7TWHRPzFWH//XZjY7UpxvNVP1oJ
|
||||
RXqqo2I97P0c6H7s17+xw6ZjyE0Qoin1gq4XSMHc4l8o+3D7fWecoTLxcjma5gvY
|
||||
SMVCYeSrI2kc8DJ2RVeXdDlEP7SS3bwPNaE4Tklxv1rE+CUuYQ1X6dkPVKnKLfRS
|
||||
Lwy614LDAarZmvXc3jPgFkpG+grE80PAStzOze0eWyZA/oCAI3/CS+yaeBAI4viz
|
||||
UEkNmCMTZu1eXyIurC/suTOdq4nehGlD/2F8EKU+Y/6f6J2wHUJdvLjNxOuAOHd0
|
||||
lGSu61gt/b2PFy/aHqFgQaZCPUMJ8UfK8JQ66zOIUW3HzsXOsvVqo/8DMQRIw7/z
|
||||
3tZ43LPjmIeCRFwPfbIbeThoZmq1SPejkzadxDEwD3U0YAiblBJ2E+AyEDiKqP/N
|
||||
D+NRN5Ta0ySAmGOyYgDES8QDDBQGA4cSZak7pMidCrSbAagNyYNg3Qrowc0aG93S
|
||||
WAFD/Q4EtOdM6kveLdbDkPX/bAiCFwhzSCtDVkLAPxfrkw/a+az6emPWmImML5FT
|
||||
to3vvXendrd9+u6uSNK5acuwzW2cW8GM4gLC90+p/kRFJukiGJbl400=
|
||||
=6Gw4
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
68
machines/vpn/secrets.yaml
Normal file
68
machines/vpn/secrets.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
wg_private: ENC[AES256_GCM,data:uuBYbOTiThZYiNetM+FOLFVMr/HII9otG4FvN5YvuRErvNjgmAYxVncV71k=,iv:Sy3HAEcALod2pL4IZ/GSjVybLAviOoO+DsW8OROzgTg=,tag:hynRmiilafVzWCjx2Xoxhw==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age1v6uxwej4nlrpfanr9js7x6059mtvyg4fw50pzt0a2kt3ahk7edlslafeuh
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBua1FUY1pZamY5R1ExOC8r
|
||||
cUU4VE9VVUJjeEdXNEJnMUM5WEtUL0E2NWhZCm5xTXZ2WnhFcXRGVkdQNHlTcDBC
|
||||
cTlySDcxaGJXOFl0UWJ6RlYzekdJaU0KLS0tIEo1RmVIZG9mOGpJM2NlOEQyKzNG
|
||||
a0FsVGh6TlBBWG5qNTBFWVVWb3U2ZUEKp6Rfi5h1j9+nosARUcuVFUDLajaHf5SK
|
||||
PFDpyy+n1msB4E+Yuku6ySxyf58TqPvy/JnVA7Nhkmir7IngIdfX1w==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1ljpdczmg5ctqyeezn739hv589fwhssjjnuqf7276fqun6kc62v3qmhkd0c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBZT2hGalZFaktoUHdJRXJy
|
||||
dlg0NVZxNSsvV0VsQndOV2VqZHJzcnI3cFEwCmg0eHl0djNpcmVSaHlEM2h0R2dm
|
||||
QzRveGlpbldYeFFQdmVHSlVtU1FhcGsKLS0tIHFnZ0xyaDRidE5naElnNWNOZmM2
|
||||
RUpHanJrOUx1endqRytjOW9VV1dLQ1UKcS6MhvTHTn+3sCh/wrMDw4z5aYHmKbER
|
||||
n/doy/gDtIWeIlw9TPNdCtOu/P/atNnrjvpTDCU1i+H86fODFmu5zw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-12-17T22:01:22Z"
|
||||
mac: ENC[AES256_GCM,data:ctpzk2gUHSLThmZpRFwIBKX+SfwKt8/V8AWQbPnoBqJ9KwuHcRKkkT2yEMx3l2qKUy7DgrqRXhSVGbF57poXC9nshyjXMrrjMQA4PBB7a3SAwgpcX6j+aEx0xIt8GTUVxcn0xDvbP9xJ+adeACLUvkE+a4EB1jtdsL/iacxlv5Y=,iv:Zw+sG7oXmPRGa2jWc+mloGMBq6CnDQgz5x7ke5paeW8=,tag:RtfGmrSt8U8Je7Dq9FQGTg==,type:str]
|
||||
pgp:
|
||||
- created_at: "2024-12-19T15:09:08Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQGMA5HdvEwzh/H7AQv/bueAXskPGUYQwlmujEEdjh2o3yGxTScqCEwYbghRPbf+
|
||||
a59WXJMtIkOCxRF0bkyfoKLudJJeWRteBfN3aqdUKtFqr4g7PfavLmipRaqm1cmJ
|
||||
EswakDt4raLx2C4HAyZvaab4fzA592tqpGU5RBRmwtkxjfCL0bY6zV/FHmk7NzYg
|
||||
RAaEChpaUGXSTmwDiXJn1FJ1QwOSTlKm0ccoUbB1MSHi8A3LqH0lEHPqq5mb3Yhx
|
||||
XIvOKPTZ+ODX9duLOQrAPWAfOShcyjd8SAA+uygJ7PYnXeN9HpuROcl4WEB1mpKa
|
||||
h2AGwtUpOC9tpqKJ3kueBUePpsSHM9s1qmeImItSycFHzlB/hnuFQFndhV6I2yaP
|
||||
lDs/Vpsfoeq3/ufR4Cajqwd7Q6dRGmf71/Sk6QhjXZQapGRcIfGWlOMcHn/z+ura
|
||||
PPn2EtTxkgzp9G8ksOdTzIoriM7RmosC7N1BgSpw+vRUXn4dNhHN4h9LcR9XsX0u
|
||||
lUJXfAc5DOl0bkpJ0y1B0lgBldvxchsMsg4RS2GNhIs20gjMfFLs4eRlcXU8Yps5
|
||||
HizBAKW5frOePfzVM+GD30IstOd/pJPYrRCzg7Ym1oY/+IZTLfK/7MW2bvtP5IJy
|
||||
LN6uk4NCOKwA
|
||||
=Mdnc
|
||||
-----END PGP MESSAGE-----
|
||||
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||
- created_at: "2024-12-19T15:09:08Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA98TrrsQEbXUAQ//bvRwMD4xzEq9wihdYG/XHb72Y8RYzHLA1/okH0Kfe9wW
|
||||
DomZhwi/VPoLf8RWTZfa0/S1PnPyOZdfEP46ZM2WSksNydMidqY7fOuFYxTI5cRG
|
||||
javuZjAH0ZyMMG3J+Y+zzFCFRMBT8n5yDtv+bDbi1T16SJj0gpYW2IIEglOudPVl
|
||||
vDM6bqHD5UefHtxhYGRnPaxqenLxCoNYq4DAx8+8DoIj7RTg4+rjrglW16G7KU5n
|
||||
t7acEiD+J0fXeQM7bLTYuiI0gSkaftSuQ1GVEDgw6M80pSdWfrqE5xue+8t3MPDA
|
||||
UGQGjXxG4ykOV5Wggs3EjOVkscgmQxWJgMYNanCZJEy36WWlzPnG59O1kiXW+6AQ
|
||||
TCy4ZXb3SyUJ1kSoI9pJ3PSaADaID9rDgIn+IkIfY0E+QVrw9qL4qN0rqISx++EW
|
||||
XOBucRspIqcXzFGikuz4yIwLBWVAqGhr5iKge8FVjBPVUX+JPgJjFw25fAFZkkds
|
||||
mJDAkbzJh6iALxSIoj++kPIw+f4xQXKPPPLJiJzpuWAcZJiA3WM10iakGyuKmYPL
|
||||
qVgwo1hXOVODwbkBvztJOGIMqMXNLQP9A45kpNjFuyPn8WcignmvoFXtGbr9BtCY
|
||||
sZAZrDFw/JxVLVPSM3duKC6R8r8MQfp1ZNVLU9fMzqfReu+6gD5biESM+rnYC4TS
|
||||
WAGB3htm92PRqdsJnDrgO8kzi9fHNxo0htj9fmo8ipNY+eeLfrAW6ocqPMBzCuyf
|
||||
3EbF+PS9PRg0lHyjkBC2pF6PD8DHVL/2OTSpWOZdp8FCqogZg7e7dMI=
|
||||
=vQSV
|
||||
-----END PGP MESSAGE-----
|
||||
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.2
|
||||
132
outputs.nix
132
outputs.nix
@@ -4,6 +4,7 @@
|
||||
, nixpkgs-unstable
|
||||
, nixos-generators
|
||||
, sops-nix
|
||||
, microvm
|
||||
, ...
|
||||
} @inputs:
|
||||
|
||||
@@ -13,17 +14,108 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
||||
let
|
||||
pkgs-unstable = nixpkgs-unstable.legacyPackages."${system}";
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
|
||||
hosts = import ./machines/hosts.nix ( inputs // { inherit inputs; self = self; });
|
||||
utils = import ./machines/modules/host_builder.nix ( inputs // { inherit inputs; self = self; hosts = hosts; });
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.callPackage ./shell.nix {
|
||||
inherit (sops-nix.packages."${pkgs.system}") sops-import-keys-hook ssh-to-pgp sops-init-gpg-key;
|
||||
};
|
||||
})) // rec {
|
||||
nixosConfigurations = import ./machines/configuration.nix (inputs // {
|
||||
inherit inputs;
|
||||
});
|
||||
devShells.default =
|
||||
let
|
||||
sops = sops-nix.packages."${pkgs.system}";
|
||||
microvmpkg = microvm.packages."${pkgs.system}";
|
||||
installed = builtins.attrNames self.legacyPackages."${pkgs.system}".scripts;
|
||||
in
|
||||
pkgs.mkShell {
|
||||
sopsPGPKeyDirs = [
|
||||
"./machines/secrets/keys/hosts"
|
||||
"./machines/secrets/keys/users"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
sops.ssh-to-pgp
|
||||
sops.sops-import-keys-hook
|
||||
sops.sops-init-gpg-key
|
||||
pkgs.sops
|
||||
pkgs.age
|
||||
pkgs.python310Packages.grip
|
||||
pkgs.mdbook
|
||||
pkgs.ssh-to-age
|
||||
microvmpkg.microvm
|
||||
];
|
||||
|
||||
nixosModules.malobeo = import ./machines/durruti/host_config.nix;
|
||||
packages = builtins.map (pkgName: self.legacyPackages."${pkgs.system}".scripts.${pkgName}) installed;
|
||||
shellHook = ''echo "Available scripts: ${builtins.concatStringsSep " " installed}"'';
|
||||
};
|
||||
|
||||
legacyPackages = {
|
||||
scripts.remote-install = pkgs.writeShellScriptBin "remote-install" (builtins.readFile ./scripts/remote-install-encrypt.sh);
|
||||
scripts.boot-unlock = pkgs.writeShellScriptBin "boot-unlock" (builtins.readFile ./scripts/unlock-boot.sh);
|
||||
scripts.add-host-keys = pkgs.writeShellScriptBin "add-host-keys" (builtins.readFile ./scripts/add_new_host_keys.sh);
|
||||
scripts.run-vm = self.packages.${system}.run-vm;
|
||||
};
|
||||
|
||||
vmBuilder = utils.buildVM;
|
||||
|
||||
packages = {
|
||||
docs = pkgs.stdenv.mkDerivation {
|
||||
name = "malobeo-docs";
|
||||
phases = [ "buildPhase" ];
|
||||
buildInputs = [ pkgs.mdbook ];
|
||||
|
||||
inputs = pkgs.lib.sourceFilesBySuffices ./doc/. [ ".md" ".toml" ];
|
||||
|
||||
buildPhase = ''
|
||||
dest=$out/share/doc
|
||||
mkdir -p $dest
|
||||
cp -r --no-preserve=all $inputs/* ./
|
||||
mdbook build
|
||||
ls
|
||||
cp -r ./book/* $dest
|
||||
'';
|
||||
};
|
||||
|
||||
run-vm = pkgs.writeShellScriptBin "run-vm" (builtins.readFile ./scripts/run-vm.sh);
|
||||
};
|
||||
|
||||
apps = {
|
||||
docs = {
|
||||
type = "app";
|
||||
program = builtins.toString (pkgs.writeShellScript "docs" ''
|
||||
${pkgs.xdg-utils}/bin/xdg-open "${self.packages.${system}.docs}/share/doc/index.html"
|
||||
'');
|
||||
};
|
||||
|
||||
|
||||
docsDev = {
|
||||
type = "app";
|
||||
program = builtins.toString (pkgs.writeShellScript "docs" ''
|
||||
echo "needs to run from infrastuctre root folder"
|
||||
${pkgs.mdbook}/bin/mdbook serve --open ./doc
|
||||
'');
|
||||
};
|
||||
|
||||
run-vm = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.run-vm}/bin/run-vm";
|
||||
};
|
||||
};
|
||||
|
||||
})) // (
|
||||
let
|
||||
hosts = import ./machines/hosts.nix ( inputs // { inherit inputs; self = self; });
|
||||
utils = import ./machines/modules/host_builder.nix ( inputs // { inherit inputs; self = self; hosts = hosts; });
|
||||
in
|
||||
{
|
||||
nixosConfigurations = utils.buildHost hosts.malobeo.hosts;
|
||||
|
||||
nixosModules.malobeo = {
|
||||
host.imports = [ ./machines/durruti/host_config.nix ];
|
||||
microvm.imports = [ ./machines/modules/malobeo/microvm_host.nix ];
|
||||
vpn.imports = [ ./machines/modules/malobeo/wireguard.nix ];
|
||||
initssh.imports = [ ./machines/modules/malobeo/initssh.nix ];
|
||||
metrics.imports = [ ./machines/modules/malobeo/metrics.nix ];
|
||||
disko.imports = [ ./machines/modules/disko ];
|
||||
};
|
||||
|
||||
hydraJobs = nixpkgs.lib.mapAttrs (_: nixpkgs.lib.hydraJob) (
|
||||
let
|
||||
@@ -36,26 +128,4 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
||||
nixpkgs.lib.mapAttrs getBuildEntry self.nixosConfigurations
|
||||
|
||||
);
|
||||
|
||||
#lucia = self.nixosConfigurations.lucia.config.system.build.toplevel;
|
||||
|
||||
|
||||
#images.lucia_base_image = nixosConfigurations.lucia.config.system.build.sdImage;
|
||||
|
||||
#packages.x86_64-linux = {
|
||||
# lucia_base_img = nixos-generators.nixosGenerate {
|
||||
# system = "aarch64-linux";
|
||||
# modules = [
|
||||
# #"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-raspberrypi.nix"
|
||||
# ./machines/modules/sshd.nix
|
||||
# {
|
||||
# nixpkgs.config.allowUnsupportedSystem = true;
|
||||
# nixpkgs.crossSystem.system = "aarch64-linux";
|
||||
# networking.dhcpcd.enable = true;
|
||||
# }
|
||||
# ];
|
||||
|
||||
# format = "sd-aarch64-installer";
|
||||
# };
|
||||
#};
|
||||
}
|
||||
})
|
||||
|
||||
51
scripts/add_new_host_keys.sh
Executable file
51
scripts/add_new_host_keys.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
set -o errexit
|
||||
#set -o pipefail
|
||||
|
||||
if [ ! -e flake.nix ]
|
||||
then
|
||||
echo "flake.nix not found. Searching down."
|
||||
while [ ! -e flake.nix ]
|
||||
do
|
||||
if [ $PWD = "/" ]
|
||||
then
|
||||
echo "Found root. Aborting."
|
||||
exit 1
|
||||
else
|
||||
cd ..
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
read -p "Enter new host name: " hostname
|
||||
|
||||
if [ "$hostname" = "" ]; then exit 0
|
||||
fi
|
||||
|
||||
pwpath="machines/$hostname/secrets"
|
||||
hostkey="ssh_host_ed25519_key"
|
||||
initrdkey="initrd_ed25519_key"
|
||||
|
||||
mkdir -p "$pwpath"
|
||||
cd "$pwpath"
|
||||
|
||||
# Generate SSH keys
|
||||
ssh-keygen -f $hostkey -t ed25519 -N "" -C "root@$host"
|
||||
ssh-keygen -f $initrdkey -t ed25519 -N "" -C "root@$host-initrd"
|
||||
|
||||
#encrypt the private keys
|
||||
sops -e -i ./$hostkey
|
||||
sops -e -i ./$initrdkey
|
||||
|
||||
#generate encryption key
|
||||
tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 20 > disk.key
|
||||
sops -e -i ./disk.key
|
||||
|
||||
# Info
|
||||
echo
|
||||
echo "Hier ist der age public key für sops etc:"
|
||||
echo "$(ssh-to-age -i ./"$hostkey".pub)"
|
||||
echo
|
||||
echo "Hier ist eine reproduzierbare mac-addresse:"
|
||||
echo "$hostname"|md5sum|sed 's/^\(..\)\(..\)\(..\)\(..\)\(..\).*$/02:\1:\2:\3:\4:\5/'
|
||||
|
||||
exit 0
|
||||
67
scripts/remote-install-encrypt.sh
Executable file
67
scripts/remote-install-encrypt.sh
Executable file
@@ -0,0 +1,67 @@
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo
|
||||
echo "Install NixOS to the host system with secrets and encryption"
|
||||
echo "Usage: $0 <hostname> <ip> (user)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -e flake.nix ]
|
||||
then
|
||||
echo "flake.nix not found. Searching down."
|
||||
while [ ! -e flake.nix ]
|
||||
do
|
||||
if [ $PWD = "/" ]
|
||||
then
|
||||
echo "Found root. Aborting."
|
||||
exit 1
|
||||
else
|
||||
cd ..
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
hostname=$1
|
||||
ipaddress=$2
|
||||
pwpath="machines/$hostname/secrets"
|
||||
hostkey="ssh_host_ed25519_key"
|
||||
initrdkey="initrd_ed25519_key"
|
||||
|
||||
# Create a temporary directory
|
||||
temp=$(mktemp -d)
|
||||
|
||||
# Function to cleanup temporary directory on exit
|
||||
cleanup() {
|
||||
rm -rf "$temp"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# Create the directory where sshd expects to find the host keys
|
||||
install -d -m755 "$temp/etc/ssh/"
|
||||
install -d -m755 "$temp/root/"
|
||||
|
||||
diskKey=$(sops -d $pwpath/disk.key)
|
||||
echo "$diskKey" > /tmp/secret.key
|
||||
echo "$diskKey" > $temp/root/secret.key
|
||||
|
||||
sops -d "$pwpath/$hostkey" > "$temp/etc/ssh/$hostname"
|
||||
|
||||
sopd -d "$pwpath/$initrdkey" > "$temp/etc/ssh/initrd"
|
||||
|
||||
# # Set the correct permissions so sshd will accept the key
|
||||
chmod 600 "$temp/etc/ssh/$hostname"
|
||||
chmod 600 "$temp/etc/ssh/initrd"
|
||||
|
||||
# Install NixOS to the host system with our secrets and encription
|
||||
# optional --build-on-remote
|
||||
if [ $# = 3 ]
|
||||
then
|
||||
nix run github:numtide/nixos-anywhere -- --extra-files "$temp" \
|
||||
--disk-encryption-keys /tmp/secret.key /tmp/secret.key --flake .#$hostname $3@$ipaddress
|
||||
|
||||
else
|
||||
nix run github:numtide/nixos-anywhere -- --extra-files "$temp" \
|
||||
--disk-encryption-keys /tmp/secret.key /tmp/secret.key --flake .#$hostname root@$ipaddress
|
||||
fi
|
||||
67
scripts/run-vm.sh
Normal file
67
scripts/run-vm.sh
Normal file
@@ -0,0 +1,67 @@
|
||||
usage() {
|
||||
echo "Usage: run-vm <hostname> [--networking] [--dummy-secrets] [--no-disko]"
|
||||
echo "ATTENTION: This script must be run from the flakes root directory"
|
||||
echo "--networking setup interfaces. requires root and hostbridge enabled on the host"
|
||||
echo "--dummy-secrets run vm with dummy sops secrets"
|
||||
echo "--no-disko disable disko and initrd secrets. needed for real hosts like fanny"
|
||||
echo "--writable-store enables writable store. necessary for host with nested imperative microvms like fanny"
|
||||
echo "--var path to directory that should be shared as /var. may require root otherwise some systemd units fail within vm. if dir is empty vm will populate"
|
||||
echo "--fwd-port forwards the given port to port 80 on vm"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# check at least one arg was given
|
||||
if [ "$#" -lt 1 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
HOSTNAME=$1
|
||||
|
||||
# Optionale Argumente
|
||||
NETWORK=false
|
||||
DUMMY_SECRETS=false
|
||||
NO_DISKO=false
|
||||
RW_STORE=false
|
||||
VAR_PATH=""
|
||||
FWD_PORT=0
|
||||
|
||||
# check argws
|
||||
shift
|
||||
while [[ "$#" -gt 0 ]]; do
|
||||
case $1 in
|
||||
--networking) NETWORK=true ;;
|
||||
--dummy-secrets) DUMMY_SECRETS=true ;;
|
||||
--no-disko) NO_DISKO=true ;;
|
||||
--writable-store) RW_STORE=true ;;
|
||||
--var)
|
||||
if [[ -n "$2" && ! "$2" =~ ^- ]]; then
|
||||
VAR_PATH="$2"
|
||||
shift
|
||||
else
|
||||
echo "Error: --var requires a non-empty string argument."
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
--fwd-port)
|
||||
if [[ -n "$2" && ! "$2" =~ ^- ]]; then
|
||||
FWD_PORT="$2"
|
||||
shift
|
||||
else
|
||||
echo "Error: --var requires a non-empty string argument."
|
||||
usage
|
||||
fi
|
||||
;;
|
||||
*) echo "Unknown argument: $1"; usage ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
echo "starting host $HOSTNAME"
|
||||
echo "enable networking: $NETWORK"
|
||||
echo "deploy dummy secrets: $DUMMY_SECRETS"
|
||||
echo "disable disko and initrd secrets: $NO_DISKO"
|
||||
echo "use writable store: $RW_STORE"
|
||||
if [ -n "$VAR_PATH" ]; then
|
||||
echo "sharing var directory: $VAR_PATH"
|
||||
fi
|
||||
|
||||
nix run --show-trace --impure --expr "((builtins.getFlake \"$(pwd)\").vmBuilder.x86_64-linux \"$HOSTNAME\" $NETWORK $DUMMY_SECRETS $NO_DISKO \"$VAR_PATH\" $RW_STORE $FWD_PORT).config.microvm.declaredRunner"
|
||||
40
scripts/unlock-boot.sh
Normal file
40
scripts/unlock-boot.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
sshoptions="-o StrictHostKeyChecking=no -o ServerAliveInterval=1 -o ServerAliveCountMax=1 -p 222 -T"
|
||||
hostname=$1
|
||||
|
||||
if [ ! -e flake.nix ]
|
||||
then
|
||||
echo "flake.nix not found. Searching down."
|
||||
while [ ! -e flake.nix ]
|
||||
do
|
||||
if [ $PWD = "/" ]
|
||||
then
|
||||
echo "Found root. Aborting."
|
||||
exit 1
|
||||
else
|
||||
cd ..
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
diskkey=$(sops -d machines/$hostname/secrets/disk.key)
|
||||
|
||||
echo
|
||||
if [ $# = 1 ]
|
||||
then
|
||||
echo "$diskkey" | ssh $sshoptions root@$hostname-initrd "systemd-tty-ask-password-agent" #root
|
||||
|
||||
elif [ $# = 2 ]
|
||||
then
|
||||
ip=$2
|
||||
echo "$diskkey" | ssh $sshoptions root@$ip "systemd-tty-ask-password-agent" #root
|
||||
|
||||
else
|
||||
echo
|
||||
echo "Unlock the root disk on a remote host."
|
||||
echo "Usage: $0 <hostname> [ip]"
|
||||
echo "If an IP is not provided, the hostname will be used as the IP address."
|
||||
exit 1
|
||||
fi
|
||||
22
shell.nix
22
shell.nix
@@ -1,22 +0,0 @@
|
||||
{ mkShell
|
||||
, sops-import-keys-hook
|
||||
, ssh-to-pgp
|
||||
, sops-init-gpg-key
|
||||
, sops
|
||||
, pkgs
|
||||
}:
|
||||
|
||||
mkShell {
|
||||
sopsPGPKeyDirs = [
|
||||
"./machines/secrets/keys/hosts"
|
||||
"./machines/secrets/keys/users"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
ssh-to-pgp
|
||||
sops-import-keys-hook
|
||||
sops-init-gpg-key
|
||||
sops
|
||||
pkgs.python310Packages.grip
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user