mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 11:00:19 +03:00
nixos/etcd: allow to choose the package
This commit is contained in:
parent
917ba9841a
commit
a24848c470
@ -15,6 +15,8 @@ in {
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
package = mkPackageOptionMD pkgs "etcd" { };
|
||||
|
||||
name = mkOption {
|
||||
description = lib.mdDoc "Etcd unique node name.";
|
||||
default = config.networking.hostName;
|
||||
@ -187,13 +189,13 @@ in {
|
||||
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStart = "${pkgs.etcd}/bin/etcd";
|
||||
ExecStart = "${cfg.package}/bin/etcd";
|
||||
User = "etcd";
|
||||
LimitNOFILE = 40000;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.etcd ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
users.users.etcd = {
|
||||
isSystemUser = true;
|
||||
|
Loading…
Reference in New Issue
Block a user