Difference between revisions of "NixOS Wiki talk:Contributing"

From NixOS Wiki
Jump to: navigation, search
(Add TODO section for article)
Line 1: Line 1:
 +
== TODOs ==
 +
 +
* Update page with the resolution of [https://github.com/nix-community/wiki/issues/43 <code>nix-community/wiki</code> issue #43: Where to raise questions when it comes to content organization?] --[[User:Toraritte|Toraritte]] ([[User talk:Toraritte|talk]]) 14:40, 2 August 2022 (UTC)
 +
 
== ''NixOS Wiki'' vs. ''NixOS User Wiki'' ==
 
== ''NixOS Wiki'' vs. ''NixOS User Wiki'' ==
  

Revision as of 14:40, 2 August 2022

TODOs

NixOS Wiki vs. NixOS User Wiki

dear wiki people!

it is nice to have consistent terms.

which one is the better one? NixOS Wiki or NixOS User Wiki?

--Vater (talk) 22:16, 18 October 2017 (UTC)

"NixOS Wiki", matches the domain, no confusion with the GitHub Wiki. --Fadenb (talk) 09:38, 19 October 2017 (UTC)

describing templates, especially for shortcuts

hi wiki people,

probably it is good idea to name and describe all the most useful templates. am i right?

btw: maybe Special:Interwiki links are easier to use (for the most users).

--Vater (talk) 15:34, 19 October 2017 (UTC)

I'd also love to see an overview of all our fancy templates. I also always forget if it is note: or notice: :)

Btw, Vater it would be great if you could join IRC: freenode#nixos-wiki , a lot of discussion happens here. --Makefu (talk) 21:01, 19 October 2017 (UTC)

drafty "small" draft for the NixOS Wiki:Contributing#Syntax section

Syntax

Headings

Use the secondary MediaWiki header (== My Section ==) for main sections (the primary header should never be used).

Command (on the command-line)
Please use <syntaxhighlight lang="console">.
Please use one line for every command-line.
Example for single command-line
wiki input wiki output

<syntaxhighlight lang="console">
nixos-rebuild switch
</syntaxhighlight>

nixos-rebuild switch
Nix configuration code (in a file)
Please use <syntaxhighlight lang="nix">
Example for a whole file
wiki input wiki output

<syntaxhighlight lang="nix">
{ config, pkgs, ... }:
{
   imports =
      [
         ./hardware-configuration.nix
      ];
}
</syntaxhighlight>

{ config, pkgs, ... }:
{
  imports =
    [
      ./hardware-configuration.nix
    ];
}
Example for a part of a file
wiki input wiki output

<syntaxhighlight lang="nix"></syntaxhighlight>
<syntaxhighlight lang="nix">
   environment.systemPackages = with pkgs; [
      home-manager
   ];
</syntaxhighlight>
<syntaxhighlight lang="nix"></syntaxhighlight>

  environment.systemPackages = with pkgs; [
    home-manager
  ];
Example for the top of a file
wiki input wiki output

<syntaxhighlight lang="nix">
{ config, pkgs, ... }:
</syntaxhighlight>
<syntaxhighlight lang="nix"></syntaxhighlight>

{ config, pkgs, ... }:
(non Nix Language) code
Please use <syntaxhighlight lang="language">, where language is a supported (lexers) for the mediawikiwiki:Extension:SyntaxHighlight.
Example for an emoty file of C++ code
wiki input wiki output

<syntaxhighlight lang="cpp"> </syntaxhighlight>

Formatting file locations and commands as part of a text
Example
wiki input wiki output

You have to create a directory <code>~/.config/nixpkgs/</code> because the program <code>home-manager</code> expecting a file <code>~/.config/nixpkgs/home.nix</code> there.

You have to create a directory ~/.config/nixpkgs/ because the program home-manager expecting a file ~/.config/nixpkgs/home.nix there.

Notation
  • Use the right capitalization for the Nix ecosystem names:
    NixOS
    Nix
    Nix Language
    Nixpkgs
    NixOps
    Hydra