mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
Move modules alloy and atuin from web-services to services
This commit is contained in:
parent
10a1eafca4
commit
a9b26c8198
4 changed files with 14 additions and 13 deletions
27
modules/system/services/atuin.nix
Normal file
27
modules/system/services/atuin.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.custom.services.atuin;
|
||||
in
|
||||
{
|
||||
options.custom.services.atuin = {
|
||||
enable = lib.mkEnableOption "";
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
};
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 8849;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.atuin = {
|
||||
enable = true;
|
||||
openRegistration = true;
|
||||
inherit (cfg) port;
|
||||
};
|
||||
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue