Closed usrbinkat closed 1 year ago
Hey, I'm so sorry! I didn't get a notification for this and totally missed it.
<home-manager/nix-darwin> is referencing the Home Manager channel. Can you try these commands to install it?
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel update
Also, I've since made some breaking changes as I try to get everything over to flakes. I updated the instructions on the main page; this Home Manager channel should be the only thing installed via Nix channels.
@dustinlyons that doesn't fix the issue, I added home manager using nix channel and still I get the same error
@nfrmdw Sorry, it's nix-channel --update
not nix-channel update
. I gave you an incorrect command.
Can you run both nix-channel --list
and nix-channel --update
, then share the output?
Hi @nfrmdw, I installed the configuration from a fresh Macbook today. I found a few errors and overall simplified the steps. Take a look at the README, those steps are confirmed to work if you start from a fresh OS.
As a sidenote, I did encounter this error early in my testing, and it was the result of not having the nix-channel installed. Once I did this:
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update
It worked. I'm thinking it's possible the update failed when you were trying as I didn't give you the right argument (it's --update, not update).
Closing for now; please open a new Github Issue or email me directly with questions: dustin@dlyons.dev.
Problem:
Testing failure, un-modified main branch nix deployment on a clean mac OS.
Reproduce:
note: expandable logs included below [1][2][3]
Logs
CLICK TO EXPAND LOGS [1]> nix-shell -p nix-info --run "nix-info -m"
```bash dustin@Dustins-MBP> nix-shell -p nix-info --run "nix-info -m". ~/nixos-config - system: `"aarch64-darwin"` - host os: `Darwin 22.5.0, macOS 13.4.1` - multi-user?: `yes` - sandbox: `no` - version: `nix-env (Nix) 2.15.1` - channels(root): `"nixpkgs"` - nixpkgs: `/Users/dustin/.nix-defexpr/channels/nixpkgs` ```CLICK TO EXPAND LOGS [2]> ./bin/build
```bash dustin@Dustins-MBP> ./bin/build ~/nixos-config + VERSION=1.0 + GREEN='\033[1;32m' + RED='\033[1;31m' + CLEAR='\033[0m' + FLAKE=Dustins-MBP + SYSTEM=darwinConfigurations.Dustins-MBP.system + export NIXPKGS_ALLOW_UNFREE=1 + NIXPKGS_ALLOW_UNFREE=1 +++ readlink -f ./bin/darwin-build ++ dirname /Users/dustin/nixos-config/bin/darwin-build + cd /Users/dustin/nixos-config/bin + cd .. + echo '\033[1;32mStarting...\033[0m' Starting... + nix --experimental-features 'nix-command flakes' build .#darwinConfigurations.Dustins-MBP.system --impure error: … while evaluating the attribute 'value' at /nix/store/w9py11if12n2z4nvdgmwcarry9vclc58-source/lib/modules.nix:768:9: 767| in warnDeprecation opt // 768| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 769| inherit (res.defsFinal') highestPrio; … while calling the 'addErrorContext' builtin at /nix/store/w9py11if12n2z4nvdgmwcarry9vclc58-source/lib/modules.nix:768:17: 767| in warnDeprecation opt // 768| { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value; | ^ 769| inherit (res.defsFinal') highestPrio; (stack trace truncated; use '--show-trace' to show the full trace) error: The option `home-manager.users.dustin.home.stateVersion' is used but not defined. ```CLICK TO EXPAND LOGS [3]> nix build --show-trace
```bash dustin@Dustins-MBP> nix --experimental-features 'nix-command flakes' build .#darwinConfigurations.Dustins-MBP.system --impure --show-trace 2>&1 | tee /tmp/log error: … while evaluating the attribute 'config.system.build.toplevel' at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:320:9: 319| options = checked options; 320| config = checked (removeAttrs config [ "_module" ]); | ^ 321| _module = checked (config._module); … while calling the 'seq' builtin at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-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 /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:261:9: 260| checkUnmatched = 261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then | ^ 262| let … in the left operand of the AND (&&) operator at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:261:72: 260| checkUnmatched = 261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then | ^ 262| let … in the left operand of the AND (&&) operator at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:261:33: 260| checkUnmatched = 261| if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [] then | ^ 262| let … while evaluating a branch condition at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:254:12: 253| 254| in if declaredConfig._module.freeformType == null then declaredConfig | ^ 255| # Because all definitions that had an associated option ended in … from call site at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:242:28: 241| # For definitions that have an associated option 242| declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options; | ^ 243| … while calling 'mapAttrsRecursiveCond' at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/attrsets.nix:594:5: 593| # Attribute set to recursively map over. 594| set: | ^ 595| let … from call site at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:234:33: 233| ({ inherit lib options config specialArgs; } // specialArgs); 234| in mergeModules prefix (reverseList collected); | ^ 235| … while calling 'reverseList' at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/lists.nix:436:17: 435| */ 436| reverseList = xs: | ^ 437| let l = length xs; in genList (n: elemAt xs (l - n - 1)) l; … from call site at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:229:25: 228| merged = 229| let collected = collectModules | ^ 230| class … while calling anonymous lambda at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:443:37: 442| 443| in modulesPath: initialModules: args: | ^ 444| filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args); … from call site at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:444:7: 443| in modulesPath: initialModules: args: 444| filterModules modulesPath (collectStructuredModules unknownModule "" initialModules args); | ^ 445| … while calling 'filterModules' at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:411:36: 410| # modules recursively. It returns the final list of unique-by-key modules 411| filterModules = modulesPath: { disabled, modules }: | ^ 412| let … while calling anonymous lambda at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:437:31: 436| disabledKeys = concatMap ({ file, disabled }: map (moduleKey file) disabled) disabled; 437| keyFilter = filter (attrs: ! elem attrs.key disabledKeys); | ^ 438| in map (attrs: attrs.module) (builtins.genericClosure { … from call site at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:398:22: 397| let 398| module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x); | ^ 399| collectedImports = collectStructuredModules module._file module.key module.imports args; … while calling anonymous lambda at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:363:11: 362| else 363| m: m; | ^ 364| … from call site at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:398:35: 397| let 398| module = checkModule (loadModule args parentFile "${parentKey}:anon-${toString n}" x); | ^ 399| collectedImports = collectStructuredModules module._file module.key module.imports args; … while calling 'loadModule' at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:334:53: 333| # Like unifyModuleSyntax, but also imports paths and calls functions if necessary 334| loadModule = args: fallbackFile: fallbackKey: m: | ^ 335| if isFunction m then … from call site at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/modules.nix:335:12: 334| loadModule = args: fallbackFile: fallbackKey: m: 335| if isFunction m then | ^ 336| unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgs fallbackKey m args) … while calling 'isFunction' at /nix/store/8mp6dbzv7fc4my08zq5l30g8ihkck3d2-source/lib/trivial.nix:448:16: 447| */ 448| isFunction = f: builtins.isFunction f || | ^ 449| (f ? __functor && isFunction (f.__functor f)); error: file 'home-manager/nix-darwin' was not found in the Nix search path (add it using $NIX_PATH or -I) at «none»:0: (source not available) ```