Add nixos-generators for making a raw installer image
This commit is contained in:
parent
18ad437872
commit
18929d1982
37
flake.lock
generated
37
flake.lock
generated
@ -1,5 +1,41 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"nixlib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1723942470,
|
||||||
|
"narHash": "sha256-QdSArN0xKESEOTcv+3kE6yu4B4WX9lupZ4+Htx3RXGg=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "531a2e8416a6d8200a53eddfbdb8f2c8dc4a1251",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-generators": {
|
||||||
|
"inputs": {
|
||||||
|
"nixlib": "nixlib",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724028932,
|
||||||
|
"narHash": "sha256-U11ZiQPrpIBdv7oS23bNdX9GCxe/hPf/ARr64P2Wj1Y=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"rev": "5fd22603892e4ec5ac6085058ed658243143aacd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixos-generators",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720954236,
|
"lastModified": 1720954236,
|
||||||
@ -18,6 +54,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
20
flake.nix
20
flake.nix
@ -3,11 +3,16 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||||
|
nixos-generators = {
|
||||||
|
url = "github:nix-community/nixos-generators";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
nixos-generators,
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
supportedSystems = [
|
supportedSystems = [
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
@ -69,6 +74,21 @@
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
installer-iso = inputs.self.nixosConfigurations.installer.config.system.build.isoImage;
|
installer-iso = inputs.self.nixosConfigurations.installer.config.system.build.isoImage;
|
||||||
|
|
||||||
|
installer-image = nixos-generators.nixosGenerate {
|
||||||
|
system = system;
|
||||||
|
specialArgs = {
|
||||||
|
pkgs = pkgs;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
# Pin nixpkgs to the flake input, so that the packages installed
|
||||||
|
# come from the flake inputs.nixpkgs.url.
|
||||||
|
({ ... }: { nix.registry.nixpkgs.flake = nixpkgs; })
|
||||||
|
# Apply the rest of the config.
|
||||||
|
./machines/installer-image
|
||||||
|
];
|
||||||
|
format = "raw-efi";
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
apps = forAllSystems (system: {
|
apps = forAllSystems (system: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user