mirror of
https://github.com/Melorise/nPanel.git
synced 2026-11-07 14:49:35 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
930b1b37fc | ||
|
|
1be5964c8a | ||
|
|
512710d54c |
@@ -157,8 +157,9 @@ journalctl -fu npanel-agent
|
||||
sudo systemctl restart npanel-agent npanel-core
|
||||
```
|
||||
|
||||
升级 nPanel 输入并执行常规 `nixos-rebuild switch` 即可。nPanel 不提供面板内自更新,
|
||||
软件版本始终由你的 Flake lock 和 NixOS 世代决定。
|
||||
同一兼容发布线内,升级 nPanel 输入并执行常规 `nixos-rebuild switch` 即可。nPanel 不提供
|
||||
面板内自更新,软件版本始终由你的 Flake lock 和 NixOS 世代决定。破坏性版本必须遵循对应
|
||||
发布说明,不得直接原地升级。
|
||||
|
||||
若主机安装并启用了 NVIDIA 驱动,`nvidia-smi` 位于当前 NixOS 世代的系统命令路径时,
|
||||
nPanel agent 会自动用于 GPU 监控;无需将独立 NVIDIA 包打进 nPanel 配置。
|
||||
@@ -169,6 +170,10 @@ nPanel 使用 `x.y.z` 产品版本号。`x` 仅与上游 1Panel 的主版本线
|
||||
nPanel 独立演进,不随上游的小版本号变动。首个发布版本为 `2.0.0`,应用商店协议兼容
|
||||
基线为上游 `v2.2.3`,两者是独立概念。
|
||||
|
||||
> **2.0.3 破坏性变更:**2.0.3 不提供从 2.0.1 或 2.0.2 原地升级的兼容迁移。这两个版本
|
||||
> 创建的应用配置可能具有不一致的文件权限和数据库启动参数;继续复用原状态目录可能导致
|
||||
> 数据库无法启动。升级者必须自行迁移所需业务数据,并以 2.0.3 重新部署面板及数据库。
|
||||
|
||||
发布分支同时是建议的 Flake 输入来源;不要以 Git tag 作为输入。tag 仅用于标记对应的
|
||||
unstable 发布提交,不能表达你正在使用的 NixOS 输入渠道。
|
||||
|
||||
|
||||
@@ -36,6 +36,13 @@ func Init() {
|
||||
// applyManagedSettings makes values declared by the NixOS module authoritative
|
||||
// over the panel's mutable settings database on every core startup.
|
||||
func applyManagedSettings(settingRepo repo.ISettingRepo) {
|
||||
if version := ctl_conf.LoadWithoutPanic("MANAGED_VERSION"); version != "" {
|
||||
if err := settingRepo.Update("SystemVersion", version); err != nil {
|
||||
global.LOG.Fatalf("apply managed panel version failed, err: %v", err)
|
||||
}
|
||||
global.CONF.Base.Version = version
|
||||
}
|
||||
|
||||
if port := ctl_conf.LoadWithoutPanic("MANAGED_PORT"); port != "" {
|
||||
if err := settingRepo.Update("ServerPort", port); err != nil {
|
||||
global.LOG.Fatalf("apply managed panel port failed, err: %v", err)
|
||||
|
||||
+6
-6
@@ -89,8 +89,10 @@ EOF
|
||||
|
||||
update_control_value ORIGINAL_PORT ${lib.escapeShellArg (toString cfg.port)}
|
||||
update_control_value ORIGINAL_ENTRANCE ${lib.escapeShellArg cfg.securityEntrance}
|
||||
update_control_value ORIGINAL_VERSION ${lib.escapeShellArg (cfg.package.version or "unknown")}
|
||||
update_control_value MANAGED_PORT ${lib.escapeShellArg (toString cfg.port)}
|
||||
update_control_value MANAGED_ENTRANCE ${lib.escapeShellArg cfg.securityEntrance}
|
||||
update_control_value MANAGED_VERSION ${lib.escapeShellArg (cfg.package.version or "unknown")}
|
||||
'';
|
||||
|
||||
commonServiceConfig = {
|
||||
@@ -112,12 +114,10 @@ EOF
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5s";
|
||||
UMask = "0077";
|
||||
PrivateTmp = true;
|
||||
ProtectSystem = "full";
|
||||
ProtectHome = false;
|
||||
PrivateDevices = false;
|
||||
NoNewPrivileges = false;
|
||||
# The upstream agent is a privileged host-management daemon. Its
|
||||
# application ecosystem relies on the conventional service umask so
|
||||
# non-root processes inside containers can read public configuration.
|
||||
UMask = "0022";
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2.0.0";
|
||||
version = "2.0.3";
|
||||
|
||||
frontend = buildNpmPackage {
|
||||
pname = "npanel-frontend";
|
||||
|
||||
Reference in New Issue
Block a user