aboutsummaryrefslogtreecommitdiff
path: root/public/development-environments-with-nix.html
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2023-10-31 08:20:22 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2023-10-31 08:20:22 +0100
commit22f5ac8fcec4dbfcc1f5033f18bc4eeca52a747d (patch)
tree6bdf6daa597c3335739fde4e661b6934f02c5b09 /public/development-environments-with-nix.html
parentd554a5924d63d3e8ef68a8e573d9f266ff80d95e (diff)
downloadmitjafelicijan.com-22f5ac8fcec4dbfcc1f5033f18bc4eeca52a747d.tar.gz
Made the side more retro!
Diffstat (limited to 'public/development-environments-with-nix.html')
-rwxr-xr-xpublic/development-environments-with-nix.html22
1 files changed, 12 insertions, 10 deletions
diff --git a/public/development-environments-with-nix.html b/public/development-environments-with-nix.html
index 207a90a..6c0057b 100755
--- a/public/development-environments-with-nix.html
+++ b/public/development-environments-with-nix.html
@@ -1,9 +1,12 @@
1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=generator content="JBMAFP - github.com/mitjafelicijan/jbmafp"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/Bws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AAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Development environments with Nix</title><meta name=description content="Nix is amazing for making reproducible cross OS development environment."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>body{padding:2.5rem;max-width:1900px;background:#fff;font-family:sans-serif;line-height:1.35rem;font-size:16px}hr{margin-block-start:1.5rem}h1,h2,h3{line-height:initial}h1{font-size:xx-large}footer{margin-block-start:2rem}cap{text-transform:capitalize}table{max-width:100%;border-collapse:separate;border-spacing:2px;border:1px solid #000;border-left:1px solid #999;border-top:1px solid #999}blockquote{font-style:italic}table thead{background:#eee}ul.list li{padding:.2em 0}ul{line-height:1.4em}td,th{border:1px solid #000;padding:4px;border-right:1px solid #999;border-bottom:1px solid #999;text-align:left}pre{text-wrap:nowrap;overflow-x:auto;padding:0 1em;border:1px solid #dcdcdc}code{padding:0 3px;font-size:14px;border:0}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace}figure{margin-inline-start:0;margin-inline-end:0}figcaption{text-align:center}figcaption p{margin:.3em 0 0}img,video,audio{width:800px;max-width:100%}header{display:flex;flex-direction:row;gap:6rem}nav{display:flex;gap:.75rem}nav.main{}.pstatus-orange{background:gold}.pstatus-green{background:#9acd32}.pstatus-red{background:#cd5c5c}@media only screen and (max-width:600px){body{padding:15px}header{flex-direction:column;gap:1rem}a{word-wrap:break-word}}</style><header><nav class=main itemscope itemtype=http://schema.org/SiteNavigationElement role=toolbar><a href=/>Home</a> 1<!doctype html><html lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=generator content="JBMAFP - github.com/mitjafelicijan/jbmafp"><link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAA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4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel=icon type=image/x-icon><title>Development environments with Nix</title><meta name=description content="Nix is amazing for making reproducible cross OS development environment."><link rel=alternate type=application/rss+xml title="Mitja Felicijan's posts" href=https://mitjafelicijan.com/index.xml><link rel=alternate type=application/rss+xml title="Mitja Felicijan's notes" href=https://mitjafelicijan.com/notes.xml><style>:root{--border-color:gainsboro}body{padding:2.5rem;max-width:1900px;background:#fff;font-family:sans-serif;line-height:1.35rem;font-size:16px}hr{margin-block-start:1.5rem}a{color:blue;text-decoration:none}h1,h2,h3{line-height:initial}h1{font-size:xx-large}footer{margin-block-start:2rem}cap{text-transform:capitalize}blockquote{font-style:italic}table{max-width:100%;border:1px solid var(--border-color);border-collapse:separate;border-spacing:0}table thead tr th{border-bottom:1px solid var(--border-color)}table th,table td{padding:.3em .5em}ul.list li{padding:.2em 0}ul{line-height:1.35em}pre{text-wrap:nowrap;overflow-x:auto;padding:0 1em;border:1px solid var(--border-color)}code{padding:0 3px;font-size:14px;border:0}pre code{line-height:1.3em}pre,code,pre *,code *{font-family:monospace}figure{margin-inline-start:0;margin-inline-end:0}figcaption{text-align:center}figcaption p{margin:.3em 0 0}img,video,audio{width:800px;max-width:100%}header nav{display:flex;gap:.9rem}@media only screen and (max-width:600px){body{padding:.5em;word-wrap:break-word}header nav{gap:.7rem}header nav .hob{display:none}a{word-wrap:break-word}}</style><header><nav class=main itemscope itemtype=http://schema.org/SiteNavigationElement role=toolbar><a href=/>Home</a>
2<a href=https://github.com/mitjafelicijan target=_blank>Code</a> 2<a href=/#posts>Posts</a>
3<a href=/#notes>Notes</a>
4<a href=/#sideprojects class=hob>Side Projects</a>
3<a href=/vault.html>Vault</a> 5<a href=/vault.html>Vault</a>
4<a href=/mitjafelicijan.pgp.pub.txt target=_blank>PGP</a> 6<a href=https://github.com/mitjafelicijan target=_blank>Code</a>
7<a href=/mitjafelicijan.pgp.pub.txt target=_blank class=hob>PGP</a>
5<a href=/curriculum-vitae.html>CV</a> 8<a href=/curriculum-vitae.html>CV</a>
6<a href=/index.xml target=_blank>RSS</a></nav></header><main role=main><article itemtype=http://schema.org/Article><h1 itemtype=headline>Development environments with Nix</h1><p><cap>note</cap>, Jun 25, 2023 on <a href=https://mitjafelicijan.com>Mitja Felicijan's blog</a><div><p>Nix is amazing for making reproducible cross OS development environment.<p>First you need to <a href=https://nixos.org/download.html>install Nix package 9<a href=/index.xml target=_blank class=hob>RSS</a></nav></header><main role=main><article itemtype=http://schema.org/Article><h1 itemtype=headline>Development environments with Nix</h1><p><cap>note</cap>, Jun 25, 2023 on <a href=https://mitjafelicijan.com>Mitja Felicijan's blog</a><div><p>Nix is amazing for making reproducible cross OS development environment.<p>First you need to <a href=https://nixos.org/download.html>install Nix package
7manager</a>.<ul><li>Create a file <code>shell.nix</code> in your project folder.<li>In the section that has <code>python3</code> etc add programs you want to use. These can 10manager</a>.<ul><li>Create a file <code>shell.nix</code> in your project folder.<li>In the section that has <code>python3</code> etc add programs you want to use. These can
8be CLI or GUI applications. It doesn't matter to Nix.</ul><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{ pkgs ? <span style=color:#00f>import</span> <span style=color:#a31515>&lt;nixpkgs&gt;</span> {} }: 11be CLI or GUI applications. It doesn't matter to Nix.</ul><pre tabindex=0 style=background-color:#fff><code><span style=display:flex><span>{ pkgs ? <span style=color:#00f>import</span> <span style=color:#a31515>&lt;nixpkgs&gt;</span> {} }:
9</span></span><span style=display:flex><span> pkgs.mkShell { 12</span></span><span style=display:flex><span> pkgs.mkShell {
@@ -33,7 +36,7 @@ usage of Nix shell.<pre tabindex=0 style=background-color:#fff><code><span style
33</span></span><span style=display:flex><span> 36</span></span><span style=display:flex><span>
34</span></span><span style=display:flex><span>export PS1=<span style=color:#a31515>&#34;[\033[38;5;9m\]\u@\h\[</span><span style=color:#00f>$(</span>tput sgr0<span style=color:#00f>)</span><span style=color:#a31515>\]]</span><span style=color:#00f>$(</span>is_inside_nix_shell<span style=color:#00f>)</span><span style=color:#a31515>\[\033[33m\]\$(parse_git_branch)\[\033[00m\] \w\[</span><span style=color:#00f>$(</span>tput sgr0<span style=color:#00f>)</span><span style=color:#a31515>\] \n</span>$<span style=color:#a31515> &#34;</span> 37</span></span><span style=display:flex><span>export PS1=<span style=color:#a31515>&#34;[\033[38;5;9m\]\u@\h\[</span><span style=color:#00f>$(</span>tput sgr0<span style=color:#00f>)</span><span style=color:#a31515>\]]</span><span style=color:#00f>$(</span>is_inside_nix_shell<span style=color:#00f>)</span><span style=color:#a31515>\[\033[33m\]\$(parse_git_branch)\[\033[00m\] \w\[</span><span style=color:#00f>$(</span>tput sgr0<span style=color:#00f>)</span><span style=color:#a31515>\] \n</span>$<span style=color:#a31515> &#34;</span>
35</span></span></code></pre><p>And this is what it looks like when you are in a Nix shell. Otherwise that part 38</span></span></code></pre><p>And this is what it looks like when you are in a Nix shell. Otherwise that part
36of prompt is omitted<figure><img src=/notes/ps1-prompt.png alt="PS1 Prompt"></figure><p>More resources:<ul><li><a href=https://nixos.wiki/wiki/Development_environment_with_nix-shell>https://nixos.wiki/wiki/Development_environment_with_nix-shell</a><li><a href=https://nixos.wiki/wiki/Main_Page>https://nixos.wiki/wiki/Main_Page</a><li><a href=https://itsfoss.com/why-use-nixos/>https://itsfoss.com/why-use-nixos/</a><li><a href=https://mynixos.com/>https://mynixos.com/</a></ul></div></div></main><section><hr><h2>Posts from blogs I follow around the net</h2><ul><li><a href=https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSWhyNotDirectoryToFilesystem target=_blank rel=noopener>One reason that ZFS can't turn a directory into a filesystem</a> — <a href=https://utcc.utoronto.ca/~cks/space/blog/>Chris's Wiki :: blog</a><div>One of the wishes that I and other people frequently have for ZFS 39of prompt is omitted<figure><img src=/notes/ps1-prompt.png alt="PS1 Prompt"></figure><p>More resources:<ul><li><a href=https://nixos.wiki/wiki/Development_environment_with_nix-shell>https://nixos.wiki/wiki/Development_environment_with_nix-shell</a><li><a href=https://nixos.wiki/wiki/Main_Page>https://nixos.wiki/wiki/Main_Page</a><li><a href=https://itsfoss.com/why-use-nixos/>https://itsfoss.com/why-use-nixos/</a><li><a href=https://mynixos.com/>https://mynixos.com/</a></ul></div></article></main><section><hr><h2>Posts from blogs I follow around the net</h2><ul><li><a href=https://utcc.utoronto.ca/~cks/space/blog/solaris/ZFSWhyNotDirectoryToFilesystem target=_blank rel=noopener>One reason that ZFS can't turn a directory into a filesystem</a> — <a href=https://utcc.utoronto.ca/~cks/space/blog/>Chris's Wiki :: blog</a><div>One of the wishes that I and other people frequently have for ZFS
37is the ability to take an existing directory (and everything 40is the ability to take an existing directory (and everything
38underneath it) in a ZFS filesystem and turn it into a sub-filesystem 41underneath it) in a ZFS filesystem and turn it into a sub-filesystem
39of its own. One reason for wanting this is that a number of things 42of its own. One reason for wanting this is that a number of things
@@ -65,8 +68,7 @@ In this article, I describe my goals, which hardware I picked for my new build (
65Design Goals 68Design Goals
66I use my netw…</ul><p>Generated with <a href=https://git.sr.ht/~sircmpwn/openring target=_blank rel=noopener>openring</a>.</section><footer><hr><p><big><strong>Want to comment or have something to add?</strong></big><p>You can write me an email 69I use my netw…</ul><p>Generated with <a href=https://git.sr.ht/~sircmpwn/openring target=_blank rel=noopener>openring</a>.</section><footer><hr><p><big><strong>Want to comment or have something to add?</strong></big><p>You can write me an email
67at <a href=mailto:mitja.felicijan@gmail.com>mitja.felicijan@gmail.com</a> or 70at <a href=mailto:mitja.felicijan@gmail.com>mitja.felicijan@gmail.com</a> or
68catch up with me <a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.<hr><p>This website does not track you. Content is made available under 71catch up with me <a href=https://telegram.me/mitjafelicijan target=_blank>on Telegram</a>.<hr><p>This website does not track you. Content is made available under the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless
69the <a href=https://creativecommons.org/licenses/by/4.0/ target=_blank rel=noreferrer>CC BY 4.0 license</a> unless specified 72specified otherwise. Blog is also available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script>
70otherwise. Blog is also available as <a href=/index.xml target=_blank>RSS feed</a>.</footer><script> 73 window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
71 window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); }; 74 </script><script defer src=/_vercel/insights/script.js></script> \ No newline at end of file
72 </script><script defer src=/_vercel/insights/script.js></script> \ No newline at end of file