mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-15 06:30:10 +03:00
refact, beets 3.14py
This commit is contained in:
@@ -1,14 +1,13 @@
|
|||||||
# Auto-generated using compose2nix v0.3.3-pre.
|
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
xlib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Runtime
|
virtualisation = {
|
||||||
virtualisation.podman = {
|
podman = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoPrune = {
|
autoPrune = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -16,44 +15,9 @@
|
|||||||
};
|
};
|
||||||
dockerCompat = true;
|
dockerCompat = true;
|
||||||
};
|
};
|
||||||
|
oci-containers = {
|
||||||
# Enable container name DNS for all Podman networks.
|
backend = "podman";
|
||||||
networking.firewall.interfaces =
|
containers."3xui_app" = {
|
||||||
let
|
|
||||||
matchAll = if !config.networking.nftables.enable then "podman+" else "podman*";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
"${matchAll}".allowedUDPPorts = [ 53 ];
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall = {
|
|
||||||
allowedUDPPortRanges = [
|
|
||||||
{
|
|
||||||
from = 14380;
|
|
||||||
to = 15380;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
allowedTCPPortRanges = [
|
|
||||||
{
|
|
||||||
from = 14380;
|
|
||||||
to = 15380;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
allowedTCPPorts = [
|
|
||||||
8443
|
|
||||||
9443
|
|
||||||
13380
|
|
||||||
];
|
|
||||||
allowedUDPPorts = [
|
|
||||||
8443
|
|
||||||
9443
|
|
||||||
13380
|
|
||||||
];
|
|
||||||
};
|
|
||||||
virtualisation.oci-containers.backend = "podman";
|
|
||||||
|
|
||||||
# Containers
|
|
||||||
virtualisation.oci-containers.containers."3xui_app" = {
|
|
||||||
image = "ghcr.io/mhsanaei/3x-ui:latest";
|
image = "ghcr.io/mhsanaei/3x-ui:latest";
|
||||||
environment = {
|
environment = {
|
||||||
"XRAY_VMESS_AEAD_FORCED" = "false";
|
"XRAY_VMESS_AEAD_FORCED" = "false";
|
||||||
@@ -61,15 +25,20 @@
|
|||||||
"TZ" = "Europe/Moscow";
|
"TZ" = "Europe/Moscow";
|
||||||
};
|
};
|
||||||
volumes = [
|
volumes = [
|
||||||
"/mnt/services/containers/3x-ui/cert/:/root/cert:rw"
|
"${xlib.dirs.services-mnt-folder}/containers/3x-ui/cert/:/root/cert:rw"
|
||||||
"/mnt/services/containers/3x-ui/db/:/etc/x-ui:rw"
|
"${xlib.dirs.services-mnt-folder}/containers/3x-ui/db/:/etc/x-ui:rw"
|
||||||
];
|
];
|
||||||
log-driver = "journald";
|
log-driver = "journald";
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=host"
|
"--network=host"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
systemd.services."podman-3xui_app" = {
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
services = {
|
||||||
|
"podman-3xui_app" = {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = lib.mkOverride 90 "always";
|
Restart = lib.mkOverride 90 "always";
|
||||||
};
|
};
|
||||||
@@ -80,9 +49,22 @@
|
|||||||
"podman-compose-3x-ui-root.target"
|
"podman-compose-3x-ui-root.target"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
# Update
|
||||||
|
"podman-update-3xui_app" = {
|
||||||
|
path = [
|
||||||
|
pkgs.podman
|
||||||
|
];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
TimeoutSec = 300;
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
podman pull ghcr.io/mhsanaei/3x-ui:latest
|
||||||
|
systemctl restart podman-3xui_app.service
|
||||||
|
'';
|
||||||
|
};
|
||||||
# Builds
|
# Builds
|
||||||
# systemd.services."podman-build-3xui_app" = {
|
# "podman-build-3xui_app" = {
|
||||||
# path = [
|
# path = [
|
||||||
# pkgs.podman
|
# pkgs.podman
|
||||||
# pkgs.git
|
# pkgs.git
|
||||||
@@ -96,19 +78,25 @@
|
|||||||
# podman build -t compose2nix/3xui_app -f ./Dockerfile .
|
# podman build -t compose2nix/3xui_app -f ./Dockerfile .
|
||||||
# '';
|
# '';
|
||||||
# };
|
# };
|
||||||
|
};
|
||||||
# Root service
|
# Root service
|
||||||
# When started, this will automatically create all resources and start
|
# When started, this will automatically create all resources and start
|
||||||
# the containers. When stopped, this will teardown all resources.
|
# the containers. When stopped, this will teardown all resources.
|
||||||
systemd.targets."podman-compose-3x-ui-root" = {
|
targets."podman-compose-3x-ui-root" = {
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
Description = "Root target generated by compose2nix.";
|
Description = "Root target generated by compose2nix.";
|
||||||
};
|
};
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
timers."podman-update-3xui_app" = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "weekly";
|
||||||
|
Persistent = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
# Folders
|
# Folders
|
||||||
systemd.tmpfiles.rules = [
|
tmpfiles.rules = [
|
||||||
"d /mnt 0755 root root -"
|
"d /mnt 0755 root root -"
|
||||||
"d /mnt/containers 0755 root root -"
|
"d /mnt/containers 0755 root root -"
|
||||||
"d /mnt/services/containers 0755 root root -"
|
"d /mnt/services/containers 0755 root root -"
|
||||||
@@ -116,4 +104,28 @@
|
|||||||
"d /mnt/services/containers/3x-ui/cert 0755 root root -"
|
"d /mnt/services/containers/3x-ui/cert 0755 root root -"
|
||||||
"d /mnt/services/containers/3x-ui/db 0755 root root -"
|
"d /mnt/services/containers/3x-ui/db 0755 root root -"
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable container name DNS for all Podman networks.
|
||||||
|
networking.firewall = {
|
||||||
|
allowedUDPPortRanges = [
|
||||||
|
{
|
||||||
|
from = 14380;
|
||||||
|
to = 15380;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
allowedTCPPortRanges = [
|
||||||
|
{
|
||||||
|
from = 14380;
|
||||||
|
to = 15380;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
interfaces =
|
||||||
|
let
|
||||||
|
matchAll = if !config.networking.nftables.enable then "podman+" else "podman*";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"${matchAll}".allowedUDPPorts = [ 53 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,21 +85,21 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Builds
|
# Builds
|
||||||
systemd.services."podman-build-openhands-app" = {
|
# systemd.services."podman-build-openhands-app" = {
|
||||||
enable = false;
|
# enable = false;
|
||||||
path = [
|
# path = [
|
||||||
pkgs.podman
|
# pkgs.podman
|
||||||
pkgs.git
|
# pkgs.git
|
||||||
];
|
# ];
|
||||||
serviceConfig = {
|
# serviceConfig = {
|
||||||
Type = "oneshot";
|
# Type = "oneshot";
|
||||||
TimeoutSec = 300;
|
# TimeoutSec = 300;
|
||||||
};
|
# };
|
||||||
script = ''
|
# script = ''
|
||||||
cd ${xlib.dirs.services-mnt-folder}/containers/openhands/source
|
# cd ${xlib.dirs.services-mnt-folder}/containers/openhands/source
|
||||||
podman build -t openhands:latest -f ./containers/app/Dockerfile .
|
# podman build -t openhands:latest -f ./containers/app/Dockerfile .
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
|
|
||||||
# Root service
|
# Root service
|
||||||
# When started, this will automatically create all resources and start
|
# When started, this will automatically create all resources and start
|
||||||
|
|||||||
@@ -20,24 +20,24 @@ let
|
|||||||
# python3 = pkgs.python3.override {
|
# python3 = pkgs.python3.override {
|
||||||
# packageOverrides = depsOverlay;
|
# packageOverrides = depsOverlay;
|
||||||
# };
|
# };
|
||||||
beetsEnv = pkgs.python313.withPackages (
|
beetsEnv = pkgs.python314.withPackages (
|
||||||
ps: with ps; [
|
ps: with ps; [
|
||||||
anyio #
|
anyio # N
|
||||||
lap #
|
lap # N
|
||||||
llvmlite #
|
llvmlite # N
|
||||||
scipy #
|
scipy # N
|
||||||
requests-ratelimiter #
|
requests-ratelimiter # N
|
||||||
pyrate-limiter #
|
pyrate-limiter # N
|
||||||
numpy #
|
numpy # N
|
||||||
numba #
|
numba # N
|
||||||
et-xmlfile
|
et-xmlfile
|
||||||
markdown-it-py
|
markdown-it-py
|
||||||
mdurl
|
mdurl
|
||||||
openpyxl
|
openpyxl
|
||||||
pygments
|
pygments
|
||||||
rich
|
rich
|
||||||
setuptools #
|
setuptools # N
|
||||||
pysocks #
|
pysocks # N
|
||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
beetcamp
|
beetcamp
|
||||||
beets
|
beets
|
||||||
|
|||||||
Reference in New Issue
Block a user