Creating a NixOS live CD/en: Difference between revisions
Updating to match new version of source page |
Updating to match new version of source page |
||
Line 40: | Line 40: | ||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; | ||
outputs = { self, nixpkgs }: { | outputs = { self, nixpkgs }: { | ||
packages.x86_64-linux.default = self.nixosConfigurations.exampleIso.config.system.build.isoImage; | |||
nixosConfigurations = { | nixosConfigurations = { | ||
exampleIso = nixpkgs.lib.nixosSystem { | exampleIso = nixpkgs.lib.nixosSystem { | ||
Line 58: | Line 59: | ||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
# nix build path:$PWD | |||
# nix build | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 109: | Line 109: | ||
Static IP addresses can be set in the image itself. This can be useful for VPS installation. | Static IP addresses can be set in the image itself. This can be useful for VPS installation. | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix" line="1"> | ||
{ | { | ||
... | ... | ||
networking = { | networking = { | ||
usePredictableInterfaceNames = false; | usePredictableInterfaceNames = false; | ||
interfaces.eth0. | interfaces.eth0.ipv4.addresses = [{ | ||
address = "64.137.201.46"; | address = "64.137.201.46"; | ||
prefixLength = 24; | prefixLength = 24; |