Compare commits
27 Commits
issue51
...
c51c1e8e92
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c51c1e8e92 | ||
|
|
a96b8f65c9 | ||
| 68b3da7df8 | |||
| affcc71eb1 | |||
| 4462856fa0 | |||
| 5352c1fa4d | |||
|
|
fabf48a5c0 | ||
|
|
617c177892 | ||
|
|
9b4cd02e53 | ||
|
|
fab1b18263 | ||
| cbd041f563 | |||
|
|
ef25c686b4 | ||
|
|
66392ca2c2 | ||
|
|
9afa8987e7 | ||
|
|
0239733e62 | ||
|
|
d9cf3588bf | ||
|
|
2500b8ab9a | ||
|
|
52824e39ee | ||
|
|
8793120436 | ||
| 29d6bc02e0 | |||
|
|
950ada1e10 | ||
|
|
1e269966ff | ||
|
|
3861daaf76 | ||
|
|
3a332e77d1 | ||
|
|
c0cef1ff1e | ||
|
|
7099c92236 | ||
|
|
79c311b45d |
@@ -1,9 +1,8 @@
|
|||||||
name: "Evaluate Hydra Jobs"
|
name: "Check flake syntax"
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
push:
|
push:
|
||||||
jobs:
|
jobs:
|
||||||
eval-hydra-jobs:
|
flake-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -11,5 +10,5 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install sudo -y
|
apt install sudo -y
|
||||||
- uses: cachix/install-nix-action@v27
|
- uses: cachix/install-nix-action@v30
|
||||||
- run: nix eval --no-update-lock-file --accept-flake-config .\#hydraJobs
|
- run: nix flake check --no-update-lock-file --accept-flake-config .
|
||||||
@@ -1 +1,82 @@
|
|||||||
# Index
|
# 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 ```.
|
||||||
|
|||||||
54
flake.lock
generated
54
flake.lock
generated
@@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730135292,
|
"lastModified": 1736864502,
|
||||||
"narHash": "sha256-CI27qHAbc3/tIe8sb37kiHNaeCqGxNimckCMj0lW5kg=",
|
"narHash": "sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "ab58501b2341bc5e0fc88f2f5983a679b075ddf5",
|
"rev": "0141aabed359f063de7413f80d906e1d98c0c123",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -67,11 +67,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733951536,
|
"lastModified": 1736373539,
|
||||||
"narHash": "sha256-Zb5ZCa7Xj+0gy5XVXINTSr71fCfAv+IKtmIXNrykT54=",
|
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "1318c3f3b068cdcea922fa7c1a0a1f0c96c22f5f",
|
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -109,11 +109,11 @@
|
|||||||
"spectrum": "spectrum"
|
"spectrum": "spectrum"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1734041466,
|
"lastModified": 1736905611,
|
||||||
"narHash": "sha256-51bhaMe8BZuNAStUHvo07nDO72wmw8PAqkSYH4U31Yo=",
|
"narHash": "sha256-eW6SfZRaOnOybBzhvEzu3iRL8IhwE0ETxUpnkErlqkE=",
|
||||||
"owner": "astro",
|
"owner": "astro",
|
||||||
"repo": "microvm.nix",
|
"repo": "microvm.nix",
|
||||||
"rev": "3910e65c3d92c82ea41ab295c66df4c0b4f9e7b3",
|
"rev": "a18d7ba1bb7fd4841191044ca7a7f895ef2adf3b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -124,11 +124,11 @@
|
|||||||
},
|
},
|
||||||
"nixlib": {
|
"nixlib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733620091,
|
"lastModified": 1736643958,
|
||||||
"narHash": "sha256-5WoMeCkaXqTZwwCNLRzyLxEJn8ISwjx4cNqLgqKwg9s=",
|
"narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "f4dc9a6c02e5e14d91d158522f69f6ab4194eb5b",
|
"rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -145,11 +145,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733965598,
|
"lastModified": 1737057290,
|
||||||
"narHash": "sha256-0tlZU8xfQGPcBOdXZee7P3vJLyPjTrXw7WbIgXD34gM=",
|
"narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "d162ffdf0a30f3d19e67df5091d6744ab8b9229f",
|
"rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -160,11 +160,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733861262,
|
"lastModified": 1736978406,
|
||||||
"narHash": "sha256-+jjPup/ByS0LEVIrBbt7FnGugJgLeG9oc+ivFASYn2U=",
|
"narHash": "sha256-oMr3PVIQ8XPDI8/x6BHxsWEPBRU98Pam6KGVwUh8MPk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "cf737e2eba82b603f54f71b10cb8fd09d22ce3f5",
|
"rev": "b678606690027913f3434dea3864e712b862dde5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -192,11 +192,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733759999,
|
"lastModified": 1737062831,
|
||||||
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
|
"narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
|
"rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -208,11 +208,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733808091,
|
"lastModified": 1736916166,
|
||||||
"narHash": "sha256-KWwINTQelKOoQgrXftxoqxmKFZb9pLVfnRvK270nkVk=",
|
"narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a0f3e10d94359665dba45b71b4227b0aeb851f8e",
|
"rev": "e24b4c09e963677b1beea49d411cd315a024ad3a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -245,11 +245,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733965552,
|
"lastModified": 1737107480,
|
||||||
"narHash": "sha256-GZ4YtqkfyTjJFVCub5yAFWsHknG1nS/zfk7MuHht4Fs=",
|
"narHash": "sha256-GXUE9+FgxoZU8v0p6ilBJ8NH7k8nKmZjp/7dmMrCv3o=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "2d73fc6ac4eba4b9a83d3cb8275096fbb7ab4004",
|
"rev": "4c4fb93f18b9072c6fa1986221f9a3d7bf1fe4b6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -73,3 +73,12 @@ creation_rules:
|
|||||||
- *admin_kalipso_dsktp
|
- *admin_kalipso_dsktp
|
||||||
age:
|
age:
|
||||||
- *admin_atlan
|
- *admin_atlan
|
||||||
|
|
||||||
|
- path_regex: nextcloud/secrets.yaml$
|
||||||
|
key_groups:
|
||||||
|
- pgp:
|
||||||
|
- *admin_kalipso
|
||||||
|
- *admin_kalipso_dsktp
|
||||||
|
- *machine_durruti
|
||||||
|
age:
|
||||||
|
- *admin_atlan
|
||||||
@@ -26,6 +26,7 @@ in
|
|||||||
|
|
||||||
malobeo.disks = {
|
malobeo.disks = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
legacy = true;
|
||||||
hostId = "a3c3102f";
|
hostId = "a3c3102f";
|
||||||
root = {
|
root = {
|
||||||
disk0 = "disk/by-id/ata-HITACHI_HTS725016A9A364_110308PCKB04VNHX9XTJ";
|
disk0 = "disk/by-id/ata-HITACHI_HTS725016A9A364_110308PCKB04VNHX9XTJ";
|
||||||
@@ -33,9 +34,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
malobeo.initssh = {
|
malobeo.initssh = {
|
||||||
enable = true;
|
enable = false;
|
||||||
authorizedKeys = sshKeys.admins;
|
|
||||||
ethernetDrivers = ["r8169"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.sane.enable = true; #scanner support
|
hardware.sane.enable = true; #scanner support
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
, nixpkgs
|
, nixpkgs
|
||||||
, sops-nix
|
, sops-nix
|
||||||
, inputs
|
, inputs
|
||||||
|
, microvm
|
||||||
, nixos-hardware
|
, nixos-hardware
|
||||||
, home-manager
|
, home-manager
|
||||||
, ...
|
, ...
|
||||||
@@ -34,15 +35,14 @@ let
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
|
microvm.nixosModules.microvm
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
defaultModules = baseModules;
|
defaultModules = baseModules;
|
||||||
|
|
||||||
makeMicroVM = hostName: ipv4Addr: macAddr: modules: [
|
makeMicroVM = hostName: ipv4Addr: macAddr: modules: [
|
||||||
inputs.microvm.nixosModules.microvm
|
|
||||||
{
|
{
|
||||||
microvm = {
|
microvm = {
|
||||||
hypervisor = "cloud-hypervisor";
|
hypervisor = "cloud-hypervisor";
|
||||||
@@ -170,10 +170,20 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nextcloud = nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs.inputs = inputs;
|
||||||
|
specialArgs.self = self;
|
||||||
|
modules = makeMicroVM "nextcloud" "10.0.0.13" "D0:E5:CA:F0:D7:E9" [
|
||||||
|
./nextcloud/configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
testvm = nixosSystem {
|
testvm = nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs.inputs = inputs;
|
specialArgs.inputs = inputs;
|
||||||
specialArgs.self = self;
|
specialArgs.self = self;
|
||||||
modules = defaultModules ++ [ ./testvm ];
|
modules = defaultModules ++ [ ./testvm ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.malobeo.microvm.enableHostBridge = true;
|
services.malobeo.microvm.enableHostBridge = true;
|
||||||
services.malobeo.microvm.deployHosts = [ "infradocs" ];
|
services.malobeo.microvm.deployHosts = [ "infradocs" "nextcloud" ];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
firewall = {
|
firewall = {
|
||||||
@@ -70,6 +70,14 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virtualHosts."cloud.malobeo.org" = {
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://10.0.0.13";
|
||||||
|
extraConfig = ''
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.tor = {
|
services.tor = {
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ in
|
|||||||
default = true;
|
default = true;
|
||||||
description = "Allows encryption to be disabled for testing";
|
description = "Allows encryption to be disabled for testing";
|
||||||
};
|
};
|
||||||
|
legacy = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable legacy boot (bios)";
|
||||||
|
};
|
||||||
devNodes = lib.mkOption {
|
devNodes = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "/dev/disk/by-id/";
|
default = "/dev/disk/by-id/";
|
||||||
@@ -81,198 +86,220 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkMerge [
|
||||||
networking.hostId = cfg.hostId;
|
(lib.mkIf (cfg.enable && !cfg.legacy) {
|
||||||
disko.devices = {
|
boot = {
|
||||||
disk = lib.mkMerge [
|
loader.systemd-boot.enable = true;
|
||||||
{
|
loader.efi.canTouchEfiVariables = true;
|
||||||
ssd0 = lib.mkIf (cfg.root.disk0 != "") {
|
supportedFilesystems = [ "vfat" "zfs" ];
|
||||||
type = "disk";
|
};
|
||||||
device = "/dev/${cfg.root.disk0}";
|
fileSystems."/boot".neededForBoot = true;
|
||||||
content = {
|
})
|
||||||
type = "gpt";
|
(lib.mkIf (cfg.enable && cfg.legacy) {
|
||||||
partitions = {
|
boot.loader.grub = {
|
||||||
ESP = {
|
enable = lib.mkForce true;
|
||||||
size = "1024M";
|
device = "/dev/${cfg.root.disk0}-part1";
|
||||||
type = "EF00";
|
efiSupport = false;
|
||||||
content = {
|
enableCryptodisk = cfg.encryption;
|
||||||
type = "filesystem";
|
zfsSupport = true;
|
||||||
format = "vfat";
|
};
|
||||||
mountpoint = "/boot";
|
})
|
||||||
mountOptions = [ "umask=0077" ];
|
(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 = lib.mkIf (!cfg.legacy) {
|
||||||
|
size = "1024M";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
boot = lib.mkIf cfg.legacy {
|
||||||
encryptedSwap = {
|
size = "1024M";
|
||||||
size = cfg.root.swap;
|
type = "EF02";
|
||||||
content = {
|
|
||||||
type = "swap";
|
|
||||||
randomEncryption = true;
|
|
||||||
};
|
};
|
||||||
};
|
encryptedSwap = {
|
||||||
zfs = {
|
size = cfg.root.swap;
|
||||||
size = "100%";
|
content = {
|
||||||
content = {
|
type = "swap";
|
||||||
type = "zfs";
|
randomEncryption = true;
|
||||||
pool = "zroot";
|
};
|
||||||
};
|
};
|
||||||
};
|
zfs = {
|
||||||
};
|
size = "100%";
|
||||||
};
|
content = {
|
||||||
};
|
type = "zfs";
|
||||||
ssd1 = lib.mkIf (cfg.root.disk1 != "") {
|
pool = "zroot";
|
||||||
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
|
};
|
||||||
)
|
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 = {
|
zpool = {
|
||||||
zroot = {
|
zroot = {
|
||||||
type = "zpool";
|
type = "zpool";
|
||||||
mode = lib.mkIf cfg.root.mirror "mirror";
|
mode = lib.mkIf cfg.root.mirror "mirror";
|
||||||
# Workaround: cannot import 'zroot': I/O error in disko tests
|
# Workaround: cannot import 'zroot': I/O error in disko tests
|
||||||
options.cachefile = "none";
|
options.cachefile = "none";
|
||||||
rootFsOptions = {
|
rootFsOptions = {
|
||||||
mountpoint = "none";
|
mountpoint = "none";
|
||||||
xattr = "sa"; # für microvm virtiofs mount
|
xattr = "sa"; # für microvm virtiofs mount
|
||||||
acltype = "posixacl"; # für microvm virtiofs mount
|
acltype = "posixacl"; # für microvm virtiofs mount
|
||||||
compression = "zstd";
|
compression = "zstd";
|
||||||
"com.sun:auto-snapshot" = "false";
|
"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";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
datasets = {
|
storage = lib.mkIf cfg.storage.enable {
|
||||||
encrypted = {
|
type = "zpool";
|
||||||
type = "zfs_fs";
|
mode = lib.mkIf (cfg.storage.mirror) "mirror";
|
||||||
options = {
|
rootFsOptions = {
|
||||||
mountpoint = "none";
|
mountpoint = "none";
|
||||||
encryption = lib.mkIf cfg.encryption "aes-256-gcm";
|
xattr = "sa"; # für microvm virtiofs mount
|
||||||
keyformat = lib.mkIf cfg.encryption "passphrase";
|
acltype = "posixacl"; # für microvm virtiofs mount
|
||||||
keylocation = lib.mkIf cfg.encryption "file:///tmp/secret.key";
|
};
|
||||||
|
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" storage/encrypted;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
# use this to read the key during boot
|
"encrypted/data" = {
|
||||||
postCreateHook = lib.mkIf cfg.encryption ''
|
type = "zfs_fs";
|
||||||
zfs set keylocation="prompt" zroot/encrypted;
|
mountpoint = "/data";
|
||||||
'';
|
options.mountpoint = "legacy";
|
||||||
};
|
|
||||||
"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";
|
reserved = {
|
||||||
};
|
# for cow delete if pool is full
|
||||||
};
|
options = {
|
||||||
};
|
canmount = "off";
|
||||||
|
mountpoint = "none";
|
||||||
storage = lib.mkIf cfg.storage.enable {
|
reservation = "${cfg.storage.reservation}";
|
||||||
type = "zpool";
|
};
|
||||||
mode = lib.mkIf (cfg.storage.mirror) "mirror";
|
type = "zfs_fs";
|
||||||
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="prompt" storage/encrypted;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
"encrypted/data" = {
|
|
||||||
type = "zfs_fs";
|
|
||||||
mountpoint = "/data";
|
|
||||||
options.mountpoint = "legacy";
|
|
||||||
};
|
|
||||||
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.devNodes = lib.mkDefault cfg.devNodes;
|
||||||
|
|
||||||
fileSystems."/".neededForBoot = true;
|
fileSystems."/".neededForBoot = true;
|
||||||
fileSystems."/etc".neededForBoot = true;
|
fileSystems."/etc".neededForBoot = true;
|
||||||
fileSystems."/boot".neededForBoot = true;
|
fileSystems."/var".neededForBoot = true;
|
||||||
fileSystems."/var".neededForBoot = true;
|
fileSystems."/home".neededForBoot = true;
|
||||||
fileSystems."/home".neededForBoot = true;
|
fileSystems."/nix".neededForBoot = true;
|
||||||
fileSystems."/nix".neededForBoot = true;
|
})
|
||||||
};
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,13 +26,9 @@ in
|
|||||||
|
|
||||||
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
|
config = lib.mkIf (cfg.enable && config.malobeo.disks.encryption) {
|
||||||
boot = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
supportedFilesystems = [ "vfat" "zfs" ];
|
|
||||||
zfs = {
|
zfs = {
|
||||||
forceImportAll = true;
|
forceImportAll = true;
|
||||||
requestEncryptionCredentials = true;
|
requestEncryptionCredentials = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = cfg.ethernetDrivers;
|
availableKernelModules = cfg.ethernetDrivers;
|
||||||
|
|||||||
57
machines/nextcloud/configuration.nix
Normal file
57
machines/nextcloud/configuration.nix
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
sops.defaultSopsFile = ./secrets.yaml;
|
||||||
|
sops.secrets = {
|
||||||
|
nextcloudAdminPass = {
|
||||||
|
owner = "nextcloud";
|
||||||
|
group = "nextcloud";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = mkDefault "nextcloud";
|
||||||
|
useDHCP = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
../modules/malobeo_user.nix
|
||||||
|
../modules/sshd.nix
|
||||||
|
../modules/minimal_tools.nix
|
||||||
|
../modules/autoupdate.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
services.nextcloud = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.nextcloud30;
|
||||||
|
hostName = "cloud.malobeo.org";
|
||||||
|
config.adminpassFile = config.sops.secrets.nextcloudAdminPass.path;
|
||||||
|
#https = true; #disable for testing
|
||||||
|
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;
|
||||||
|
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"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
|
||||||
|
system.stateVersion = "22.11"; # Did you read the comment?
|
||||||
|
}
|
||||||
|
|
||||||
79
machines/nextcloud/secrets.yaml
Normal file
79
machines/nextcloud/secrets.yaml
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
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+IFgyNTUxOSBmVGxsNmZ3Z0RIYmMyL0Mr
|
||||||
|
UUpaMEZLTCtQaGFrL1YwOVBicEtNRTVaVGhRCmhDSUgxYXpRcldaMngvOWJDdnNo
|
||||||
|
b2ZFbUdmcE9EV2E3SkMvZ1RpKzZmeU0KLS0tIE5hNmVFTXpBZFZ3bHYwQlJQaUtw
|
||||||
|
UFJmTVFaOTJXN09QLzY4emh5Z3hqRjAKXk1PSwR2x0H2cMN06fyigiusz8v2IRIg
|
||||||
|
S4ZTq/JX39U4QQHgWA1dFPfC636LNBo+QKdl/2mjwnXW7duqDJ+5kA==
|
||||||
|
-----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: "2024-11-26T19:59:36Z"
|
||||||
|
enc: |-
|
||||||
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
|
hQGMA5HdvEwzh/H7AQv+KkX46UGQzLvhrk/VUCnnMdLEcNbYfk4h+sZJzs1riOGA
|
||||||
|
LAKYNeaeN6iLLeZX+T2/s5OT4WkIEKGg8/gziurdx01BR70M96Faubp6EVtdK44+
|
||||||
|
6F5BLLrDhlEKDNOx48qPwJdFjbYW4wZLWmv5nzwPmmRCKO7MoI9UHKq69msCor1i
|
||||||
|
ralbjlVHyKSuRfvflKAlxFoEqeB6H+ryc54g3stk1j2eFiMNuF/oKDJZT+XI5LHZ
|
||||||
|
Ai80DAWoUBYgpP4aWiNC075GPutdPlZ3mrGf5+7QnNm7GmNUdJN5VAWmI2NUGr1J
|
||||||
|
BLopnPFo4juWNsZkLMj2aAuKvGTkhz2PuFKfLj6Erpu82RAjadpFWx239n+i4Ryq
|
||||||
|
wSquYshpuiecLEejntTBKLEacwp+aPx8IHKnOOKBTdJj+YYaISiznQAlkF7WS+lg
|
||||||
|
MTZR85BvCxiPogujL7uhYSx1wM5FVkuAIPf1JOJCRvQt30eRRrR0VMrmqQ1Kl5OT
|
||||||
|
VMzZRIGIoC5vrKGeIIjJ0lgBWQ3bYFh/LGrwKetku6TRAH29mp/XwQqBC97RsUYb
|
||||||
|
EOxft5sUWaYrXK+z2yzCxOQBWKJISPgcyhdoKfYGnRkHXHi2Uay84oQP4co72eVF
|
||||||
|
cAhEJOxMw36e
|
||||||
|
=bSaN
|
||||||
|
-----END PGP MESSAGE-----
|
||||||
|
fp: c4639370c41133a738f643a591ddbc4c3387f1fb
|
||||||
|
- created_at: "2024-11-26T19:59:36Z"
|
||||||
|
enc: |-
|
||||||
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
|
hQIMA98TrrsQEbXUARAAmG88ZDt43zj6dCJkYYVj7MGIhIviJzilTvX4+EfNobtA
|
||||||
|
tll60GYfRotKnwbuqzSVaaIcV+6cDQ5I1hG5WNFJSXm7DpJ0W1Ir1x2hpxektXFa
|
||||||
|
fQ+9HiCOfEqUu5PEynCAD1jN6CQLdl87hLQx9TqbZnHuUYPSH1o9Y6kbA/Vp3bpy
|
||||||
|
evJc8qa66WHYH1kjdEw+qneD5HzZQOLOtXZ7xkxjGbyMcYex9JfyGHohO5dpLg6B
|
||||||
|
3XrLlIWWERVz04MlnzlaMKfzhoMCU9ByqJSQ3VBm9kblQqu54fOZD2sN8j9ACEfL
|
||||||
|
YNC7Jm2rasVSqv09G1kso9/VNDw3kNCLvjnpE5rJRP7Ckfj+4FxQN/zPVUwQ1e1k
|
||||||
|
upoQ8MHyf1bJr8vspm/prm9zp+PRRTUwY1Yyts/ffj+CF5ec9M3jr/RSeEAdswsL
|
||||||
|
6dLKBL1LuLAjKXOuVnQ7E6gN940Y994sDFkbqEmzzCUHGcfxSF3IDn/qpkQlqerU
|
||||||
|
B/D43Yef+rtsUDyTA5RUpxKleGORcS4sV0BhQrNXeFclaMTyMr+AbOei4Y77qlD1
|
||||||
|
x/fHB3IT4Intvp9k4m6jJ86RtLpVhEoA4cHEdCCiXHzUpA6aVtNHVAOqT/aBykrf
|
||||||
|
uSm1wu/nl6yKbIwTJueli1OfQYKEYcUdjOrEOwXb+UDQKSohWZrMg0sj7/S6Pl/S
|
||||||
|
WAG1BZ20HXD2ZrVqESV87Pl04nKMqswrio+BINfAT9X3ya7L3DF69MR18bDt+ZIB
|
||||||
|
0F3+9WUREGI5in4S3hXNxrgfLNFl1YLklfWLYcx0HXJN3z6F2eJOUvM=
|
||||||
|
=aT3U
|
||||||
|
-----END PGP MESSAGE-----
|
||||||
|
fp: aef8d6c7e4761fc297cda833df13aebb1011b5d4
|
||||||
|
- created_at: "2024-11-26T19:59:36Z"
|
||||||
|
enc: |-
|
||||||
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
|
hQIMA1kR3vWkIYVnARAAqFyuCtvu6AidWg/9+btEcjWv0sBZaIRpYfX3p2QECwCu
|
||||||
|
UYAtssvSHgHdBEQzU27MA/5CGmEreB3NhWrjGquv88RojLO1JuhNHGYPZKeIcBKr
|
||||||
|
I2oS79RKuYs+d2Qu0KUYDaVoY9M5YJsfkju2FOXqMNYlbqX+lDuWnisigj3n2N4e
|
||||||
|
OEBnVIpfPBQE6c1Z9DaQJE7MyBbKfg5YeWjlwwh+fCf1dV/nGp+QdD88F3dzWMoK
|
||||||
|
xNGt69TwZ8JUVmElAIJqLJTpyDI5xHQUw2A6ddPSTk/u363eHhOnZZUNAAm3FdO5
|
||||||
|
0x+4QhcBaH59S8WDZhw4MVmZN7v4+3l3mf7Rx/TXSz4oJg+U7RMgvc291/gowNVm
|
||||||
|
/cVhBlMYz4Ogx/OYR/t+nzq35r+eBungTB+dRXw7qTTfkCtNgp34JMCkGAq5WWnY
|
||||||
|
57H2HtssGiMF0qN4SfWxw7317oUmqHI2XvG0yWt42G++jNgIGbDOtuc/7wATEbhK
|
||||||
|
SBX2aLqDIB1OUwLHQeawyKkB0qGmRSVPkPg8JLwRp43ICETH1WPkY5m/a2slVlDj
|
||||||
|
qgdw00clTI5Fgu/5G5QBD4Ds9f9ZwjrMD4v+NYfGxa0ajisXl1X6CL1+YvQ6Uicf
|
||||||
|
QmIRJYxyVd0VoXScZnsk0T/XTKjJB/fRLRalA2PmlZ1v+gisCUz2dhM+OHtSjGTS
|
||||||
|
WAG5znRbP8UMVt02O0PgbzHYtIUAtQLCuBnzfEKJn721rqCXf7DXU3jrR73Ys6ce
|
||||||
|
VJzkVBMnBszF71GN56t0PaUYIDOnaGvgjMtHHtOCLQHSK7asnm/Bc+E=
|
||||||
|
=Znii
|
||||||
|
-----END PGP MESSAGE-----
|
||||||
|
fp: 4095412245b6efc14cf92ca25911def5a4218567
|
||||||
|
unencrypted_suffix: _unencrypted
|
||||||
|
version: 3.8.1
|
||||||
@@ -20,7 +20,7 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
|||||||
let
|
let
|
||||||
sops = sops-nix.packages."${pkgs.system}";
|
sops = sops-nix.packages."${pkgs.system}";
|
||||||
microvmpkg = microvm.packages."${pkgs.system}";
|
microvmpkg = microvm.packages."${pkgs.system}";
|
||||||
installed = builtins.attrNames self.packages."${pkgs.system}".scripts;
|
installed = builtins.attrNames self.legacyPackages."${pkgs.system}".scripts;
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
sopsPGPKeyDirs = [
|
sopsPGPKeyDirs = [
|
||||||
@@ -38,13 +38,14 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
|||||||
pkgs.mdbook
|
pkgs.mdbook
|
||||||
microvmpkg.microvm
|
microvmpkg.microvm
|
||||||
];
|
];
|
||||||
packages = builtins.map (pkgName: self.packages."${pkgs.system}".scripts.${pkgName}) installed;
|
packages = builtins.map (pkgName: self.legacyPackages."${pkgs.system}".scripts.${pkgName}) installed;
|
||||||
shellHook = ''echo "Available scripts: ${builtins.concatStringsSep " " installed}"'';
|
shellHook = ''echo "Available scripts: ${builtins.concatStringsSep " " installed}"'';
|
||||||
};
|
};
|
||||||
|
legacyPackages = {
|
||||||
packages = {
|
|
||||||
scripts.remote-install = pkgs.writeShellScriptBin "remote-install" (builtins.readFile ./scripts/remote-install-encrypt.sh);
|
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.boot-unlock = pkgs.writeShellScriptBin "boot-unlock" (builtins.readFile ./scripts/unlock-boot.sh);
|
||||||
|
};
|
||||||
|
packages = {
|
||||||
docs = pkgs.stdenv.mkDerivation {
|
docs = pkgs.stdenv.mkDerivation {
|
||||||
name = "malobeo-docs";
|
name = "malobeo-docs";
|
||||||
phases = [ "buildPhase" ];
|
phases = [ "buildPhase" ];
|
||||||
|
|||||||
Reference in New Issue
Block a user