From 5d0f2554cf56459b0afd27d3ed437a7fa50602a9 Mon Sep 17 00:00:00 2001 From: adikro Date: Thu, 8 Jan 2026 20:40:35 +0100 Subject: some modularization --- os/srv/bluetooth.nix | 14 ++++++++++++++ os/srv/srv.nix | 2 ++ os/srv/zzz.nix | 19 +++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 os/srv/bluetooth.nix create mode 100644 os/srv/zzz.nix (limited to 'os/srv') diff --git a/os/srv/bluetooth.nix b/os/srv/bluetooth.nix new file mode 100644 index 0000000..a803c55 --- /dev/null +++ b/os/srv/bluetooth.nix @@ -0,0 +1,14 @@ +{ config, lib, ... }: +let + cfg = config.os.srv.bluetooth; +in +{ + options.os.srv.bluetooth.enable = lib.mkEnableOption "enables bluetooth support"; + config = lib.mkIf cfg.enable { + services.blueman.enable = true; + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + }; +} diff --git a/os/srv/srv.nix b/os/srv/srv.nix index 19e959e..f9280ab 100644 --- a/os/srv/srv.nix +++ b/os/srv/srv.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./bluetooth.nix ./compat.nix ./docker.nix ./files.nix @@ -8,5 +9,6 @@ ./kvm.nix ./nix-helper.nix ./ollama.nix + ./zzz.nix ]; } diff --git a/os/srv/zzz.nix b/os/srv/zzz.nix new file mode 100644 index 0000000..cd9a67e --- /dev/null +++ b/os/srv/zzz.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.os.srv.zzz; +in +{ + options.os.srv.zzz.enable = lib.mkEnableOption "enables the zzz rpc service"; + config = lib.mkIf cfg.enable { + systemd.user.services.zzz-presence = { + description = "Zenless Zone Zero Discord Rich Presence"; + wantedBy = [ "default.target" ]; + + serviceConfig = { + ExecStart = "${pkgs.python3.withPackages (ps: [ ps.pypresence ])}/bin/python3 /etc/nixos/resources/zzz.py"; + Restart = "always"; + RestartSec = "10"; + }; + }; + }; +} -- cgit v1.3