# Manage Nix packages in GNU Guix

**URL:** <https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066>\
**Category:** Guix\
**Created:** [July 4, 2026, 8:08am UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066 "2026-07-04T08:08:24Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![hako](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/hako/32/1192_2.png) [@hako](https://forum.systemcrafters.net/u/hako)\
**Post date:** [July 4, 2026, 8:08am UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/1 "2026-07-04T08:08:24Z")

</div>

> **[Manage Nix packages in GNU Guix](https://ultrarare.space/en/posts/manage-nix-packages-in-guix/)**
>
> Introducing the mega Nonguix :P

Introducing the mega Nonguix 😈

Here’re minimal configurations for the approach, details are in the post.

Guix System

```scheme
(operating-system
  ...
  (packages
   (with-nix-profile
    (append (list (nix-shell-wrapper "ghostty"
                    '("github:NixOS/nixpkgs/nixos-26.05#ghostty")
                    #:run-command '("ghostty")))
            ...)))
  (services
   (append (list (service nix-service-type)
                 (service nix-search-paths-service-type))
           ...)))

```

Guix Home

```scheme
(home-environment
  ...
  (packages
   (with-nix-profile
    (append (list (nix-shell-wrapper "ghostty"
                    '("github:NixOS/nixpkgs/nixos-26.05#ghostty")
                    #:run-command '("ghostty")))
            ...)))
  (services
   (append (list (service home-nix-search-paths-service-type))
           ...)))

```

---

<div class="post-metadata">

**Author:** ![Folaht](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/folaht/32/1145_2.png) [@Folaht](https://forum.systemcrafters.net/u/Folaht)\
**Post date:** [July 4, 2026, 2:20pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/2 "2026-07-04T14:20:20Z")

</div>

How complicated is this?  
Is this better than using flatpak?

---

<div class="post-metadata">

**Author:** ![hako](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/hako/32/1192_2.png) [@hako](https://forum.systemcrafters.net/u/hako)\
**Post date:** [July 4, 2026, 2:51pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/3 "2026-07-04T14:51:20Z")

</div>

The minimal configurations + know where to search packages and how to specify them as flake output attribute.

If needed, you’ll also apply [extra setups](https://ultrarare.space/en/posts/manage-nix-packages-in-guix/#extra-setup). I’ll keep it updated.

For advanced usage, you’ll need to read docstrings in the source and learn about `nix shell`. And maybe the Nix language as well if you aim for complex usage.

It means yon can install packages declaratively and don’t have to manage the state manually. You can also deploy these package (`guix copy`, `guix pack`, `guix deploy` etc.) to other machines that have Nix set up.

---

<div class="post-metadata">

**Author:** ![Folaht](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/folaht/32/1145_2.png) [@Folaht](https://forum.systemcrafters.net/u/Folaht)\
**Post date:** [July 4, 2026, 5:36pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/4 "2026-07-04T17:36:38Z")

</div>

But would it be better to use than flatpak?  
Too many nonguix options makes packages a chore to maintain.  
I use flatpak mainly in order to have microsoft teams.

---

<div class="post-metadata">

**Author:** ![hako](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/hako/32/1192_2.png) [@hako](https://forum.systemcrafters.net/u/hako)\
**Post date:** [July 5, 2026, 2:50am UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/5 "2026-07-05T02:50:02Z")

</div>

What suits you is the best.

Nix has a large collection of commonly used desktop software. And this approach allows you to declare everything in your config file without manually managing the state.

---

<div class="post-metadata">

**Author:** ![trev](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/trev/32/81_2.png) [@trev](https://forum.systemcrafters.net/u/trev)\
**Post date:** [July 5, 2026, 5:29am UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/6 "2026-07-05T05:29:18Z")

</div>

Will it eventually land in actual nonguix instead of rosenthal?

---

<div class="post-metadata">

**Author:** ![hako](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/hako/32/1192_2.png) [@hako](https://forum.systemcrafters.net/u/hako)\
**Post date:** [July 5, 2026, 12:06pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/7 "2026-07-05T12:06:19Z")

</div>

I think it can go into Guix. But upstreaming is extra work, I consider it finished if it works for me and anyone with interest can upstream it.

---

<div class="post-metadata">

**Author:** ![hako](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/hako/32/1192_2.png) [@hako](https://forum.systemcrafters.net/u/hako)\
**Post date:** [July 6, 2026, 2:08pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/8 "2026-07-06T14:08:02Z")

</div>

That being said, I may upstream it since it’s more complete than my other stuff in terms of documentation. But there’s no guarantee on the time / maintenance if I stop using it.

---

<div class="post-metadata">

**Author:** ![Arcensyl](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/arcensyl/32/1229_2.png) [@Arcensyl](https://forum.systemcrafters.net/u/Arcensyl)\
**Post date:** [July 7, 2026, 2:02am UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/9 "2026-07-07T02:02:17Z")

</div>

Fascinating, nice work on this. I have my own rough solution for managing Nix packages via Guix, but it seems quite different from yours. While yours is built around Nix’s shell command, mine just generates a flake that uses [flakey-profile](https://github.com/lf-/flakey-profile) to expose a profile you can install with the current user. Your system is admittedly much more sophisticated, and I might look at migrating my config to use it instead.

Out of curiosity, when does Nix actually build the packages installed through this? If everything that’s on your PATH is a Nix shell wrapper, does it just do it when you run that script for the first time? When do Nix packages update, and do you have any control over it? My approach has the advantage of using a normal _flake.lock_ file, so you just have to update its inputs like any other flake. Maybe _with-nix-profile_ gives you something like this; I’m not really sure.

Sorry if these are stupid questions, I only have a basic understanding of Nix profiles. I only know about flakes since I ran NixOS for a while before I switched over to Guix.

---

<div class="post-metadata">

**Author:** ![hako](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/hako/32/1192_2.png) [@hako](https://forum.systemcrafters.net/u/hako)\
**Post date:** [July 7, 2026, 2:22am UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/10 "2026-07-07T02:22:54Z")

</div>

> Out of curiosity, when does Nix actually build the packages installed through this?Out of curiosity, when does Nix actually build the packages installed through this?

When using `with-nix-profile`, it collects Nix expressions used by the wrappers and provides a `build-nix-profile` command. ([nix-expressions-\>profile-build-wrapper](https://codeberg.org/hako/Rosenthal/src/commit/3a0838e5e0ac96c5935a5e5e44b73bdfb1b68450/modules/rosenthal/utils/nix.scm#L192))

Then the `nix-search-paths` service extends [Shepherd](https://codeberg.org/hako/Rosenthal/src/commit/3a0838e5e0ac96c5935a5e5e44b73bdfb1b68450/modules/rosenthal/services/nix.scm#L30) to invoke the command on system reconfiguration (one-shot service) and boot (when nix-daemon and networking are ready). The service also extends [shell profiles](https://codeberg.org/hako/Rosenthal/src/commit/3a0838e5e0ac96c5935a5e5e44b73bdfb1b68450/modules/rosenthal/services/nix.scm#L49) to update search paths.

---

<div class="post-metadata">

**Author:** ![Arcensyl](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/arcensyl/32/1229_2.png) [@Arcensyl](https://forum.systemcrafters.net/u/Arcensyl)\
**Post date:** [July 7, 2026, 2:33am UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/11 "2026-07-07T02:33:38Z")

</div>

> [@hako](#):
>
> Then the `nix-search-paths` service extends [Shepherd](https://codeberg.org/hako/Rosenthal/src/commit/3a0838e5e0ac96c5935a5e5e44b73bdfb1b68450/modules/rosenthal/services/nix.scm#L30) to invoke the command on system reconfiguration (one-shot service) and boot (when nix-daemon and networking are ready). The service also extends [shell profiles](https://codeberg.org/hako/Rosenthal/src/commit/3a0838e5e0ac96c5935a5e5e44b73bdfb1b68450/modules/rosenthal/services/nix.scm#L49) to update search paths.

Ah, I see. I saw the documentation about the `build-nix-profile` command, but the missing piece was that it was automatically ran as a Shepherd one-shot service.

Thanks for answering my question. Like I mentioned, I’ll definitely have to think about changing my configuration to use this instead. Being able to install Nix packages as if they were normal Guix ones is a very cool advantage which my system doesn’t really have.

---

<div class="post-metadata">

**Author:** ![emenel](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/emenel/32/1170_2.png) [@emenel](https://forum.systemcrafters.net/u/emenel)\
**Post date:** [July 10, 2026, 4:08pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/12 "2026-07-10T16:08:36Z")

</div>

This is really nice! I’m trying it out, but missing one thing – how do i allow non-free packages from nix? it doesn’t seem to have a way to specify it in the nix service options… i have been using a flake where i can configure nixpkgs, but i’d much rather have it all together like this.

thanks for the amazing work!

---

<div class="post-metadata">

**Author:** ![hako](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/hako/32/1192_2.png) [@hako](https://forum.systemcrafters.net/u/hako)\
**Post date:** [July 16, 2026, 2:57pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/13 "2026-07-16T14:57:03Z")

</div>

> [@emenel](#):
>
> how do i allow non-free packages from nix

I can find documentation in [https://nixos.wiki/wiki/Unfree\_Software](https://nixos.wiki/wiki/Unfree_Software) and I’m copying a few approaches here:

1. Add the following to `~/.config/nixpkgs/config.nix` for the user running Nix wrappers:

```nix
{
  allowUnfree = true;
}

```

1. Set environment variable `NIXPKGS_ALLOW_UNFREE=1` when running Nix wrappers.

---

<div class="post-metadata">

**Author:** ![emenel](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/emenel/32/1170_2.png) [@emenel](https://forum.systemcrafters.net/u/emenel)\
**Post date:** [July 16, 2026, 8:15pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/14 "2026-07-16T20:15:22Z")

</div>

Thanks. I have that config file already, and it seems to work for my existing flake setup but not for this for some reason…

---

<div class="post-metadata">

**Author:** ![emenel](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/emenel/32/1170_2.png) [@emenel](https://forum.systemcrafters.net/u/emenel)\
**Post date:** [July 17, 2026, 4:20pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/15 "2026-07-17T16:20:04Z")

</div>

it looks like for this to work the nix commands must have the --impure flag… but i don’t see how i can make sure that’s added via your nix integration. is there a way to add “–impure”?

---

<div class="post-metadata">

**Author:** ![hako](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/hako/32/1192_2.png) [@hako](https://forum.systemcrafters.net/u/hako)\
**Post date:** [July 21, 2026, 5:55pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/16 "2026-07-21T17:55:45Z")

</div>

`nix-shell-wrapper` has a `options` parameter:

```scheme
(nix-shell-wrapper "ghostty"
  '("github:NixOS/nixpkgs/nixos-26.05#ghostty")
  #:run-command '("ghostty")
  #:options '("--impure"))

```

There’s also more information [in the docstring](https://codeberg.org/hako/Rosenthal/src/commit/63d7c774dc3b4e3c1de785bfcf5935a052bd44b1/modules/rosenthal/utils/nix.scm#L264).

---

<div class="post-metadata">

**Author:** ![emenel](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/emenel/32/1170_2.png) [@emenel](https://forum.systemcrafters.net/u/emenel)\
**Post date:** [July 22, 2026, 3:01pm UTC](https://forum.systemcrafters.net/t/manage-nix-packages-in-gnu-guix/2066/17 "2026-07-22T15:01:33Z")

</div>

ah, i see. ok i’ll give that a try. thank you!
