fix fileshelter conf
This commit is contained in:
@@ -6,10 +6,15 @@ in
|
|||||||
{
|
{
|
||||||
options.custom.services.fileshelter = {
|
options.custom.services.fileshelter = {
|
||||||
enable = mkEnableOption "Enables fileshelter";
|
enable = mkEnableOption "Enables fileshelter";
|
||||||
|
uid = mkOption {
|
||||||
|
default = 20000;
|
||||||
|
description = "uid of the fileshelter user";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
users.users.fileshelter = {
|
users.users.fileshelter = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
|
uid = cfg.uid;
|
||||||
group = "fileshelter";
|
group = "fileshelter";
|
||||||
};
|
};
|
||||||
users.groups.fileshelter = {};
|
users.groups.fileshelter = {};
|
||||||
@@ -20,21 +25,24 @@ in
|
|||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /data/fileshelter 0770 fileshelter fileshelter -"
|
"d /data/fileshelter 0770 fileshelter fileshelter -"
|
||||||
];
|
];
|
||||||
#custom.misc.docker.enable = true;
|
custom.misc.docker.enable = true;
|
||||||
#virtualisation.oci-containers.backend = "docker";
|
virtualisation.oci-containers.backend = "docker";
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
"fileshelter" = {
|
"fileshelter" = {
|
||||||
user = "fileshelter";
|
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
user = "${cfg.uid}";
|
||||||
image = "epoupon/fileshelter";
|
image = "epoupon/fileshelter";
|
||||||
ports = [
|
ports = [
|
||||||
"127.0.0.1:5091:5091"
|
"127.0.0.1:5091:5091"
|
||||||
];
|
];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/data/fileshelter:/var/fileshelter"
|
"/data/fileshelter:/var/fileshelter"
|
||||||
"/run/agenix/fileshelter-conf:/etc/fileshelter.conf"
|
];
|
||||||
|
extraOptions = [
|
||||||
|
"--mount=type=bind,source=/run/agenix/fileshelter-conf,destination=/etc/fileshelter.conf"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user