nixpkgs/pkgs/build-support/usernixos/activation.nix
Lluís Batlle i Rossell 68b5044cc0 Adding 'usernixos', where I start a modular kind-of-nixos that can go into
"nix-env -i" profiles, as a container for flexible configuration at the style
of nixos, to be defined in .nixpkgs/config.nix, with the main target of
generating an activation script.


svn path=/nixpkgs/trunk/; revision=33445
2012-03-27 20:33:49 +00:00

27 lines
469 B
Nix

{ pkgs, config, ... }:
let
script = pkgs.writeScriptBin "usernixos" (''
#!${pkgs.bash}/bin/bash
'' + config.activationContents);
in
with pkgs.lib;
{
options = {
activation = mkOption {
default = {};
};
activationContents = mkOption {
default = "";
internal = true;
merge = concatStringsSep "\n";
description = ''
Commands to run at activation
'';
};
};
config.activation.toplevel = script;
}