From 4d072a48acb720669a876138be27f9a6da42a70b Mon Sep 17 00:00:00 2001 From: Ethan Turkeltaub Date: Sat, 3 Jan 2026 22:45:53 -0500 Subject: [PATCH] Add Bichon --- hosts/bastion/profiles/caddy/default.nix | 5 ++ hosts/matrix/configuration.nix | 1 + modules/nixos/services/bichon/default.nix | 46 +++++++++++++++++++ .../profiles/observability/gatus/default.nix | 5 ++ modules/profiles/services/bichon.nix | 9 ++++ modules/profiles/services/glance/default.nix | 5 ++ 6 files changed, 71 insertions(+) create mode 100644 modules/nixos/services/bichon/default.nix create mode 100644 modules/profiles/services/bichon.nix diff --git a/hosts/bastion/profiles/caddy/default.nix b/hosts/bastion/profiles/caddy/default.nix index d965ff8..eba303f 100644 --- a/hosts/bastion/profiles/caddy/default.nix +++ b/hosts/bastion/profiles/caddy/default.nix @@ -266,6 +266,11 @@ inherit (hosts.matrix.config.services.actual.settings) port; }; + "bichon.e10.camp" = { + host = hosts.matrix; + inherit (hosts.matrix.config.services.bichon) port; + }; + "jellyfin.e10.video" = { host = hosts.htpc; port = 8096; diff --git a/hosts/matrix/configuration.nix b/hosts/matrix/configuration.nix index 26a4a2a..e9a0a77 100644 --- a/hosts/matrix/configuration.nix +++ b/hosts/matrix/configuration.nix @@ -11,6 +11,7 @@ profiles.power.tripp-lite-smart1500lcd profiles.services.actual.default profiles.services.attic-watch-store.default + profiles.services.bichon profiles.services.bentopdf profiles.services.changedetection-io profiles.services.e10-land diff --git a/modules/nixos/services/bichon/default.nix b/modules/nixos/services/bichon/default.nix new file mode 100644 index 0000000..8058c11 --- /dev/null +++ b/modules/nixos/services/bichon/default.nix @@ -0,0 +1,46 @@ +{ config, lib, ... }: + +with lib; + +let cfg = config.services.bichon; +in { + options.services.bichon = { + enable = mkEnableOption "Enable Bichon"; + + port = mkOption { + type = types.port; + default = 15630; + }; + + dataDir = mkOption { + type = types.path; + default = "/var/lib/bichon"; + }; + + openFirewall = mkOption { + type = types.bool; + default = false; + }; + }; + + config = mkIf cfg.enable { + systemd.tmpfiles.settings."10-bichon" = { + ${cfg.dataDir} = { + "d" = { + user = config.virtualisation.oci-containers.backend; + group = config.virtualisation.oci-containers.backend; + mode = "0700"; + }; + }; + }; + + virtualisation.oci-containers.containers.bichon = { + image = "rustmailer/bichon:latest"; + ports = [ "${toString cfg.port}:15630" ]; + volumes = [ "${cfg.dataDir}:/data" ]; + environment = { BICHON_ROOT_DIR = "/data"; }; + }; + + networking.firewall.allowedTCPPorts = lib.optional cfg.openFirewall 15630; + }; +} diff --git a/modules/profiles/observability/gatus/default.nix b/modules/profiles/observability/gatus/default.nix index d558380..69d5c3c 100644 --- a/modules/profiles/observability/gatus/default.nix +++ b/modules/profiles/observability/gatus/default.nix @@ -296,6 +296,11 @@ in { config, lib, ... }: { group = "Matrix"; protected = true; }) + (mkEndpoint { + name = "Bichon"; + url = "https://bichon.e10.camp"; + group = "Matrix"; + }) ]; builder = [ (mkEndpoint { diff --git a/modules/profiles/services/bichon.nix b/modules/profiles/services/bichon.nix new file mode 100644 index 0000000..c00bcc6 --- /dev/null +++ b/modules/profiles/services/bichon.nix @@ -0,0 +1,9 @@ +{ profiles, ... }: { + imports = [ profiles.filesystems.files.services ]; + + services.bichon = { + enable = true; + dataDir = "/mnt/files/services/bichon"; + openFirewall = true; + }; +} diff --git a/modules/profiles/services/glance/default.nix b/modules/profiles/services/glance/default.nix index 428b105..561450f 100644 --- a/modules/profiles/services/glance/default.nix +++ b/modules/profiles/services/glance/default.nix @@ -64,6 +64,11 @@ icon = "di:bentopdf"; basicAuth = true; }) + (mkSite { + title = "Bichon"; + url = "https://bichon.e10.camp"; + icon = "sh:bichon"; + }) (mkSite { title = "Change Detection"; url = "https://change-detection.e10.camp";