Add Raspberry Pi 4 host

This commit is contained in:
2023-12-16 23:47:43 +00:00
parent 26be10bd0c
commit 47f665b742
6 changed files with 159 additions and 10 deletions

View File

@ -12,6 +12,7 @@
url = "github:rafaelmardojai/firefox-gnome-theme";
flake = false;
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
secrets = {
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
flake = false;
@ -22,7 +23,7 @@
};
};
outputs = inputs @ { self, nixpkgs, agenix, home-manager, secrets, ... }:
outputs = inputs @ { self, nixpkgs, agenix, home-manager, nixos-hardware, secrets, ... }:
let
nixpkgsForSystem = system: inputs.nixpkgs;
overlays = [
@ -34,7 +35,7 @@
home-manager.nixosModule
./modules
];
nixosSystem = system: name:
nixosSystem = { system, name, extraModules ? [] }:
let
nixpkgs = nixpkgsForSystem system;
lib = (import nixpkgs { inherit overlays system; }).lib;
@ -56,15 +57,17 @@
};
})
./hosts/${name}
];
] ++ extraModules;
};
nixosConfigurations = {
atlas = nixosSystem "x86_64-linux" "atlas";
eos = nixosSystem "x86_64-linux" "eos";
helios = nixosSystem "x86_64-linux" "helios";
odyssey = nixosSystem "x86_64-linux" "odyssey";
};
in
{ inherit nixosConfigurations; };
{
nixosConfigurations = {
atlas = nixosSystem { system = "x86_64-linux"; name = "atlas"; };
eos = nixosSystem { system = "x86_64-linux"; name = "eos"; };
helios = nixosSystem { system = "x86_64-linux"; name = "helios"; };
odyssey = nixosSystem { system = "x86_64-linux"; name = "odyssey"; };
pi = nixosSystem { system = "aarch64-linux"; name = "pi"; extraModules = [ nixos-hardware.nixosModules.raspberry-pi-4 ]; };
};
};
}