flake.nix: add ${host}-sdImage package

This commit is contained in:
Astro 2021-09-23 19:34:09 +02:00
parent 7efcdafb33
commit ca01abceb8
3 changed files with 18 additions and 6 deletions

View File

@ -160,7 +160,13 @@
nix-copy-closure --to ${target} ${profile}
exec ssh -t ${target} "${profile}/bin/switch-to-configuration $@"
'';
}) {} (builtins.attrNames flakifiedHosts)
}) {} (builtins.attrNames flakifiedHosts) //
builtins.foldl' (result: host: result // {
"${host}-sdImage" = self.nixosConfigurations.${host}.config.system.build.sdImage;
}) {} (builtins.attrNames (nixpkgs.lib.filterAttrs (host: nixosConfiguration:
nixosConfiguration.config.system.build ? sdImage
) self.nixosConfigurations))
);
nixosConfigurations = let
@ -169,7 +175,7 @@
{ nixpkgs ? inputs.nixpkgs, extraArgs ? {}, ... }@args:
nixpkgs.lib.nixosSystem (nixpkgs.lib.filterAttrs (n: _: n != "nixpkgs") args // {
extraArgs = extraArgs // {
inherit hostRegistry;
inherit hostRegistry inputs;
};
extraModules = [
self.nixosModules.c3d2
@ -207,12 +213,16 @@
};
pulsebert = nixosSystem' {
modules = [ ./hosts/pulsebert ];
modules = [
"${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./hosts/pulsebert
];
system = "aarch64-linux";
};
radiobert = nixosSystem' {
modules = [
"${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
./hosts/radiobert
];
system = "aarch64-linux";

View File

@ -16,7 +16,6 @@ in
boot = {
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = false;
raspberryPi = {
enable = true;
version = 3;

View File

@ -22,11 +22,9 @@
#networking.wireless.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
boot = {
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = false;
raspberryPi = {
enable = true;
version = 3;
@ -43,6 +41,11 @@
tmpOnTmpfs = true;
};
sdImage = {
compressImage = false;
imageBaseName = config.networking.hostName;
firmwareSize = 512;
};
c3d2 = {
isInHq = true;