nixpkgs/nixos/modules
Eelco Dolstra 2b0aea1793 Allow running NixOS services outside of systemd
The attribute ‘config.systemd.services.<service-name>.runner’
generates a script that runs the service outside of systemd.  This is
useful for testing, and also allows NixOS services to be used outside
of NixOS.  For instance, given a configuration file foo.nix:

  { config, pkgs, ... }:

  { services.postgresql.enable = true;
    services.postgresql.package = pkgs.postgresql92;
    services.postgresql.dataDir = "/tmp/postgres";
  }

you can build and run PostgreSQL as follows:

  $ nix-build -A config.systemd.services.postgresql.runner -I nixos-config=./foo.nix
  $ ./result

This will run the service's ExecStartPre, ExecStart, ExecStartPost and
ExecStopPost commands in an appropriate environment.  It doesn't work
well yet for "forking" services, since it can't track the main
process.  It also doesn't work for services that assume they're always
executed by root.
2013-11-18 18:04:17 +01:00
..
config Add some primops to lib 2013-11-12 13:48:30 +01:00
hardware Add some primops to lib 2013-11-12 13:48:30 +01:00
installer Put /efi and /loader on the main livecd partition for efi booting with unetbootin 2013-11-14 18:18:46 -05:00
misc Don't set the default channel to 13.10 when installing from master 2013-11-11 11:26:15 +01:00
profiles Hack to work around the lack of isPath 2013-10-28 22:45:57 +01:00
programs nixos: capitalize a bunch of service descriptions 2013-11-09 20:45:50 +01:00
security polkit: major update 0.105 -> 0.112 2013-11-09 16:29:18 +01:00
services Allow running NixOS services outside of systemd 2013-11-18 18:04:17 +01:00
system Check whether fileSystems defines the root FS 2013-11-18 18:04:16 +01:00
tasks Check whether fileSystems defines the root FS 2013-11-18 18:04:16 +01:00
testing Allow running NixOS services outside of systemd 2013-11-18 18:04:17 +01:00
virtualisation Merge pull request #1196 from bjornfor/capitalize-service-descriptions 2013-11-12 01:25:18 -08:00
module-list.nix Allow running NixOS services outside of systemd 2013-11-18 18:04:17 +01:00
rename.nix Drop environment.x11Packages 2013-10-30 18:47:43 +01:00