summaryrefslogtreecommitdiff
path: root/modules/examples
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-01-29 22:43:55 +0100
committerDaiderd Jordan <daiderd@gmail.com>2018-01-29 22:43:55 +0100
commite82885507b720026d693e5dcde6f9c157b91c17c (patch)
treeddd9fa5766cb4005416a737343b99a30fe3c255c /modules/examples
parent5fa6f21d06ef939d287aeec4ac318031e7e187e1 (diff)
ofborg: add example configuration
Diffstat (limited to 'modules/examples')
-rw-r--r--modules/examples/ofborg.nix30
1 files changed, 30 insertions, 0 deletions
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> {}).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;
+}