-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add flake attribute apps to make it easier to run #2442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Can you remove the committed flake.lock
file?
@berbiche It seems |
The downside is that we would need to keep HM's flake inputs updated and we currently do not have an automated way of doing it. |
This change also adds the required flake.lock. As a result, home-manager can be ran with `nix run --no-write-lock-file github:nix-community/home-manager`. This is useful for people who want to try out home-manager or, want to bootstrap their home-environment.
Home Manager can be ran with `nix run --no-write-lock-file github:nix-community/home-manager`. This is useful for people who want to try out Home Manager or, want to bootstrap their home-environment.
@contrun thanks for this, what do you think about having the defaultApp be flake native, e.g. add I mentioned this earlier here: With such a wrapper we could have:
And for the non-flake one it could be something like:
|
@terlar I agree. Currently we can use flake for home-manager by passing |
Noob question (I reported the #2523, so I'm an interested party noob): could it make sense to do the detection based on whether a To my noobish eyes this sounds reasonable: if someone has a |
@akavel All the configuration should be contained in the flake itself. That's the whole point of nix flakes, to make the building hermetic. Flake version of home-manager shouldn't depend on host-specific behavior. |
Why was this added? The default behaviour of Adding an app would only be useful if we wanted to add a default Also note that this stopped working in Nix 2.8: NixOS/nix#6448 (comment) Dropping apps in #2971 |
Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment)
Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment)
Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment)
* Add flake.lock and clean up flake.nix Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see #2442 (comment) * nixos,nix-darwin: factor out into a common module * nixos,nix-darwin: make `home-managers.users` shallowly visible Make sure the option is included in the NixOS/nix-darwin manual (but the HM submodule options aren't). Also add a static description to the HM submodule type so that we don't need to evaluate the submodules just to build the option manual. This makes nixos-search able to index the home-manager flake. Also clean up some TODOs. * flake: add nmd and nmt This avoids having to use `pkgs.fetchFromGitLab` in an IFD, which causes issues when indexing packages with nixos-search because `pkgs` is instantiated with every platform.
* Add flake.lock and clean up flake.nix Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment) * nixos,nix-darwin: factor out into a common module * nixos,nix-darwin: make `home-managers.users` shallowly visible Make sure the option is included in the NixOS/nix-darwin manual (but the HM submodule options aren't). Also add a static description to the HM submodule type so that we don't need to evaluate the submodules just to build the option manual. This makes nixos-search able to index the home-manager flake. Also clean up some TODOs. * flake: add nmd and nmt This avoids having to use `pkgs.fetchFromGitLab` in an IFD, which causes issues when indexing packages with nixos-search because `pkgs` is instantiated with every platform.
* Add flake.lock and clean up flake.nix Add a lockfile to work around NixOS/nix#6541 (and because it's a good idea anyway). Also use flake-utils, and restrict ourselves to the five platforms supported by nixpkgs. Otherwise, the IFD for nmd fails on weird platforms. This fixes `nix flake check`. Remove the redundant `apps` output, see nix-community#2442 (comment) * nixos,nix-darwin: factor out into a common module * nixos,nix-darwin: make `home-managers.users` shallowly visible Make sure the option is included in the NixOS/nix-darwin manual (but the HM submodule options aren't). Also add a static description to the HM submodule type so that we don't need to evaluate the submodules just to build the option manual. This makes nixos-search able to index the home-manager flake. Also clean up some TODOs. * flake: add nmd and nmt This avoids having to use `pkgs.fetchFromGitLab` in an IFD, which causes issues when indexing packages with nixos-search because `pkgs` is instantiated with every platform.
Description
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Added myself as module maintainer. See example.
Added myself and the module files to
.github/CODEOWNERS
.