Modularize+ redis systemd

This commit is contained in:
Vic 2024-08-16 10:54:22 +02:00
parent e8a36e88b3
commit f2a0ae2c6a
3 changed files with 74 additions and 38 deletions

34
redis/redis.nix Normal file
View 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" ];
};
};
};
}