nixpkgs/pkgs/build-support/usernixos/activation.nix

27 lines
469 B
Nix
Raw Normal View History

{ 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;
}