nixos-config/nix/topology/default.nix
2024-08-30 17:34:57 +07:00

40 lines
846 B
Nix

{ inputs, self, ... }:
{
imports = [
inputs.nix-topology.flakeModule
];
# todo : create apps to make live easier
# nix build .#topology.x86_64-linux.config.output
perSystem =
{
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 ];
};
topology.modules = [
./networks.nix
{
# Inline module to inform topology of your existing NixOS hosts.
}
];
};
}