28 lines
811 B
Nix
28 lines
811 B
Nix
{moduleWithSystem, ...}: {
|
|
flake.nixosModules.distcc = moduleWithSystem ({unstablePkgs, ...}: {
|
|
services.distccd = {
|
|
enable = true;
|
|
allowedClients = ["192.168.1.0/24"];
|
|
};
|
|
systemd.services.distccd = {
|
|
serviceConfig = {
|
|
Environment = [
|
|
"\"PATH=/run/wrappers/bin:/run/current-system/sw/bin:/usr/bin:/bin\""
|
|
"DISTCCD_PATH=/run/current-system/sw/bin:/run/wrappers/bin:/usr/bin:/bin"
|
|
];
|
|
};
|
|
};
|
|
environment.systemPackages = let
|
|
pkgs = unstablePkgs;
|
|
lib = pkgs.lib;
|
|
in [
|
|
(pkgs.writeShellScriptBin "x86_64-pc-linux-gnu-gcc" ''
|
|
exec ${lib.getExe pkgs.gcc15} "$@"
|
|
'')
|
|
(pkgs.writeShellScriptBin "x86_64-pc-linux-gnu-g++" ''
|
|
exec ${lib.getExe' pkgs.gcc15 "g++"} "$@"
|
|
'')
|
|
];
|
|
});
|
|
}
|