From 1eea028fec00e441948bb1a23f4b2a3762f20d22 Mon Sep 17 00:00:00 2001 From: Jo Date: Sun, 21 Sep 2025 03:02:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Simplify=20packettracer=20config?= =?UTF-8?q?uration=20for=20better=20CI=20compatibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jo/apps/packettracer/default.nix | 13 ++++++--- modules/home/apps/packettracer/default.nix | 28 ------------------- 2 files changed, 9 insertions(+), 32 deletions(-) delete mode 100644 modules/home/apps/packettracer/default.nix diff --git a/homes/x86_64-linux/jo/apps/packettracer/default.nix b/homes/x86_64-linux/jo/apps/packettracer/default.nix index 2b26736..e78cf20 100644 --- a/homes/x86_64-linux/jo/apps/packettracer/default.nix +++ b/homes/x86_64-linux/jo/apps/packettracer/default.nix @@ -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 + [ ]; } diff --git a/modules/home/apps/packettracer/default.nix b/modules/home/apps/packettracer/default.nix deleted file mode 100644 index 3cc9e22..0000000 --- a/modules/home/apps/packettracer/default.nix +++ /dev/null @@ -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; }) - ]; - }; -}