MarceColl / zen-browser-flake

Nix Flake for the Zen Browser
95 stars 34 forks source link

Installation instructions are unclear #39

Open Kezkch opened 1 day ago

Kezkch commented 1 day ago

Hello,

Tried adding zen-browser.url = "github:MarceColl/zen-browser-flake"; to my flake and inputs.zen-browser.packages."${system}".default inside the environment.systemPackages expression within my configuration.nix. I kept encountering issues trying to build my system and have tried a number of different things to see I can get it working. Would is it possible that the instructions can be elaborated on in greater detail so that those who are new or otherwise unfamiliar with Nix can easily and conveniently add the entry and build?

Four of the flakes that I have added usually work in the structure shown below. Example-pkg is added as an input then an output with a NixOS module available for adding the derivation inside your environment.systemPackages or on home-manager respectively.

{
  description = "Structure Example";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

       example-pkg = {
        url = "github:example-repo/example-pkg";
        inputs.nixpkgs.follows = "nixpkgs";
       }; 

 outputs = { self, nixpkgs, example-pkg, ... }@inputs:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in
    {

      nixosConfigurations.default = nixpkgs.lib.nixosSystem {
          specialArgs = {inherit inputs;};
          modules = [ 
            ./configuration.nix
            inputs.example-pkg.nixosModules.default
          ];
        };

    };
}

I'm no Nixpert though, so hopefully I don't end up stepping on too many toes. It would just make a lot more sense if an option was made available to specify which version of the browser you wish to use and leave no options as default which in our case would be specific.

ch4og commented 1 day ago

After just importing

inputs.zen-browser = {
    url = "github:MarceColl/zen-browser-flake";
    inputs.nixpkgs.follows = "nixpkgs";
};

You will be able to set

environment.systemPackages = [ inputs.zen-browser.packages."${system}".default];

You don't need any modules to import packages.

Kezkch commented 22 hours ago

After just importing

inputs.zen-browser = {
    url = "github:MarceColl/zen-browser-flake";
    inputs.nixpkgs.follows = "nixpkgs";
};

You will be able to set

environment.systemPackages = [ inputs.zen-browser.packages."${system}".default];

You don't need any modules to import packages.

As I've mentioned previously, following those instructions has resulted in the error below.

