kiosk/flake.nix

37 lines
1,001 B
Nix

{
description = "My standard flake-parts devshell template";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
rpi-nix.url = "github:nix-community/raspberry-pi-nix";
nixos-hardware.url = "github:NixOS/nixos-hardware";
};
outputs = inputs@{ nixpkgs, rpi-nix, nixos-hardware, ... }:
let
rpi = [
./sd-image
rpi-nix.nixosModules.raspberry-pi
];
mkKiosk = system: modules: nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = nixpkgs.lib.flatten modules ++ [
./base.nix
./kiosk.nix
{
nix.settings.extra-experimental-features = [ "nix-command" "flakes" ];
}
];
};
in
{
nixosConfigurations = {
kiosk-rpi3 = mkKiosk "aarch64-linux" [ rpi ./rpi3.nix ];
kiosk-rpi4 = mkKiosk "aarch64-linux" [ rpi ./rpi4.nix ];
pc = mkKiosk "x86_64-linux" [ ./pc.nix ];
};
};
}