-
Notifications
You must be signed in to change notification settings - Fork 5
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
Home-Manager module breaks when not included in the same place as home-manager itself #9
Comments
Hi. Unfortunately the trace is completely useless to me. I have no idea how to parse it. Can you show me the value of the By any chance: Are you overriding the nixpkgs input? Don't do that. |
Sure:
|
sorry for the overbearing config i do have a lot going on
|
It's later referenced globally from the |
I'm extremely sorry, but I don't have the mental capacity to find the issue in either my module or your config. It seems like it should work, but it doesn't. Did you try the oldstable branch? |
I didn't but I can, thanks for the tip. Don't worry about it. I'm just letting you know about it. You don't have to fix it if you don't want to. |
If you can get that to import then I have to do a bit of digging. The old-stable branch isn't really meant to be used by anyone except people who hate breaking changes... Slightly Offtopic: I'm sorry if this sounds rude, but I'm currently very occupied with my job and every day I come back home exhausted. I don't have much free time and I'd rather use it for recreational purposes. I will still try my best to prevent this module from blowing up ... and it seems like it is robust enough when you actually get to import it. |
It's alright, as I said. Keep time for yourself. It's all voluntary work here on GitHub. If you won't fix it I'll find some way else to fix it or abandon it. I hope you're doing well atm. |
I'm doing well, all things considered. Thanks for asking. Lmk if you found out anything! |
I will, thanks |
Nope, it seems that it has the same issue even with the |
Not even the |
Having the same issue: Output
$ home-manager switch -b bak
error:
… while evaluating a branch condition
at /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/lib/lists.nix:57:9:
56| fold' = n:
57| if n == len
| ^
58| then nul
… while calling the 'length' builtin
at /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/lib/lists.nix:55:13:
54| let
55| len = length list;
| ^
56| fold' = n:
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'nixosConfig' missing
at /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/lib/modules.nix:506:28:
505| builtins.addErrorContext (context name)
506| (args.${name} or config._module.args.${name})
| ^
507| ) (lib.functionArgs f); I checked that I could build fine without declarative-flatpak being turned on, so must be this issue? Here is my flakes at the moment: flake
Currently building mainly for laptop: {
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # use nixpkgs-unstable as main nixpkgs source
home-manager = {
url = "github:nix-community/home-manager"; # home-manager unstable url
inputs.nixpkgs.follows = "nixpkgs"; # inherit nixpkgs-unstable as main nixpkgs source
};
flatpaks.url = "github:GermanBread/declarative-flatpak/stable"; # declarative-flatpak, still WIP
nixgl.url = "github:guibou/nixGL"; # nixGL for running Wine
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; # https://github.com/chaotic-cx/nyx#how-to-use-it}
# Add other inputs if needed
};
outputs = { self, nixpkgs, home-manager, flatpaks, nixgl, chaotic }:
let
# System types to support. [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
supportedSystems = [ "x86_64-linux" ];
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
# Nixpkgs instantiated for supported system types.
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in
{
# Standalone home-manager configuration entrypoint
homeConfigurations = {
# declare a "username" or "username@hostname" specific configuration
"fenglengshun@bbh-pc" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit nixgl; }; # so that home-manager can correctly read nixgl packages
modules = [
./home.nix # default home.nix
./default/shell.nix # shell config for all devices
./default/env.nix # env-var for all devices
./default/alias.nix # aliases for all devices
./default/files.nix # file creation for all devices
./default/autostart.nix # autostart with systemctl
./pc/by-device.nix # device specific configs
./pc/autostart.nix # device specific autostart
./pc/flatpak.nix # separate list for flatpak
# ./pc/chaotic.nix # separate list for chaotic.nix package
./pc/nixgl.nix # separate list for nixgl.nix package
flatpaks.homeManagerModules.default # declarative-flatpak HM module
# chaotic.homeManagerModules.default # chaotic nyx HM module
];
};
"fenglengshun@bbh-laptop" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
# extraSpecialArgs = { inherit nixgl; }; # so that home-manager can correctly read nixgl packages
modules = [
./home.nix # default home.nix
./default/shell.nix # shell config for all devices
./default/env.nix # env-var for all devices
./default/alias.nix # aliases for all devices
./default/files.nix # file creation for all devices
./default/autostart.nix # autostart with systemctl
./laptop/by-device.nix # device specific configs
./laptop/autostart.nix # device specific autostart
./laptop/flatpak.nix # separate list for flatpak
flatpaks.homeManagerModules.default # import declarative-flatpak module
];
};
"root" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
modules = [
./root/home.nix # default home.nix
./default/shell.nix # shell config for all devices
];
};
};
};
} flatpak.nix
{ config, pkgs, ... }:
{
services.flatpak = {
remotes = {
"flathub" = "https://dl.flathub.org/repo/flathub.flatpakrepo";
"launcher-moe" = "https://gol.launcher.moe/gol.launcher.moe.flatpakrepo";
};
packages = [
"flathub:com.github.tchx84.Flatseal/x86_64/stable"
"flathub:com.steamgriddb.SGDBoop/x86_64/stable"
"flathub:com.stremio.Stremio/x86_64/stable"
"flathub:com.usebottles.bottles/x86_64/stable"
"flathub:com.wps.Office/x86_64/stable"
"flathub:io.github.Foldex.AdwSteamGtk/x86_64/stable"
"flathub:io.github.aandrew_me.ytdn/x86_64/stable"
"flathub:io.wavebox.Wavebox/x86_64/stable"
"flathub:net.codeindustry.MasterPDFEditor/x86_64/stable"
"flathub:net.cozic.joplin_desktop/x86_64/stable"
"flathub:org.upscayl.Upscayl/x86_64/stable"
"flathub:org.videolan.VLC/x86_64/stable"
"flathub:page.codeberg.Imaginer.Imaginer/x86_64/stable"
"flathub:io.github.Bavarder.Bavarder/x86_64/stable"
"launcher-moe:moe.launcher.the-honkers-railway-launcher/x86_64/master"
"flathub:org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/23.08"
"flathub:com.valvesoftware.Steam.Utility.gamescope/x86_64/stable"
"flathub:org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/23.08"
"flathub:com.obsproject.Studio/x86_64/stable"
"flathub:org.freedesktop.Platform.VulkanLayer.OBSVkCapture/x86_64/23.08"
"flathub:com.obsproject.Studio.Plugin.OBSVkCapture/x86_64/stable"
"flathub:com.obsproject.Studio.Plugin.Gstreamer/x86_64/stable"
"flathub:com.obsproject.Studio.Plugin.GStreamerVaapi/x86_64/stable"
"flathub:com.obsproject.Studio.Plugin.DroidCam/x86_64/stable"
"flathub:com.obsproject.Studio.Plugin.BackgroundRemoval/x86_64/stable"
];
postInitCommand = "/usr/bin/ln -sifv ${config.xdg.configHome}/home-manager/flatpak/overrides ${config.xdg.dataHome}/flatpak/";
};
} Not painfully emergency, for now I could still use the existing flatpak flake I have to just find-and-replace to then install through Kate pipe to Konsole. So take your time, and hope you're doing well. |
Hmm. This should be populated when you use home-manager as a NixOS module. And it should also fall back to null. Weird. Here is the relevant code snippet { config, lib, pkgs, nixosConfig ? null, ... }:
let
cfg = if nixosConfig == null then config.services.flatpak else config.services.flatpak // { enable = nixosConfig.services.flatpak.enable; };
in Oh wait, maybe it needs parentheses. The |
Just in case, here's a link to gist for the lists and modules log files in the Output |
Try using the module now |
Sorry, still the same: Output
❯ nix flake update
warning: updating lock file '/var/home/fenglengshun/.config/home-manager/flake.lock':
• Updated input 'flatpaks':
'github:GermanBread/declarative-flatpak/45765957e396e7a2029122f392bfd1272724e626' (2023-09-25)
→ 'github:GermanBread/declarative-flatpak/ee849b0939a75b0d602b89c3d9fca2919cb009b8' (2023-09-30)
• Updated input 'flatpaks/nixpkgs':
'github:NixOS/nixpkgs/360a7d31c30abefdc490d203f80e3221b7a24af2' (2023-09-15)
→ 'github:NixOS/nixpkgs/5cfafa12d57374f48bcc36fda3274ada276cf69e' (2023-09-27)
warning: Git tree '/var/home/fenglengshun/.config/home-manager' is dirty
❯ kate ./flake.nix
❯ home-manager switch -b bak
error:
… while evaluating a branch condition
at /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/lib/lists.nix:57:9:
56| fold' = n:
57| if n == len
| ^
58| then nul
… while calling the 'length' builtin
at /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/lib/lists.nix:55:13:
54| let
55| len = length list;
| ^
56| fold' = n:
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'nixosConfig' missing
at /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/lib/modules.nix:506:28:
505| builtins.addErrorContext (context name)
506| (args.${name} or config._module.args.${name})
| ^
507| ) (lib.functionArgs f);
❯ sudo nix-channel --update ; nix-channel --update ; nix flake update
[sudo] password for fenglengshun:
unpacking channels...
unpacking channels...
warning: Git tree '/var/home/fenglengshun/.config/home-manager' is dirty
❯ home-manager switch -b bak
error: cached failure of attribute 'homeConfigurations.fenglengshun@bbh-laptop.activationPackage'
❯ home-manager switch
error: cached failure of attribute 'homeConfigurations.fenglengshun@bbh-laptop.activationPackage'
❯ home-manager switch -b bak
error:
… while evaluating a branch condition
at /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/lib/lists.nix:57:9:
56| fold' = n:
57| if n == len
| ^
58| then nul
… while calling the 'length' builtin
at /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/lib/lists.nix:55:13:
54| let
55| len = length list;
| ^
56| fold' = n:
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'nixosConfig' missing
at /nix/store/sd160y3xyy80h9y1kdy7566fnw4pn5f3-source/lib/modules.nix:506:28:
505| builtins.addErrorContext (context name)
506| (args.${name} or config._module.args.${name})
| ^
507| ) (lib.functionArgs f); Please tell me if I'm doing anything wrong, as I'm still a flakes newbie here..... Edit: wait, I should probably switch to Dev branch right? Edit2: nvm, still the same issue on both dev and stable |
@bayazidbh Found out what's going on, turns out it's a bug in Home-Manager (likely). You MUST keep the import where you included your home manager module, ie: { pkgs, flakes, ... }: {
imports = [
flakes.home-manager.nixosModule
];
home-manager.users.nikp123 = {
imports = [
// MUST BE INCLUDED HERE
];
};
} Doing this instead will break the module: home-manager.users.nikp123 = import ./home.nix and in { pkgs, flakes, ... }: {
imports = [
// dont include here
];
} Relevant issue: nix-community/nixvim#83 |
For now I think a warning would suffice, because it seems that home-manager has weird breakages depending on how you write your config. |
Oh that's interesting! Thanks for figuring that out. I assumed that both would work. I guess not. I will fix the documentation when I get back home. |
|
@nikp123 Okay, though I'm not importing the module in home.nix, so I'm not sure what I'm doing wrong here. Testing this on my laptop, here's my flake.nix home.nix and flatpaks-dev.nix files which should be all that's relevant. Output
|
You might have to put the module import at the very beginning |
I'm honestly confused why hm tries to populate the nixosConfig parameter if it's optional... |
@bayazidbh Ookay so I pushed something to dev. Try using that. |
Still failed unfortunately, but it has a different error message now. Here's the output: Details
$ home-manager switch -b bak
error (ignored): error: reached end of FramedSource
error:
… while fetching the input 'path:/var/home/fenglengshun/.config/home-manager'
error: getting status of '/var/home/fenglengshun/.config/home-manager/flake.nix~20231110_172740.kate-bak': No such file or directory
error:
… while evaluating a branch condition
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:57:9:
56| fold' = n:
57| if n == len
| ^
58| then nul
… while calling the 'length' builtin
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:55:13:
54| let
55| len = length list;
| ^
56| fold' = n:
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'enable' missing
at /nix/store/8z4k87gv08gfjsqsw32l52k5i805q4dq-source/src/options.nix:21:15:
20| type = types.bool;
21| default = cfg.enable;
| ^
22| description = mdDoc ''
$ home-manager switch -b bak --show-trace
error:
… from call site
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:39:12:
38|
39| module = showWarnings (
| ^
40| let
… while calling 'showWarnings'
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:18:18:
17|
18| showWarnings = res:
| ^
19| let
… from call site
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:22:7:
21| in
22| fold f res res.config.warnings;
| ^
23|
… while calling 'foldr'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:53:20:
52| */
53| foldr = op: nul: list:
| ^
54| let
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:60:8:
59| else op (elemAt list n) (fold' (n + 1));
60| in fold' 0;
| ^
61|
… while calling 'fold''
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:56:15:
55| len = length list;
56| fold' = n:
| ^
57| if n == len
… from call site
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:41:16:
40| let
41| failed = collectFailed rawModule.config;
| ^
42| failedStr = concatStringsSep "\n" (map (x: "- ${x}") failed);
… while calling 'collectFailed'
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:15:19:
14|
15| collectFailed = cfg:
| ^
16| map (x: x.message) (filter (x: !x.assertion) cfg.assertions);
… while evaluating the error message for definitions for `services.flatpak.flatpak', which is an option that does not exist
… while evaluating a definition from `/nix/store/sn2ydvv8pxb1m476iyw93khiqfnjb24b-source/laptop/flatpaks-dev.nix'
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:272:25:
271| "while evaluating a definition from `${firstDef.file}'"
272| ( showDefs [ firstDef ])
| ^
273| );
… while calling 'showDefs'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/options.nix:427:14:
426|
427| showDefs = defs: concatMapStrings (def:
| ^
428| let
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/options.nix:427:20:
426|
427| showDefs = defs: concatMapStrings (def:
| ^
428| let
… while calling 'concatMapStrings'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/strings.nix:60:25:
59| */
60| concatMapStrings = f: list: concatStrings (map f list);
| ^
61|
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/options.nix:427:38:
426|
427| showDefs = defs: concatMapStrings (def:
| ^
428| let
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/options.nix:431:10:
430| prettyEval = builtins.tryEval
431| (lib.generators.toPretty { }
| ^
432| (lib.generators.withRecursion { depthLimit = 10; throwOnDepthLimit = false; } def.value));
… while calling 'go'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:314:18:
313| let
314| go = indent: v: with builtins;
| ^
315| let isPath = v: typeOf v == "path";
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:543:10:
542| attrs:
543| map (name: f name attrs.${name}) (attrNames attrs);
| ^
544|
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:543:16:
542| attrs:
543| map (name: f name attrs.${name}) (attrNames attrs);
| ^
544|
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:363:22:
362| + libStr.concatStringsSep introSpace (libAttr.mapAttrsToList
363| (name: value:
| ^
364| "${libStr.escapeNixIdentifier name} = ${
… while evaluating an attribute `postInitCommand`
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:366:22:
365| builtins.addErrorContext "while evaluating an attribute `${name}`"
366| (go (indent + " ") value)
| ^
367| };") v)
… while calling 'go'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:314:18:
313| let
314| go = indent: v: with builtins;
| ^
315| let isPath = v: typeOf v == "path";
… while calling 'evalNext'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:289:24:
288| let
289| evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);
| ^
290| in
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:289:27:
288| let
289| evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);
| ^
290| in
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:287:40:
286| else id;
287| mapAny = with builtins; depth: v:
| ^
288| let
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:289:47:
288| let
289| evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);
| ^
290| in
… while calling 'id'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/trivial.nix:14:5:
13| # The value to return
14| x: x;
| ^
15|
… while calling 'g'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:629:19:
628| g =
629| name: value:
| ^
630| if isAttrs value && cond value
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:632:20:
631| then recurse (path ++ [name]) value
632| else f (path ++ [name]) value;
| ^
633| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `xdg.configHome':
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/misc/xdg.nix':
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… while calling 'g'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:629:19:
628| g =
629| name: value:
| ^
630| if isAttrs value && cond value
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:632:20:
631| then recurse (path ++ [name]) value
632| else f (path ++ [name]) value;
| ^
633| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `xdg.enable':
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `<unknown-file>':
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… while calling 'g'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:629:19:
628| g =
629| name: value:
| ^
630| if isAttrs value && cond value
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:632:20:
631| then recurse (path ++ [name]) value
632| else f (path ++ [name]) value;
| ^
633| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `services.flatpak.enableModule':
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:832:19:
831| # Avoid sorting if we don't have to.
832| if any (def: def.value._type or "" == "order") defs''.values
| ^
833| then sortProperties defs''.values
error: attribute 'enable' missing
at /nix/store/8z4k87gv08gfjsqsw32l52k5i805q4dq-source/src/options.nix:21:15:
20| type = types.bool;
21| default = cfg.enable;
| ^
22| description = mdDoc '' Looks like an issue with the
as well as omitting it like in the flatpak stable file. Edit: wait, it's Edit 2: Nope, doesn't work either... I'm starting to feel bad due to how much problem I'm posting here Details
$ home-manager switch -b bak
error:
… while evaluating a branch condition
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:57:9:
56| fold' = n:
57| if n == len
| ^
58| then nul
… while calling the 'length' builtin
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:55:13:
54| let
55| len = length list;
| ^
56| fold' = n:
(stack trace truncated; use '--show-trace' to show the full trace)
error: attribute 'enable' missing
at /nix/store/8z4k87gv08gfjsqsw32l52k5i805q4dq-source/src/options.nix:21:15:
20| type = types.bool;
21| default = cfg.enable;
| ^
22| description = mdDoc ''
$ home-manager switch -b bak --show-trace
error:
… from call site
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:39:12:
38|
39| module = showWarnings (
| ^
40| let
… while calling 'showWarnings'
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:18:18:
17|
18| showWarnings = res:
| ^
19| let
… from call site
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:22:7:
21| in
22| fold f res res.config.warnings;
| ^
23|
… while calling 'foldr'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:53:20:
52| */
53| foldr = op: nul: list:
| ^
54| let
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:60:8:
59| else op (elemAt list n) (fold' (n + 1));
60| in fold' 0;
| ^
61|
… while calling 'fold''
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/lists.nix:56:15:
55| len = length list;
56| fold' = n:
| ^
57| if n == len
… from call site
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:41:16:
40| let
41| failed = collectFailed rawModule.config;
| ^
42| failedStr = concatStringsSep "\n" (map (x: "- ${x}") failed);
… while calling 'collectFailed'
at /nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/default.nix:15:19:
14|
15| collectFailed = cfg:
| ^
16| map (x: x.message) (filter (x: !x.assertion) cfg.assertions);
… while evaluating the error message for definitions for `services.flatpak.flatpak', which is an option that does not exist
… while evaluating a definition from `/nix/store/484lan62v5xmx8346p5w93qsnb7rwg3h-source/laptop/flatpaks-dev.nix'
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:272:25:
271| "while evaluating a definition from `${firstDef.file}'"
272| ( showDefs [ firstDef ])
| ^
273| );
… while calling 'showDefs'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/options.nix:427:14:
426|
427| showDefs = defs: concatMapStrings (def:
| ^
428| let
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/options.nix:427:20:
426|
427| showDefs = defs: concatMapStrings (def:
| ^
428| let
… while calling 'concatMapStrings'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/strings.nix:60:25:
59| */
60| concatMapStrings = f: list: concatStrings (map f list);
| ^
61|
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/options.nix:427:38:
426|
427| showDefs = defs: concatMapStrings (def:
| ^
428| let
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/options.nix:431:10:
430| prettyEval = builtins.tryEval
431| (lib.generators.toPretty { }
| ^
432| (lib.generators.withRecursion { depthLimit = 10; throwOnDepthLimit = false; } def.value));
… while calling 'go'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:314:18:
313| let
314| go = indent: v: with builtins;
| ^
315| let isPath = v: typeOf v == "path";
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:543:10:
542| attrs:
543| map (name: f name attrs.${name}) (attrNames attrs);
| ^
544|
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:543:16:
542| attrs:
543| map (name: f name attrs.${name}) (attrNames attrs);
| ^
544|
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:363:22:
362| + libStr.concatStringsSep introSpace (libAttr.mapAttrsToList
363| (name: value:
| ^
364| "${libStr.escapeNixIdentifier name} = ${
… while evaluating an attribute `postInitCommand`
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:366:22:
365| builtins.addErrorContext "while evaluating an attribute `${name}`"
366| (go (indent + " ") value)
| ^
367| };") v)
… while calling 'go'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:314:18:
313| let
314| go = indent: v: with builtins;
| ^
315| let isPath = v: typeOf v == "path";
… while calling 'evalNext'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:289:24:
288| let
289| evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);
| ^
290| in
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:289:27:
288| let
289| evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);
| ^
290| in
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:287:40:
286| else id;
287| mapAny = with builtins; depth: v:
| ^
288| let
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/generators.nix:289:47:
288| let
289| evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);
| ^
290| in
… while calling 'id'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/trivial.nix:14:5:
13| # The value to return
14| x: x;
| ^
15|
… while calling 'g'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:629:19:
628| g =
629| name: value:
| ^
630| if isAttrs value && cond value
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:632:20:
631| then recurse (path ++ [name]) value
632| else f (path ++ [name]) value;
| ^
633| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `xdg.configHome':
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `/nix/store/nn718rqcsrx9ag8kligmfghdqqh5bick-source/modules/misc/xdg.nix':
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… while calling 'g'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:629:19:
628| g =
629| name: value:
| ^
630| if isAttrs value && cond value
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:632:20:
631| then recurse (path ++ [name]) value
632| else f (path ++ [name]) value;
| ^
633| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `xdg.enable':
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:822:28:
821| # Process mkMerge and mkIf properties.
822| defs' = concatMap (m:
| ^
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
… while evaluating definitions from `<unknown-file>':
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:823:137:
822| defs' = concatMap (m:
823| map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
| ^
824| ) defs;
… while calling 'dischargeProperties'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… while calling 'g'
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:629:19:
628| g =
629| name: value:
| ^
630| if isAttrs value && cond value
… from call site
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/attrsets.nix:632:20:
631| then recurse (path ++ [name]) value
632| else f (path ++ [name]) value;
| ^
633| in mapAttrs g;
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:242:72:
241| # For definitions that have an associated option
242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
| ^
243|
… while evaluating the option `services.flatpak.enableModule':
… while calling anonymous lambda
at /nix/store/mj0hy52z22q5gpsf33akndxiclxd8ray-source/lib/modules.nix:832:19:
831| # Avoid sorting if we don't have to.
832| if any (def: def.value._type or "" == "order") defs''.values
| ^
833| then sortProperties defs''.values
error: attribute 'enable' missing
at /nix/store/8z4k87gv08gfjsqsw32l52k5i805q4dq-source/src/options.nix:21:15:
20| type = types.bool;
21| default = cfg.enable;
| ^
22| description = mdDoc '' |
I tested it on using hm standalone on NixOS and non-NixOS. Both work without |
Compared to your
tests
directory. I have a slightly different setup, but it seems no matter how i change my home-manager or system config it fails to load. I am indeed using flakes.Example:
configuration.nix
And in my
users/nikp123
:and in
home.nix
:log:
I've tried without and with the "just NixOS" module installed. No difference
The text was updated successfully, but these errors were encountered: