<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>
            
                    nix on
                
            
            The Neo-Babbage Files</title>
        <link>https://babbagefiles.xyz/tags/nix/</link>
        <description>Recent content  in nix
            on The Neo-Babbage Files</description>
        <language>en-gb</language>
        
                <managingEditor>slade@lambda-y.net (Benjamin Slade)</managingEditor>
                <webMaster>slade@lambda-y.net (Benjamin Slade)</webMaster><lastBuildDate>Mon, 29 Dec 2025 11:00:32 +0000</lastBuildDate>
        <generator>Hugo -- gohugo.io</generator>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
            <atom:link href="https://babbagefiles.xyz/tags/nix/index.xml" rel="self" type="application/rss&#43;xml" />
        
            
            <item>
                <title>Guix, Nix: You are in a maze of twisty little $PATHs, some undefined</title>
                <link>https://babbagefiles.xyz/guix-nix-maze-of-twisty-little-paths-undefined/</link>
                
                
                <description>&lt;p&gt;Some notes on interactive fiction/text adventure games and PATHs in
Guix, and StumpWM.&lt;/p&gt;
&lt;h2 id=&#34;maze-no-dot-1&#34;&gt;Maze no. 1&lt;/h2&gt;
&lt;p&gt;There may (likely is) some way of programmatically setting the X
Windows PATH variable in Guix System (née GuixSD) via the base
configuration (e.g. &lt;code&gt;config.scm&lt;/code&gt;), but I haven&amp;rsquo;t been able to uncover
anything that works. This is relevant for being able to use locally
installed static binaries or local shell scripts via the window
manager.&lt;/p&gt;
&lt;p&gt;As a window-manager-specific workaround, in StumpWM, one can
programmatically set PATH variables via &lt;code&gt;(setf (getenv &amp;quot;VARIABLE_NAME&amp;quot;) &amp;quot;variable-value&amp;quot;)&lt;/code&gt;. Thus, if you store local static
binaries and shell scripts in &lt;code&gt;~/bin&lt;/code&gt;, the following (which you could
include in StumpWM&amp;rsquo;s &lt;code&gt;init.lisp&lt;/code&gt;) will add that to your PATH variable:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setf&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;getenv&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;PATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;concat&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;/home/YOURUSERNAME/bin:&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;getenv&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;PATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I use this with a static Haskell binary &lt;a href=&#34;https://github.com/erebe/greenclip&#34;&gt;greenclip&lt;/a&gt;, which adds clipboard
functionality to &lt;a href=&#34;https://github.com/davatorium/rofi/&#34;&gt;rofi&lt;/a&gt;, and with shell scripts that give &amp;ldquo;pretty names&amp;rdquo;
to Flatpak run commands.&lt;/p&gt;
&lt;p&gt;For example, the literate/natural-language-based programming
interactive fiction design language &lt;a href=&#34;http://inform7.com/&#34;&gt;Inform7&lt;/a&gt; (which is due to be
&lt;a href=&#34;http://inform7.com/talks/2019/06/14/narrascope.html&#34;&gt;open-sourced sometime this year&lt;/a&gt;) is now conveniently &lt;a href=&#34;https://flathub.org/apps/details/com.inform7.IDE&#34;&gt;available as a
Flatpak&lt;/a&gt;. But the run command after installing is &lt;code&gt;flatpak run com.inform7.IDE&lt;/code&gt;, which is non-ideal. So I made a simple shell script
named &lt;code&gt;inform7&lt;/code&gt; placed in &lt;code&gt;~/bin&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/sh
&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;flatpak run com.inform7.IDE
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;figure&gt;
    
        &lt;img src=&#34;https://babbagefiles.xyz/ox-hugo/inform7-guix.png&#34;/&gt; &lt;/figure&gt;

&lt;h2 id=&#34;maze-no-dot-2&#34;&gt;Maze no. 2&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://nixos.org/&#34;&gt;Nix&lt;/a&gt; can be &lt;a href=&#34;https://nixos.org/releases/nix/nix-1.9/manual/#ch-installing-binary&#34;&gt;installed as a standalone package manage on top of other
distros&lt;/a&gt;, including Guix System, which is useful for be able to obtain
software currently lacking in Guix System (including, ironically,
&lt;a href=&#34;https://en.wikipedia.org/wiki/Hugo_(software)&#34;&gt;Hugo&lt;/a&gt;, used by this blog, which is present in Nix). Packages available
in Nix but not in Guix include &lt;a href=&#34;http://ccxvii.net/gargoyle/&#34;&gt;Gargoyle&lt;/a&gt;, a very nice interactive
fiction front-end client that supports a number of different backends,
including Frotz and Glulxe. One of the benefits of Gargoyle is that it
&amp;ldquo;cares about typography&amp;rdquo;. However, Nix applications by default seem to
have trouble finding/seeing fonts, including system fonts, local
fonts, and even fonts installed via Nix.&lt;/p&gt;
&lt;p&gt;This can be fixed by (1) setting the &lt;code&gt;FONTCONFIG_PATH&lt;/code&gt; and
&lt;code&gt;FONTCONFIG_FILE&lt;/code&gt;, e.g. in StumpWM this can be done with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setf&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;getenv&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;FONTCONFIG_PATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;/home/YOURUSERNAME/.config/fontconfig/&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setf&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;getenv&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;FONTCONFIG_FILE&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;fonts.conf&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And (2) forcing Nix to look in the right places by manual
specification in &lt;code&gt;~/.config/fontconfig/fonts.conf&lt;/code&gt;, adding right
before the final &lt;code&gt;&amp;lt;/fontconfig&amp;gt;&lt;/code&gt; (as appropriate):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;&amp;lt;cachedir prefix=&amp;quot;xdg&amp;quot;&amp;gt;fontconfig&amp;lt;/cachedir&amp;gt;
&amp;lt;dir&amp;gt;/home/YOURUSERNAME/.local/share/fonts/&amp;lt;/dir&amp;gt;
&amp;lt;dir&amp;gt;/home/YOURUSERNAME/.nix-profile/share/fonts/&amp;lt;/dir&amp;gt;
&amp;lt;dir&amp;gt;/home/YOURUSERNAME/.guix-profile/share/fonts/&amp;lt;/dir&amp;gt;
&amp;lt;dir&amp;gt;/usr/share/fonts&amp;lt;/dir&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And regenerating the font cache (via &lt;code&gt;fc-cache -fv&lt;/code&gt;) [possibly you may
need to install Nix&amp;rsquo;s &lt;code&gt;fontconfig&lt;/code&gt; package].&lt;/p&gt;



&lt;figure&gt;
    
        &lt;img src=&#34;https://babbagefiles.xyz/ox-hugo/counterfeit-gargoyle-screenshot.png&#34;/&gt; &lt;/figure&gt;

</description>
                
                        <author>Benjamin.Slade@fakeEmailToMakeValidatorHappy.com (Benjamin Slade)</author>
                
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/categories/lisp">lisp</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/guix">guix</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/linux">linux</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/stumpwm">stumpwm</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/intfic">intfic</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/fonts">fonts</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/inform">inform</category>
                                
                            
                        
                     
                        
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/tags/nix">nix</category>
                                 
                                    <category domain="https://babbagefiles.xyz/tags/gargoyle">gargoyle</category>
                                
                            
                        
                    
                
                <guid>https://babbagefiles.xyz/guix-nix-maze-of-twisty-little-paths-undefined/</guid>
                <pubDate>Wed, 24 Jul 2019 00:48:00 -0600</pubDate>
            </item>
        
    </channel>
</rss>


