test fileshelter
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
{pkgs, config, ...}:
|
{pkgs, config, ...}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../docker.nix
|
|
||||||
#../fh/scanning.nix
|
#../fh/scanning.nix
|
||||||
../flatpak.nix
|
../flatpak.nix
|
||||||
../gpg.nix
|
../gpg.nix
|
||||||
@@ -27,6 +26,9 @@
|
|||||||
ip = "192.168.0.11";
|
ip = "192.168.0.11";
|
||||||
dns = "192.168.0.6";
|
dns = "192.168.0.6";
|
||||||
};
|
};
|
||||||
|
misc = {
|
||||||
|
docker.enable = true;
|
||||||
|
};
|
||||||
hardware = {
|
hardware = {
|
||||||
vfio.enable = true;
|
vfio.enable = true;
|
||||||
nvidia.enable = true;
|
nvidia.enable = true;
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
#../games/palworld.nix
|
#../games/palworld.nix
|
||||||
../backup.nix
|
../backup.nix
|
||||||
../cron.nix
|
../cron.nix
|
||||||
../docker.nix
|
|
||||||
../fail2ban.nix
|
../fail2ban.nix
|
||||||
../firewall.nix
|
../firewall.nix
|
||||||
../git.nix
|
../git.nix
|
||||||
@@ -47,6 +46,9 @@
|
|||||||
dir = "/mnt/1tbssd/kavita";
|
dir = "/mnt/1tbssd/kavita";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
misc = {
|
||||||
|
docker.enable = true;
|
||||||
|
};
|
||||||
hardware = {
|
hardware = {
|
||||||
firmware.enable = true;
|
firmware.enable = true;
|
||||||
ssd.enable = true;
|
ssd.enable = true;
|
||||||
|
|||||||
@@ -7,5 +7,6 @@
|
|||||||
./cli-tools.nix
|
./cli-tools.nix
|
||||||
./tmpfs.nix
|
./tmpfs.nix
|
||||||
./static-ip.nix
|
./static-ip.nix
|
||||||
|
./docker.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
{ config, pkgs, lib, inputs, ... }:
|
{ 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.enable = true;
|
||||||
virtualisation.docker.daemon.settings = { ip = "127.0.0.1"; };
|
virtualisation.docker.daemon.settings = { ip = "127.0.0.1"; };
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
docker-compose
|
docker-compose
|
||||||
];
|
];
|
||||||
virtualisation.docker.enableNvidia = lib.mkIf config.custom.hardware.nvidia.enable true;
|
virtualisation.docker.enableNvidia = lib.mkIf config.custom.hardware.nvidia.enable true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -5,5 +5,6 @@
|
|||||||
./kubernetes.nix
|
./kubernetes.nix
|
||||||
./kavita.nix
|
./kavita.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
|
./fileshelter.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
29
modules/services/fileshelter.nix
Normal file
29
modules/services/fileshelter.nix
Normal 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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
secrets/fileshelter-conf.age
Normal file
BIN
secrets/fileshelter-conf.age
Normal file
Binary file not shown.
@@ -23,4 +23,5 @@ in
|
|||||||
"step-ca-pw.age".publicKeys = [ mini-pc server kop ];
|
"step-ca-pw.age".publicKeys = [ mini-pc server kop ];
|
||||||
"step-ca-key.age".publicKeys = [ mini-pc server kop ];
|
"step-ca-key.age".publicKeys = [ mini-pc server kop ];
|
||||||
"grafana-contact-points.age".publicKeys = [ mini-pc server kop ];
|
"grafana-contact-points.age".publicKeys = [ mini-pc server kop ];
|
||||||
|
"fileshelter-conf.age".publicKeys = [ mini-pc server kop ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
services = {
|
services = {
|
||||||
acme.enable = true;
|
acme.enable = true;
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
|
fileshelter.enable = true;
|
||||||
kavita = {
|
kavita = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dir = "/data/kavita";
|
dir = "/data/kavita";
|
||||||
@@ -39,6 +40,9 @@
|
|||||||
};
|
};
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
cli-tools.enable = true;
|
cli-tools.enable = true;
|
||||||
|
misc = {
|
||||||
|
docker.enable = true;
|
||||||
|
};
|
||||||
nix = {
|
nix = {
|
||||||
index.enable = true;
|
index.enable = true;
|
||||||
ld.enable = true;
|
ld.enable = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user