1
0
Fork 0
nixos-config/nixos/roles/local-nix-cache.nix
2020-07-02 21:36:42 +02:00

20 lines
604 B
Nix

{ config, pkgs, lib, ... }:
let inherit (import ../../lib) sources;
local-nix-cache = import sources.local-nix-cache { };
in {
imports = [ (local-nix-cache.path + "/module.nix") ];
local-nix-cache = {
server.enable = true;
client.enable = true;
};
networking.firewall.allowedTCPPorts = [ config.local-nix-cache.server.port ];
systemd.services.local-nix-cache.path = [ local-nix-cache.nix ];
systemd.services.local-nix-cache.serviceConfig.Restart = "always";
services.avahi.enable = true;
services.avahi.publish.enable = true;
services.avahi.publish.userServices = true;
}