mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-26 09:58:25 +02:00
* feat: upgrade nixpkgs stable to 25.11, update nixos-apple-silicon, ghostty, anyrun, etc * fix: asahi-nixos - revert mesa to 25.2.6 * fix: disable gitui - it's broken on aarch64-darwin currently --------- Signed-off-by: Ryan Yin <xiaoyin_c@qq.com>
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
user = "homepage";
|
|
configDir = "/data/apps/homepage-dashboard";
|
|
in
|
|
{
|
|
users.groups.${user} = { };
|
|
users.users.${user} = {
|
|
group = user;
|
|
home = configDir;
|
|
isSystemUser = true;
|
|
};
|
|
|
|
# Install the homepage-dashboard configuration files
|
|
system.activationScripts.installHomepageDashboardConfig = ''
|
|
mkdir -p ${configDir}
|
|
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F644 ${./config}/ ${configDir}/
|
|
chown -R ${user}:${user} ${configDir}
|
|
'';
|
|
|
|
# https://github.com/NixOS/nixpkgs/blob/nixos-25.11/nixos/modules/virtualisation/oci-containers.nix
|
|
virtualisation.oci-containers.containers = {
|
|
# check its logs via `journalctl -u podman-homepage`
|
|
homepage = {
|
|
hostname = "homepage";
|
|
image = "ghcr.io/gethomepage/homepage:latest";
|
|
ports = [ "127.0.0.1:54401:3000" ];
|
|
# https://github.com/louislam/uptime-kuma/wiki/Environment-Variables
|
|
environment = {
|
|
# "PUID" = config.users.users.${user}.uid;
|
|
# "PGID" = config.users.groups.${user}.gid;
|
|
};
|
|
volumes = [
|
|
"${configDir}:/app/config"
|
|
];
|
|
autoStart = true;
|
|
};
|
|
};
|
|
}
|