From ee13d7fa8228aba3cda0a466eee700c012bbcc0a Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 30 Aug 2024 14:18:21 +0700 Subject: [PATCH] :sparkles: add nix run .#topology --- nix/topology.nix | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/nix/topology.nix b/nix/topology.nix index c0d5be7..fa2eba3 100644 --- a/nix/topology.nix +++ b/nix/topology.nix @@ -1,7 +1,6 @@ { inputs, self, ... }: { imports = [ - #inputs.flake-parts.flakeModules.easyOverlay inputs.nix-topology.flakeModule ]; @@ -9,9 +8,24 @@ # nix build .#topology.x86_64-linux.config.output perSystem = - { system, ... }: { - #overlayAttrs = inputs.nix-topology.overlays.default; + system, + lib, + pkgs, + ... + }: + { + + apps.topology = { + type = "app"; + program = pkgs.writers.writeBashBin "topology" '' + ${lib.getExe pkgs.nix} build ${self}#topology.${system}.config.output + echo "result" + ls -lah ./result + ls -lah ./result/ + ''; + }; + topology.pkgs = import inputs.nixpkgs { inherit system; overlays = [ inputs.nix-topology.overlays.default ];