Commit graph

161 commits

Author SHA1 Message Date
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
Jaka Hudoklin
50a2f3fdce nixos/mongodb: set static uid to work with #1076 2013-11-07 11:25:14 +01:00
Eelco Dolstra
244cf195c8 Use the "assertions" option instead of mkAssert 2013-10-30 18:47:44 +01:00
Eelco Dolstra
408b8b5725 Add lots of missing option types 2013-10-30 18:47:43 +01:00
Jaka Hudoklin
d28a9619a1 nixos/redis: log to syslog by default 2013-10-28 18:18:24 +01:00
Jaka Hudoklin
b20c08d2cb nixos/redis: user set uid, make it compatible #1076 2013-10-28 18:18:13 +01:00
Eelco Dolstra
f79a7359b0 firebird.nix: Fix a misplaced } that causes "users" to be outside "config" 2013-10-25 15:52:52 +02:00
Eelco Dolstra
a3777ba4f9 Remove dependencies on the Nixpkgs location 2013-10-23 20:08:23 +02:00
Marc Weber
6cb91c33d0 Firebird service:
* simplify directory layout
 * clean up option descriptions
 * let the user override Firebird package
 * create firebird user
 * clarify TODO comment

Close  # 1061.
2013-10-21 20:33:11 +03:00
Evgeny Egorochkin
d2f612b1b6 postgresql.authMethod: remove unimplemented option.
close #1104.
2013-10-21 19:26:26 +03:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00