add flake attribute apps to make it easier to run (#2442)

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.
This commit is contained in:
contrun 2021-11-23 14:36:55 +08:00 committed by GitHub
parent c2aa831491
commit c4c761ba55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,6 +30,15 @@
defaultPackage = defaultPackage =
forAllSystems (system: self.packages.${system}.home-manager); forAllSystems (system: self.packages.${system}.home-manager);
apps = forAllSystems (system: {
home-manager = {
type = "app";
program = "${defaultPackage.${system}}/bin/home-manager";
};
});
defaultApp = forAllSystems (system: apps.${system}.home-manager);
lib = { lib = {
hm = import ./modules/lib { lib = nixpkgs.lib; }; hm = import ./modules/lib { lib = nixpkgs.lib; };
homeManagerConfiguration = { configuration, system, homeDirectory homeManagerConfiguration = { configuration, system, homeDirectory