-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from TheMaxMur/develop
Merge develop into master
- Loading branch information
Showing
240 changed files
with
5,493 additions
and
3,669 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
name: "Check configuration" | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: cachix/install-nix-action@v24 | ||
with: | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
experimental-features = nix-command flakes | ||
- name: Run statix check | ||
run: nix run 'nixpkgs/nixos-unstable#statix' -- check . | ||
|
||
- name: Run deadnix check | ||
run: nix run 'nixpkgs/nixos-unstable#deadnix' -- . | ||
|
||
- name: Run flake check | ||
uses: DeterminateSystems/flake-checker-action@v5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
perSystem = | ||
{ self', pkgs, ... }: | ||
{ | ||
packages.mydocs = pkgs.callPackage ./docs.nix { self = self'; }; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
{ pkgs | ||
, ... | ||
}: | ||
let | ||
inherit (pkgs) stdenv mkdocs python310Packages; | ||
options-doc = pkgs.callPackage ./options-doc.nix {}; | ||
in stdenv.mkDerivation { | ||
src = ./.; | ||
name = "docs"; | ||
buildInput = [ options-doc ]; | ||
nativeBuildInputs = [ | ||
mkdocs | ||
python310Packages.mkdocs-material | ||
python310Packages.pygments | ||
]; | ||
buildPhase = '' | ||
ln -s ${options-doc} "./docs/nixos-options.md" | ||
mkdocs build | ||
''; | ||
installPhase = '' | ||
mv site $out | ||
''; | ||
} | ||
*/ | ||
|
||
{ | ||
writeShellScriptBin, | ||
pkgs, | ||
self, | ||
... | ||
}: | ||
|
||
let | ||
options-doc = pkgs.callPackage ./options-doc.nix { inherit self; }; | ||
in | ||
writeShellScriptBin "gen-options-doc" '' | ||
echo "Generating NixOS module options documentation" | ||
cat ${options-doc} > OPTIONS.md | ||
'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
lib, | ||
self, | ||
pkgs, | ||
runCommand, | ||
nixosOptionsDoc, | ||
}: | ||
|
||
let | ||
eval = lib.evalModules { | ||
specialArgs = { inherit self pkgs; }; | ||
|
||
modules = [ | ||
(lib.nixosSystem { | ||
inherit (pkgs) system; | ||
modules = [ | ||
../modules/default.nix | ||
]; | ||
}) | ||
]; | ||
}; | ||
|
||
optionsDoc = nixosOptionsDoc { | ||
inherit (eval) options; | ||
}; | ||
in | ||
runCommand "options-doc.md" { } '' | ||
cat ${optionsDoc.optionsCommonMark} >> $out | ||
'' |
Oops, something went wrong.