add sample of how to extend the Reaktor config
This commit is contained in:
parent
e8ccc5d5cb
commit
4047e6557d
|
@ -23,6 +23,8 @@
|
||||||
../2configs/virtualization.nix
|
../2configs/virtualization.nix
|
||||||
../2configs/wwan.nix
|
../2configs/wwan.nix
|
||||||
|
|
||||||
|
../2configs/Reaktor/simpleExtend.nix
|
||||||
|
|
||||||
# hardware specifics are in here
|
# hardware specifics are in here
|
||||||
../2configs/tp-x220.nix
|
../2configs/tp-x220.nix
|
||||||
];
|
];
|
||||||
|
|
21
2configs/Reaktor/simpleExtend.nix
Normal file
21
2configs/Reaktor/simpleExtend.nix
Normal 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 } })
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue