hackens-org-configurations/machines/agb02/_configuration.nix

37 lines
800 B
Nix
Raw Normal View History

2024-10-10 15:45:53 +02:00
{ config, pkgs, lib, modulesPath, ... }:
2024-10-13 21:09:25 +02:00
let
agb-control-box = pkgs.callPackage ./agb { };
in
2024-10-10 15:45:53 +02:00
{
imports = [
"${modulesPath}/installer/sd-card/sd-image-aarch64.nix"
./secrets
./networking.nix
2024-10-12 00:40:55 +02:00
./users.nix
2024-10-10 15:45:53 +02:00
];
sdImage.compressImage = false;
services = {
getty.autologinUser = "root";
openssh.enable = true;
};
networking.hostName = "agb02";
networking.networkmanager.enable = true;
2024-10-12 00:40:55 +02:00
environment.systemPackages = [
2024-10-13 21:09:25 +02:00
agb-control-box
2024-10-12 00:40:55 +02:00
pkgs.libgpiod
];
2024-10-13 21:09:25 +02:00
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";
};
};
2024-10-10 15:45:53 +02:00
system.stateVersion = "24.11";
}