Photo by National Cancer Institute on Unsplash
Not to be confused with *nix
services = {
  # Start a systemd service for each incoming SSH connection
  openssh.startWhenNeeded = true;
  # Enable periodic SSD TRIM to extend life of mounted SSDs
  fstrim.enable = true;
  # Suspend when power button is short-pressed
  logind.extraConfig = ''
    HandlePowerKey=suspend
  '';
};
            { ... }:
{
  services.homepage-dashboard = {
    enable = true;
    listenPort = 8082;
  };
}
            { ... }:
let
  domain = "mydomain.at";
  ntfyPort = 6780;
  ntfyMetricsPort = 9095;
  ntfyHost = "notifications.${domain}";
in
{
  services.ntfy-sh = {
    enable = true;
    group = "ntfy";
    user = "ntfy";
    settings = {
      base-url = "https://${ntfyHost}";
      listen-http = ":${toString ntfyPort}";
      behind-proxy = true;
      auth-file = "/var/lib/ntfy/user.db";
      # cache-file = "/var/cache/ntfy/cache.db";
      attachment-cache-dir = "/var/cache/ntfy/attachments";
      auth-default-access = "deny-all";
      upstream-base-url = "https://ntfy.sh";
      # Set to "disable" to disable web UI
      # See https://github.com/binwiederhier/ntfy/issues/459
      web-root = "app";
      # Enable metrics endpoint for Prometheus
      enable-metrics = true;
      metrics-listen-http = ":${toString ntfyMetricsPort}";
    };
  };
  user.extraGroups = [ "ntfy" ];
  environment.systemPackages = [ services.ntfy-sh.package ];
  networking.firewall.allowedTCPPorts = [ ntfyPort ];
}
            { ... }:
let
  port = 7901;
  version = "2023.12.2";
in
{
  virtualisation.oci-containers.containers = {
    home-assistant = {
      image = "ghcr.io/home-assistant/home-assistant:${version}";
      volumes = [
        "/var/lib/home-assistant:/config"
        "/etc/localtime:/etc/localtime:ro"
      ];
      extraOptions = [
        "--device=/dev/ttyUSB0"
        "--network=host"
      ];
      ports = [
        "${toString port}:${toString port}"
      ];
      autoStart = true;
    };
  };
  networking.firewall.interfaces.tailscale0.allowedTCPPorts = [ port ];}
            curl -sL https://matthias.thym.at/card 
https://blog.thym.at/p/glt24