From 0f823c3eac9a4cfc590127e7b663e0d7fb7f7257 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Wed, 28 Aug 2024 10:54:41 +0200 Subject: [PATCH] Checks: add nixos documentation-check --- checks/flake-module.nix | 1 + checks/nixos-documentation/flake-module.nix | 24 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 checks/nixos-documentation/flake-module.nix diff --git a/checks/flake-module.nix b/checks/flake-module.nix index a6de83757..c783ebaca 100644 --- a/checks/flake-module.nix +++ b/checks/flake-module.nix @@ -6,6 +6,7 @@ ./flash/flake-module.nix ./impure/flake-module.nix ./installation/flake-module.nix + ./nixos-documentation/flake-module.nix ]; perSystem = { diff --git a/checks/nixos-documentation/flake-module.nix b/checks/nixos-documentation/flake-module.nix new file mode 100644 index 000000000..80564e521 --- /dev/null +++ b/checks/nixos-documentation/flake-module.nix @@ -0,0 +1,24 @@ +{ self, ... }: +let + documentationModule = { + # This is how some downstream users currently generate documentation + # If this breaks notify them via matrix since we spent ~5 hrs for bughunting last time. + documentation.nixos.enable = true; + documentation.nixos.extraModules = [ + self.nixosModules.clanCore + { clan.core.clanDir = ./.; } + ]; + }; +in +{ + clan = { + machines.test-documentation = { + # Dummy file system + fileSystems."/".device = "/dev/null"; + boot.loader.grub.device = "/dev/null"; + imports = [ + documentationModule + ]; + }; + }; +}