diff --git a/Droidnix/README.html b/Droidnix/README.html index 648ba9811..aea5dd243 100644 --- a/Droidnix/README.html +++ b/Droidnix/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Droidnix: A Dendritic NixOS + Home Manager Configuration NixOS Configuration Structure @@ -204,129 +204,131 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

Introduction The Assets Folder @@ -342,25 +344,25 @@

Introduction   intro

-
-

What is Droidnix

-
+
+

What is Droidnix

+

Droidnix is a modular, declarative NixOS + Home Manager configuration system. with configurations managed via Emacs Org and Nix Flakes. The project is designed for reproducibility, maintainability, and cross-machine compatibility.

-
-

Installed components:

-
+
+

Installed components:

+
    -
  • Core
  • -
  • Hyprland
  • +
  • Core
  • +
  • Hyprland
-
-

Goals, project Structure, import hierarchy

-
+
+

Goals, project Structure, import hierarchy

+

This project uses a modular NixOS configuration with Hyprland support, designed for literate programming and cross-device reusability. The Droidnix repository is organized into two main parts: @@ -373,9 +375,9 @@ The Droidnix repository is organized into two main parts:

-
-

Root Level

-
+
+

Root Level

+
  • flake.nix is the entry point and imports:
      @@ -386,16 +388,16 @@ The Droidnix repository is organized into two main parts:
-
-

Generated Structure

-
+
+

Generated Structure

+

The generated/ directory contains all generated configurations, divided into three main groups: system, hyprland, and mangowc.

-
-

First Setup

-
+
+

First Setup

+
  1. Clone this repository.
  2. Run the setup script: ./setup_droid.
  3. @@ -416,9 +418,9 @@ The generated/ directory contains all generated configurations, div The .assets/ folder contains all static files, such as configs, scripts, and themes. These files are not generated and can be edited directly.

-
-

generated/assets/2_b_installed.conf

-
+
+

generated/assets/2_b_installed.conf

+

This is a list of additional apps to install

@@ -499,9 +501,9 @@ com.todoist.Todoist This section contains the Org blocks for tangling Nix code into the generated folders.

-
-

generated/flake.nix

-
+
+

generated/flake.nix

+

The Nix flake definition for Droidnix.

@@ -575,9 +577,9 @@ The Nix flake definition for Droidnix.
-
-

generated/modules/traveldroid/system/Colors.nix

-
+
+

generated/modules/traveldroid/system/Colors.nix

+

Setting the colors for Droidnix.

@@ -661,9 +663,9 @@ in
-
-

generated/hosts/traveldroid/boot.nix

-
+
+

generated/hosts/traveldroid/boot.nix

+
{ config, pkgs, lib, flakeRoot, ... }:
 
@@ -709,9 +711,9 @@ in
 
-
-

generated/hosts/traveldroid/hardware-configuration.nix

-
+
+

generated/hosts/traveldroid/hardware-configuration.nix

+
  1. Boot into NixOS Live ISO or your installed system.
  2. Open a terminal.
  3. @@ -769,9 +771,9 @@ in
-
-

generated/hosts/traveldroid/host.nix

-
+
+

generated/hosts/traveldroid/host.nix

+
{ lib, config, pkgs, flakeRoot, import-tree, home-manager, ... }:
 
@@ -830,13 +832,13 @@ in
 
-
-

generated/traveldroid/modules/apps

-
+
+

generated/traveldroid/modules/apps

+
-
-

generated/modules/traveldroid/apps/2_b_installed.nix

-
+
+

generated/modules/traveldroid/apps/2_b_installed.nix

+

This installs a list of apps

