···2 xmlns:xlink="http://www.w3.org/1999/xlink"
3 xml:id="chap-contributing">
45-<title>Contributing</title>
67<para>The DocBook sources of the Nixpkgs manual are in the <filename
8xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc</filename>
···2 xmlns:xlink="http://www.w3.org/1999/xlink"
3 xml:id="chap-contributing">
45+<title>Contributing to this documentation</title>
67<para>The DocBook sources of the Nixpkgs manual are in the <filename
8xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc</filename>
···5455</section>
5657+<section xml:id="sec-pkg-override">
58+ <title><pkg>.override</title>
59+60+ <para>
61+ The function <varname>override</varname> is usually available for all the
62+ derivations in the nixpkgs expression (<varname>pkgs</varname>).
63+ </para>
64+ <para>
65+ It is used to override the arguments passed to a function.
66+ </para>
67+ <para>
68+ Example usages:
69+70+ <programlisting>pkgs.foo.override { arg1 = val1; arg2 = val2; ... }</programlisting>
71+ <programlisting>pkgs.overridePackages (self: super: {
72+ foo = super.foo.override { barSupport = true ; };
73+})</programlisting>
74+ <programlisting>mypkg = pkgs.callPackage ./mypkg.nix {
75+ mydep = pkgs.mydep.override { ... };
76+})</programlisting>
77+ </para>
78+79+ <para>
80+ In the first example, <varname>pkgs.foo</varname> is the result of a function call
81+ with some default arguments, usually a derivation.
82+ Using <varname>pkgs.foo.override</varname> will call the same function with
83+ the given new arguments.
84+ </para>
85+86+</section>
87+88+<section xml:id="sec-lib-makeOverridable">
89+ <title>lib.makeOverridable</title>
90+91+ <para>
92+ The function <varname>lib.makeOverridable</varname> is used make the result
93+ of a function easily customizable. This utility only makes sense for functions
94+ that accept an argument set and return an attribute set.
95+ </para>
96+97+ <para>
98+ Example usage:
99+100+ <programlisting>f = { a, b }: { result = a+b; }
101+c = lib.makeOverridable f { a = 1; b = 2; }</programlisting>
102+103+ </para>
104+105+ <para>
106+ The variable <varname>c</varname> is the value of the <varname>f</varname> function
107+ applied with some default arguments. Hence the value of <varname>c.result</varname>
108+ is <literal>3</literal>, in this example.
109+ </para>
110+111+ <para>
112+ The variable <varname>c</varname> however also has some additional functions, like
113+ <link linkend="sec-pkg-override">c.override</link> which can be used to
114+ override the default arguments. In this example the value of
115+ <varname>(c.override { a = 4; }).result</varname> is 6.
116+ </para>
117+118+</section>
119+120</chapter>
···138139 <varlistentry>
140 <term><varname>license</varname></term>
141- <listitem><para>The license for the package. One from the
142- attribute set defined in <link
143- xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
144- <filename>nixpkgs/lib/licenses.nix</filename></link>. Example:
145- <literal>stdenv.lib.licenses.gpl3</literal>. For details, see
146- <xref linkend='sec-meta-license'/>.</para></listitem>
000000000000000000000000000147 </varlistentry>
148149 <varlistentry>
···138139 <varlistentry>
140 <term><varname>license</varname></term>
141+ <listitem>
142+ <para>
143+ The license, or licenses, for the package. One from the attribute set
144+ defined in <link
145+ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix">
146+ <filename>nixpkgs/lib/licenses.nix</filename></link>. At this moment
147+ using both a list of licenses and a single license is valid. If the
148+ license field is in the form of a list representation, then it means
149+ that parts of the package are licensed differently. Each license
150+ should preferably be referenced by their attribute. The non-list
151+ attribute value can also be a space delimited string representation of
152+ the contained attribute shortNames or spdxIds. The following are all valid
153+ examples:
154+ <itemizedlist>
155+ <listitem><para>Single license referenced by attribute (preferred)
156+ <literal>stdenv.lib.licenses.gpl3</literal>.
157+ </para></listitem>
158+ <listitem><para>Single license referenced by its attribute shortName (frowned upon)
159+ <literal>"gpl3"</literal>.
160+ </para></listitem>
161+ <listitem><para>Single license referenced by its attribute spdxId (frowned upon)
162+ <literal>"GPL-3.0"</literal>.
163+ </para></listitem>
164+ <listitem><para>Multiple licenses referenced by attribute (preferred)
165+ <literal>with stdenv.lib.licenses; [ asl20 free ofl ]</literal>.
166+ </para></listitem>
167+ <listitem><para>Multiple licenses referenced as a space delimited string of attribute shortNames (frowned upon)
168+ <literal>"asl20 free ofl"</literal>.
169+ </para></listitem>
170+ </itemizedlist>
171+ For details, see <xref linkend='sec-meta-license'/>.
172+ </para>
173+ </listitem>
174 </varlistentry>
175176 <varlistentry>
···40 DEFAULT boot
4142 LABEL boot
43- MENU LABEL NixOS ${config.system.nixosVersion} Installer
44 LINUX /boot/bzImage
45 APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
46 INITRD /boot/initrd
···189 };
190 description = ''
191 The splash image to use in the bootloader.
000000000000192 '';
193 };
194
···40 DEFAULT boot
4142 LABEL boot
43+ MENU LABEL NixOS ${config.system.nixosVersion}${config.isoImage.appendToMenuLabel}
44 LINUX /boot/bzImage
45 APPEND init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
46 INITRD /boot/initrd
···189 };
190 description = ''
191 The splash image to use in the bootloader.
192+ '';
193+ };
194+195+ isoImage.appendToMenuLabel = mkOption {
196+ default = " Installer";
197+ example = " Live System";
198+ description = ''
199+ The string to append after the menu label for the NixOS system.
200+ This will be directly appended (without whitespace) to the NixOS version
201+ string, like for example if it is set to <literal>XXX</literal>:
202+203+ <para><literal>NixOS 99.99-pre666XXX</literal></para>
204 '';
205 };
206
+2
nixos/modules/misc/ids.nix
···223 nix-serve = 199;
224 tvheadend = 200;
225 uwsgi = 201;
0226227 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
228···424 #nix-serve = 199; #unused
425 #tvheadend = 200; #unused
426 uwsgi = 201;
0427428 # When adding a gid, make sure it doesn't match an existing
429 # uid. Users and groups with the same name should have equal
···223 nix-serve = 199;
224 tvheadend = 200;
225 uwsgi = 201;
226+ gitit = 202;
227228 # When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
229···425 #nix-serve = 199; #unused
426 #tvheadend = 200; #unused
427 uwsgi = 201;
428+ gitit = 202;
429430 # When adding a gid, make sure it doesn't match an existing
431 # uid. Users and groups with the same name should have equal
···21 description = ''
22 Whether to enable GNOME Keyring daemon, a service designed to
23 take care of the user's security credentials,
24- such as user names and passwordsa search engine.
25 '';
26 };
27
···21 description = ''
22 Whether to enable GNOME Keyring daemon, a service designed to
23 take care of the user's security credentials,
24+ such as user names and passwords.
25 '';
26 };
27
···1+{ config, lib, pkgs, ... }:
2+3+with lib;
4+5+let
6+7+ cfg = config.services.gitit;
8+9+ homeDir = "/var/lib/gitit";
10+11+ gititShared = with cfg.haskellPackages; gitit + "/share/" + pkgs.stdenv.system + "-" + ghc.name + "/" + gitit.pname + "-" + gitit.version;
12+13+ gititWithPkgs = hsPkgs: extras: hsPkgs.ghcWithPackages (self: with self; [ gitit ] ++ (extras self));
14+15+ gititSh = hsPkgs: extras: with pkgs; let
16+ env = gititWithPkgs hsPkgs extras;
17+ in writeScript "gitit" ''
18+ #!${stdenv.shell}
19+ cd $HOME
20+ export PATH="${makeSearchPath "bin" (
21+ [ git curl ] ++ (if cfg.pdfExport == "yes" then [texLiveFull] else [])
22+ )}:$PATH";
23+ export NIX_GHC="${env}/bin/ghc"
24+ export NIX_GHCPKG="${env}/bin/ghc-pkg"
25+ export NIX_GHC_DOCDIR="${env}/share/doc/ghc/html"
26+ export NIX_GHC_LIBDIR=$( $NIX_GHC --print-libdir )
27+ ${env}/bin/gitit -f ${configFile}
28+ '';
29+30+ gititOptions = let
31+32+ yesNo = types.enum [ "yes" "no" ];
33+34+ in {
35+36+ enable = mkOption {
37+ type = types.bool;
38+ default = false;
39+ description = "Enable the gitit service.";
40+ };
41+42+ haskellPackages = mkOption {
43+ default = pkgs.haskellPackages;
44+ defaultText = "pkgs.haskellPackages";
45+ example = literalExample "pkgs.haskell.packages.ghc784";
46+ description = "haskellPackages used to build gitit and plugins.";
47+ };
48+49+ extraPackages = mkOption {
50+ default = self: [];
51+ example = literalExample ''
52+ haskellPackages: [
53+ haskellPackages.wreq
54+ ]
55+ '';
56+ description = ''
57+ Extra packages available to ghc when running gitit. The
58+ value must be a function which receives the attrset defined
59+ in <varname>haskellPackages</varname> as the sole argument.
60+ '';
61+ };
62+63+ address = mkOption {
64+ type = types.str;
65+ default = "0.0.0.0";
66+ description = "IP address on which the web server will listen.";
67+ };
68+69+ port = mkOption {
70+ type = types.int;
71+ default = 5001;
72+ description = "Port on which the web server will run.";
73+ };
74+75+ wikiTitle = mkOption {
76+ type = types.str;
77+ default = "Gitit!";
78+ description = "The wiki title.";
79+ };
80+81+ repositoryType = mkOption {
82+ type = types.enum ["git" "darcs" "mercurial"];
83+ default = "git";
84+ description = "Specifies the type of repository used for wiki content.";
85+ };
86+87+ repositoryPath = mkOption {
88+ type = types.path;
89+ default = homeDir + "/wiki";
90+ description = ''
91+ Specifies the path of the repository directory. If it does not
92+ exist, gitit will create it on startup.
93+ '';
94+ };
95+96+ requireAuthentication = mkOption {
97+ type = types.enum [ "none" "modify" "read" ];
98+ default = "modify";
99+ description = ''
100+ If 'none', login is never required, and pages can be edited
101+ anonymously. If 'modify', login is required to modify the wiki
102+ (edit, add, delete pages, upload files). If 'read', login is
103+ required to see any wiki pages.
104+ '';
105+ };
106+107+ authenticationMethod = mkOption {
108+ type = types.enum [ "form" "http" "generic"];
109+ default = "form";
110+ description = ''
111+ 'form' means that users will be logged in and registered using forms
112+ in the gitit web interface. 'http' means that gitit will assume that
113+ HTTP authentication is in place and take the logged in username from
114+ the "Authorization" field of the HTTP request header (in addition,
115+ the login/logout and registration links will be suppressed).
116+ 'generic' means that gitit will assume that some form of
117+ authentication is in place that directly sets REMOTE_USER to the name
118+ of the authenticated user (e.g. mod_auth_cas on apache). 'rpx' means
119+ that gitit will attempt to log in through https://rpxnow.com. This
120+ requires that 'rpx-domain', 'rpx-key', and 'base-url' be set below,
121+ and that 'curl' be in the system path.
122+ '';
123+ };
124+125+ userFile = mkOption {
126+ type = types.path;
127+ default = homeDir + "/gitit-users";
128+ description = ''
129+ Specifies the path of the file containing user login information. If
130+ it does not exist, gitit will create it (with an empty user list).
131+ This file is not used if 'http' is selected for
132+ authentication-method.
133+ '';
134+ };
135+136+ sessionTimeout = mkOption {
137+ type = types.int;
138+ default = 60;
139+ description = ''
140+ Number of minutes of inactivity before a session expires.
141+ '';
142+ };
143+144+ staticDir = mkOption {
145+ type = types.path;
146+ default = gititShared + "/data/static";
147+ description = ''
148+ Specifies the path of the static directory (containing javascript,
149+ css, and images). If it does not exist, gitit will create it and
150+ populate it with required scripts, stylesheets, and images.
151+ '';
152+ };
153+154+ defaultPageType = mkOption {
155+ type = types.enum [ "markdown" "rst" "latex" "html" "markdown+lhs" "rst+lhs" "latex+lhs" ];
156+ default = "markdown";
157+ description = ''
158+ Specifies the type of markup used to interpret pages in the wiki.
159+ Possible values are markdown, rst, latex, html, markdown+lhs,
160+ rst+lhs, and latex+lhs. (the +lhs variants treat the input as
161+ literate Haskell. See pandoc's documentation for more details.) If
162+ Markdown is selected, pandoc's syntax extensions (for footnotes,
163+ delimited code blocks, etc.) will be enabled. Note that pandoc's
164+ restructuredtext parser is not complete, so some pages may not be
165+ rendered correctly if rst is selected. The same goes for latex and
166+ html.
167+ '';
168+ };
169+170+ math = mkOption {
171+ type = types.enum [ "mathml" "raw" "mathjax" "jsmath" "google" ];
172+ default = "mathml";
173+ description = ''
174+ Specifies how LaTeX math is to be displayed. Possible values are
175+ mathml, raw, mathjax, jsmath, and google. If mathml is selected,
176+ gitit will convert LaTeX math to MathML and link in a script,
177+ MathMLinHTML.js, that allows the MathML to be seen in Gecko browsers,
178+ IE + mathplayer, and Opera. In other browsers you may get a jumble of
179+ characters. If raw is selected, the LaTeX math will be displayed as
180+ raw LaTeX math. If mathjax is selected, gitit will link to the
181+ remote mathjax script. If jsMath is selected, gitit will link to the
182+ script /js/jsMath/easy/load.js, and will assume that jsMath has been
183+ installed into the js/jsMath directory. This is the most portable
184+ solution. If google is selected, the google chart API is called to
185+ render the formula as an image. This requires a connection to google,
186+ and might raise a technical or a privacy problem.
187+ '';
188+ };
189+190+ mathJaxScript = mkOption {
191+ type = types.str;
192+ default = "https://d3eoax9i5htok0.cloudfront.net/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
193+ description = ''
194+ Specifies the path to MathJax rendering script. You might want to
195+ use your own MathJax script to render formulas without Internet
196+ connection or if you want to use some special LaTeX packages. Note:
197+ path specified there cannot be an absolute path to a script on your
198+ hdd, instead you should run your (local if you wish) HTTP server
199+ which will serve the MathJax.js script. You can easily (in four lines
200+ of code) serve MathJax.js using
201+ http://happstack.com/docs/crashcourse/FileServing.html Do not forget
202+ the "http://" prefix (e.g. http://localhost:1234/MathJax.js).
203+ '';
204+ };
205+206+ showLhsBirdTracks = mkOption {
207+ type = yesNo;
208+ default = "no";
209+ description = ''
210+ Specifies whether to show Haskell code blocks in "bird style", with
211+ "> " at the beginning of each line.
212+ '';
213+ };
214+215+ templatesDir = mkOption {
216+ type = types.path;
217+ default = gititShared + "/data/templates";
218+ description = ''
219+ Specifies the path of the directory containing page templates. If it
220+ does not exist, gitit will create it with default templates. Users
221+ may wish to edit the templates to customize the appearance of their
222+ wiki. The template files are HStringTemplate templates. Variables to
223+ be interpolated appear between $\'s. Literal $\'s must be
224+ backslash-escaped.
225+ '';
226+ };
227+228+ logFile = mkOption {
229+ type = types.path;
230+ default = homeDir + "/gitit.log";
231+ description = ''
232+ Specifies the path of gitit's log file. If it does not exist, gitit
233+ will create it. The log is in Apache combined log format.
234+ '';
235+ };
236+237+ logLevel = mkOption {
238+ type = types.enum [ "DEBUG" "INFO" "NOTICE" "WARNING" "ERROR" "CRITICAL" "ALERT" "EMERGENCY" ];
239+ default = "ERROR";
240+ description = ''
241+ Determines how much information is logged. Possible values (from
242+ most to least verbose) are DEBUG, INFO, NOTICE, WARNING, ERROR,
243+ CRITICAL, ALERT, EMERGENCY.
244+ '';
245+ };
246+247+ frontPage = mkOption {
248+ type = types.str;
249+ default = "Front Page";
250+ description = ''
251+ Specifies which wiki page is to be used as the wiki's front page.
252+ Gitit creates a default front page on startup, if one does not exist
253+ already.
254+ '';
255+ };
256+257+ noDelete = mkOption {
258+ type = types.str;
259+ default = "Front Page, Help";
260+ description = ''
261+ Specifies pages that cannot be deleted through the web interface.
262+ (They can still be deleted directly using git or darcs.) A
263+ comma-separated list of page names. Leave blank to allow every page
264+ to be deleted.
265+ '';
266+ };
267+268+ noEdit = mkOption {
269+ type = types.str;
270+ default = "Help";
271+ description = ''
272+ Specifies pages that cannot be edited through the web interface.
273+ Leave blank to allow every page to be edited.
274+ '';
275+ };
276+277+ defaultSummary = mkOption {
278+ type = types.str;
279+ default = "";
280+ description = ''
281+ Specifies text to be used in the change description if the author
282+ leaves the "description" field blank. If default-summary is blank
283+ (the default), the author will be required to fill in the description
284+ field.
285+ '';
286+ };
287+288+ tableOfContents = mkOption {
289+ type = yesNo;
290+ default = "yes";
291+ description = ''
292+ Specifies whether to print a tables of contents (with links to
293+ sections) on each wiki page.
294+ '';
295+ };
296+297+ plugins = mkOption {
298+ type = types.path;
299+ default = gititShared + "/plugins/Dot.hs";
300+ description = ''
301+ Specifies a list of plugins to load. Plugins may be specified either
302+ by their path or by their module name. If the plugin name starts
303+ with Gitit.Plugin., gitit will assume that the plugin is an installed
304+ module and will not try to find a source file.
305+ Examples:
306+ plugins: plugins/DotPlugin.hs, CapitalizeEmphasisPlugin.hs
307+ plugins: plugins/DotPlugin
308+ plugins: Gitit.Plugin.InterwikiLinks
309+ '';
310+ };
311+312+ useCache = mkOption {
313+ type = yesNo;
314+ default = "no";
315+ description = ''
316+ Specifies whether to cache rendered pages. Note that if use-feed is
317+ selected, feeds will be cached regardless of the value of use-cache.
318+ '';
319+ };
320+321+ cacheDir = mkOption {
322+ type = types.path;
323+ default = homeDir + "/cache";
324+ description = "Path where rendered pages will be cached.";
325+ };
326+327+ maxUploadSize = mkOption {
328+ type = types.str;
329+ default = "1000K";
330+ description = ''
331+ Specifies an upper limit on the size (in bytes) of files uploaded
332+ through the wiki's web interface. To disable uploads, set this to
333+ 0K. This will result in the uploads link disappearing and the
334+ _upload url becoming inactive.
335+ '';
336+ };
337+338+ maxPageSize = mkOption {
339+ type = types.str;
340+ default = "1000K";
341+ description = "Specifies an upper limit on the size (in bytes) of pages.";
342+ };
343+344+ debugMode = mkOption {
345+ type = yesNo;
346+ default = "no";
347+ description = "Causes debug information to be logged while gitit is running.";
348+ };
349+350+ compressResponses = mkOption {
351+ type = yesNo;
352+ default = "yes";
353+ description = "Specifies whether HTTP responses should be compressed.";
354+ };
355+356+ mimeTypesFile = mkOption {
357+ type = types.path;
358+ default = "/etc/mime/types.info";
359+ description = ''
360+ Specifies the path of a file containing mime type mappings. Each
361+ line of the file should contain two fields, separated by whitespace.
362+ The first field is the mime type, the second is a file extension.
363+ For example:
364+ video/x-ms-wmx wmx
365+ If the file is not found, some simple defaults will be used.
366+ '';
367+ };
368+369+ useReCaptcha = mkOption {
370+ type = yesNo;
371+ default = "no";
372+ description = ''
373+ If "yes", causes gitit to use the reCAPTCHA service
374+ (http://recaptcha.net) to prevent bots from creating accounts.
375+ '';
376+ };
377+378+ reCaptchaPrivateKey = mkOption {
379+ type = with types; nullOr str;
380+ default = null;
381+ description = ''
382+ Specifies the private key for the reCAPTCHA service. To get
383+ these, you need to create an account at http://recaptcha.net.
384+ '';
385+ };
386+387+ reCaptchaPublicKey = mkOption {
388+ type = with types; nullOr str;
389+ default = null;
390+ description = ''
391+ Specifies the public key for the reCAPTCHA service. To get
392+ these, you need to create an account at http://recaptcha.net.
393+ '';
394+ };
395+396+ accessQuestion = mkOption {
397+ type = types.str;
398+ default = "What is the code given to you by Ms. X?";
399+ description = ''
400+ Specifies a question that users must answer when they attempt to
401+ create an account
402+ '';
403+ };
404+405+ accessQuestionAnswers = mkOption {
406+ type = types.str;
407+ default = "RED DOG, red dog";
408+ description = ''
409+ Specifies a question that users must answer when they attempt to
410+ create an account, along with a comma-separated list of acceptable
411+ answers. This can be used to institute a rudimentary password for
412+ signing up as a user on the wiki, or as an alternative to reCAPTCHA.
413+ Example:
414+ access-question: What is the code given to you by Ms. X?
415+ access-question-answers: RED DOG, red dog
416+ '';
417+ };
418+419+ rpxDomain = mkOption {
420+ type = with types; nullOr str;
421+ default = null;
422+ description = ''
423+ Specifies the domain and key of your RPX account. The domain is just
424+ the prefix of the complete RPX domain, so if your full domain is
425+ 'https://foo.rpxnow.com/', use 'foo' as the value of rpx-domain.
426+ '';
427+ };
428+429+ rpxKey = mkOption {
430+ type = with types; nullOr str;
431+ default = null;
432+ description = "RPX account access key.";
433+ };
434+435+ mailCommand = mkOption {
436+ type = types.str;
437+ default = "sendmail %s";
438+ description = ''
439+ Specifies the command to use to send notification emails. '%s' will
440+ be replaced by the destination email address. The body of the
441+ message will be read from stdin. If this field is left blank,
442+ password reset will not be offered.
443+ '';
444+ };
445+446+ resetPasswordMessage = mkOption {
447+ type = types.lines;
448+ default = ''
449+ > From: gitit@$hostname$
450+ > To: $useremail$
451+ > Subject: Wiki password reset
452+ >
453+ > Hello $username$,
454+ >
455+ > To reset your password, please follow the link below:
456+ > http://$hostname$:$port$$resetlink$
457+ >
458+ > Regards
459+ '';
460+ description = ''
461+ Gives the text of the message that will be sent to the user should
462+ she want to reset her password, or change other registration info.
463+ The lines must be indented, and must begin with '>'. The initial
464+ spaces and '> ' will be stripped off. $username$ will be replaced by
465+ the user's username, $useremail$ by her email address, $hostname$ by
466+ the hostname on which the wiki is running (as returned by the
467+ hostname system call), $port$ by the port on which the wiki is
468+ running, and $resetlink$ by the relative path of a reset link derived
469+ from the user's existing hashed password. If your gitit wiki is being
470+ proxied to a location other than the root path of $port$, you should
471+ change the link to reflect this: for example, to
472+ http://$hostname$/path/to/wiki$resetlink$ or
473+ http://gitit.$hostname$$resetlink$
474+ '';
475+ };
476+477+ useFeed = mkOption {
478+ type = yesNo;
479+ default = "no";
480+ description = ''
481+ Specifies whether an ATOM feed should be enabled (for the site and
482+ for individual pages).
483+ '';
484+ };
485+486+ baseUrl = mkOption {
487+ type = with types; nullOr str;
488+ default = null;
489+ description = ''
490+ The base URL of the wiki, to be used in constructing feed IDs and RPX
491+ token_urls. Set this if use-feed is 'yes' or authentication-method
492+ is 'rpx'.
493+ '';
494+ };
495+496+ absoluteUrls = mkOption {
497+ type = yesNo;
498+ default = "no";
499+ description = ''
500+ Make wikilinks absolute with respect to the base-url. So, for
501+ example, in a wiki served at the base URL '/wiki', on a page
502+ Sub/Page, the wikilink '[Cactus]()' will produce a link to
503+ '/wiki/Cactus' if absolute-urls is 'yes', and a relative link to
504+ 'Cactus' (referring to '/wiki/Sub/Cactus') if absolute-urls is 'no'.
505+ '';
506+ };
507+508+ feedDays = mkOption {
509+ type = types.int;
510+ default = 14;
511+ description = "Number of days to be included in feeds.";
512+ };
513+514+ feedRefreshTime = mkOption {
515+ type = types.int;
516+ default = 60;
517+ description = "Number of minutes to cache feeds before refreshing.";
518+ };
519+520+ pdfExport = mkOption {
521+ type = yesNo;
522+ default = "no";
523+ description = ''
524+ If yes, PDF will appear in export options. PDF will be created using
525+ pdflatex, which must be installed and in the path. Note that PDF
526+ exports create significant additional server load.
527+ '';
528+ };
529+530+ pandocUserData = mkOption {
531+ type = with types; nullOr path;
532+ default = null;
533+ description = ''
534+ If a directory is specified, this will be searched for pandoc
535+ customizations. These can include a templates/ directory for custom
536+ templates for various export formats, an S5 directory for custom S5
537+ styles, and a reference.odt for ODT exports. If no directory is
538+ specified, $HOME/.pandoc will be searched. See pandoc's README for
539+ more information.
540+ '';
541+ };
542+543+ xssSanitize = mkOption {
544+ type = yesNo;
545+ default = "yes";
546+ description = ''
547+ If yes, all HTML (including that produced by pandoc) is filtered
548+ through xss-sanitize. Set to no only if you trust all of your users.
549+ '';
550+ };
551+ };
552+553+ configFile = pkgs.writeText "gitit.conf" ''
554+ address: ${cfg.address}
555+ port: ${toString cfg.port}
556+ wiki-title: ${cfg.wikiTitle}
557+ repository-type: ${cfg.repositoryType}
558+ repository-path: ${cfg.repositoryPath}
559+ require-authentication: ${cfg.requireAuthentication}
560+ authentication-method: ${cfg.authenticationMethod}
561+ user-file: ${cfg.userFile}
562+ session-timeout: ${toString cfg.sessionTimeout}
563+ static-dir: ${cfg.staticDir}
564+ default-page-type: ${cfg.defaultPageType}
565+ math: ${cfg.math}
566+ mathjax-script: ${cfg.mathJaxScript}
567+ show-lhs-bird-tracks: ${cfg.showLhsBirdTracks}
568+ templates-dir: ${cfg.templatesDir}
569+ log-file: ${cfg.logFile}
570+ log-level: ${cfg.logLevel}
571+ front-page: ${cfg.frontPage}
572+ no-delete: ${cfg.noDelete}
573+ no-edit: ${cfg.noEdit}
574+ default-summary: ${cfg.defaultSummary}
575+ table-of-contents: ${cfg.tableOfContents}
576+ plugins: ${cfg.plugins}
577+ use-cache: ${cfg.useCache}
578+ cache-dir: ${cfg.cacheDir}
579+ max-upload-size: ${cfg.maxUploadSize}
580+ max-page-size: ${cfg.maxPageSize}
581+ debug-mode: ${cfg.debugMode}
582+ compress-responses: ${cfg.compressResponses}
583+ mime-types-file: ${cfg.mimeTypesFile}
584+ use-recaptcha: ${cfg.useReCaptcha}
585+ recaptcha-private-key: ${toString cfg.reCaptchaPrivateKey}
586+ recaptcha-public-key: ${toString cfg.reCaptchaPublicKey}
587+ access-question: ${cfg.accessQuestion}
588+ access-question-answers: ${cfg.accessQuestionAnswers}
589+ rpx-domain: ${toString cfg.rpxDomain}
590+ rpx-key: ${toString cfg.rpxKey}
591+ mail-command: ${cfg.mailCommand}
592+ reset-password-message: ${cfg.resetPasswordMessage}
593+ use-feed: ${cfg.useFeed}
594+ base-url: ${toString cfg.baseUrl}
595+ absolute-urls: ${cfg.absoluteUrls}
596+ feed-days: ${toString cfg.feedDays}
597+ feed-refresh-time: ${toString cfg.feedRefreshTime}
598+ pdf-export: ${cfg.pdfExport}
599+ pandoc-user-data: ${toString cfg.pandocUserData}
600+ xss-sanitize: ${cfg.xssSanitize}
601+ '';
602+603+in
604+605+{
606+607+ options.services.gitit = gititOptions;
608+609+ config = mkIf cfg.enable {
610+611+ users.extraUsers.gitit = {
612+ group = config.users.extraGroups.gitit.name;
613+ description = "Gitit user";
614+ home = homeDir;
615+ createHome = true;
616+ uid = config.ids.uids.gitit;
617+ };
618+619+ users.extraGroups.gitit.gid = config.ids.gids.gitit;
620+621+ systemd.services.gitit = let
622+ uid = toString config.ids.uids.gitit;
623+ gid = toString config.ids.gids.gitit;
624+ in {
625+ description = "Git and Pandoc Powered Wiki";
626+ after = [ "network.target" ];
627+ wantedBy = [ "multi-user.target" ];
628+629+ preStart = with cfg; ''
630+ chown ${uid}:${gid} -R ${homeDir}
631+ for dir in ${repositoryPath} ${staticDir} ${templatesDir} ${cacheDir}
632+ do
633+ if [ ! -d $dir ]
634+ then
635+ mkdir -p $dir
636+ find $dir -type d -exec chmod 0750 {} +
637+ find $dir -type f -exec chmod 0640 {} +
638+ fi
639+ done
640+ cd ${repositoryPath}
641+ if [ ! -d .git ]
642+ then
643+ ${pkgs.git}/bin/git init
644+ ${pkgs.git}/bin/git config user.email "gitit@${config.networking.hostName}"
645+ ${pkgs.git}/bin/git config user.name "gitit"
646+ chown ${uid}:${gid} -R {repositoryPath}
647+ fi
648+ cd -
649+ '';
650+651+ serviceConfig = {
652+ User = config.users.extraUsers.gitit.name;
653+ Group = config.users.extraGroups.gitit.name;
654+ ExecStart = with cfg; gititSh haskellPackages extraPackages;
655+ };
656+ };
657+ };
658+}
659+
···19 ];
2021 meta = with lib; {
22- description = "A tool to scrape a Prometheus client and dump the result as JSON.";
23 homepage = https://github.com/prometheus/prom2json;
24 license = licenses.asl20;
25 maintainers = with maintainers; [ benley ];
···19 ];
2021 meta = with lib; {
22+ description = "A tool to scrape a Prometheus client and dump the result as JSON";
23 homepage = https://github.com/prometheus/prom2json;
24 license = licenses.asl20;
25 maintainers = with maintainers; [ benley ];
+1-1
pkgs/servers/nosql/eventstore/default.nix
···4748 meta = {
49 homepage = https://geteventstore.com/;
50- description = "Event sourcing database with processing logic in JavaScript.";
51 license = stdenv.lib.licenses.bsd3;
52 maintainers = with stdenv.lib.maintainers; [ puffnfresh ];
53 platforms = with stdenv.lib.platforms; linux;
···4748 meta = {
49 homepage = https://geteventstore.com/;
50+ description = "Event sourcing database with processing logic in JavaScript";
51 license = stdenv.lib.licenses.bsd3;
52 maintainers = with stdenv.lib.maintainers; [ puffnfresh ];
53 platforms = with stdenv.lib.platforms; linux;
···29 doCheck = false; # no check rule
3031 meta = {
32- description = "PGP Tools is a collection for all kinds of pgp related things, including signing scripts, party preparation scripts etc.";
33 homepage = http://pgp-tools.alioth.debian.org;
34 platforms = gnupg.meta.platforms;
35 license = stdenv.lib.licenses.gpl2;
···29 doCheck = false; # no check rule
3031 meta = {
32+ description = "A collection for all kinds of pgp related things, including signing scripts, party preparation scripts etc";
33 homepage = http://pgp-tools.alioth.debian.org;
34 platforms = gnupg.meta.platforms;
35 license = stdenv.lib.licenses.gpl2;
···280 outputFiles = [ "FSharp.AutoComplete/bin/Release/*" ];
281282 meta = {
283- description = "This project provides a command-line interface to the FSharp.Compiler.Service project. It is intended to be used as a backend service for rich editing or 'intellisense' features for editors.";
284- homepage = "https://github.com/fsharp/FSharp.AutoComplete";
00000285 license = stdenv.lib.licenses.asl20;
286 maintainers = with stdenv.lib.maintainers; [ obadz ];
287 platforms = with stdenv.lib.platforms; linux;
···498 dontStrip = true;
499500 meta = {
501- description = "NDesk.Options is a callback-based program option parser for C#.";
502- homepage = "http://www.ndesk.org/Options";
503 license = stdenv.lib.licenses.mit;
504 maintainers = with stdenv.lib.maintainers; [ obadz ];
505 platforms = with stdenv.lib.platforms; linux;
···677 outputFiles = [ "bin/net40/*" ];
678679 meta = {
680- description = "A declarative CLI argument/XML configuration parser for F# applications.";
681- homepage = "http://nessos.github.io/UnionArgParser/";
682 license = stdenv.lib.licenses.mit;
683 maintainers = with stdenv.lib.maintainers; [ obadz ];
684 platforms = with stdenv.lib.platforms; linux;
···280 outputFiles = [ "FSharp.AutoComplete/bin/Release/*" ];
281282 meta = {
283+ description = "An interface to the FSharp.Compiler.Service project";
284+ longDescription = ''
285+ This project provides a command-line interface to the
286+ FSharp.Compiler.Service project. It is intended to be used as a backend
287+ service for rich editing or 'intellisense' features for editors.
288+ '';
289+ homepage = https://github.com/fsharp/FSharp.AutoComplete;
290 license = stdenv.lib.licenses.asl20;
291 maintainers = with stdenv.lib.maintainers; [ obadz ];
292 platforms = with stdenv.lib.platforms; linux;
···503 dontStrip = true;
504505 meta = {
506+ description = "A callback-based program option parser for C#";
507+ homepage = http://www.ndesk.org/Options;
508 license = stdenv.lib.licenses.mit;
509 maintainers = with stdenv.lib.maintainers; [ obadz ];
510 platforms = with stdenv.lib.platforms; linux;
···682 outputFiles = [ "bin/net40/*" ];
683684 meta = {
685+ description = "A declarative CLI argument/XML configuration parser for F# applications";
686+ homepage = http://nessos.github.io/UnionArgParser/;
687 license = stdenv.lib.licenses.mit;
688 maintainers = with stdenv.lib.maintainers; [ obadz ];
689 platforms = with stdenv.lib.platforms; linux;
-74
pkgs/top-level/platforms.nix
···303 #kernelHeadersBaseConfig = "guruplug_defconfig";
304 };
305306- versatileARM = {
307- name = "versatileARM";
308- kernelMajor = "2.6";
309- kernelHeadersBaseConfig = "versatile_defconfig";
310- kernelBaseConfig = "versatile_defconfig";
311- kernelArch = "arm";
312- kernelAutoModules = false;
313- kernelTarget = "zImage";
314- kernelExtraConfig =
315- ''
316- MMC_ARMMMCI y
317- #MMC_SDHCI y
318- SERIO_AMBAKMI y
319-320- AEABI y
321- RTC_CLASS y
322- RTC_DRV_PL031 y
323- PCI y
324- SCSI y
325- SCSI_DMA y
326- SCSI_ATA y
327- BLK_DEV_SD y
328- BLK_DEV_SR y
329- SCSI_SYM53C8XX_2 y
330-331- TMPFS y
332- IPV6 m
333- REISERFS_FS m
334- EXT4_FS m
335-336- IP_PNP y
337- IP_PNP_DHCP y
338- IP_PNP_BOOTP y
339- ROOT_NFS y
340- '';
341- uboot = null;
342- };
343-344- integratorCP = {
345- name = "integratorCP";
346- kernelMajor = "2.6";
347- kernelHeadersBaseConfig = "integrator_defconfig";
348- kernelBaseConfig = "integrator_defconfig";
349- kernelArch = "arm";
350- kernelAutoModules = false;
351- kernelTarget = "zImage";
352- kernelExtraConfig =
353- ''
354- # needed for qemu integrator/cp
355- SERIAL_AMBA_PL011 y
356- SERIAL_AMBA_PL011_CONSOLE y
357- SERIAL_AMBA_PL010 n
358- SERIAL_AMBA_PL010_CONSOLE n
359-360- MMC_ARMMMCI y
361- MMC_SDHCI y
362- SERIO_AMBAKMI y
363-364- CPU_ARM926T y
365- ARCH_INTEGRATOR_CP y
366- VGA_CONSOLE n
367- AEABI y
368- '';
369- uboot = null;
370- ubootConfig = "integratorcp_config";
371- };
372-373- integratorCPuboot = integratorCP // {
374- name = "integratorCPuboot";
375- kernelTarget = "uImage";
376- uboot = "upstream";
377- ubootConfig = "integratorcp_config";
378- };
379-380 fuloong2f_n32 = {
381 name = "fuloong2f_n32";
382 kernelMajor = "2.6";