diff options
| author | adi <adikro@disroot.org> | 2026-07-29 17:09:58 +0200 |
|---|---|---|
| committer | adi <adikro@disroot.org> | 2026-07-29 17:09:58 +0200 |
| commit | 39a2b09c27bb74c9e59d1772764f901e3c8fb9e4 (patch) | |
| tree | 0ba58e6fbf086a85d875df1c10f6d23bc3bbc7da /os/srv/redis.nix | |
| parent | 8a820cacee1ff07ae7397d053b26e66f7086a4a4 (diff) | |
revamped flake.nix, removed homelab specific modulesstaging
Diffstat (limited to 'os/srv/redis.nix')
| -rw-r--r-- | os/srv/redis.nix | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/os/srv/redis.nix b/os/srv/redis.nix deleted file mode 100644 index a51f9db..0000000 --- a/os/srv/redis.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, ... }: -let - cfg = config.os.srv.redis; -in -{ - options.os.srv.redis.enable = lib.mkEnableOption ""; - config = lib.mkIf cfg.enable { - assertions = [ - { - assertion = config.os.srv.sops.enable; - message = "Required for password secure password storing"; - } - { - assertion = config.os.core.network.enableFirewall; - message = "Requires firewall"; - } - ]; - - sops.secrets."redis/password" = { - owner = "redis-main"; - restartUnits = [ "redis-servers-main.service" ]; - }; - - services.redis.servers."main" = { - enable = true; - bind = config.os.core.network.ips.database-vm; - port = 6379; - - requirePassFile = config.sops.secrets."redis/password".path; - }; - - networking.firewall.extraInputRules = '' - ip saddr 10.0.0.0/24 tcp dport 6379 accept - ''; - - }; -} |
