Template:Editing Template: Difference between revisions

From NixOS Wiki
Layer-09 (talk | contribs)
mNo edit summary
Layer-09 (talk | contribs)
No edit summary
Line 1: Line 1:
<noinclude>
This template provides installation and configuration instructions for Nix packages.
Usage:
{{EditingTemplate|package_name=your_package_name}}
Parameters:
* package_name: The name of the package to install (required)
</noinclude>
<includeonly>
== Installation ==
== Installation ==
=== Using nix-shell ===
=== Using nix-shell ===
{{#tag:pre|
{{#tag:pre|
nix-shell -p package_name
nix-shell -p {{{package_name}}}
}}
}}
=== System-Wide Installation on NixOS ===
=== System-Wide Installation on NixOS ===
{{#tag:pre|
{{#tag:pre|
environment.systemPackages = [
environment.systemPackages = [
   pkgs.package_name
   pkgs.{{{package_name}}}
];
];
}}
}}
Line 15: Line 24:
sudo nixos-rebuild switch
sudo nixos-rebuild switch
}}
}}
=== User-Specific Installation with Home Manager ===
=== User-Specific Installation with Home Manager ===
{{#tag:pre|
{{#tag:pre|
home.packages = [  
home.packages = [  
   pkgs.package_name  
   pkgs.{{{package_name}}}
];
];
}}
}}
Line 26: Line 34:
home-manager switch
home-manager switch
}}
}}
== Configuration ==
== Configuration ==
=== Basic ===
=== Basic ===
{{#tag:pre|
{{#tag:pre|
programs.package_name = {
programs.{{{package_name}}} = {
     enable = true;
     enable = true;
};
};
}}
}}
=== Advanced ===
=== Advanced ===
{{#tag:pre|
{{#tag:pre|
programs.package_name = {
programs.{{{package_name}}} = {
   enable = true;
   enable = true;
   ...
   ...
};
};
}}
}}
== Tips and Tricks ==
== Tips and Tricks ==
=== Where to see a list of options? ===
=== Where to see a list of options? ===
The home manager options are defined in the following Home Manager Options Manual.
The home manager options are defined in the following Home Manager Options Manual.
The system-wide options are listed on ....
The system-wide options are listed on ....
== Troubleshooting ==
== Troubleshooting ==
== References ==
== References ==
</includeonly>

Revision as of 07:08, 21 June 2024

This template provides installation and configuration instructions for Nix packages.

Usage: Template:EditingTemplate

Parameters:

  • package_name: The name of the package to install (required)