nixos/modules/services/homepage/default.nix

31 lines
639 B
Nix
Raw Normal View History

2022-11-09 22:20:45 +01:00
# My own personal homepage
2023-11-07 22:00:00 +01:00
{ config, lib, inputs, ... }:
2022-11-09 22:20:45 +01:00
let
cfg = config.my.services.homepage;
2023-11-07 23:13:51 +01:00
inherit (config.networking) domain;
2022-11-09 22:20:45 +01:00
in
{
options.my.services.homepage = with lib; {
enable = mkEnableOption "Stunkymonkey-Hompage";
};
config = lib.mkIf cfg.enable {
my.services.nginx.virtualHosts = [
{
subdomain = "blog";
root = inputs.stunkymonkey.packages.${config.nixpkgs.system}.default;
}
];
webapps.apps.homepage = {
dashboard = {
name = "Homepage";
category = "other";
icon = "blog";
link = "https://blog.${domain}";
};
};
};
}