kiosk/flake.nix

38 lines
1,001 B
Nix
Raw Normal View History

2024-11-15 18:26:11 -05:00
{
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";
2024-11-15 18:26:11 -05:00
};
2024-12-07 16:55:52 -05:00
outputs = inputs@{ nixpkgs, rpi-nix, nixos-hardware, ... }:
let
rpi = [
2024-12-07 16:44:37 -05:00
./sd-image
2024-11-15 18:26:11 -05:00
rpi-nix.nixosModules.raspberry-pi
];
2024-12-07 16:55:52 -05:00
mkKiosk = system: modules: nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = nixpkgs.lib.flatten modules ++ [
./base.nix
./kiosk.nix
2024-12-08 01:18:08 -05:00
{
nix.settings.extra-experimental-features = [ "nix-command" "flakes" ];
}
2024-12-07 16:55:52 -05:00
];
};
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 ];
};
2024-11-15 18:26:11 -05:00
};
}