Added storage and home assistant
This commit is contained in:
47
modules/home/containers/storage.nix
Normal file
47
modules/home/containers/storage.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.settings.containers.storage;
|
||||
in {
|
||||
options = {
|
||||
settings.containers.storage.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable storage configuration
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.podman.containers.dufs = {
|
||||
image = "sigoden/dufs";
|
||||
network = "proxy";
|
||||
volumes = [
|
||||
"%h/storage:/data"
|
||||
];
|
||||
userNS = "keep-id";
|
||||
environment = {
|
||||
DUFS_SERVE_PATH = "data";
|
||||
DUFS_AUTH = "@/tboomers/public:ro|tboomers:password@/tboomers:rw";
|
||||
DUFS_ALLOW_ALL = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.podman.containers.syncthing = {
|
||||
image = "syncthing/syncthing";
|
||||
network = "proxy";
|
||||
volumes = [
|
||||
"%h/storage:/storage"
|
||||
"%h/containers/syncthing/data:/var/syncthing"
|
||||
];
|
||||
userNS = "keep-id";
|
||||
ports = [
|
||||
"22000:22000/tcp"
|
||||
"22000:22000/udp"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user