You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by Dharmesh Malam, Benedict Aas, Chris McCord, Oskar Maria Grande, Bob van der Linden, davidak, Ben Creasy, Théo Zimmermann, Christopher Dembia, Ben Zhang and 27 more
I strongly agree with @Profpatsch's points. To be fair there, there is a use for imperative package management, as articulated by @lethalman in #684. Since under @Profpatsch's plan the profile is always defined declarative, and since @lethalman's usecases boil down to pinning the exact version of a package, I think we should speak of "pinned" vs "regular" packages.
Start a development shell based on ./default.nix or ./shell.nix:
$ nix shell
(Hm, do we want a special case like this?)
I'm reminded of git changing the default push settings. I suggest we disable this by default, and then have a setting to enable this power users can enable. In the name of orthogonality, I also propose that the setting be that the namespace is queried unless default.nix/shell.nix is present, and have it apply to at least nix build and nix use in addition to nix shell. [I don't think nix install should have this, because that command is more global, and it violates our new attribute path agenda].
Ultimately It would be great if root and normal users alike can define and enable service and packages in the same module system, and the same CLI tools can assist with querying and editing the config files.
Converging all this will take a great deal of work, but I think a few decisions can be made now to help the process go faster. In the thread I linked, @edolstra mentioned we could use fetchTarball, or move the module system in nix itself (presumably into the corepkgs). We have a similar choice for the UI itself---to use the git terminology, we could have just the minimal plumbing commands in nix, and porcelain commands like nix install kept elsewhere for more rapid iteration. [This also provides a way to make nix repl work without bundling the repl with nix].
Is it possible to cut down the proposal to the essentials ? It's good to show the end-goal but for implementation it might be a bit daunting. How would we go on implementing all of this ? Are we going to port one command at the time and update the docs accordingly ?
One thing that might feel inherent but that needs to be specified is that thenix executable wouldn't be doing much, it would behaves like git and just dispatch sub-commands to nix-<command> executables in it's libexec/ and PATH.
There are too many similar top-level commands, as noted already. I believe it's better to group them more, e.g. create more hierarchy or introduce options switching some behavior changes.
The commands should have short-cuts, even though the long form should be preferred in documentation. Some people like to have short aliases for frequent commands. One way is adding aliases like nix -i bash, nix -q foo, another way is allowing to use a unique prefix of a command like btrfs fi def for btrfs filesystem defragment. Enhanced alternative: allow defining aliases, e.g. like git.
Commands that take attribute names should accept arbitrary nix expressions instead. This could be extended even to package updates, e.g. if I nix install 'foo.override { myOption = bar; }', I want to keep the override even after nix upgrade foo.
Installation actions should have an interactive mode, perhaps even by default if connected to terminal: first show essentially --dry-run and then ask for confirmation whether to proceed.
Implementation: I assume that to simplify Get rid of the Perl dependency #341 we'll only do the new C++ implementation for the new command scheme, and the old commands would require perl and we would remove them anyway after several months of overlap.
Now some replies:
@itkovian: nix build is what adds stuff into the store (and a symlink into the current directory). To most people "installation" is expect to do much more than that, e.g. make $PATH contain the executables, etc.
@madjar: I've got a set of packages that I use daily, and I want those consistent and often updated. Then I have some I rarely use and sometimes huge, so updating them often would be rather wasteful, e.g. LibreOffice.
@CMCDragonkai: that sounds like ctags and similar tools. Perhaps such functionality belongs into the REPL, but note that the "location" is often difficult to pinpoint, e.g. the binding is done in all-packages.nix but most of the code is in another file.
@Profpatsch: the nixpkgs.pkgs. prefix seems redundant. Anyone can introduce extra namespaces via packageOverrides already. (I use it to define personalized easy to update custom package sets.) There's only a single nixpkgs=... in $NIX_PATH and that should be the default namespace, I believe.
More detailed thoughts of mine, ordered according to the original proposal:
nix search --name foo is rather confusing terminology, as we'll likely want the attribute name to be the (unqualified) name
nix install
--declarative: rather --auto-update or similar. Calling it "declarative" just seems strange to me (from a fresh point of view).
-f: perhaps replace by -I to handle all $NIX_PATH changes more consistently?
machine:package : also support the other direction?
nix rebuild: wouldn't that better be somewhere innix upgrade? For example, nix upgrade by itself working only on auto-upgraded packages and with -a or --all doing the "usual" upgrade?
nix upgrade: maybe I like update better. From some mainstream distro I've fixed upgrade as something big and dangerous... but we could e.g. make them synonymous.
nix list and nix status: these two seem to work too similar to warrant extra (top-level) subcommands. Perhaps call it nix query or nix info instead. (Also noted by @trishume.)
nix uninstall: maybe unlink? (analogy to UNIX* traditions around file deletion)
nix rollback: could be also undo, but rollback seems a more popular term in general. Improvement: generations might remember which one came before, as currently nix-env --rollback; nix-env -i foo; nix-env --rollback does an unintuitive thing.
nix use, nix sandbox, nix shell: very similar, again. Maybe nix use --sandbox or --pure or something...
nix query-options: perhaps this doesn't warrant another subcommand. I'd join this with the above, e.g. nix query --options bash and nix query --plugins firefox.
Note: perhaps among this the various variants should be handled. I'd think that instead of firefox-esrattribute we should have an option, e.g. variant="esr". Similarly for the barFull packages, etc.
Note: for options, especially global ones, there's a question whether to propagate them to dependencies. We might consider bringing nixos and nixpkgs closer to each other.
nix build: again the -f considerations.
nix repl and nix eval: similar, maybe nix eval -i or --interactive, though "repl" might be too well remembered already.
nix make-store-derivation: why not nix-build --drv instead? It should do the same thing, only stop after instantiation.
@vcunat I notice that wherever you suggested a third level in the hierarchy, you did it as an --option; but couldn't it be turtles all the way down, so that sub-subcommands look and work the same as subcommands, e.g. nix query closure instead of nix query --closure?
-1 for alias definiton (that’s what the shell is for, and the git folks got it all wrong!)
@Profpatsch: how do you simply define aliases for sub-commands in bash?
What should be in scope by default?
I imagine it like this: the default $NIX_PATH points to some channel so I can use nix install bash directly, and if I want to use a different nixpkgs tree (channel), I'll have other ways to do that, among them e.g. modifying $NIX_PATH by -I options.
I find that absolutely crucial with a “destructive” package manager like e.g. pacman, but what use is it with nix?
Personally, I sometimes like to see what would happen beforehand, instead of doing it and the rolling back immediately.
Anyone can introduce extra namespaces via packageOverrides already
Yet, that is not useful if one uses two versions of e.g. nixpkgs, e.g. 15.09 and master (which is a pretty standard usecase).
Other ways are e.g. adding nixpkgs-15.09=... into $NIX_PATH instead and importing that. Of course, we could automatize something like this when adding channels, in some way...
(And even today you can relatively simply get rid of the prefixes; the only question is what should be the default. There was a similar discussion on the mailing-list a couple days ago.)
@glaebhoerl: for clarity reasons, I assume it's better to prefix by -- in cases where it's optional to specify a sub-command. For example, if we allowed nix query git bash to display information about multiple packages, it would seems strange to allow nix query closure bash and instead I feel it would be better to have nix query --closure bash.
@vcunat Yea I think the functionality should be in REPL or in the manual. See for example the Haskell documentation, and how if you look up the source for any particular function, it points to the actual implementation. For the REPL if it could show the type signature (even though nix is untyped, it could just be manually specified, like a help page for that exact command), that would be great.
Once some of the initial discussion settles down, I would suggest creating a new repo to host a design document. PRs would then be issued to get feedback on proposals before updating the doc.
I'm really enjoying the level of discourse here, but I think it's important that we have an authoritative document so we're all on the same page, and have a more directed approach to converging on a final, actionable design.
Ideally, we'd have @edolstra and a couple others that we could trust to review and give feedback on each proposal, merging in the changes if they sound good.
A deadline for the design might also be a good idea, to avoid this work languishing.
Alternatively, we could just have @edolstra comb through all the commentary, and in true BDFL fashion, develop the final design to his liking :). Whatever works best for us / @edolstra.
how do you simply define aliases for sub-commands in bash?
alias myalias='nix subcommand'
It’s nice to see the difference between built-in and not. Otherwise you sit at a different system and wonder why the most basic commands are missing …
Even today you should be able to do this:
packageOverrides is dependent on nixpkgs, though. I don’t like the idea that most functionality of nix only works in conjunction with the default package set. In the same manner I don’t think we should hardcode the string nixpkgs anywhere in nix.
Just wanted to ask, is this package search enhanced with showing package
parameters planned to be added to the standard command line Nix query
tools? Or if it's already available and I haven't found it.
I would like to suggest that any querying functionality should include the ability to show package parameters.
@hedning@CMCDragonkai with regard to options and the same style of invocation, maybe it would be possible to add command line options that do common invocation things (thus also encourage further packages to implement those invocation styles).
For example, a --with-packages option could be added
nix run nixpkgs.python3 --with-packages 'numpy matplotlib'
that, given the above, would check if nixpkgs.python3 has a withPackages attribute and then invoke it like so
nix use nixpkgs.python3 --override x11Support=true'
that would check for an override attribute and then invoke it like so if it exists
nixpkgs.python3.override{x11Support=true;}
This has the advantage of being fairly future proof as it provides a layer of abstraction between the user and the continuously evolving nixpkgs interfaces. Options can be added, deprecated, removed, or even just have their internal implementation details changed to continue providing the same functionality against new nixpkgs interfaces.
One pain I could see is that as nixpkgs evolves, nix would start having to check versions to provide the appropriate glue code. This suggests that possible the majority of the functionality should live in nixpkgs itself. For example, nixpkgs could provide a top-level attribute set that nix can use to extend the options it takes. Combined with a standard way of serializing option data, nix could then accept these options and invoke the corresponding nixpkgs expressions and let them manipulate the underlying nix expression that is ultimately used.
That is, nix would start with an expression for the specified attribute. This would be passed to the option function corresponding to the first option along with the serialized option data. This would give a new expression, which would then be passed to the option function corresponding to the second option along with its serialized option data and so on until there are no more options. Then nix uses the final expression to obtain the required derivation instead of the specified initial attribute.
Reacted by hri
Reacted by Dmitry Kalinkin, Jan Tojnar and Arian van Putten
I was thinking some more about this, and had another suggestion along these lines. What if individual packages could be passed command line options, so something like this
nix run nixpkgs.python3 --with numpy matplotlib --foo --bar -- nixpkgs.gcc
would be translated into something like this
nixpkgs.python3.cmdline { with = [ "numpy" "matplotlib" ]; foo = []; bar = []; }
nixpkgs.gcc
That is, if a set of options are specified after an attribute selection, they are collected into an attribute set and passed to a cmdline handling attribute of the selection attribute (or whatever name would be appropriate) if it exists, otherwise an x does not support command line options error is generated.
There is an interesting trade off between providing a generic (more power, the ultimate being an arbitrary function transformation) and a specific interface (better error messages and such) for these things. It seems you want to be a specific as possible but no more specific. This allowing everything that needs to be done to be done while still giving the best possible error messages and such.
Most of my suggestions so far have been for generic machinery. Here is one for specific machinery instead. Maybe packages could optionally provide a options (or meta.options) attribute as with NixOS modules. This could specify what options (flags) could be provided, their types (i.e., boolean, string, etc.), and document them. All of which would make for a very good user experience (think help and error messages).
This might ultimately also dovetail nicely with also having a better config system. That is, one where options are declared in a modular manner, documented, and the user's config is verified against them in order to provide a top-level pkgs config attribute, rather than the current case of the top-level config attribute just be sucked in from ~/.config/nixpkgs/config.nix. Deeper operations (i.e., more fundamental modifications to nixpkgs) would then be left to be done as overlays.
In terms of the command line usage, you could imagine the NixOs options/config machinery merging and verifying nixpkgs.config from /etc/nixos/config.nix, ~/.config/nixpkgs/config.nix, and finally a config specification generated from the command line options to provide the top level config attribute to nixpkgs. A high-level package like python could then provide a packages list-of-strings option declaration and access it via the top-level config.python.packages attribute.
nix run nixpkgs.python --packages numpy scipy -- nixpkgs.gcc
Can we close this ticket? It feels to me like it's not terribly useful any more. If anyone has issues with the new UI, then it's probably better to open a new, specific ticket about that.
Reacted by Matthias Beyer, Jonas Chevalier, Anton Latukha, Profpatsch and Benedict Aas
It appears that nix install doesn't exist yet (and I am not personally convinced imperative package management with nix is a good idea). Is there a plan to replace nix-env eventually? Is there a GitHub issue?
Reacted by Gábor Lehel, Matthias Beyer, Ole Jørgen Brønner, Josh Glendenning, Peter Waller, Yc. Shen, davidak, Matt Gathu and Bob van der Linden
The problem is that the new commands are not stable yet. Using them requires use of unstable nix in addition to adding experimental flags in nix.conf. newcomers will be confused. This all just adds just additional complexity to using nix which is totally unnecessary.
Personally I think this issue is still open as the new command redesign is not released yet.
Activity
Profpatsch commentedon Jan 21, 2016
I did a little writeup with my thoughts & proposals:
https://gist.github.com/Profpatsch/d5c8e1ccd68baab0e3f0
In that I address the problem of search path clashes @edolstra mentioned in the General section.
[-]Redesign of the nix tool[/-][+]Redesign of the nix command line[/+]Ericson2314 commentedon Jan 22, 2016
(Commenting here as @copumpkin requested)
I strongly agree with @Profpatsch's points. To be fair there, there is a use for imperative package management, as articulated by @lethalman in #684. Since under @Profpatsch's plan the profile is always defined declarative, and since @lethalman's usecases boil down to pinning the exact version of a package, I think we should speak of "pinned" vs "regular" packages.
I'm reminded of git changing the default push settings. I suggest we disable this by default, and then have a setting to enable this power users can enable. In the name of orthogonality, I also propose that the setting be that the namespace is queried unless
default.nix/shell.nixis present, and have it apply to at leastnix buildandnix usein addition tonix shell. [I don't thinknix installshould have this, because that command is more global, and it violates our new attribute path agenda].Ericson2314 commentedon Jan 22, 2016
More broadly, I see a convergence in the way userland nix and nixos are configured and used. We've already talked about using the nixos module system both for user-mode services (e.g. on OSX), and for configuring packages. Likewise there was recently a thread to the mailing list about decoratively pinning nixpkgs for nixos in https://www.mail-archive.com/[email protected]/msg17827.html .
Ultimately It would be great if root and normal users alike can define and enable service and packages in the same module system, and the same CLI tools can assist with querying and editing the config files.
Converging all this will take a great deal of work, but I think a few decisions can be made now to help the process go faster. In the thread I linked, @edolstra mentioned we could use
fetchTarball, or move the module system in nix itself (presumably into the corepkgs). We have a similar choice for the UI itself---to use the git terminology, we could have just the minimal plumbing commands in nix, and porcelain commands likenix installkept elsewhere for more rapid iteration. [This also provides a way to makenix replwork without bundling the repl with nix].zimbatm commentedon Jan 23, 2016
Is it possible to cut down the proposal to the essentials ? It's good to show the end-goal but for implementation it might be a bit daunting. How would we go on implementing all of this ? Are we going to port one command at the time and update the docs accordingly ?
One thing that might feel inherent but that needs to be specified is that the
nixexecutable wouldn't be doing much, it would behaves likegitand just dispatch sub-commands tonix-<command>executables in it's libexec/ and PATH.vcunat commentedon Jan 24, 2016
First my strongest points:
nix -i bash,nix -q foo, another way is allowing to use a unique prefix of a command likebtrfs fi defforbtrfs filesystem defragment. Enhanced alternative: allow defining aliases, e.g. likegit.nix install 'foo.override { myOption = bar; }', I want to keep the override even afternix upgrade foo.--dry-runand then ask for confirmation whether to proceed.Now some replies:
nix buildis what adds stuff into the store (and a symlink into the current directory). To most people "installation" is expect to do much more than that, e.g. make$PATHcontain the executables, etc.nixpkgs.pkgs.prefix seems redundant. Anyone can introduce extra namespaces viapackageOverridesalready. (I use it to define personalized easy to update custom package sets.) There's only a singlenixpkgs=...in$NIX_PATHand that should be the default namespace, I believe.More detailed thoughts of mine, ordered according to the original proposal:
nix search --name foois rather confusing terminology, as we'll likely want the attribute name to be the (unqualified) namenix install--declarative: rather--auto-updateor similar. Calling it "declarative" just seems strange to me (from a fresh point of view).-f: perhaps replace by-Ito handle all$NIX_PATHchanges more consistently?machine:package: also support the other direction?nix rebuild: wouldn't that better be somewhere innix upgrade? For example,nix upgradeby itself working only on auto-upgraded packages and with-aor--alldoing the "usual" upgrade?nix upgrade: maybe I likeupdatebetter. From some mainstream distro I've fixedupgradeas something big and dangerous... but we could e.g. make them synonymous.nix listandnix status: these two seem to work too similar to warrant extra (top-level) subcommands. Perhaps call itnix queryornix infoinstead. (Also noted by @trishume.)nix uninstall: maybeunlink? (analogy to UNIX* traditions around file deletion)nix rollback: could be alsoundo, butrollbackseems a more popular term in general. Improvement: generations might remember which one came before, as currentlynix-env --rollback; nix-env -i foo; nix-env --rollbackdoes an unintuitive thing.nix use,nix sandbox,nix shell: very similar, again. Maybenix use --sandboxor--pureor something...nix query-options: perhaps this doesn't warrant another subcommand. I'd join this with the above, e.g.nix query --options bashandnix query --plugins firefox.firefox-esrattribute we should have an option, e.g.variant="esr". Similarly for thebarFullpackages, etc.nix build: again the-fconsiderations.nix replandnix eval: similar, maybenix eval -ior--interactive, though "repl" might be too well remembered already.nix make-store-derivation: why notnix-build --drvinstead? It should do the same thing, only stop after instantiation.nix fetch-url: maybe havenix fetchinstead, accepting multiple schemes:https?,ftp,git, ...--unpackasfetchzipequivalent.nix fetch-closure,nix send-closure: maybe not needed when we allownix build --from machine /some/store/pathand--tosimilarly.nix query-closure,nix closure-size: why notnix query --closure...?nix path-info,nix substitutes: why not undernix query?nix source: perhaps add--rollbackto address some concerns.Profpatsch commentedon Jan 25, 2016
+1 for unique substrings of command names, -1 for alias definiton (that’s what the shell is for, and the git folks got it all wrong!)
What should be in scope by default?
I find that absolutely crucial with a “destructive” package manager like e.g.
pacman, but what use is it with nix?Yet, that is not useful if one uses two versions of e.g. nixpkgs, e.g.
15.09andmaster(which is a pretty standard usecase).glaebhoerl commentedon Jan 25, 2016
@vcunat I notice that wherever you suggested a third level in the hierarchy, you did it as an
--option; but couldn't it be turtles all the way down, so that sub-subcommands look and work the same as subcommands, e.g.nix query closureinstead ofnix query --closure?vcunat commentedon Jan 26, 2016
@Profpatsch: how do you simply define aliases for sub-commands in bash?
I imagine it like this: the default
$NIX_PATHpoints to some channel so I can usenix install bashdirectly, and if I want to use a different nixpkgs tree (channel), I'll have other ways to do that, among them e.g. modifying$NIX_PATHby-Ioptions.Personally, I sometimes like to see what would happen beforehand, instead of doing it and the rolling back immediately.
Even today you should be able to do this:
Other ways are e.g. adding
nixpkgs-15.09=...into$NIX_PATHinstead and importing that. Of course, we could automatize something like this when adding channels, in some way...(And even today you can relatively simply get rid of the prefixes; the only question is what should be the default. There was a similar discussion on the mailing-list a couple days ago.)
@glaebhoerl: for clarity reasons, I assume it's better to prefix by
--in cases where it's optional to specify a sub-command. For example, if we allowednix query git bashto display information about multiple packages, it would seems strange to allownix query closure bashand instead I feel it would be better to havenix query --closure bash.CMCDragonkai commentedon Jan 27, 2016
@vcunat Yea I think the functionality should be in REPL or in the manual. See for example the Haskell documentation, and how if you look up the source for any particular function, it points to the actual implementation. For the REPL if it could show the type signature (even though nix is untyped, it could just be manually specified, like a help page for that exact command), that would be great.
cstrahan commentedon Jan 28, 2016
Once some of the initial discussion settles down, I would suggest creating a new repo to host a design document. PRs would then be issued to get feedback on proposals before updating the doc.
I'm really enjoying the level of discourse here, but I think it's important that we have an authoritative document so we're all on the same page, and have a more directed approach to converging on a final, actionable design.
Ideally, we'd have @edolstra and a couple others that we could trust to review and give feedback on each proposal, merging in the changes if they sound good.
A deadline for the design might also be a good idea, to avoid this work languishing.
Thoughts?
cstrahan commentedon Jan 28, 2016
Alternatively, we could just have @edolstra comb through all the commentary, and in true BDFL fashion, develop the final design to his liking :). Whatever works best for us / @edolstra.
vcunat commentedon Jan 28, 2016
Yes, a very good point. Best agree on basics of the UI before implementation (perhaps except for some prototypes).
Profpatsch commentedon Jan 29, 2016
It’s nice to see the difference between built-in and not. Otherwise you sit at a different system and wonder why the most basic commands are missing …
packageOverridesis dependent on nixpkgs, though. I don’t like the idea that most functionality of nix only works in conjunction with the default package set. In the same manner I don’t think we should hardcode the stringnixpkgsanywhere in nix.CMCDragonkai commentedon Mar 21, 2016
Based on my email:
I would like to suggest that any querying functionality should include the ability to show package parameters.
52 remaining items
CMCDragonkai commentedon Jan 13, 2018
Regardless of how the final syntax is, it would be great if all the language-specific packages had the same style of invocation.
twhitehead commentedon Jan 13, 2018
@hedning @CMCDragonkai with regard to options and the same style of invocation, maybe it would be possible to add command line options that do common invocation things (thus also encourage further packages to implement those invocation styles).
For example, a
--with-packagesoption could be addednix run nixpkgs.python3 --with-packages 'numpy matplotlib'that, given the above, would check if nixpkgs.python3 has a withPackages attribute and then invoke it like so
Likewise, an
--overrideoption could be addedthat would check for an
overrideattribute and then invoke it like so if it existsThis has the advantage of being fairly future proof as it provides a layer of abstraction between the user and the continuously evolving nixpkgs interfaces. Options can be added, deprecated, removed, or even just have their internal implementation details changed to continue providing the same functionality against new nixpkgs interfaces.
One pain I could see is that as
nixpkgsevolves,nixwould start having to check versions to provide the appropriate glue code. This suggests that possible the majority of the functionality should live innixpkgsitself. For example,nixpkgscould provide a top-level attribute set thatnixcan use to extend the options it takes. Combined with a standard way of serializing option data,nixcould then accept these options and invoke the correspondingnixpkgsexpressions and let them manipulate the underlyingnixexpression that is ultimately used.That is,
nixwould start with an expression for the specified attribute. This would be passed to the option function corresponding to the first option along with the serialized option data. This would give a new expression, which would then be passed to the option function corresponding to the second option along with its serialized option data and so on until there are no more options. Thennixuses the final expression to obtain the required derivation instead of the specified initial attribute.twhitehead commentedon Feb 4, 2018
I was thinking some more about this, and had another suggestion along these lines. What if individual packages could be passed command line options, so something like this
would be translated into something like this
That is, if a set of options are specified after an attribute selection, they are collected into an attribute set and passed to a
cmdlinehandling attribute of the selection attribute (or whatever name would be appropriate) if it exists, otherwise anxdoes not support command line options error is generated.Thanks! -Tyson
twhitehead commentedon Feb 4, 2018
There is an interesting trade off between providing a generic (more power, the ultimate being an arbitrary function transformation) and a specific interface (better error messages and such) for these things. It seems you want to be a specific as possible but no more specific. This allowing everything that needs to be done to be done while still giving the best possible error messages and such.
Most of my suggestions so far have been for generic machinery. Here is one for specific machinery instead. Maybe packages could optionally provide a
options(ormeta.options) attribute as with NixOS modules. This could specify what options (flags) could be provided, their types (i.e., boolean, string, etc.), and document them. All of which would make for a very good user experience (think help and error messages).This might ultimately also dovetail nicely with also having a better config system. That is, one where options are declared in a modular manner, documented, and the user's config is verified against them in order to provide a top-level pkgs
configattribute, rather than the current case of the top-levelconfigattribute just be sucked in from ~/.config/nixpkgs/config.nix. Deeper operations (i.e., more fundamental modifications to nixpkgs) would then be left to be done as overlays.In terms of the command line usage, you could imagine the NixOs options/config machinery merging and verifying
nixpkgs.configfrom /etc/nixos/config.nix, ~/.config/nixpkgs/config.nix, and finally a config specification generated from the command line options to provide the top levelconfigattribute to nixpkgs. A high-level package like python could then provide apackageslist-of-strings option declaration and access it via the top-levelconfig.python.packagesattribute.peti commentedon Apr 21, 2018
Can we close this ticket? It feels to me like it's not terribly useful any more. If anyone has issues with the new UI, then it's probably better to open a new, specific ticket about that.
CMCDragonkai commentedon Apr 27, 2018
Did everything mentioned here get addressed? If not, maybe they can be packaged into a feature wish-list wiki?
lrworth commentedon Oct 15, 2019
Since
nixis a bit confusing for beginners and this GitHub issue is a main source of information, here are the release notes where this tool was introduced, and one of the few places this tool is documented: https://nixos.org/nix/manual/#ssec-relnotes-2.0It appears that
nix installdoesn't exist yet (and I am not personally convinced imperative package management with nix is a good idea). Is there a plan to replacenix-enveventually? Is there a GitHub issue?aaronjanse commentedon Oct 25, 2020
@lrworth There's now the experimental
nix profile installto do that. See https://nixos.wiki/wiki/Nix_command/profile(yes, it's been a year, but I'm still seeing this issue in search results, so I thought I'd answer for future visits)
bobvanderlinden commentedon Oct 25, 2020
The problem is that the new commands are not stable yet. Using them requires use of unstable nix in addition to adding experimental flags in nix.conf. newcomers will be confused. This all just adds just additional complexity to using nix which is totally unnecessary.
Personally I think this issue is still open as the new command redesign is not released yet.
nrdxp commentedon Jun 29, 2021
Plus 1 for reopening, but there is now also a guideline for more information at least:
https://github.com/NixOS/nix/blob/master/doc/manual/src/contributing/cli-guideline.md
Merge pull request NixOS#779 from fricklerhandwerk/fix-styling
Merge pull request NixOS#779 from DeterminateSystems/alloc-overflow-o…