-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use unfree software declaratively with nixos module? #463
Comments
Try also adding nixpkgs.config = import ./nixpkgs-config.nix; to your configuration. That will supply the configuration into Home Manager. |
Thank you for the quick response! Weird, unfortunately I can't get it to work.
That was also how it was before. Could there be some config I'm missing or entering the wrong way? # Inside `nix repl '<nixpkgs/nixos>'
config.nixpkgs.config.allowUnfree
# Result:
# true
(import config.home-manager.users.some-user.home.file.".config/nixpkgs/config.nix".source).allowUnfree
# Result:
# true
(import config.home-manager.users.root.home.file.".config/nixpkgs/config.nix".source).allowUnfree
# Result:
# true |
Sorry, I wasn't paying close enough attention! The
which hopefully will give the right result. |
OMGYES, it worked! Thanks a lot It seems that I don't even need the |
Glad it worked for you 🙂 Note, you still need the
setting will only apply to packages installed, accessed through the declarative Home Manager configuration. |
For those wondering this is now:
|
Had to add this as well to make it work thanks to Today I learned:
|
I'm trying to describe my entire OS, including the user environments through my configuration file. So I don't want to use
nix-env
orhome-manager switch
to create my user environment.So I have the following configuration:
Running
nixos-rebuild test
, it fails with:Since I already have
nixpkgs.config.allowUnfree = true;
in my nixos configuration, I throught I'd create~/.config/nixpkgs/config.nix
for the user.No luck. Then I added
allowUnfree = true
for the root user (since nixos-rebuild require sudo):Still no luck. Same error message. But then I uncommented
vscode
so that the~/.config/nixpkgs/config.nix
files could be created. And then I ran the code above again.It worked! But needing to rebuild the OS twice feels wrong. So how could I
allowUnfree = true;
so thathome-manager
understands directly?The text was updated successfully, but these errors were encountered: