(feat): reformatted code for flakes usage

This commit is contained in:
chloe 2024-08-16 15:28:32 +02:00
parent d29d6f0133
commit c3956d6fa4
40 changed files with 130 additions and 76 deletions

View file

@ -0,0 +1,16 @@
{config, ...}:
{
virtualisation.oci-containers = {
backend = "docker";
containers = {
fourget = {
image = "luuul/4get:latest";
environment = {
"FOURGET_PROTO" = "http";
"FOURGET_SERVER_NAME" = "192.168.1.177:6942";
};
ports = ["6942:80"];
};
};
};
}

View file

@ -0,0 +1,43 @@
{ config, lib, ... }:
with lib;
let
cfg = config.docker;
in
{
options = {
docker.minecraft.path = mkOption {
type = types.str;
default = "/srv/Minecraft";
};
};
config = {
# docker containers, for apps that aren't avaiable on Nix. (yet)
virtualisation.oci-containers = {
backend = "docker";
containers = {
#TODO: move to Nix crafty controller bundle
crafty-controller = {
image = "registry.gitlab.com/crafty-controller/crafty-4:latest";
ports = [
"8443:8443"
"8123:8123"
"19132:19132/udp"
"25500-25600:25500-25600"
];
volumes = [
"${cfg.minecraft.path}/docker/backups:/crafty/backups"
"${cfg.minecraft.path}/docker/logs:/crafty/logs"
"${cfg.minecraft.path}/docker/servers:/crafty/servers"
"${cfg.minecraft.path}/docker/config:/crafty/app/config"
"${cfg.minecraft.path}/docker/import:/crafty/import"
];
environment = {
"TZ" = "Europe/Paris";
};
};
};
};
};
}

View file

@ -0,0 +1,11 @@
{ config, ... }:
{
imports = [
./crafty-controller.nix
./flaresolverr.nix
./freshrss.nix
./sonarr.nix
#./pihole-exporter.nix
];
}

View file

@ -0,0 +1,16 @@
{ config, ... }:
{
virtualisation.oci-containers = {
backend = "docker";
containers = {
flaresolverr = {
ports = [ "8191:8191" ];
image = "ghcr.io/flaresolverr/flaresolverr:latest";
environment = {
"LOG_LEVEL" = "info";
};
};
};
};
}

View file

@ -0,0 +1,18 @@
{ ... }:
{
virtualisation.oci-containers = {
backend = "docker";
containers = {
freshrss = {
image = "lscr.io/linuxserver/freshrss:latest";
volumes = [ "/srv/freshrss/config:/config" ];
ports = [ "8888:80" ];
environment = {
"PUID" = "1000";
"GUID" = "1000";
"TZ" = "Europe/Paris";
};
};
};
};
}

View file

@ -0,0 +1,21 @@
{ config, ... }:
{
sops.secrets.piholeHostname = {};
sops.secrets.piholePassword = {};
virtualisation.oci-containers = {
backend = "docker";
containers = {
pihole-exporter = {
image = "ekofr/pihole-exporter:latest";
ports = [ "9617:9617" ];
environment = {
"PIHOLE_HOSTNAME" = config.sops.secrets.piholeHostname;
"PIHOLE_PASSWORD" = config.sops.secrets.piholePassword;
};
};
};
};
}

View file

@ -0,0 +1,18 @@
{ config, ... }:
{
virtualisation.oci-containers = {
backend = "docker";
containers = {
sonarrAnime = {
image = "lscr.io/linuxserver/sonarr:latest";
volumes = [ "sonarr_data:/config" "/srv/Multimedia/DessinsAnime:/tv" "/srv/Multimedia/Torrents:/srv/Multimedia/Torrents" ];
ports = [ "8999:8989" ];
environment = {
"PUID" = "1000";
"GUID" = "1000";
"TZ" = "Europe/Paris";
};
};
};
};
}