mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 22:30:25 +01:00
* feat: upgrade nixpkgs stable to 25.11, update nixos-apple-silicon, ghostty, anyrun, etc * fix: asahi-nixos - revert mesa to 25.2.6 * fix: disable gitui - it's broken on aarch64-darwin currently --------- Signed-off-by: Ryan Yin <xiaoyin_c@qq.com>
39 lines
1.0 KiB
Nix
39 lines
1.0 KiB
Nix
{ config, ... }:
|
|
let
|
|
user = "kuma";
|
|
dataDir = "/data/apps/uptime-kuma";
|
|
in
|
|
{
|
|
users.groups.${user} = { };
|
|
users.users.${user} = {
|
|
group = user;
|
|
home = dataDir;
|
|
isSystemUser = true;
|
|
};
|
|
|
|
# Create Directories
|
|
# https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html#Type
|
|
systemd.tmpfiles.rules = [
|
|
"d ${dataDir} 0755 ${user} ${user}"
|
|
];
|
|
|
|
# https://github.com/NixOS/nixpkgs/blob/nixos-25.11/nixos/modules/virtualisation/oci-containers.nix
|
|
virtualisation.oci-containers.containers = {
|
|
# check its logs via `journalctl -u podman-homepage`
|
|
uptime-kuma = {
|
|
hostname = "uptime-kuma";
|
|
image = "louislam/uptime-kuma:1";
|
|
ports = [ "127.0.0.1:53350:3001" ];
|
|
# https://github.com/louislam/uptime-kuma/wiki/Environment-Variables
|
|
environment = {
|
|
# "PUID" = config.users.users.${user}.uid;
|
|
# "PGID" = config.users.groups.${user}.gid;
|
|
};
|
|
volumes = [
|
|
"${dataDir}:/app/data"
|
|
];
|
|
autoStart = true;
|
|
};
|
|
};
|
|
}
|