36 lines
800 B
Nix
36 lines
800 B
Nix
{ config, pkgs, lib, modulesPath, ... }:
|
|
let
|
|
agb-control-box = pkgs.callPackage ./agb { };
|
|
in
|
|
{
|
|
imports = [
|
|
"${modulesPath}/installer/sd-card/sd-image-aarch64.nix"
|
|
./secrets
|
|
./networking.nix
|
|
./users.nix
|
|
];
|
|
sdImage.compressImage = false;
|
|
services = {
|
|
getty.autologinUser = "root";
|
|
openssh.enable = true;
|
|
};
|
|
|
|
networking.hostName = "agb02";
|
|
networking.networkmanager.enable = true;
|
|
|
|
environment.systemPackages = [
|
|
agb-control-box
|
|
pkgs.libgpiod
|
|
];
|
|
|
|
systemd.services."agb-control-box" = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
unitConfig.Description = "The program of the control-box";
|
|
serviceConfig = {
|
|
Restart = "always";
|
|
ExecStart = "${agb-control-box}/bin/agb /dev/gpiochip0";
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "24.11";
|
|
}
|