infrastructure/machines/liminix/ap-dev/recovery.nix
sinavir 3b7662e45a
All checks were successful
Run pre-commit on all files / pre-commit (push) Successful in 22s
feat(ap): init ap-dev
2025-02-20 01:06:56 +01:00

53 lines
1.4 KiB
Nix

# SPDX-FileCopyrightText: 2024 Ryan Lahfa <ryan.lahfa@dgnum.eu>
#
# SPDX-License-Identifier: EUPL-1.2
{
config,
pkgs,
modulesPath,
...
}:
let
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"
# FIXME: DHCP has a hidden deps on this, shoud be done in a more intelligent way upstream
"${modulesPath}/iproute2.nix"
(_: {
# FIXME: DHCP has a hidden deps on this, shoud be done in a more intelligent way upstream
programs.iproute2.enable = true;
services = {
inherit (parentConfig.services)
sshd
admin-ip
admin-defaultroute4
;
};
})
];
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;
};
})
];
}