From 73884c824ea96c554a7017081dd1f8aa90c5c059 Mon Sep 17 00:00:00 2001 From: asnev Date: Thu, 9 Jul 2026 17:06:17 +0700 Subject: [PATCH] convert back to nix --- users/coyote/dotfiles.nix | 22 ------- users/coyote/dotfiles/fastfetch.jsonc | 87 ------------------------- users/coyote/dotfiles/vim/lisp.vim | 10 --- users/coyote/dotfiles/vim/tab2.vim | 4 -- users/coyote/dotfiles/vim/tab4.vim | 4 -- users/coyote/dotfiles/vim/tabs.vim | 4 -- users/coyote/home.nix | 10 +-- users/coyote/programs/fastfetch.nix | 91 +++++++++++++++++++++++++++ users/coyote/programs/vim.nix | 50 +++++++++++++++ 9 files changed, 143 insertions(+), 139 deletions(-) delete mode 100644 users/coyote/dotfiles.nix delete mode 100644 users/coyote/dotfiles/fastfetch.jsonc delete mode 100644 users/coyote/dotfiles/vim/lisp.vim delete mode 100644 users/coyote/dotfiles/vim/tab2.vim delete mode 100644 users/coyote/dotfiles/vim/tab4.vim delete mode 100644 users/coyote/dotfiles/vim/tabs.vim create mode 100644 users/coyote/programs/fastfetch.nix diff --git a/users/coyote/dotfiles.nix b/users/coyote/dotfiles.nix deleted file mode 100644 index 7da11f0..0000000 --- a/users/coyote/dotfiles.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - pkgs, - lib, - ... -}: let - mkVim = src: langs: - builtins.listToAttrs (map (lang: { - name = ".vim/after/ftplugin/${lang}.vim"; - value = {source = src;}; - }) - langs); -in { - home.file = lib.mkMerge [ - { - ".config/fastfetch/config.jsonc".source = ./dotfiles/fastfetch.jsonc; - } - (mkVim ./dotfiles/vim/tab2.vim ["javascript" "typescript" "html" "css" "json" "nix" "vim"]) - (mkVim ./dotfiles/vim/tab4.vim ["python" "rust" "java" "lua" "c" "cpp" "h" "hpp"]) - (mkVim ./dotfiles/vim/tabs.vim ["go" "make"]) - (mkVim ./dotfiles/vim/lisp.vim ["lisp" "scheme" "clojure" "racket"]) - ]; -} diff --git a/users/coyote/dotfiles/fastfetch.jsonc b/users/coyote/dotfiles/fastfetch.jsonc deleted file mode 100644 index fb21228..0000000 --- a/users/coyote/dotfiles/fastfetch.jsonc +++ /dev/null @@ -1,87 +0,0 @@ -{ - "$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/vim/lisp.vim b/users/coyote/dotfiles/vim/lisp.vim deleted file mode 100644 index b2038a5..0000000 --- a/users/coyote/dotfiles/vim/lisp.vim +++ /dev/null @@ -1,10 +0,0 @@ -setlocal expandtab -setlocal tabstop=2 -setlocal shiftwidth=2 -setlocal softtabstop=2 - -setlocal lisp -setlocal autoindent -setlocal showmatch - -setlocal lispwords+=defmacro,defmethod,define-syntax,let,let*,letre,cond diff --git a/users/coyote/dotfiles/vim/tab2.vim b/users/coyote/dotfiles/vim/tab2.vim deleted file mode 100644 index 3055d97..0000000 --- a/users/coyote/dotfiles/vim/tab2.vim +++ /dev/null @@ -1,4 +0,0 @@ -setlocal expandtab -setlocal tabstop=2 -setlocal shiftwidth=2 -setlocal softtabstop=2 diff --git a/users/coyote/dotfiles/vim/tab4.vim b/users/coyote/dotfiles/vim/tab4.vim deleted file mode 100644 index 23b0937..0000000 --- a/users/coyote/dotfiles/vim/tab4.vim +++ /dev/null @@ -1,4 +0,0 @@ -setlocal expandtab -setlocal tabstop=4 -setlocal shiftwidth=4 -setlocal softtabstop=4 diff --git a/users/coyote/dotfiles/vim/tabs.vim b/users/coyote/dotfiles/vim/tabs.vim deleted file mode 100644 index 0f56073..0000000 --- a/users/coyote/dotfiles/vim/tabs.vim +++ /dev/null @@ -1,4 +0,0 @@ -setlocal tabstop=4 -setlocal shiftwidth=4 -setlocal noexpandtab - diff --git a/users/coyote/home.nix b/users/coyote/home.nix index db526df..41c06aa 100644 --- a/users/coyote/home.nix +++ b/users/coyote/home.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: let +{pkgs, ...}: let programsDir = ./programs; programsImports = map (name: programsDir + "/${name}") ( builtins.filter @@ -9,9 +6,7 @@ (builtins.attrNames (builtins.readDir programsDir)) ); in { - imports = [ - ./dotfiles.nix - ] ++ programsImports; + imports = programsImports; home = { stateVersion = "26.05"; # I hope you know what you're doing. :) @@ -21,7 +16,6 @@ in { packages = with pkgs; [ # programs - fastfetch tdf # productivity libreoffice-fresh diff --git a/users/coyote/programs/fastfetch.nix b/users/coyote/programs/fastfetch.nix new file mode 100644 index 0000000..2ced549 --- /dev/null +++ b/users/coyote/programs/fastfetch.nix @@ -0,0 +1,91 @@ +{pkgs, ...}: { + programs.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"; + } + ]; + }; + }; +} diff --git a/users/coyote/programs/vim.nix b/users/coyote/programs/vim.nix index 3b94adf..60b1e5a 100644 --- a/users/coyote/programs/vim.nix +++ b/users/coyote/programs/vim.nix @@ -1,5 +1,6 @@ { pkgs, + lib, ... }: { programs.vim = { @@ -46,6 +47,9 @@ set ignorecase set smartcase + " keybinds + inoremap λ + " gruvbox set termguicolors set background=dark @@ -59,4 +63,50 @@ let g:indent_guides_start_level = 3 ''; }; + + home.file = let + mkVim = content: langs: + builtins.listToAttrs (map (lang: { + name = ".vim/after/ftplugin/${lang}.vim"; + value = {text = content;}; + }) + langs); + + tab2Vim = '' + setlocal expandtab + setlocal tabstop=2 + setlocal shiftwidth=2 + setlocal softtabstop=2 + ''; + tab4Vim = '' + setlocal expandtab + setlocal tabstop=4 + setlocal shiftwidth=4 + setlocal softtabstop=4 + ''; + tabsVim = '' + setlocal noexpandtab + setlocal tabstop=4 + setlocal shiftwidth=4 + setlocal softtabstop=0 + ''; + lispVim = '' + setlocal expandtab + setlocal tabstop=2 + setlocal shiftwidth=2 + setlocal softtabstop=2 + + setlocal lisp + setlocal autoindent + setlocal showmatch + + setlocal lispwords+=defmacro,defmethod,define-syntax,let,let*,letre,cond + ''; + in + lib.mkMerge [ + (mkVim tab2Vim ["javascript" "typescript" "html" "css" "json" "nix" "vim"]) + (mkVim tab4Vim ["python" "rust" "java" "lua" "c" "cpp" "h" "hpp"]) + (mkVim tabsVim ["go" "make"]) + (mkVim lispVim ["lisp" "scheme" "clojure" "racket"]) + ]; }