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 = [
|
||||
"nixpkgs=${inputs.nixpkgs}"
|
||||
]; # <https://github.com/nix-community/nixd/blob/main/nixd/docs/configuration.md>
|
||||
nixosConfigurations = lib.genAttrs hostDirNames (
|
||||
host:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./hosts/${host} ];
|
||||
specialArgs = {
|
||||
inherit inputs outputs dotsPath;
|
||||
nixosConfigurations =
|
||||
(lib.genAttrs hostDirNames (
|
||||
host:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./hosts/${host} ];
|
||||
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 = {
|
||||
work = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
@@ -115,5 +132,7 @@
|
||||
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