dynix/tests/harmonia/configuration.nix

73 lines
1.6 KiB
Nix
Raw Normal View History

2026-02-10 14:59:44 +01:00
{ pkgs, lib, config, modulesPath, ... }:
let
moduleList = import "${modulesPath}/module-list.nix";
dynixFromSearchPath = let
res = builtins.tryEval <dynix>;
in lib.optional res.success res.value;
in
{
imports = [
"${modulesPath}/testing/test-instrumentation.nix"
./hardware-configuration.nix
] ++ lib.concatLists [
dynixFromSearchPath
moduleList
];
dynamicism.for.harmonia.enable = true;
services.harmonia = {
enable = true;
settings = {
# Default.
workers = 4;
# Default.
max_connection_rate = 256;
};
};
system.switch.enable = true;
documentation.enable = false;
networking.hostName = "harmonia-machine";
boot.loader.grub = {
enable = true;
device = "/dev/vda";
forceInstall = true;
};
nix = {
package = pkgs.lixPackageSets.latest.lix;
nixPath = [
"nixpkgs=${pkgs.path}"
"/nix/var/nix/profiles/per-user/root/profile/share/nixos/modules"
];
settings = {
experimental-features = [ "nix-command" "pipe-operator" ];
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = 1;
# For my debugging purposes.
show-trace = true;
};
};
environment.pathsToLink = [ "/share" ];
environment.extraOutputsToInstall = [ "modules" ];
environment.variables = {
"NIXOS_CONFIG" = "/etc/nixos/configuration.nix";
};
environment.shellAliases = {
ls = "eza --long --header --group --group-directories-first --classify --binary";
};
environment.systemPackages = with pkgs; [
eza
fd
ripgrep
];
}