building the system configuration...
trace: evaluation warning: The option `services.xserver.xkbVariant' defined in `/nix/store/928ixrd5lyl26wks3psclgk2y4awk2vg-source/configuration.nix' has been renamed to `services.xserver.xkb.variant'.
trace: evaluation warning: The option `services.xserver.layout' defined in `/nix/store/928ixrd5lyl26wks3psclgk2y4awk2vg-source/configuration.nix' has been renamed to `services.xserver.xkb.layout'.
trace: evaluation warning: The option `services.xserver.displayManager.autoLogin' defined in `/nix/store/928ixrd5lyl26wks3psclgk2y4awk2vg-source/configuration.nix' has been renamed to `services.displayManager.autoLogin'.
trace: evaluation warning: The option `hardware.opengl.driSupport32Bit' defined in `/nix/store/928ixrd5lyl26wks3psclgk2y4awk2vg-source/configuration.nix' has been renamed to `hardware.graphics.enable32Bit'.
error:
       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1571:24:

         1570|     let f = attrPath:
         1571|       zipAttrsWith (n: values:
             |                        ^
         1572|         let here = attrPath ++ [n]; in

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1205:18:

         1204|         mapAttrs
         1205|           (name: value:
             |                  ^
         1206|             if isAttrs value && cond value

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1208:18:

         1207|             then recurse (path ++ [ name ]) value
         1208|             else f (path ++ [ name ]) value);
             |                  ^
         1209|     in

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:254:72:

          253|           # For definitions that have an associated option
          254|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          255|

       … while evaluating the option `system.build.toplevel':

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:836:28:

          835|         # Process mkMerge and mkIf properties.
          836|         defs' = concatMap (m:
             |                            ^
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/activation/top-level.nix':

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:837:128:

          836|         defs' = concatMap (m:
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                ^
          838|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:908:25:

          907|   */
          908|   dischargeProperties = def:
             |                         ^
          909|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/activation/top-level.nix:71:12:

           70|   # Replace runtime dependencies
           71|   system = foldr ({ oldDependency, newDependency }: drv:
             |            ^
           72|       pkgs.replaceDependency { inherit oldDependency newDependency drv; }

       … while calling 'foldr'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:121:20:

          120|   */
          121|   foldr = op: nul: list:
             |                    ^
          122|     let

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:128:8:

          127|         else op (elemAt list n) (fold' (n + 1));
          128|     in fold' 0;
             |        ^
          129|

       … while calling 'fold''

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:124:15:

          123|       len = length list;
          124|       fold' = n:
             |               ^
          125|         if n == len

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/activation/top-level.nix:68:10:

           67|     then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"
           68|     else showWarnings config.warnings baseSystem;
             |          ^
           69|

       … while calling 'showWarnings'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:28:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                            ^
          930|

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:33:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                 ^
          930|

       … while calling 'foldr'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:121:20:

          120|   */
          121|   foldr = op: nul: list:
             |                    ^
          122|     let

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:128:8:

          127|         else op (elemAt list n) (fold' (n + 1));
          128|     in fold' 0;
             |        ^
          129|

       … while calling 'fold''

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:124:15:

          123|       len = length list;
          124|       fold' = n:
             |               ^
          125|         if n == len

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:127:14:

          126|         then nul
          127|         else op (elemAt list n) (fold' (n + 1));
             |              ^
          128|     in fold' 0;

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:47:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                               ^
          930|

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:50:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                                  ^
          930|

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:755:14:

          754|         # Do not eta reduce v, so that we have the same strictness as `builtins.warn`.
          755|         msg: v:
             |              ^
          756|           # `builtins.warn` requires a string message, so we enforce that in our implementation, so that callers aren't accidentally incompatible with newer Nix versions.

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:127:34:

          126|         then nul
          127|         else op (elemAt list n) (fold' (n + 1));
             |                                  ^
          128|     in fold' 0;

       … while calling 'fold''

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:124:15:

          123|       len = length list;
          124|       fold' = n:
             |               ^
          125|         if n == len

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:127:14:

          126|         then nul
          127|         else op (elemAt list n) (fold' (n + 1));
             |              ^
          128|     in fold' 0;

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:47:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                               ^
          930|

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:50:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                                  ^
          930|

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:755:14:

          754|         # Do not eta reduce v, so that we have the same strictness as `builtins.warn`.
          755|         msg: v:
             |              ^
          756|           # `builtins.warn` requires a string message, so we enforce that in our implementation, so that callers aren't accidentally incompatible with newer Nix versions.

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:127:34:

          126|         then nul
          127|         else op (elemAt list n) (fold' (n + 1));
             |                                  ^
          128|     in fold' 0;

       … while calling 'fold''

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:124:15:

          123|       len = length list;
          124|       fold' = n:
             |               ^
          125|         if n == len

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:127:14:

          126|         then nul
          127|         else op (elemAt list n) (fold' (n + 1));
             |              ^
          128|     in fold' 0;

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:47:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                               ^
          930|

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:50:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                                  ^
          930|

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:755:14:

          754|         # Do not eta reduce v, so that we have the same strictness as `builtins.warn`.
          755|         msg: v:
             |              ^
          756|           # `builtins.warn` requires a string message, so we enforce that in our implementation, so that callers aren't accidentally incompatible with newer Nix versions.

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:127:34:

          126|         then nul
          127|         else op (elemAt list n) (fold' (n + 1));
             |                                  ^
          128|     in fold' 0;

       … while calling 'fold''

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:124:15:

          123|       len = length list;
          124|       fold' = n:
             |               ^
          125|         if n == len

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:127:14:

          126|         then nul
          127|         else op (elemAt list n) (fold' (n + 1));
             |              ^
          128|     in fold' 0;

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:47:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                               ^
          930|

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:929:50:

          928|
          929|   showWarnings = warnings: res: lib.foldr (w: x: warn w x) res warnings;
             |                                                  ^
          930|

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:755:14:

          754|         # Do not eta reduce v, so that we have the same strictness as `builtins.warn`.
          755|         msg: v:
             |              ^
          756|           # `builtins.warn` requires a string message, so we enforce that in our implementation, so that callers aren't accidentally incompatible with newer Nix versions.

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:127:34:

          126|         then nul
          127|         else op (elemAt list n) (fold' (n + 1));
             |                                  ^
          128|     in fold' 0;

       … while calling 'fold''

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:124:15:

          123|       len = length list;
          124|       fold' = n:
             |               ^
          125|         if n == len

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/activation/top-level.nix:48:16:

           47|   # makes it bootable. See `activatable-system.nix`.
           48|   baseSystem = pkgs.stdenvNoCC.mkDerivation ({
             |                ^
           49|     name = "nixos-system-${config.system.name}-${config.system.nixos.label}";

       … while calling 'mkDerivation'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/pkgs/stdenv/generic/make-derivation.nix:46:5:

           45|   mkDerivation =
           46|     fnOrAttrs:
             |     ^
           47|       if builtins.isFunction fnOrAttrs

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1205:18:

         1204|         mapAttrs
         1205|           (name: value:
             |                  ^
         1206|             if isAttrs value && cond value

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1208:18:

         1207|             then recurse (path ++ [ name ]) value
         1208|             else f (path ++ [ name ]) value);
             |                  ^
         1209|     in

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:254:72:

          253|           # For definitions that have an associated option
          254|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          255|

       … while evaluating the option `system.systemBuilderArgs':

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:858:59:

          857|       if isDefined then
          858|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                                                           ^
          859|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while calling 'merge'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:582:20:

          581|       check = isAttrs;
          582|       merge = loc: defs:
             |                    ^
          583|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:583:35:

          582|       merge = loc: defs:
          583|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
             |                                   ^
          584|             (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue

       … while calling 'filterAttrs'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:646:5:

          645|     pred:
          646|     set:
             |     ^
          647|     listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:647:29:

          646|     set:
          647|     listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
             |                             ^
          648|

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:647:62:

          646|     set:
          647|     listToAttrs (concatMap (name: let v = set.${name}; in if pred name v then [(nameValuePair name v)] else []) (attrNames set));
             |                                                              ^
          648|

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:583:51:

          582|       merge = loc: defs:
          583|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
             |                                                   ^
          584|             (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:583:86:

          582|       merge = loc: defs:
          583|         mapAttrs (n: v: v.value) (filterAttrs (n: v: v ? value) (zipAttrsWith (name: defs:
             |                                                                                      ^
          584|             (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:836:28:

          835|         # Process mkMerge and mkIf properties.
          836|         defs' = concatMap (m:
             |                            ^
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/activation/activatable-system.nix':

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:837:128:

          836|         defs' = concatMap (m:
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                ^
          838|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:908:25:

          907|   */
          908|   dischargeProperties = def:
             |                         ^
          909|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/activation/activation-script.nix:135:18:

          134|       apply = set: set // {
          135|         script = systemActivationScript set false;
             |                  ^
          136|       };

       … while calling 'systemActivationScript'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/activation/activation-script.nix:20:33:

           19|
           20|   systemActivationScript = set: onlyDry: let
             |                                 ^
           21|     set' = mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set;

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/activation/activation-script.nix:51:9:

           50|
           51|       ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
             |         ^
           52|

       … while calling 'textClosureMap'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/strings-with-deps.nix:75:35:

           74|
           75|   textClosureMap = f: predefined: names:
             |                                   ^
           76|     concatStringsSep "\n" (map f (textClosureList predefined names));

       … while calling 'id'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/trivial.nix:39:8:

           38|   */
           39|   id = x: x;
             |        ^
           40|

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1205:18:

         1204|         mapAttrs
         1205|           (name: value:
             |                  ^
         1206|             if isAttrs value && cond value

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1208:18:

         1207|             then recurse (path ++ [ name ]) value
         1208|             else f (path ++ [ name ]) value);
             |                  ^
         1209|     in

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:254:72:

          253|           # For definitions that have an associated option
          254|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          255|

       … while evaluating the option `system.activationScripts.etc.text':

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:836:28:

          835|         # Process mkMerge and mkIf properties.
          836|         defs' = concatMap (m:
             |                            ^
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/etc/etc-activation.nix':

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:837:128:

          836|         defs' = concatMap (m:
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                ^
          838|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:908:25:

          907|   */
          908|   dischargeProperties = def:
             |                         ^
          909|     if def._type or "" == "merge" then

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1571:24:

         1570|     let f = attrPath:
         1571|       zipAttrsWith (n: values:
             |                        ^
         1572|         let here = attrPath ++ [n]; in

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:607:29:

          606|       merge = loc: defs:
          607|         zipAttrsWith (name: defs:
             |                             ^
          608|           let merged = mergeDefinitions (loc ++ [name]) elemType defs;

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:836:28:

          835|         # Process mkMerge and mkIf properties.
          836|         defs' = concatMap (m:
             |                            ^
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/etc/etc.nix':

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:837:128:

          836|         defs' = concatMap (m:
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                ^
          838|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:908:25:

          907|   */
          908|   dischargeProperties = def:
             |                         ^
          909|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:273:39:

          272|         then value
          273|         else { ${elemAt attrPath n} = atDepth (n + 1); };
             |                                       ^
          274|     in atDepth 0;

       … while calling 'atDepth'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:270:17:

          269|       len = length attrPath;
          270|       atDepth = n:
             |                 ^
          271|         if n == len

       … while evaluating derivation 'etc'
         whose name attribute is located at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'buildCommand' of derivation 'etc'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/pkgs/build-support/trivial-builders/default.nix:59:16:

           58|         enableParallelBuilding = true;
           59|         inherit buildCommand name;
             |                ^
           60|         passAsFile = [ "buildCommand" ]

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/etc/etc.nix:50:7:

           49|     mkdir -p "$out/etc"
           50|     ${lib.concatMapStringsSep "\n" (etcEntry: lib.escapeShellArgs [
             |       ^
           51|       "makeEtcEntry"

       … while calling 'concatMapStringsSep'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/strings.nix:232:5:

          231|     f:
          232|     list: concatStringsSep sep (map f list);
             |     ^
          233|

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/etc/etc.nix:50:37:

           49|     mkdir -p "$out/etc"
           50|     ${lib.concatMapStringsSep "\n" (etcEntry: lib.escapeShellArgs [
             |                                     ^
           51|       "makeEtcEntry"

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/nixos/modules/system/etc/etc.nix:50:47:

           49|     mkdir -p "$out/etc"
           50|     ${lib.concatMapStringsSep "\n" (etcEntry: lib.escapeShellArgs [
             |                                               ^
           51|       "makeEtcEntry"

       … while calling 'concatMapStringsSep'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/strings.nix:232:5:

          231|     f:
          232|     list: concatStringsSep sep (map f list);
             |     ^
          233|

       … while calling 'escapeShellArg'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/strings.nix:1056:20:

         1055|   */
         1056|   escapeShellArg = arg:
             |                    ^
         1057|     let

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1205:18:

         1204|         mapAttrs
         1205|           (name: value:
             |                  ^
         1206|             if isAttrs value && cond value

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1208:18:

         1207|             then recurse (path ++ [ name ]) value
         1208|             else f (path ++ [ name ]) value);
             |                  ^
         1209|     in

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:254:72:

          253|           # For definitions that have an associated option
          254|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          255|

       … while evaluating the option `environment.etc.dbus-1.source':

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:858:17:

          857|       if isDefined then
          858|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                 ^
          859|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:858:22:

          857|       if isDefined then
          858|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                      ^
          859|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while calling 'check'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:534:15:

          533|       descriptionClass = "noun";
          534|       check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
             |               ^
          535|       merge = mergeEqualOption;

       … while evaluating derivation 'dbus-1'
         whose name attribute is located at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'serviceDirectories' of derivation 'dbus-1'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/pkgs/development/libraries/dbus/make-dbus-conf.nix:17:12:

           16|   {
           17|     inherit serviceDirectories suidHelper apparmor;
             |            ^
           18|     preferLocalBuild = true;

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:552:14:

          551|       merge = loc: defs:
          552|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
             |              ^
          553|           imap1 (m: def':

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:858:17:

          857|       if isDefined then
          858|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                 ^
          859|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:858:22:

          857|       if isDefined then
          858|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                      ^
          859|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while calling 'check'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:534:15:

          533|       descriptionClass = "noun";
          534|       check = x: isStringLike x && builtins.substring 0 1 (toString x) == "/";
             |               ^
          535|       merge = mergeEqualOption;

       … while evaluating derivation 'system-path'
         whose name attribute is located at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'passAsFile' of derivation 'system-path'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/pkgs/build-support/trivial-builders/default.nix:60:9:

           59|         inherit buildCommand name;
           60|         passAsFile = [ "buildCommand" ]
             |         ^
           61|           ++ (derivationArgs.passAsFile or [ ]);

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1205:18:

         1204|         mapAttrs
         1205|           (name: value:
             |                  ^
         1206|             if isAttrs value && cond value

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/attrsets.nix:1208:18:

         1207|             then recurse (path ++ [ name ]) value
         1208|             else f (path ++ [ name ]) value);
             |                  ^
         1209|     in

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:254:72:

          253|           # For definitions that have an associated option
          254|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          255|

       … while evaluating the option `environment.systemPackages':

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:858:59:

          857|       if isDefined then
          858|         if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
             |                                                           ^
          859|         else let allInvalid = filter (def: ! type.check def.value) defsFinal;

       … while calling 'merge'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:551:20:

          550|       check = isList;
          551|       merge = loc: defs:
             |                    ^
          552|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:552:35:

          551|       merge = loc: defs:
          552|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
             |                                   ^
          553|           imap1 (m: def':

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:334:29:

          333|   */
          334|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                             ^
          335|

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/lists.nix:334:32:

          333|   */
          334|   imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
             |                                ^
          335|

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/types.nix:553:21:

          552|         map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
          553|           imap1 (m: def':
             |                     ^
          554|             (mergeDefinitions

       … while calling anonymous lambda

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:836:28:

          835|         # Process mkMerge and mkIf properties.
          836|         defs' = concatMap (m:
             |                            ^
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/928ixrd5lyl26wks3psclgk2y4awk2vg-source/configuration.nix':

       … from call site

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:837:128:

          836|         defs' = concatMap (m:
          837|           map (value: { inherit (m) file; inherit value; }) (addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                ^
          838|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/cjz8w4dgc3rd2n3dqv5c208vygndjyba-source/lib/modules.nix:908:25:

          907|   */
          908|   dischargeProperties = def:
             |                         ^
          909|     if def._type or "" == "merge" then

       error: undefined variable 'inputs'

       at /nix/store/928ixrd5lyl26wks3psclgk2y4awk2vg-source/configuration.nix:116:6:

          115|    environment.systemPackages = with pkgs; [
          116|      inputs.zen-browser.packages."${system}".default
             |      ^
          117|      helvum
omarcresp commented 20 hours ago

Can you share your config to debug it? Also keep in mind as of now only x86_64-linux is supported. but the errors claims that inputs is undefined so it could be a miss configurations with the bindings

Icy-Thought commented 18 hours ago

Makes me wonder if the ${system} bit is the issue since they don't have with pkgs; in that environment.systemPackages. Also, add {inputs} to the line you have in your nix module.

Kezkch commented 17 hours ago

Makes me wonder if the ${system} bit is the issue since they don't have with pkgs; in that environment.systemPackages. Also, add {inputs} to the line you have in your nix module.

Doing so returns the error error: cached failure of attribute 'nixosConfigurations.default.config'.

Kezkch commented 16 hours ago

Can you share your config to debug it? Also keep in mind as of now only x86_64-linux is supported. but the errors claims that inputs is undefined so it could be a miss configurations with the bindings

Sure, here is my configuration file and flake. I'm holding out hope that there it is something super obvious that I might've not otherwise known as an inexperienced Nix user.

configuration.txt flake.txt

omarcresp commented 14 hours ago

@Kezkch I think you sent another version. I cant find the zen-browser input in those files

Kezkch commented 11 hours ago

Had removed them prior to submitting them here as the instructions for getting the flake wasn't working for me. I had pretty much followed through on all aforementioned steps above and kept running into different issues.

Got that error by including the package zen-browser in environment.systemPackages and having the flake included as an input and output. I didn't add the package into the outputs second as whenever I did that, it would otherwise complain that the input isn't valid. These are the three methods including inputs.zen-browser.packages."${system}".default to the environment.systemPackages of my configuration.nix file that I have used to troubleshoot the issue.

warning: updating lock file '/etc/nixos/flake.lock':
• Updated input 'home-manager':
    'github:nix-community/home-manager/0b052dd8119005c6ba819db48bcc657e48f401b7' (2024-09-20)
  → 'github:nix-community/home-manager/dfe4d334b172071e7189d971ddecd3a7f811b48d' (2024-09-20)
building the system configuration...
trace: evaluation warning: The option `services.xserver.xkbVariant' defined in `/nix/store/lbdkf74vyyy20n8mk60lw1g90qf2fhmv-source/configuration.nix' has been renamed to `services.xserver.xkb.variant'.
trace: evaluation warning: The option `services.xserver.layout' defined in `/nix/store/lbdkf74vyyy20n8mk60lw1g90qf2fhmv-source/configuration.nix' has been renamed to `services.xserver.xkb.layout'.
trace: evaluation warning: The option `services.xserver.displayManager.autoLogin' defined in `/nix/store/lbdkf74vyyy20n8mk60lw1g90qf2fhmv-source/configuration.nix' has been renamed to `services.displayManager.autoLogin'.
trace: evaluation warning: The option `hardware.opengl.driSupport32Bit' defined in `/nix/store/lbdkf74vyyy20n8mk60lw1g90qf2fhmv-source/configuration.nix' has been renamed to `hardware.graphics.enable32Bit'.
error:
       … while calling the 'head' builtin

         at /nix/store/hiasfhl8f5yy88hcfbr3s8s4bm63wsjw-source/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'

         at /nix/store/hiasfhl8f5yy88hcfbr3s8s4bm63wsjw-source/lib/modules.nix:821:9:

          820|     in warnDeprecation opt //
          821|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          822|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: undefined variable 'zen-browser'

       at /nix/store/lbdkf74vyyy20n8mk60lw1g90qf2fhmv-source/configuration.nix:119:6:

          118|    environment.systemPackages = with pkgs; [
          119|      zen-browser
             |      ^
          120|      helvum
omarcresp commented 10 hours ago

Ok i see, so i updated your configs to include zen, this are the steps

  1. you need to include zen browser flake in your inputs: zen-browser = { url = "github:MarceColl/zen-browser-flake"; inputs.nixpkgs.follows = "nixpkgs"; };
  2. since you're already passing the inputs to your config file in the specialArgs now you only need to receive it in your configuration file. you need to add the inputs binding in the top lvl line { config, pkgs, inputs, ... }:
  3. You need to register zen-browser (that comes from the inputs) in your systemPackages: inputs.zen-browser.packages."${pkgs.system}".default

this are the updated versions configuration.txt flake.txt