# SPDX-FileCopyrightText: 2024 Ryan Lahfa # # 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. (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. # TODO: add support for the admin 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; }; }) ]; }