Skip to content

Commit

Permalink
nix-topology
Browse files Browse the repository at this point in the history
  • Loading branch information
zowoq committed Jun 15, 2024
1 parent 9455f84 commit 48affc0
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dev/docs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
../mkdocs.yml
];
};
inherit (config.topology.config) output;
}
''
cd $files
cp --no-preserve=mode -r $files/* .
cp --no-preserve=mode -r $output/* docs
mkdocs build --strict --site-dir $out
'';
docs-linkcheck = pkgs.testers.lycheeLinkCheck rec {
Expand Down
27 changes: 27 additions & 0 deletions dev/topology.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{ inputs, ... }:
{
imports = [
({ lib, flake-parts-lib, ... }:
flake-parts-lib.mkTransposedPerSystemModule {
name = "topology";
file = ./topology.nix;
option = lib.mkOption {
type = lib.types.unspecified;
};
})
];

perSystem = { system, ... }: {
topology = import inputs.nix-topology {
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
inputs.nix-topology.overlays.default
];
};
modules = [
{ inherit (inputs.self) nixosConfigurations; }
];
};
};
}
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.

6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
flake-utils.url = "github:numtide/flake-utils";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin.url = "github:LnL7/nix-darwin";
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";
nixpkgs-update-github-releases.flake = false;
nixpkgs-update-github-releases.url = "github:nix-community/nixpkgs-update-github-releases";
nixpkgs-update.inputs.mmdoc.follows = "empty";
Expand All @@ -56,6 +61,7 @@
systems = import inputs.systems;

imports = [
./dev/topology.nix
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 @@ -14,6 +14,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 @@ -11,6 +11,7 @@
./users.nix
inputs.sops-nix.nixosModules.sops
inputs.srvos.nixosModules.server
inputs.nix-topology.nixosModules.default
];

# users in trusted group are trusted by the nix-daemon
Expand Down

0 comments on commit 48affc0

Please sign in to comment.