change from mono-home-manager to full flake multi-system configuration
This commit is contained in:
40
home/tor.nix
Normal file
40
home/tor.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.homeModules.tor;
|
||||
in
|
||||
|
||||
lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
tor-browser-bundle-bin
|
||||
onionshare
|
||||
qbittorrent
|
||||
torsocks
|
||||
qbittorrent
|
||||
];
|
||||
|
||||
systemd.user.services.tor-browser = {
|
||||
Unit = {
|
||||
Description = "Launch Tor Browser";
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.tor-browser-bundle-bin}/bin/tor-browser";
|
||||
Restart = "always";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Optionally allow torsocks usage system-wide
|
||||
#environment.variables = {
|
||||
# This allows tools to use torsocks if invoked manually
|
||||
# You may prefer wrapping apps instead
|
||||
# TOR_SOCKS_PORT = "9050";
|
||||
#};
|
||||
|
||||
# Optional CLI wrapper for routing traffic through Tor
|
||||
home.shellAliases = {
|
||||
torify = "torsocks";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user