chore:misc_services

This commit is contained in:
dichgrem
2025-07-23 19:40:28 +08:00
parent ad1eb962ee
commit c1100c81a4
3 changed files with 64 additions and 50 deletions

View File

@@ -1,4 +1,6 @@
_: {
{ lib, pkgs, username, ... }:
{
services = {
# fgrim = {
# enable = true;
@@ -10,4 +12,39 @@ _: {
scheduler = "scx_lavd";
};
};
services.aria2.enable = false;
systemd.services.aria2 = {
description = "Aria2 Download Manager (dich)";
after = [ "network.target" ];
wants = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = username;
ExecStartPre = [
"${pkgs.coreutils}/bin/mkdir -p /home/${username}/.config/aria2"
"${pkgs.coreutils}/bin/touch /home/${username}/.config/aria2/aria2.session"
];
ExecStart = "${pkgs.aria2}/bin/aria2c --conf-path=/home/${username}/.config/aria2/aria2.conf";
Restart = "always";
RestartSec = "5s";
NoNewPrivileges = true;
PrivateTmp = true;
};
};
services.syncthing = {
enable = true;
user = username;
dataDir = "/home/${username}/Sync";
configDir = "/home/${username}/.config/syncthing";
guiAddress = "127.0.0.1:8384";
};
}

View File

@@ -5,7 +5,7 @@ _: {
source = [
{
address = "pool.ntp.org";
mode = "pool";
mode = "server";
}
{
address = "time.cloudflare.com";