initial config
This commit is contained in:
13
modules/system/boot.nix
Normal file
13
modules/system/boot.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
# ==========================================
|
||||
# BOOT CONFIGURATION
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Use the latest kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
}
|
||||
77
modules/system/desktop.nix
Normal file
77
modules/system/desktop.nix
Normal file
@@ -0,0 +1,77 @@
|
||||
# ==========================================
|
||||
# DESKTOP ENVIRONMENT — Hyprland + Waybar + Walker
|
||||
# ==========================================
|
||||
# Omarchy-inspired: keyboard-first tiling Wayland compositor
|
||||
# with a clean status bar and fast application launcher.
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Hyprland compositor
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
# greetd + tuigreet (minimal TUI login — no bloated DMs)
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --cmd Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Disable other display managers
|
||||
services.xserver.enable = false;
|
||||
|
||||
# Polkit for privilege escalation prompts
|
||||
security.polkit.enable = true;
|
||||
|
||||
# GNOME Keyring for secrets/passwords
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||
|
||||
# Screen locking
|
||||
programs.hyprlock.enable = true;
|
||||
|
||||
# Idle management
|
||||
services.hypridle.enable = true;
|
||||
|
||||
# XDG Desktop Portal (screen sharing, file pickers)
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
# Keyboard — caps lock as escape (omarchy default)
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
options = "caps:escape";
|
||||
};
|
||||
|
||||
# Desktop packages available system-wide
|
||||
environment.systemPackages = with pkgs; [
|
||||
waybar # Status bar
|
||||
walker # Application launcher
|
||||
mako # Notification daemon
|
||||
wl-clipboard # Wayland clipboard
|
||||
cliphist # Clipboard history
|
||||
brightnessctl # Backlight control
|
||||
playerctl # Media key control
|
||||
swayosd # On-screen display for volume/brightness
|
||||
grim # Screenshot
|
||||
slurp # Region selection
|
||||
swappy # Screenshot editor
|
||||
wdisplays # Display configurator
|
||||
networkmanagerapplet # Tray network widget
|
||||
blueman # Bluetooth manager
|
||||
polkit_gnome # Polkit GUI agent
|
||||
];
|
||||
}
|
||||
13
modules/system/firewall.nix
Normal file
13
modules/system/firewall.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
# ==========================================
|
||||
# FIREWALL CONFIGURATION
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# UFW-style firewall — deny all inbound by default
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ ];
|
||||
allowedUDPPorts = [ ];
|
||||
};
|
||||
}
|
||||
24
modules/system/fonts.nix
Normal file
24
modules/system/fonts.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
# ==========================================
|
||||
# FONTS CONFIGURATION
|
||||
# ==========================================
|
||||
# Omarchy default: JetBrainsMono Nerd Font
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts._0xproto
|
||||
nerd-fonts.droid-sans-mono
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
];
|
||||
|
||||
fonts.fontconfig.defaultFonts = {
|
||||
monospace = [ "JetBrainsMono Nerd Font" "FiraCode Nerd Font" ];
|
||||
sansSerif = [ "Noto Sans" ];
|
||||
serif = [ "Noto Serif" ];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
}
|
||||
34
modules/system/hardware.nix
Normal file
34
modules/system/hardware.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
# ==========================================
|
||||
# HARDWARE & AUDIO CONFIGURATION
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
# Audio — PipeWire (replaces PulseAudio)
|
||||
security.rtkit.enable = true;
|
||||
services.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
# GPU — uncomment the section for your hardware:
|
||||
|
||||
# --- NVIDIA ---
|
||||
# hardware.nvidia.modesetting.enable = true;
|
||||
# services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
# --- AMD ---
|
||||
# hardware.amdgpu.enable = true;
|
||||
|
||||
# --- Intel (12th Gen i7-12700H) ---
|
||||
hardware.graphics.enable = true;
|
||||
}
|
||||
27
modules/system/network.nix
Normal file
27
modules/system/network.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
# ==========================================
|
||||
# NETWORKING & TIME CONFIGURATION
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Disable wait-online to speed up boot
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
# Set your timezone
|
||||
time.timeZone = "Europe/Riga";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "lv_LV.UTF-8";
|
||||
LC_IDENTIFICATION = "lv_LV.UTF-8";
|
||||
LC_MEASUREMENT = "lv_LV.UTF-8";
|
||||
LC_MONETARY = "lv_LV.UTF-8";
|
||||
LC_NAME = "lv_LV.UTF-8";
|
||||
LC_NUMERIC = "lv_LV.UTF-8";
|
||||
LC_PAPER = "lv_LV.UTF-8";
|
||||
LC_TELEPHONE = "lv_LV.UTF-8";
|
||||
LC_TIME = "lv_LV.UTF-8";
|
||||
};
|
||||
}
|
||||
23
modules/system/nix.nix
Normal file
23
modules/system/nix.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
# ==========================================
|
||||
# NIX CONFIGURATION
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
max-jobs = "auto";
|
||||
cores = 0;
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
32
modules/system/services.nix
Normal file
32
modules/system/services.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
# ==========================================
|
||||
# SYSTEM SERVICES CONFIGURATION
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Zsh at system level (config lives in home-manager)
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# Docker
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
flags = [ "--all" "--volumes" ];
|
||||
};
|
||||
};
|
||||
|
||||
# nix-ld — run unpatched binaries (Cursor, Codex, etc.)
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
stdenv.cc.cc
|
||||
zlib
|
||||
fuse3
|
||||
icu
|
||||
nss
|
||||
openssl
|
||||
curl
|
||||
expat
|
||||
];
|
||||
}
|
||||
21
modules/system/user.nix
Normal file
21
modules/system/user.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
# ==========================================
|
||||
# USER CONFIGURATION
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.matiss = {
|
||||
isNormalUser = true;
|
||||
description = "Matiss";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "video" "render" "input" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# Core system packages (available to all users)
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
wget
|
||||
curl
|
||||
];
|
||||
}
|
||||
14
modules/system/vpn.nix
Normal file
14
modules/system/vpn.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
# ==========================================
|
||||
# VPN CONFIGURATION — Tailscale
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "client";
|
||||
};
|
||||
|
||||
# Loose rpfilter for Tailscale subnet routing
|
||||
networking.firewall.checkReversePath = "loose";
|
||||
}
|
||||
30
modules/user/applications.nix
Normal file
30
modules/user/applications.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
# ==========================================
|
||||
# APPLICATIONS CONFIGURATION
|
||||
# ==========================================
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# XDG default applications
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"text/html" = "Alacritty.desktop";
|
||||
"x-scheme-handler/http" = "Alacritty.desktop"; # Override with your browser .desktop
|
||||
"x-scheme-handler/https" = "Alacritty.desktop";
|
||||
"text/plain" = "nvim.desktop";
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
BROWSER = "firefox"; # Placeholder — change to helium if installed
|
||||
TERMINAL = "alacritty";
|
||||
|
||||
# Wayland-native rendering for Electron apps
|
||||
NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Fix Java Swing apps on Wayland
|
||||
_JAVA_AWT_WM_NONREPARENTING = "1";
|
||||
};
|
||||
}
|
||||
19
modules/user/dotfiles.nix
Normal file
19
modules/user/dotfiles.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
# ==========================================
|
||||
# DOTFILES — Symlink config files
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Hyprland configuration
|
||||
xdg.configFile."hypr/hyprland.conf".source = ../../config/hypr/hyprland.conf;
|
||||
|
||||
# Waybar
|
||||
xdg.configFile."waybar/config.jsonc".source = ../../config/waybar/config.jsonc;
|
||||
xdg.configFile."waybar/style.css".source = ../../config/waybar/style.css;
|
||||
|
||||
# Walker launcher
|
||||
xdg.configFile."walker/config.toml".source = ../../config/walker/config.toml;
|
||||
|
||||
# Alacritty terminal
|
||||
xdg.configFile."alacritty/alacritty.toml".source = ../../config/alacritty/alacritty.toml;
|
||||
}
|
||||
39
modules/user/git.nix
Normal file
39
modules/user/git.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
# ==========================================
|
||||
# GIT CONFIGURATION
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "Matiss"; # CHANGE ME
|
||||
email = "your-email@users.noreply.github.com"; # CHANGE ME
|
||||
};
|
||||
|
||||
# SSH for GitHub by default
|
||||
url."git@github.com:".insteadOf = "https://github.com/";
|
||||
|
||||
init.defaultBranch = "main";
|
||||
diff.algorithm = "histogram";
|
||||
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
default = "current";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# SSH — GitHub key
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks."github.com" = {
|
||||
identityFile = "/home/matiss/.ssh/id_ed25519"; # CHANGE ME to your key path
|
||||
identitiesOnly = true;
|
||||
};
|
||||
matchBlocks."*" = {
|
||||
setEnv.TERM = "xterm-256color";
|
||||
};
|
||||
};
|
||||
}
|
||||
131
modules/user/neovim.nix
Normal file
131
modules/user/neovim.nix
Normal file
@@ -0,0 +1,131 @@
|
||||
# ==========================================
|
||||
# NEOVIM CONFIGURATION (via Nixvim)
|
||||
# ==========================================
|
||||
# Gruvbox theme, LSP, Treesitter, Telescope, file tree.
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
shiftwidth = 2;
|
||||
tabstop = 2;
|
||||
expandtab = true;
|
||||
smartindent = true;
|
||||
wrap = false;
|
||||
swapfile = false;
|
||||
backup = false;
|
||||
undofile = true;
|
||||
hlsearch = false;
|
||||
incsearch = true;
|
||||
termguicolors = true;
|
||||
scrolloff = 8;
|
||||
signcolumn = "yes";
|
||||
updatetime = 50;
|
||||
clipboard = "unnamedplus";
|
||||
};
|
||||
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
|
||||
# Gruvbox colorscheme — matches omarchy aesthetic
|
||||
colorschemes.gruvbox = {
|
||||
enable = true;
|
||||
settings = {
|
||||
contrast_dark = "hard";
|
||||
transparent_mode = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Treesitter (syntax highlighting)
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
settings.highlight.enable = true;
|
||||
settings.indent.enable = true;
|
||||
};
|
||||
|
||||
# Telescope (fuzzy finder)
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"<leader>ff" = { action = "find_files"; options.desc = "Find files"; };
|
||||
"<leader>fg" = { action = "live_grep"; options.desc = "Live grep"; };
|
||||
"<leader>fb" = { action = "buffers"; options.desc = "Buffers"; };
|
||||
"<leader>fh" = { action = "help_tags"; options.desc = "Help tags"; };
|
||||
"<leader>fr" = { action = "oldfiles"; options.desc = "Recent files"; };
|
||||
};
|
||||
};
|
||||
|
||||
# Neo-tree (file tree)
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# LSP
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
nil_ls.enable = true; # Nix
|
||||
pyright.enable = true; # Python
|
||||
ts_ls.enable = true; # TypeScript/JavaScript
|
||||
bashls.enable = true; # Bash
|
||||
jsonls.enable = true; # JSON
|
||||
yamlls.enable = true; # YAML
|
||||
html.enable = true; # HTML
|
||||
cssls.enable = true; # CSS
|
||||
};
|
||||
};
|
||||
|
||||
# Autocompletion
|
||||
plugins.cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
mapping = {
|
||||
"<C-n>" = "cmp.mapping.select_next_item()";
|
||||
"<C-p>" = "cmp.mapping.select_prev_item()";
|
||||
"<C-y>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Status line
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
settings.options.theme = "gruvbox";
|
||||
};
|
||||
|
||||
# Autopairs
|
||||
plugins.nvim-autopairs.enable = true;
|
||||
|
||||
# Git signs in the gutter
|
||||
plugins.gitsigns.enable = true;
|
||||
|
||||
# Which-key (show keybindings)
|
||||
plugins.which-key.enable = true;
|
||||
|
||||
# Keymaps
|
||||
keymaps = [
|
||||
{ key = "<leader>e"; action = "<cmd>Neotree toggle<CR>"; options.desc = "Toggle file tree"; }
|
||||
{ key = "<leader>w"; action = "<cmd>w<CR>"; options.desc = "Save"; }
|
||||
{ key = "<leader>q"; action = "<cmd>q<CR>"; options.desc = "Quit"; }
|
||||
# Window navigation
|
||||
{ key = "<C-h>"; action = "<C-w>h"; options.desc = "Move left"; }
|
||||
{ key = "<C-j>"; action = "<C-w>j"; options.desc = "Move down"; }
|
||||
{ key = "<C-k>"; action = "<C-w>k"; options.desc = "Move up"; }
|
||||
{ key = "<C-l>"; action = "<C-w>l"; options.desc = "Move right"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
90
modules/user/packages.nix
Normal file
90
modules/user/packages.nix
Normal file
@@ -0,0 +1,90 @@
|
||||
# ==========================================
|
||||
# PACKAGES — User Applications
|
||||
# ==========================================
|
||||
# Spec: Codex, Claude Code, Gemini CLI, Helium, Cursor,
|
||||
# Antigravity, Lazydocker, Git, Gh, Alacritty,
|
||||
# Zoxide, Fzf, Bat, Eza, Fd, Impala, Bun, Nodejs,
|
||||
# Docker, Bitwarden, Beeper, Python, Spotify, Tailscale
|
||||
# ==========================================
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# ── AI Coding Tools ──────────────────────────────────
|
||||
unstable.claude-code # Claude Code CLI
|
||||
unstable.antigravity # Antigravity IDE
|
||||
# codex: install via `npm i -g @openai/codex` (not in nixpkgs)
|
||||
# gemini-cli: install via `npm i -g @google/gemini-cli` (not in nixpkgs)
|
||||
|
||||
# ── Terminals & Editors ──────────────────────────────
|
||||
alacritty # GPU-accelerated terminal
|
||||
code-cursor # Cursor IDE
|
||||
|
||||
# ── Browsers ─────────────────────────────────────────
|
||||
# Helium: add inputs.helium-browser flake package here
|
||||
# if the flake builds for your system, uncomment:
|
||||
# inputs.helium-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
|
||||
# ── CLI Essentials (omarchy-style) ───────────────────
|
||||
bat # cat with syntax highlighting
|
||||
eza # modern ls
|
||||
fd # modern find
|
||||
fzf # fuzzy finder
|
||||
zoxide # smart cd
|
||||
ripgrep # fast grep
|
||||
lazydocker # Docker TUI
|
||||
impala # TUI WiFi manager
|
||||
yazi # TUI file manager
|
||||
btop # system monitor
|
||||
fastfetch # system info
|
||||
tealdeer # tldr man pages
|
||||
|
||||
# ── Version Control ──────────────────────────────────
|
||||
git
|
||||
gh # GitHub CLI
|
||||
lazygit # Git TUI
|
||||
|
||||
# ── Development Runtimes ─────────────────────────────
|
||||
nodejs
|
||||
bun
|
||||
python3
|
||||
uv # fast Python package manager
|
||||
|
||||
# ── Containers ───────────────────────────────────────
|
||||
docker-compose
|
||||
|
||||
# ── Desktop Apps ─────────────────────────────────────
|
||||
bitwarden # password manager
|
||||
beeper # unified messaging
|
||||
spotify # music
|
||||
|
||||
# ── System Utilities ─────────────────────────────────
|
||||
wget
|
||||
curl
|
||||
unzip
|
||||
wl-clipboard
|
||||
cliphist
|
||||
wl-clip-persist
|
||||
|
||||
# ── Theming Dependencies ─────────────────────────────
|
||||
gnome-themes-extra
|
||||
adwaita-qt
|
||||
adwaita-qt6
|
||||
dconf
|
||||
];
|
||||
|
||||
# ── Post-activation: Install npm-only tools ────────────
|
||||
# Codex and Gemini CLI aren't in nixpkgs; install them
|
||||
# globally via npm after first `nixos-rebuild switch`.
|
||||
home.activation.installNpmTools = config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||
export PATH="${pkgs.nodejs}/bin:$PATH"
|
||||
if ! command -v codex &> /dev/null; then
|
||||
echo "Installing @openai/codex via npm..."
|
||||
${pkgs.nodejs}/bin/npm i -g @openai/codex 2>/dev/null || true
|
||||
fi
|
||||
if ! command -v gemini &> /dev/null; then
|
||||
echo "Installing @google/gemini-cli via npm..."
|
||||
${pkgs.nodejs}/bin/npm i -g @google/gemini-cli 2>/dev/null || true
|
||||
fi
|
||||
'';
|
||||
}
|
||||
80
modules/user/shell.nix
Normal file
80
modules/user/shell.nix
Normal file
@@ -0,0 +1,80 @@
|
||||
# ==========================================
|
||||
# SHELL CONFIGURATION (Zsh)
|
||||
# ==========================================
|
||||
# Omarchy-style: Oh-My-Zsh + modern CLI replacements
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Atuin — searchable shell history
|
||||
programs.atuin = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
auto_sync = false;
|
||||
search_mode = "fuzzy";
|
||||
};
|
||||
};
|
||||
|
||||
# Zsh
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
# Rebuild shortcuts
|
||||
upd = "cd ~/nixos-config && sudo nixos-rebuild switch --flake . && echo 'Done!'";
|
||||
upd-test = "cd ~/nixos-config && sudo nixos-rebuild test --flake .";
|
||||
upd-build = "cd ~/nixos-config && nixos-rebuild dry-build --flake .";
|
||||
|
||||
# Modern replacements
|
||||
ls = "eza --icons";
|
||||
ll = "eza -la --icons";
|
||||
lt = "eza -la --icons --tree --level=2";
|
||||
cat = "bat --style=plain";
|
||||
find = "fd";
|
||||
|
||||
# Clipboard (Wayland)
|
||||
pbcopy = "wl-copy";
|
||||
pbpaste = "wl-paste";
|
||||
|
||||
# Docker
|
||||
lzd = "lazydocker";
|
||||
|
||||
# Git
|
||||
lg = "lazygit";
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "gnzh";
|
||||
plugins = [
|
||||
"git"
|
||||
"docker"
|
||||
"docker-compose"
|
||||
"eza"
|
||||
"zoxide"
|
||||
"colored-man-pages"
|
||||
"fzf"
|
||||
];
|
||||
};
|
||||
|
||||
initContent = ''
|
||||
# Force Atuin up-arrow binding
|
||||
bindkey '^[[A' atuin-up-search
|
||||
bindkey '^[OA' atuin-up-search
|
||||
|
||||
# Yazi wrapper — cd on exit
|
||||
function y() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||
yazi "$@" --cwd-file="$tmp"
|
||||
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||
builtin cd -- "$cwd"
|
||||
fi
|
||||
rm -f -- "$tmp"
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
34
modules/user/theming.nix
Normal file
34
modules/user/theming.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
# ==========================================
|
||||
# THEMING CONFIGURATION — Gruvbox Dark
|
||||
# ==========================================
|
||||
# Omarchy philosophy: one theme, consistently applied
|
||||
# across all applications and UI components.
|
||||
# ==========================================
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# GTK Dark Mode
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
|
||||
# Qt Dark Mode
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita-dark";
|
||||
};
|
||||
|
||||
# Dark mode preference for GNOME/GTK apps
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user