add sample of how to extend the Reaktor config

This commit is contained in:
makefu 2015-08-31 19:56:47 +02:00
parent e8ccc5d5cb
commit 4047e6557d
2 changed files with 23 additions and 0 deletions

View file

@ -23,6 +23,8 @@
../2configs/virtualization.nix
../2configs/wwan.nix
../2configs/Reaktor/simpleExtend.nix
# hardware specifics are in here
../2configs/tp-x220.nix
];

View file

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
with pkgs;
let
nixos-version-script = pkgs.writeScript "nix-version" ''
#! /bin/sh
. /etc/os-release
echo "$PRETTY_NAME"
'';
in {
krebs.Reaktor.enable = true;
krebs.Reaktor.nickname = "test-reaktor";
krebs.Reaktor.extraConfig = ''
public_commands.insert(0,{
'capname' : "nixos-version",
'pattern' : indirect_pattern.format("nixos-version"),
'argv' : ["${nixos-version-script}"],
'env' : { 'state_dir': workdir } })
'';
}