mirror of
https://git.sr.ht/~roxwize/.dotfiles
synced 2025-05-14 17:33:06 +00:00
~
This commit is contained in:
parent
1739b89ea3
commit
a1adbd9e02
6 changed files with 68 additions and 7 deletions
|
@ -1,11 +1,22 @@
|
|||
{ pkgs, ... }: let
|
||||
{ pkgs, lib, ... }: let
|
||||
cfg = options.containers.homepage;
|
||||
settingsFormat = pkgs.formats.yaml;
|
||||
in {
|
||||
options.containers.homepage = {
|
||||
enable = mkEnableOption "homepage";
|
||||
widgets = mkOption {
|
||||
enable = lib.mkEnableOption "homepage";
|
||||
openFirewall = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
settings = lib.mkOption {
|
||||
inherit (settingsFormat) type;
|
||||
description = "See https://gethomepage.dev/configs/settings/";
|
||||
default = {};
|
||||
};
|
||||
widgets = lib.mkOption {
|
||||
inherit (settingsFormat) type;
|
||||
description = "See https://gethomepage.dev/widgets/";
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -13,7 +24,12 @@ in {
|
|||
inherit (./compose.nix);
|
||||
|
||||
environment.etc = lib.mkIf cfg.enable {
|
||||
"homepage-dashboard/settings.yaml".source = settingsFormat.generate "settings.yaml" cfg.settings;
|
||||
"homepage-dashboard/widgets.yaml".source = settingsFormat.generate "widgets.yaml" cfg.widgets;
|
||||
};
|
||||
|
||||
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ 3000 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue