From fd7d8612115560e9119b9d068900ffe777f19e4a Mon Sep 17 00:00:00 2001 From: asnev Date: Sat, 4 Jul 2026 13:44:53 +0700 Subject: [PATCH] dotfiles --- README.md | 7 +- configuration.nix | 28 +-- profiles/kde.nix | 12 +- users/coyote/default.nix | 13 +- users/coyote/dotfiles/fastfetch.jsonc | 87 +++++++++ users/coyote/dotfiles/helix-languages.toml | 6 + users/coyote/dotfiles/helix.toml | 21 ++ users/coyote/dotfiles/vimrc | 57 ++++++ users/coyote/home.nix | 217 ++------------------- 9 files changed, 203 insertions(+), 245 deletions(-) create mode 100644 users/coyote/dotfiles/fastfetch.jsonc create mode 100644 users/coyote/dotfiles/helix-languages.toml create mode 100644 users/coyote/dotfiles/helix.toml create mode 100644 users/coyote/dotfiles/vimrc diff --git a/README.md b/README.md index 1f1abf4..ec5e63b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,12 @@ └── users └── coyote ├── default.nix + ├── dotfiles + │   ├── fastfetch.jsonc + │   ├── helix-languages.toml + │   ├── helix.toml + │   └── vimrc └── home.nix -6 directories, 10 files +7 directories, 14 files ``` diff --git a/configuration.nix b/configuration.nix index 106c9b2..1b1d6b0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -50,33 +50,13 @@ systemPackages = with pkgs; [ vim # Nix - nh - alejandra + nh alejandra # system utils - firmware-updater - mtr - gnupg - ddate - testdisk - tree - wget - btop - dysk - plocate - traceroute - rlwrap - entr + firmware-updater mtr gnupg ddate testdisk tree wget btop dysk plocate + traceroute rlwrap entr # extra utils - fd - bat - xh - tlrc + fd bat xh tlrc dust hyperfine ripgrep fzf eza unstable.lazygit - dust - hyperfine - ripgrep - fzf - eza ]; shellAliases = { l = "eza --long --all"; diff --git a/profiles/kde.nix b/profiles/kde.nix index 6db1391..9189bc4 100644 --- a/profiles/kde.nix +++ b/profiles/kde.nix @@ -6,16 +6,8 @@ environment = { systemPackages = with pkgs.kdePackages; [ - kate - bluez-qt - kalk - filelight - kamoso - konversation - kmail - ]; - plasma6.excludePackages = with pkgs.kdePackages; [ - discover + kate bluez-qt kalk filelight kamoso konversation kmail ]; + plasma6.excludePackages = with pkgs.kdePackages; [discover]; }; } diff --git a/users/coyote/default.nix b/users/coyote/default.nix index 699f849..cf4594c 100644 --- a/users/coyote/default.nix +++ b/users/coyote/default.nix @@ -13,23 +13,16 @@ in { extraGroups = ["wheel" "networkmanager"]; uid = USER_ID; }; - defaultUserShell = pkgs.fish; + defaultUserShell = pkgs.unstable.fish; }; environment = { systemPackages = with pkgs; [ # programming - biwascheme - chicken - guile + biwascheme chicken guile sbcl unstable.racket - sbcl # LSPs - ty - nil - marksman - systemd-lsp - bash-language-server + ty nil marksman systemd-lsp bash-language-server ]; sessionVariables.SSH_AUTH_SOCK = "/run/user/${builtins.toString USER_ID}/ssh-agent"; }; diff --git a/users/coyote/dotfiles/fastfetch.jsonc b/users/coyote/dotfiles/fastfetch.jsonc new file mode 100644 index 0000000..fb21228 --- /dev/null +++ b/users/coyote/dotfiles/fastfetch.jsonc @@ -0,0 +1,87 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "type": "small", + "padding": { + "top": 4, + "left": 3, + "right": 4 + } + }, + "display": { + "separator": " " + }, + "modules": [ + { + "key": "╭─────────╮", + "type": "custom" + }, + { + "key": "│ {#31}user {#keys}│", + "type": "title", + "format": "{user-name}" + }, + { + "key": "│ {#32}host {#keys}│", + "type": "title", + "format": "{host-name}" + }, + { + "key": "│ {#33}uptime {#keys}│", + "type": "uptime" + }, + { + "key": "│ {#34}distro {#keys}│", + "type": "os" + }, + { + "key": "│ {#35}kernel {#keys}│", + "type": "kernel" + }, + { + "key": "│ {#36}desktop {#keys}│", + "type": "de" + }, + { + "key": "│ {#31}term {#keys}│", + "type": "terminal" + }, + { + "key": "│ {#32}shell {#keys}│", + "type": "shell" + }, + { + "key": "│ {#33}cpu {#keys}│", + "type": "cpu", + "showPeCoreCount": true + }, + { + "key": "│ {#34}disk {#keys}│", + "type": "disk", + "folders": "/" + }, + { + "key": "│ {#35}memory {#keys}│", + "type": "memory" + }, + { + "key": "│ {#36}network {#keys}│", + "type": "localip", + "format": "{ipv4} ({ifname})" + }, + { + "key": "├─────────┤", + "type": "custom" + }, + { + "key": "│ {#39}colors {#keys}│", + "type": "colors", + "symbol": "circle" + }, + { + "key": "╰─────────╯", + "type": "custom" + } + ] +} + diff --git a/users/coyote/dotfiles/helix-languages.toml b/users/coyote/dotfiles/helix-languages.toml new file mode 100644 index 0000000..1d4f8ee --- /dev/null +++ b/users/coyote/dotfiles/helix-languages.toml @@ -0,0 +1,6 @@ +[[language]] +name = "scheme" + +[language.indent] +tab-width = 2 +unit = " " diff --git a/users/coyote/dotfiles/helix.toml b/users/coyote/dotfiles/helix.toml new file mode 100644 index 0000000..11b8b3d --- /dev/null +++ b/users/coyote/dotfiles/helix.toml @@ -0,0 +1,21 @@ +theme = "gruvbox" + +[editor] +bufferline = "multiple" +cursorline = true +gutters = [] + +[editor.statusline.mode] +normal = "NORMAL" +insert = "INSERT" +select = "SELECT" + +[editor.indent-guides] +render = true +skip-levels = 2 + +[editor.soft-wrap] +enable = true + +[editor.lsp] +display-messages = true diff --git a/users/coyote/dotfiles/vimrc b/users/coyote/dotfiles/vimrc new file mode 100644 index 0000000..b4f1a17 --- /dev/null +++ b/users/coyote/dotfiles/vimrc @@ -0,0 +1,57 @@ +" Vim configuration +set nocompatible +set encoding=utf-8 +set backspace=indent,eol,start +set clipboard=unnamedplus +set mouse=a +set history=1000 +set updatetime=300 + +syntax on +set ruler +set showcmd +set showmode +set laststatus=2 +set wildmenu +set wildmode=longest,list,full +set ttyfast +set lazyredraw + +filetype plugin indent on +set autoindent +set smartindent +set tabstop=4 +set shiftwidth=4 +set softtabstop=4 +set expandtab + +set hlsearch +set incsearch +set ignorecase +set smartcase +set showmatch + +" indent guides +let g:indentLine_enabled = 1 +let g:indentLine_char = "╎" +let g:indentLine_setColors = 1 + +augroup LanguageIndentSettings + autocmd! + autocmd FileType javascript,typescript,html,css,json,nix setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab + autocmd FileType python,rust setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab + autocmd FileType go,make setlocal tabstop=4 shiftwidth=4 noexpandtab + autocmd FileType lisp,clojure,scheme,racket setlocal lisp autoindent showmatch lispwords+=defmacro,defmethod tabstop=2 shiftwidth=2 softtabstop=2 expandtab +augroup END + +" coc.nvim config +inoremap + \ coc#pum#visible() ? coc#pum#next(1) : + \ CheckBackspace() ? "\" : + \ coc#refresh() +inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" +inoremap coc#pum#visible() ? coc#pum#confirm() : "\" +function! CheckBackspace() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction diff --git a/users/coyote/home.nix b/users/coyote/home.nix index 0c81b8f..331c865 100644 --- a/users/coyote/home.nix +++ b/users/coyote/home.nix @@ -7,21 +7,13 @@ shell.enableShellIntegration = true; packages = with pkgs; [ - # devel - nodejs + fastfetch helix nodejs # productivity - libreoffice-fresh - karp - keepassxc + libreoffice-fresh karp keepassxc # multimedia - unstable.audacity - furnace - corrscope - vlc - haruna + furnace corrscope vlc haruna subtitlecomposer kid3 kdePackages.kdenlive - subtitlecomposer - kid3 + unstable.audacity # Internet ungoogled-chromium # games @@ -30,10 +22,16 @@ (unstable.bottles.override { removeWarningPopup = true; }) ]; - file.".vim/coc-settings.json".text = builtins.toJSON { - "suggest.noselect" = true; - "diagnostic.virtualText" = true; - "coc.preferences.formatOnSaveFiletypes" = [ "nix" "json" "javascript" "python" ]; + file = { + ".vimrc".source = ./dotfiles/vimrc; + ".config/fastfetch/config.jsonc".source = ./dotfiles/fastfetch.jsonc; + ".config/helix/config.toml".source = ./dotfiles/helix.toml; + ".config/helix/languages.toml".source = ./dotfiles/helix-languages.toml; + ".vim/coc-settings.json".text = builtins.toJSON { + "suggest.noselect" = true; + "diagnostic.virtualText" = true; + "coc.preferences.formatOnSaveFiletypes" = [ "nix" "json" "javascript" "python" ]; + }; }; }; @@ -51,195 +49,14 @@ }; programs = { - helix = { - enable = true; - defaultEditor = true; - settings = { - editor = { - bufferline = "multiple"; - statusline = { - mode.normal = "NORMAL"; - mode.insert = "INSERT"; - mode.select = "SELECT"; - }; - indent-guides = { - render = true; - skip-levels = 2; - }; - soft-wrap.enable = true; - line-number = "absolute"; - lsp.display-messages = true; - cursorline = true; - gutters = []; - }; - theme = "gruvbox"; - }; - languages = { - language = [ - { - name = "scheme"; - indent.tab-width = 2; - indent.unit = " "; - } - ]; - }; - }; vim = { enable = true; packageConfigurable = pkgs.unstable.vim-full; defaultEditor = true; - plugins = with pkgs.vimPlugins.unstable; [ - indentLine - coc-nvim + plugins = with pkgs.vimPlugins; [ + indentLine coc-nvim + coc-html coc-css coc-json coc-pyright coc-java ]; - extraConfig = '' - " Vim configuration - set nocompatible - set encoding=utf-8 - set backspace=indent,eol,start - set clipboard=unnamedplus - set mouse=a - set history=1000 - set updatetime=300 - - syntax on - set ruler - set showcmd - set showmode - set laststatus=2 - set wildmenu - set wildmode=longest,list,full - set ttyfast - set lazyredraw - - filetype plugin indent on - set autoindent - set smartindent - set tabstop=4 - set shiftwidth=4 - set softtabstop=4 - set expandtab - - set hlsearch - set incsearch - set ignorecase - set smartcase - set showmatch - - " indent guides - let g:indentLine_enabled = 1 - let g:indentLine_char = "|" - let g:indentLine_setColors = 1 - - " per-language indent settings - augroup LanguageSpecificSettings - autocmd! - autocmd FileType javascript,typescript,html,css,json,nix setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab - autocmd FileType python,rust,scheme setlocal tabstop=4 shiftwidth=4 softtabstop=4 expandtab - autocmd FileType go,make setlocal tabstop=4 shiftwidth=4 noexpandtab - augroup END - - " coc.nvim config - inoremap - \ coc#pum#visible() ? coc#pum#next(1) : - \ CheckBackspace() ? "\" : - \ coc#refresh() - inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" - - inoremap coc#pum#visible() ? coc#pum#confirm() : "\" - - function! CheckBackspace() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~# '\s' - endfunction - ''; - }; - fastfetch = { - enable = true; - settings = { - "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; - logo = { - type = "small"; - padding = { - top = 4; - left = 3; - right = 4; - }; - }; - display = {separator = " ";}; - modules = [ - { - key = "╭─────────╮"; - type = "custom"; - } - { - key = "│ {#31}user {#keys}│"; - type = "title"; - format = "{user-name}"; - } - { - key = "│ {#32}host {#keys}│"; - type = "title"; - format = "{host-name}"; - } - { - key = "│ {#33}uptime {#keys}│"; - type = "uptime"; - } - { - key = "│ {#34}distro {#keys}│"; - type = "os"; - } - { - key = "│ {#35}kernel {#keys}│"; - type = "kernel"; - } - { - key = "│ {#36}desktop {#keys}│"; - type = "de"; - } - { - key = "│ {#31}term {#keys}│"; - type = "terminal"; - } - { - key = "│ {#32}shell {#keys}│"; - type = "shell"; - } - { - key = "│ {#33}cpu {#keys}│"; - type = "cpu"; - showPeCoreCount = true; - } - { - key = "│ {#34}disk {#keys}│"; - type = "disk"; - folders = "/"; - } - { - key = "│ {#35}memory {#keys}│"; - type = "memory"; - } - { - key = "│ {#36}network {#keys}│"; - type = "localip"; - format = "{ipv4} ({ifname})"; - } - { - key = "├─────────┤"; - type = "custom"; - } - { - key = "│ {#39}colors {#keys}│"; - type = "colors"; - symbol = "circle"; - } - { - key = "╰─────────╯"; - type = "custom"; - } - ]; - }; }; git = { enable = true;