Skip to content

Commit

Permalink
nix-topology
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Oct 12, 2024
1 parent 6461a8e commit 82ebf4c
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dev/docs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
};
}
''
cd $files
cp --no-preserve=mode -r $files/* .
cp --no-preserve=mode -r ${config.packages.topology-output}/* docs
mkdocs build --strict --site-dir $out
'';
docs-linkcheck = pkgs.testers.lycheeLinkCheck rec {
Expand Down
22 changes: 22 additions & 0 deletions dev/topology.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ self, ... }:
{
perSystem =
{ system, ... }:
{
topology.modules = [
{
nodes = {
darwin01 = {
name = "darwin01";
deviceType = "nixos";
};
darwin02 = {
name = "darwin02";
deviceType = "nixos";
};
};
}
];
packages.topology-output = self.topology.${system}.config.output;
};
}
7 changes: 7 additions & 0 deletions docs/hosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#### Main

[<img src="../main.svg" height="200" width="200" alt="main">](main.svg)

#### Network

[<img src="../network.svg" height="200" width="200" alt="network">](network.svg)
30 changes: 30 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
nix-darwin.url = "github:LnL7/nix-darwin";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-topology.inputs.devshell.follows = "empty";
nix-topology.inputs.flake-utils.follows = "flake-utils";
nix-topology.inputs.nixpkgs.follows = "nixpkgs";
nix-topology.inputs.pre-commit-hooks.follows = "empty";
nix-topology.url = "github:oddlama/nix-topology";
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
nixpkgs-update-github-releases.flake = false;
nixpkgs-update-github-releases.url = "github:nix-community/nixpkgs-update-github-releases";
Expand All @@ -62,7 +67,9 @@
systems = import inputs.systems;

imports = [
./dev/topology.nix
inputs.lite-config.flakeModule
inputs.nix-topology.flakeModule
inputs.treefmt-nix.flakeModule
];

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ nav:
- FAQ: faq.md
- administrators.md
- contact.md
- hosts.md
- security.md

theme:
Expand Down
1 change: 1 addition & 0 deletions modules/nixos/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
./update.nix
./users.nix
inputs.srvos.nixosModules.server
inputs.nix-topology.nixosModules.default
];

# Hard-link duplicated files
Expand Down

0 comments on commit 82ebf4c

Please sign in to comment.