Skip to content

Commit

Permalink
Remove install image packages and expose hardware config
Browse files Browse the repository at this point in the history
  • Loading branch information
simonswine committed Nov 6, 2024
1 parent 969da95 commit 54f1a49
Showing 1 changed file with 4 additions and 37 deletions.
41 changes: 4 additions & 37 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -138,43 +138,6 @@
};

packages = {
# Install images should only come with the minimal set of config/packages to boot and then the rest is done using nixos-rebuild
install-images =
let
baseInstallModules = [
./modules/ssh-pub-keys.nix
({ config, ... }: {
nix.registry.nixpkgs.flake = inputs.nixpkgs;
services.openssh.enable = true;
users.extraUsers.root.openssh.authorizedKeys.keys = config.swine.ssh.pubkeys.simonswine;
system.stateVersion = "24.05";
})
];
in
{
# tested for raspberry pi 4
generic = inputs.nixos-generators.nixosGenerate {
inherit system;
modules = baseInstallModules;
specialArgs = {
pkgs = pkgs;
};
format = "sd-aarch64";
};

orangepi5plus = inputs.nixos-generators.nixosGenerate {
inherit system;
modules = baseInstallModules ++ [
./install-image/orangepi5plus.nix
./hardware/orangepi5plus/default.nix
];
specialArgs = {
pkgs = pkgs;
};
format = "sd-aarch64";
};
};

hcloud-kexec = inputs.nixos-generators.nixosGenerate {
system = system;
modules = [
Expand Down Expand Up @@ -266,6 +229,10 @@
)
);

hardware = {
orangepi5plus = ./hardware/orangepi5plus/default.nix;
};

installImages = {
aarch64-linux = self.nixosConfigurations.install-image-aarch64-linux.config.system.build.sdImage;
orangepi5plus = self.nixosConfigurations.install-image-orangepi5plus.config.system.build.sdImage;
Expand Down

0 comments on commit 54f1a49

Please sign in to comment.