summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/Reaktor/simpleExtend.nix
blob: 95175a4e080e9c5f77b06135e800fa3d9f5a8952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ config, lib, pkgs, ... }:

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