1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/.dotfiles synced 2025-05-09 07:03:08 +00:00
This commit is contained in:
Rae 5e 2025-03-05 16:54:21 -05:00
parent 1739b89ea3
commit a1adbd9e02
Signed by: rae
GPG key ID: 5B1A0FAB9BAB81EE
6 changed files with 68 additions and 7 deletions

View file

@ -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"
];

View file

@ -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 ];
};
};
}

View file

@ -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