Compare commits
22 Commits
e57cc9dbe6
...
gitea
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f0bf4aacb | |||
| 6456814319 | |||
| 21310dcf3c | |||
| 63c36f6add | |||
| be194e4293 | |||
| edb9dcb28b | |||
| 05ec7004ad | |||
| d1afbe9f14 | |||
| 807d2007fa | |||
| 29567efb99 | |||
| ca4db0ad5c | |||
|
|
753c44a875 | ||
| 0eeb9bc131 | |||
| 142277879a | |||
|
|
4ecd2139a9 | ||
| e73105bc66 | |||
| 38a7d58ef6 | |||
| 6a185a54bc | |||
|
|
4334f6bec2 | ||
|
|
fad4f72c0b | ||
|
|
8e0f846e54 | ||
| 29fa4eda1e |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@
|
||||
result
|
||||
*.qcow2
|
||||
.direnv/
|
||||
book/
|
||||
|
||||
31
README.md
31
README.md
@@ -98,34 +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
|
||||
* ...
|
||||
* [x] host some pad (codimd aka hedgedoc)
|
||||
* [ ] some network fileshare for storing the movies and streaming them within the network
|
||||
* [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
|
||||
|
||||
|
||||
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"
|
||||
1
doc/src/Index.md
Normal file
1
doc/src/Index.md
Normal file
@@ -0,0 +1 @@
|
||||
# Index
|
||||
17
doc/src/SUMMARY.md
Normal file
17
doc/src/SUMMARY.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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)
|
||||
- [How-to]()
|
||||
- [Updates](./anleitung/updates.md)
|
||||
- [Rollbacks](./anleitung/rollback.md)
|
||||
- [MicroVM](./anleitung/microvm.md)
|
||||
39
doc/src/anleitung/microvm.md
Normal file
39
doc/src/anleitung/microvm.md
Normal file
@@ -0,0 +1,39 @@
|
||||
### 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 local host.
|
||||
For durruti this is done by:
|
||||
``` bash
|
||||
sudo nix run .\#nixosConfigurations.durruti.config.microvm.declaredRunner
|
||||
```
|
||||
|
||||
It seems to be necessary to run this as root so that the according tap interface can be created.
|
||||
To be able to ping the VM or give Internet Access to the VM your host needs to be setup as described below.
|
||||
|
||||
### Host Setup
|
||||
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
|
||||
};
|
||||
```
|
||||
1
doc/src/anleitung/rollback.md
Normal file
1
doc/src/anleitung/rollback.md
Normal file
@@ -0,0 +1 @@
|
||||
# Rollbacks
|
||||
1
doc/src/anleitung/updates.md
Normal file
1
doc/src/anleitung/updates.md
Normal file
@@ -0,0 +1 @@
|
||||
# Updates
|
||||
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
|
||||
104
flake.lock
generated
104
flake.lock
generated
@@ -21,6 +21,24 @@
|
||||
"url": "https://git.dynamicdiscord.de/kalipso/ep3-bs.nix"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -61,6 +79,28 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"microvm": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"spectrum": "spectrum"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731240174,
|
||||
"narHash": "sha256-HYu+bPoV3UILhwc4Ar5iQ7aF+DuQWHXl4mljN6Bwq6A=",
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"rev": "dd89404e1885b8d7033106f3898eaef8db660cb2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1729386149,
|
||||
@@ -99,11 +139,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1729742320,
|
||||
"narHash": "sha256-u3Of8xRkN//me8PU+RucKA59/6RNy4B2jcGAF36P4jI=",
|
||||
"lastModified": 1730919458,
|
||||
"narHash": "sha256-yMO0T0QJlmT/x4HEyvrCyigGrdYfIXX3e5gWqB64wLg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "e8a2f6d5513fe7b7d15701b2d05404ffdc3b6dda",
|
||||
"rev": "e1cc1f6483393634aee94514186d21a4871e78d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -131,11 +171,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1729357638,
|
||||
"narHash": "sha256-66RHecx+zohbZwJVEPF7uuwHeqf8rykZTMCTqIrOew4=",
|
||||
"lastModified": 1730602179,
|
||||
"narHash": "sha256-efgLzQAWSzJuCLiCaQUCDu4NudNlHdg2NzGLX5GYaEY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bb8c2cf7ea0dd2e18a52746b2c3a5b0c73b93c22",
|
||||
"rev": "3c2f1c4ca372622cb2f9de8016c9a0b1cbd0f37c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -147,11 +187,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1729665710,
|
||||
"narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=",
|
||||
"lastModified": 1730785428,
|
||||
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d",
|
||||
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -163,11 +203,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1729449015,
|
||||
"narHash": "sha256-Gf04dXB0n4q0A9G5nTGH3zuMGr6jtJppqdeljxua1fo=",
|
||||
"lastModified": 1730883749,
|
||||
"narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "89172919243df199fe237ba0f776c3e3e3d72367",
|
||||
"rev": "dba414932936fde69f0606b4f1d87c5bc0003ede",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -182,6 +222,7 @@
|
||||
"ep3-bs": "ep3-bs",
|
||||
"home-manager": "home-manager",
|
||||
"mfsync": "mfsync",
|
||||
"microvm": "microvm",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
@@ -199,11 +240,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1729695320,
|
||||
"narHash": "sha256-Fm4cGAlaDwekQvYX0e6t0VjT6YJs3fRXtkyuE4/NzzU=",
|
||||
"lastModified": 1731047660,
|
||||
"narHash": "sha256-iyp51lPWEQz4c5VH9bVbAuBcFP4crETU2QJYh5V0NYA=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "d089e742fb79259b9c4dd9f18e9de1dd4fa3c1ec",
|
||||
"rev": "60e1bce1999f126e3b16ef45f89f72f0c3f8d16f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -212,6 +253,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"spectrum": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1729945407,
|
||||
"narHash": "sha256-iGNMamNOAnVTETnIVqDWd6fl74J8fLEi1ejdZiNjEtY=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "f1d94ee7029af18637dbd5fdf4749621533693fa",
|
||||
"revCount": 764,
|
||||
"type": "git",
|
||||
"url": "https://spectrum-os.org/git/spectrum"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://spectrum-os.org/git/spectrum"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
@@ -257,6 +314,21 @@
|
||||
"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": [
|
||||
@@ -315,7 +387,7 @@
|
||||
},
|
||||
"utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
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";
|
||||
|
||||
utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
|
||||
@@ -40,6 +40,34 @@ let
|
||||
}
|
||||
];
|
||||
defaultModules = baseModules;
|
||||
|
||||
makeMicroVM = hostName: ipv4Addr: modules: [
|
||||
inputs.microvm.nixosModules.microvm
|
||||
{
|
||||
microvm = {
|
||||
hypervisor = "qemu";
|
||||
interfaces = [
|
||||
{
|
||||
type = "tap";
|
||||
id = "vm-${hostName}";
|
||||
mac = "02:00:00:00:00:01";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
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;
|
||||
in
|
||||
{
|
||||
louise = nixosSystem {
|
||||
@@ -53,7 +81,7 @@ in
|
||||
durruti = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
modules = defaultModules ++ [
|
||||
modules = makeMicroVM "durruti" "10.0.0.5" [
|
||||
./durruti/configuration.nix
|
||||
];
|
||||
};
|
||||
@@ -66,4 +94,12 @@ in
|
||||
./lucia/hardware_configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
gitea = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs.inputs = inputs;
|
||||
modules = makeMicroVM "gitea" "10.0.0.6" [
|
||||
./gitea/configuration.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ with lib;
|
||||
{
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
|
||||
boot.isContainer = true;
|
||||
networking = {
|
||||
hostName = mkDefault "durruti";
|
||||
useDHCP = false;
|
||||
|
||||
@@ -44,6 +44,5 @@ in
|
||||
enableACME= true;
|
||||
locations."/".proxyPass = "http://${cfg.host_ip}:80";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
37
machines/gitea/configuration.nix
Normal file
37
machines/gitea/configuration.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
#sops.defaultSopsFile = ./secrets.yaml;
|
||||
|
||||
networking = {
|
||||
hostName = mkDefault "gitea";
|
||||
useDHCP = false;
|
||||
nameservers = [ "1.1.1.1" ];
|
||||
};
|
||||
|
||||
imports = [
|
||||
../modules/malobeo_user.nix
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
];
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
appName = "malobeo git instance";
|
||||
|
||||
settings.server = {
|
||||
DOMAIN = "git.malobeo.org";
|
||||
HTTP_PORT = 3001;
|
||||
SSH_PORT = 22;
|
||||
ROOT_URL = "https://git.malobeo.org/";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 3001 ];
|
||||
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
}
|
||||
|
||||
52
machines/modules/malobeo/microvm_host.nix
Normal file
52
machines/modules/malobeo/microvm_host.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{ config, lib, 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.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enableHostBridge
|
||||
{
|
||||
systemd.network = {
|
||||
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 = [ {
|
||||
Address = "10.0.0.1/24";
|
||||
} {
|
||||
Address = "fd12:3456:789a::1/64";
|
||||
} ];
|
||||
ipv6Prefixes = [ {
|
||||
Prefix = "fd12:3456:789a::/64";
|
||||
} ];
|
||||
};
|
||||
|
||||
# connect the vms to the bridge
|
||||
networks."11-microvm" = {
|
||||
matchConfig.Name = "vm-*";
|
||||
networkConfig.Bridge = "microvm";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
34
outputs.nix
34
outputs.nix
@@ -18,12 +18,44 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
||||
devShells.default = pkgs.callPackage ./shell.nix {
|
||||
inherit (sops-nix.packages."${pkgs.system}") sops-import-keys-hook ssh-to-pgp sops-init-gpg-key;
|
||||
};
|
||||
|
||||
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
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
apps = {
|
||||
docs = {
|
||||
type = "app";
|
||||
program = builtins.toString (pkgs.writeShellScript "docs" ''
|
||||
${pkgs.mdbook}/bin/mdbook serve --open ./doc
|
||||
'');
|
||||
};
|
||||
};
|
||||
|
||||
})) // rec {
|
||||
nixosConfigurations = import ./machines/configuration.nix (inputs // {
|
||||
inherit inputs;
|
||||
});
|
||||
|
||||
nixosModules.malobeo = import ./machines/durruti/host_config.nix;
|
||||
nixosModules.malobeo.imports = [
|
||||
./machines/durruti/host_config.nix
|
||||
./machines/modules/malobeo/microvm_host.nix
|
||||
];
|
||||
|
||||
hydraJobs = nixpkgs.lib.mapAttrs (_: nixpkgs.lib.hydraJob) (
|
||||
let
|
||||
|
||||
Reference in New Issue
Block a user