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; }) - ]; - }; -}