<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title></title>
    <link>http://lewo.abesis.fr/</link>
    <description>Recent content on </description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 29 Mar 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="http://lewo.abesis.fr/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Authenticate your NixOS deployments</title>
      <link>http://lewo.abesis.fr/posts/authenticate-nixos-deployments/</link>
      <pubDate>Sat, 29 Mar 2025 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/posts/authenticate-nixos-deployments/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/nlewo/comin&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;comin&lt;/a&gt; is a pull mode NixOS&#xA;deployment tool: it polls Git repositories and deploys new commits. It&#xA;can now verify these commits are signed, to exclude attacks on the&#xA;remote Git repository.&lt;/p&gt;&#xA;&lt;p&gt;To automate the deployment of your NixOS machines with comin, you only&#xA;need to add 3 lines in your configuration. It is really easy to use&#xA;because you don&amp;rsquo;t need to configure a CICD nor store secrets. However,&#xA;it requires you to trust the remote Git repository. When the Git&#xA;repository is compromised, the attacker controls what is deployed on&#xA;your machines.&lt;/p&gt;</description>
    </item>
    <item>
      <title>NixOS deployment: from push to pull</title>
      <link>http://lewo.abesis.fr/posts/from-push-to-pull-deployment/</link>
      <pubDate>Sat, 24 Feb 2024 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/posts/from-push-to-pull-deployment/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m maintaining several laptops and private servers. All of these&#xA;machines runs NixOS.&lt;/p&gt;&#xA;&lt;p&gt;An advantage of NixOS is that the configuration of all of these&#xA;machines is described in a Git repository. To apply a change to one of&#xA;these machines, I need to:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;modify a file in the repository&lt;/li&gt;&#xA;&lt;li&gt;deploy this change on impacted machines&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;For the last 7 years, I&amp;rsquo;ve been using several tools to deploy these&#xA;configurations and they were mainly based on a push model (the change&#xA;is pushed to machines). The NixOS ecosystem provides a &lt;a href=&#34;https://github.com/nix-community/awesome-nix?tab=readme-ov-file#deployment-tools&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;lot a&#xA;tools&lt;/a&gt;&#xA;to efficiently achieve this. However, it often ended with divergences&#xA;between the configuration committed in the repository and the&#xA;configuration actually deployed on machines (because I forgot to&#xA;commit or deploy on all machines).&lt;/p&gt;</description>
    </item>
    <item>
      <title>A faster dockerTools.buildImage prototype</title>
      <link>http://lewo.abesis.fr/posts/nix-build-container-image/</link>
      <pubDate>Sun, 26 Dec 2021 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/posts/nix-build-container-image/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://nixos.org/manual/nixpkgs/stable/#ssec-pkgs-dockerTools-buildImage&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;&lt;code&gt;dockerTools.buildImage&lt;/code&gt;&lt;/a&gt;&#xA;is the nixpkgs function to create OCI images. From a Nix expression,&#xA;it creates a OCI image archive (which is basically a tar of layers,&#xA;where each layer is a tar&amp;rsquo;ed file tree). Once this OCI image archive&#xA;has been written to the Nix store, it can then be loaded it in the&#xA;Docker deamon or pushed it to a Docker registry. Writing container&#xA;images with the &lt;code&gt;dockerTools.buildImage&lt;/code&gt; function is pretty&#xA;convenient, but it has still several performance issues:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Long-term reproducibility with Nix and Software Heritage</title>
      <link>http://lewo.abesis.fr/posts/nix-and-swh/</link>
      <pubDate>Thu, 18 Jun 2020 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/posts/nix-and-swh/</guid>
      <description></description>
    </item>
    <item>
      <title>Some parts of a Kubernetes CI with the Cue language</title>
      <link>http://lewo.abesis.fr/posts/kubernetes-ci-with-cue/</link>
      <pubDate>Thu, 26 Dec 2019 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/posts/kubernetes-ci-with-cue/</guid>
      <description>&lt;p&gt;tl;dr Some notes on an experiment I did to implement a webhook web&#xA;service for a Kubernetes based CI with a few lines of Cue.&lt;/p&gt;&#xA;&lt;p&gt;A lot of workflows are moving to Kubernetes, and this also includes CI&#xA;systems. In the previous months,&#xA;&lt;a href=&#34;https://github.com/tektoncd/pipeline&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;several&lt;/a&gt;&#xA;&lt;a href=&#34;https://argoproj.github.io/argo-cd/&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;projects&lt;/a&gt; have been created to&#xA;use Kubernetes as a CI engine. Kubernetes is used to run CI jobs, but&#xA;it is also used to implement the CI itself: CI pipelines are&#xA;implemented with &lt;a href=&#34;https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Custom Resources&lt;/a&gt; (CRs) and controllers. CRs allow&#xA;the user to manipulate CI resources through the Kubernetes&#xA;API. Controllers are in charge of translating these resources into&#xA;concrete actions, such as running jobs in a correct order.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to install NixOS on kimsufi</title>
      <link>http://lewo.abesis.fr/posts/install-nixos-on-kimsufi/</link>
      <pubDate>Sun, 01 Dec 2019 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/posts/install-nixos-on-kimsufi/</guid>
      <description>&lt;p&gt;Here are some notes on how to install NixOS 19.09 on a Kimsufi&#xA;dedicated server.&lt;/p&gt;&#xA;&lt;h2 id=&#34;from-the-kimsufi-webmail-interface&#34;&gt;&#xA;  From the kimsufi webmail interface&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#from-the-kimsufi-webmail-interface&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Go to the Kimsufi webui&lt;/li&gt;&#xA;&lt;li&gt;Choose netboot and select the resuce64pro&lt;/li&gt;&#xA;&lt;li&gt;Reboot the server&lt;/li&gt;&#xA;&lt;li&gt;Use the root credentials sent by mail from OVH&lt;/li&gt;&#xA;&lt;li&gt;SSH to the server with above credentials&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;from-the-server-rescue-mode&#34;&gt;&#xA;  From the server rescue mode&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#from-the-server-rescue-mode&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;The following links can be useful:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tekton Pipelines - the Nix way</title>
      <link>http://lewo.abesis.fr/posts/tekton-pipelines-the-nix-way/</link>
      <pubDate>Mon, 30 Sep 2019 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/posts/tekton-pipelines-the-nix-way/</guid>
      <description>&lt;p&gt;In this post, we discuss about a CI/CD pipeline to build and deploy a&#xA;Docker image in Kubernetes with &lt;a href=&#34;https://nixos.org/nix&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Nix&lt;/a&gt; and&#xA;&lt;a href=&#34;https://github.com/tektoncd/pipeline&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Tekton Pipelines&lt;/a&gt;. I&amp;rsquo;m actually&#xA;interested in providing a simple CI/CD to deploy Nix expressions&#xA;(because of Nix composability and reproducibility) in an existing&#xA;Kubernetes cluster.&lt;/p&gt;&#xA;&lt;p&gt;Tekton Pipelines is a CI/CD project providing k8s-style resources for&#xA;declaring CI/CD-style pipelines: the CI/CD is entirely executed in the&#xA;cluster and its configuration data are&#xA;&lt;a href=&#34;https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;custom Kubernetes resources&lt;/a&gt;&#xA;(no need for external databases or volumes).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Openstack on NixOS</title>
      <link>http://lewo.abesis.fr/posts/openstack-on-nixos/</link>
      <pubDate>Tue, 13 Sep 2016 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/posts/openstack-on-nixos/</guid>
      <description>&lt;h1 id=&#34;openstack-liberty-with-linuxbridge-driver&#34;&gt;&#xA;  Openstack Liberty with linuxbridge driver&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#openstack-liberty-with-linuxbridge-driver&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;We deploy with Nixops the following Openstack services: nova, glance,&#xA;keystone and neutron with the linuxbridge driver. Once they are&#xA;deployed, we will boot a VM and ssh to it.&lt;/p&gt;&#xA;&lt;h1 id=&#34;deploy-openstack-services-with-nixops&#34;&gt;&#xA;  Deploy Openstack services with Nixops&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#deploy-openstack-services-with-nixops&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;We consider this &lt;a href=&#34;https://github.com/nlewo/nixpkgs/tree/openstack-blog-post&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;nixpkgs&#xA;branch&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;My &lt;code&gt;openstack.nix&lt;/code&gt; nixops file:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  openstack &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt; config, pkgs, nixpkgs, ... &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  let&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    credentials &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt; keystoneAdminUsername&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;admin&amp;#34;&lt;/span&gt;; keystoneAdminTenant&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;admin&amp;#34;&lt;/span&gt;; keystoneAdminPassword&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;admin&amp;#34;&lt;/span&gt;; &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    osConfig &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      endpointPublic &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; config.networking.privateIPv4;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt; // credentials;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    keystoneConfig &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      enable &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; true;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt; // osConfig;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    otherConfig &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      enableSingleNode &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; true;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt; // osConfig;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  in &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      deployment.targetEnv &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;libvirtd&amp;#34;&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      deployment.libvirtd.memorySize &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; 4096;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      deployment.libvirtd.headless &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; true;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      nixpkgs.config.allowBroken &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; true; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      networking.firewall.enable &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; false;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      environment.systemPackages &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt; pkgs.pythonPackages.neutronclient&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                     pkgs.pythonPackages.keystoneclient&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;&#x9;     pkgs.pythonPackages.glanceclient&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;&#x9;     pkgs.pythonPackages.novaclient&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#x9;&#x9;&#x9;&#x9;   &lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      virtualisation.keystone &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; keystoneConfig;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      virtualisation.glance &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; otherConfig;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      virtualisation.neutron &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; otherConfig;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      virtualisation.nova &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; otherConfig;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then, we deploy it&lt;/p&gt;</description>
    </item>
    <item>
      <title>About</title>
      <link>http://lewo.abesis.fr/about/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/about/</guid>
      <description>about</description>
    </item>
    <item>
      <title>Archives</title>
      <link>http://lewo.abesis.fr/archives/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>http://lewo.abesis.fr/archives/</guid>
      <description>archives</description>
    </item>
  </channel>
</rss>
