diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2012-03-27 20:33:49 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2012-03-27 20:33:49 +0000 |
commit | 68b5044cc00224ef650e10db29d6e179c038450a (patch) | |
tree | 01396f7b2f4a416555f7b72afd1db52c2bab0ce4 /pkgs/build-support/usernixos/activation.nix | |
parent | db28c68df050ff788f3a1cd723e401bebc9bb70e (diff) | |
download | nixlib-68b5044cc00224ef650e10db29d6e179c038450a.tar nixlib-68b5044cc00224ef650e10db29d6e179c038450a.tar.gz nixlib-68b5044cc00224ef650e10db29d6e179c038450a.tar.bz2 nixlib-68b5044cc00224ef650e10db29d6e179c038450a.tar.lz nixlib-68b5044cc00224ef650e10db29d6e179c038450a.tar.xz nixlib-68b5044cc00224ef650e10db29d6e179c038450a.tar.zst nixlib-68b5044cc00224ef650e10db29d6e179c038450a.zip |
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
Diffstat (limited to 'pkgs/build-support/usernixos/activation.nix')
-rw-r--r-- | pkgs/build-support/usernixos/activation.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/build-support/usernixos/activation.nix b/pkgs/build-support/usernixos/activation.nix new file mode 100644 index 000000000000..2e3f0af2bf77 --- /dev/null +++ b/pkgs/build-support/usernixos/activation.nix @@ -0,0 +1,26 @@ +{ 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; +} |