diff --git a/nixos/networking/proxy.nix b/nixos/networking/proxy.nix index fd06445..7546a77 100644 --- a/nixos/networking/proxy.nix +++ b/nixos/networking/proxy.nix @@ -1,9 +1,17 @@ { pkgs, config, inputs, ... }: { + ### System proxy settings networking.proxy.default = "http://127.0.0.1:7890/"; - #environment.systemPackages = with pkgs; [ clash-meta ]; + ### User running proxy service + users.groups."clash-meta" = {}; + users.users."clash-meta" = { + isSystemUser = true; + group = config.users.groups."clash-meta".name; + }; + + ### Proxy service systemd.services."clash-meta" = { wantedBy = [ "multi-user.target" ]; after = [ "network-online.target" ]; diff --git a/nixos/users/default.nix b/nixos/users/default.nix index d5afd53..29159c8 100644 --- a/nixos/users/default.nix +++ b/nixos/users/default.nix @@ -3,6 +3,5 @@ { imports = [ ./users.nix - ./system-users.nix ]; } \ No newline at end of file diff --git a/nixos/users/system-users.nix b/nixos/users/system-users.nix deleted file mode 100644 index 87e96d5..0000000 --- a/nixos/users/system-users.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ ... }: - -{ - users.users."clash-meta" = { - isSystemUser = true; - group = "clash-meta"; - }; - users.groups.clash-meta = {}; -} \ No newline at end of file