mirror of
https://github.com/kiberpipa/nix-rehash.git
synced 2024-09-11 11:55:33 +03:00
services: add global environemnt, include timezone
This commit is contained in:
parent
aed7783f1c
commit
348b0b172c
@ -23,6 +23,8 @@ let
|
|||||||
<nixpkgs/nixos/modules/config/users-groups.nix>
|
<nixpkgs/nixos/modules/config/users-groups.nix>
|
||||||
<nixpkgs/nixos/modules/misc/ids.nix>
|
<nixpkgs/nixos/modules/misc/ids.nix>
|
||||||
<nixpkgs/nixos/modules/misc/assertions.nix>
|
<nixpkgs/nixos/modules/misc/assertions.nix>
|
||||||
|
<nixpkgs/nixos/modules/config/timezone.nix>
|
||||||
|
|
||||||
<nixpkgs/nixos/modules/services/databases/redis.nix>
|
<nixpkgs/nixos/modules/services/databases/redis.nix>
|
||||||
<nixpkgs/nixos/modules/services/databases/mysql.nix>
|
<nixpkgs/nixos/modules/services/databases/mysql.nix>
|
||||||
<nixpkgs/nixos/modules/services/databases/postgresql.nix>
|
<nixpkgs/nixos/modules/services/databases/postgresql.nix>
|
||||||
@ -34,6 +36,7 @@ let
|
|||||||
<nixpkgs/nixos/modules/services/monitoring/statsd.nix>
|
<nixpkgs/nixos/modules/services/monitoring/statsd.nix>
|
||||||
<nixpkgs/nixos/modules/services/amqp/rabbitmq.nix>
|
<nixpkgs/nixos/modules/services/amqp/rabbitmq.nix>
|
||||||
<nixpkgs/nixos/modules/services/logging/logstash.nix>
|
<nixpkgs/nixos/modules/services/logging/logstash.nix>
|
||||||
|
#<nixpkgs/nixos/modules/services/misc/bitcoin.nix>
|
||||||
];
|
];
|
||||||
|
|
||||||
config = (evalModules {
|
config = (evalModules {
|
||||||
|
@ -16,6 +16,7 @@ with pkgs.lib;
|
|||||||
system.activationScripts.etc = mkOption {}; # Ignore
|
system.activationScripts.etc = mkOption {}; # Ignore
|
||||||
system.build.etc = mkOption {}; # Ignore
|
system.build.etc = mkOption {}; # Ignore
|
||||||
environment.etc = mkOption {}; # Ignore
|
environment.etc = mkOption {}; # Ignore
|
||||||
|
environment.sessionVariables = mkOption {}; # Ignore
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -45,6 +45,10 @@ in {
|
|||||||
options = [ serviceOptions ];
|
options = [ serviceOptions ];
|
||||||
}; # TODO make more specific
|
}; # TODO make more specific
|
||||||
|
|
||||||
|
systemd.globalEnvironment = mkOption {
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
|
||||||
services.dataPrefix = mkOption {
|
services.dataPrefix = mkOption {
|
||||||
default = "/var";
|
default = "/var";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
@ -63,7 +67,7 @@ in {
|
|||||||
name = name;
|
name = name;
|
||||||
value = {
|
value = {
|
||||||
command = pkgs.writeScript "${name}-run" (configToCommand name cfg);
|
command = pkgs.writeScript "${name}-run" (configToCommand name cfg);
|
||||||
environment = cfg.environment;
|
environment = cfg.environment // config.systemd.globalEnvironment;
|
||||||
path = cfg.path;
|
path = cfg.path;
|
||||||
stopsignal = if hasAttr "KillSignal" cfg.serviceConfig then
|
stopsignal = if hasAttr "KillSignal" cfg.serviceConfig then
|
||||||
substring 3 (stringLength cfg.serviceConfig.KillSignal) cfg.serviceConfig.KillSignal
|
substring 3 (stringLength cfg.serviceConfig.KillSignal) cfg.serviceConfig.KillSignal
|
||||||
|
Loading…
Reference in New Issue
Block a user