🔥 Simplify packettracer configuration for better CI compatibility
Some checks failed
Trufflehog: check for exposed secrets / Run trufflehog (push) Waiting to run
Nix: check for unused code / Run deadnix (push) Waiting to run
Nix: validate flake / Validate x86_64-linux (push) Waiting to run
Nix: validate flake.lock / Check Lockfile (push) Has been cancelled

This commit is contained in:
Jo 2025-09-21 03:02:37 +02:00
parent c38ecb55a2
commit 1eea028fec
2 changed files with 9 additions and 32 deletions

View file

@ -1,9 +1,14 @@
{
pkgs,
...
}:
{
puzzlevision.apps.packettracer = {
enable = true;
binaryPath = ./Packet_Tracer822_amd64_signed.deb;
};
home.packages =
with pkgs;
if builtins.pathExists ./Packet_Tracer822_amd64_signed.deb then
[
(ciscoPacketTracer8.override { packetTracerSource = ./Packet_Tracer822_amd64_signed.deb; })
]
else
[ ];
}

View file

@ -1,28 +0,0 @@
{
config,
self,
pkgs,
lib,
...
}:
let
inherit (self) namespace;
inherit (self.lib) mkOpt;
inherit (lib) mkEnableOption types mkIf;
cfg = config.${namespace}.apps.packettracer;
in
{
options.${namespace}.apps.packettracer = {
enable = mkEnableOption "the Cisco Packettracer application, a network emulator.";
binaryPath =
mkOpt types.path null
"The path of the Packettracer binary. Has to be downloaded from Cisco Netacad";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
(ciscoPacketTracer8.override { packetTracerSource = cfg.binaryPath; })
];
};
}