mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2025-08-09 20:57:37 +02:00
fix: style
This commit is contained in:
@ -59,19 +59,22 @@ cat flake.nix
|
||||
Referencing this template, create the file `/etc/nixos/flake.nix` and write the configuration content. All subsequent system modifications will be taken over by Nix Flakes.
|
||||
Here's an example of the content:
|
||||
|
||||
```nix
|
||||
```nix{16}
|
||||
{
|
||||
description = "A simple NixOS flake";
|
||||
|
||||
inputs = {
|
||||
# NixOS official package source, using the nixos-23.11 branch here
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs: {
|
||||
# Please replace my-nixos with your hostname
|
||||
nixosConfigurations.my-nixos = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
# Import the previous configuration.nix we used, so the old configuration file still takes effect
|
||||
# Import the previous configuration.nix we used,
|
||||
# so the old configuration file still takes effect
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
|
Reference in New Issue
Block a user