From 8edd189f075f3b5525cb2647351242477b16f4bb Mon Sep 17 00:00:00 2001 From: Jo Date: Thu, 4 Sep 2025 14:20:41 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20packettracer=20home=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jo/apps/packettracer/default.nix | 9 ++++++ homes/x86_64-linux/jo/default.nix | 4 +-- modules/home/apps/packettracer/default.nix | 28 +++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 homes/x86_64-linux/jo/apps/packettracer/default.nix create 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 new file mode 100644 index 0000000..2b26736 --- /dev/null +++ b/homes/x86_64-linux/jo/apps/packettracer/default.nix @@ -0,0 +1,9 @@ +{ + ... +}: +{ + puzzlevision.apps.packettracer = { + enable = true; + binaryPath = ./Packet_Tracer822_amd64_signed.deb; + }; +} diff --git a/homes/x86_64-linux/jo/default.nix b/homes/x86_64-linux/jo/default.nix index eff88f9..4905028 100644 --- a/homes/x86_64-linux/jo/default.nix +++ b/homes/x86_64-linux/jo/default.nix @@ -8,6 +8,7 @@ ./apps/discord ./apps/firefox ./apps/vicinae + ./apps/packettracer ]; puzzlevision = { @@ -28,9 +29,6 @@ }; }; - # Notify on systembus events - services.systembus-notify.enable = true; - sops.secrets.wakatime-cfg = { format = "binary"; sopsFile = ./secrets/wakatime.cfg; diff --git a/modules/home/apps/packettracer/default.nix b/modules/home/apps/packettracer/default.nix new file mode 100644 index 0000000..3cc9e22 --- /dev/null +++ b/modules/home/apps/packettracer/default.nix @@ -0,0 +1,28 @@ +{ + 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; }) + ]; + }; +}