chore:remove_gfs

This commit is contained in:
dichgrem
2025-12-04 14:46:01 +08:00
parent e3ff465632
commit 0c20b462be
4 changed files with 44 additions and 6 deletions

View File

@@ -1,5 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
gui-for-singbox
];
}

View File

@@ -7,6 +7,8 @@
GPU-AMD = true;
### See https://nixos.wiki/wiki/AMD_GPU
SingBox = true;
Power-control = "TLP";
### Possible options: PPD ; TLP

View File

@@ -16,6 +16,8 @@
HotSpot-Use-Case = false;
### See https://nixos.wiki/wiki/Internet_Connection_Sharing
SingBox = true;
Power control = "PPD";
### Possible options: PPD ; TLP

View File

@@ -0,0 +1,39 @@
{ hostname, lib, pkgs, ... }:
with lib;
let
inherit (import ../../hosts/${hostname}/env.nix) SingBox;
in
{
disabledModules = [ "services/networking/sing-box.nix" ];
config = mkIf SingBox {
environment.systemPackages = [ pkgs.sing-box ];
systemd.tmpfiles.rules = [
"d /etc/sing-box 0755 root root -"
];
systemd.services.sing-box = {
description = "sing-box service (custom)";
after = [ "network.target" ];
wantedBy = [ ];
script = ''
exec ${pkgs.sing-box}/bin/sing-box -D "$STATE_DIRECTORY" run -c /etc/sing-box/config.json
'';
serviceConfig = {
DynamicUser = true;
CapabilityBoundingSet = "CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_DAC_OVERRIDE";
AmbientCapabilities = "CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_DAC_OVERRIDE";
NoNewPrivileges = true;
StateDirectory = "sing-box";
StateDirectoryMode = "0700";
Restart = "always";
RestartSec = 5;
};
};
};
}