infrastructure/machines/liminix/ap01/recovery.nix
sinavir 69ebe92e2c
All checks were successful
Check meta / check_meta (pull_request) Successful in 16s
Check workflows / check_workflows (pull_request) Successful in 17s
Check meta / check_dns (pull_request) Successful in 20s
Build all the nodes / ap01 (pull_request) Successful in 33s
Build all the nodes / netcore02 (pull_request) Successful in 34s
Run pre-commit on all files / pre-commit (push) Successful in 39s
Build the shell / build-shell (pull_request) Successful in 49s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m31s
Build all the nodes / rescue01 (pull_request) Successful in 1m40s
Build all the nodes / web02 (pull_request) Successful in 1m41s
Build all the nodes / storage01 (pull_request) Successful in 2m4s
Build all the nodes / geo01 (pull_request) Successful in 2m7s
Build all the nodes / geo02 (pull_request) Successful in 2m12s
Build all the nodes / bridge01 (pull_request) Successful in 2m17s
Build all the nodes / build01 (pull_request) Successful in 2m19s
Build all the nodes / hypervisor02 (pull_request) Successful in 2m19s
Build all the nodes / tower01 (pull_request) Successful in 2m18s
Build all the nodes / hypervisor03 (pull_request) Successful in 2m26s
Build all the nodes / compute01 (pull_request) Successful in 2m40s
Build all the nodes / vault01 (pull_request) Successful in 2m27s
Build all the nodes / web03 (pull_request) Successful in 2m10s
Build all the nodes / web01 (pull_request) Successful in 2m50s
Run pre-commit on all files / pre-commit (pull_request) Successful in 24s
feat: Add TODO before release
2025-01-31 17:41:15 +01:00

59 lines
1.7 KiB
Nix

# SPDX-FileCopyrightText: 2024 Ryan Lahfa <ryan.lahfa@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{
config,
pkgs,
modulesPath,
...
}:
let
svc = config.system.service;
parentConfig = config;
in
{
defaultProfile.packages = [
# Levitate enable us to mass-reinstall the system on the fly.
# TODO: Test levitation
(pkgs.levitate.override {
config = {
imports = [
"${modulesPath}/network"
"${modulesPath}/ssh"
"${modulesPath}/hardware.nix"
"${modulesPath}/kernel"
"${modulesPath}/outputs/tftpboot.nix"
"${modulesPath}/outputs.nix"
(
{ config, ... }:
{
services = {
# In this situation, we fallback to the appro VLAN.
# Simplest DHCPv4 we can find.
dhcpv4 = svc.network.dhcp.client.build {
interface = parentConfig.hardware.networkInterfaces.lan;
};
inherit (parentConfig.services) sshd;
defaultroute4 = svc.network.route.build {
via = "$(output ${config.services.dhcpv4} router)";
target = "default";
dependencies = [ config.services.dhcpv4 ];
};
};
}
)
];
hostname = "${parentConfig.hostname}-live";
nixpkgs.buildPlatform = builtins.currentSystem;
defaultProfile.packages = with pkgs; [
mtdutils
zyxel-bootconfig
];
# Only keep root, which should inherit from DGN access control's root permissions.
users.root = config.users.root;
};
})
];
}