{ pkgs, ... }: { time.timeZone = "Europe/Paris"; programs.nixvim = { enable = true; viAlias = true; vimAlias = true; colorschemes.catppuccin.enable = true; highlight.ExtraWhitespace.bg = "red"; # Highlight extra white spaces performance = { byteCompileLua = { enable = true; nvimRuntime = true; configs = true; plugins = true; }; }; opts = { updatetime = 100; # Faster completion # Line numbers number = true; # Display the absolute line number of the current line hidden = true; # Keep closed buffer open in the background mouse = "a"; # Enable mouse control mousemodel = "extend"; # Mouse right-click extends the current selection splitbelow = true; # A new window is put below the current one splitright = true; # A new window is put right of the current one modeline = true; # Tags such as 'vim:ft=sh' modelines = 100; # Sets the type of modelines undofile = true; # Automatically save and restore undo history incsearch = true; # Incremental search: show match for partly typed search command ignorecase = true; # When the search query is lower-case, match both lower and upper-case patterns smartcase = true; # Override the 'ignorecase' option if the search pattern contains upper case characters cursorline = true; # Highlight the screen line of the cursor cursorcolumn = true; # Highlight the screen column of the cursor signcolumn = "yes"; # Whether to show the signcolumn laststatus = 3; # When to use a status line for the last window fileencoding = "utf-8"; # File-content encoding for the current buffer termguicolors = true; # Enables 24-bit RGB color in the |TUI| wrap = false; # Prevent text from wrapping # Tab options tabstop = 2; # Number of spaces a in the text stands for (local to buffer) shiftwidth = 2; # Number of spaces used for each step of (auto)indent (local to buffer) softtabstop = 0; # If non-zero, number of spaces to insert for a (local to buffer) expandtab = true; # Expand to spaces in Insert mode (local to buffer) autoindent = true; # Do clever autoindenting showmatch = true; # when closing a bracket, briefly flash the matching one matchtime = 1; # duration of that flashing n deci-seconds startofline = true; # motions like "G" also move to the first char report = 9001; # disable "x more/fewer lines" messages }; plugins = { lualine.enable = true; lsp = { enable = true; inlayHints = true; servers = { nixd.enable = true; ruff.enable = true; }; }; lspkind.enable = true; lsp-lines.enable = true; lsp-signature.enable = true; bufferline.enable = true; telescope.enable = true; which-key.enable = true; treesitter = { enable = true; settings = { highlight = { enable = true; additional_vim_regex_highlighting = true; }; indent = { enable = true; }; }; }; cmp = { enable = true; autoEnableSources = true; settings.sources = [ { name = "nvim_lsp"; } { name = "path"; } { name = "buffer"; } ]; }; }; }; environment.systemPackages = with pkgs; [ # Gestionnaires de version tig gitAndTools.hub quilt # Gestion de paquets nix-prefetch-scripts nox nix-index # Système smartmontools htop lshw usbutils # Réseau inetutils rclone lftp nfs-utils nmap # Divers fzf file ncdu yt-dlp tldr starship # Audio beets # Outils borgbackup binutils bat molly-guard nix-template lz4 # Développement openssl treefmt nixfmt-rfc-style ]; users.defaultUserShell = pkgs.zsh; programs = { tmux = { enable = true; clock24 = true; }; zsh = { enable = true; autosuggestions.enable = true; enableCompletion = true; syntaxHighlighting.enable = true; interactiveShellInit = '' source "$(${pkgs.fzf}/bin/fzf-share)/key-bindings.zsh" eval "$(starship init zsh)" ''; ohMyZsh = { enable = true; plugins = [ "git" "colored-man-pages" "command-not-found" "extract" "nix" ]; customPkgs = with pkgs; [ nix-zsh-completions ]; }; }; bash.interactiveShellInit = '' eval "$(starship init bash)" ''; git.enable = true; }; environment.variables = let starshipConfToml = pkgs.writeText "starship.toml" '' [[battery.display]] threshold = 50 ''; in { EDITOR = "nvim"; STARSHIP_CONFIG = "${starshipConfToml}"; }; nix.gc.automatic = true; nix.gc.options = "--delete-older-than 15d"; systemd.timers.nix-gc.timerConfig.Persistent = true; }