mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-15 09:35:12 -05:00
57 lines
1.3 KiB
Nix
Executable file
57 lines
1.3 KiB
Nix
Executable file
{ config, flake, ... }:
|
|
let
|
|
inherit (flake.config.people) user0;
|
|
inherit (flake.config.services.instances) glance jellyfin web;
|
|
inherit (flake.config.machines.devices) ceres;
|
|
service = glance;
|
|
configPath = ./config;
|
|
configImports = {
|
|
server = import (configPath + /server.nix) { inherit service; };
|
|
branding = import (configPath + /branding.nix);
|
|
theme = import (configPath + /theme.nix);
|
|
pages = import (configPath + /pages.nix) { inherit config flake; };
|
|
};
|
|
in
|
|
{
|
|
services = {
|
|
glance = {
|
|
enable = true;
|
|
settings = configImports;
|
|
};
|
|
};
|
|
sops =
|
|
let
|
|
sopsPath = secret: {
|
|
path = "${service.sops.path0}/${service.name}-${secret}";
|
|
owner = "root";
|
|
mode = "600";
|
|
};
|
|
in
|
|
{
|
|
secrets = builtins.listToAttrs (
|
|
map
|
|
(secret: {
|
|
name = "${service.name}-${secret}";
|
|
value = sopsPath secret;
|
|
})
|
|
[
|
|
# "key"
|
|
# "${user0}-pass"
|
|
jellyfin.name
|
|
]
|
|
);
|
|
};
|
|
|
|
systemd.tmpfiles.rules = [
|
|
# "Z ${service.paths.path0} 755 ${service.name} ${service.name} -"
|
|
# "Z ${service.sops.path0} 755 root root -"
|
|
];
|
|
|
|
networking = {
|
|
firewall = {
|
|
allowedTCPPorts = [
|
|
service.ports.port0
|
|
];
|
|
};
|
|
};
|
|
}
|