diff options
| author | seraphim <18ycm9tx@anonaddy.me> | 2026-07-30 12:48:20 +0700 |
|---|---|---|
| committer | seraphim <18ycm9tx@anonaddy.me> | 2026-07-30 12:48:20 +0700 |
| commit | 59226408d8bc950d7ec8c21623f28b5f7de8fce0 (patch) | |
| tree | 894884db76e33f9130f519e82ebfefd39ea70309 | |
| parent | 012d59987c8d78264f4a405ca595c50706e43b33 (diff) | |
Dendritic nixos update!
| -rw-r--r-- | doom/.config/doom/themes/noctalia-theme.el | 128 | ||||
| -rw-r--r-- | foot/.config/foot/foot.ini | 2 | ||||
| -rw-r--r-- | foot/.config/foot/themes/noctalia | 42 | ||||
| -rw-r--r-- | ghostty/.config/ghostty/themes/noctalia | 44 | ||||
| -rw-r--r-- | niri/.config/niri/noctalia.kdl | 24 | ||||
| -rw-r--r-- | nixos/configuration.nix | 453 | ||||
| -rw-r--r-- | nixos/docs/ADDING_PACKAGES.md | 133 | ||||
| -rw-r--r-- | nixos/modules/features/fonts/default.nix | 2 | ||||
| -rw-r--r-- | nixos/modules/features/terminals/default.nix | 2 | ||||
| -rw-r--r-- | nixos/modules/system/boot/default.nix | 14 |
10 files changed, 256 insertions, 588 deletions
diff --git a/doom/.config/doom/themes/noctalia-theme.el b/doom/.config/doom/themes/noctalia-theme.el index 99e6d3e..0db0f1b 100644 --- a/doom/.config/doom/themes/noctalia-theme.el +++ b/doom/.config/doom/themes/noctalia-theme.el @@ -21,75 +21,75 @@ (deftheme noctalia "Theme using Template variables with quality of life improvements.") ;; Define all the color variables (replaced by template processor) -(let* ((bg "#16130c") - (err "#ffb4ab") - (err-container "#93000a") - (on-background "#e9e2d5") - (on-err "#690005") - (on-err-container "#ffdad6") - (on-primary "#3c2f00") - (on-primary-container "#2a2000") - (on-secondary "#3b2f07") - (on-secondary-container "#c6b47f") - (on-surface "#e9e2d5") - (on-surface-variant "#cfc6b0") - (on-tertiary "#213600") - (on-tertiary-container "#162600") - (outline-color "#98907c") - (outline-variant "#4d4636") - (primary "#e6c34f") - (primary-container "#ac8e1b") - (secondary "#d8c58f") - (secondary-container "#53461b") +(let* ((bg "#fbf9f9") + (err "#ba1a1a") + (err-container "#ffdad6") + (on-background "#1b1c1c") + (on-err "#ffffff") + (on-err-container "#93000a") + (on-primary "#ffffff") + (on-primary-container "#7f8c93") + (on-secondary "#ffffff") + (on-secondary-container "#606568") + (on-surface "#1b1c1c") + (on-surface-variant "#43474a") + (on-tertiary "#ffffff") + (on-tertiary-container "#928594") + (outline-color "#73787a") + (outline-variant "#c3c7ca") + (primary "#030e13") + (primary-container "#18242a") + (secondary "#5a5f62") + (secondary-container "#dfe3e6") (shadow "#000000") - (surface "#16130c") - (surface-container "#221f17") - (surface-container-high "#2d2a21") - (surface-container-highest "#38342c") - (surface-container-low "#1e1b13") - (surface-container-lowest "#110e07") - (surface-variant "#4d4636") - (tertiary "#add374") - (tertiary-container "#789c44") + (surface "#fbf9f9") + (surface-container "#f0eded") + (surface-container-high "#eae7e8") + (surface-container-highest "#e4e2e2") + (surface-container-low "#f5f3f3") + (surface-container-lowest "#ffffff") + (surface-variant "#dfe3e6") + (tertiary "#110914") + (tertiary-container "#281f2b") ;; Map success colors to tertiary (as used in other templates) - (success "#add374") - (on-success "#213600") - (success-container "#789c44") - (on-success-container "#162600") + (success "#110914") + (on-success "#ffffff") + (success-container "#281f2b") + (on-success-container "#928594") ;; Map fixed colors to regular colors - (primary-fixed "#e6c34f") - (primary-fixed-dim "#ac8e1b") - (secondary-fixed "#d8c58f") - (secondary-fixed-dim "#53461b") - (tertiary-fixed "#add374") - (tertiary-fixed-dim "#789c44") - (on-primary-fixed "#3c2f00") - (on-primary-fixed-variant "#2a2000") - (on-secondary-fixed "#3b2f07") - (on-secondary-fixed-variant "#c6b47f") - (on-tertiary-fixed "#213600") - (on-tertiary-fixed-variant "#162600") + (primary-fixed "#030e13") + (primary-fixed-dim "#18242a") + (secondary-fixed "#5a5f62") + (secondary-fixed-dim "#dfe3e6") + (tertiary-fixed "#110914") + (tertiary-fixed-dim "#281f2b") + (on-primary-fixed "#ffffff") + (on-primary-fixed-variant "#7f8c93") + (on-secondary-fixed "#ffffff") + (on-secondary-fixed-variant "#606568") + (on-tertiary-fixed "#ffffff") + (on-tertiary-fixed-variant "#928594") ;; Map inverse colors to surface variants - (inverse-on-surface "#e9e2d5") - (inverse-primary "#e6c34f") - (inverse-surface "#16130c") + (inverse-on-surface "#1b1c1c") + (inverse-primary "#030e13") + (inverse-surface "#fbf9f9") ;; ANSI terminal colors - (term0 "#4d4636") - (term1 "#ffb4ab") - (term2 "#e6c34f") - (term3 "#d8c58f") - (term4 "#add374") - (term5 "#e6c34f") - (term6 "#d8c58f") - (term7 "#e9e2d5") - (term8 "#98907c") - (term9 "#ffb4ab") - (term10 "#e6c34f") - (term11 "#d8c58f") - (term12 "#add374") - (term13 "#e6c34f") - (term14 "#d8c58f") - (term15 "#e9e2d5")) + (term0 "#dfe3e6") + (term1 "#ba1a1a") + (term2 "#030e13") + (term3 "#5a5f62") + (term4 "#110914") + (term5 "#bbc8d0") + (term6 "#c3c7ca") + (term7 "#1b1c1c") + (term8 "#73787a") + (term9 "#ba1a1a") + (term10 "#030e13") + (term11 "#5a5f62") + (term12 "#110914") + (term13 "#bbc8d0") + (term14 "#c3c7ca") + (term15 "#1b1c1c")) (custom-theme-set-faces 'noctalia diff --git a/foot/.config/foot/foot.ini b/foot/.config/foot/foot.ini index 0a9398d..47dddc9 100644 --- a/foot/.config/foot/foot.ini +++ b/foot/.config/foot/foot.ini @@ -3,7 +3,7 @@ include=~/.config/foot/themes/noctalia # Dynamic theme colors [main] -font=JetBrainsMono Nerd Font:size=13 +font=JetBrainsMono Nerd Font:size=11 pad=2x0 # paste the rest of your theme colors here diff --git a/foot/.config/foot/themes/noctalia b/foot/.config/foot/themes/noctalia index 746cdb6..c614b31 100644 --- a/foot/.config/foot/themes/noctalia +++ b/foot/.config/foot/themes/noctalia @@ -1,22 +1,22 @@ [colors-dark] -foreground=e9e2d5 -background=16130c -regular0=4d4636 -regular1=ffb4ab -regular2=e6c34f -regular3=d8c58f -regular4=add374 -regular5=e6c34f -regular6=d8c58f -regular7=e9e2d5 -bright0=98907c -bright1=ffb4ab -bright2=e6c34f -bright3=d8c58f -bright4=add374 -bright5=e6c34f -bright6=d8c58f -bright7=e9e2d5 -selection-foreground=cfc6b0 -selection-background=4d4636 -cursor=16130c e9e2d5 +foreground=1b1c1c +background=fbf9f9 +regular0=dfe3e6 +regular1=ba1a1a +regular2=030e13 +regular3=5a5f62 +regular4=110914 +regular5=bbc8d0 +regular6=c3c7ca +regular7=1b1c1c +bright0=73787a +bright1=ba1a1a +bright2=030e13 +bright3=5a5f62 +bright4=110914 +bright5=bbc8d0 +bright6=c3c7ca +bright7=1b1c1c +selection-foreground=43474a +selection-background=dfe3e6 +cursor=fbf9f9 1b1c1c diff --git a/ghostty/.config/ghostty/themes/noctalia b/ghostty/.config/ghostty/themes/noctalia index aee539c..c52ee18 100644 --- a/ghostty/.config/ghostty/themes/noctalia +++ b/ghostty/.config/ghostty/themes/noctalia @@ -1,22 +1,22 @@ -palette = 0=#4d4636 -palette = 1=#ffb4ab -palette = 2=#e6c34f -palette = 3=#d8c58f -palette = 4=#add374 -palette = 5=#e6c34f -palette = 6=#d8c58f -palette = 7=#e9e2d5 -palette = 8=#98907c -palette = 9=#ffb4ab -palette = 10=#e6c34f -palette = 11=#d8c58f -palette = 12=#add374 -palette = 13=#e6c34f -palette = 14=#d8c58f -palette = 15=#e9e2d5 -background = #16130c -foreground = #e9e2d5 -cursor-color = #e9e2d5 -cursor-text = #16130c -selection-background = #4d4636 -selection-foreground = #cfc6b0 +palette = 0=#dfe3e6 +palette = 1=#ba1a1a +palette = 2=#030e13 +palette = 3=#5a5f62 +palette = 4=#110914 +palette = 5=#bbc8d0 +palette = 6=#c3c7ca +palette = 7=#1b1c1c +palette = 8=#73787a +palette = 9=#ba1a1a +palette = 10=#030e13 +palette = 11=#5a5f62 +palette = 12=#110914 +palette = 13=#bbc8d0 +palette = 14=#c3c7ca +palette = 15=#1b1c1c +background = #fbf9f9 +foreground = #1b1c1c +cursor-color = #1b1c1c +cursor-text = #fbf9f9 +selection-background = #dfe3e6 +selection-foreground = #43474a diff --git a/niri/.config/niri/noctalia.kdl b/niri/.config/niri/noctalia.kdl index 110bdab..9a72433 100644 --- a/niri/.config/niri/noctalia.kdl +++ b/niri/.config/niri/noctalia.kdl @@ -1,15 +1,15 @@ layout { focus-ring { - active-color "#e6c34f" - inactive-color "#16130c" - urgent-color "#ffb4ab" + active-color "#030e13" + inactive-color "#fbf9f9" + urgent-color "#ba1a1a" } border { - active-color "#e6c34f" - inactive-color "#16130c" - urgent-color "#ffb4ab" + active-color "#030e13" + inactive-color "#fbf9f9" + urgent-color "#ba1a1a" } shadow { @@ -17,19 +17,19 @@ layout { } tab-indicator { - active-color "#e6c34f" - inactive-color "#ac8e1b" - urgent-color "#ffb4ab" + active-color "#030e13" + inactive-color "#18242a" + urgent-color "#ba1a1a" } insert-hint { - color "#e6c34f80" + color "#030e1380" } } recent-windows { highlight { - active-color "#e6c34f" - urgent-color "#ffb4ab" + active-color "#030e13" + urgent-color "#ba1a1a" } } diff --git a/nixos/configuration.nix b/nixos/configuration.nix deleted file mode 100644 index 760c077..0000000 --- a/nixos/configuration.nix +++ /dev/null @@ -1,453 +0,0 @@ -{ config, pkgs, inputs, ... }: - -{ - # ========================================================================= - # IMPORTS & NIX CONFIGURATION - # ========================================================================= - imports = [ - ./hardware-configuration.nix - inputs.noctalia-greeter.nixosModules.default - ]; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nixpkgs.config.allowUnfree = true; - - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - - # Dynamic binary execution & FHS compatibility - programs.nix-ld.enable = true; - services.envfs.enable = true; - security.polkit.enable = true; - - # ========================================================================= - # BOOT & KERNEL CONFIGURATION - # ========================================================================= - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - -# boot.kernelParams = [ -# "drm.edid_firmware=DP-1:edid/mi_edid.bin" -# "video=DP-1:2560x1440@180" -# ]; - - # Custom EDID firmware loading for monitor - hardware.firmware = [ - (pkgs.runCommand "custom-edid" {} '' - mkdir -p $out/lib/firmware/edid - cp ${./mi_edid.bin} $out/lib/firmware/edid/mi_edid.bin - '') - ]; - - # ========================================================================= - # HARDWARE, FILESYSTEMS & GRAPHICS - # ========================================================================= - fileSystems."/mnt/giga" = { - device = "/dev/disk/by-uuid/bfed3a37-05e1-465b-a4b7-d74cd31bf937"; - fsType = "ext4"; - options = [ "defaults" "user" "rw" ]; - }; - - hardware.graphics = { - enable = true; - enable32Bit = true; - }; - - services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia = { - modesetting.enable = true; - powerManagement.enable = false; - open = false; - nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.latest; - }; - - # Appimage settings - programs.appimage = { - enable = true; - binfmt = true; - package = pkgs.appimage-run.override { - extraPkgs = pkgs: [ - pkgs.webkitgtk_4_1 - ]; - }; - }; - - # ========================================================================= - # NETWORKING, DNS & VPN - # ========================================================================= - networking.hostName = "opus"; - networking.networkmanager.enable = true; - programs.amnezia-vpn.enable = true; - # Primary DNS Server: Mullvad DoT (Base Mode) - networking.nameservers = [ - "194.242.2.4#base.dns.mullvad.net" - "194.242.2.2#dns.mullvad.net" - ]; - - # systemd-resolved Configuration (Mullvad Base Primary -> Quad9 Fallback) - services.resolved = { - enable = true; - dnsovertls = "opportunistic"; # Encrypts DNS via DoT, falls back if port 853 is blocked - dnssec = "false"; # Disables DNSSEC validation drops - domains = [ "~." ]; # Forces systemd-resolved to use global DNS, ignoring DHCP DNS - fallbackDns = [ - "9.9.9.9#dns.quad9.net" - "149.112.112.112#dns.quad9.net" - ]; - }; - - - # Avahi (Printer / Network Discovery) - services.avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - }; - - # ========================================================================= - # LOCALIZATION & TIMEZONE - # ========================================================================= - time.timeZone = "Etc/GMT-7"; - i18n.defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - - # ========================================================================= - # USER ACCOUNTS & PRIVILEGES - # ========================================================================= - users.users."seraphim" = { - isNormalUser = true; - description = "seraphim"; - shell = pkgs.fish; # Sets Fish as your default user shell - extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; []; - }; - - security.doas = { - enable = true; - extraRules = [ - { - users = [ "seraphim" ]; - keepEnv = true; - persist = true; - } - ]; - }; - - # ========================================================================= - # SHELLS & ENHANCEMENTS - # ========================================================================= - programs.fish = { - enable = true; - interactiveShellInit = '' - set -g fish_greeting "" # Disables the welcome message - fzf --fish | - source - ''; - shellAliases = { - ls = "eza -al --icons=auto"; - ll = "eza -al --icons=auto"; - }; - }; - - programs.starship.enable = true; - - # ========================================================================= - # DISPLAY, WAYLAND & DESKTOP ENVIRONMENT - # ========================================================================= - programs.niri.enable = true; - programs.noctalia-greeter = { - enable = true; - settings = { - cursor = { - theme = "Bibata-Modern-Ice"; - size = 24; - path = "${pkgs.bibata-cursors}/share/icons"; - }; - }; - }; - - qt = { - enable = true; - platformTheme = "qt5ct"; - style = "breeze"; - }; - - xdg.portal = { - enable = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gnome - pkgs.xdg-desktop-portal-gtk - ]; - }; - - # Environment Variables - environment.variables = { - SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt"; - NIX_SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt"; - }; - - environment.sessionVariables = { - SHELL = "${pkgs.fish}/bin/fish"; - LIBVA_DRIVER_NAME = "nvidia"; - XCURSOR_THEME = "Bibata-Modern-Ice"; - XCURSOR_SIZE = "20"; - __GLX_VENDOR_LIBRARY_NAME = "nvidia"; - NIXOS_OZONE_WL = "1"; - CC = "clang"; - ELECTRON_OZONE_PLATFORM_HINT = "auto"; - GSK_RENDERER = "ngl"; - QT_QPA_PLATFORM = "wayland;xcb"; - QT_ENABLE_HIGHDPI_SCALING = "1"; - QT_AUTO_SCREEN_SCALE_FACTOR = "1"; - QT_SCREEN_SCALE_FACTORS = "1.5"; - }; - - # Fonts Configuration - fonts.fontconfig.enable = true; - fonts.packages = with pkgs; [ - font-awesome - nerd-fonts.jetbrains-mono - nerd-fonts.symbols-only - jetbrains-mono - noto-fonts-color-emoji - ]; - - # ========================================================================= - # AUDIO & SERVICES - # ========================================================================= - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - # printer service - services.printing = { - enable = true; - drivers = with pkgs; [ - brlaser - cups-filters - gutenprint - ]; - }; - - # MPD Music Server - services.mpd = { - enable = true; - user = "seraphim"; - openFirewall = false; - settings = { - music_directory = "/mnt/giga/music"; - bind_to_address = "any"; - port = 6600; - auto_update = "yes"; - audio_output = [ - { - type = "pulse"; - name = "PipeWire Output"; - mixer_type = "hardware"; - } - ]; - }; - }; - - systemd.services.mpd.environment = { - XDG_RUNTIME_DIR = "/run/user/1000"; - }; - - # System Utilities & Gaming - services.gvfs.enable = true; - services.tumbler.enable = true; - services.gnome.gnome-keyring.enable = true; - programs.dconf.enable = true; - - services.journald.extraConfig = '' - SystemMaxUse=50M - MaxRetentionSec=1month - ''; - - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - }; - - programs.throne = { - enable = true; - tunMode.enable = true; - }; - - # ========================================================================= - # USER SERVICES - # ========================================================================= - systemd.user.services.swingmusic = { - description = "Swing Music Local Server"; - wantedBy = [ "graphical-session.target" ]; - after = [ "graphical-session.target" ]; - serviceConfig = { - ExecStart = "/home/seraphim/.swingmusic/swingmusic"; - Restart = "on-failure"; - WorkingDirectory = "/home/seraphim"; - NoNewPrivileges = true; - PrivateTmp = true; - ProtectSystem = "strict"; - ProtectHome = "false"; - RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ]; - }; - }; - - systemd.user.services.mpd-mpris = { - description = "MPD MPRIS Service for Waybar"; - wantedBy = [ "default.target" ]; - after = [ "graphical-session.target" ]; - serviceConfig = { - ExecStart = "${pkgs.mpd-mpris}/bin/mpd-mpris -network tcp -host 127.0.0.1 -port 6600"; - Restart = "on-failure"; - }; - }; - - systemd.user.services.niri.enableDefaultPath = false; - - # ========================================================================= - # SYSTEM PACKAGES - # ========================================================================= - environment.systemPackages = with pkgs; - [ - # Flake Inputs & Hardware Overrides - inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default - (btop.override { cudaSupport = true; }) - - # Terminals & CLI Utilities - cacert - tree - pkgs.libsixel - libGL - nss - cups - libdrm - glib - pango - gtk3 - zlib - expat - alsa-lib - libxkbcommon - atk - pkg-config - cmake - - nftables - pkgs.rsync - duf - eza - fastfetch - fd - foot - fzf - ghfetch - ghostty - hyfetch - stow - util-linux - pkgs.vimPlugins.im-select-nvim - - # Audio & Music Controls - brightnessctl - mpc - mpd - mpd-mpris - mpv - pamixer - pavucontrol - playerctl - rmpc - - # Text Editors - micro - neovim - (emacs.override { - withNativeCompilation = true; - }) - - # File Managers & Archiving - file-roller - kdePackages.ark - kdePackages.qt6ct - loupe - nautilus - sushi - yazi - - # Utilities & Disk Tools - caligula - cryptsetup - yt-dlp - - # GStreamer Codecs - gst_all_1.gst-plugins-bad - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - gst_all_1.gst-plugins-ugly - - # Wayland, Desktop UI & Utilities - adwaita-icon-theme - bibata-cursors - cliphist - fuzzel - grim - hicolor-icon-theme - hyprpolkitagent - noctalia-shell - slurp - wl-clipboard - wtype - xwayland-satellite - - # Desktop Applications & Office - claude-code - keepassxc - libreoffice - hunspellDicts.ru_RU - nvidia-vaapi-driver - opencode - pkgs.ayugram-desktop - pkgs.legcord - pkgs.amnezia-vpn - obsidian - pkgs.lutris - pkgs.qbittorrent - pkgs.prismlauncher - pkgs.wireshark - # Software Development & Toolchains - black - cargo - clang - clippy - gcc - git - gnumake - nodejs - pyright - python3 - rust-analyzer - rustc - tree-sitter - ]; - - system.stateVersion = "26.05"; -} diff --git a/nixos/docs/ADDING_PACKAGES.md b/nixos/docs/ADDING_PACKAGES.md new file mode 100644 index 0000000..a4c0c5a --- /dev/null +++ b/nixos/docs/ADDING_PACKAGES.md @@ -0,0 +1,133 @@ +# Adding Packages + +This configuration is composed from `hosts/opus/default.nix` and focused modules +under `modules/system/` and `modules/features/`. There is no central package list. + +## Where a package belongs + +| Package type | Module | +| --- | --- | +| Terminal | `modules/features/terminals/default.nix` | +| CLI tool | `modules/features/cli-tools/default.nix` | +| Editor or IDE | `modules/features/editors/default.nix` | +| Desktop application | `modules/features/desktop-apps/default.nix` | +| Compiler, linter, language tool | `modules/features/dev-tools/default.nix` | +| File manager or archive tool | `modules/features/file-managers/default.nix` | +| Wayland clipboard, screenshot, or input tool | `modules/features/wayland-tools/default.nix` | +| Audio application | `modules/features/audio-tools/default.nix` | +| System monitor or fetch tool | `modules/features/monitoring/default.nix` | +| Font | `modules/features/fonts/default.nix` | +| GStreamer plugin | `modules/features/gst-codecs/default.nix` | +| Runtime library for external binaries | `modules/features/binary-compat/default.nix` | + +First use an existing category. Create a new feature module only if the package is +its own service, subsystem, or a group of related packages without a fitting category. + +## Add to an existing module + +Add the package to that module's `environment.systemPackages` list: + +```nix +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + existing-package + ripgrep + ]; +} +``` + +Most modules use `with pkgs;`, so use unqualified package names. Use `pkgs.<name>` +when an explicit path is useful, such as `pkgs.vimPlugins.im-select-nvim`, or when +applying an override: + +```nix +(emacs.override { withNativeCompilation = true; }) +``` + +Keep related packages together and follow the local ordering of the file. + +## Fonts are different + +Fonts belong in `modules/features/fonts/default.nix` under `fonts.packages`, not +`environment.systemPackages`: + +```nix +fonts.packages = with pkgs; [ + nerd-fonts.jetbrains-mono + noto-fonts-color-emoji +]; +``` + +## Create a new feature module + +1. Create `modules/features/<category>/default.nix`: + + ```nix + { pkgs, ... }: + + { + environment.systemPackages = with pkgs; [ + package-name + ]; + } + ``` + +2. Add its directory to the `imports` list in `hosts/opus/default.nix`: + + ```nix + ../../modules/features/<category> + ``` + +3. Put services and program options in the same module when they belong to that + feature, as done by `modules/features/mpd/default.nix`. + +## Host-only packages + +For a package that is truly specific to this desktop, add it to the small +`environment.systemPackages` list in `hosts/opus/default.nix`. Gaming is the current +example. If that list starts to represent a reusable category, extract a feature module. + +## Packages from flake inputs + +Packages provided by a flake input use `inputs` and the host platform, following +`modules/features/desktop-apps/default.nix`: + +```nix +{ pkgs, inputs, ... }: + +{ + environment.systemPackages = with pkgs; [ + inputs.helium-browser.packages.${pkgs.stdenv.hostPlatform.system}.helium + ]; +} +``` + +If an input provides a NixOS module, import it in the feature module, following +`modules/features/noctalia-greeter/default.nix`: + +```nix +imports = [ + inputs.some-input.nixosModules.default +]; +``` + +The input itself must first be declared in `flake.nix`. + +## Build and switch + +From the `nixos/` directory, first test that the configuration evaluates and builds: + +```bash +doas nixos-rebuild build --flake .#opus +``` + +Then activate it: + +```bash +doas nixos-rebuild switch --flake .#opus +``` + +If a terminal's font icons do not update after adding fonts, restart the terminal or +log out and back in after the switch. diff --git a/nixos/modules/features/fonts/default.nix b/nixos/modules/features/fonts/default.nix index 8ac4785..cecdd8f 100644 --- a/nixos/modules/features/fonts/default.nix +++ b/nixos/modules/features/fonts/default.nix @@ -3,7 +3,7 @@ { fonts.fontconfig.enable = true; - environment.systemPackages = with pkgs; [ + fonts.packages = with pkgs; [ font-awesome nerd-fonts.jetbrains-mono nerd-fonts.symbols-only diff --git a/nixos/modules/features/terminals/default.nix b/nixos/modules/features/terminals/default.nix index 22c5662..a290b42 100644 --- a/nixos/modules/features/terminals/default.nix +++ b/nixos/modules/features/terminals/default.nix @@ -5,4 +5,4 @@ foot ghostty ]; -}
\ No newline at end of file +} diff --git a/nixos/modules/system/boot/default.nix b/nixos/modules/system/boot/default.nix index eedf939..df64426 100644 --- a/nixos/modules/system/boot/default.nix +++ b/nixos/modules/system/boot/default.nix @@ -1,18 +1,9 @@ -{ config, pkgs, lib, modulesPath, ... }: +{ pkgs, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - # EDID firmware loading is kept here because it's a kernel-level boot concern. # Commented kernel params from the original config are preserved. # boot.kernelParams = [ @@ -25,7 +16,4 @@ cp ${../../../mi_edid.bin} $out/lib/firmware/edid/mi_edid.bin '') ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }
\ No newline at end of file |
