mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
add john
This commit is contained in:
@@ -499,6 +499,7 @@ inputs:
|
||||
cinny-desktop # nur-xddxdd.wine-wechat thunder
|
||||
# browser
|
||||
google-chrome
|
||||
john
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,21 +1,29 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.services.httpua = let inherit (inputs.lib) mkOption types; in
|
||||
options.nixos.services.httpapi = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
enable = mkOption { type = types.bool; default = false; };
|
||||
hostname = mkOption { type = types.nonEmptyStr; default = "ua.chn.moe"; };
|
||||
hostname = mkOption { type = types.nonEmptyStr; default = "api.chn.moe"; };
|
||||
};
|
||||
config =
|
||||
let
|
||||
inherit (inputs.config.nixos.services) httpua;
|
||||
inherit (inputs.config.nixos.services) httpapi;
|
||||
inherit (inputs.lib) mkIf;
|
||||
inherit (builtins) toString;
|
||||
in mkIf httpua.enable
|
||||
in mkIf httpapi.enable
|
||||
{
|
||||
nixos.services =
|
||||
{
|
||||
phpfpm.instances.httpua = {};
|
||||
nginx.http.${httpua.hostname}.php =
|
||||
phpfpm.instances.httpapi = {};
|
||||
nginx.https.${httpapi.hostname}.location =
|
||||
{
|
||||
"/led".static =
|
||||
{
|
||||
root = "/srv/api";
|
||||
detectAuth.users = [ "chn" ];
|
||||
}
|
||||
}
|
||||
php =
|
||||
{
|
||||
root = toString ./.;
|
||||
fastcgiPass = inputs.config.nixos.services.phpfpm.instances.httpua.fastcgi;
|
||||
|
||||
Reference in New Issue
Block a user