diff --git a/Droidnix/generated/hosts/traveldroid/boot.nix b/Droidnix/generated/hosts/traveldroid/boot.nix new file mode 100644 index 000000000..375d77f8c --- /dev/null +++ b/Droidnix/generated/hosts/traveldroid/boot.nix @@ -0,0 +1,66 @@ +{{ pkgs, config, lib, flakeRoot, ... }: + +let + grubThemeDir = "/boot/grub/themes/catppuccin-mocha"; + grubThemeFile = "${grubThemeDir}/theme.txt"; + plymouthThemeDir = "/usr/share/plymouth/themes/catppuccin"; +in +{ + boot = { + initrd = { + verbose = false; + kernelModules = []; + }; + + kernelPackages = pkgs.linuxPackages_latest; + kernelParams = [ "quiet" "udev.log_level=3" "systemd.show_status=auto" ]; + consoleLogLevel = 3; + + supportedFilesystems = [ "ntfs" ]; + + # Correct GRUB + UEFI configuration + loader = { + grub = { + enable = true; + efiSupport = true; # enable UEFI mode + devices = [ "nodev" ]; # nodev for UEFI + useOSProber = true; + theme = grubThemeFile; + }; + + timeout = 5; + }; + + # Plymouth splashscreen + plymouth = { + enable = true; + theme = "rings"; + themePackages = with pkgs; [ + (adi1090x-plymouth-themes.override { + selected_themes = [ "rings" ]; + }) + ]; + }; + }; + + # Activation script: write Catppuccin GRUB theme + system.activationScripts.grubTheme = { + text = '' + mkdir -p ${grubThemeDir} + + cat > ${grubThemeFile} <" . pixel-scroll-precision) ; dont zoom in please, just scroll + ("C-" . pixel-scroll-precision) ; dont zoom in either, just scroll + ("C-x k" . kill-current-buffer)) ; kill the buffer, dont ask +:hook +(text-mode . delete-trailing-whitespace-mode) +(prog-mode . delete-trailing-whitespace-mode) +(after-init . global-display-line-numbers-mode) ;; always show line numbers +(after-init . column-number-mode) ;; column number in the mode line +(after-init . size-indication-mode) ;; file size in the mode line +(after-init . pixel-scroll-precision-mode) ;; smooth mouse scroll +(after-init . electric-pair-mode) ;; i mean ... parens should auto create +(after-init . reset-custom-vars) +) + +(use-package autorevert +:ensure nil +:custom +(auto-revert-interval 3) +(auto-revert-remote-files nil) +(auto-revert-use-notify t) +(auto-revert-avoid-polling nil) +(auto-revert-verbose t) +:hook +(after-init . global-auto-revert-mode)) + +(use-package recentf +:ensure nil +:commands (recentf-mode recentf-cleanup) +:hook +(after-init . recentf-mode) +:custom +(recentf-auto-cleanup 'never) +(recentf-exclude + (list "\\.tar$" "\\.tbz2$" "\\.tbz$" "\\.tgz$" "\\.bz2$" + "\\.bz$" "\\.gz$" "\\.gzip$" "\\.xz$" "\\.zip$" + "\\.7z$" "\\.rar$" + "COMMIT_EDITMSG\\'" + "\\.\\(?:gz\\|gif\\|svg\\|png\\|jpe?g\\|bmp\\|xpm\\)$" + "-autoloads\\.el$" "autoload\\.el$")) + +:config +;; A cleanup depth of -90 ensures that `recentf-cleanup' runs before +;; `recentf-save-list', allowing stale entries to be removed before the list +;; is saved by `recentf-save-list', which is automatically added to +;; `kill-emacs-hook' by `recentf-mode'. +(add-hook 'kill-emacs-hook #'recentf-cleanup -90)) + +(use-package savehist +:ensure nil +:commands (savehist-mode savehist-save) +:hook +(after-init . savehist-mode) +:custom +(savehist-autosave-interval 600) +(savehist-additional-variables + '(kill-ring ; clipboard + register-alist ; macros + mark-ring global-mark-ring ; marks + search-ring regexp-search-ring))) + +(use-package hl-line +:ensure nil +:custom +(hl-line-sticky-flag nil) +(global-hl-line-sticky-flag nil) +:hook +(after-init . global-hl-line-mode)) + +(use-package saveplace +:ensure nil +:commands (save-place-mode save-place-local-mode) +:hook +(after-init . save-place-mode) +:custom +(save-place-limit 400)) + +(use-package nerd-icons +:custom +;; disable bright icon colors +(nerd-icons-color-icons nil))hells.nix + +(use-package doom-modeline +:custom +(inhibit-compacting-font-caches t) ;; speed +(doom-modeline-buffer-file-name-style 'relative-from-project) +(doom-modeline-major-mode-icon nil) ;; distracting icons, no thank you +(doom-modeline-buffer-encoding nil) ;; everything is utf-8 anyway +(doom-modeline-buffer-state-icon nil) ;; the filename already shows me +(doom-modeline-lsp nil) ;; lsp state is too distracting, too often +:hook (after-init . doom-modeline-mode)) + +(load-theme 'catppuccin :no-confirm) + +(use-package diminish :demand t) ;; declutter the modeline +(use-package eldoc +:diminish eldoc-mode +:custom +(eldoc-echo-area-use-multiline-p nil)) ;; docs for everything + +(use-package eldoc-box +:defer t +:config +(set-face-background 'eldoc-box-border (catppuccin-color 'green)) +(set-face-background 'eldoc-box-body (catppuccin-color 'base)) +:bind +(("M-h" . eldoc-box-help-at-point))) + +(use-package pulsar +:commands pulsar-global-mode pulsar-recenter-top pulsar-reveal-entry +:init +(defface pulsar-catppuccin +`((default :extend t) + (((class color) (min-colors 88) (background light)) + :background ,(catppuccin-color 'sapphire)) + (((class color) (min-colors 88) (background dark)) + :background ,(catppuccin-color 'sapphire)) + (t :inverse-video t)) +"Alternative nord face for `pulsar-face'." +:group 'pulsar-faces) +:custom +(pulsar-face 'pulsar-catppuccin) +:hook +(after-init . pulsar-global-mode)) + +(use-package which-key +:commands which-key-mode +:diminish which-key-mode +:hook +(after-init . which-key-mode)) + +(use-package expreg +:bind ("M-m" . expreg-expand)) + +(use-package vundo) ;; undo tree + +;; better structured editing +(use-package puni +:commands puni-global-mode +:hook +(after-init . puni-global-mode)) + +(use-package avy +:bind +("M-i" . avy-goto-char-2) +:custom +(avy-background t)) + +(use-package consult +:bind +("C-x b" . consult-buffer) ;; orig. switch-to-buffer +("M-y" . consult-yank-pop) ;; orig. yank-pop +("M-g M-g" . consult-goto-line) ;; orig. goto-line +("M-g i" . consult-imenu) ;; consult version is interactive +("M-g r" . consult-ripgrep) ;; find in project also works +:custom +(consult-narrow-key "<")) + +(use-package vertico +:commands vertico-mode +:custom +(read-file-name-completion-ignore-case t) +(read-buffer-completion-ignore-case t) +(completion-ignore-case t) +(enable-recursive-minibuffers t) +(minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)) +:init +(vertico-mode) +:hook +(minibuffer-setup-hook . cursor-intangible-mode)) + +(use-package marginalia +:commands marginalia-mode +:hook (after-init . marginalia-mode)) + +(use-package crux +:bind +("C-c M-e" . crux-find-user-init-file) +("C-c C-w" . crux-transpose-windows) +("C-c M-d" . crux-find-current-directory-dir-locals-file) +("C-a" . crux-move-beginning-of-line)) + +(use-package magit +:bind (("C-M-g" . magit-status))) + +(use-package nerd-icons-corfu +:commands nerd-icons-corfu-formatter +:defines corfu-margin-formatters) + +(use-package corfu +:commands global-corfu-mode +:custom +(corfu-cycle t) +(corfu-auto t) +(corfu-auto-delay 1) +(corfu-auto-prefix 3) +(corfu-separator ?_) +:hook +(after-init . global-corfu-mode) +:config +(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter)) + +(use-package cape) + +(use-package orderless +:custom +(completion-styles '(orderless partial-completion basic)) +(completion-category-defaults nil) +(completion-category-overrides nil)) + +(use-package yasnippet +:commands yas-global-mode +:diminish yas-minor-mode +:hook +(after-init . yas-global-mode)) + +(use-package yasnippet-snippets :after yasnippet) + +(use-package exec-path-from-shell +:commands exec-path-from-shell-initialize +:custom +(exec-path-from-shell-arguments nil) +:hook +(after-init . exec-path-from-shell-initialize)) + +(use-package nixpkgs-fmt +:custom +(nixpkgs-fmt-command "nixfmt")) + +(use-package eat +:bind +(("C-c e p" . eat-project) + ("C-c e t" . eat))) + +(use-package f :demand t) + +(use-package envrc +:commands envrc-global-mode +:hook +(after-init . envrc-global-mode)) + +(use-package gptel +:commands gptel-make-anthropic f-read-text +:config +(gptel-make-anthropic "Claude" +:stream t :key (f-read-text "/run/secrets/claude_key"))) + +(use-package sideline-flymake) +(use-package sideline-eglot) +(use-package sideline +:custom +(sideline-backends-right '(sideline-flymake sideline-eglot)) +:hook +(eglot-managed-mode . sideline-mode) +(flymake-mode . sideline-mode)) + +(use-package eglot +:custom +(eglot-extend-to-xref t) +(eglot-ignored-server-capabilities '(:inlayHintProvider)) +(jsonrpc-event-hook nil) +:hook +(eglot-managed-mode . eldoc-box-hover-mode) +(before-save . eldoc-format-buffer) +:bind +(:map eglot-mode-map + ("C-c l a" . eglot-code-actions) + ("C-c l r" . eglot-rename) + ("C-c l h" . eldoc) + ("C-c l g" . xref-find-references) + ("C-c l w" . eglot-reconnect))) + +(use-package proced +:custom +(proced-auto-update-flag t) +(proced-auto-update-interval 3) +(proced-enable-color-flag t) +(proced-show-remote-processes t)) + +(use-package org +:ensure t +:defer t +:commands (org-mode org-capture org-agenda) +:init +(defvar org-journal-file "~/nextcloud/org/journal.org") +(defvar org-archive-file "~/nextcloud/org/archive.org") +(defvar org-notes-file "~/nextcloud/org/notes.org") +(defvar org-inbox-file "~/nextcloud/org/inbox.org") +(defvar org-work-file "~/nextcloud/org/work.org") +(defun my/org-capture-project-target-heading () +"Determine Org target headings from the current file's project path. + +This function assumes a directory structure like '~/projects/COMPANY/PROJECT/'. +It extracts 'COMPANY' and 'PROJECT' to use as nested headlines +for an Org capture template. + +If the current buffer is not visi +ting a file within such a +project structure, it returns nil, causing capture to default to +the top of the file." +(when-let* ((path (buffer-file-name))) ; Ensure we are in a file-visiting buffer + (let ((path-parts (split-string path "/" t " "))) + (when-let* ((projects-pos (cl-position "projects" path-parts :test #'string=)) + (company (nth (+ 1 projects-pos) path-parts)) + (project (nth (+ 2 projects-pos) path-parts))) + ;; Return a list of headlines for Org to find or create. + (list company project))))) +:bind +(("C-c c" . org-capture) + ("C-c i" . org-store-link) + ("C-c a" . org-agenda) + :map org-mode-map + ("C-c t" . org-toggle-inline-images) + ("C-c l" . org-toggle-link-display)) +:custom +(org-agenda-files (list org-inbox-file org-journal-file)) +(org-directory "~/nextcloud/org") +(org-default-notes-file org-inbox-file) +(org-archive-location (concat org-archive-file "::* From %s")) +(org-log-done 'time) +(org-log-into-drawer t) +(org-hide-emphasis-markers t) +(org-src-fontify-natively t) +(org-src-tab-acts-natively t) +(org-capture-templates '(("t" "todo" entry (file org-inbox-file) + "* todo %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n%a\n\n)") + ("j" "Journal" entry (file+olp+datetree org-journal-file) + "* %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n%a\n\n") + ("n" "Note" entry (file org-notes-file) + "* %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n\n%a\n\n") + ("p" "Project Task" item + (file+function org-work-file my/org-capture-project-target-heading) + "* todo %? \n CLOCK: %U" + )) + ) +:config +;; Enable syntax highlighting in code blocks +(add-hook 'org-mode-hook 'turn-on-font-lock) +(add-hook 'org-mode-hook 'org-indent-mode)) + +;; extras +(use-package comp-run +:ensure nil +:config +(push "tramp-loaddefs.el.gz" native-comp-jit-compilation-deny-list) +(push "cl-loaddefs.el.gz" native-comp-jit-compilation-deny-list)) + +(use-package rustic +:custom +(rustic-lsp-client 'eglot)) + +(provide 'init) + +;;; init.el ends here diff --git a/Droidnix/generated/parked/apps/flatpaks.nix b/Droidnix/generated/parked/apps/flatpaks.nix new file mode 100644 index 000000000..f13115e72 --- /dev/null +++ b/Droidnix/generated/parked/apps/flatpaks.nix @@ -0,0 +1,66 @@ +{ lib, pkgs, config, ... }: + +let + # Module name + moduleName = "flatpaks"; + + # Top-level toggle for this module + enableProgram = config.enableFlatpaks or false; + + # Path to your Flatpak list + assetPath = ../../../assets/system/apps/flatpaks.conf; + + # Resolve user safely + username = config.defaultUser or "henrov"; +in +{ + # --- Top-level toggle option --- + options.enableFlatpaks = lib.mkEnableOption "Enable automatic Flatpak installation"; + + # --- Config only applied if enabled --- + config = lib.mkIf enableProgram { + + # Deploy the Flatpak conf file + environment.etc."flatpak/flatpaks.conf".source = assetPath; + + # Enable system Flatpak service + services.flatpak.enable = true; + xdg.portal.enable = true; + + # Systemd service to install Flatpaks from the list + systemd.services."${moduleName}-sync" = { + description = "Install Flatpak apps listed in flatpaks.conf"; + wantedBy = [ "multi-user.target" ]; + wants = [ "network-online.target" ]; + after = [ "network-online.target" ]; + + serviceConfig = { + Type = "oneshot"; + ExecStart = '' + set -euo pipefail + CONF="${assetPath}" + + # Add Flathub if not present + if ! flatpak remotes --system --columns=name | grep -qx flathub; then + flatpak remote-add --system --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo + fi + + # Install every Flatpak listed in the conf file + while IFS= read -r app || [ -n "$app" ]; do + app=$(echo "$app" | sed 's/#.*//;s/^[[:space:]]*//;s/[[:space:]]*$//') + if [ -n "$app" ]; then + if ! flatpak info --system "$app" >/dev/null 2>&1; then + flatpak install --system -y --noninteractive flathub "$app" + fi + fi + done < "$CONF" + ''; + }; + + restartTriggers = [ assetPath ]; + + # Include only the packages needed for this service + path = [ pkgs.flatpak pkgs.coreutils pkgs.gnugrep pkgs.gnused ]; + }; + }; +} diff --git a/Droidnix/generated/parked/apps/thunar.nix b/Droidnix/generated/parked/apps/thunar.nix new file mode 100644 index 000000000..9d135a314 --- /dev/null +++ b/Droidnix/generated/parked/apps/thunar.nix @@ -0,0 +1,28 @@ +{ lib, pkgs, config, ... }: + +let + enableProgram = config.enableThunar or false; + username = config.defaultUser or "henrov"; +in +{ + # Top-level toggle + options.enableThunar = lib.mkEnableOption "Enable Thunar file manager"; + + # Only apply config if enabled + config = lib.mkIf enableProgram { + # Install Thunar and related packages system-wide + environment.systemPackages = [ + pkgs.thunar + pkgs.thunar-plugins + pkgs.xarchiver + ]; + + # Remove invalid top-level 'home' reference + # If you want sessionVariables, define them in Home Manager instead + # Example for Home Manager: + # home-manager.users.${username}.sessionVariables = { + # FILE_MANAGER = "thunar"; + # USERNAME = username; + # }; + }; +} diff --git a/Droidnix/generated/parked/apps/wofi.nix b/Droidnix/generated/parked/apps/wofi.nix new file mode 100644 index 000000000..169e5b55e --- /dev/null +++ b/Droidnix/generated/parked/apps/wofi.nix @@ -0,0 +1,57 @@ +{ lib, config, ... }: + +let + # --- Program definition --- + programName = "wofi"; + + # Path to assets + assetPath = ../../../assets/system/conf/${programName}; + + # Generate file mappings + programFiles = + if builtins.pathExists assetPath then builtins.readDir assetPath else {}; + files = lib.genAttrs (builtins.attrNames programFiles) (name: { + src = "${assetPath}/${name}"; + }); + + # Top-level toggle for this module + enableProgram = config.enableWofi or false; + + # Default user + username = config.defaultUser or "henrov"; +in +{ + # --- Module option --- + options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher"; + + # --- Config --- + config = lib.mkIf enableProgram { + + # --- Deploy assets to ~/.config/wofi --- + environment.etc."${programName}".source = assetPath; + + # --- Optional systemd service to sync config --- + systemd.services."${programName}-sync" = { + description = "Sync ${programName} configuration files"; + wantedBy = [ "multi-user.target" ]; + wants = [ "network-online.target" ]; + after = [ "network-online.target" ]; + + serviceConfig = { + Type = "oneshot"; + ExecStart = '' + set -euo pipefail + if [ -d "${assetPath}" ]; then + for f in ${lib.concatStringsSep " " (builtins.attrNames files)}; do + mkdir -p "/home/${username}/.config/${programName}" + cp -u "${assetPath}/$f" "/home/${username}/.config/${programName}/$f" + done + fi + ''; + }; + + restartTriggers = [ assetPath ]; + path = []; + }; + }; +} diff --git a/Droidnix/generated/parked/apps/zenbrowser.nix b/Droidnix/generated/parked/apps/zenbrowser.nix new file mode 100644 index 000000000..93eeb51cd --- /dev/null +++ b/Droidnix/generated/parked/apps/zenbrowser.nix @@ -0,0 +1,62 @@ +{ lib, config, pkgs, ... }: + +let + # --- Program definition --- + programName = "zenbrowser"; + + # Assets (optional, empty if no config) + assetPath = + if builtins.pathExists ../../../assets/system/conf/${programName} + then ../../../assets/system/conf/${programName} + else null; + + programFiles = + if assetPath != null then builtins.readDir assetPath else {}; + + files = lib.genAttrs (builtins.attrNames programFiles) (name: { + src = "${assetPath}/${name}"; + }); + + # Top-level toggle for this module + enableProgram = config.enableZenBrowser or false; + + # Default user fallback + username = config.defaultUser or "henrov"; +in +{ + # --- Option --- + options.enableZenBrowser = lib.mkEnableOption "Install Zen Browser"; + + # --- Config --- + config = lib.mkIf enableProgram { + + # --- Deploy assets (if any) --- + environment.etc."${programName}".source = assetPath; + + # --- System packages --- + environment.systemPackages = [ pkgs.zen-browser ]; + + # --- Example systemd service to sync assets --- + systemd.services."${programName}-sync" = { + description = "Sync ${programName} configuration files"; + wantedBy = [ "multi-user.target" ]; + wants = [ "network-online.target" ]; + after = [ "network-online.target" ]; + + serviceConfig = { + Type = "oneshot"; + ExecStart = '' + set -euo pipefail + if [ -d "${assetPath}" ]; then + for f in ${lib.concatStringsSep " " (builtins.attrNames files)}; do + cp -u "${assetPath}/$f" "/home/${username}/.config/${programName}/$f" + done + fi + ''; + }; + + restartTriggers = [ assetPath ]; + path = []; + }; + }; +} diff --git a/Droidnix/generated/parked/desktop/fonts.nix b/Droidnix/generated/parked/desktop/fonts.nix new file mode 100644 index 000000000..e8b70eee9 --- /dev/null +++ b/Droidnix/generated/parked/desktop/fonts.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, config, ... }: + +{ + options.enableFonts = lib.mkEnableOption "Enable nerd fonts"; + + config = lib.mkIf (config.enableFonts or false) { + fonts.packages = with pkgs; [ + nerd-fonts.iosevka + nerd-fonts.fira-code + ]; + }; +} diff --git a/Droidnix/generated/parked/desktop/waybar.nix b/Droidnix/generated/parked/desktop/waybar.nix new file mode 100644 index 000000000..42cfb1c3b --- /dev/null +++ b/Droidnix/generated/parked/desktop/waybar.nix @@ -0,0 +1,45 @@ +{ lib, config, ... }: + +let + # --- Module variables --- + moduleName = "waybar"; + username = config.defaultUser or "henrov"; + + # Assets directory (self-contained) + assetPath = ../../../assets/system/conf/${moduleName}; + + # Read required config files + waybarConfig = "${assetPath}/waybar.conf"; + waybarStyle = "${assetPath}/style.css"; + + # Top-level toggle + enableProgram = config.enableWaybar or false; +in +{ + # --- Option --- + options.enableWaybar = + lib.mkEnableOption "Enable Waybar status bar"; + + # --- Config --- + config = lib.mkIf enableProgram { + + # Install Waybar (symbolic reference expected to be resolved elsewhere) + environment.systemPackages = [ + "waybar" + ]; + + # Deploy only required files to ~/.config/waybar + home-manager.users.${username}.xdg.configFile = { + + "waybar/config".source = + if builtins.pathExists waybarConfig + then waybarConfig + else null; + + "waybar/style.css".source = + if builtins.pathExists waybarStyle + then waybarStyle + else null; + }; + }; +} diff --git a/Droidnix/generated/parked/system/dbus.nix b/Droidnix/generated/parked/system/dbus.nix new file mode 100644 index 000000000..b39025a6b --- /dev/null +++ b/Droidnix/generated/parked/system/dbus.nix @@ -0,0 +1,13 @@ +{ config, pkgs, lib, ... }: +{ + services.dbus = lib.mkForce { + enable = true; # Force this to be true + }; + + # Configure dbus-broker via its configuration file + environment.etc."dbus-broker/launch.conf".text = '' + [General] + LogLevel=warning + MaxConnectionsPerUser=2048 + ''; +} diff --git a/Droidnix/generated/parked/system/networking.nix b/Droidnix/generated/parked/system/networking.nix new file mode 100644 index 000000000..3ed8c4511 --- /dev/null +++ b/Droidnix/generated/parked/system/networking.nix @@ -0,0 +1,41 @@ +{ lib, config, pkgs,... }: + +let + coreEnabled = config.mySystem.system.core.enable or false; +in +{ + options.mySystem.system.locale.enable = + lib.mkEnableOption "Network settings"; + + config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) { + + networking = { + useDHCP = lib.mkDefault true; + networkmanager.enable = true; + networkmanager.wifi.backend = "iwd"; + wireless.iwd.enable = true; + wireless.userControlled.enable = true; + firewall = { + enable = true; + # KDE Connect: discovery + encrypted connections + allowedTCPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; + allowedUDPPortRanges = [ + { + from = 1714; + to = 1764; + } + ]; + }; + }; + + # Install NetworkManager + environment.systemPackages = with pkgs; [ + networkmanager + ]; +}; +} diff --git a/Droidnix/generated/system/desktop/wayland.nix b/Droidnix/generated/system/desktop/wayland.nix new file mode 100644 index 000000000..52ffd5b10 --- /dev/null +++ b/Droidnix/generated/system/desktop/wayland.nix @@ -0,0 +1,22 @@ +{ lib, config, pkgs, inputs, ... }: + +let + username = config.defaultUser or "henrov"; + + # Wayland-specific packages + uwsmPkg = pkgs.uwsm or inputs.uwsm.packages.${pkgs.system}.default; +in +{ + # System packages + environment.systemPackages = [ uwsmPkg ]; + + # Enable Hyprland at system level + wayland.windowManager.hyprland.enable = true; + + # Home Manager user settings + _module.args.hmUsers = { + ${username} = { + home.packages = [ uwsmPkg ]; + }; + }; +} diff --git a/Droidnix/generated/template.nix b/Droidnix/generated/template.nix new file mode 100644 index 000000000..595f36e22 --- /dev/null +++ b/Droidnix/generated/template.nix @@ -0,0 +1,40 @@ +{ lib, config, pkgs, inputs, ... }: + +let + # Default username fallback + username = config.defaultUser or "henrov"; + + # Asset folder for configs + assetPath = ../../../assets//conf; + + # Main configuration file + mainConfig = "${assetPath}/"; + + # Determine the package: prefer Nixpkgs, fallback to -git, fallback to flake input + myPkg = + pkgs. or + pkgs.-git or + inputs..packages.${pkgs.system}.default; +in +{ + # Install system-wide + environment.systemPackages = [ myPkg ]; + + # Home Manager user settings + _module.args.hmUsers = { + ${username} = { + home.packages = [ myPkg ]; + + # Copy main config into user's home + home.file.".config//".source = mainConfig; + + # Optional module-specific settings + settings.general = { + # Example placeholder + "example.setting" = "value"; + }; + + # Optional: you can add more files dynamically from assetPath if needed + }; + }; +} diff --git a/Droidnix/generated/todo/desktop/gtk.nix b/Droidnix/generated/todo/desktop/gtk.nix new file mode 100644 index 000000000..fe8171681 --- /dev/null +++ b/Droidnix/generated/todo/desktop/gtk.nix @@ -0,0 +1,30 @@ +{ pkgs, user, ... }: +{ + environment.systemPackages = with pkgs; [ + gtk3 # GTK target + gtk4 # GTK target + ]; + # Stylix GTK target + stylix.targets.gtk.enable = true; + + home-manager.users.${user.username} = { + gtk = { + enable = true; + theme = { + name = "Catppuccin-Mocha-Standard-Blue-Dark"; + package = pkgs.magnetic-catppuccin-gtk; + }; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + }; + + }; +} diff --git a/Droidnix/generated/todo/system/bluetooth.nix b/Droidnix/generated/todo/system/bluetooth.nix new file mode 100644 index 000000000..b985e6742 --- /dev/null +++ b/Droidnix/generated/todo/system/bluetooth.nix @@ -0,0 +1,28 @@ +{ config, pkgs, ... }: +{ + # Enable Bluetooth hardware and daemon + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + packages = with pkgs; [ bluez ]; + }; + + # Enable Bluetooth audio support in PipeWire + services.pipewire = { + config.pulse = { + bluez5.enable = true; + }; + }; + + # Optional: Additional Bluetooth settings + hardware.bluetooth.extraConfig = '' + AutoEnable=true + DiscoverableTimeout=0 + PairableTimeout=0 + ''; + + # Install a graphical Bluetooth manager (optional) + environment.systemPackages = with pkgs; [ + blueman + ]; +} diff --git a/Droidnix/generated/todo/system/homebase.nix b/Droidnix/generated/todo/system/homebase.nix new file mode 100644 index 000000000..4c5ac5a86 --- /dev/null +++ b/Droidnix/generated/todo/system/homebase.nix @@ -0,0 +1,28 @@ +{ lib, config, ... }: + +let + coreEnabled = config.mySystem.system.core.enable or false; +in +{ + options.mySystem.system.locale.enable = + lib.mkEnableOption "Home-Manager settings"; + + config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) { + + # --- Home Manager Base --- + home-manager = { + backupFileExtension = "backup"; + + users.henrov = { + home.sessionVariables = { + TERMINAL = "kitty"; + EDITOR = "emacs"; + BROWSER = "zen"; + }; + + home.stateVersion = "26.05"; + }; + }; + + }; +} diff --git a/Droidnix/generated/todo/system/homebax.nix b/Droidnix/generated/todo/system/homebax.nix new file mode 100644 index 000000000..e26960407 --- /dev/null +++ b/Droidnix/generated/todo/system/homebax.nix @@ -0,0 +1,27 @@ +{ lib, config, ... }: + +let + coreEnabled = config.mySystem.system.core.enable or false; +in +{ + # Top-level option for this module + options.mySystem.system.locale.enable = + lib.mkEnableOption "Enable Nix & Flake specific settings"; + + # Top-level container for all custom program configs (your myPrograms idea) + options.myPrograms = lib.mkOption { + type = lib.types.attrsOf lib.types.any; + default = {}; + description = "Container for all custom program configurations"; + }; + + # Apply the configuration only if core or locale is enabled + config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) { + nix.settings = { + experimental-features = [ "nix-command" "flakes" ]; + download-buffer-size = 536870912; # 512 MB + cores = 2; + max-jobs = 1; + }; + }; +} diff --git a/Droidnix/generated/todo/system/login-tuigreeter.nix b/Droidnix/generated/todo/system/login-tuigreeter.nix new file mode 100644 index 000000000..f2b8d6ff6 --- /dev/null +++ b/Droidnix/generated/todo/system/login-tuigreeter.nix @@ -0,0 +1,14 @@ +{ pkgs, user, ... } : +{ +environment.systemPackages = with pkgs; [ +tuigreet +]; +services.greetd = { +enable = true; +settings = { + default_session = { + command = pkgs.lib.mkForce "${pkgs.tuigreet}/bin/tuigreet --remember --time --time-format '%I:%M %p | %a • %h | %F'"; + }; +}; +}; +} diff --git a/Droidnix/generated/todo/system/services.nix b/Droidnix/generated/todo/system/services.nix new file mode 100644 index 000000000..79688f4fc --- /dev/null +++ b/Droidnix/generated/todo/system/services.nix @@ -0,0 +1,23 @@ +{ lib, config, ... }: + +let + coreEnabled = config.mySystem.system.core.enable or false; +in +{ + options.mySystem.system.locale.enable = + lib.mkEnableOption "Services settings (printing / audio)"; + + config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) { + + # --- Services (Printing & Audio) --- + services.printing.enable = true; + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + }; +}