Reformatted with nixfmt

This commit is contained in:
alejandro-angulo 2025-03-31 22:34:25 -07:00
parent f51256c3ae
commit 3f16537322
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
80 changed files with 1454 additions and 992 deletions

View file

@ -3,9 +3,11 @@
lib,
pkgs,
...
}: let
}:
let
cfg = config.aa.services.nix-serve;
in {
in
{
options.aa.services.nix-serve = with lib; {
enable = mkEnableOption "nix-serve";
domain_name = mkOption {
@ -28,11 +30,11 @@ in {
config = lib.mkIf cfg.enable {
nix.settings = {
allowed-users = ["nix-serve"];
trusted-users = ["nix-serve"];
allowed-users = [ "nix-serve" ];
trusted-users = [ "nix-serve" ];
};
environment.systemPackages = [pkgs.nix-serve];
environment.systemPackages = [ pkgs.nix-serve ];
services = {
nix-serve = {
@ -45,7 +47,7 @@ in {
enable = true;
virtualHosts."${cfg.subdomain_name}.${cfg.domain_name}" =
{
serverAliases = ["${cfg.subdomain_name}"];
serverAliases = [ "${cfg.subdomain_name}" ];
locations."/".extraConfig = ''
proxy_pass http://localhost:${toString config.services.nix-serve.port};
proxy_set_header Host $host;
@ -61,7 +63,10 @@ in {
};
networking.firewall = {
allowedTCPPorts = [80 443];
allowedTCPPorts = [
80
443
];
};
};
}