lol

nixos/grocy: convert manual chapter to MD

pennae 1be48def 7318430f

+108 -41
+66
nixos/modules/services/web-apps/grocy.md
··· 1 + # Grocy {#module-services-grocy} 2 + 3 + [Grocy](https://grocy.info/) is a web-based self-hosted groceries 4 + & household management solution for your home. 5 + 6 + ## Basic usage {#module-services-grocy-basic-usage} 7 + 8 + A very basic configuration may look like this: 9 + ``` 10 + { pkgs, ... }: 11 + { 12 + services.grocy = { 13 + enable = true; 14 + hostName = "grocy.tld"; 15 + }; 16 + } 17 + ``` 18 + This configures a simple vhost using [nginx](#opt-services.nginx.enable) 19 + which listens to `grocy.tld` with fully configured ACME/LE (this can be 20 + disabled by setting [services.grocy.nginx.enableSSL](#opt-services.grocy.nginx.enableSSL) 21 + to `false`). After the initial setup the credentials `admin:admin` 22 + can be used to login. 23 + 24 + The application's state is persisted at `/var/lib/grocy/grocy.db` in a 25 + `sqlite3` database. The migration is applied when requesting the `/`-route 26 + of the application. 27 + 28 + ## Settings {#module-services-grocy-settings} 29 + 30 + The configuration for `grocy` is located at `/etc/grocy/config.php`. 31 + By default, the following settings can be defined in the NixOS-configuration: 32 + ``` 33 + { pkgs, ... }: 34 + { 35 + services.grocy.settings = { 36 + # The default currency in the system for invoices etc. 37 + # Please note that exchange rates aren't taken into account, this 38 + # is just the setting for what's shown in the frontend. 39 + currency = "EUR"; 40 + 41 + # The display language (and locale configuration) for grocy. 42 + culture = "de"; 43 + 44 + calendar = { 45 + # Whether or not to show the week-numbers 46 + # in the calendar. 47 + showWeekNumber = true; 48 + 49 + # Index of the first day to be shown in the calendar (0=Sunday, 1=Monday, 50 + # 2=Tuesday and so on). 51 + firstDayOfWeek = 2; 52 + }; 53 + }; 54 + } 55 + ``` 56 + 57 + If you want to alter the configuration file on your own, you can do this manually with 58 + an expression like this: 59 + ``` 60 + { lib, ... }: 61 + { 62 + environment.etc."grocy/config.php".text = lib.mkAfter '' 63 + // Arbitrary PHP code in grocy's configuration file 64 + ''; 65 + } 66 + ```
+2
nixos/modules/services/web-apps/grocy.nix
··· 167 167 168 168 meta = { 169 169 maintainers = with maintainers; [ ma27 ]; 170 + # Don't edit the docbook xml directly, edit the md and generate it: 171 + # `pandoc grocy.md -t docbook --top-level-division=chapter --extract-media=media -f markdown-smart --lua-filter ../../../../doc/build-aux/pandoc-filters/myst-reader/roles.lua --lua-filter ../../../../doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua > grocy.xml` 170 172 doc = ./grocy.xml; 171 173 }; 172 174 }
+40 -41
nixos/modules/services/web-apps/grocy.xml
··· 1 - <chapter xmlns="http://docbook.org/ns/docbook" 2 - xmlns:xlink="http://www.w3.org/1999/xlink" 3 - xmlns:xi="http://www.w3.org/2001/XInclude" 4 - version="5.0" 5 - xml:id="module-services-grocy"> 6 - 1 + <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-grocy"> 7 2 <title>Grocy</title> 8 3 <para> 9 - <link xlink:href="https://grocy.info/">Grocy</link> is a web-based self-hosted groceries 10 - &amp; household management solution for your home. 4 + <link xlink:href="https://grocy.info/">Grocy</link> is a web-based 5 + self-hosted groceries &amp; household management solution for your 6 + home. 11 7 </para> 12 - 13 8 <section xml:id="module-services-grocy-basic-usage"> 14 - <title>Basic usage</title> 15 - <para> 16 - A very basic configuration may look like this: 17 - <programlisting> 9 + <title>Basic usage</title> 10 + <para> 11 + A very basic configuration may look like this: 12 + </para> 13 + <programlisting> 18 14 { pkgs, ... }: 19 15 { 20 16 services.grocy = { 21 17 enable = true; 22 - hostName = "grocy.tld"; 18 + hostName = &quot;grocy.tld&quot;; 23 19 }; 24 20 } 25 21 </programlisting> 26 - This configures a simple vhost using <link linkend="opt-services.nginx.enable">nginx</link> 27 - which listens to <literal>grocy.tld</literal> with fully configured ACME/LE (this can be 28 - disabled by setting <link linkend="opt-services.grocy.nginx.enableSSL">services.grocy.nginx.enableSSL</link> 29 - to <literal>false</literal>). After the initial setup the credentials <literal>admin:admin</literal> 30 - can be used to login. 31 - </para> 32 - <para> 33 - The application's state is persisted at <literal>/var/lib/grocy/grocy.db</literal> in a 34 - <literal>sqlite3</literal> database. The migration is applied when requesting the <literal>/</literal>-route 35 - of the application. 36 - </para> 22 + <para> 23 + This configures a simple vhost using 24 + <link linkend="opt-services.nginx.enable">nginx</link> which 25 + listens to <literal>grocy.tld</literal> with fully configured 26 + ACME/LE (this can be disabled by setting 27 + <link linkend="opt-services.grocy.nginx.enableSSL">services.grocy.nginx.enableSSL</link> 28 + to <literal>false</literal>). After the initial setup the 29 + credentials <literal>admin:admin</literal> can be used to login. 30 + </para> 31 + <para> 32 + The application's state is persisted at 33 + <literal>/var/lib/grocy/grocy.db</literal> in a 34 + <literal>sqlite3</literal> database. The migration is applied when 35 + requesting the <literal>/</literal>-route of the application. 36 + </para> 37 37 </section> 38 - 39 38 <section xml:id="module-services-grocy-settings"> 40 - <title>Settings</title> 41 - <para> 42 - The configuration for <literal>grocy</literal> is located at <literal>/etc/grocy/config.php</literal>. 43 - By default, the following settings can be defined in the NixOS-configuration: 44 - <programlisting> 39 + <title>Settings</title> 40 + <para> 41 + The configuration for <literal>grocy</literal> is located at 42 + <literal>/etc/grocy/config.php</literal>. By default, the 43 + following settings can be defined in the NixOS-configuration: 44 + </para> 45 + <programlisting> 45 46 { pkgs, ... }: 46 47 { 47 48 services.grocy.settings = { 48 49 # The default currency in the system for invoices etc. 49 50 # Please note that exchange rates aren't taken into account, this 50 51 # is just the setting for what's shown in the frontend. 51 - currency = "EUR"; 52 + currency = &quot;EUR&quot;; 52 53 53 54 # The display language (and locale configuration) for grocy. 54 - culture = "de"; 55 + culture = &quot;de&quot;; 55 56 56 57 calendar = { 57 58 # Whether or not to show the week-numbers ··· 65 66 }; 66 67 } 67 68 </programlisting> 68 - </para> 69 - <para> 70 - If you want to alter the configuration file on your own, you can do this manually with 71 - an expression like this: 72 - <programlisting> 69 + <para> 70 + If you want to alter the configuration file on your own, you can 71 + do this manually with an expression like this: 72 + </para> 73 + <programlisting> 73 74 { lib, ... }: 74 75 { 75 - environment.etc."grocy/config.php".text = lib.mkAfter '' 76 + environment.etc.&quot;grocy/config.php&quot;.text = lib.mkAfter '' 76 77 // Arbitrary PHP code in grocy's configuration file 77 78 ''; 78 79 } 79 80 </programlisting> 80 - </para> 81 81 </section> 82 - 83 82 </chapter>