modules/hyprspace: define services via an option
This commit is contained in:
parent
40342db804
commit
feb80e5868
2 changed files with 14 additions and 0 deletions
|
@ -24,11 +24,15 @@ let
|
||||||
];
|
];
|
||||||
privateKey = "@HYPRSPACEPRIVATEKEY@";
|
privateKey = "@HYPRSPACEPRIVATEKEY@";
|
||||||
peers = peerList;
|
peers = peerList;
|
||||||
|
inherit (config.services.hyprspace) services;
|
||||||
});
|
});
|
||||||
|
|
||||||
privateKeyFile = config.age.secrets.hyprspace-key.path;
|
privateKeyFile = config.age.secrets.hyprspace-key.path;
|
||||||
runConfig = "/run/hyprspace.json";
|
runConfig = "/run/hyprspace.json";
|
||||||
in {
|
in {
|
||||||
|
imports = [
|
||||||
|
./options.nix
|
||||||
|
];
|
||||||
age.secrets.hyprspace-key = {
|
age.secrets.hyprspace-key = {
|
||||||
file = ../../secrets/hyprspace-key- + "${hostName}.age";
|
file = ../../secrets/hyprspace-key- + "${hostName}.age";
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
|
|
10
modules/hyprspace/options.nix
Normal file
10
modules/hyprspace/options.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.services.hyprspace = {
|
||||||
|
services = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.path;
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue