Template:Editing Template: Difference between revisions

From NixOS Wiki
Layer-09 (talk | contribs)
Created the default template
 
Layer-09 (talk | contribs)
mNo edit summary
Line 1: Line 1:
== Installation ==
== Installation ==
=== Using nix-shell ===
=== Using nix-shell ===
<pre>
{{#tag:pre|
nix-shell -p package_name
nix-shell -p package_name
</pre>
}}


=== System-Wide Installation on NixOS ===
=== System-Wide Installation on NixOS ===
<pre>
{{#tag:pre|
environment.systemPackages = [
environment.systemPackages = [
   pkgs.package_name
   pkgs.package_name
];
];
</pre>
}}
After modifying your configuration, apply the changes by running:
After modifying your configuration, apply the changes by running:
<pre>
{{#tag:pre|
sudo nixos-rebuild switch
sudo nixos-rebuild switch
</pre>
}}


=== User-Specific Installation with Home Manager ===
=== User-Specific Installation with Home Manager ===
<pre>
{{#tag:pre|
home.packages = [  
home.packages = [  
   pkgs.package_name  
   pkgs.package_name  
];
];
</pre>
}}
After updating your configuration, apply the changes by running:
After updating your configuration, apply the changes by running:
<pre>
{{#tag:pre|
home-manager switch
home-manager switch
</pre>
}}


== Configuration ==
== Configuration ==
=== Basic ===
=== Basic ===
<pre>
{{#tag:pre|
programs.package_name = {
programs.package_name = {
     enable = true;
     enable = true;
};
};
</pre>
}}


=== Advanced ===
=== Advanced ===
<pre>
{{#tag:pre|
programs.package_name = {
programs.package_name = {
   enable = true;
   enable = true;
   ...
   ...
};
};
</pre>
}}


== 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 at ....


== Troubleshooting ==
== Troubleshooting ==


== References ==
== References ==

Revision as of 07:05, 21 June 2024

Installation

Using nix-shell

nix-shell -p package_name

System-Wide Installation on NixOS

environment.systemPackages = [
  pkgs.package_name
];

After modifying your configuration, apply the changes by running:

sudo nixos-rebuild switch

User-Specific Installation with Home Manager

home.packages = [ 
  pkgs.package_name 
];

After updating your configuration, apply the changes by running:

home-manager switch

Configuration

Basic

programs.package_name = {
    enable = true;
};

Advanced

programs.package_name = {
  enable = true;
  ...
};

Tips and Tricks

Where to see a list of options?

The home manager options are defined in the following Home Manager Options Manual. The system-wide options are listed on ....

Troubleshooting

References