@@ -944,9 +946,9 @@ in {
-
-

generated/modules/traveldroid/apps/emacs/emacs.nix

-
+
+

generated/modules/traveldroid/apps/emacs/emacs.nix

+

This installs emacs

@@ -1042,9 +1044,9 @@ in
-
-

generated/modules/traveldroid/apps/flameshot.nix

-
+
+

generated/modules/traveldroid/apps/flameshot.nix

+

This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

@@ -1083,9 +1085,9 @@ in
-
-

generated/modules/traveldroid/apps/kitty.nix

-
+
+

generated/modules/traveldroid/apps/kitty.nix

+

This file sets up Kitty terminal

@@ -1143,9 +1145,9 @@ in
-
-

generated/modules/traveldroid/apps/starship.nix

-
+
+

generated/modules/traveldroid/apps/starship.nix

+

This file sets up starship prompt

@@ -1184,9 +1186,9 @@ in
-
-

generated/modules/traveldroid/apps/thunar.nix

-
+
+

generated/modules/traveldroid/apps/thunar.nix

+

This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder

@@ -1227,9 +1229,9 @@ in
-
-

generated/modules/traveldroid/apps/wofi.nix

-
+
+

generated/modules/traveldroid/apps/wofi.nix

+

This is the install for Wofi, the launcher

@@ -1262,9 +1264,9 @@ in
-
-

generated/modules/traveldroid/apps/zenbrowser.nix

-
+
+

generated/modules/traveldroid/apps/zenbrowser.nix

+

This installs zen browser

@@ -1284,9 +1286,9 @@ in
-
-

generated/modules/traveldroid/apps/zsh.nix

-
+
+

generated/modules/traveldroid/apps/zsh.nix

+

This sets up the zsh in the terminal

@@ -1349,13 +1351,13 @@ in
-
-

generated/modules/traveldroid/desktop

-
+
+

generated/modules/traveldroid/desktop

+
-
-

generated/modules/traveldroid/desktop/fonts.nix

-
+
+

generated/modules/traveldroid/desktop/fonts.nix

+

This file installs and configures fonts

@@ -1373,9 +1375,9 @@ This file installs and configures fonts
-
-

generated/modules/traveldroid/desktop/gtk.nix

-
+
+

generated/modules/traveldroid/desktop/gtk.nix

+

Setting up GTK

@@ -1401,9 +1403,9 @@ in
-
-

generated/modules/traveldroid/desktop/hyprland.nix

-
+
+

generated/modules/traveldroid/desktop/hyprland.nix

+

Setting up Hyprland

@@ -1449,9 +1451,9 @@ in
-
-

generated/modules/traveldroid/desktop/stylix.nix

-
+
+

generated/modules/traveldroid/desktop/stylix.nix

+
{ lib, config, pkgs, flakeRoot, stylix, ... }:
 
@@ -1538,9 +1540,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/wallpaper.nix

-
+
+

generated/modules/traveldroid/desktop/wallpaper.nix

+

Setting up wallpaper engine + wallpaper gui

@@ -1639,9 +1641,9 @@ in
-
-

generated/modules/traveldroid/desktop/waybar.nix

-
+
+

generated/modules/traveldroid/desktop/waybar.nix

+

This file installs and configures waybar

@@ -1708,9 +1710,9 @@ in
-
-

generated/modules/traveldroid/desktop/wayland.nix

-
+
+

generated/modules/traveldroid/desktop/wayland.nix

+
{ lib, config, pkgs, ... }:
 
@@ -1740,9 +1742,9 @@ in
 
-
-

generated/modules/traveldroid/desktop/xdg.nix

-
+
+

generated/modules/traveldroid/desktop/xdg.nix

+

This sets the XDG implementation

@@ -1796,13 +1798,13 @@ in
-
-

generated/modules/traveldroid/system

-
+
+

generated/modules/traveldroid/system

+
-
-

generated/modules/traveldroid/system/audio.nix

-
+
+

generated/modules/traveldroid/system/audio.nix

+
{ lib, config, pkgs, ... }:
 
@@ -1821,9 +1823,34 @@ in
 
-
-

generated/modules/traveldroid/system/bluetooth.nix

-
+
+

generated/modules/traveldroid/system/avahi.nix

+
+

+Avahi helps discovering services +

+
+
{ ... }:
+{
+  services.avahi = {
+    enable = true;
+    nssmdns4 = true;
+    publish = {
+      enable = true;
+      addresses = true;
+    };
+  };
+}
+
+
+
+
+
+

generated/modules/traveldroid/system/bluetooth.nix

+
+

+Installing Bluetooth services and supporting aps +

{ lib, config, pkgs, home-manager, ... }:
 
@@ -1844,9 +1871,12 @@ in
 
-
-

generated/modules/traveldroid/system/copy_scripts.nix

-
+
+

generated/modules/traveldroid/system/copy_scripts.nix

+
+

+This copies any scripts from generated.config/scripts to ~/.config/scripts and makes any .sh files executable. +

{ lib, config, pkgs, flakeRoot, ... }:
 let
@@ -1884,9 +1914,9 @@ in
 
-
-

generated/modules/traveldroid/system/dbus.nix

-
+
+

generated/modules/traveldroid/system/dbus.nix

+

This sets the dbus implementation

@@ -1913,9 +1943,87 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/gnome-keyring.nix

-
+
+

generated/modules/traveldroid/system/firewall.nix

+
+

+This sets the firewall. +

+
+
{ pkgs, ... }:
+
+{
+  # Use nftables as the firewall backend
+  networking.nftables.enable = true;
+
+  networking.firewall = {
+    enable = true;
+
+    # LAN-only ports — Wi-Fi interface
+    interfaces."wlan0" = {
+      allowedTCPPorts = [
+        631    # CUPS / IPP network printing
+        9100   # AppSocket/JetDirect printing
+        6566   # SANE network scanner
+        57621  # Spotify Connect
+        57622  # Spotify local file sync
+      ];
+      allowedTCPPortRanges = [
+        { from = 1714; to = 1764; }  # KDE Connect
+      ];
+      allowedUDPPorts = [
+        5353   # mDNS / Avahi (printer + device discovery)
+        631    # CUPS / IPP
+        67     # DHCP
+        123    # NTP time sync
+        1900   # UPnP device discovery
+        57621  # Spotify Connect
+      ];
+      allowedUDPPortRanges = [
+        { from = 1714; to = 1764; }  # KDE Connect
+      ];
+    };
+
+    # LAN-only ports — ethernet (ready for when you plug in)
+    interfaces."enp0s31f6" = {
+      allowedTCPPorts = [
+        631    # CUPS / IPP network printing
+        9100   # AppSocket/JetDirect printing
+        6566   # SANE network scanner
+        57621  # Spotify Connect
+        57622  # Spotify local file sync
+      ];
+      allowedTCPPortRanges = [
+        { from = 1714; to = 1764; }  # KDE Connect
+      ];
+      allowedUDPPorts = [
+        5353   # mDNS / Avahi (printer + device discovery)
+        631    # CUPS / IPP
+        67     # DHCP
+        123    # NTP time sync
+        1900   # UPnP device discovery
+        57621  # Spotify Connect
+      ];
+      allowedUDPPortRanges = [
+        { from = 1714; to = 1764; }  # KDE Connect
+      ];
+    };
+  };
+
+  # Firewall management tools
+  environment.systemPackages = with pkgs; [
+    nixos-firewall-tool  # CLI: sudo nixos-firewall-tool open tcp 8080
+    firewall-config      # GUI: graphical firewall manager (Wayland-compatible)
+  ];
+  services.firewalld.enable = true;
+}
+
+
+
+
+
+

generated/modules/traveldroid/system/gnome-keyring.nix

+

This sets the dbus implementation

@@ -1963,9 +2071,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/login-tuigreet.nix

-
+
+

generated/modules/traveldroid/system/login-tuigreet.nix

+

This sets up tuigreeter which is not fancy but imo fits the aesthetic I am aiming for

@@ -2019,9 +2127,9 @@ in
-
-

generated/modules/traveldroid/system/networking.nix

-
+
+

generated/modules/traveldroid/system/networking.nix

+

This sets the networking.

@@ -2036,8 +2144,6 @@ This sets the networking. # Let DHCP be default unless overridden elsewhere useDHCP = lib.mkDefault true; - # Hostname comes from host.nix, do NOT redefine here - ################################# # NetworkManager (primary stack) ################################# @@ -2055,20 +2161,6 @@ This sets the networking. # Allow user control via NM / CLI settings.General.EnableNetworkConfiguration = true; }; - - ################################# - # Firewall - ################################# - firewall = { - enable = true; - # KDE Connect support - allowedTCPPortRanges = [ - { from = 1714; to = 1764; } - ]; - allowedUDPPortRanges = [ - { from = 1714; to = 1764; } - ]; - }; }; ################################# @@ -2086,9 +2178,9 @@ This sets the networking.
-
-

generated/modules/traveldroid/system/nix.nix

-
+
+

generated/modules/traveldroid/system/nix.nix

+
{ lib, config, ... }:
 
@@ -2104,9 +2196,9 @@ This sets the networking.
 
-
-

generated/modules/traveldroid/system/printing.nix

-
+
+

generated/modules/traveldroid/system/printing.nix

+

This sets the dbus implementation

@@ -2130,9 +2222,9 @@ This sets the dbus implementation
-
-

generated/modules/traveldroid/system/quickshell.nix

-
+
+

generated/modules/traveldroid/system/quickshell.nix

+

This sets the dbus implementation

@@ -2185,13 +2277,13 @@ in
-
-

generated/users

-
+
+

generated/users

+
-
-

generated/users/

-
+
+

generated/users/

+

This is the default user, just search and replace henrov another name if you want to change

@@ -2253,9 +2345,9 @@ in

These are all the prepared config files

-
-

generated/.config/emacs/early-init.el

-
+
+

generated/.config/emacs/early-init.el

+

This contaions emacs

@@ -2356,9 +2448,9 @@ package-archive-priorities '(("gnu" . 99)
-
-

generated/.config/emacs/init.el

-
+
+

generated/.config/emacs/init.el

+

This contaions emacs

@@ -2768,9 +2860,9 @@ the top of the file."
-
-

generated/.config/hypr/animations.conf

-
+
+

generated/.config/hypr/animations.conf

+

These are config files for .config/hypr

@@ -2791,9 +2883,9 @@ animations {
-
-

generated/.config/hypr/behaviour.conf

-
+
+

generated/.config/hypr/behaviour.conf

+

These are config files for .config/hypr

@@ -2807,9 +2899,9 @@ These are config files for .config/hypr
-
-

generated/.config/hypr/bindings.conf

-
+
+

generated/.config/hypr/bindings.conf

+

These are config files for .config/hypr

@@ -2973,9 +3065,9 @@ bind = $mainMod, U, exec, kitty -e bash -lc "$HOME/.config/scripts/update.sh"
-
-

generated/.config/hypr/exec-once.conf

-
+
+

generated/.config/hypr/exec-once.conf

+

These are config files for .config/hypr

@@ -2995,9 +3087,9 @@ exec-once = ~/.config/scripts/hypr-autocolwidth.sh
-
-

generated/.config/hypr/hypridle.conf

-
+
+

generated/.config/hypr/hypridle.conf

+

These are config files for .config/hypr

@@ -3022,9 +3114,9 @@ listener {
-
-

generated/.config/hypr/hyprland.conf

-
+
+

generated/.config/hypr/hyprland.conf

+

These are config files for .config/hypr

@@ -3043,9 +3135,9 @@ source = ./workspace-rules.conf
-
-

generated/.config/hypr/layer-rules.conf

-
+
+

generated/.config/hypr/layer-rules.conf

+

These are config files for .config/hypr

@@ -3060,9 +3152,9 @@ layerrule = blur on, ignore_alpha 1, match:namespace swaync-notification-window
-
-

generated/.config/hypr/layout.conf

-
+
+

generated/.config/hypr/layout.conf

+

These are config files for .config/hypr

@@ -3077,9 +3169,9 @@ scrolling {
-
-

generated/.config/hypr/monitor-rules.conf

-
+
+

generated/.config/hypr/monitor-rules.conf

+

These are config files for .config/hypr

@@ -3090,9 +3182,9 @@ monitor=DP-1,3840x1080@144,1920x0,1
-
-

generated/.config/hypr/theming.conf

-
+
+

generated/.config/hypr/theming.conf

+

These are config files for .config/hypr

@@ -3159,9 +3251,9 @@ misc {
-
-

generated/.config/hypr/window-rules.conf

-
+
+

generated/.config/hypr/window-rules.conf

+

These are config files for .config/hypr

@@ -3228,9 +3320,9 @@ windowrule {
-
-

generated/.config/hypr/workspace-rules.conf

-
+
+

generated/.config/hypr/workspace-rules.conf

+

These are config files for .config/hypr

@@ -3255,9 +3347,9 @@ workspace = 10
-
-

generated/.config/quickshell/media/shell.qml

-
+
+

generated/.config/quickshell/media/shell.qml

+

offers a adio widget

@@ -3651,9 +3743,9 @@ ShellRoot {
-
-

generated/.config/quickshell/powermenu/shell.qml

-
+
+

generated/.config/quickshell/powermenu/shell.qml

+

Provides a powermenu

@@ -3801,9 +3893,9 @@ ShellRoot {
-
-

generated/.config/scripts/media.sh

-
+
+

generated/.config/scripts/media.sh

+

Providing an media

@@ -3903,9 +3995,9 @@ jq -c -n \
-
-

generated/.config/scripts/layout-selector.sh

-
+
+

generated/.config/scripts/layout-selector.sh

+

Choose your layout

@@ -3947,9 +4039,9 @@ hyprctl dispatch oSD "Layout: $LAYOUT_NAME" 2000
-
-

generated/.config/scripts/hypr-autocolwidth.sh

-
+
+

generated/.config/scripts/hypr-autocolwidth.sh

+

These are config files for .config/scripts

@@ -4003,9 +4095,9 @@ done
-
-

generated/.config/scripts/power.sh

-
+
+

generated/.config/scripts/power.sh

+

A file containing color variables

@@ -4061,9 +4153,9 @@ main
-
-

generated/.config/scripts/update.sh

-
+
+

generated/.config/scripts/update.sh

+

A file containing color variables

@@ -4082,9 +4174,9 @@ flatpak update -y
-
-

generated/.config/scripts/wofi-launcher.sh

-
+
+

generated/.config/scripts/wofi-launcher.sh

+

Providing an media

@@ -4099,9 +4191,9 @@ Providing an media
-
-

generated/.config/shared/Colors.css

-
+
+

generated/.config/shared/Colors.css

+

A file containing color variables

@@ -4141,9 +4233,9 @@ A file containing color variables
-
-

generated/.config/starship.toml

-
+
+

generated/.config/starship.toml

+

These are config files for Starship

@@ -4431,9 +4523,9 @@ crust = "#181926"
-
-

generated/.config/stylix/stylix.conf

-
+
+

generated/.config/stylix/stylix.conf

+

These are config files for .config/stylix

@@ -4470,9 +4562,9 @@ icons = {
-
-

generated/.config/stylix/palette.json

-
+
+

generated/.config/stylix/palette.json

+

These are config files for .config/stylix

@@ -4502,9 +4594,9 @@ These are config files for .config/stylix
-
-

generated/.config/stylix/palette.html

-
+
+

generated/.config/stylix/palette.html

+

These are config files for .config/stylix

@@ -4582,9 +4674,9 @@ These are config files for .config/stylix
-
-

generated/.config/waybar/config

-
+
+

generated/.config/waybar/config

+

These are config files for waybar

@@ -4823,9 +4915,9 @@ These are config files for waybar
-
-

generated/.config/waybar/style-dark.css

-
+
+

generated/.config/waybar/style-dark.css

+

This file contains all css for waybar

@@ -5050,9 +5142,9 @@ label#custom-media.module {
-
-

generated/.config/scripts/bluetooth-status.sh

-
+
+

generated/.config/scripts/bluetooth-status.sh

+

These are config files for waybar

@@ -5077,9 +5169,9 @@ printf '{"text": "%s", "tooltip": "%s"}\n' "$icon" "$tooltip"
-
-

generated/.config/scripts/hypr-workspaces.sh

-
+
+

generated/.config/scripts/hypr-workspaces.sh

+

These are config files for waybar

@@ -5121,9 +5213,9 @@ jq -c -n \
-
-

generated/.config/scripts/hypr-workspacesmenu.sh

-
+
+

generated/.config/scripts/hypr-workspacesmenu.sh

+

These are config files for waybar

@@ -5145,9 +5237,9 @@ hyprctl dispatch focuswindow address:"$addr"
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for waypaper

@@ -5184,9 +5276,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/waypaper/config.ini

-
+
+

generated/.config/waypaper/config.ini

+

These are config files for .config/waypaper

@@ -5222,9 +5314,9 @@ keybindings = ~/.config/waypaper/keybindings.ini
-
-

generated/.config/wofi/config

-
+
+

generated/.config/wofi/config

+

These are config files for .config/wofi

@@ -5251,9 +5343,9 @@ prompt = > ...
-
-

generated/.config/wofi/style.css

-
+
+

generated/.config/wofi/style.css

+

This is the default layout for wofi

@@ -5349,9 +5441,9 @@ This is the default layout for wofi
-
-

generated/.config/zed/settings.json

-
+
+

generated/.config/zed/settings.json

+

These are config files for Zed editor

@@ -5387,9 +5479,9 @@ These are config files for Zed editor
-
-

generated/.config/zsh/.zshrc

-
+
+

generated/.config/zsh/.zshrc

+

This sets up the zsh in the terminal

@@ -5414,7 +5506,7 @@ fi

Author: Henro Veijer

-

Created: 2026-04-13 ma 20:29

+

Created: 2026-04-14 di 13:34

Validate

diff --git a/Droidnix/README.org b/Droidnix/README.org index 35d590e18..a589c08e2 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -1333,7 +1333,24 @@ in } #+END_SRC +** =generated/modules/traveldroid/system/avahi.nix= +Avahi helps discovering services +#+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/avahi.nix :noweb yes :mkdirp yes :eval never +{ ... }: +{ + services.avahi = { + enable = true; + nssmdns4 = true; + publish = { + enable = true; + addresses = true; + }; + }; +} +#+END_SRC + ** =generated/modules/traveldroid/system/bluetooth.nix= +Installing Bluetooth services and supporting aps #+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/bluetooth.nix :noweb yes :mkdirp yes :eval never { lib, config, pkgs, home-manager, ... }: @@ -1353,6 +1370,7 @@ in #+END_SRC ** =generated/modules/traveldroid/system/copy_scripts.nix= +This copies any scripts from /generated/.config/scripts to ~/.config/scripts and makes any .sh files executable. #+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/copy_scripts.nix :noweb yes :mkdirp yes :eval never { lib, config, pkgs, flakeRoot, ... }: let @@ -1411,6 +1429,78 @@ This sets the dbus implementation } #+END_SRC +** =generated/modules/traveldroid/system/firewall.nix= +This sets the firewall. +#+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/firewall.nix :noweb yes :mkdirp yes :eval never +{ pkgs, ... }: + +{ + # Use nftables as the firewall backend + networking.nftables.enable = true; + + networking.firewall = { + enable = true; + + # LAN-only ports — Wi-Fi interface + interfaces."wlan0" = { + allowedTCPPorts = [ + 631 # CUPS / IPP network printing + 9100 # AppSocket/JetDirect printing + 6566 # SANE network scanner + 57621 # Spotify Connect + 57622 # Spotify local file sync + ]; + allowedTCPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + allowedUDPPorts = [ + 5353 # mDNS / Avahi (printer + device discovery) + 631 # CUPS / IPP + 67 # DHCP + 123 # NTP time sync + 1900 # UPnP device discovery + 57621 # Spotify Connect + ]; + allowedUDPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + }; + + # LAN-only ports — ethernet (ready for when you plug in) + interfaces."enp0s31f6" = { + allowedTCPPorts = [ + 631 # CUPS / IPP network printing + 9100 # AppSocket/JetDirect printing + 6566 # SANE network scanner + 57621 # Spotify Connect + 57622 # Spotify local file sync + ]; + allowedTCPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + allowedUDPPorts = [ + 5353 # mDNS / Avahi (printer + device discovery) + 631 # CUPS / IPP + 67 # DHCP + 123 # NTP time sync + 1900 # UPnP device discovery + 57621 # Spotify Connect + ]; + allowedUDPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + }; + }; + + # Firewall management tools + environment.systemPackages = with pkgs; [ + nixos-firewall-tool # CLI: sudo nixos-firewall-tool open tcp 8080 + firewall-config # GUI: graphical firewall manager (Wayland-compatible) + ]; + services.firewalld.enable = true; +} +#+END_SRC + ** =generated/modules/traveldroid/system/gnome-keyring.nix= This sets the dbus implementation #+BEGIN_SRC nix :tangle generated/modules/traveldroid/system/gnome-keyring.nix :noweb yes :mkdirp yes :eval never @@ -1518,8 +1608,6 @@ This sets the networking. # Let DHCP be default unless overridden elsewhere useDHCP = lib.mkDefault true; - # Hostname comes from host.nix, do NOT redefine here - ################################# # NetworkManager (primary stack) ################################# @@ -1537,20 +1625,6 @@ This sets the networking. # Allow user control via NM / CLI settings.General.EnableNetworkConfiguration = true; }; - - ################################# - # Firewall - ################################# - firewall = { - enable = true; - # KDE Connect support - allowedTCPPortRanges = [ - { from = 1714; to = 1764; } - ]; - allowedUDPPortRanges = [ - { from = 1714; to = 1764; } - ]; - }; }; ################################# diff --git a/Droidnix/generated/modules/traveldroid/system/avahi.nix b/Droidnix/generated/modules/traveldroid/system/avahi.nix new file mode 100644 index 000000000..09afeee66 --- /dev/null +++ b/Droidnix/generated/modules/traveldroid/system/avahi.nix @@ -0,0 +1,12 @@ +# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- +{ ... }: +{ + services.avahi = { + enable = true; + nssmdns4 = true; + publish = { + enable = true; + addresses = true; + }; + }; +} diff --git a/Droidnix/generated/modules/traveldroid/system/firewall.nix b/Droidnix/generated/modules/traveldroid/system/firewall.nix new file mode 100644 index 000000000..a3d06067f --- /dev/null +++ b/Droidnix/generated/modules/traveldroid/system/firewall.nix @@ -0,0 +1,68 @@ +# --- This file has been auto-generated. For permanent changes alter the appropriate block in the README.org. --- +{ pkgs, ... }: + +{ + # Use nftables as the firewall backend + networking.nftables.enable = true; + + networking.firewall = { + enable = true; + + # LAN-only ports — Wi-Fi interface + interfaces."wlan0" = { + allowedTCPPorts = [ + 631 # CUPS / IPP network printing + 9100 # AppSocket/JetDirect printing + 6566 # SANE network scanner + 57621 # Spotify Connect + 57622 # Spotify local file sync + ]; + allowedTCPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + allowedUDPPorts = [ + 5353 # mDNS / Avahi (printer + device discovery) + 631 # CUPS / IPP + 67 # DHCP + 123 # NTP time sync + 1900 # UPnP device discovery + 57621 # Spotify Connect + ]; + allowedUDPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + }; + + # LAN-only ports — ethernet (ready for when you plug in) + interfaces."enp0s31f6" = { + allowedTCPPorts = [ + 631 # CUPS / IPP network printing + 9100 # AppSocket/JetDirect printing + 6566 # SANE network scanner + 57621 # Spotify Connect + 57622 # Spotify local file sync + ]; + allowedTCPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + allowedUDPPorts = [ + 5353 # mDNS / Avahi (printer + device discovery) + 631 # CUPS / IPP + 67 # DHCP + 123 # NTP time sync + 1900 # UPnP device discovery + 57621 # Spotify Connect + ]; + allowedUDPPortRanges = [ + { from = 1714; to = 1764; } # KDE Connect + ]; + }; + }; + + # Firewall management tools + environment.systemPackages = with pkgs; [ + nixos-firewall-tool # CLI: sudo nixos-firewall-tool open tcp 8080 + firewall-config # GUI: graphical firewall manager (Wayland-compatible) + ]; + services.firewalld.enable = true; +} diff --git a/Droidnix/generated/modules/traveldroid/system/networking.nix b/Droidnix/generated/modules/traveldroid/system/networking.nix index 618a157a2..4ea9f583e 100644 --- a/Droidnix/generated/modules/traveldroid/system/networking.nix +++ b/Droidnix/generated/modules/traveldroid/system/networking.nix @@ -9,8 +9,6 @@ # Let DHCP be default unless overridden elsewhere useDHCP = lib.mkDefault true; - # Hostname comes from host.nix, do NOT redefine here - ################################# # NetworkManager (primary stack) ################################# @@ -28,20 +26,6 @@ # Allow user control via NM / CLI settings.General.EnableNetworkConfiguration = true; }; - - ################################# - # Firewall - ################################# - firewall = { - enable = true; - # KDE Connect support - allowedTCPPortRanges = [ - { from = 1714; to = 1764; } - ]; - allowedUDPPortRanges = [ - { from = 1714; to = 1764; } - ]; - }; }; #################################