<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: BlackBeard</title>
    <description>The latest articles on DEV Community by BlackBeard (@blackbeard173).</description>
    <link>https://dev.to/blackbeard173</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F490026%2Fb97fe6e2-ef2d-4459-a041-7a3428c825ad.jpeg</url>
      <title>DEV Community: BlackBeard</title>
      <link>https://dev.to/blackbeard173</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/blackbeard173"/>
    <language>en</language>
    <item>
      <title>Getting started with Nix Package Manager</title>
      <dc:creator>BlackBeard</dc:creator>
      <pubDate>Tue, 10 Jan 2023 15:30:00 +0000</pubDate>
      <link>https://dev.to/blackbeard173/getting-started-with-nix-package-manger-4b21</link>
      <guid>https://dev.to/blackbeard173/getting-started-with-nix-package-manger-4b21</guid>
      <description>&lt;p&gt;Nix is a standalone package manager from the NixOS family that can be installed on other Linux/Unix OS.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://nixos.org/download.html&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation:
&lt;/h2&gt;

&lt;p&gt;To install nix on WSL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sh &amp;lt;&lt;span class="o"&gt;(&lt;/span&gt;curl &lt;span class="nt"&gt;-L&lt;/span&gt; https://nixos.org/nix/install&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;--no-daemon&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add &lt;code&gt;source $HOME/.nix-profile/etc/profile.d/nix.sh&lt;/code&gt; to your &lt;code&gt;.bashrc&lt;/code&gt; or &lt;code&gt;.zshrc&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Searching a package: &lt;code&gt;nix-env -qa firefox&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;installing a package: &lt;code&gt;nix-env -i firefox&lt;/code&gt; or &lt;code&gt;nix-env -iA nixpkgs.firefox&lt;/code&gt; (works on non-nix OS only)&lt;/li&gt;
&lt;li&gt;List installed packages: &lt;code&gt;nix-env -q&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Uninstall a package: &lt;code&gt;nix-env -e firefox&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Upgrade a package: &lt;code&gt;nix-env -u firefox&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Upgrade all packages: &lt;code&gt;nix-env -u&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Cleanup: &lt;code&gt;nix-collect-garbage -d&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>nix</category>
      <category>linux</category>
      <category>wsl2</category>
    </item>
  </channel>
</rss>
