feat: add wip for 'sd-image-aarch64' image
This commit is contained in:
35
flake.nix
35
flake.nix
@@ -76,15 +76,32 @@
|
|||||||
nix.nixPath = [
|
nix.nixPath = [
|
||||||
"nixpkgs=${inputs.nixpkgs}"
|
"nixpkgs=${inputs.nixpkgs}"
|
||||||
]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md>
|
]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md>
|
||||||
nixosConfigurations = lib.genAttrs hostDirNames (
|
nixosConfigurations =
|
||||||
host:
|
(lib.genAttrs hostDirNames (
|
||||||
nixpkgs.lib.nixosSystem {
|
host:
|
||||||
modules = [ ./hosts/${host} ];
|
nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
modules = [ ./hosts/${host} ];
|
||||||
inherit inputs outputs dotsPath;
|
specialArgs = {
|
||||||
|
inherit inputs outputs dotsPath;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
))
|
||||||
|
// {
|
||||||
|
sd-image-aarch64 = nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
||||||
|
./images/sd-image-aarch64.nix
|
||||||
|
{
|
||||||
|
nixpkgs.config.allowUnsupportedSystem = true;
|
||||||
|
nixpkgs.hostPlatform.system = "aarch64-linux";
|
||||||
|
nixpkgs.buildPlatform.system = "x86_64-linux";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs outputs dotsPath;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
);
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
work = home-manager.lib.homeManagerConfiguration {
|
work = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
@@ -115,5 +132,7 @@
|
|||||||
inputs
|
inputs
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
images.sd-image-aarch64 = self.nixosConfigurations.sd-image-aarch64.config.system.build.sdImage;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
9
images/sd-image-aarch64.nix
Normal file
9
images/sd-image-aarch64.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# see <https://nixos.wiki/wiki/NixOS_on_ARM#Build_your_own_image_natively>
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../modules/ssh/hardened-openssh.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
ssh.username = "root";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user