IssueRaiser

Make a service abstraction layer

We've talked about this for years, usually in the context of people hating or wanting to replace `systemd`, but I think it's time to start talking about it in other less negative contexts as well. ## Motivation Nixpkgs now works pretty well on Darwin, and the `nix-darwin` effort by @LnL7 can manage services using launchd. Unfortunately, even though 99% of the logic could be shared with NixOS services, it can't currently be. Furthermore, people are taking more and more infrastructure to distributed container scheduling systems like Kubernetes, ECS, or Nomad. Although in some cases people might run the host on NixOS, I think Nix can provide an equally compelling story for the container guests. @lethalman's `dockerTools` is a promising start to that, but just like `nix-darwin`, anyone using it has to reinvent the configuration for their services because NixOS service modules can't be reused. Finally, assorted work like [declarative user environments](https://github.com/NixOS/nixpkgs/pull/9250), [replacing the init system](https://github.com/NixOS/nixpkgs/issues/24346) (please don't turn this thread into another systemd flamewar; we have plenty of other venues for that), and service testing on virtualized platforms (I can't run any of the NixOS VM tests on EC2, Azure, Google Cloud, and so on) all could benefit heavily from such a layer. ## Prior work The major effort so far has been https://github.com/NixOS/nixpkgs/pull/5246 and it's an impressive feat but has long bitrotte

Posted by copumpkin on May 24, 2017, 3:16 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

github (Sysadmin)

Make a service abstraction layer

copumpkinMay 24, 2017, 3:16 PM

We've talked about this for years, usually in the context of people hating or wanting to replace `systemd`, but I think it's time to start talking about it in other less negative contexts as well. ## Motivation Nixpkgs now works pretty well on Darwin, and the `nix-darwin` effort by @LnL7 can manage services using launchd. Unfortunately, even though 99% of the logic could be shared with NixOS services, it can't currently be. Furthermore, people are taking more and more infrastructure to distributed container scheduling systems like Kubernetes, ECS, or Nomad. Although in some cases people might run the host on NixOS, I think Nix can provide an equally compelling story for the container guests. @lethalman's `dockerTools` is a promising start to that, but just like `nix-darwin`, anyone using it has to reinvent the configuration for their services because NixOS service modules can't be reused. Finally, assorted work like [declarative user environments](https://github.com/NixOS/nixpkgs/pull/9250), [replacing the init system](https://github.com/NixOS/nixpkgs/issues/24346) (please don't turn this thread into another systemd flamewar; we have plenty of other venues for that), and service testing on virtualized platforms (I can't run any of the NixOS VM tests on EC2, Azure, Google Cloud, and so on) all could benefit heavily from such a layer. ## Prior work The major effort so far has been https://github.com/NixOS/nixpkgs/pull/5246 and it's an impressive feat but has long bitrotte

Comments (0)

No comments yet. Start the discussion.

Comment on this issue