nixos-config/nix/topology.nix
2024-08-30 14:18:51 +07:00

39 lines
823 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 = [
{
# Inline module to inform topology of your existing NixOS hosts.
}
];
};
}