From feb80e5868e9a81117408ffce92bac76284e928a Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 12 May 2024 23:18:06 +0200 Subject: [PATCH] modules/hyprspace: define services via an option --- modules/hyprspace/default.nix | 4 ++++ modules/hyprspace/options.nix | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 modules/hyprspace/options.nix diff --git a/modules/hyprspace/default.nix b/modules/hyprspace/default.nix index 1bb327f..86c2069 100644 --- a/modules/hyprspace/default.nix +++ b/modules/hyprspace/default.nix @@ -24,11 +24,15 @@ let ]; privateKey = "@HYPRSPACEPRIVATEKEY@"; peers = peerList; + inherit (config.services.hyprspace) services; }); privateKeyFile = config.age.secrets.hyprspace-key.path; runConfig = "/run/hyprspace.json"; in { + imports = [ + ./options.nix + ]; age.secrets.hyprspace-key = { file = ../../secrets/hyprspace-key- + "${hostName}.age"; mode = "0400"; diff --git a/modules/hyprspace/options.nix b/modules/hyprspace/options.nix new file mode 100644 index 0000000..7410677 --- /dev/null +++ b/modules/hyprspace/options.nix @@ -0,0 +1,10 @@ +{ lib, ... }: + +{ + options.services.hyprspace = { + services = lib.mkOption { + type = lib.types.attrsOf lib.types.path; + default = {}; + }; + }; +}