Flakes: Difference between revisions

imported>R-k-b
Direnv integration: Let readers know manually copying the use_flake function may no longer be necessary
imported>Flubbard
Mention nix 2.7 'default' changes
Line 152: Line 152:
   packages."<system>"."<name>" = derivation;
   packages."<system>"."<name>" = derivation;
   # Executed by `nix build .`
   # Executed by `nix build .`
  # From nix >= 2.7, this is now 'packages.<system>.default'
   defaultPackage."<system>" = derivation;
   defaultPackage."<system>" = derivation;
   # Executed by `nix run .#<name>`
   # Executed by `nix run .#<name>`
Line 159: Line 160:
   };
   };
   # Executed by `nix run . -- <args?>`
   # Executed by `nix run . -- <args?>`
  # From nix >= 2.7, this is now 'apps.<system>.default'
   defaultApp."<system>" = { type = "app"; program = "..."; };
   defaultApp."<system>" = { type = "app"; program = "..."; };
    
    
Line 175: Line 177:
   nixosConfigurations."<hostname>" = {};
   nixosConfigurations."<hostname>" = {};
   # Used by `nix develop`
   # Used by `nix develop`
  # From nix >= 2.7, this is now 'devShells.<system>.default'
   devShell."<system>" = derivation;
   devShell."<system>" = derivation;
   # Used by `nix develop .#<name>`
   # Used by `nix develop .#<name>`