It looks like there is a fix in version 3.11. https://github.com/NixOS/nixpkgs/pull/149409
I ran a sudo nixos-rebuild switch --upgrade and a home-manager switch, but quickemu did not update. Is it possible to update to 3.11 manually/temporarily?
Hi, I am the maintainer of Quickemu in Nixpkgs, and yes, there has been a fix for that bug since 3.11. I recently bumped it to 3.14 as well. I assume you are using NixOS stable, as 3.14 is in unstable, and 2.2.7 is only in stable. Therefore, you could either fix this by going to unstable, or as follows:
What would be the 'home-manager’y way to do this? I added and updated the channel as you suggested, using sudo. Then, I tried adding this to home.nix:
{ config, pkgs, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
in {
home.packages = with pkgs; [
unstable.quickemu
];
}
but get this error:
❯ home-manager switch
error: attempt to call something which is not a function but a set, at /home/user/.config/nixpkgs/home.nix:5:4
(use '--show-trace' to show detailed location information)
I am on NixOS, and I am using home-manager. I have installed quickemu in home.nix, so I thought I could install unstable.quickemu in home.nix as well.
So I tried your suggestion above, but get the same error. Is it possible to install packages from the unstable channel using home.nix, or do I have to do it in configuration.nix?
Ah, got it. So yeah, home-manager is looking for the channel in your home, but when you run the command with sudo it adds it to root’s home, if that makes sense.
Same advice works though, just run the commands without sudo.
Yes, I kinda understood that, but as I said, I tried your suggestion above (running the nix-channel commands without sudo), and adding the lines to home.nix as I showed above, but I still get the same error as above.
❯ home-manager switch
error: attempt to call something which is not a function but a set, at /home/user/.config/nixpkgs/home.nix:5:4
(use '--show-trace' to show detailed location information)
❯ head ~/.config/nixpkgs/home.nix
{ config, pkgs, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
in {
home.packages = with pkgs; [
unstable.quickemu
];
}
❯ home-manager switch -v
error: while evaluating the attribute 'activationPackage' at /home/user/.nix-defexpr/channels/home-manager/modules/default.nix:54:3:
while evaluating 'showWarnings' at /home/user/.nix-defexpr/channels/home-manager/modules/default.nix:18:18, called from /home/user/.nix-defexpr/channels/home-manager/modules/default.nix:39:12:
while evaluating 'foldr' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/lists.nix:52:20, called from /home/user/.nix-defexpr/channels/home-manager/modules/default.nix:22:7:
while evaluating 'fold'' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/lists.nix:55:15, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/lists.nix:59:8:
while evaluating 'collectFailed' at /home/user/.nix-defexpr/channels/home-manager/modules/default.nix:15:19, called from /home/user/.nix-defexpr/channels/home-manager/modules/default.nix:41:16:
while evaluating the attribute 'config' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:236:9:
while evaluating 'mapAttrsRecursiveCond' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/attrsets.nix:296:36, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:171:28:
while evaluating 'recurse' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/attrsets.nix:298:23, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/attrsets.nix:306:8:
while evaluating the attribute 'matchedOptions' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:487:14:
while evaluating 'flip' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/trivial.nix:138:16, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:455:23:
while evaluating 'byName' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:424:25, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:443:21:
while evaluating 'reverseList' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/lists.nix:393:17, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:163:33:
while evaluating anonymous function at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:313:37, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:159:25:
while evaluating 'filterModules' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:303:36, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:314:7:
while evaluating anonymous function at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:307:31, called from undefined position:
while evaluating 'loadModule' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:249:53, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:290:22:
while evaluating 'unifyModuleSyntax' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:318:34, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:255:14:
while evaluating 'applyIfFunction' at /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:348:29, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:255:59:
while evaluating anonymous function at /home/user/.config/nixpkgs/home.nix:1:1, called from /nix/store/47miqdwqv7jcva048yklidady9pw2l3g-nixos-21.11.336824.ccb90fb9e11/nixos/lib/modules.nix:372:8:
attempt to call something which is not a function but a set, at /home/user/.config/nixpkgs/home.nix:5:4
Oh, it seems to complain similarly if I use configuration.nix instead of home-mananger. I added the unstable channel to root, modified configuration.nix and this is what I got:
❯ sudo nixos-rebuild switch
error: attempt to call something which is not a function but a set, at /etc/nixos/configuration.nix:5:4
(use '--show-trace' to show detailed location information)
building Nix...
error: attempt to call something which is not a function but a set, at /etc/nixos/configuration.nix:5:4
(use '--show-trace' to show detailed location information)
building the system configuration...
error: attempt to call something which is not a function but a set, at /etc/nixos/configuration.nix:5:4
(use '--show-trace' to show detailed location information)
❯ head /etc/nixos/configuration.nix
{ config, pkgs, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
in {
environment.systemPackages = with pkgs; [
unstable.quickemu
];
}
❯ home-manager switch
error: syntax error, unexpected CONCAT, at /home/user/.config/nixpkgs/home.nix:7:3
(use '--show-trace' to show detailed location information)
I tried deleting the second ] and got this:
❯ home-manager switch
error: attempt to call something which is not a function but a set, at /home/user/.config/nixpkgs/home.nix:5:4
(use '--show-trace' to show detailed location information)