Thanks for responding.
I get syntax errors with both Wiki suggestions. Part of the problem for me is it says to try “this” and if “this” doesn’t work, then try "that’. But there aren’t many specifics here as to where those code snippets belong in the configuration.nix file, which is why I was asking for someone to post a working version that I could look at. Using the first solution from the nixos wiki python entry above that starts with “let” (not that it says where the code actually goes within the configuration.nix file, and not that I could guess where it should go):
error:
… while evaluating the attribute 'config'
at /nix/store/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/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/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: syntax error, unexpected ID, expecting '{'
at /etc/nixos/configuration.nix:98:11:
97| freecad
98| let my-python-packages = ps: with ps; [pandas];
| ^
99| in environment.systemPackages = [(pkgs.python311.withPackages my-python-packages)];
building Nix...
error:
… while evaluating the attribute 'config'
at /nix/store/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/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/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: syntax error, unexpected ID, expecting '{'
at /etc/nixos/configuration.nix:98:11:
97| freecad
98| let my-python-packages = ps: with ps; [pandas];
| ^
99| in environment.systemPackages = [(pkgs.python311.withPackages my-python-packages)];
building the system configuration...
error:
… while evaluating the attribute 'config.system.build.toplevel'
at /nix/store/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/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/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: syntax error, unexpected ID, expecting '{'
at /etc/nixos/configuration.nix:98:11:
97| freecad
98| let my-python-packages = ps: with ps; [pandas];
| ^
99| in environment.systemPackages = [(pkgs.python311.withPackages my-python-packages)];
Here is the result (similar) of trying is the other way (the second way) from the wiki:
error:
… while evaluating the attribute ‘config’
at /nix/store/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/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/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: syntax error, unexpected '='
at /etc/nixos/configuration.nix:98:34:
97| freecad
98| environment.systemPackages = with pkgs; [
| ^
99| (python38.withPackages(ps: with ps; [ pandas requests])) ];
building Nix…
error:
… while evaluating the attribute ‘config’
at /nix/store/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/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/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: syntax error, unexpected '='
at /etc/nixos/configuration.nix:98:34:
97| freecad
98| environment.systemPackages = with pkgs; [
| ^
99| (python38.withPackages(ps: with ps; [ pandas requests])) ];
building the system configuration…
error:
… while evaluating the attribute ‘config.system.build.toplevel’
at /nix/store/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/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/xc3h7hmrs5mc2rajsb070p6i4vrhnnnp-nixos-23.11.2217.d02d818f22c7/nixos/lib/modules.nix:320:18:
319| options = checked options;
320| config = checked (removeAttrs config [ "_module" ]);
| ^
321| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: syntax error, unexpected '='
at /etc/nixos/configuration.nix:98:34:
97| freecad
98| environment.systemPackages = with pkgs; [
| ^
99| (python38.withPackages(ps: with ps; [ pandas requests])) ];
Again, another syntax error, probably because I have no idea if this is the full snippet needed and no idea where to put it.
Thanks again for offering help.