mirror of
https://git.sr.ht/~roxwize/.dotfiles
synced 2025-05-08 22:53:08 +00:00
~
This commit is contained in:
parent
1739b89ea3
commit
a1adbd9e02
6 changed files with 68 additions and 7 deletions
|
@ -1,5 +1,7 @@
|
|||
# Auto-generated using compose2nix v0.3.1.
|
||||
{ pkgs, lib, ... }: {
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Runtime
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
|
@ -11,6 +13,7 @@
|
|||
virtualisation.oci-containers.containers."homepage" = {
|
||||
image = "ghcr.io/gethomepage/homepage:latest";
|
||||
volumes = [
|
||||
"/home/rae/.dotfiles/assets/wallpapers:/app/public/images:rw"
|
||||
"/home/rae/.dotfiles/configs/homepage:/app/config:rw"
|
||||
"/var/run/docker.sock:/var/run/docker.sock:rw"
|
||||
];
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,3 +8,4 @@ services:
|
|||
volumes:
|
||||
- /home/rae/.dotfiles/configs/homepage:/app/config # Make sure your local config directory exists
|
||||
- /var/run/docker.sock:/var/run/docker.sock # (optional) For docker integrations
|
||||
- /home/rae/.dotfiles/assets/wallpapers:/app/public/images
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue