From e82885507b720026d693e5dcde6f9c157b91c17c Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 29 Jan 2018 22:43:55 +0100 Subject: ofborg: add example configuration --- modules/examples/ofborg.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modules/examples/ofborg.nix (limited to 'modules/examples') diff --git a/modules/examples/ofborg.nix b/modules/examples/ofborg.nix new file mode 100644 index 0000000..4df3340 --- /dev/null +++ b/modules/examples/ofborg.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + # Logs are enabled by default. + # $ tail -f /var/log/ofborg.log + services.ofborg.enable = true; + services.ofborg.package = (import {}).ofborg.rs; + # services.ofborg.configFile = "/var/lib/ofborg/config.json"; + + services.nix-daemon.enable = true; + + nix.package = pkgs.nixUnstable; + + nix.gc.automatic = true; + nix.gc.options = "--max-freed $((25 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | awk '{ print $4 }')))"; + + users.knownGroups = [ "ofborg" ]; + users.knownUsers = [ "ofborg" ]; + + # Used for backwards compatibility, please read the changelog before changing. + # $ darwin-rebuild changelog + system.stateVersion = 2; + + # You should generally set this to the total number of logical cores in your system. + # $ sysctl -n hw.ncpu + nix.maxJobs = 1; + nix.buildCores = 1; +} -- cgit v1.2.3