Modularize+ redis systemd
This commit is contained in:
parent
e8a36e88b3
commit
f2a0ae2c6a
3 changed files with 74 additions and 38 deletions
34
redis/redis.nix
Normal file
34
redis/redis.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.file = {
|
||||
".config/redis/redis.conf" = {
|
||||
source = ./redis/redis.conf;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services = {
|
||||
|
||||
Redis = {
|
||||
Unit = {
|
||||
Description = "Vic's redis";
|
||||
After = [ "network-online.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "redis-server .config/redis/redis.conf";
|
||||
SyslogIdentifier = "hackey";
|
||||
Restart = "always";
|
||||
TimeoutSec = 0;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue