From c316fe1bda1007907a0e282390d0474f931f111f Mon Sep 17 00:00:00 2001 From: Hektor Misplon Date: Sat, 31 Jan 2026 19:06:39 +0100 Subject: [PATCH] feat: add wip for 'sd-image-aarch64' image --- flake.nix | 35 +++++++++++++++++++++++++++-------- images/sd-image-aarch64.nix | 9 +++++++++ 2 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 images/sd-image-aarch64.nix diff --git a/flake.nix b/flake.nix index 097bd7e..835478b 100644 --- a/flake.nix +++ b/flake.nix @@ -76,15 +76,32 @@ nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; # - 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; }; } diff --git a/images/sd-image-aarch64.nix b/images/sd-image-aarch64.nix new file mode 100644 index 0000000..91e6d69 --- /dev/null +++ b/images/sd-image-aarch64.nix @@ -0,0 +1,9 @@ +# see + +{ + imports = [ + ../modules/ssh/hardened-openssh.nix + ]; + + ssh.username = "root"; +}