diff options
author | Dan Peebles <pumpkin@me.com> | 2017-10-13 09:17:13 -0400 |
---|---|---|
committer | Dan Peebles <pumpkin@me.com> | 2017-10-13 09:17:13 -0400 |
commit | 56e18c50ccb53250e589724ca00f4dd53805bd56 (patch) | |
tree | 07692e070b5e23eb1f408523a7cf6400b9dd3501 /nixos | |
parent | ea1a925a95493e5e3122f0bb714d7b5f1392265a (diff) | |
download | nixlib-56e18c50ccb53250e589724ca00f4dd53805bd56.tar nixlib-56e18c50ccb53250e589724ca00f4dd53805bd56.tar.gz nixlib-56e18c50ccb53250e589724ca00f4dd53805bd56.tar.bz2 nixlib-56e18c50ccb53250e589724ca00f4dd53805bd56.tar.lz nixlib-56e18c50ccb53250e589724ca00f4dd53805bd56.tar.xz nixlib-56e18c50ccb53250e589724ca00f4dd53805bd56.tar.zst nixlib-56e18c50ccb53250e589724ca00f4dd53805bd56.zip |
Revert "Simple proof of concept for how to do other types of services"
This reverts commit 7c3253e519a572f90a907fc56bb6407da004b24c. I included this in another push by accident and never intended for it to be in mainline. See https://github.com/NixOS/nixpkgs/pull/26075 if you want more.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 2 | ||||
-rw-r--r-- | nixos/modules/service-managers/docker.nix | 29 | ||||
-rw-r--r-- | nixos/modules/service-managers/trivial.nix | 35 | ||||
-rw-r--r-- | nixos/modules/services/security/hologram-server.nix | 14 |
4 files changed, 3 insertions, 77 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 31d48df47f4e..a8cb957ffe21 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -131,8 +131,6 @@ ./security/rtkit.nix ./security/wrappers/default.nix ./security/sudo.nix - ./service-managers/docker.nix - ./service-managers/trivial.nix ./services/admin/salt/master.nix ./services/admin/salt/minion.nix ./services/amqp/activemq/default.nix diff --git a/nixos/modules/service-managers/docker.nix b/nixos/modules/service-managers/docker.nix deleted file mode 100644 index 7effe0e85d46..000000000000 --- a/nixos/modules/service-managers/docker.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.docker-containers; - - containerModule = { - options.script = mkOption { - type = types.lines; - description = "Shell commands executed as the service's main process."; - }; - }; - - toContainer = name: value: pkgs.dockerTools.buildImage { - inherit name; - config = { - Cmd = [ value.script ]; - }; - }; -in { - options.docker-containers = mkOption { - default = {}; - type = with types; attrsOf (types.submodule containerModule); - description = "Definition of docker containers"; - }; - - config.system.build.toplevel-docker = lib.mapAttrs toContainer cfg; -} diff --git a/nixos/modules/service-managers/trivial.nix b/nixos/modules/service-managers/trivial.nix deleted file mode 100644 index 77e615d1e2e2..000000000000 --- a/nixos/modules/service-managers/trivial.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.trivial-services; - - serviceModule.options = { - script = mkOption { - type = types.lines; - description = "Shell commands executed as the service's main process."; - }; - - environment = mkOption { - default = {}; - type = types.attrs; # FIXME - example = { PATH = "/foo/bar/bin"; LANG = "nl_NL.UTF-8"; }; - description = "Environment variables passed to the service's processes."; - }; - }; - - launcher = name: value: pkgs.writeScript name '' - #!${pkgs.stdenv.shell} -eu - - ${pkgs.writeScript "${name}-entry" value.script} - ''; -in { - options.trivial-services = mkOption { - default = {}; - type = with types; attrsOf (types.submodule serviceModule); - description = "Definition of trivial services"; - }; - - config.system.build.toplevel-trivial = lib.mapAttrs launcher cfg; -} diff --git a/nixos/modules/services/security/hologram-server.nix b/nixos/modules/services/security/hologram-server.nix index 8315c9ea5d61..e267fed27955 100644 --- a/nixos/modules/services/security/hologram-server.nix +++ b/nixos/modules/services/security/hologram-server.nix @@ -23,8 +23,6 @@ let stats = cfg.statsAddress; listen = cfg.listenAddress; }); - - script = "${pkgs.hologram.bin}/bin/hologram-server --debug --conf ${cfgFile}"; in { options = { services.hologram-server = { @@ -96,15 +94,9 @@ in { after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - inherit script; - }; - - docker-containers.hologram-server = { - inherit script; - }; - - trivial-services.hologram-server = { - inherit script; + serviceConfig = { + ExecStart = "${pkgs.hologram.bin}/bin/hologram-server --debug --conf ${cfgFile}"; + }; }; }; } |