1
0
Fork 0

switch to gvolpe/nmd

This commit is contained in:
ibizaman 2023-11-30 09:43:38 -08:00
parent 7c1f4764ad
commit 3d72586ced
4 changed files with 109 additions and 47 deletions

38
docs/man-pages.xml Normal file
View file

@ -0,0 +1,38 @@
<!-- Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. -->
<reference xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Self Host Blocks Reference Pages</title>
<info>
<author><personname>Self Host Blocks contributors</personname>
</author>
<copyright><year>2022</year><holder>Self Host Blocks contributors</holder>
</copyright>
</info>
<refentry>
<refmeta>
<refentrytitle><filename>selfhostblocks-options</filename></refentrytitle>
<manvolnum>5</manvolnum>
<refmiscinfo class="source">Self Host Blocks</refmiscinfo>
</refmeta>
<refnamediv>
<refname><filename>selfhostblocks-options</filename>
</refname><refpurpose>Self Host Blocks configuration specification</refpurpose>
</refnamediv>
<refsection>
<title>Description</title>
<para>
This contains the module options available for Self Host Blocks.
</para>
</refsection>
<refsection>
<title>Options</title>
<para>
You can use the following options in <filename>selfhostblocks.nix</filename> or in the
<varname>modules</varname> argument of <varname>lib.nixOnDroidConfiguration</varname>
in your <filename>flake.nix</filename>:
</para>
<xi:include href="./nmd-result/selfhostblocks-options.xml" />
</refsection>
</refentry>
</reference>

View file

@ -1,13 +1,59 @@
<!-- Copyright (c) 2019-2023, see AUTHORS. Licensed under MIT License, see LICENSE. -->
<book xmlns="http://docbook.org/ns/docbook" <book xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0" version="5.0"
xml:id="book-minimal-example"> xml:id="book-manual">
<info> <info>
<title>A simple example</title> <title>Self Host Blocks manual</title>
</info> </info>
<chapter> <preface>
<title>A simple example</title> <title>Preface</title>
<simpara>Hello, world!</simpara> <para>
</chapter> Some basic documentation of Self Host Blocks.
</para>
<para>
If you encounter problems or bugs then please report them on the
<link xlink:href="https://github.com/nix-community/nix-on-droid/issues">issue tracker</link>.
</para>
</preface>
<appendix xml:id="ch-options">
<title>Self Host Blocks configuration options</title>
<section xml:id="sec-usage">
<title>Usage</title>
<para>
To use these options, edit the config file in
<filename>~/.config/nixpkgs/selfhostblocks.nix</filename> or in case of a flake setup,
set the <replaceable>modules</replaceable> value in the <varname>nixOnDroidConfiguration</varname>
call:
<programlisting language="nix">
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nix-on-droid = {
url = "github:nix-community/nix-on-droid/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nix-on-droid }: {
nixOnDroidConfigurations.deviceName = nix-on-droid.lib.nixOnDroidConfiguration {
<replaceable>modules</replaceable> = [ ./nix-on-droid.nix ];
};
};
}
</programlisting>
</para>
</section>
<section xml:id="sec-options">
<title>Options</title>
<xi:include href="./nmd-result/selfhostblocks-options.xml" />
</section>
</appendix>
</book> </book>

40
flake.lock generated
View file

@ -82,24 +82,18 @@
} }
}, },
"nmd": { "nmd": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"scss-reset": "scss-reset"
},
"locked": { "locked": {
"lastModified": 1687627428, "lastModified": 1672240039,
"narHash": "sha256-7zGfXuNS5RHqhpEdz2fwrtqvF86JRo5U1hrxZSYgcm8=", "narHash": "sha256-lmct89fYDOr9YdWVvdJgklv/7WttRSiDAkoi2cvvAW4=",
"ref": "refs/heads/master", "owner": "gvolpe",
"rev": "824a380546b5d0d0eb701ff8cd5dbafb360750ff", "repo": "nmd",
"revCount": 63, "rev": "a59e840c2e8d54415485f349760e1350cb80d911",
"type": "git", "type": "github"
"url": "https://git.sr.ht/~rycee/nmd"
}, },
"original": { "original": {
"type": "git", "owner": "gvolpe",
"url": "https://git.sr.ht/~rycee/nmd" "repo": "nmd",
"type": "github"
} }
}, },
"root": { "root": {
@ -111,22 +105,6 @@
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
}, },
"scss-reset": {
"flake": false,
"locked": {
"lastModified": 1631450058,
"narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=",
"owner": "andreymatin",
"repo": "scss-reset",
"rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91",
"type": "github"
},
"original": {
"owner": "andreymatin",
"repo": "scss-reset",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",

View file

@ -6,13 +6,15 @@
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
nix-flake-tests.url = "github:antifuchs/nix-flake-tests"; nix-flake-tests.url = "github:antifuchs/nix-flake-tests";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
nmd.url = "git+https://git.sr.ht/~rycee/nmd"; nmd.url = "github:gvolpe/nmd";
nmd.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { nixpkgs, nix-flake-tests, flake-utils, nmd, ... }: flake-utils.lib.eachDefaultSystem (system: outputs = { nixpkgs, nix-flake-tests, flake-utils, nmd, ... }: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = import nixpkgs {
inherit system;
overlays = [ nmd.overlays.default ];
};
in in
{ {
nixosModules.default = { config, ... }: { nixosModules.default = { config, ... }: {
@ -40,14 +42,12 @@
# Inspiration from https://github.com/nix-community/nix-on-droid/blob/039379abeee67144d4094d80bbdaf183fb2eabe5/docs/default.nix#L22 # Inspiration from https://github.com/nix-community/nix-on-droid/blob/039379abeee67144d4094d80bbdaf183fb2eabe5/docs/default.nix#L22
packages.manualHtml = let packages.manualHtml = let
nmdlib = import nmd { inherit pkgs; };
setupModule = { setupModule = {
_module.args.pkgs = pkgs.lib.mkForce (nmdlib.scrubDerivations "pkgs" pkgs); _module.args.pkgs = pkgs.lib.mkForce (pkgs.nmd.scrubDerivations "pkgs" pkgs);
_module.check = false; _module.check = false;
}; };
modulesDocs = nmdlib.buildModulesDocs { modulesDocs = pkgs.nmd.buildModulesDocs {
modules = [ modules = [
setupModule setupModule
./modules/blocks/ssl.nix ./modules/blocks/ssl.nix
@ -58,7 +58,7 @@
docBook = { id = "selfhostblocks-options"; optionIdPrefix = "shb-opt"; }; docBook = { id = "selfhostblocks-options"; optionIdPrefix = "shb-opt"; };
}; };
manual = nmdlib.buildDocBookDocs { manual = pkgs.nmd.buildDocBookDocs {
pathName = "SelfHostBlocks"; pathName = "SelfHostBlocks";
modulesDocs = [ modulesDocs ]; modulesDocs = [ modulesDocs ];
documentsDirectory = ./docs; documentsDirectory = ./docs;