added ntfy container
This commit is contained in:
parent
ffed8cbfbc
commit
cee0ccf52f
@ -4,6 +4,10 @@
|
|||||||
# Imports
|
# Imports
|
||||||
imports = [
|
imports = [
|
||||||
disko.nixosModules.disko ../disko/isengard/btrfs-legacy.nix
|
disko.nixosModules.disko ../disko/isengard/btrfs-legacy.nix
|
||||||
|
|
||||||
|
# Containers
|
||||||
|
../modules/containers/ntfy.nix
|
||||||
|
|
||||||
];
|
];
|
||||||
# Disks
|
# Disks
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
@ -15,14 +19,22 @@
|
|||||||
networking.useDHCP = true;
|
networking.useDHCP = true;
|
||||||
time.timeZone = "Europe/Bucharest";
|
time.timeZone = "Europe/Bucharest";
|
||||||
|
|
||||||
# Virtualisation
|
# User is admin
|
||||||
|
users.groups.admin.gid = 10000;
|
||||||
|
users.users.${myUser}.extraGroups = [
|
||||||
|
"admin"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Virtualisation
|
||||||
boot.enableContainers = true;
|
boot.enableContainers = true;
|
||||||
virtualisation.podman = {
|
virtualisation.podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dockerCompat = true;
|
dockerCompat = true;
|
||||||
};
|
};
|
||||||
virtualisation.oci-containers.backend = "podman";
|
virtualisation.oci-containers.backend = "podman";
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /srv/containers 0775 root admin"
|
||||||
|
];
|
||||||
|
|
||||||
system.stateVersion = release;
|
system.stateVersion = release;
|
||||||
}
|
}
|
||||||
|
|||||||
37
modules/containers/ntfy.nix
Normal file
37
modules/containers/ntfy.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
ntfyDir = "/srv/containers/ntfy";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${ntfyDir} 2775 root admin"
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers.ntfy = {
|
||||||
|
|
||||||
|
autoStart = true;
|
||||||
|
|
||||||
|
image = "binwiederhier/ntfy:latest";
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
"${ntfyDir}:/var/lib/ntfy"
|
||||||
|
];
|
||||||
|
|
||||||
|
cmd = [ "serve" ];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
NTFY_BASE_URL = "https://ntfy.isan.ro";
|
||||||
|
NTFY_CACHE_FILE = "/var/lib/ntfy/cache.db";
|
||||||
|
NTFY_AUTH_FILE = "/var/lib/ntfy/auth.db";
|
||||||
|
NTFY_AUTH_DEFAULT_ACCESS = "read-write";
|
||||||
|
NTFY_BEHIND_PROXY = "true";
|
||||||
|
NTFY_ATTACHMENT_CACHE_DIR = "/var/lib/ntfy/attachments";
|
||||||
|
NTFY_ENABLE_LOGIN = "true";
|
||||||
|
TZ = "Europe/Bucharest";
|
||||||
|
|
||||||
|
UID = "1000";
|
||||||
|
GID = "10000";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user