From aca73cdd0fe201c7264349867f6ec6af99bb2410 Mon Sep 17 00:00:00 2001 From: Peritia Date: Wed, 10 Sep 2025 12:17:16 +0200 Subject: [PATCH] Main --- Modules/Hardware/Bluetooth/bluetooth.nix | 22 +- Modules/Hardware/Surface/Custom-Kernel.nix | 20 - .../Surface/custom-kernel-surfacepro-kbl.nix | 87 ++ Modules/Hardware/Surface/default.nix | 2 +- Modules/Hardware/Surface/thermal-conf.xml | 39 + Modules/Home/GUI-Apps/Browsers/brave.nix | 52 +- .../Messaging/signal-desktop.nix | 10 + .../Communication/Messaging/vesktop.nix | 10 + .../{Remote => Remote-Support}/default.nix | 0 .../Communication/Remote-Support/rustdesk.nix | 37 + .../Communication/Remote/rustdesk.nix | 20 - .../Home/GUI-Apps/Communication/default.nix | 2 +- .../Home/GUI-Apps/Development/vscodium.nix | 52 +- .../Gaming/classic-game-collection.nix | 36 +- .../Home/GUI-Apps/Gaming/prismlauncher.nix | 35 +- .../Home/GUI-Apps/Multimedia/Audio/cava.nix | 85 ++ .../GUI-Apps/Multimedia/Audio/default.nix | 1 + .../GUI-Apps/Multimedia/Audio/spotify.nix | 19 +- .../GUI-Apps/Multimedia/Capture/camera.nix | 20 +- .../GUI-Apps/Multimedia/Graphics/default.nix | 1 + .../Multimedia/Graphics/image-viewer.nix | 30 + .../GUI-Apps/Multimedia/Graphics/krita.nix | 21 +- .../GUI-Apps/Multimedia/Video/default.nix | 1 + .../GUI-Apps/Multimedia/Video/kdenlive.nix | 24 +- .../Multimedia/Video/video-player.nix | 39 + .../Home/GUI-Apps/Multimedia/Video/zoom.nix | 18 +- .../GUI-Apps/Office/Knowledge/obsidian.nix | 20 +- .../GUI-Apps/Office/Productivity/default.nix | 4 +- .../Office/Productivity/libreoffice.nix | 23 + .../Office/Productivity/office-apps.nix | 20 - .../Office/Productivity/pdf-reader.nix | 30 + .../Office/Productivity/printer-scan.nix | 21 +- .../Office/Productivity/thunderbird.nix | 23 + .../Home/GUI-Apps/System-Tools/default.nix | 7 - .../GUI-Apps/System-Tools/standard-apps.nix | 20 - Modules/Home/GUI-Apps/VPN/protonvpn.nix | 24 +- Modules/Home/GUI-Apps/default.nix | 1 - Modules/Home/Shell/cli-tools/tools.nix | 36 +- Modules/Home/Shell/zsh/zsh.nix | 53 +- Modules/Home/Webapps/private-webapps.nix | 37 +- Modules/Home/Webapps/work-webapps.nix | 73 +- .../System/Application/Gaming/Steam/steam.nix | 38 +- Modules/System/Application/Grub/all-grub.nix | 20 - Modules/System/Application/Grub/default.nix | 8 - Modules/System/Application/Grub/minegrub.nix | 20 - .../Special-Applications/flatpak.nix | 32 +- .../Special-Applications/wireshark.nix | 39 +- Modules/System/Application/cli/default.nix | 1 + Modules/System/Application/cli/docker.nix | 60 +- Modules/System/Application/cli/openssh.nix | 39 +- Modules/System/Application/cli/podman.nix | 53 ++ Modules/System/Application/cli/vm.nix | 59 +- Modules/System/Application/cli/zsh.nix | 44 +- Modules/System/Application/default.nix | 1 - Modules/System/Desktops/KDE/default.nix | 7 - Modules/System/Desktops/KDE/kde.nix | 20 - Modules/System/Desktops/default.nix | 7 - .../System/Programming-Tools/c-compiler.nix | 26 +- Modules/System/Programming-Tools/go.nix | 21 +- Modules/System/Programming-Tools/lua.nix | 23 +- Modules/System/Programming-Tools/python.nix | 23 +- Modules/System/Programming-Tools/rust.nix | 23 +- Modules/System/default.nix | 1 - Modules/default.nix | 9 - Readme.md | 1 + flake.nix | 27 +- other/autogen-basic-example.sh | 155 ++++ other/autogen-modules.sh | 127 +++ other/examples/example-with-comments.nix | 396 ++++++++ .../example-with-headers-and-comments.nix | 845 ++++++++++++++++++ other/examples/example-with-headers.nix | 740 +++++++++++++++ other/examples/example.nix | 291 ++++++ other/missing-header.nix | 23 + 73 files changed, 3873 insertions(+), 381 deletions(-) delete mode 100644 Modules/Hardware/Surface/Custom-Kernel.nix create mode 100644 Modules/Hardware/Surface/custom-kernel-surfacepro-kbl.nix rename Modules/Home/GUI-Apps/Communication/{Remote => Remote-Support}/default.nix (100%) create mode 100644 Modules/Home/GUI-Apps/Communication/Remote-Support/rustdesk.nix delete mode 100644 Modules/Home/GUI-Apps/Communication/Remote/rustdesk.nix create mode 100644 Modules/Home/GUI-Apps/Multimedia/Audio/cava.nix create mode 100644 Modules/Home/GUI-Apps/Multimedia/Graphics/image-viewer.nix create mode 100644 Modules/Home/GUI-Apps/Multimedia/Video/video-player.nix create mode 100644 Modules/Home/GUI-Apps/Office/Productivity/libreoffice.nix delete mode 100644 Modules/Home/GUI-Apps/Office/Productivity/office-apps.nix create mode 100644 Modules/Home/GUI-Apps/Office/Productivity/pdf-reader.nix create mode 100644 Modules/Home/GUI-Apps/Office/Productivity/thunderbird.nix delete mode 100644 Modules/Home/GUI-Apps/System-Tools/default.nix delete mode 100644 Modules/Home/GUI-Apps/System-Tools/standard-apps.nix delete mode 100644 Modules/System/Application/Grub/all-grub.nix delete mode 100644 Modules/System/Application/Grub/default.nix delete mode 100644 Modules/System/Application/Grub/minegrub.nix create mode 100644 Modules/System/Application/cli/podman.nix delete mode 100644 Modules/System/Desktops/KDE/default.nix delete mode 100644 Modules/System/Desktops/KDE/kde.nix delete mode 100644 Modules/System/Desktops/default.nix delete mode 100644 Modules/default.nix create mode 100644 Readme.md create mode 100755 other/autogen-basic-example.sh create mode 100755 other/autogen-modules.sh create mode 100644 other/examples/example-with-comments.nix create mode 100644 other/examples/example-with-headers-and-comments.nix create mode 100644 other/examples/example-with-headers.nix create mode 100644 other/examples/example.nix create mode 100644 other/missing-header.nix diff --git a/Modules/Hardware/Bluetooth/bluetooth.nix b/Modules/Hardware/Bluetooth/bluetooth.nix index 0fe0686..3895de9 100644 --- a/Modules/Hardware/Bluetooth/bluetooth.nix +++ b/Modules/Hardware/Bluetooth/bluetooth.nix @@ -1,20 +1,22 @@ { config, lib, pkgs, ... }: let - cfg = config.nyx-module.system.bluetooth; + cfg = config.nyx-module.hardware.bluetooth; in { - options.nyx-module.system.bluetooth = { - enable = lib.mkEnableOption "Enable bluetooth (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.bluetooth; - description = "Package to install for bluetooth."; - }; + options.nyx-module.hardware.bluetooth = { + enable = lib.mkEnableOption "Enable the system Bluetooth module"; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + # Enable Bluetooth support + hardware.bluetooth = { + enable = true; # Enable Bluetooth service + powerOnBoot = true; # Power up the controller at boot + }; + + # Ensure firmware is available (needed for devices like Intel AX200) + hardware.enableAllFirmware = true; + hardware.firmware = [ pkgs.linux-firmware ]; }; } diff --git a/Modules/Hardware/Surface/Custom-Kernel.nix b/Modules/Hardware/Surface/Custom-Kernel.nix deleted file mode 100644 index 8b2dc3c..0000000 --- a/Modules/Hardware/Surface/Custom-Kernel.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.nyx-module.system.Custom-Kernel; -in -{ - options.nyx-module.system.Custom-Kernel = { - enable = lib.mkEnableOption "Enable Custom-Kernel (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.Custom-Kernel; - description = "Package to install for Custom-Kernel."; - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; - }; -} diff --git a/Modules/Hardware/Surface/custom-kernel-surfacepro-kbl.nix b/Modules/Hardware/Surface/custom-kernel-surfacepro-kbl.nix new file mode 100644 index 0000000..2fd9d7a --- /dev/null +++ b/Modules/Hardware/Surface/custom-kernel-surfacepro-kbl.nix @@ -0,0 +1,87 @@ +# Custom Kernel Module for Microsoft Surface Pro (Kaby Lake / i5-7300U) +# +# Requires: +# - inputs.nixos-hardware.nixosModules.microsoft-surface-pro-intel +# +# Notes: +# - Estimated kernel build time: ~4h30m +# +{ config, lib, pkgs, ... }: + +let + cfg = config.nyx-module.hardware.Custom-Kernel.SurfacePro-KabyLake; +in +{ + options.nyx-module.hardware.Custom-Kernel.SurfacePro-KabyLake = { + enable = lib.mkEnableOption "Enable Custom Surface Pro (Kaby Lake) kernel module"; + kernelVersion = lib.mkOption { + type = lib.types.enum [ "stable" "longtime" ]; + default = "stable"; + description = "Choose which kernel version nixos-hardware will build for Surface Pro."; + }; + }; + + config = lib.mkIf cfg.enable { + # Ensure nixos-hardware Surface Pro module is imported + assertions = [ + { + assertion = config ? hardware.microsoft-surface; + message = '' + The module `nyx-module.hardware.Custom-Kernel.SurfacePro-KabyLake` requires + `inputs.nixos-hardware.nixosModules.microsoft-surface-pro-intel` + to be imported into your configuration. + ''; + } + ]; + + # Pick kernel version for Surface hardware support + hardware.microsoft-surface.kernelVersion = cfg.kernelVersion; + # boot.kernelPackages = pkgs.linuxPackages_6_6; # normally set by nixos-hardware + + # Extra kernel modules + boot.kernelModules = [ "hid-microsoft" ]; + + # Initrd modules — required for Surface hardware to function + boot.initrd.kernelModules = [ + # Surface Aggregator Module (SAM): buttons, sensors, keyboard + "surface_aggregator" + "surface_aggregator_registry" + "surface_aggregator_hub" + "surface_hid_core" + "surface_hid" + + # Intel Low Power Subsystem (keyboard, I2C, etc.) + "intel_lpss" + "intel_lpss_pci" + "8250_dw" + ]; + + # IPTSd not required — touchscreen and pen work via HID + services.iptsd.enable = lib.mkForce false; + + # Optional: reduce display flickering + # boot.kernelParams = [ "i915.enable_psr=0" ]; + + # Optional: blacklist problematic modules + # boot.blacklistedKernelModules = [ "surface_gpe" ]; + + # Thermald for thermal management + services.thermald = { + enable = true; + configFile = ./thermal-conf.xml; + # Example: extra options if needed + # extraOptions = [ + # "--adaptive" + # "--max-temperature=65" + # ]; + }; + + # Optional: CPU power management tuning + # powerManagement.cpuFreqGovernor = "powersave"; # or "ondemand", "performance" + + # Optional: disable Intel Turbo Boost if overheating persists + # systemd.tmpfiles.rules = [ + # "w /sys/devices/system/cpu/intel_pstate/no_turbo - - - - 1" + # ]; + }; +} diff --git a/Modules/Hardware/Surface/default.nix b/Modules/Hardware/Surface/default.nix index aca0494..fa355e9 100644 --- a/Modules/Hardware/Surface/default.nix +++ b/Modules/Hardware/Surface/default.nix @@ -2,6 +2,6 @@ { imports = [ - ./Custom-Kernel.nix + ./custom-kernel-surfacepro-kbl.nix ]; } diff --git a/Modules/Hardware/Surface/thermal-conf.xml b/Modules/Hardware/Surface/thermal-conf.xml index e69de29..1acdb5e 100644 --- a/Modules/Hardware/Surface/thermal-conf.xml +++ b/Modules/Hardware/Surface/thermal-conf.xml @@ -0,0 +1,39 @@ + + + + Surface Pro 7 Thermal Workaround + * + QUIET + + + cpu + + + x86_pkg_temp + 65000 + passive + PARALLEL + + 1 + rapl_controller + 100 + 10 + + + 2 + intel_pstate + 90 + 10 + + + 3 + intel_powerclamp + 80 + 10 + + + + + + + diff --git a/Modules/Home/GUI-Apps/Browsers/brave.nix b/Modules/Home/GUI-Apps/Browsers/brave.nix index 31fea48..ee84b64 100644 --- a/Modules/Home/GUI-Apps/Browsers/brave.nix +++ b/Modules/Home/GUI-Apps/Browsers/brave.nix @@ -1,3 +1,20 @@ +# Brave Browser (Home Module) +# +# Provides: +# - Brave browser package +# - Optional standard and custom extension sets +# +# Options: +# - enable → Enable Brave browser +# - extensions.enable → Enable Brave extensions +# - extensions.standard→ Enable default extension set of extensions +# - extensions.extra → Extra extension IDs to install +# +# Notes: +# - Default extensions include uBlock Origin, Proton Pass, Proton VPN +# - Extra extensions must be specified by Chrome Web Store ID +# + { config, lib, pkgs, ... }: let @@ -5,16 +22,39 @@ let in { options.nyx-module.home.brave = { - enable = lib.mkEnableOption "Enable brave (home) module"; + enable = lib.mkEnableOption "Enable Brave (home module)"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.brave; - description = "Package to install for brave."; + extensions = { + enable = lib.mkEnableOption "Enable Brave extensions support"; + standard = lib.mkEnableOption "Enable default set of extensions (uBlock, Proton Pass, Proton VPN)"; + extra = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = []; + example = [ "abcdefghijklmnop" "qrstuvwxyz123456" ]; + description = "List of additional Brave extension IDs to install."; + }; }; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + programs.brave = { + enable = true; + package = pkgs.brave; + + extensions = lib.optionals cfg.extensions.enable ( + (lib.optionals cfg.extensions.standard [ + { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin + { id = "ghmbeldphafepmbegfdlkpapadhbakde"; } # Proton Pass + { id = "jplgfhpmjnbigmhklmmbgecoobifkmpa"; } # Proton VPN + ]) ++ + (map (id: { inherit id; }) cfg.extensions.extra) + ); + + commandLineArgs = [ + "--disable-features=AutofillSavePaymentMethods" + "--disable-features=PasswordManagerOnboarding" + "--disable-features=AutofillEnableAccountWalletStorage" + ]; + }; }; } diff --git a/Modules/Home/GUI-Apps/Communication/Messaging/signal-desktop.nix b/Modules/Home/GUI-Apps/Communication/Messaging/signal-desktop.nix index 3cf875a..5d03d78 100644 --- a/Modules/Home/GUI-Apps/Communication/Messaging/signal-desktop.nix +++ b/Modules/Home/GUI-Apps/Communication/Messaging/signal-desktop.nix @@ -1,3 +1,13 @@ +# Signal Desktop (Home Module) +# +# Provides: +# - Signal Desktop secure messaging client +# +# Options: +# - enable → Enable Signal Desktop +# - package → Override package (default: pkgs.signal-desktop) +# + { config, lib, pkgs, ... }: let diff --git a/Modules/Home/GUI-Apps/Communication/Messaging/vesktop.nix b/Modules/Home/GUI-Apps/Communication/Messaging/vesktop.nix index bcb68d8..b5e6298 100644 --- a/Modules/Home/GUI-Apps/Communication/Messaging/vesktop.nix +++ b/Modules/Home/GUI-Apps/Communication/Messaging/vesktop.nix @@ -1,3 +1,13 @@ +# Vesktop (Home Module) +# +# Provides: +# - Vesktop package (Discord client, Electron wrapper) +# +# Options: +# - enable → Enable Vesktop client +# - package → Override package (default: pkgs.vesktop) +# + { config, lib, pkgs, ... }: let diff --git a/Modules/Home/GUI-Apps/Communication/Remote/default.nix b/Modules/Home/GUI-Apps/Communication/Remote-Support/default.nix similarity index 100% rename from Modules/Home/GUI-Apps/Communication/Remote/default.nix rename to Modules/Home/GUI-Apps/Communication/Remote-Support/default.nix diff --git a/Modules/Home/GUI-Apps/Communication/Remote-Support/rustdesk.nix b/Modules/Home/GUI-Apps/Communication/Remote-Support/rustdesk.nix new file mode 100644 index 0000000..50f8196 --- /dev/null +++ b/Modules/Home/GUI-Apps/Communication/Remote-Support/rustdesk.nix @@ -0,0 +1,37 @@ +# RustDesk (Home Module) +# +# Provides: +# - RustDesk remote desktop software (TeamViewer/AnyDesk alternative) +# +# Options: +# - enable → Enable RustDesk +# - package → Override package (default: pkgs.rustdesk) +# +# Notes: +# - Estimated build time: ~? Long.... +# + +{ config, lib, pkgs, ... }: + +let + cfg = config.nyx-module.home.rustdesk; +in +{ + options.nyx-module.home.rustdesk = { + enable = lib.mkEnableOption "Enable rustdesk (home) module"; + + package = lib.mkOption { + type = lib.types.package; + default = pkgs.rustdesk; + description = '' + Package to install for RustDesk. + You can override this if you want to pin a version or use a fork. + ''; + example = "pkgs.rustdesk.overrideAttrs (old: { version = \"1.3.5\"; })"; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + }; +} diff --git a/Modules/Home/GUI-Apps/Communication/Remote/rustdesk.nix b/Modules/Home/GUI-Apps/Communication/Remote/rustdesk.nix deleted file mode 100644 index 634662c..0000000 --- a/Modules/Home/GUI-Apps/Communication/Remote/rustdesk.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.nyx-module.home.rustdesk; -in -{ - options.nyx-module.home.rustdesk = { - enable = lib.mkEnableOption "Enable rustdesk (home) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.rustdesk; - description = "Package to install for rustdesk."; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; - }; -} diff --git a/Modules/Home/GUI-Apps/Communication/default.nix b/Modules/Home/GUI-Apps/Communication/default.nix index 898975b..2b020de 100644 --- a/Modules/Home/GUI-Apps/Communication/default.nix +++ b/Modules/Home/GUI-Apps/Communication/default.nix @@ -3,6 +3,6 @@ { imports = [ ./Messaging - ./Remote + ./Remote-Support ]; } diff --git a/Modules/Home/GUI-Apps/Development/vscodium.nix b/Modules/Home/GUI-Apps/Development/vscodium.nix index b0db61e..cbeda7b 100644 --- a/Modules/Home/GUI-Apps/Development/vscodium.nix +++ b/Modules/Home/GUI-Apps/Development/vscodium.nix @@ -1,20 +1,58 @@ -{ config, lib, pkgs, ... }: +# VSCodium (Home Module) +# +# Provides: +# - VSCodium editor (open-source build of VS Code) +# - Optional extension sets +# +# Options: +# - enable → Enable VSCodium +# - extensions.enable → Enable extensions +# - extensions.standard→ Enable standard extensions +# - extensions.extra → Extra extensions to install +# +# Notes: +# - Some Microsoft extensions may be broken (e.g., ms-python.python) +# + + +{ config, pkgs, lib, ... }: let cfg = config.nyx-module.home.vscodium; in { options.nyx-module.home.vscodium = { - enable = lib.mkEnableOption "Enable vscodium (home) module"; + enable = lib.mkEnableOption "Enable VSCodium with extensions"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.vscodium; - description = "Package to install for vscodium."; + extensions = { + enable = lib.mkEnableOption "Enable VSCodium extensions"; + + standard = lib.mkEnableOption "Enable standard extensions"; + + extra = lib.mkOption { + type = lib.types.listOf lib.types.package; + default = []; + example = [ pkgs.vscode-extensions.ms-python.python ]; + description = "List of extra VSCodium extensions to install."; + }; }; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + programs.vscode = { + enable = true; + package = pkgs.vscodium; + + profiles.default.extensions = + lib.optionals cfg.extensions.enable ( + (lib.optionals cfg.extensions.standard (with pkgs.vscode-extensions; [ + catppuccin.catppuccin-vsc + jnoortheen.nix-ide + ms-azuretools.vscode-docker + # ms-python.python # currently broken (pygls failure) + ])) + ++ cfg.extensions.extra + ); + }; }; } diff --git a/Modules/Home/GUI-Apps/Gaming/classic-game-collection.nix b/Modules/Home/GUI-Apps/Gaming/classic-game-collection.nix index 69f63e0..017ef0d 100644 --- a/Modules/Home/GUI-Apps/Gaming/classic-game-collection.nix +++ b/Modules/Home/GUI-Apps/Gaming/classic-game-collection.nix @@ -1,3 +1,21 @@ +# Classic Game Collection (Home Module) +# +# Provides: +# - Small set of lightweight, classic desktop games +# +# Included: +# - KPat (Patience / Solitaire) +# - KSudoku +# - Space Cadet Pinball +# - Palapeli (jigsaw puzzles) +# - KMines (Minesweeper clone) +# - KBlocks (Tetris clone) +# - KMahjongg (Mahjong solitaire) +# +# Options: +# - enable → Enable the Classic Game Collection +# + { config, lib, pkgs, ... }: let @@ -5,16 +23,18 @@ let in { options.nyx-module.home.classic-game-collection = { - enable = lib.mkEnableOption "Enable classic-game-collection (home) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.classic-game-collection; - description = "Package to install for classic-game-collection."; - }; + enable = lib.mkEnableOption "Enable the Classic Game Collection (home module)"; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = with pkgs; [ + kdePackages.kpat + kdePackages.ksudoku + space-cadet-pinball + kdePackages.palapeli + kdePackages.kmines + kdePackages.kblocks + kdePackages.libkmahjongg + ]; }; } diff --git a/Modules/Home/GUI-Apps/Gaming/prismlauncher.nix b/Modules/Home/GUI-Apps/Gaming/prismlauncher.nix index a321b58..efb8bc0 100644 --- a/Modules/Home/GUI-Apps/Gaming/prismlauncher.nix +++ b/Modules/Home/GUI-Apps/Gaming/prismlauncher.nix @@ -1,3 +1,20 @@ +# PrismLauncher (Home Module) +# +# Provides: +# - PrismLauncher (Minecraft launcher) +# - Optional inclusion of ffmpeg (some mods require it) +# - Configurable list of JDKs (for modpacks that need specific versions) +# +# Options: +# - enable → Enable PrismLauncher +# - includeFfmpeg→ Include ffmpeg for mods +# - jdks → List of Java runtimes for PrismLauncher +# +# Notes: +# - Installed via home.packages +# - JDKs are added to PATH so PrismLauncher can discover them +# + { config, lib, pkgs, ... }: let @@ -5,16 +22,22 @@ let in { options.nyx-module.home.prismlauncher = { - enable = lib.mkEnableOption "Enable prismlauncher (home) module"; + enable = lib.mkEnableOption "Enable PrismLauncher (Minecraft launcher)"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.prismlauncher; - description = "Package to install for prismlauncher."; + includeFfmpeg = lib.mkEnableOption "Include ffmpeg for mods that require it"; + + jdks = lib.mkOption { + type = lib.types.listOf lib.types.package; + default = [ pkgs.jdk17 ]; + example = [ pkgs.jdk8 pkgs.jdk17 pkgs.jdk21 ]; + description = "List of Java runtimes to make available for PrismLauncher."; }; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = + [ pkgs.prismlauncher ] + ++ lib.optionals cfg.includeFfmpeg [ pkgs.ffmpeg ] + ++ cfg.jdks; }; } diff --git a/Modules/Home/GUI-Apps/Multimedia/Audio/cava.nix b/Modules/Home/GUI-Apps/Multimedia/Audio/cava.nix new file mode 100644 index 0000000..3b55821 --- /dev/null +++ b/Modules/Home/GUI-Apps/Multimedia/Audio/cava.nix @@ -0,0 +1,85 @@ +# CAVA (Home Module) +# +# Provides: +# - CAVA audio visualizer +# - Declarative configuration via Nix +# - Support for structured settings or raw config override +# +# Options: +# - enable → Enable CAVA (home module) +# - settings → Declarative structured configuration (default: ALSA, 60 FPS, basic colors) +# - configText → Raw configuration text (overrides settings if set) +# +# Notes: +# - Writes config to ~/.config/cava/config +# - If configText is set, settings are ignored +# +# Example: +# nyx-module.home.cava = { +# enable = true; +# settings.general.framerate = 120; +# settings.input.method = "pulse"; +# }; + +{ config, lib, pkgs, ... }: + +let + cfg = config.nyx-module.home.cava; +in +{ + options.nyx-module.home.cava = { + enable = lib.mkEnableOption "Enable CAVA (home) module"; + + settings = lib.mkOption { + type = lib.types.attrs; + default = { + general.framerate = 60; + input.method = "alsa"; + smoothing.noise_reduction = 88; + color = { + background = "#000000"; + foreground = "#FFFFFF"; + }; + }; + description = '' + Declarative CAVA settings, written to `~/.config/cava/config`. + Ignored if `configText` is set. + ''; + example = { + general.framerate = 30; + input.method = "pulseaudio"; + color.foreground = "#00FF00"; + }; + }; + + configText = lib.mkOption { + type = lib.types.nullOr lib.types.lines; + default = null; + description = '' + Raw CAVA configuration file contents. + If set, overrides `settings` and is written directly to `~/.config/cava/config`. + ''; + example = '' + [general] + framerate = 120 + [input] + method = pulse + ''; + }; + }; + + config = lib.mkIf cfg.enable { + programs.cava = { + enable = true; + package = pkgs.cava; + + + settings = lib.mkIf (cfg.configText == null) cfg.settings; + }; + + + xdg.configFile."cava/config" = lib.mkIf (cfg.configText != null) { + text = cfg.configText; + }; + }; +} diff --git a/Modules/Home/GUI-Apps/Multimedia/Audio/default.nix b/Modules/Home/GUI-Apps/Multimedia/Audio/default.nix index 9fc74ed..50ccc2a 100644 --- a/Modules/Home/GUI-Apps/Multimedia/Audio/default.nix +++ b/Modules/Home/GUI-Apps/Multimedia/Audio/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./cava.nix ./spotify.nix ]; } diff --git a/Modules/Home/GUI-Apps/Multimedia/Audio/spotify.nix b/Modules/Home/GUI-Apps/Multimedia/Audio/spotify.nix index a858c67..9ecd5a3 100644 --- a/Modules/Home/GUI-Apps/Multimedia/Audio/spotify.nix +++ b/Modules/Home/GUI-Apps/Multimedia/Audio/spotify.nix @@ -1,3 +1,13 @@ +# Spotify (music streaming client) +# +# Provides: +# - Spotify package (default) +# - Optional override to install a different package +# +# Notes: +# - Installs into home.packages +# + { config, lib, pkgs, ... }: let @@ -5,12 +15,17 @@ let in { options.nyx-module.home.spotify = { - enable = lib.mkEnableOption "Enable spotify (home) module"; + enable = lib.mkEnableOption "Enable Spotify (home) module"; package = lib.mkOption { type = lib.types.package; default = pkgs.spotify; - description = "Package to install for spotify."; + example = pkgs.ncspot; + description = '' + Package to install for Spotify support. + Defaults to the official `pkgs.spotify`, but you can override with + `pkgs.ncspot`, `pkgs.spotifyd`, or similar alternatives. + ''; }; }; diff --git a/Modules/Home/GUI-Apps/Multimedia/Capture/camera.nix b/Modules/Home/GUI-Apps/Multimedia/Capture/camera.nix index 4250036..3407c74 100644 --- a/Modules/Home/GUI-Apps/Multimedia/Capture/camera.nix +++ b/Modules/Home/GUI-Apps/Multimedia/Capture/camera.nix @@ -1,3 +1,13 @@ +# Camera GUI module +# +# Provides: +# - Camera GUI package (default: snapshot) +# - libcamera (always installed, required backend) +# +# Notes: +# - You can override the GUI package with another (e.g., cheese, kamoso) +# + { config, lib, pkgs, ... }: let @@ -9,12 +19,16 @@ in package = lib.mkOption { type = lib.types.package; - default = pkgs.camera; - description = "Package to install for camera."; + default = pkgs.snapshot; + example = pkgs.cheese; + description = "Camera GUI package to install."; }; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = [ + cfg.package + pkgs.libcamera + ]; }; } diff --git a/Modules/Home/GUI-Apps/Multimedia/Graphics/default.nix b/Modules/Home/GUI-Apps/Multimedia/Graphics/default.nix index 3eb753c..1542fd5 100644 --- a/Modules/Home/GUI-Apps/Multimedia/Graphics/default.nix +++ b/Modules/Home/GUI-Apps/Multimedia/Graphics/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./image-viewer.nix ./krita.nix ]; } diff --git a/Modules/Home/GUI-Apps/Multimedia/Graphics/image-viewer.nix b/Modules/Home/GUI-Apps/Multimedia/Graphics/image-viewer.nix new file mode 100644 index 0000000..4076b1e --- /dev/null +++ b/Modules/Home/GUI-Apps/Multimedia/Graphics/image-viewer.nix @@ -0,0 +1,30 @@ +# Image Viewer +# +# Provides: +# - Installs a chosen image viewer application +# +# Notes: +# - Defaults to Gwenview +# + +{ config, lib, pkgs, ... }: + +let + cfg = config.nyx-module.home.image-viewer; +in +{ + options.nyx-module.home.image-viewer = { + enable = lib.mkEnableOption "Enable image viewer (home module)"; + + package = lib.mkOption { + type = lib.types.package; + default = pkgs.gwenview; + example = pkgs.feh; + description = "Image viewer package to install (e.g. gwenview, feh, imv)."; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + }; +} diff --git a/Modules/Home/GUI-Apps/Multimedia/Graphics/krita.nix b/Modules/Home/GUI-Apps/Multimedia/Graphics/krita.nix index b24da93..e03b953 100644 --- a/Modules/Home/GUI-Apps/Multimedia/Graphics/krita.nix +++ b/Modules/Home/GUI-Apps/Multimedia/Graphics/krita.nix @@ -1,3 +1,12 @@ +# Krita (Digital Painting Software) +# +# Provides: +# - Krita package (open-source digital painting and illustration software) +# +# Notes: +# - Installed via home.packages +# + { config, lib, pkgs, ... }: let @@ -5,16 +14,12 @@ let in { options.nyx-module.home.krita = { - enable = lib.mkEnableOption "Enable krita (home) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.krita; - description = "Package to install for krita."; - }; + enable = lib.mkEnableOption "Enable Krita (home) module"; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = with pkgs; [ + krita + ]; }; } diff --git a/Modules/Home/GUI-Apps/Multimedia/Video/default.nix b/Modules/Home/GUI-Apps/Multimedia/Video/default.nix index 3e455af..62be2d7 100644 --- a/Modules/Home/GUI-Apps/Multimedia/Video/default.nix +++ b/Modules/Home/GUI-Apps/Multimedia/Video/default.nix @@ -3,6 +3,7 @@ { imports = [ ./kdenlive.nix + ./video-player.nix ./zoom.nix ]; } diff --git a/Modules/Home/GUI-Apps/Multimedia/Video/kdenlive.nix b/Modules/Home/GUI-Apps/Multimedia/Video/kdenlive.nix index 96ece8b..d1d62ea 100644 --- a/Modules/Home/GUI-Apps/Multimedia/Video/kdenlive.nix +++ b/Modules/Home/GUI-Apps/Multimedia/Video/kdenlive.nix @@ -1,3 +1,15 @@ +# Kdenlive (video editor) +# +# Provides: +# - Kdenlive video editor +# - Installed via home.packages +# +# Notes: +# - Package location depends on nixpkgs version: +# * pkgs.kdePackages.kdenlive (preferred, modern KDE split) +# * pkgs.libsForQt5.kdenlive (older releases, fallback) +# + { config, lib, pkgs, ... }: let @@ -5,16 +17,12 @@ let in { options.nyx-module.home.kdenlive = { - enable = lib.mkEnableOption "Enable kdenlive (home) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.kdenlive; - description = "Package to install for kdenlive."; - }; + enable = lib.mkEnableOption "Enable Kdenlive (home) module"; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = [ + (pkgs.kdePackages.kdenlive or pkgs.libsForQt5.kdenlive) + ]; }; } diff --git a/Modules/Home/GUI-Apps/Multimedia/Video/video-player.nix b/Modules/Home/GUI-Apps/Multimedia/Video/video-player.nix new file mode 100644 index 0000000..d1982ef --- /dev/null +++ b/Modules/Home/GUI-Apps/Multimedia/Video/video-player.nix @@ -0,0 +1,39 @@ +# Video Player(s) +# +# Provides: +# - Installs one or more chosen video/media players +# +# Notes: +# - Defaults to [ vlc ] +# + +{ config, lib, pkgs, ... }: + +let + cfg = config.nyx-module.home.video-player; +in +{ + options.nyx-module.home.video-player = { + enable = lib.mkEnableOption "Enable video players (home module)"; + + packages = lib.mkOption { + type = lib.types.listOf lib.types.package; + default = [ pkgs.vlc ]; + example = [ pkgs.vlc pkgs.mpv pkgs.celluloid ]; + description = "List of video/media players to install (e.g. vlc, mpv, celluloid)."; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = cfg.packages; + }; +} + +########## +# Example +########## + +# nyx-module.home.video-player = { +# enable = true; +# packages = [ pkgs.vlc pkgs.mpv ]; +# }; diff --git a/Modules/Home/GUI-Apps/Multimedia/Video/zoom.nix b/Modules/Home/GUI-Apps/Multimedia/Video/zoom.nix index ddf6c20..6a307b2 100644 --- a/Modules/Home/GUI-Apps/Multimedia/Video/zoom.nix +++ b/Modules/Home/GUI-Apps/Multimedia/Video/zoom.nix @@ -1,3 +1,15 @@ +# Zoom (video conferencing client) +# +# Provides: +# - Zoom package (default: pkgs.zoom-us) +# +# Options: +# - `package`: override the package (e.g. pkgs.zoom) +# +# Notes: +# - Installed via home.packages +# + { config, lib, pkgs, ... }: let @@ -5,12 +17,12 @@ let in { options.nyx-module.home.zoom = { - enable = lib.mkEnableOption "Enable zoom (home) module"; + enable = lib.mkEnableOption "Enable Zoom (home) module"; package = lib.mkOption { type = lib.types.package; - default = pkgs.zoom; - description = "Package to install for zoom."; + default = pkgs.zoom-us; + description = "Zoom package to install (e.g., pkgs.zoom-us)."; }; }; diff --git a/Modules/Home/GUI-Apps/Office/Knowledge/obsidian.nix b/Modules/Home/GUI-Apps/Office/Knowledge/obsidian.nix index 184b0f0..fab0034 100644 --- a/Modules/Home/GUI-Apps/Office/Knowledge/obsidian.nix +++ b/Modules/Home/GUI-Apps/Office/Knowledge/obsidian.nix @@ -1,3 +1,13 @@ +# Obsidian (note-taking / PKM app) +# +# Provides: +# - Obsidian package via home.packages +# +# Notes: +# - Consider adding theming support later +# (e.g., https://github.com/jackiejude/obsidian-temple-os) +# + { config, lib, pkgs, ... }: let @@ -5,16 +15,10 @@ let in { options.nyx-module.home.obsidian = { - enable = lib.mkEnableOption "Enable obsidian (home) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.obsidian; - description = "Package to install for obsidian."; - }; + enable = lib.mkEnableOption "Enable Obsidian (home module)"; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = [ pkgs.obsidian ]; }; } diff --git a/Modules/Home/GUI-Apps/Office/Productivity/default.nix b/Modules/Home/GUI-Apps/Office/Productivity/default.nix index 70b8322..cdaf7ff 100644 --- a/Modules/Home/GUI-Apps/Office/Productivity/default.nix +++ b/Modules/Home/GUI-Apps/Office/Productivity/default.nix @@ -2,7 +2,9 @@ { imports = [ - ./office-apps.nix + ./libreoffice.nix + ./pdf-reader.nix ./printer-scan.nix + ./thunderbird.nix ]; } diff --git a/Modules/Home/GUI-Apps/Office/Productivity/libreoffice.nix b/Modules/Home/GUI-Apps/Office/Productivity/libreoffice.nix new file mode 100644 index 0000000..d97dae2 --- /dev/null +++ b/Modules/Home/GUI-Apps/Office/Productivity/libreoffice.nix @@ -0,0 +1,23 @@ +# LibreOffice (office suite) +# +# Provides: +# - LibreOffice package via home.packages +# +# Notes: +# - Simple module, just adds LibreOffice to the user environment +# + +{ config, lib, pkgs, ... }: + +let + cfg = config.nyx-module.home.libreoffice; +in +{ + options.nyx-module.home.libreoffice = { + enable = lib.mkEnableOption "Enable LibreOffice (home module)"; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ pkgs.libreoffice ]; + }; +} diff --git a/Modules/Home/GUI-Apps/Office/Productivity/office-apps.nix b/Modules/Home/GUI-Apps/Office/Productivity/office-apps.nix deleted file mode 100644 index 7be802b..0000000 --- a/Modules/Home/GUI-Apps/Office/Productivity/office-apps.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.nyx-module.home.office-apps; -in -{ - options.nyx-module.home.office-apps = { - enable = lib.mkEnableOption "Enable office-apps (home) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.office-apps; - description = "Package to install for office-apps."; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; - }; -} diff --git a/Modules/Home/GUI-Apps/Office/Productivity/pdf-reader.nix b/Modules/Home/GUI-Apps/Office/Productivity/pdf-reader.nix new file mode 100644 index 0000000..8671962 --- /dev/null +++ b/Modules/Home/GUI-Apps/Office/Productivity/pdf-reader.nix @@ -0,0 +1,30 @@ +# PDF Viewer / Scanner +# +# Provides: +# - Install a chosen PDF or scanning GUI application +# +# Notes: +# - Defaults to Okular +# + +{ config, lib, pkgs, ... }: + +let + cfg = config.nyx-module.home.pdf-viewer; +in +{ + options.nyx-module.home.pdf-viewer = { + enable = lib.mkEnableOption "Enable PDF (home module)"; + + package = lib.mkOption { + type = lib.types.package; + default = pkgs.kdeApplications.okular; + example = pkgs.evince; + description = "PDF or scanning GUI package to install (e.g. Okular, Evince, Xournal++)."; + }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ cfg.package ]; + }; +} diff --git a/Modules/Home/GUI-Apps/Office/Productivity/printer-scan.nix b/Modules/Home/GUI-Apps/Office/Productivity/printer-scan.nix index 235a1ac..0ffaa08 100644 --- a/Modules/Home/GUI-Apps/Office/Productivity/printer-scan.nix +++ b/Modules/Home/GUI-Apps/Office/Productivity/printer-scan.nix @@ -1,16 +1,27 @@ +# Printer GUI (scanning/printing tools) +# +# Provides: +# - Configurable GUI package for printing/scanning via home.packages +# +# Notes: +# - Default is `simple-scan` (GNOME Document Scanner) +# - Can be overridden with another package such as `system-config-printer` +# + { config, lib, pkgs, ... }: let - cfg = config.nyx-module.home.printer-scan; + cfg = config.nyx-module.home.printer; in { - options.nyx-module.home.printer-scan = { - enable = lib.mkEnableOption "Enable printer-scan (home) module"; + options.nyx-module.home.printer = { + enable = lib.mkEnableOption "Enable printer GUI (home module)"; package = lib.mkOption { type = lib.types.package; - default = pkgs.printer-scan; - description = "Package to install for printer-scan."; + default = pkgs.simple-scan; + example = pkgs.system-config-printer; + description = "Printer/scanner GUI package to install."; }; }; diff --git a/Modules/Home/GUI-Apps/Office/Productivity/thunderbird.nix b/Modules/Home/GUI-Apps/Office/Productivity/thunderbird.nix new file mode 100644 index 0000000..84cedda --- /dev/null +++ b/Modules/Home/GUI-Apps/Office/Productivity/thunderbird.nix @@ -0,0 +1,23 @@ +# Thunderbird (email client) +# +# Provides: +# - Thunderbird package via home.packages +# +# Notes: +# - Simple module, just adds Thunderbird to the user environment +# + +{ config, lib, pkgs, ... }: + +let + cfg = config.nyx-module.home.thunderbird; +in +{ + options.nyx-module.home.thunderbird = { + enable = lib.mkEnableOption "Enable Thunderbird (home module)"; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ pkgs.thunderbird ]; + }; +} diff --git a/Modules/Home/GUI-Apps/System-Tools/default.nix b/Modules/Home/GUI-Apps/System-Tools/default.nix deleted file mode 100644 index a825af3..0000000 --- a/Modules/Home/GUI-Apps/System-Tools/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./standard-apps.nix - ]; -} diff --git a/Modules/Home/GUI-Apps/System-Tools/standard-apps.nix b/Modules/Home/GUI-Apps/System-Tools/standard-apps.nix deleted file mode 100644 index 5d8bb7e..0000000 --- a/Modules/Home/GUI-Apps/System-Tools/standard-apps.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.nyx-module.home.standard-apps; -in -{ - options.nyx-module.home.standard-apps = { - enable = lib.mkEnableOption "Enable standard-apps (home) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.standard-apps; - description = "Package to install for standard-apps."; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; - }; -} diff --git a/Modules/Home/GUI-Apps/VPN/protonvpn.nix b/Modules/Home/GUI-Apps/VPN/protonvpn.nix index ef9df08..0d70b03 100644 --- a/Modules/Home/GUI-Apps/VPN/protonvpn.nix +++ b/Modules/Home/GUI-Apps/VPN/protonvpn.nix @@ -1,3 +1,15 @@ +# ProtonVPN (Home Module) +# +# Provides: +# - ProtonVPN GUI client +# +# Options: +# - enable → Enable ProtonVPN client +# +# Notes: +# - GUI only by default (CLI version available as pkgs.protonvpn-cli) + + { config, lib, pkgs, ... }: let @@ -5,16 +17,12 @@ let in { options.nyx-module.home.protonvpn = { - enable = lib.mkEnableOption "Enable protonvpn (home) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.protonvpn; - description = "Package to install for protonvpn."; - }; + enable = lib.mkEnableOption "Enable ProtonVPN (home module)"; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = with pkgs; [ + protonvpn-gui + ]; }; } diff --git a/Modules/Home/GUI-Apps/default.nix b/Modules/Home/GUI-Apps/default.nix index 2d750be..a6b94e3 100644 --- a/Modules/Home/GUI-Apps/default.nix +++ b/Modules/Home/GUI-Apps/default.nix @@ -8,7 +8,6 @@ ./Gaming ./Multimedia ./Office - ./System-Tools ./VPN ]; } diff --git a/Modules/Home/Shell/cli-tools/tools.nix b/Modules/Home/Shell/cli-tools/tools.nix index 496181b..ab656bb 100644 --- a/Modules/Home/Shell/cli-tools/tools.nix +++ b/Modules/Home/Shell/cli-tools/tools.nix @@ -1,20 +1,40 @@ +# CLI Tools (Home Module) +# +# Provides: +# - A curated set of command-line utilities in user’s environment +# - Examples: fastfetch, hyfetch, bat, fzf, tree, lsd, tmux +# +# Options: +# - enable → Enable CLI tools collection +# - extra → List of extra packages to install + + { config, lib, pkgs, ... }: let - cfg = config.nyx-module.home.tools; + cfg = config.nyx-module.home.cli-tools; in { - options.nyx-module.home.tools = { - enable = lib.mkEnableOption "Enable tools (home) module"; + options.nyx-module.home.cli-tools = { + enable = lib.mkEnableOption "Enable CLI tools (home module)"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.tools; - description = "Package to install for tools."; + extra = lib.mkOption { + type = lib.types.listOf lib.types.package; + default = []; + example = [ pkgs.ripgrep pkgs.htop ]; + description = "Extra CLI tools to install in addition to the defaults."; }; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + home.packages = with pkgs; [ + fastfetch + hyfetch + bat + fzf + tree + lsd + tmux + ] ++ cfg.extra; }; } diff --git a/Modules/Home/Shell/zsh/zsh.nix b/Modules/Home/Shell/zsh/zsh.nix index f929d79..8db8f98 100644 --- a/Modules/Home/Shell/zsh/zsh.nix +++ b/Modules/Home/Shell/zsh/zsh.nix @@ -1,3 +1,12 @@ +# Zsh (Home Module) +# +# Provides: +# - Zsh shell in the user profile +# - Zsh completion, autosuggestions, and syntax highlighting +# +# Options: +# - enable → Enable Zsh in the user profile + { config, lib, pkgs, ... }: let @@ -5,16 +14,44 @@ let in { options.nyx-module.home.zsh = { - enable = lib.mkEnableOption "Enable zsh (home) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.zsh; - description = "Package to install for zsh."; - }; + enable = lib.mkEnableOption "Enable Zsh (home module)"; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + programs.zsh = { + enable = true; + enableCompletion = true; + + plugins = [ + { + name = "zsh-autosuggestions"; + src = pkgs.zsh-autosuggestions; + } + { + name = "zsh-syntax-highlighting"; + src = pkgs.zsh-syntax-highlighting; + } + ]; + + initExtra = '' + hyfetch + + alias ls='lsd' + alias l='ls -l' + alias la='ls -a' + alias lla='ls -la' + alias lt='ls --tree' + + HISTFILE=~/.zsh_history + HISTSIZE=10000 + SAVEHIST=10000 + setopt appendhistory + ''; + }; + + home.packages = with pkgs; [ + zsh-autosuggestions + zsh-syntax-highlighting + ]; }; } diff --git a/Modules/Home/Webapps/private-webapps.nix b/Modules/Home/Webapps/private-webapps.nix index 485bac8..6791420 100644 --- a/Modules/Home/Webapps/private-webapps.nix +++ b/Modules/Home/Webapps/private-webapps.nix @@ -1,3 +1,18 @@ +# Private Webapps +# +# Provides: +# - Browser-based desktop entries for personal/private webapps +# - Currently supported: +# • WhatsApp +# +# Options: +# - browser → Selects which browser package to use (default: chromium) +# - whatsapp → Enable WhatsApp webapp launcher +# +# Notes: +# - Uses --app mode to create minimal browser windows +# - Additional services can be added following the same pattern + { config, lib, pkgs, ... }: let @@ -5,16 +20,28 @@ let in { options.nyx-module.home.private-webapps = { - enable = lib.mkEnableOption "Enable private-webapps (home) module"; + enable = lib.mkEnableOption "Enable private webapps (home module)"; - package = lib.mkOption { + browser = lib.mkOption { type = lib.types.package; - default = pkgs.private-webapps; - description = "Package to install for private-webapps."; + default = pkgs.chromium; + example = pkgs.firefox; + description = "Browser package to use for private webapps."; }; + + whatsapp.enable = lib.mkEnableOption "Enable WhatsApp webapp entry"; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + xdg.desktopEntries = lib.mkMerge [ + (lib.mkIf cfg.whatsapp.enable { + whatsapp = { + name = "WhatsApp"; + exec = "${cfg.browser}/bin/${cfg.browser.pname} --app=https://web.whatsapp.com/"; + icon = "WhatsApp"; + type = "Application"; + }; + }) + ]; }; } diff --git a/Modules/Home/Webapps/work-webapps.nix b/Modules/Home/Webapps/work-webapps.nix index 93e7b5c..1a27803 100644 --- a/Modules/Home/Webapps/work-webapps.nix +++ b/Modules/Home/Webapps/work-webapps.nix @@ -1,3 +1,24 @@ +# Work Webapps +# +# Provides: +# - Browser-based desktop entries for work-related webapps +# - Currently supported: +# • Slack +# • Microsoft Teams +# • Outlook Web +# • Microsoft Entra +# +# Options: +# - browser → Selects which browser package to use (default: chromium) +# - slack → Enable Slack webapp launcher +# - teams → Enable Teams webapp launcher +# - outlook → Enable Outlook webapp launcher +# - entra → Enable Entra webapp launcher +# +# Notes: +# - Uses --app mode for minimal windows (like PWAs) +# - Outlook entry uses a custom profile directory for isolation + { config, lib, pkgs, ... }: let @@ -5,16 +26,58 @@ let in { options.nyx-module.home.work-webapps = { - enable = lib.mkEnableOption "Enable work-webapps (home) module"; + enable = lib.mkEnableOption "Enable work webapps (home module)"; - package = lib.mkOption { + browser = lib.mkOption { type = lib.types.package; - default = pkgs.work-webapps; - description = "Package to install for work-webapps."; + default = pkgs.chromium; + example = pkgs.firefox; + description = "Browser package to use for private webapps."; }; + + slack.enable = lib.mkEnableOption "Enable Slack webapp entry"; + teams.enable = lib.mkEnableOption "Enable Microsoft Teams webapp entry"; + outlook.enable = lib.mkEnableOption "Enable Outlook webapp entry"; + entra.enable = lib.mkEnableOption "Enable Microsoft Entra webapp entry"; }; config = lib.mkIf cfg.enable { - home.packages = [ cfg.package ]; + xdg.desktopEntries = lib.mkMerge [ + (lib.mkIf cfg.slack.enable { + slack = { + name = "Slack"; + exec = "${cfg.browser}/bin/${cfg.browser.pname} --app=https://app.slack.com/client"; + icon = "slack"; + type = "Application"; + }; + }) + + (lib.mkIf cfg.teams.enable { + teams = { + name = "Microsoft Teams"; + exec = "${cfg.browser}/bin/${cfg.browser.pname} --app=https://teams.microsoft.com"; + icon = "teams"; + type = "Application"; + }; + }) + + (lib.mkIf cfg.outlook.enable { + outlook = { + name = "Outlook Web"; + exec = "${cfg.browser}/bin/${cfg.browser.pname} --user-data-dir=/home/${config.home.username}/.local/share/ice/profiles/Outlook4305 --profile-directory=Default --app-id=cifhbcnohmdccbgoicgdjpfamggdegmo"; + icon = "outlook"; + type = "Application"; + }; + }) + + (lib.mkIf cfg.entra.enable { + entra = { + name = "Microsoft Entra"; + exec = "${cfg.browser}/bin/${cfg.browser.pname} --app=https://entra.microsoft.com"; + icon = "microsoft"; + type = "Application"; + }; + }) + ]; }; } diff --git a/Modules/System/Application/Gaming/Steam/steam.nix b/Modules/System/Application/Gaming/Steam/steam.nix index 7c5700c..e34bc66 100644 --- a/Modules/System/Application/Gaming/Steam/steam.nix +++ b/Modules/System/Application/Gaming/Steam/steam.nix @@ -1,3 +1,20 @@ +# Steam (System Module) +# +# Provides: +# - Steam client +# - Optional firewall openings for: +# * Remote Play +# * Source Dedicated Server +# * Local Network Game Transfers +# - ProtonUp tool for managing Proton versions +# +# Options: +# - enable → Enable Steam system module +# - openFirewall.remotePlay → Open firewall for Remote Play +# - openFirewall.dedicatedServer → Open firewall for Source Dedicated Server +# - openFirewall.localNetworkGameTransfers → Open firewall for LAN transfers +# + { config, lib, pkgs, ... }: let @@ -5,16 +22,25 @@ let in { options.nyx-module.system.steam = { - enable = lib.mkEnableOption "Enable steam (system) module"; + enable = lib.mkEnableOption "Enable Steam (system module)"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.steam; - description = "Package to install for steam."; + openFirewall = { + remotePlay = lib.mkEnableOption "Open firewall for Steam Remote Play"; + dedicatedServer = lib.mkEnableOption "Open firewall for Source Dedicated Server"; + localNetworkGameTransfers = lib.mkEnableOption "Open firewall for Steam Local Network Game Transfers"; }; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + programs.steam = { + enable = true; + remotePlay.openFirewall = cfg.openFirewall.remotePlay; + dedicatedServer.openFirewall = cfg.openFirewall.dedicatedServer; + localNetworkGameTransfers.openFirewall = cfg.openFirewall.localNetworkGameTransfers; + }; + + environment.systemPackages = with pkgs; [ + protonup + ]; }; } diff --git a/Modules/System/Application/Grub/all-grub.nix b/Modules/System/Application/Grub/all-grub.nix deleted file mode 100644 index 38a589e..0000000 --- a/Modules/System/Application/Grub/all-grub.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.nyx-module.system.all-grub; -in -{ - options.nyx-module.system.all-grub = { - enable = lib.mkEnableOption "Enable all-grub (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.all-grub; - description = "Package to install for all-grub."; - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; - }; -} diff --git a/Modules/System/Application/Grub/default.nix b/Modules/System/Application/Grub/default.nix deleted file mode 100644 index 4852f25..0000000 --- a/Modules/System/Application/Grub/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./all-grub.nix - ./minegrub.nix - ]; -} diff --git a/Modules/System/Application/Grub/minegrub.nix b/Modules/System/Application/Grub/minegrub.nix deleted file mode 100644 index efcad44..0000000 --- a/Modules/System/Application/Grub/minegrub.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.nyx-module.system.minegrub; -in -{ - options.nyx-module.system.minegrub = { - enable = lib.mkEnableOption "Enable minegrub (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.minegrub; - description = "Package to install for minegrub."; - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; - }; -} diff --git a/Modules/System/Application/Special-Applications/flatpak.nix b/Modules/System/Application/Special-Applications/flatpak.nix index 9dd54bd..cbd958d 100644 --- a/Modules/System/Application/Special-Applications/flatpak.nix +++ b/Modules/System/Application/Special-Applications/flatpak.nix @@ -1,3 +1,13 @@ +# Flatpak (System Module) +# +# Provides: +# - Flatpak package manager +# - Flatpak service integration +# - XDG portals for sandboxed apps +# +# Options: +# - enable → Enable Flatpak system module +# { config, lib, pkgs, ... }: let @@ -5,16 +15,22 @@ let in { options.nyx-module.system.flatpak = { - enable = lib.mkEnableOption "Enable flatpak (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.flatpak; - description = "Package to install for flatpak."; - }; + enable = lib.mkEnableOption "Enable Flatpak (system module)"; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + services.flatpak.enable = true; + + # Flatpak apps need XDG portals for proper desktop integration + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk # For GTK desktops + # xdg-desktop-portal-kde # Uncomment for KDE Plasma + ]; + }; + + # Optional explicit installation (not strictly needed) + environment.systemPackages = [ pkgs.flatpak ]; }; } diff --git a/Modules/System/Application/Special-Applications/wireshark.nix b/Modules/System/Application/Special-Applications/wireshark.nix index 0d797cf..5b3b247 100644 --- a/Modules/System/Application/Special-Applications/wireshark.nix +++ b/Modules/System/Application/Special-Applications/wireshark.nix @@ -1,3 +1,15 @@ +# Wireshark (System Module) +# +# Provides: +# - Wireshark installation +# - Proper dumpcap permissions +# - Adds user to `wireshark` group +# +# Options: +# - enable → Enable Wireshark system module +# - username → User to add to the wireshark group (required) +# + { config, lib, pkgs, ... }: let @@ -5,16 +17,31 @@ let in { options.nyx-module.system.wireshark = { - enable = lib.mkEnableOption "Enable wireshark (system) module"; + enable = lib.mkEnableOption "Enable Wireshark (system module)"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.wireshark; - description = "Package to install for wireshark."; + username = lib.mkOption { + type = lib.types.str; + example = "alice"; + description = "User to add to the wireshark group."; }; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + environment.systemPackages = [ pkgs.wireshark ]; + + programs.wireshark = { + enable = true; # Installs wireshark + sets dumpcap caps + package = pkgs.wireshark; + }; + + # Add user to wireshark group + users.users.${cfg.username}.extraGroups = [ "wireshark" ]; + + assertions = [ + { + assertion = cfg.username != ""; + message = "nyx-module.system.wireshark.username must be set to a valid user."; + } + ]; }; } diff --git a/Modules/System/Application/cli/default.nix b/Modules/System/Application/cli/default.nix index 8bc7e25..ea61465 100644 --- a/Modules/System/Application/cli/default.nix +++ b/Modules/System/Application/cli/default.nix @@ -4,6 +4,7 @@ imports = [ ./docker.nix ./openssh.nix + ./podman.nix ./vm.nix ./zsh.nix ]; diff --git a/Modules/System/Application/cli/docker.nix b/Modules/System/Application/cli/docker.nix index 410f9f2..72e6be2 100644 --- a/Modules/System/Application/cli/docker.nix +++ b/Modules/System/Application/cli/docker.nix @@ -1,3 +1,21 @@ +# Docker (System Module) +# +# Provides: +# - Docker runtime and CLI +# - Docker Compose +# - User access via `docker` group +# - Optional rootless mode and cgroup v2 support +# +# Options: +# - enable → Enable Docker system module +# - username → User to add to the docker group +# - enableOnBoot → Start Docker service on boot (default: true) +# - rootless → Enable Docker rootless mode (disabled by default) +# +# Notes: +# - Rootless mode is disabled by default +# - Uses cgroup v2 for better resource management on modern kernels + { config, lib, pkgs, ... }: let @@ -5,16 +23,46 @@ let in { options.nyx-module.system.docker = { - enable = lib.mkEnableOption "Enable docker (system) module"; + enable = lib.mkEnableOption "Enable Docker (system module)"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.docker; - description = "Package to install for docker."; + username = lib.mkOption { + type = lib.types.str; + example = "alice"; + description = "User to add to the docker group."; }; + + enableOnBoot = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Whether to enable Docker service on boot."; + }; + + rootless = lib.mkEnableOption "Enable rootless Docker mode"; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + virtualisation.docker = { + enable = true; + enableOnBoot = cfg.enableOnBoot; + rootless.enable = cfg.rootless; + }; + + users.users.${cfg.username}.extraGroups = [ "docker" ]; + + environment.systemPackages = with pkgs; [ + docker + docker-compose + ]; + + # Optional: Docker cgroup v2 (usually enabled by default in modern NixOS) + boot.kernelParams = [ "cgroup_enable=memory" "cgroup_memory=1" ]; + + + assertions = [ + { + assertion = cfg.username != ""; + message = "nyx-module.system.docker.username must be set to a valid user."; + } + ]; }; } diff --git a/Modules/System/Application/cli/openssh.nix b/Modules/System/Application/cli/openssh.nix index d4c062e..715ebcd 100644 --- a/Modules/System/Application/cli/openssh.nix +++ b/Modules/System/Application/cli/openssh.nix @@ -1,3 +1,17 @@ +# OpenSSH (System Module) +# +# Provides: +# - OpenSSH server (sshd) service +# +# Options: +# - enable → Enable OpenSSH system module +# - passwordAuth → Allow password authentication (default: false) +# - permitRootLogin → Permit root login (default: "no") +# +# Notes: +# - By default, password authentication is disabled for better security +# - Root login is disabled unless explicitly enabled + { config, lib, pkgs, ... }: let @@ -5,16 +19,29 @@ let in { options.nyx-module.system.openssh = { - enable = lib.mkEnableOption "Enable openssh (system) module"; + enable = lib.mkEnableOption "Enable OpenSSH (system module)"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.openssh; - description = "Package to install for openssh."; + passwordAuth = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Whether to allow password authentication."; + }; + + permitRootLogin = lib.mkOption { + type = lib.types.str; + default = "no"; + example = "prohibit-password"; + description = "Whether to permit root login via SSH."; }; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = cfg.passwordAuth; + PermitRootLogin = cfg.permitRootLogin; + }; + }; }; } diff --git a/Modules/System/Application/cli/podman.nix b/Modules/System/Application/cli/podman.nix new file mode 100644 index 0000000..abd38ef --- /dev/null +++ b/Modules/System/Application/cli/podman.nix @@ -0,0 +1,53 @@ +# Podman (System Module) +# +# Provides: +# - Podman runtime and CLI +# - Podman Compose +# - User access via `podman` group +# +# Options: +# - enable → Enable Podman system module +# - username → User to add to the podman group +# +# Notes: +# - Adds podman + podman-compose to system packages +# - Enables D-Bus socket activation for Podman +# + +{ config, lib, pkgs, ... }: + +let + cfg = config.nyx-module.system.podman; +in +{ + options.nyx-module.system.podman = { + enable = lib.mkEnableOption "Enable Podman (system module)"; + + username = lib.mkOption { + type = lib.types.str; + example = "alice"; + description = "User to add to the podman group."; + }; + }; + + config = lib.mkIf cfg.enable { + virtualisation.podman.enable = true; + + users.users.${cfg.username}.extraGroups = [ "podman" ]; + + environment.systemPackages = with pkgs; [ + podman + podman-compose + ]; + + # Optional: enable Podman socket activation + services.dbus.packages = [ pkgs.podman ]; + + assertions = [ + { + assertion = cfg.username != ""; + message = "nyx-module.system.podman.username must be set to a valid user."; + } + ]; + }; +} diff --git a/Modules/System/Application/cli/vm.nix b/Modules/System/Application/cli/vm.nix index ff924ef..ee6984d 100644 --- a/Modules/System/Application/cli/vm.nix +++ b/Modules/System/Application/cli/vm.nix @@ -1,3 +1,21 @@ +# VM (System Module) +# +# Provides: +# - QEMU/KVM virtualization via libvirt +# - virt-manager GUI +# - User access via libvirtd and kvm groups +# - Spice, dnsmasq, and bridge-utils for networking and display +# +# Options: +# - enable → Enable VM system module +# - username → User to add to virtualization groups (required) +# +# Notes: +# - QEMU runs as root by default (can be adjusted) +# - virt-manager GUI is enabled automatically +# - Only generic "kvm" kernel module is forced (host picks intel/amd) +# + { config, lib, pkgs, ... }: let @@ -5,16 +23,45 @@ let in { options.nyx-module.system.vm = { - enable = lib.mkEnableOption "Enable vm (system) module"; + enable = lib.mkEnableOption "Enable VM (system module)"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.vm; - description = "Package to install for vm."; + username = lib.mkOption { + type = lib.types.str; + example = "alice"; + description = "User to add to virtualization groups."; }; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + environment.systemPackages = with pkgs; [ + virt-manager + spice-gtk + dnsmasq + bridge-utils + ]; + + virtualisation.libvirtd = { + enable = true; + qemu = { + package = pkgs.qemu_full; + runAsRoot = true; + }; + }; + + # Add user to groups + users.users.${cfg.username}.extraGroups = [ "libvirtd" "kvm" ]; + + # Enable kernel modules for virtualization + boot.kernelModules = [ "kvm" ]; + + # Enable GUI management tool + programs.virt-manager.enable = true; + + assertions = [ + { + assertion = cfg.username != ""; + message = "nyx-module.system.vm.username must be set to a valid user."; + } + ]; }; } diff --git a/Modules/System/Application/cli/zsh.nix b/Modules/System/Application/cli/zsh.nix index 0102361..b42f95b 100644 --- a/Modules/System/Application/cli/zsh.nix +++ b/Modules/System/Application/cli/zsh.nix @@ -1,3 +1,17 @@ +# Zsh (System Module) +# +# Provides: +# - Zsh shell +# - oh-my-zsh integration +# - Theme + plugins support +# +# Options: +# - enable → Enable Zsh system module +# - ohMyZsh → Enable oh-my-zsh integration +# - theme → oh-my-zsh theme (default: "xiong-chiamiov-plus") +# - plugins → List of oh-my-zsh plugins (default: [ "git" ]) +# + { config, lib, pkgs, ... }: let @@ -5,16 +19,34 @@ let in { options.nyx-module.system.zsh = { - enable = lib.mkEnableOption "Enable zsh (system) module"; + enable = lib.mkEnableOption "Enable Zsh (system module)"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.zsh; - description = "Package to install for zsh."; + ohMyZsh = lib.mkEnableOption "Enable oh-my-zsh integration"; + + theme = lib.mkOption { + type = lib.types.str; + default = "xiong-chiamiov-plus"; + description = "oh-my-zsh theme to use."; + }; + + plugins = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ "git" ]; + description = "List of oh-my-zsh plugins to enable."; }; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + programs.zsh = { + enable = true; + ohMyZsh = lib.mkIf cfg.ohMyZsh { + enable = true; + theme = cfg.theme; + plugins = cfg.plugins; + }; + }; + + # Add zsh to available shells + environment.shells = with pkgs; [ zsh ]; }; } diff --git a/Modules/System/Application/default.nix b/Modules/System/Application/default.nix index 765ed33..5f16a46 100644 --- a/Modules/System/Application/default.nix +++ b/Modules/System/Application/default.nix @@ -4,7 +4,6 @@ imports = [ ./cli ./Gaming - ./Grub ./Special-Applications ]; } diff --git a/Modules/System/Desktops/KDE/default.nix b/Modules/System/Desktops/KDE/default.nix deleted file mode 100644 index 63f1649..0000000 --- a/Modules/System/Desktops/KDE/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./kde.nix - ]; -} diff --git a/Modules/System/Desktops/KDE/kde.nix b/Modules/System/Desktops/KDE/kde.nix deleted file mode 100644 index 92361a5..0000000 --- a/Modules/System/Desktops/KDE/kde.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.nyx-module.system.kde; -in -{ - options.nyx-module.system.kde = { - enable = lib.mkEnableOption "Enable kde (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.kde; - description = "Package to install for kde."; - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; - }; -} diff --git a/Modules/System/Desktops/default.nix b/Modules/System/Desktops/default.nix deleted file mode 100644 index 3422bd5..0000000 --- a/Modules/System/Desktops/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./KDE - ]; -} diff --git a/Modules/System/Programming-Tools/c-compiler.nix b/Modules/System/Programming-Tools/c-compiler.nix index 70c6439..ce853a8 100644 --- a/Modules/System/Programming-Tools/c-compiler.nix +++ b/Modules/System/Programming-Tools/c-compiler.nix @@ -1,3 +1,14 @@ +# C Compiler (System Module) +# +# Provides: +# - GCC (C/C++) +# - Clang (alternative C/C++) +# - Mono (C#) +# +# Options: +# - enable → Enable C compiler toolchain +# + { config, lib, pkgs, ... }: let @@ -5,16 +16,15 @@ let in { options.nyx-module.system.c-compiler = { - enable = lib.mkEnableOption "Enable c-compiler (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.c-compiler; - description = "Package to install for c-compiler."; - }; + enable = lib.mkEnableOption "Enable C compiler (system module)"; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + environment.systemPackages = with pkgs; [ + gcc # C & C++ + clang # alt C/C++ + mono # C# + ]; }; } + diff --git a/Modules/System/Programming-Tools/go.nix b/Modules/System/Programming-Tools/go.nix index c9d636b..1501f54 100644 --- a/Modules/System/Programming-Tools/go.nix +++ b/Modules/System/Programming-Tools/go.nix @@ -1,3 +1,12 @@ +# Go (System Module) +# +# Provides: +# - Go programming language toolchain +# +# Options: +# - enable → Enable Go system module +# + { config, lib, pkgs, ... }: let @@ -5,16 +14,12 @@ let in { options.nyx-module.system.go = { - enable = lib.mkEnableOption "Enable go (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.go; - description = "Package to install for go."; - }; + enable = lib.mkEnableOption "Enable Go (system module)"; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + environment.systemPackages = with pkgs; [ + go + ]; }; } diff --git a/Modules/System/Programming-Tools/lua.nix b/Modules/System/Programming-Tools/lua.nix index 585b880..a7bae35 100644 --- a/Modules/System/Programming-Tools/lua.nix +++ b/Modules/System/Programming-Tools/lua.nix @@ -1,3 +1,13 @@ +# Lua (System Module) +# +# Provides: +# - Lua (standard interpreter) +# - LuaJIT (Just-In-Time compiler) +# +# Options: +# - enable → Enable Lua system module +# + { config, lib, pkgs, ... }: let @@ -5,16 +15,13 @@ let in { options.nyx-module.system.lua = { - enable = lib.mkEnableOption "Enable lua (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.lua; - description = "Package to install for lua."; - }; + enable = lib.mkEnableOption "Enable Lua (system module)"; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + environment.systemPackages = with pkgs; [ + lua + luajit + ]; }; } diff --git a/Modules/System/Programming-Tools/python.nix b/Modules/System/Programming-Tools/python.nix index cb4936f..b547be5 100644 --- a/Modules/System/Programming-Tools/python.nix +++ b/Modules/System/Programming-Tools/python.nix @@ -1,3 +1,13 @@ +# Python (System Module) +# +# Provides: +# - Python 3 interpreter +# - Pip (package manager) +# +# Options: +# - enable → Enable Python system module +# + { config, lib, pkgs, ... }: let @@ -5,16 +15,13 @@ let in { options.nyx-module.system.python = { - enable = lib.mkEnableOption "Enable python (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.python; - description = "Package to install for python."; - }; + enable = lib.mkEnableOption "Enable Python (system module)"; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + environment.systemPackages = with pkgs; [ + python3 + python3Packages.pip + ]; }; } diff --git a/Modules/System/Programming-Tools/rust.nix b/Modules/System/Programming-Tools/rust.nix index 31a08b4..ae9a7c9 100644 --- a/Modules/System/Programming-Tools/rust.nix +++ b/Modules/System/Programming-Tools/rust.nix @@ -1,3 +1,13 @@ +# Rust (System Module) +# +# Provides: +# - Rust compiler (rustc) +# - Cargo (Rust package manager & build system) +# +# Options: +# - enable → Enable Rust system module +# + { config, lib, pkgs, ... }: let @@ -5,16 +15,13 @@ let in { options.nyx-module.system.rust = { - enable = lib.mkEnableOption "Enable rust (system) module"; - - package = lib.mkOption { - type = lib.types.package; - default = pkgs.rust; - description = "Package to install for rust."; - }; + enable = lib.mkEnableOption "Enable Rust (system module)"; }; config = lib.mkIf cfg.enable { - environment.systemPackages = [ cfg.package ]; + environment.systemPackages = with pkgs; [ + rustc + cargo + ]; }; } diff --git a/Modules/System/default.nix b/Modules/System/default.nix index 5e885f6..8776d57 100644 --- a/Modules/System/default.nix +++ b/Modules/System/default.nix @@ -3,7 +3,6 @@ { imports = [ ./Application - ./Desktops ./Programming-Tools ]; } diff --git a/Modules/default.nix b/Modules/default.nix deleted file mode 100644 index 1f0c0eb..0000000 --- a/Modules/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./Hardware - ./Home - ./System - ]; -} diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..989b603 --- /dev/null +++ b/Readme.md @@ -0,0 +1 @@ +Do NOT use this please this is just for me to test and learn diff --git a/flake.nix b/flake.nix index 6d4e85c..17ab265 100644 --- a/flake.nix +++ b/flake.nix @@ -3,15 +3,32 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, home-manager,... }: { - nixosModules.default = import ./Modules { inherit home-manager; }; - - }; -} + outputs = { self, nixpkgs, home-manager, ... }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in + { + ################################################################ + # NixOS Modules + ################################################################ + nixosModules = { + default = import ./Modules/System; + hardware = import ./Modules/Hardware; + }; + ################################################################ + # Home Manager Modules + ################################################################ + homeManagerModules = { + default = import ./Modules/Home; + }; + }; +} diff --git a/other/autogen-basic-example.sh b/other/autogen-basic-example.sh new file mode 100755 index 0000000..bb97a01 --- /dev/null +++ b/other/autogen-basic-example.sh @@ -0,0 +1,155 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT="${1:-../Modules}" # root dir (defaults to Modules) + +OUT_DIR="examples" +mkdir -p "$OUT_DIR" + +OUT1="$OUT_DIR/example-with-headers-and-comments.nix" +OUT2="$OUT_DIR/example-with-headers.nix" +OUT3="$OUT_DIR/example-with-comments.nix" +OUT4="$OUT_DIR/example.nix" + +echo "Generating $OUT1, $OUT2, $OUT3, $OUT4 from modules under $ROOT ..." + +# --- Extract top-of-file module description --- +extract_module_description() { + local file="$1" + awk ' + /^ *#/ { gsub(/^ *# */, ""); print " # " $0 } + /^\{ *config,/ { exit } + ' "$file" +} + +# --- Extract options from a module --- +extract_options() { + local file="$1" + local with_comments="$2" + + grep -nE "^[[:space:]]*[a-zA-Z0-9_-]+[[:space:]]*=" "$file" \ + | grep -E "lib\.mkOption|lib\.mkEnableOption" \ + | sed -E 's/^([0-9]+):[[:space:]]*([a-zA-Z0-9_-]+)[[:space:]]*=.*/\1 \2/' \ + | while read -r line name; do + block="$(tail -n +$((line+1)) "$file" | awk '/};/ {exit} {print}')" + defline="$(sed -n "${line}p" "$file")" + + kind="mkOption" + [[ "$defline" == *"mkEnableOption"* ]] && kind="mkEnableOption" + + if [[ "$kind" == "mkEnableOption" ]]; then + [[ "$with_comments" == "yes" ]] && echo "# mkEnableOption (bool)" + echo "${name} = true;" + else + otype="$(echo "$block" | grep -E "type[[:space:]]*=" | head -n1 | sed -E 's/.*type[[:space:]]*=[[:space:]]*//; s/;//')" + value="…" + desc="" + + if echo "$block" | grep -q "default[[:space:]]*="; then + value="$(echo "$block" | grep "default[[:space:]]*=" | head -n1 | sed -E 's/.*default[[:space:]]*=[[:space:]]*(.*);/\1/')" + elif echo "$block" | grep -q "example[[:space:]]*="; then + value="$(echo "$block" | grep "example[[:space:]]*=" | head -n1 | sed -E 's/.*example[[:space:]]*=[[:space:]]*(.*);/\1/')" + fi + + if echo "$block" | grep -q "description[[:space:]]*="; then + desc="$(echo "$block" | grep "description[[:space:]]*=" | head -n1 | sed -E 's/.*description[[:space:]]*=[[:space:]]*//; s/^"//; s/"$//')" + [[ -z "$value" || "$value" == "…" ]] && value="… # $desc" + fi + + if [[ "$with_comments" == "yes" ]]; then + [[ -n "$otype" ]] && echo "# mkOption type=$otype" || echo "# mkOption" + [[ -n "$desc" ]] && echo "# $desc" + fi + echo "${name} = ${value};" + fi + echo + done +} + +# --- Extract module header (optional) --- +extract_header() { + local file="$1" + awk ' + /^ *\{ *config,/ { exit } + /^$/ { next } + { print " " $0 } + ' "$file" +} + +# --- Write prolog --- +write_prolog() { + local file="$1" + { + echo "{ config, lib, pkgs, ... }:" + echo + echo "{" + echo " nyx-module = {" + } > "$file" +} + +# --- Write epilog --- +write_epilog() { + local file="$1" + { + echo " };" + echo "}" + } >> "$file" +} + +# --- Prepare all output files --- +for f in "$OUT1" "$OUT2" "$OUT3" "$OUT4"; do + write_prolog "$f" +done + +# --- Append modules for a section --- +append_modules() { + local base="$1" + local with_headers="$2" + local with_comments="$3" + local subdir="$4" + + find "$ROOT/$subdir" -type f -name "*.nix" ! -name "default.nix" | sort | while read -r f; do + module="$(basename "$f" .nix)" + { + # [[ "$with_headers" == "yes" ]] && extract_module_description "$f" + [[ "$with_headers" == "yes" ]] && extract_header "$f" + echo " ${module} = {" + extract_options "$f" "$with_comments" | sed 's/^/ /' + echo " };" + echo + } >> "$base" + done +} + +# --- Process each section in order --- +for section in "system" "home" "hardware"; do + for f in "$OUT1" "$OUT2" "$OUT3" "$OUT4"; do + echo " ${section} = {" >> "$f" + done + + append_modules "$OUT1" yes yes "${section^}" + append_modules "$OUT2" yes no "${section^}" + append_modules "$OUT3" no yes "${section^}" + append_modules "$OUT4" no no "${section^}" + + for f in "$OUT1" "$OUT2" "$OUT3" "$OUT4"; do + echo " };" >> "$f" + echo >> "$f" + done +done + +# --- Finish all files --- +for f in "$OUT1" "$OUT2" "$OUT3" "$OUT4"; do + write_epilog "$f" +done + +echo "Wrote:" +echo " - $OUT1" +echo " - $OUT2" +echo " - $OUT3" +echo " - $OUT4" + + + + +# a diff --git a/other/autogen-modules.sh b/other/autogen-modules.sh new file mode 100755 index 0000000..847f1f8 --- /dev/null +++ b/other/autogen-modules.sh @@ -0,0 +1,127 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT="${1:-../Modules}" # pass root dir, defaults to Modules + +# Generate module boilerplate for each .nix (excluding default.nix) +gen_module_boilerplate() { + local file="$1" + local module + module="$(basename "$file" .nix)" + + # skip if non-empty + if [[ -s "$file" ]]; then + echo "Skipping non-empty $file" + return + fi + + local ns target + if [[ "$file" == *"/Home/"* ]]; then + ns="home" + target="home.packages" + else + ns="system" + target="environment.systemPackages" + fi + + cat > "$file" < 0 )); then + new_imports=("${local_modules[@]}") + else + local subdirs=() + for sub in "$dir"/*/; do + [[ -d "$sub" && -f "$sub/default.nix" ]] && subdirs+=("./$(basename "$sub")") + done + new_imports=("${subdirs[@]}") + fi + + mkdir -p "$dir" + + if [[ -f "$file" ]]; then + # Replace imports block in place + awk -v n="${#new_imports[@]}" -v imports="$(printf '%s\n' "${new_imports[@]}")" ' + BEGIN { + split(imports, arr, "\n") + printing=1 + } + /imports = \[/ { + print " imports = [" + for (i=1; i<=n; i++) { + print " " arr[i] + } + print " ];" + # skip until closing bracket + while (getline > 0) { + if ($0 ~ /\];/) break + } + next + } + { print } + ' "$file" > "$file.tmp" && mv "$file.tmp" "$file" + echo "Updated imports in $file" + else + # brand new default.nix + { + echo "{ config, lib, pkgs, ... }:" + echo + echo "{" + echo " imports = [" + for imp in "${new_imports[@]}"; do + echo " $imp" + done + echo " ];" + echo "}" + } > "$file" + echo "Created $file" + fi +} + +# Walk the tree +echo "Generating nix module boilerplates under $ROOT ..." + +# 1. Generate boilerplate for all non-default modules +find "$ROOT" -type f -name "*.nix" ! -name "default.nix" | while read -r f; do + gen_module_boilerplate "$f" +done + +# 2. Generate default.nix in every directory +find "$ROOT" -type d | while read -r d; do + gen_default_for_dir "$d" +done + +echo "Done! All modules + defaults generated." diff --git a/other/examples/example-with-comments.nix b/other/examples/example-with-comments.nix new file mode 100644 index 0000000..04e5d68 --- /dev/null +++ b/other/examples/example-with-comments.nix @@ -0,0 +1,396 @@ +{ config, lib, pkgs, ... }: + +{ + nyx-module = { + system = { + docker = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.str + # User to add to the docker group."; + username = "alice"; + + # mkOption type=lib.types.bool + # Whether to enable Docker service on boot."; + enableOnBoot = true; + + # mkEnableOption (bool) + rootless = true; + + }; + + openssh = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.bool + # Whether to allow password authentication."; + passwordAuth = false; + + # mkOption type=lib.types.str + # Whether to permit root login via SSH."; + permitRootLogin = "no"; + + }; + + podman = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.str + # User to add to the podman group."; + username = "alice"; + + }; + + vm = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.str + # User to add to virtualization groups."; + username = "alice"; + + }; + + zsh = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + ohMyZsh = true; + + # mkOption type=lib.types.str + # oh-my-zsh theme to use."; + theme = "xiong-chiamiov-plus"; + + # mkOption type=lib.types.listOf lib.types.str + # List of oh-my-zsh plugins to enable."; + plugins = [ "git" ]; + + }; + + steam = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + remotePlay = true; + + # mkEnableOption (bool) + dedicatedServer = true; + + # mkEnableOption (bool) + localNetworkGameTransfers = true; + + }; + + flatpak = { + # mkEnableOption (bool) + enable = true; + + }; + + wireshark = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.str + # User to add to the wireshark group."; + username = "alice"; + + }; + + c-compiler = { + # mkEnableOption (bool) + enable = true; + + }; + + go = { + # mkEnableOption (bool) + enable = true; + + }; + + lua = { + # mkEnableOption (bool) + enable = true; + + }; + + python = { + # mkEnableOption (bool) + enable = true; + + }; + + rust = { + # mkEnableOption (bool) + enable = true; + + }; + + }; + + home = { + brave = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + standard = true; + + # mkOption type=lib.types.listOf lib.types.str + # List of additional Brave extension IDs to install."; + extra = []; + + }; + + signal-desktop = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Package to install for signal-desktop."; + package = pkgs.signal-desktop; + + }; + + vesktop = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Package to install for vesktop."; + package = pkgs.vesktop; + + }; + + rustdesk = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # '' + package = pkgs.rustdesk; + + }; + + vscodium = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + standard = true; + + # mkOption type=lib.types.listOf lib.types.package + # List of extra VSCodium extensions to install."; + extra = []; + + }; + + classic-game-collection = { + # mkEnableOption (bool) + enable = true; + + }; + + prismlauncher = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + includeFfmpeg = true; + + # mkOption type=lib.types.listOf lib.types.package + # List of Java runtimes to make available for PrismLauncher."; + jdks = [ pkgs.jdk17 ]; + + }; + + cava = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.attrs + settings = default = {; + + # mkOption type=lib.types.nullOr lib.types.lines + # '' + configText = null; + + }; + + spotify = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # '' + package = pkgs.spotify; + + }; + + camera = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Camera GUI package to install."; + package = pkgs.snapshot; + + }; + + image-viewer = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Image viewer package to install (e.g. gwenview, feh, imv)."; + package = pkgs.gwenview; + + }; + + krita = { + # mkEnableOption (bool) + enable = true; + + }; + + kdenlive = { + # mkEnableOption (bool) + enable = true; + + }; + + video-player = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.listOf lib.types.package + # List of video/media players to install (e.g. vlc, mpv, celluloid)."; + packages = [ pkgs.vlc ]; + + }; + + zoom = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Zoom package to install (e.g., pkgs.zoom-us)."; + package = pkgs.zoom-us; + + }; + + obsidian = { + # mkEnableOption (bool) + enable = true; + + }; + + libreoffice = { + # mkEnableOption (bool) + enable = true; + + }; + + pdf-reader = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # PDF or scanning GUI package to install (e.g. Okular, Evince, Xournal++)."; + package = pkgs.kdeApplications.okular; + + }; + + printer-scan = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Printer/scanner GUI package to install."; + package = pkgs.simple-scan; + + }; + + thunderbird = { + # mkEnableOption (bool) + enable = true; + + }; + + protonvpn = { + # mkEnableOption (bool) + enable = true; + + }; + + tools = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.listOf lib.types.package + # Extra CLI tools to install in addition to the defaults."; + extra = []; + + }; + + zsh = { + # mkEnableOption (bool) + enable = true; + + }; + + private-webapps = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Browser package to use for private webapps."; + browser = pkgs.chromium; + + }; + + work-webapps = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Browser package to use for private webapps."; + browser = pkgs.chromium; + + }; + + }; + + hardware = { + bluetooth = { + # mkEnableOption (bool) + enable = true; + + }; + + custom-kernel-surfacepro-kbl = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.enum [ "stable" "longtime" ] + # Choose which kernel version nixos-hardware will build for Surface Pro."; + kernelVersion = "stable"; + + }; + + }; + + }; +} diff --git a/other/examples/example-with-headers-and-comments.nix b/other/examples/example-with-headers-and-comments.nix new file mode 100644 index 0000000..dbb822d --- /dev/null +++ b/other/examples/example-with-headers-and-comments.nix @@ -0,0 +1,845 @@ +{ config, lib, pkgs, ... }: + +{ + nyx-module = { + system = { + # Docker (System Module) + # + # Provides: + # - Docker runtime and CLI + # - Docker Compose + # - User access via `docker` group + # - Optional rootless mode and cgroup v2 support + # + # Options: + # - enable → Enable Docker system module + # - username → User to add to the docker group + # - enableOnBoot → Start Docker service on boot (default: true) + # - rootless → Enable Docker rootless mode (disabled by default) + # + # Notes: + # - Rootless mode is disabled by default + # - Uses cgroup v2 for better resource management on modern kernels + docker = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.str + # User to add to the docker group."; + username = "alice"; + + # mkOption type=lib.types.bool + # Whether to enable Docker service on boot."; + enableOnBoot = true; + + # mkEnableOption (bool) + rootless = true; + + }; + + # OpenSSH (System Module) + # + # Provides: + # - OpenSSH server (sshd) service + # + # Options: + # - enable → Enable OpenSSH system module + # - passwordAuth → Allow password authentication (default: false) + # - permitRootLogin → Permit root login (default: "no") + # + # Notes: + # - By default, password authentication is disabled for better security + # - Root login is disabled unless explicitly enabled + openssh = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.bool + # Whether to allow password authentication."; + passwordAuth = false; + + # mkOption type=lib.types.str + # Whether to permit root login via SSH."; + permitRootLogin = "no"; + + }; + + # Podman (System Module) + # + # Provides: + # - Podman runtime and CLI + # - Podman Compose + # - User access via `podman` group + # + # Options: + # - enable → Enable Podman system module + # - username → User to add to the podman group + # + # Notes: + # - Adds podman + podman-compose to system packages + # - Enables D-Bus socket activation for Podman + # + podman = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.str + # User to add to the podman group."; + username = "alice"; + + }; + + # VM (System Module) + # + # Provides: + # - QEMU/KVM virtualization via libvirt + # - virt-manager GUI + # - User access via libvirtd and kvm groups + # - Spice, dnsmasq, and bridge-utils for networking and display + # + # Options: + # - enable → Enable VM system module + # - username → User to add to virtualization groups (required) + # + # Notes: + # - QEMU runs as root by default (can be adjusted) + # - virt-manager GUI is enabled automatically + # - Only generic "kvm" kernel module is forced (host picks intel/amd) + # + vm = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.str + # User to add to virtualization groups."; + username = "alice"; + + }; + + # Zsh (System Module) + # + # Provides: + # - Zsh shell + # - oh-my-zsh integration + # - Theme + plugins support + # + # Options: + # - enable → Enable Zsh system module + # - ohMyZsh → Enable oh-my-zsh integration + # - theme → oh-my-zsh theme (default: "xiong-chiamiov-plus") + # - plugins → List of oh-my-zsh plugins (default: [ "git" ]) + # + zsh = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + ohMyZsh = true; + + # mkOption type=lib.types.str + # oh-my-zsh theme to use."; + theme = "xiong-chiamiov-plus"; + + # mkOption type=lib.types.listOf lib.types.str + # List of oh-my-zsh plugins to enable."; + plugins = [ "git" ]; + + }; + + # Steam (System Module) + # + # Provides: + # - Steam client + # - Optional firewall openings for: + # * Remote Play + # * Source Dedicated Server + # * Local Network Game Transfers + # - ProtonUp tool for managing Proton versions + # + # Options: + # - enable → Enable Steam system module + # - openFirewall.remotePlay → Open firewall for Remote Play + # - openFirewall.dedicatedServer → Open firewall for Source Dedicated Server + # - openFirewall.localNetworkGameTransfers → Open firewall for LAN transfers + # + steam = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + remotePlay = true; + + # mkEnableOption (bool) + dedicatedServer = true; + + # mkEnableOption (bool) + localNetworkGameTransfers = true; + + }; + + # Flatpak (System Module) + # + # Provides: + # - Flatpak package manager + # - Flatpak service integration + # - XDG portals for sandboxed apps + # + # Options: + # - enable → Enable Flatpak system module + # + flatpak = { + # mkEnableOption (bool) + enable = true; + + }; + + # Wireshark (System Module) + # + # Provides: + # - Wireshark installation + # - Proper dumpcap permissions + # - Adds user to `wireshark` group + # + # Options: + # - enable → Enable Wireshark system module + # - username → User to add to the wireshark group (required) + # + wireshark = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.str + # User to add to the wireshark group."; + username = "alice"; + + }; + + # C Compiler (System Module) + # + # Provides: + # - GCC (C/C++) + # - Clang (alternative C/C++) + # - Mono (C#) + # + # Options: + # - enable → Enable C compiler toolchain + # + c-compiler = { + # mkEnableOption (bool) + enable = true; + + }; + + # Go (System Module) + # + # Provides: + # - Go programming language toolchain + # + # Options: + # - enable → Enable Go system module + # + go = { + # mkEnableOption (bool) + enable = true; + + }; + + # Lua (System Module) + # + # Provides: + # - Lua (standard interpreter) + # - LuaJIT (Just-In-Time compiler) + # + # Options: + # - enable → Enable Lua system module + # + lua = { + # mkEnableOption (bool) + enable = true; + + }; + + # Python (System Module) + # + # Provides: + # - Python 3 interpreter + # - Pip (package manager) + # + # Options: + # - enable → Enable Python system module + # + python = { + # mkEnableOption (bool) + enable = true; + + }; + + # Rust (System Module) + # + # Provides: + # - Rust compiler (rustc) + # - Cargo (Rust package manager & build system) + # + # Options: + # - enable → Enable Rust system module + # + rust = { + # mkEnableOption (bool) + enable = true; + + }; + + }; + + home = { + # Brave Browser (Home Module) + # + # Provides: + # - Brave browser package + # - Optional standard and custom extension sets + # + # Options: + # - enable → Enable Brave browser + # - extensions.enable → Enable Brave extensions + # - extensions.standard→ Enable default extension set of extensions + # - extensions.extra → Extra extension IDs to install + # + # Notes: + # - Default extensions include uBlock Origin, Proton Pass, Proton VPN + # - Extra extensions must be specified by Chrome Web Store ID + # + brave = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + standard = true; + + # mkOption type=lib.types.listOf lib.types.str + # List of additional Brave extension IDs to install."; + extra = []; + + }; + + # Signal Desktop (Home Module) + # + # Provides: + # - Signal Desktop secure messaging client + # + # Options: + # - enable → Enable Signal Desktop + # - package → Override package (default: pkgs.signal-desktop) + # + signal-desktop = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Package to install for signal-desktop."; + package = pkgs.signal-desktop; + + }; + + # Vesktop (Home Module) + # + # Provides: + # - Vesktop package (Discord client, Electron wrapper) + # + # Options: + # - enable → Enable Vesktop client + # - package → Override package (default: pkgs.vesktop) + # + vesktop = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Package to install for vesktop."; + package = pkgs.vesktop; + + }; + + # RustDesk (Home Module) + # + # Provides: + # - RustDesk remote desktop software (TeamViewer/AnyDesk alternative) + # + # Options: + # - enable → Enable RustDesk + # - package → Override package (default: pkgs.rustdesk) + # + # Notes: + # - Estimated build time: ~? Long.... + # + rustdesk = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # '' + package = pkgs.rustdesk; + + }; + + # VSCodium (Home Module) + # + # Provides: + # - VSCodium editor (open-source build of VS Code) + # - Optional extension sets + # + # Options: + # - enable → Enable VSCodium + # - extensions.enable → Enable extensions + # - extensions.standard→ Enable standard extensions + # - extensions.extra → Extra extensions to install + # + # Notes: + # - Some Microsoft extensions may be broken (e.g., ms-python.python) + # + vscodium = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + standard = true; + + # mkOption type=lib.types.listOf lib.types.package + # List of extra VSCodium extensions to install."; + extra = []; + + }; + + # Classic Game Collection (Home Module) + # + # Provides: + # - Small set of lightweight, classic desktop games + # + # Included: + # - KPat (Patience / Solitaire) + # - KSudoku + # - Space Cadet Pinball + # - Palapeli (jigsaw puzzles) + # - KMines (Minesweeper clone) + # - KBlocks (Tetris clone) + # - KMahjongg (Mahjong solitaire) + # + # Options: + # - enable → Enable the Classic Game Collection + # + classic-game-collection = { + # mkEnableOption (bool) + enable = true; + + }; + + # PrismLauncher (Home Module) + # + # Provides: + # - PrismLauncher (Minecraft launcher) + # - Optional inclusion of ffmpeg (some mods require it) + # - Configurable list of JDKs (for modpacks that need specific versions) + # + # Options: + # - enable → Enable PrismLauncher + # - includeFfmpeg→ Include ffmpeg for mods + # - jdks → List of Java runtimes for PrismLauncher + # + # Notes: + # - Installed via home.packages + # - JDKs are added to PATH so PrismLauncher can discover them + # + prismlauncher = { + # mkEnableOption (bool) + enable = true; + + # mkEnableOption (bool) + includeFfmpeg = true; + + # mkOption type=lib.types.listOf lib.types.package + # List of Java runtimes to make available for PrismLauncher."; + jdks = [ pkgs.jdk17 ]; + + }; + + # CAVA (Home Module) + # + # Provides: + # - CAVA audio visualizer + # - Declarative configuration via Nix + # - Support for structured settings or raw config override + # + # Options: + # - enable → Enable CAVA (home module) + # - settings → Declarative structured configuration (default: ALSA, 60 FPS, basic colors) + # - configText → Raw configuration text (overrides settings if set) + # + # Notes: + # - Writes config to ~/.config/cava/config + # - If configText is set, settings are ignored + # + # Example: + # nyx-module.home.cava = { + # enable = true; + # settings.general.framerate = 120; + # settings.input.method = "pulse"; + # }; + cava = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.attrs + settings = default = {; + + # mkOption type=lib.types.nullOr lib.types.lines + # '' + configText = null; + + }; + + # Spotify (music streaming client) + # + # Provides: + # - Spotify package (default) + # - Optional override to install a different package + # + # Notes: + # - Installs into home.packages + # + spotify = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # '' + package = pkgs.spotify; + + }; + + # Camera GUI module + # + # Provides: + # - Camera GUI package (default: snapshot) + # - libcamera (always installed, required backend) + # + # Notes: + # - You can override the GUI package with another (e.g., cheese, kamoso) + # + camera = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Camera GUI package to install."; + package = pkgs.snapshot; + + }; + + # Image Viewer + # + # Provides: + # - Installs a chosen image viewer application + # + # Notes: + # - Defaults to Gwenview + # + image-viewer = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Image viewer package to install (e.g. gwenview, feh, imv)."; + package = pkgs.gwenview; + + }; + + # Krita (Digital Painting Software) + # + # Provides: + # - Krita package (open-source digital painting and illustration software) + # + # Notes: + # - Installed via home.packages + # + krita = { + # mkEnableOption (bool) + enable = true; + + }; + + # Kdenlive (video editor) + # + # Provides: + # - Kdenlive video editor + # - Installed via home.packages + # + # Notes: + # - Package location depends on nixpkgs version: + # * pkgs.kdePackages.kdenlive (preferred, modern KDE split) + # * pkgs.libsForQt5.kdenlive (older releases, fallback) + # + kdenlive = { + # mkEnableOption (bool) + enable = true; + + }; + + # Video Player(s) + # + # Provides: + # - Installs one or more chosen video/media players + # + # Notes: + # - Defaults to [ vlc ] + # + video-player = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.listOf lib.types.package + # List of video/media players to install (e.g. vlc, mpv, celluloid)."; + packages = [ pkgs.vlc ]; + + }; + + # Zoom (video conferencing client) + # + # Provides: + # - Zoom package (default: pkgs.zoom-us) + # + # Options: + # - `package`: override the package (e.g. pkgs.zoom) + # + # Notes: + # - Installed via home.packages + # + zoom = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Zoom package to install (e.g., pkgs.zoom-us)."; + package = pkgs.zoom-us; + + }; + + # Obsidian (note-taking / PKM app) + # + # Provides: + # - Obsidian package via home.packages + # + # Notes: + # - Consider adding theming support later + # (e.g., https://github.com/jackiejude/obsidian-temple-os) + # + obsidian = { + # mkEnableOption (bool) + enable = true; + + }; + + # LibreOffice (office suite) + # + # Provides: + # - LibreOffice package via home.packages + # + # Notes: + # - Simple module, just adds LibreOffice to the user environment + # + libreoffice = { + # mkEnableOption (bool) + enable = true; + + }; + + # PDF Viewer / Scanner + # + # Provides: + # - Install a chosen PDF or scanning GUI application + # + # Notes: + # - Defaults to Okular + # + pdf-reader = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # PDF or scanning GUI package to install (e.g. Okular, Evince, Xournal++)."; + package = pkgs.kdeApplications.okular; + + }; + + # Printer GUI (scanning/printing tools) + # + # Provides: + # - Configurable GUI package for printing/scanning via home.packages + # + # Notes: + # - Default is `simple-scan` (GNOME Document Scanner) + # - Can be overridden with another package such as `system-config-printer` + # + printer-scan = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Printer/scanner GUI package to install."; + package = pkgs.simple-scan; + + }; + + # Thunderbird (email client) + # + # Provides: + # - Thunderbird package via home.packages + # + # Notes: + # - Simple module, just adds Thunderbird to the user environment + # + thunderbird = { + # mkEnableOption (bool) + enable = true; + + }; + + # ProtonVPN (Home Module) + # + # Provides: + # - ProtonVPN GUI client + # + # Options: + # - enable → Enable ProtonVPN client + # + # Notes: + # - GUI only by default (CLI version available as pkgs.protonvpn-cli) + + protonvpn = { + # mkEnableOption (bool) + enable = true; + + }; + + # CLI Tools (Home Module) + # + # Provides: + # - A curated set of command-line utilities in user’s environment + # - Examples: fastfetch, hyfetch, bat, fzf, tree, lsd, tmux + # + # Options: + # - enable → Enable CLI tools collection + # - extra → List of extra packages to install + tools = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.listOf lib.types.package + # Extra CLI tools to install in addition to the defaults."; + extra = []; + + }; + + # Zsh (Home Module) + # + # Provides: + # - Zsh shell in the user profile + # - Zsh completion, autosuggestions, and syntax highlighting + # + # Options: + # - enable → Enable Zsh in the user profile + zsh = { + # mkEnableOption (bool) + enable = true; + + }; + + # Private Webapps + # + # Provides: + # - Browser-based desktop entries for personal/private webapps + # - Currently supported: + # • WhatsApp + # + # Options: + # - browser → Selects which browser package to use (default: chromium) + # - whatsapp → Enable WhatsApp webapp launcher + # + # Notes: + # - Uses --app mode to create minimal browser windows + # - Additional services can be added following the same pattern + private-webapps = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Browser package to use for private webapps."; + browser = pkgs.chromium; + + }; + + # Work Webapps + # + # Provides: + # - Browser-based desktop entries for work-related webapps + # - Currently supported: + # • Slack + # • Microsoft Teams + # • Outlook Web + # • Microsoft Entra + # + # Options: + # - browser → Selects which browser package to use (default: chromium) + # - slack → Enable Slack webapp launcher + # - teams → Enable Teams webapp launcher + # - outlook → Enable Outlook webapp launcher + # - entra → Enable Entra webapp launcher + # + # Notes: + # - Uses --app mode for minimal windows (like PWAs) + # - Outlook entry uses a custom profile directory for isolation + work-webapps = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.package + # Browser package to use for private webapps."; + browser = pkgs.chromium; + + }; + + }; + + hardware = { + bluetooth = { + # mkEnableOption (bool) + enable = true; + + }; + + # Custom Kernel Module for Microsoft Surface Pro (Kaby Lake / i5-7300U) + # + # Requires: + # - inputs.nixos-hardware.nixosModules.microsoft-surface-pro-intel + # + # Notes: + # - Estimated kernel build time: ~4h30m + # + custom-kernel-surfacepro-kbl = { + # mkEnableOption (bool) + enable = true; + + # mkOption type=lib.types.enum [ "stable" "longtime" ] + # Choose which kernel version nixos-hardware will build for Surface Pro."; + kernelVersion = "stable"; + + }; + + }; + + }; +} diff --git a/other/examples/example-with-headers.nix b/other/examples/example-with-headers.nix new file mode 100644 index 0000000..6a1613d --- /dev/null +++ b/other/examples/example-with-headers.nix @@ -0,0 +1,740 @@ +{ config, lib, pkgs, ... }: + +{ + nyx-module = { + system = { + # Docker (System Module) + # + # Provides: + # - Docker runtime and CLI + # - Docker Compose + # - User access via `docker` group + # - Optional rootless mode and cgroup v2 support + # + # Options: + # - enable → Enable Docker system module + # - username → User to add to the docker group + # - enableOnBoot → Start Docker service on boot (default: true) + # - rootless → Enable Docker rootless mode (disabled by default) + # + # Notes: + # - Rootless mode is disabled by default + # - Uses cgroup v2 for better resource management on modern kernels + docker = { + enable = true; + + username = "alice"; + + enableOnBoot = true; + + rootless = true; + + }; + + # OpenSSH (System Module) + # + # Provides: + # - OpenSSH server (sshd) service + # + # Options: + # - enable → Enable OpenSSH system module + # - passwordAuth → Allow password authentication (default: false) + # - permitRootLogin → Permit root login (default: "no") + # + # Notes: + # - By default, password authentication is disabled for better security + # - Root login is disabled unless explicitly enabled + openssh = { + enable = true; + + passwordAuth = false; + + permitRootLogin = "no"; + + }; + + # Podman (System Module) + # + # Provides: + # - Podman runtime and CLI + # - Podman Compose + # - User access via `podman` group + # + # Options: + # - enable → Enable Podman system module + # - username → User to add to the podman group + # + # Notes: + # - Adds podman + podman-compose to system packages + # - Enables D-Bus socket activation for Podman + # + podman = { + enable = true; + + username = "alice"; + + }; + + # VM (System Module) + # + # Provides: + # - QEMU/KVM virtualization via libvirt + # - virt-manager GUI + # - User access via libvirtd and kvm groups + # - Spice, dnsmasq, and bridge-utils for networking and display + # + # Options: + # - enable → Enable VM system module + # - username → User to add to virtualization groups (required) + # + # Notes: + # - QEMU runs as root by default (can be adjusted) + # - virt-manager GUI is enabled automatically + # - Only generic "kvm" kernel module is forced (host picks intel/amd) + # + vm = { + enable = true; + + username = "alice"; + + }; + + # Zsh (System Module) + # + # Provides: + # - Zsh shell + # - oh-my-zsh integration + # - Theme + plugins support + # + # Options: + # - enable → Enable Zsh system module + # - ohMyZsh → Enable oh-my-zsh integration + # - theme → oh-my-zsh theme (default: "xiong-chiamiov-plus") + # - plugins → List of oh-my-zsh plugins (default: [ "git" ]) + # + zsh = { + enable = true; + + ohMyZsh = true; + + theme = "xiong-chiamiov-plus"; + + plugins = [ "git" ]; + + }; + + # Steam (System Module) + # + # Provides: + # - Steam client + # - Optional firewall openings for: + # * Remote Play + # * Source Dedicated Server + # * Local Network Game Transfers + # - ProtonUp tool for managing Proton versions + # + # Options: + # - enable → Enable Steam system module + # - openFirewall.remotePlay → Open firewall for Remote Play + # - openFirewall.dedicatedServer → Open firewall for Source Dedicated Server + # - openFirewall.localNetworkGameTransfers → Open firewall for LAN transfers + # + steam = { + enable = true; + + remotePlay = true; + + dedicatedServer = true; + + localNetworkGameTransfers = true; + + }; + + # Flatpak (System Module) + # + # Provides: + # - Flatpak package manager + # - Flatpak service integration + # - XDG portals for sandboxed apps + # + # Options: + # - enable → Enable Flatpak system module + # + flatpak = { + enable = true; + + }; + + # Wireshark (System Module) + # + # Provides: + # - Wireshark installation + # - Proper dumpcap permissions + # - Adds user to `wireshark` group + # + # Options: + # - enable → Enable Wireshark system module + # - username → User to add to the wireshark group (required) + # + wireshark = { + enable = true; + + username = "alice"; + + }; + + # C Compiler (System Module) + # + # Provides: + # - GCC (C/C++) + # - Clang (alternative C/C++) + # - Mono (C#) + # + # Options: + # - enable → Enable C compiler toolchain + # + c-compiler = { + enable = true; + + }; + + # Go (System Module) + # + # Provides: + # - Go programming language toolchain + # + # Options: + # - enable → Enable Go system module + # + go = { + enable = true; + + }; + + # Lua (System Module) + # + # Provides: + # - Lua (standard interpreter) + # - LuaJIT (Just-In-Time compiler) + # + # Options: + # - enable → Enable Lua system module + # + lua = { + enable = true; + + }; + + # Python (System Module) + # + # Provides: + # - Python 3 interpreter + # - Pip (package manager) + # + # Options: + # - enable → Enable Python system module + # + python = { + enable = true; + + }; + + # Rust (System Module) + # + # Provides: + # - Rust compiler (rustc) + # - Cargo (Rust package manager & build system) + # + # Options: + # - enable → Enable Rust system module + # + rust = { + enable = true; + + }; + + }; + + home = { + # Brave Browser (Home Module) + # + # Provides: + # - Brave browser package + # - Optional standard and custom extension sets + # + # Options: + # - enable → Enable Brave browser + # - extensions.enable → Enable Brave extensions + # - extensions.standard→ Enable default extension set of extensions + # - extensions.extra → Extra extension IDs to install + # + # Notes: + # - Default extensions include uBlock Origin, Proton Pass, Proton VPN + # - Extra extensions must be specified by Chrome Web Store ID + # + brave = { + enable = true; + + enable = true; + + standard = true; + + extra = []; + + }; + + # Signal Desktop (Home Module) + # + # Provides: + # - Signal Desktop secure messaging client + # + # Options: + # - enable → Enable Signal Desktop + # - package → Override package (default: pkgs.signal-desktop) + # + signal-desktop = { + enable = true; + + package = pkgs.signal-desktop; + + }; + + # Vesktop (Home Module) + # + # Provides: + # - Vesktop package (Discord client, Electron wrapper) + # + # Options: + # - enable → Enable Vesktop client + # - package → Override package (default: pkgs.vesktop) + # + vesktop = { + enable = true; + + package = pkgs.vesktop; + + }; + + # RustDesk (Home Module) + # + # Provides: + # - RustDesk remote desktop software (TeamViewer/AnyDesk alternative) + # + # Options: + # - enable → Enable RustDesk + # - package → Override package (default: pkgs.rustdesk) + # + # Notes: + # - Estimated build time: ~? Long.... + # + rustdesk = { + enable = true; + + package = pkgs.rustdesk; + + }; + + # VSCodium (Home Module) + # + # Provides: + # - VSCodium editor (open-source build of VS Code) + # - Optional extension sets + # + # Options: + # - enable → Enable VSCodium + # - extensions.enable → Enable extensions + # - extensions.standard→ Enable standard extensions + # - extensions.extra → Extra extensions to install + # + # Notes: + # - Some Microsoft extensions may be broken (e.g., ms-python.python) + # + vscodium = { + enable = true; + + enable = true; + + standard = true; + + extra = []; + + }; + + # Classic Game Collection (Home Module) + # + # Provides: + # - Small set of lightweight, classic desktop games + # + # Included: + # - KPat (Patience / Solitaire) + # - KSudoku + # - Space Cadet Pinball + # - Palapeli (jigsaw puzzles) + # - KMines (Minesweeper clone) + # - KBlocks (Tetris clone) + # - KMahjongg (Mahjong solitaire) + # + # Options: + # - enable → Enable the Classic Game Collection + # + classic-game-collection = { + enable = true; + + }; + + # PrismLauncher (Home Module) + # + # Provides: + # - PrismLauncher (Minecraft launcher) + # - Optional inclusion of ffmpeg (some mods require it) + # - Configurable list of JDKs (for modpacks that need specific versions) + # + # Options: + # - enable → Enable PrismLauncher + # - includeFfmpeg→ Include ffmpeg for mods + # - jdks → List of Java runtimes for PrismLauncher + # + # Notes: + # - Installed via home.packages + # - JDKs are added to PATH so PrismLauncher can discover them + # + prismlauncher = { + enable = true; + + includeFfmpeg = true; + + jdks = [ pkgs.jdk17 ]; + + }; + + # CAVA (Home Module) + # + # Provides: + # - CAVA audio visualizer + # - Declarative configuration via Nix + # - Support for structured settings or raw config override + # + # Options: + # - enable → Enable CAVA (home module) + # - settings → Declarative structured configuration (default: ALSA, 60 FPS, basic colors) + # - configText → Raw configuration text (overrides settings if set) + # + # Notes: + # - Writes config to ~/.config/cava/config + # - If configText is set, settings are ignored + # + # Example: + # nyx-module.home.cava = { + # enable = true; + # settings.general.framerate = 120; + # settings.input.method = "pulse"; + # }; + cava = { + enable = true; + + settings = default = {; + + configText = null; + + }; + + # Spotify (music streaming client) + # + # Provides: + # - Spotify package (default) + # - Optional override to install a different package + # + # Notes: + # - Installs into home.packages + # + spotify = { + enable = true; + + package = pkgs.spotify; + + }; + + # Camera GUI module + # + # Provides: + # - Camera GUI package (default: snapshot) + # - libcamera (always installed, required backend) + # + # Notes: + # - You can override the GUI package with another (e.g., cheese, kamoso) + # + camera = { + enable = true; + + package = pkgs.snapshot; + + }; + + # Image Viewer + # + # Provides: + # - Installs a chosen image viewer application + # + # Notes: + # - Defaults to Gwenview + # + image-viewer = { + enable = true; + + package = pkgs.gwenview; + + }; + + # Krita (Digital Painting Software) + # + # Provides: + # - Krita package (open-source digital painting and illustration software) + # + # Notes: + # - Installed via home.packages + # + krita = { + enable = true; + + }; + + # Kdenlive (video editor) + # + # Provides: + # - Kdenlive video editor + # - Installed via home.packages + # + # Notes: + # - Package location depends on nixpkgs version: + # * pkgs.kdePackages.kdenlive (preferred, modern KDE split) + # * pkgs.libsForQt5.kdenlive (older releases, fallback) + # + kdenlive = { + enable = true; + + }; + + # Video Player(s) + # + # Provides: + # - Installs one or more chosen video/media players + # + # Notes: + # - Defaults to [ vlc ] + # + video-player = { + enable = true; + + packages = [ pkgs.vlc ]; + + }; + + # Zoom (video conferencing client) + # + # Provides: + # - Zoom package (default: pkgs.zoom-us) + # + # Options: + # - `package`: override the package (e.g. pkgs.zoom) + # + # Notes: + # - Installed via home.packages + # + zoom = { + enable = true; + + package = pkgs.zoom-us; + + }; + + # Obsidian (note-taking / PKM app) + # + # Provides: + # - Obsidian package via home.packages + # + # Notes: + # - Consider adding theming support later + # (e.g., https://github.com/jackiejude/obsidian-temple-os) + # + obsidian = { + enable = true; + + }; + + # LibreOffice (office suite) + # + # Provides: + # - LibreOffice package via home.packages + # + # Notes: + # - Simple module, just adds LibreOffice to the user environment + # + libreoffice = { + enable = true; + + }; + + # PDF Viewer / Scanner + # + # Provides: + # - Install a chosen PDF or scanning GUI application + # + # Notes: + # - Defaults to Okular + # + pdf-reader = { + enable = true; + + package = pkgs.kdeApplications.okular; + + }; + + # Printer GUI (scanning/printing tools) + # + # Provides: + # - Configurable GUI package for printing/scanning via home.packages + # + # Notes: + # - Default is `simple-scan` (GNOME Document Scanner) + # - Can be overridden with another package such as `system-config-printer` + # + printer-scan = { + enable = true; + + package = pkgs.simple-scan; + + }; + + # Thunderbird (email client) + # + # Provides: + # - Thunderbird package via home.packages + # + # Notes: + # - Simple module, just adds Thunderbird to the user environment + # + thunderbird = { + enable = true; + + }; + + # ProtonVPN (Home Module) + # + # Provides: + # - ProtonVPN GUI client + # + # Options: + # - enable → Enable ProtonVPN client + # + # Notes: + # - GUI only by default (CLI version available as pkgs.protonvpn-cli) + + protonvpn = { + enable = true; + + }; + + # CLI Tools (Home Module) + # + # Provides: + # - A curated set of command-line utilities in user’s environment + # - Examples: fastfetch, hyfetch, bat, fzf, tree, lsd, tmux + # + # Options: + # - enable → Enable CLI tools collection + # - extra → List of extra packages to install + tools = { + enable = true; + + extra = []; + + }; + + # Zsh (Home Module) + # + # Provides: + # - Zsh shell in the user profile + # - Zsh completion, autosuggestions, and syntax highlighting + # + # Options: + # - enable → Enable Zsh in the user profile + zsh = { + enable = true; + + }; + + # Private Webapps + # + # Provides: + # - Browser-based desktop entries for personal/private webapps + # - Currently supported: + # • WhatsApp + # + # Options: + # - browser → Selects which browser package to use (default: chromium) + # - whatsapp → Enable WhatsApp webapp launcher + # + # Notes: + # - Uses --app mode to create minimal browser windows + # - Additional services can be added following the same pattern + private-webapps = { + enable = true; + + browser = pkgs.chromium; + + }; + + # Work Webapps + # + # Provides: + # - Browser-based desktop entries for work-related webapps + # - Currently supported: + # • Slack + # • Microsoft Teams + # • Outlook Web + # • Microsoft Entra + # + # Options: + # - browser → Selects which browser package to use (default: chromium) + # - slack → Enable Slack webapp launcher + # - teams → Enable Teams webapp launcher + # - outlook → Enable Outlook webapp launcher + # - entra → Enable Entra webapp launcher + # + # Notes: + # - Uses --app mode for minimal windows (like PWAs) + # - Outlook entry uses a custom profile directory for isolation + work-webapps = { + enable = true; + + browser = pkgs.chromium; + + }; + + }; + + hardware = { + bluetooth = { + enable = true; + + }; + + # Custom Kernel Module for Microsoft Surface Pro (Kaby Lake / i5-7300U) + # + # Requires: + # - inputs.nixos-hardware.nixosModules.microsoft-surface-pro-intel + # + # Notes: + # - Estimated kernel build time: ~4h30m + # + custom-kernel-surfacepro-kbl = { + enable = true; + + kernelVersion = "stable"; + + }; + + }; + + }; +} diff --git a/other/examples/example.nix b/other/examples/example.nix new file mode 100644 index 0000000..4f17a04 --- /dev/null +++ b/other/examples/example.nix @@ -0,0 +1,291 @@ +{ config, lib, pkgs, ... }: + +{ + nyx-module = { + system = { + docker = { + enable = true; + + username = "alice"; + + enableOnBoot = true; + + rootless = true; + + }; + + openssh = { + enable = true; + + passwordAuth = false; + + permitRootLogin = "no"; + + }; + + podman = { + enable = true; + + username = "alice"; + + }; + + vm = { + enable = true; + + username = "alice"; + + }; + + zsh = { + enable = true; + + ohMyZsh = true; + + theme = "xiong-chiamiov-plus"; + + plugins = [ "git" ]; + + }; + + steam = { + enable = true; + + remotePlay = true; + + dedicatedServer = true; + + localNetworkGameTransfers = true; + + }; + + flatpak = { + enable = true; + + }; + + wireshark = { + enable = true; + + username = "alice"; + + }; + + c-compiler = { + enable = true; + + }; + + go = { + enable = true; + + }; + + lua = { + enable = true; + + }; + + python = { + enable = true; + + }; + + rust = { + enable = true; + + }; + + }; + + home = { + brave = { + enable = true; + + enable = true; + + standard = true; + + extra = []; + + }; + + signal-desktop = { + enable = true; + + package = pkgs.signal-desktop; + + }; + + vesktop = { + enable = true; + + package = pkgs.vesktop; + + }; + + rustdesk = { + enable = true; + + package = pkgs.rustdesk; + + }; + + vscodium = { + enable = true; + + enable = true; + + standard = true; + + extra = []; + + }; + + classic-game-collection = { + enable = true; + + }; + + prismlauncher = { + enable = true; + + includeFfmpeg = true; + + jdks = [ pkgs.jdk17 ]; + + }; + + cava = { + enable = true; + + settings = default = {; + + configText = null; + + }; + + spotify = { + enable = true; + + package = pkgs.spotify; + + }; + + camera = { + enable = true; + + package = pkgs.snapshot; + + }; + + image-viewer = { + enable = true; + + package = pkgs.gwenview; + + }; + + krita = { + enable = true; + + }; + + kdenlive = { + enable = true; + + }; + + video-player = { + enable = true; + + packages = [ pkgs.vlc ]; + + }; + + zoom = { + enable = true; + + package = pkgs.zoom-us; + + }; + + obsidian = { + enable = true; + + }; + + libreoffice = { + enable = true; + + }; + + pdf-reader = { + enable = true; + + package = pkgs.kdeApplications.okular; + + }; + + printer-scan = { + enable = true; + + package = pkgs.simple-scan; + + }; + + thunderbird = { + enable = true; + + }; + + protonvpn = { + enable = true; + + }; + + tools = { + enable = true; + + extra = []; + + }; + + zsh = { + enable = true; + + }; + + private-webapps = { + enable = true; + + browser = pkgs.chromium; + + }; + + work-webapps = { + enable = true; + + browser = pkgs.chromium; + + }; + + }; + + hardware = { + bluetooth = { + enable = true; + + }; + + custom-kernel-surfacepro-kbl = { + enable = true; + + kernelVersion = "stable"; + + }; + + }; + + }; +} diff --git a/other/missing-header.nix b/other/missing-header.nix new file mode 100644 index 0000000..3834b29 --- /dev/null +++ b/other/missing-header.nix @@ -0,0 +1,23 @@ +############################################################ +# System Modules +############################################################ + + + + + + + + + + + + + + + + + +############################################################ +# Home Modules +############################################################