forked from c3d2/nix-config
flake.nix: add ${host}-sdImage package
This commit is contained in:
parent
7efcdafb33
commit
ca01abceb8
16
flake.nix
16
flake.nix
|
@ -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";
|
||||
|
|
|
@ -16,7 +16,6 @@ in
|
|||
boot = {
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = false;
|
||||
raspberryPi = {
|
||||
enable = true;
|
||||
version = 3;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue