|
1 | 1 | # This is a basic NixOS flake template for a live ISO image
|
2 | 2 | # that can be used to install NixOS on a system.
|
3 |
| -# ISO can be built using |
| 3 | +# ISO can be built using |
4 | 4 | # `nix build .#nixosConfigurations.nixos-iso.config.system.build.isoImage` - Graphical ISO
|
5 | 5 | # `nix build .#nixosConfigurations.nixos-minimal.config.system.build.isoImage` - Minimal ISO
|
6 | 6 | # Make sure to enable flakes and nix-command on the host system, before building the ISO
|
7 | 7 | # Resulting image can be found in ./result/iso/ directory
|
8 |
| - |
9 | 8 | {
|
10 | 9 | description = "Unstable NixOS custom installation media";
|
11 | 10 | inputs = {
|
12 | 11 | nixpkgs.url = "nixpkgs/nixos-unstable";
|
13 | 12 | bcachefs-tools.url = "github:koverstreet/bcachefs-tools";
|
14 | 13 | };
|
15 |
| - outputs = |
16 |
| - { self, nixpkgs, ... }@inputs: |
17 |
| - let |
18 |
| - system = "x86_64-linux"; # change arch here |
| 14 | + outputs = { |
| 15 | + self, |
| 16 | + nixpkgs, |
| 17 | + ... |
| 18 | + } @ inputs: let |
| 19 | + system = "x86_64-linux"; # change arch here |
19 | 20 |
|
20 |
| - specialArgs = { |
21 |
| - inherit system; |
22 |
| - inherit inputs; |
23 |
| - }; |
24 |
| - in |
25 |
| - { |
26 |
| - ## GRAPHICAL ISO ## |
27 |
| - nixosConfigurations.nixos-iso = nixpkgs.lib.nixosSystem { |
28 |
| - inherit system; |
29 |
| - modules = [ |
30 |
| - "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix" |
31 |
| - "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" |
32 |
| - ./graphical-configuration.nix |
33 |
| - ]; |
34 |
| - inherit specialArgs; |
35 |
| - }; |
36 |
| - ## MINIMAL ISO ## |
37 |
| - nixosConfigurations.nixos-minimal = nixpkgs.lib.nixosSystem { |
38 |
| - inherit system; |
39 |
| - modules = [ |
40 |
| - "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" |
41 |
| - ./minimal-configuration.nix |
42 |
| - ]; |
43 |
| - inherit specialArgs; |
44 |
| - }; |
| 21 | + specialArgs = { |
| 22 | + inherit system; |
| 23 | + inherit inputs; |
| 24 | + }; |
| 25 | + in { |
| 26 | + formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra; |
| 27 | + ## GRAPHICAL ISO ## |
| 28 | + nixosConfigurations.nixos-iso = nixpkgs.lib.nixosSystem { |
| 29 | + inherit system; |
| 30 | + modules = [ |
| 31 | + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix" |
| 32 | + "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" |
| 33 | + ./graphical-configuration.nix |
| 34 | + ]; |
| 35 | + inherit specialArgs; |
45 | 36 | };
|
| 37 | + ## MINIMAL ISO ## |
| 38 | + nixosConfigurations.nixos-minimal = nixpkgs.lib.nixosSystem { |
| 39 | + inherit system; |
| 40 | + modules = [ |
| 41 | + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" |
| 42 | + ./minimal-configuration.nix |
| 43 | + ]; |
| 44 | + inherit specialArgs; |
| 45 | + }; |
| 46 | + }; |
46 | 47 | }
|
0 commit comments