2024-03-08 17:04:42 +01:00
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
modulesPath,
|
|
|
|
|
...
|
2024-09-24 12:33:51 +02:00
|
|
|
|
}:
|
|
|
|
|
let
|
|
|
|
|
launchpad = pkgs.python3.withPackages (ps: [
|
|
|
|
|
(ps.callPackage ./launchpad.nix { lpminimk3 = ps.callPackage ./lpminimk3.nix { }; })
|
|
|
|
|
]);
|
2024-03-08 17:04:42 +01:00
|
|
|
|
in
|
2024-09-24 12:33:51 +02:00
|
|
|
|
{
|
2024-03-08 17:04:42 +01:00
|
|
|
|
imports = [
|
|
|
|
|
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
|
|
|
|
./bootloader.nix
|
|
|
|
|
./networking.nix
|
|
|
|
|
./nix-conf.nix
|
|
|
|
|
./programs.nix
|
|
|
|
|
./ssh.nix
|
|
|
|
|
./users.nix
|
|
|
|
|
];
|
|
|
|
|
|
2024-09-24 12:33:51 +02:00
|
|
|
|
nix.settings.substituters = lib.mkForce [ ];
|
2024-03-08 17:04:42 +01:00
|
|
|
|
|
|
|
|
|
networking.hostName = "rigel"; # Define your hostname.
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = [
|
|
|
|
|
launchpad
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
systemd.services.launchpad = {
|
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
|
after = [ "network.target" ];
|
2024-09-24 12:33:51 +02:00
|
|
|
|
path = [
|
|
|
|
|
launchpad
|
|
|
|
|
pkgs.unixtools.ping
|
|
|
|
|
];
|
2024-03-08 17:04:42 +01:00
|
|
|
|
script = ''
|
|
|
|
|
while ! ping -n -w 1 -c 1 10.1.1.2 &> /dev/null
|
|
|
|
|
do
|
|
|
|
|
echo "waiting eos"
|
|
|
|
|
done
|
|
|
|
|
sleep 0.1
|
|
|
|
|
python -m eos_midi 10.1.1.2
|
2024-09-24 12:33:51 +02:00
|
|
|
|
'';
|
2024-03-08 17:04:42 +01:00
|
|
|
|
};
|
|
|
|
|
environment.shellAliases = {
|
|
|
|
|
r = "systemctl restart launchpad.service";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fonts.enableDefaultPackages = true;
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "unstable"; # Did you read the comment?
|
|
|
|
|
}
|