# How to consume the flake.nix in pijul-nest?

**URL:** <https://discourse.pijul.org/t/how-to-consume-the-flake-nix-in-pijul-nest/1423>\
**Category:** Question\
**Created:** [August 27, 2026, 10:15am UTC](https://discourse.pijul.org/t/how-to-consume-the-flake-nix-in-pijul-nest/1423 "2026-08-27T10:15:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![goodnight](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@goodnight](https://discourse.pijul.org/u/goodnight)\
**Post date:** [August 27, 2026, 10:15am UTC](https://discourse.pijul.org/t/how-to-consume-the-flake-nix-in-pijul-nest/1423/1 "2026-08-27T10:15:36Z")

</div>

I see in [pijul / nest](https://nest.pijul.com/pijul/nest:main/tree/AX7NN2MQXFV32.ZRAUO) that pijul is heavily integrated with nix, and there is a flake.nix with nixosModules declared so I think it is for easy deployment of pijul-nest.

However I do not know how to directly add it as flake inputs as it is a pijul repo, without downloading it in advance.

In the nix manual:

> **[nix flake - Nix 2.35.2 Reference Manual](https://nix.dev/manual/nix/2.35/command-ref/new-cli/nix3-flake.html)**

It support http(s)/ssh with `git` `mercurial` and `tarball`, or `path` for local repo.  
If not download the repo locally and use `path`, I think the most feasible way is use `tarball`.

Is `pijul-nest` provide a tarball URL as the URL of a particular change (commit) or a channel (branch), something like `https://codeberg.org/forgejo/forgejo/archive/forgejo.tar.gz` (download tar.gz of forgejo repo in the “forgejo” branch ) in codeberg?

Just found this discussion… [libfetchers: Add pijul fetcher by nrabulinski · Pull Request #8730 · NixOS/nix · GitHub](https://github.com/NixOS/nix/pull/8730)  
A plugin existed but no more maintenance..

---

<div class="post-metadata">

**Author:** ![pmeunier](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.pijul.org/pmeunier/32/4_2.png) [@pmeunier](https://discourse.pijul.org/u/pmeunier)\
**Post date:** [August 27, 2026, 12:39pm UTC](https://discourse.pijul.org/t/how-to-consume-the-flake-nix-in-pijul-nest/1423/2 "2026-08-27T12:39:57Z")

</div>

Heavily integrated in Nix… [pmeunier / elpe](https://nest.pijul.com/pmeunier/elpe)

Although to answer your question there’s `/archive.tar.gz?state=…`. Here’s how we use it at my company:

```auto
inputs.nest = {
  url = "https://nest.pijul.com/pijul/nest/archive.tar.gz?state=7YIW5DCBSFNQLTAHCEKWR3CC2RCCBWB3II2MPTXOQJA5HINZY5DAC";
  inputs.nixpkgs.follows = "nixpkgs";
  inputs.rust-overlay.follows = "oxalica";
  inputs.attic.follows = "attic";
}

```

(this state is probably really old, take the latest ones they have a number of fixes including security)

And then in the outputs, we include `nest.nixosModules.nest` and `nest.nixosModules.ci`:

```auto
  services.pijul-nest = {
    enable = true;
    path = "/var/blabla/nest";
    domain = "my.domain.com";
    baseUrl = "https://my.domain.com";
    postgres = "postgres://pijul@127.0.0.1/nest?sslmode=disable";
    pbkdf2PasswordFile = config.age.secrets.pbkdf2_password.path;
    pbkdf2SaltFile = config.age.secrets.pbkdf2_salt.path;
    pbkdf2Iterations = 500000;
    smtpPasswordFile = config.age.secrets.smtp_password.path;
    ci = {
      filesystem = "/var/blabla/nest/logs";
      urls = ["http://builder1:5003" "http://builder2:5003"];
    };
    email = {
      server = "my.smtp.com";
      source = "no-reply@domain.com";
      user = "no-reply@domain.com";
    };
    zulip = {
      site = "https://mydomain.zulipchat.com";
      botEmail = "nest-bot@mydomain.zulipchat.com";
      stream = "Nest";
      apiKeyFile = config.age.secrets.zulip-webhook.path;
    };
  };

  services.pijul-ci = {
    enable = true;
    port = 5003;
    nestUrl = "http://my.domain.com";
    ciPath = "/var/blabla/ci";
    atticUrl = "https://attic.domain.com";
    atticCache = "my_cache";
    atticTokenFile = config.age.secrets.attic.path;
  };

```

---

<div class="post-metadata">

**Author:** ![goodnight](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@goodnight](https://discourse.pijul.org/u/goodnight)\
**Post date:** [August 27, 2026, 3:00pm UTC](https://discourse.pijul.org/t/how-to-consume-the-flake-nix-in-pijul-nest/1423/3 "2026-08-27T15:00:12Z")

</div>

Thanks! I really help me to use it on nixos as I am also nixos beginner.  
I said heavily integrated as I saw a lot of .nix file in the repo. not so many people do that.
