added ntfy container
This commit is contained in:
parent
ffed8cbfbc
commit
cee0ccf52f
@ -4,6 +4,10 @@
|
||||
# Imports
|
||||
imports = [
|
||||
disko.nixosModules.disko ../disko/isengard/btrfs-legacy.nix
|
||||
|
||||
# Containers
|
||||
../modules/containers/ntfy.nix
|
||||
|
||||
];
|
||||
# Disks
|
||||
boot.loader = {
|
||||
@ -15,14 +19,22 @@
|
||||
networking.useDHCP = true;
|
||||
time.timeZone = "Europe/Bucharest";
|
||||
|
||||
# Virtualisation
|
||||
# User is admin
|
||||
users.groups.admin.gid = 10000;
|
||||
users.users.${myUser}.extraGroups = [
|
||||
"admin"
|
||||
];
|
||||
|
||||
# Virtualisation
|
||||
boot.enableContainers = true;
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /srv/containers 0775 root admin"
|
||||
];
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -3,11 +3,11 @@
|
||||
{
|
||||
# Groups for sunshine
|
||||
users.users.${myUser}.extraGroups = [
|
||||
"wheel"
|
||||
"video"
|
||||
"render"
|
||||
"input"
|
||||
];
|
||||
"wheel"
|
||||
"video"
|
||||
"render"
|
||||
"input"
|
||||
];
|
||||
|
||||
# Sunshine game stream
|
||||
services = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user