# How can I use the stable channel and use an option from unstable just for one package?

**URL:** https://discourse.nixos.org/t/how-can-i-use-the-stable-channel-and-use-an-option-from-unstable-just-for-one-package/36079
**Category:** Help
**Created:** [November 27, 2023, 6:58am UTC](https://discourse.nixos.org/t/how-can-i-use-the-stable-channel-and-use-an-option-from-unstable-just-for-one-package/36079 "2023-11-27T06:58:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![phaeseeKe5Ee](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@phaeseeKe5Ee](https://discourse.nixos.org/u/phaeseeKe5Ee)
#### Post date: [November 27, 2023, 6:58am UTC](https://discourse.nixos.org/t/how-can-i-use-the-stable-channel-and-use-an-option-from-unstable-just-for-one-package/36079/1 "2023-11-27T06:58:52Z")

</div>

Hi, I am a beginner of NixOS, using the stable 23.05 channel, installed inside QEMU virtual machine.  
I have been playing with it for just a few days.

I use grub2, and I want to set the `GRUB_TIMEOUT_STYLE=hidden`.  
I noticed that there is a `boot.loader.grub.timeoutStyle` option in the unstable branch which is exactly what I need.

I was expected to install the unstable grub2 following the guide in ( [Installing only a single package from `unstable` - #2 by dalto](https://discourse.nixos.org/t/installing-only-a-single-package-from-unstable/5598/2) ), to add:

```auto
let
  unstable = import <nixos-unstable> {}; };
in {

```

at the beginning of the `configuration.nix` and put `unstable.grub2` in `environment.systemPackages = with pkgs; [];` would work.  
However the `timeoutStyle` option still did not exist.

Is there any way to make it work in 23.05 channel?  
Thanks for your help!

---

<div class="post-metadata">

### Author: ![phaeseeKe5Ee](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@phaeseeKe5Ee](https://discourse.nixos.org/u/phaeseeKe5Ee)
#### Post date: [November 27, 2023, 11:04am UTC](https://discourse.nixos.org/t/how-can-i-use-the-stable-channel-and-use-an-option-from-unstable-just-for-one-package/36079/2 "2023-11-27T11:04:23Z")

</div>

I found out that it be achieved by this:

```auto
disabledModules = [
<nixos/nixos/modules/system/boot/loader/grub/grub.nix>
<nixos/nixos/modules/system/boot/loader/grub/ipxe.nix>
<nixos/nixos/modules/system/boot/loader/grub/memtest.nix>
];
imports = [
<nixos-unstable/nixos/modules/system/boot/loader/grub/grub.nix>
<nixos-unstable/nixos/modules/system/boot/loader/grub/ipxe.nix>
<nixos-unstable/nixos/modules/system/boot/loader/grub/memtest.nix>
];

```

However the result is not what I want, holding SHIFT cannot bring back the grub menu.  
I will figure it out later.

---

<div class="post-metadata">

### Author: ![phaeseeKe5Ee](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@phaeseeKe5Ee](https://discourse.nixos.org/u/phaeseeKe5Ee)
#### Post date: [December 5, 2023, 8:55am UTC](https://discourse.nixos.org/t/how-can-i-use-the-stable-channel-and-use-an-option-from-unstable-just-for-one-package/36079/3 "2023-12-05T08:55:34Z")

</div>

now I use `boot.loader.timeout = 1;` instead.

---

<div class="post-metadata">

### Author: ![mjm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mjm/32/28490_2.png) [@mjm](https://discourse.nixos.org/u/mjm)
#### Post date: [December 5, 2023, 8:05pm UTC](https://discourse.nixos.org/t/how-can-i-use-the-stable-channel-and-use-an-option-from-unstable-just-for-one-package/36079/4 "2023-12-05T20:05:17Z")

</div>

Mixing modules from stable and unstable can be rather risky: the unstable module can depend on changes made in other modules that won’t be present in the stable version. Sometimes you might get lucky and it will still work if things haven’t diverged that much, but you never know.

---

<div class="post-metadata">

### Author: ![phaeseeKe5Ee](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@phaeseeKe5Ee](https://discourse.nixos.org/u/phaeseeKe5Ee)
#### Post date: [December 21, 2023, 6:31pm UTC](https://discourse.nixos.org/t/how-can-i-use-the-stable-channel-and-use-an-option-from-unstable-just-for-one-package/36079/5 "2023-12-21T18:31:58Z")

</div>

Thanks for your advice.  
I tested another unstable module and it breaks exactly for the reason you mentioned 😂
