Flakes: Difference between revisions

imported>JaviMerino
Use the nixos-unstable branch of nixpkgs as an example of using nix flakes with NixOS instead of nixpkgs master
imported>Fd
m Update cli use
Line 130: Line 130:
   # Default module
   # Default module
   nixosModules.default = { config }: { options = {}; config = {}; };
   nixosModules.default = { config }: { options = {}; config = {}; };
   # Used with `nixos-rebuild --flake .#<hostname>`
   # Used with `nixos-rebuild switch --flake .#<hostname>`
   # nixosConfigurations."<hostname>".config.system.build.toplevel must be a derivation
   # nixosConfigurations."<hostname>".config.system.build.toplevel must be a derivation
   nixosConfigurations."<hostname>" = {};
   nixosConfigurations."<hostname>" = {};