modules/hyprspace: define services via an option

This commit is contained in:
Max Headroom 2024-05-12 23:18:06 +02:00
parent 40342db804
commit feb80e5868
2 changed files with 14 additions and 0 deletions

View file

@ -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";

View file

@ -0,0 +1,10 @@
{ lib, ... }:
{
options.services.hyprspace = {
services = lib.mkOption {
type = lib.types.attrsOf lib.types.path;
default = {};
};
};
}