From bf126b5e1ae5cbab3b62c00bbff614a23539e431 Mon Sep 17 00:00:00 2001 From: adikro Date: Sun, 12 Apr 2026 23:47:47 +0200 Subject: finalized client configs for tor, i2pd and yggdrasil --- os/core/core.nix | 36 ------------------------------------ os/core/default.nix | 36 ++++++++++++++++++++++++++++++++++++ os/default.nix | 6 +++--- os/srv/default.nix | 21 +++++++++++++++++++++ os/srv/i2p.nix | 31 ++++++++++++++++++------------- os/srv/srv.nix | 21 --------------------- os/srv/tor.nix | 13 ++++++++++--- os/srv/yggdrasil.nix | 1 + os/wm/default.nix | 37 +++++++++++++++++++++++++++++++++++++ os/wm/wm.nix | 39 --------------------------------------- 10 files changed, 126 insertions(+), 115 deletions(-) delete mode 100644 os/core/core.nix create mode 100644 os/core/default.nix create mode 100644 os/srv/default.nix delete mode 100644 os/srv/srv.nix create mode 100644 os/wm/default.nix delete mode 100644 os/wm/wm.nix (limited to 'os') diff --git a/os/core/core.nix b/os/core/core.nix deleted file mode 100644 index 160e67b..0000000 --- a/os/core/core.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, lib, ... }: -let - cfg = config.os.core; -in -{ - imports = [ - ./audio.nix - ./bootloader.nix - ./drivers.nix - ./fonts.nix - ./greet.nix - ./home-manager.nix - ./localization.nix - ./memory.nix - ./networking.nix - ./power.nix - ./security.nix - ./ssh.nix - ./storage.nix - ./users.nix - ]; - - options.os.core = { - allowUnfree.enable = lib.mkEnableOption "unfree software"; - flatpak.enable = lib.mkEnableOption "Flatpak support"; - }; - - config = lib.mkMerge [ - (lib.mkIf cfg.allowUnfree.enable { - nixpkgs.config.allowUnfree = true; - }) - (lib.mkIf cfg.flatpak.enable { - services.flatpak.enable = true; - }) - ]; -} diff --git a/os/core/default.nix b/os/core/default.nix new file mode 100644 index 0000000..160e67b --- /dev/null +++ b/os/core/default.nix @@ -0,0 +1,36 @@ +{ config, lib, ... }: +let + cfg = config.os.core; +in +{ + imports = [ + ./audio.nix + ./bootloader.nix + ./drivers.nix + ./fonts.nix + ./greet.nix + ./home-manager.nix + ./localization.nix + ./memory.nix + ./networking.nix + ./power.nix + ./security.nix + ./ssh.nix + ./storage.nix + ./users.nix + ]; + + options.os.core = { + allowUnfree.enable = lib.mkEnableOption "unfree software"; + flatpak.enable = lib.mkEnableOption "Flatpak support"; + }; + + config = lib.mkMerge [ + (lib.mkIf cfg.allowUnfree.enable { + nixpkgs.config.allowUnfree = true; + }) + (lib.mkIf cfg.flatpak.enable { + services.flatpak.enable = true; + }) + ]; +} diff --git a/os/default.nix b/os/default.nix index 225c08f..43e7476 100644 --- a/os/default.nix +++ b/os/default.nix @@ -1,8 +1,8 @@ { ... }: { imports = [ - ./core/core.nix - ./srv/srv.nix - ./wm/wm.nix + ./core/default.nix + ./srv/default.nix + ./wm/default.nix ]; } diff --git a/os/srv/default.nix b/os/srv/default.nix new file mode 100644 index 0000000..4b5a54a --- /dev/null +++ b/os/srv/default.nix @@ -0,0 +1,21 @@ +{ ... }: +{ + imports = [ + ./bluetooth.nix + ./compat.nix + ./files.nix + ./gaming.nix + ./i2p.nix + ./kdeconnect.nix + ./monero.nix + ./nix-helper.nix + ./ollama.nix + ./omnisearch.nix + ./sops.nix + ./syncthing.nix + ./tor.nix + ./virtualization.nix + ./vpn.nix + ./yggdrasil.nix + ]; +} diff --git a/os/srv/i2p.nix b/os/srv/i2p.nix index 9bf897b..74f5583 100644 --- a/os/srv/i2p.nix +++ b/os/srv/i2p.nix @@ -2,7 +2,6 @@ config, lib, pkgs, - username, ... }: let @@ -18,11 +17,23 @@ in (lib.mkIf cfg.enable { services.i2pd = { enable = true; - bandwidth = 1024; - logLevel = "info"; + enableIPv6 = true; upnp.enable = true; + bandwidth = 1024; + reseed.verify = true; + ntcp2 = { + enable = true; + # published = true; + }; + ssu2 = { + enable = true; + # published = true; + }; + yggdrasil = { + enable = true; + address = "200:5857:a255:4db6:8687:6928:ddc4:dad6"; + }; proto = { - i2pControl.enable = true; http.enable = true; httpProxy.enable = true; socksProxy = { @@ -30,19 +41,13 @@ in outproxyEnable = true; }; sam.enable = true; - }; - yggdrasil = { - enable = true; - # address = ""; - }; - ssu2 = { - enable = true; - # published = true; + i2pControl.enable = true; }; }; + # environment.systemPackages = [ pkgs.i2pd-tools ]; }) (lib.mkIf cfg.enableBrowser { - home-manager.users.${username}.home.packages = [ pkgs.mullvad-browser ]; + environment.systemPackages = [ pkgs.mullvad-browser ]; }) ]; } diff --git a/os/srv/srv.nix b/os/srv/srv.nix deleted file mode 100644 index 80b6296..0000000 --- a/os/srv/srv.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ ... }: -{ - imports = [ - ./syncthing.nix - ./tor.nix - ./sops.nix - ./bluetooth.nix - ./compat.nix - ./files.nix - ./gaming.nix - ./virtualization.nix - ./nix-helper.nix - ./ollama.nix - ./kdeconnect.nix - ./monero.nix - ./vpn.nix - ./i2p.nix - ./yggdrasil.nix - ./omnisearch.nix - ]; -} diff --git a/os/srv/tor.nix b/os/srv/tor.nix index 08c8152..55c779d 100644 --- a/os/srv/tor.nix +++ b/os/srv/tor.nix @@ -17,12 +17,19 @@ in (lib.mkIf cfg.enable { services.tor = { enable = true; + client = { + enable = true; + dns.enable = true; + transparentProxy.enable = true; + }; + settings = { + Sandbox = true; + DisableAllSwap = true; + }; }; }) (lib.mkIf cfg.enableBrowser { - environment.systemPackages = with pkgs; [ - tor-browser - ]; + environment.systemPackages = [ pkgs.tor-browser ]; }) ]; } diff --git a/os/srv/yggdrasil.nix b/os/srv/yggdrasil.nix index 7f95c00..1a18380 100644 --- a/os/srv/yggdrasil.nix +++ b/os/srv/yggdrasil.nix @@ -34,6 +34,7 @@ in ]; Listen = [ "tls://0.0.0.0:0" + "tcp://[::]:9001" ]; }; }; diff --git a/os/wm/default.nix b/os/wm/default.nix new file mode 100644 index 0000000..a470171 --- /dev/null +++ b/os/wm/default.nix @@ -0,0 +1,37 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.os.wm; +in +{ + imports = [ ./niri.nix ]; + + options.os.wm.enable = lib.mkEnableOption "enables shared wm features"; + + config = lib.mkIf cfg.enable { + services.dbus.enable = true; + + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + + extraPortals = [ + pkgs.xdg-desktop-portal-gnome + pkgs.xdg-desktop-portal-gtk + ]; + + config = { + common.default = [ "gtk" ]; + niri = { + "org.freedesktop.impl.portal.ScreenCast" = [ "gnome" ]; + "org.freedesktop.impl.portal.Screenshot" = [ "gnome" ]; + "default" = [ "gtk" ]; + }; + }; + }; + }; +} diff --git a/os/wm/wm.nix b/os/wm/wm.nix deleted file mode 100644 index a9046bb..0000000 --- a/os/wm/wm.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -let - cfg = config.os.wm; -in -{ - imports = [ - ./niri.nix - ]; - - options.os.wm.enable = lib.mkEnableOption "enables shared wm features"; - - config = lib.mkIf cfg.enable { - services.dbus.enable = true; - - xdg.portal = { - enable = true; - xdgOpenUsePortal = true; - - extraPortals = [ - pkgs.xdg-desktop-portal-gnome - pkgs.xdg-desktop-portal-gtk - ]; - - config = { - common.default = [ "gtk" ]; - niri = { - "org.freedesktop.impl.portal.ScreenCast" = [ "gnome" ]; - "org.freedesktop.impl.portal.Screenshot" = [ "gnome" ]; - "default" = [ "gtk" ]; - }; - }; - }; - }; -} -- cgit v1.3