got error when trying to nixos-install --root /mnt --flake .#ai --no-root-password --show-trace
Closed this issue · 3 comments
i am beginner of nixos try to Deploying nixos-installer and flow the execute cmd and i got errors when i execute
nixos-install --root /mnt --flake .#ai --no-root-password --show-trace # instlall-1
errors at first launch:
Details
[nix-shell:~/nix-config/nixos-installer]$ nixos-install --root /mnt --flake .#ai --no-root-password --show-trace # instlall-1
warning: Git tree '/home/nixos/nix-config' is dirty
warning: updating lock file '/home/nixos/nix-config/nixos-installer/flake.lock':
• Updated input 'nixos-hardware':
'github:NixOS/nixos-hardware/7763c6fd1f299cb9361ff2abf755ed9619ef01d6' (2023-12-13)
→ 'github:NixOS/nixos-hardware/3f7d0bca003eac1a1a7f4659bbab9c8f8c2a0958' (2024-02-22)
warning: Git tree '/home/nixos/nix-config' is dirty
mktemp: failed to create directory via template ‘/mnt/tmp.XXXXXXXXXX’: Permission denied
[nix-shell:~/nix-config/nixos-installer]$ sudo nixos-install --root /mnt --flake .#ai --no-root-password --show-trace # instlall-1
warning: Git tree '/home/nixos/nix-config' is dirty
copying channel...
building the flake in git+file:///home/nixos/nix-config?dir=nixos-installer...
warning: Git tree '/home/nixos/nix-config' is dirty
error:
… while calling the 'seq' builtin
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
… while evaluating a branch condition
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:261:9:
260| checkUnmatched =
261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
| ^
262| let
… in the right operand of the AND (&&) operator
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:261:72:
260| checkUnmatched =
261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then
| ^
262| let
… while evaluating the attribute 'unmatchedDefns'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:686:7:
685| # Transforms unmatchedDefnsByName into a list of definitions
686| unmatchedDefns =
| ^
687| if configs == []
… while calling the 'concatLists' builtin
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:693:11:
692| else
693| concatLists (mapAttrsToList (name: defs:
| ^
694| map (def: def // {
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:615:10:
614| attrs:
615| map (name: f name attrs.${name}) (attrNames attrs);
| ^
616|
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:615:16:
614| attrs:
615| map (name: f name attrs.${name}) (attrNames attrs);
| ^
616|
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:693:46:
692| else
693| concatLists (mapAttrsToList (name: defs:
| ^
694| map (def: def // {
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:679:22:
678| # Propagate all unmatched definitions from nested option sets
679| mapAttrs (n: v: v.unmatchedDefns) resultsByName
| ^
680| # Plus the definitions for the current prefix that don't have a matching option
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:615:10:
614| attrs:
615| map (name: f name attrs.${name}) (attrNames attrs);
| ^
616|
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:615:16:
614| attrs:
615| map (name: f name attrs.${name}) (attrNames attrs);
| ^
616|
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:693:46:
692| else
693| concatLists (mapAttrsToList (name: defs:
| ^
694| map (def: def // {
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:679:22:
678| # Propagate all unmatched definitions from nested option sets
679| mapAttrs (n: v: v.unmatchedDefns) resultsByName
| ^
680| # Plus the definitions for the current prefix that don't have a matching option
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:615:10:
614| attrs:
615| map (name: f name attrs.${name}) (attrNames attrs);
| ^
616|
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:615:16:
614| attrs:
615| map (name: f name attrs.${name}) (attrNames attrs);
| ^
616|
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:693:46:
692| else
693| concatLists (mapAttrsToList (name: defs:
| ^
694| map (def: def // {
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:679:22:
678| # Propagate all unmatched definitions from nested option sets
679| mapAttrs (n: v: v.unmatchedDefns) resultsByName
| ^
680| # Plus the definitions for the current prefix that don't have a matching option
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:627:39:
626|
627| resultsByName = mapAttrs (name: decls:
| ^
628| # We're descending into attribute ‘name’.
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:634:14:
633| optionDecls = filter
634| (m: m.options?_type
| ^
635| && (m.options._type == "option"
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:160:39:
159| then value
160| else { ${elemAt attrPath n} = atDepth (n + 1); };
| ^
161| in atDepth 0;
… while calling 'atDepth'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:157:17:
156| len = length attrPath;
157| atDepth = n:
| ^
158| if n == len
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:1270:12:
1269| apply = x: use (toOf config);
1270| } // optionalAttrs (toType != null) {
| ^
1271| type = toType;
… while calling 'optionalAttrs'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:781:5:
780| # The attribute set to return if `cond` is `true`.
781| as:
| ^
782| if cond then as else {};
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:1263:26:
1262| (abort "Renaming error: option `${showOption to}' does not exist.");
1263| toType = let opt = attrByPath to {} options; in opt.type or (types.submodule {});
| ^
1264| in
… while calling 'attrByPath'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:36:5:
35| # The nested attribute set to select values from
36| set:
| ^
37| let attr = head attrPath;
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:41:12:
40| else if set ? ${attr}
41| then attrByPath (tail attrPath) default set.${attr}
| ^
42| else default;
… while calling 'attrByPath'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:36:5:
35| # The nested attribute set to select values from
36| set:
| ^
37| let attr = head attrPath;
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:41:12:
40| else if set ? ${attr}
41| then attrByPath (tail attrPath) default set.${attr}
| ^
42| else default;
… while calling 'attrByPath'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:36:5:
35| # The nested attribute set to select values from
36| set:
| ^
37| let attr = head attrPath;
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:41:12:
40| else if set ? ${attr}
41| then attrByPath (tail attrPath) default set.${attr}
| ^
42| else default;
… while calling 'attrByPath'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:36:5:
35| # The nested attribute set to select values from
36| set:
| ^
37| let attr = head attrPath;
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:674:37:
673|
674| matchedOptions = mapAttrs (n: v: v.matchedOptions) resultsByName;
| ^
675|
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:644:32:
643| in {
644| matchedOptions = evalOptionValue loc opt defns';
| ^
645| unmatchedDefns = [];
… while calling 'evalOptionValue'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:778:31:
777| config value. */
778| evalOptionValue = loc: opt: defs:
| ^
779| let
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:803:9:
802| warnDeprecation =
803| warnIf (opt.type.deprecationMessage != null)
| ^
804| "The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}";
… while calling 'warnIf'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/trivial.nix:357:18:
356| */
357| warnIf = cond: msg: if cond then warn msg else x: x;
| ^
358|
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:642:23:
641| if length optionDecls == length decls then
642| let opt = fixupOptionType loc (mergeOptionDecls loc decls);
| ^
643| in {
… while calling 'fixupOptionType'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:955:26:
954| # TODO: Merge this into mergeOptionDecls
955| fixupOptionType = loc: opt:
| ^
956| if opt.type.getSubModules or null == null
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:504:44:
503| context = name: ''while evaluating the module argument `${name}' in "${key}":'';
504| extraArgs = builtins.mapAttrs (name: _:
| ^
505| builtins.addErrorContext (context name)
… while evaluating the module argument `pkgs' in "/mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/nixos/modules/services/hardware/bluetooth.nix":
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/types.nix:581:29:
580| merge = loc: defs:
581| zipAttrsWith (name: defs:
| ^
582| let merged = mergeDefinitions (loc ++ [name]) elemType defs;
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-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
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/nixos/modules/misc/nixpkgs.nix:86:7:
85| in
86| import ../../.. ({
| ^
87| inherit (cfg) config overlays;
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/pkgs/top-level/impure.nix:14:1:
13|
14| { # We put legacy `system` into `localSystem`, if `localSystem` was not passed.
| ^
15| # If neither is passed, assume we are building packages on the current
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/pkgs/top-level/impure.nix:87:1:
86|
87| import ./. (builtins.removeAttrs args [ "system" ] // {
| ^
88| inherit config overlays localSystem;
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/pkgs/top-level/default.nix:19:1:
18|
19| { # The system packages will be built on. See the manual for the
| ^
20| # subtle division of labor between these two `*System`s and the three
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/pkgs/top-level/default.nix:55:5:
54| checked =
55| throwIfNot (lib.isList overlays) "The overlays argument to nixpkgs must be a list."
| ^
56| lib.foldr (x: throwIfNot (lib.isFunction x) "All overlays passed to nixpkgs must be functions.") (r: r) overlays
… while calling 'throwIfNot'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/trivial.nix:386:22:
385| */
386| throwIfNot = cond: msg: if cond then x: x else throw msg;
| ^
387|
… while calling 'g'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:701:19:
700| g =
701| name: value:
| ^
702| if isAttrs value && cond value
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/attrsets.nix:704:20:
703| then recurse (path ++ [name]) value
704| else f (path ++ [name]) value;
| ^
705| in mapAttrs g;
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-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 `nixpkgs.overlays':
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:844:59:
843| if isDefined then
844| if all (def: type.check def.value) defsFinal then type.merge loc defsFinal
| ^
845| else let allInvalid = filter (def: ! type.check def.value) defsFinal;
… while calling 'merge'
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/types.nix:526:20:
525| check = isList;
526| merge = loc: defs:
| ^
527| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/types.nix:527:35:
526| merge = loc: defs:
527| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
| ^
528| imap1 (m: def':
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/lists.nix:165:29:
164| */
165| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
166|
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/lists.nix:165:32:
164| */
165| imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);
| ^
166|
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/types.nix:528:21:
527| map (x: x.value) (filter (x: x ? value) (concatLists (imap1 (n: def:
528| imap1 (m: def':
| ^
529| (mergeDefinitions
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-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 `/mnt/nix/store/89nap4m4x275gy6mkkngh7b5yzhj3gsm-source/modules/base.nix':
… from call site
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-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 /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:894:25:
893| */
894| dischargeProperties = def:
| ^
895| if def._type or "" == "merge" then
… while calling anonymous lambda
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:504:44:
503| context = name: ''while evaluating the module argument `${name}' in "${key}":'';
504| extraArgs = builtins.mapAttrs (name: _:
| ^
505| builtins.addErrorContext (context name)
… while evaluating the module argument `nuenv' in "/mnt/nix/store/89nap4m4x275gy6mkkngh7b5yzhj3gsm-source/modules/base.nix":
error: attribute 'nuenv' missing
at /mnt/nix/store/lnbafzxw52r0w55hwbcrsdkvk5fymv3l-source/lib/modules.nix:506:28:
505| builtins.addErrorContext (context name)
506| (args.${name} or config._module.args.${name})
| ^
507| ) (lib.functionArgs f);
sudo nixos-install --root /mnt --flake .#ai --no-root-password --show-trace # instlall-1
warning: Git tree '/home/nixos/nix-config' is dirty
copying channel...
building the flake in git+file:///home/nixos/nix-config?dir=nixos-installer...
warning: Git tree '/home/nixos/nix-config' is dirty
error: cached failure of attribute 'nixosConfigurations.ai.config'
OS
nixos kde-plasma version 23.11 USB iso boot
hardware
PC intel i5 + NVIDIA 1060
so i only modified nix-config/hosts/idols_ai/hardware-configuration.nix
/dev/disk/by-uuid/xxx
my disk info
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 2.5G 1 loop /nix/.ro-store
sda 8:0 1 116.5G 0 disk
├─sda1 8:1 1 116.4G 0 part
│ └─ventoy 254:0 0 2.5G 1 dm /iso
└─sda2 8:2 1 32M 0 part
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 100M 0 part
├─nvme0n1p2 259:2 0 16M 0 part
├─nvme0n1p3 259:3 0 200G 0 part
├─nvme0n1p4 259:4 0 667M 0 part
├─nvme0n1p5 259:5 0 50G 0 part
├─nvme0n1p6 259:11 0 1G 0 part /mnt/boot
└─nvme0n1p7 259:12 0 225.2G 0 part
└─crypted-nixos 254:1 0 225.2G 0 crypt /mnt/snapshots
/mnt/persistent
/mnt/swap
/mnt/tmp
/mnt/gnu
/mnt/nix
df -Th
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 798M 0 798M 0% /dev
tmpfs tmpfs 7.8G 12M 7.8G 1% /dev/shm
tmpfs tmpfs 3.9G 5.5M 3.9G 1% /run
tmpfs tmpfs 7.8G 1.2M 7.8G 1% /run/wrappers
tmpfs tmpfs 7.8G 275M 7.6G 4% /
/dev/root iso9660 2.6G 2.6G 0 100% /iso
/dev/loop0 squashfs 2.5G 2.5G 0 100% /nix/.ro-store
tmpfs tmpfs 7.8G 479M 7.4G 7% /nix/.rw-store
overlay overlay 7.8G 479M 7.4G 7% /nix/store
tmpfs tmpfs 1.6G 7.3M 1.6G 1% /run/user/1000
/dev/mapper/crypted-nixos btrfs 226G 1.4G 223G 1% /mnt/nix
/dev/mapper/crypted-nixos btrfs 226G 1.4G 223G 1% /mnt/gnu
/dev/mapper/crypted-nixos btrfs 226G 1.4G 223G 1% /mnt/tmp
/dev/mapper/crypted-nixos btrfs 226G 1.4G 223G 1% /mnt/swap
/dev/mapper/crypted-nixos btrfs 226G 1.4G 223G 1% /mnt/persistent
/dev/mapper/crypted-nixos btrfs 226G 1.4G 223G 1% /mnt/snapshots
/dev/nvme0n1p6 vfat 1022M 4.0K 1022M 1% /mnt/boot
- As I mentioned here, You should NOT deploy this flake directly on your machine, It will not succeed! This is also dangerous because it may introduce some incompatible hardware drivers.
- I haven't done a pure installation in a while. I think some updates I made introduced this problem.
Please write your own configuration from scratch, and use my configuration and documentation for reference only.
Hey Ryan, I've spent the past couple of weeks learning and adapting your nixos configuration, and have stumbled upon and issue i have no idea how to fix myself.
Its from the nix-installer flake ~ The attribute Nuenv doesnt work and thats probable because as you say, you havent done a pure install in a while.