test fileshelter

This commit is contained in:
Kopatz
2024-05-04 15:11:53 +02:00
parent d47f75c353
commit 3d645daa1a
9 changed files with 51 additions and 2 deletions

View File

@@ -1,7 +1,6 @@
{pkgs, config, ...}:
{
imports = [
../docker.nix
#../fh/scanning.nix
../flatpak.nix
../gpg.nix
@@ -27,6 +26,9 @@
ip = "192.168.0.11";
dns = "192.168.0.6";
};
misc = {
docker.enable = true;
};
hardware = {
vfio.enable = true;
nvidia.enable = true;

View File

@@ -18,7 +18,6 @@
#../games/palworld.nix
../backup.nix
../cron.nix
../docker.nix
../fail2ban.nix
../firewall.nix
../git.nix
@@ -47,6 +46,9 @@
dir = "/mnt/1tbssd/kavita";
};
};
misc = {
docker.enable = true;
};
hardware = {
firmware.enable = true;
ssd.enable = true;

View File

@@ -7,5 +7,6 @@
./cli-tools.nix
./tmpfs.nix
./static-ip.nix
./docker.nix
];
}

View File

@@ -1,9 +1,18 @@
{ config, pkgs, lib, inputs, ... }:
with lib;
let
cfg = config.custom.misc.docker;
in
{
options.custom.misc.docker = {
enable = mkEnableOption "Enables docker";
};
config = lib.mkIf cfg.enable {
virtualisation.docker.enable = true;
virtualisation.docker.daemon.settings = { ip = "127.0.0.1"; };
environment.systemPackages = with pkgs; [
docker-compose
];
virtualisation.docker.enableNvidia = lib.mkIf config.custom.hardware.nvidia.enable true;
};
}

View File

@@ -5,5 +5,6 @@
./kubernetes.nix
./kavita.nix
./nginx.nix
./fileshelter.nix
];
}

View File

@@ -0,0 +1,29 @@
{ config, pkgs, lib, inputs, ... }:
with lib;
let
cfg = config.custom.services.fileshelter;
in
{
options.custom.services.fileshelter = {
enable = mkEnableOption "Enables fileshelter";
};
config = lib.mkIf cfg.enable {
age.secrets.fileshelter-conf = {
file = ../../secrets/fileshelter-conf.age;
};
custom.misc.docker.enable = true;
virtualisation.oci-containers.containers = {
"fileshelter" = {
autoStart = true;
image = "epoupon/fileshelter";
ports = [
"127.0.0.1:5091:5091"
];
volumes = [
"/data/fileshelter:/var/fileshelter"
"/run/agenix/fileshelter.conf:/etc/fileshelter.conf"
];
};
};
};
}