NixOS system configuration: Difference between revisions

Toastal (talk | contribs)
Remove the word “modern” for an experimental API as it suggests stable code is not modern
m removed the carets in nixosConifgurations."hostname" because they were breaking and showing nonsense characters.
 
Line 180: Line 180:
==== Importing packages from multiple nixpkgs branches ====
==== Importing packages from multiple nixpkgs branches ====


A NixOS config flake could be as follows (replace <hostname> with your hostname):
A NixOS config flake could be as follows (replace hostname with your hostname):


{{file|3=<nowiki>
{{file|3=<nowiki>
Line 194: Line 194:
     { nixpkgs, nixpkgs-unstable, ... }:
     { nixpkgs, nixpkgs-unstable, ... }:
     {
     {
       nixosConfigurations."<hostname>" = nixpkgs.lib.nixosSystem {
       nixosConfigurations."hostname" = nixpkgs.lib.nixosSystem {
         modules = [
         modules = [
           {
           {