Compare commits
No commits in common. "baf66055e551970cf92e1079b626dbd4cd0c6a7f" and "002092a44a7037eb75764a163eab11dcdb2e7bf3" have entirely different histories.
baf66055e5
...
002092a44a
21 changed files with 109 additions and 307 deletions
50
flake.lock
50
flake.lock
|
@ -109,11 +109,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1698023869,
|
||||
"narHash": "sha256-iIi9HhMFEhC0ca1GUoBPXhzFp5N4fm7QIBt21ScnX9A=",
|
||||
"lastModified": 1697721991,
|
||||
"narHash": "sha256-Sjm7WaD+zLi9R7x8QKa9HGkizFQXvWGo18WlQtNPPtw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "a3283f0e5cba07dc1f6795a6ee71bf3a23b3fc53",
|
||||
"rev": "c24c3a902935321e1dfa1ca587e66f47edf79faf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -282,11 +282,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1697964592,
|
||||
"narHash": "sha256-fua0LKNLkYYK2Dgdm9P+VPdqrVgDXUIx+EkQAQByhuc=",
|
||||
"lastModified": 1697688028,
|
||||
"narHash": "sha256-d9CAOd9W2iTrgB31a8Dvyp6Vgn/gxASCNrD4Z9yzUOY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "219d268a69512ff520fe8da1739ac22d95d52355",
|
||||
"rev": "c5c1ea85181d2bb44e46e8a944a8a3f56ad88f19",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -325,11 +325,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "contrib",
|
||||
"lastModified": 1698042398,
|
||||
"narHash": "sha256-y4YAeQaQKpAXzLRD4TLryW9qBgmL0YVXn9w4rWeZASk=",
|
||||
"lastModified": 1697665640,
|
||||
"narHash": "sha256-dodNEzwAW7MxaHy7BXA8olSZFGna6uB6RBMrf6UD7Sw=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "5e5f5174e3faa862a9bc353aa7da41487911140b",
|
||||
"rev": "a8fc94a2fdd07edf0679d34f2deaacb25b3fa69f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -350,11 +350,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1698047232,
|
||||
"narHash": "sha256-l0gFPS83aCvr1dxGpS8sbuGeVb3mnQVr9/LRrdMIbTo=",
|
||||
"lastModified": 1697702552,
|
||||
"narHash": "sha256-Zf38W4riXaKQL8651y4T3rz7x+TxshcAW44p0/vGcDQ=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "779a566c0dbeaba7ffec8b76c0ac45beb01fa2d6",
|
||||
"revCount": 545,
|
||||
"rev": "4e65cdfa5b08e4943b2e109b4348d595c8584076",
|
||||
"revCount": 537,
|
||||
"type": "git",
|
||||
"url": "https://git.kempkens.io/daniel/nix-overlay"
|
||||
},
|
||||
|
@ -385,11 +385,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1698053470,
|
||||
"narHash": "sha256-sP8D/41UiwC2qn0X40oi+DfuVzNHMROqIWdSdCI/AYA=",
|
||||
"lastModified": 1697745251,
|
||||
"narHash": "sha256-3yLFt2ySYb2ZiFiCXYaBf/SHOKH3TyIfXaxB7qgdLfo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "80d98a7d55c6e27954a166cb583a41325e9512d7",
|
||||
"rev": "6e1fd3d5c267b10f44b59e437422f11cc8a3790c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -401,11 +401,11 @@
|
|||
},
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1697935353,
|
||||
"narHash": "sha256-dDwl5ziD24Gs0feke2seFXoQibHafb5XeNDWlUZxCbg=",
|
||||
"lastModified": 1697713104,
|
||||
"narHash": "sha256-DN7YOyKMCpAVeZ44N42LrujtTkoerkS9+kTufQiuntY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8dfad603247387df1df4826b8bea58efc5d012d8",
|
||||
"rev": "6be2c349a30fcb489a3153dd331e9df387ab6449",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -417,11 +417,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1697915759,
|
||||
"narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=",
|
||||
"lastModified": 1697688401,
|
||||
"narHash": "sha256-61QlajY7R9PbK25uFl55zh968CVNspwXX1zzimic4Uo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "51d906d2341c9e866e48c2efcaac0f2d70bfd43e",
|
||||
"rev": "458ef9126aa380996d77d44f53f886c2d8485f53",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -492,11 +492,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1697746376,
|
||||
"narHash": "sha256-gu77VkgdfaHgNCVufeb6WP9oqFLjwK4jHcoPZmBVF3E=",
|
||||
"lastModified": 1696846637,
|
||||
"narHash": "sha256-0hv4kbXxci2+pxhuXlVgftj/Jq79VSmtAyvfabCCtYk=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "8cc349bfd082da8782b989cad2158c9ad5bd70fd",
|
||||
"rev": "42e1b6095ef80a51f79595d9951eb38e91c4e6ca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -25,6 +25,7 @@ in
|
|||
berkeley-mono
|
||||
jetbrains-mono
|
||||
noto-fonts
|
||||
unifont
|
||||
|
||||
(nerdfonts.override {
|
||||
fonts = [
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
(set o.showbreak "↪ ")
|
||||
(set o.backspace [:indent :eol :start])
|
||||
(set o.signcolumn :no)
|
||||
(set o.completeopt [:menu :menuone :noselect])
|
||||
(set o.startofline false)
|
||||
(set o.synmaxcol 300)
|
||||
(set o.viewoptions [:cursor :folds :slash :unix])
|
||||
|
@ -48,7 +49,7 @@
|
|||
(set o.conceallevel 2)
|
||||
(set o.concealcursor :nc)
|
||||
(set o.updatetime 1000)
|
||||
(o.shortmess:append :S)
|
||||
(o.shortmess:append :cS)
|
||||
(set o.termguicolors true)
|
||||
(set o.mouse :a)
|
||||
(set o.mousemodel :popup_setpos)
|
||||
|
|
|
@ -81,9 +81,7 @@
|
|||
{:expr true})
|
||||
(keymap.set :i :<S-Tab> "pumvisible() ? \"\\<C-p>\" : \"\\<S-Tab>\""
|
||||
{:expr true})
|
||||
(keymap.set :i :<CR> "v:lua._G.mini_cr_action()" {:expr true})
|
||||
(keymap.set :i :<esc> "pumvisible() ? \"\\<C-y>\" : \"\\<esc>\""
|
||||
{:expr true}))
|
||||
(keymap.set :i :<CR> "v:lua._G.mini_cr_action()" {:expr true}))
|
||||
|
||||
(fn mod.lsp-attach [client bufnr]
|
||||
(keymap.set :n :<leader>t
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
statusline (require :nifoc.statusline)
|
||||
diagnostic vim.diagnostic
|
||||
gitsigns (require :gitsigns)
|
||||
gitsigns-ns (api.nvim_create_namespace :gitsigns_extmark_signs_)
|
||||
augroup (vim.api.nvim_create_augroup :NifocStatuscolumn {:clear true})
|
||||
aucmd vim.api.nvim_create_autocmd]
|
||||
;; Cache
|
||||
|
@ -28,12 +27,11 @@
|
|||
ret-tab))
|
||||
|
||||
(fn clear-diagnostics-cache! [bufnr diagnostics]
|
||||
(if (vim.tbl_isempty diagnostics) (tset cache :diagnostics bufnr nil)
|
||||
(let [namespaces (vim.tbl_map #$1.namespace diagnostics)
|
||||
current-cache (. cache :diagnostics bufnr)
|
||||
new-cache (cache-filter #(not (vim.tbl_contains namespaces $1.ns))
|
||||
current-cache)]
|
||||
(tset cache :diagnostics bufnr new-cache))))
|
||||
(tset cache :diagnostics bufnr new-cache)))
|
||||
|
||||
(fn update-cache-diagnostics [bufnr diagnostics]
|
||||
(maybe-setup-buffer-cache! :diagnostics bufnr)
|
||||
|
@ -50,34 +48,20 @@
|
|||
(fn update-cache-gitsigns [bufnr]
|
||||
(maybe-setup-buffer-cache! :gitsigns bufnr)
|
||||
(clear-cache! :gitsigns bufnr)
|
||||
(let [signs (api.nvim_buf_get_extmarks bufnr gitsigns-ns 0 -1
|
||||
{:details true})]
|
||||
(when (not (vim.tbl_isempty signs))
|
||||
(each [_ [_id row _col details] (pairs signs)]
|
||||
(let [lnum (+ row 1)
|
||||
(let [signs (?. (vim.fn.sign_getplaced bufnr
|
||||
{:group :gitsigns_vimfn_signs_})
|
||||
1 :signs)]
|
||||
(when (not= signs nil)
|
||||
(each [_ sign (pairs signs)]
|
||||
(let [lnum sign.lnum
|
||||
current (cached-sign :gitsigns bufnr lnum)]
|
||||
(when (= current nil)
|
||||
(tset cache :gitsigns bufnr lnum {:name details.sign_hl_group})))))))
|
||||
(tset cache :gitsigns bufnr lnum sign)))))))
|
||||
|
||||
(aucmd :DiagnosticChanged
|
||||
{:callback #(let [full-mode (. (api.nvim_get_mode) :mode)
|
||||
mode (full-mode:sub 1 1)]
|
||||
(when (not= mode :i)
|
||||
(update-cache-diagnostics $1.buf $1.data.diagnostics)))
|
||||
{:callback #(update-cache-diagnostics $1.buf $1.data.diagnostics)
|
||||
:group augroup
|
||||
:desc "Update cached diagnostic signs"})
|
||||
(aucmd :CursorHold
|
||||
{:callback #(update-cache-diagnostics $1.buf
|
||||
(vim.diagnostic.get $1.buf))
|
||||
:group augroup
|
||||
:desc "Periodically update cached diagnostics"})
|
||||
(aucmd :InsertLeave
|
||||
{:callback (fn [args]
|
||||
(vim.defer_fn #(update-cache-diagnostics args.buf
|
||||
(vim.diagnostic.get args.buf))
|
||||
1000))
|
||||
:group augroup
|
||||
:desc "Update diagnostics after leaving insert mode"})
|
||||
(aucmd :User {:pattern :GitSignsUpdate
|
||||
:callback #(update-cache-gitsigns $1.buf)
|
||||
:group augroup
|
||||
|
@ -115,7 +99,7 @@
|
|||
:provider " ▏"
|
||||
:hl #(if $1.has_sign $1.sign.name :StatusLineNC)
|
||||
:on_click {:name :heirline_statuscolumn_gitsigns
|
||||
:callback (fn [_self]
|
||||
:callback (fn [self]
|
||||
(let [mouse (vim.fn.getmousepos)
|
||||
cursor-pos [mouse.line 0]]
|
||||
(api.nvim_win_set_cursor mouse.winid
|
||||
|
@ -130,11 +114,8 @@
|
|||
mod.gitsigns])
|
||||
;; Diagnostic signs
|
||||
(set mod.diagnostic-signs
|
||||
{:condition #(let [bufnr (api.nvim_get_current_buf)
|
||||
buf-diagnostics (. cache :diagnostics bufnr)]
|
||||
(and (= b.nifoc_diagnostics_enabled 1)
|
||||
(not= buf-diagnostics nil)
|
||||
(not (vim.tbl_isempty buf-diagnostics))))
|
||||
{:condition #(and (= b.nifoc_diagnostics_enabled 1)
|
||||
(> (length (vim.diagnostic.get 0)) 0))
|
||||
:static {:sign-text {diagnostic.severity.ERROR " "
|
||||
diagnostic.severity.WARN " "
|
||||
diagnostic.severity.INFO " "
|
||||
|
@ -165,5 +146,6 @@
|
|||
:scope :line})
|
||||
100)))}})
|
||||
;; Debug
|
||||
(set mod._debug_cache #{: cache})
|
||||
(set mod._debug_cache #cache)
|
||||
mod)
|
||||
|
||||
|
|
|
@ -340,13 +340,14 @@
|
|||
"🭺"
|
||||
"🭻"]}
|
||||
:provider (fn [self]
|
||||
(let [scrollbar-icons self.scrollbar-icons-block
|
||||
i (+ (math.floor (* (/ (- self.current-line
|
||||
(let [i (+ (math.floor (* (/ (- self.current-line
|
||||
1)
|
||||
self.total-lines)
|
||||
(length scrollbar-icons)))
|
||||
(length self.scrollbar-icons-block)))
|
||||
1)
|
||||
new-scrollbar (. scrollbar-icons i)]
|
||||
new-scrollbar (. self
|
||||
:scrollbar-icons-block
|
||||
i)]
|
||||
(string.rep new-scrollbar 2)))
|
||||
:hl {:fg colors.purple}})
|
||||
;; Search count
|
||||
|
@ -384,3 +385,4 @@
|
|||
:hl {:fg (. colors fg) :bg (. colors bg) :bold true}})
|
||||
|
||||
mod)
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
(let [miniclue (require :mini.clue)
|
||||
hipatterns (require :mini.hipatterns)
|
||||
b vim.b
|
||||
api vim.api
|
||||
ctrl_n (api.nvim_replace_termcodes :<C-g><C-g><C-n> true false true)
|
||||
augroup (vim.api.nvim_create_augroup :NifocMini {:clear true})
|
||||
aucmd vim.api.nvim_create_autocmd]
|
||||
hipatterns (require :mini.hipatterns)]
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-ai.md
|
||||
((. (require :mini.ai) :setup) {})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-clue.md
|
||||
|
@ -17,14 +12,6 @@
|
|||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-comment.md
|
||||
((. (require :mini.comment) :setup) {})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-completion.md
|
||||
(set b.nifoc_completion_fallback_count 0)
|
||||
|
||||
(fn completion-fallback []
|
||||
(let [count b.nifoc_completion_fallback_count]
|
||||
(when (< count 3)
|
||||
(api.nvim_feedkeys ctrl_n :n false)
|
||||
(set b.nifoc_completion_fallback_count (+ count 1)))))
|
||||
|
||||
((. (require :mini.completion) :setup) {:window {:info {:height 25
|
||||
:width 80
|
||||
:border :rounded}
|
||||
|
@ -32,12 +19,7 @@
|
|||
:width 80
|
||||
:border :rounded}}
|
||||
:lsp_completion {:source_func :omnifunc
|
||||
:auto_setup false}
|
||||
:fallback_action completion-fallback})
|
||||
(aucmd [:InsertLeave :CursorHoldI]
|
||||
{:callback #(set b.nifoc_completion_fallback_count 0)
|
||||
:group augroup
|
||||
:desc "Re-enable completion fallback on cursor-hold"})
|
||||
:auto_setup false}})
|
||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-hipatterns.md
|
||||
(hipatterns.setup {:highlighters {:fixme {:pattern "%f[%w]()FIXME()%f[%W]"
|
||||
:group :MiniHipatternsFixme}
|
||||
|
|
|
@ -55,3 +55,4 @@
|
|||
:callback setup-linting
|
||||
:group augroup
|
||||
:desc "Setup Linter"})))
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
_ {: title :icon " " :color "#F8F8F2"}))
|
||||
|
||||
(wezterm.on :format-tab-title
|
||||
(fn [tab _tabs _panes _config _hover max-width]
|
||||
(fn [tab tabs panes config hover max-width]
|
||||
(let [raw-title (extract-tab-title tab)
|
||||
tab-info (extract-tab-info raw-title)
|
||||
title (wezterm.truncate_right tab-info.title
|
||||
|
@ -91,7 +91,6 @@
|
|||
{:Text title}
|
||||
; Right
|
||||
{:Text " "}]))))
|
||||
;; Event: Ligatures
|
||||
(wezterm.on :update-status
|
||||
(fn [window pane]
|
||||
(local pane-id (pane:pane_id))
|
||||
|
@ -122,20 +121,6 @@
|
|||
disable-ligatures-flags)
|
||||
(tset ligature-panes pane-id nil)
|
||||
(window:set_config_overrides overrides))))))
|
||||
;; Event: Screen options
|
||||
(wezterm.on :window-resized
|
||||
(fn [window _pane]
|
||||
(let [overrides (or (window:get_config_overrides) {})
|
||||
current-screen (. (wezterm.gui.screens) :active :name)]
|
||||
(case current-screen
|
||||
:S34J55x (do
|
||||
(set overrides.line_height 1)
|
||||
(set overrides.freetype_load_target :Normal)
|
||||
(window:set_config_overrides overrides))
|
||||
_ (do
|
||||
(set overrides.line_height 0.95)
|
||||
(set overrides.freetype_load_target :Light)
|
||||
(window:set_config_overrides overrides))))))
|
||||
;; Configuration
|
||||
{:default_prog [_G.shells.fish :--interactive]
|
||||
;; Appearance
|
||||
|
@ -170,7 +155,8 @@
|
|||
"Apple Symbols"
|
||||
"Apple Color Emoji"
|
||||
"Noto Sans Symbols"
|
||||
"Noto Sans Symbols 2"])
|
||||
"Noto Sans Symbols2"
|
||||
:Unifont])
|
||||
:font_size 13
|
||||
:line_height 0.95
|
||||
:freetype_load_target :Light
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
../programs/btop.nix
|
||||
|
||||
../programs/fzf.nix
|
||||
|
||||
../programs/gallery-dl.nix
|
||||
|
||||
../programs/gpg.nix
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
../programs/bat.nix
|
||||
|
||||
../programs/fzf.nix
|
||||
|
||||
../programs/jq.nix
|
||||
|
||||
../programs/scripts.nix
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
../programs/bat.nix
|
||||
|
||||
../programs/fzf.nix
|
||||
|
||||
../programs/jq.nix
|
||||
|
||||
../programs/scripts.nix
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
../programs/btop.nix
|
||||
|
||||
../programs/fzf.nix
|
||||
|
||||
../programs/gallery-dl.nix
|
||||
|
||||
../programs/jq.nix
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
../programs/btop.nix
|
||||
|
||||
../programs/fzf.nix
|
||||
|
||||
../programs/jq.nix
|
||||
|
||||
../programs/scripts.nix
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
../programs/bat.nix
|
||||
|
||||
../programs/fzf.nix
|
||||
|
||||
../programs/jq.nix
|
||||
|
||||
../programs/scripts.nix
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
header = "#6272a4";
|
||||
};
|
||||
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
enableBashIntegration = false;
|
||||
enableZshIntegration = false;
|
||||
enableFishIntegration = false;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -29,23 +29,23 @@ in
|
|||
};
|
||||
mini-nvim = buildVimPlugin {
|
||||
pname = "mini.nvim";
|
||||
version = "2023-10-23";
|
||||
version = "2023-10-19";
|
||||
src = fetchFromGitHub {
|
||||
owner = "echasnovski";
|
||||
repo = "mini.nvim";
|
||||
rev = "66e3cdceaba8c0cd089d6f42cb95e04355718f7a";
|
||||
sha256 = "0sbznyd54snvvrgcj3pls1xnjg1f0b52fxdp9hsdaxivfar3qizl";
|
||||
rev = "e9a0716013abb8d2d6f8d77331600fb99eb15d51";
|
||||
sha256 = "0xws1jj4z6w12fl2dl2glfd8i4ig782gk17316h3iwx68ixv0mhs";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
nvim-web-devicons = buildVimPlugin {
|
||||
pname = "nvim-web-devicons";
|
||||
version = "2023-10-21";
|
||||
version = "2023-10-14";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kyazdani42";
|
||||
repo = "nvim-web-devicons";
|
||||
rev = "f0267921c845c42685968401bc49aa65e18d3e09";
|
||||
sha256 = "1qqcjaknnq7bm1rl73nzv9gfcfwx2jrxc8vh2l400m4hj0bgvp9k";
|
||||
rev = "3af745113ea537f58c4b1573b64a429fefad9e07";
|
||||
sha256 = "103spgpvwm4pv32h954sv68p6qjizkm4fdvyzndjgw9x9bah5ksh";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -117,34 +117,34 @@ in
|
|||
};
|
||||
nvim-treesitter = buildVimPlugin {
|
||||
pname = "nvim-treesitter";
|
||||
version = "2023-10-23";
|
||||
version = "2023-10-19";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvim-treesitter";
|
||||
repo = "nvim-treesitter";
|
||||
rev = "0b50cf159283855b72f4c6b22f5ba3c9cf813b37";
|
||||
sha256 = "0w9hb0n5glhniqx923hvphxf8fy8p3hnwbqsa1fs9cm6bhn8gq5w";
|
||||
rev = "eb3faef3a44641e5875581e901b0a8df8da2bde4";
|
||||
sha256 = "0y49lf9b12y24dq3j8g7zllgmgkzzxkwkvm6vv0qdlahnn9bvcn1";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
vim-just = buildVimPlugin {
|
||||
pname = "vim-just";
|
||||
version = "2023-10-20";
|
||||
version = "2023-10-13";
|
||||
src = fetchFromGitHub {
|
||||
owner = "NoahTheDuke";
|
||||
repo = "vim-just";
|
||||
rev = "3029bdda0da9674682fe46bd6c4b946ad229dcaa";
|
||||
sha256 = "0m8dbdr9pdisjnfh6x6nfs27zslnzq7wq1h9jndp810b8prngai3";
|
||||
rev = "3038ffac026a13edaf1bbb898f25d808b6b0c92a";
|
||||
sha256 = "1dh3jhfvv0vk1khxi3hfy80xnvk021vj3rrlmj3jjgarda06psmv";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
rainbow-delimiters-nvim = buildVimPlugin {
|
||||
pname = "rainbow-delimiters.nvim";
|
||||
version = "2023-10-22";
|
||||
version = "2023-10-17";
|
||||
src = fetchFromGitHub {
|
||||
owner = "HiPhish";
|
||||
repo = "rainbow-delimiters.nvim";
|
||||
rev = "9fda1322e704acfbb5a9691e2c4303368d591367";
|
||||
sha256 = "1crd6ybikdk768xsm769xvzia8wkg0hx9bh9h3nyak0gj779zdc4";
|
||||
rev = "b160af1d2a2a616718c4b01cd88105a8f4c88a73";
|
||||
sha256 = "04lmqznf3nfky64qvkvvk57h4m2g6dpbk4cjra14pkiyhacjlpqz";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -161,12 +161,12 @@ in
|
|||
};
|
||||
telescope-nvim = buildVimPlugin {
|
||||
pname = "telescope.nvim";
|
||||
version = "2023-10-23";
|
||||
version = "2023-10-11";
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvim-telescope";
|
||||
repo = "telescope.nvim";
|
||||
rev = "4522d7e3ea75ffddabdc39957168a8a7060b5df0";
|
||||
sha256 = "143bdqxfzlfbjrd80pw4wkz95szp21qs1zn7i230sdavvrq00b3b";
|
||||
rev = "74ce793a60759e3db0d265174f137fb627430355";
|
||||
sha256 = "1m4v097y8ypjm572k1qqii3z56w4x1dsjxd6gp0z24xqyvd4kpa4";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -219,12 +219,12 @@ in
|
|||
};
|
||||
nvim-lspconfig = buildVimPlugin {
|
||||
pname = "nvim-lspconfig";
|
||||
version = "2023-10-23";
|
||||
version = "2023-10-16";
|
||||
src = fetchFromGitHub {
|
||||
owner = "neovim";
|
||||
repo = "nvim-lspconfig";
|
||||
rev = "6428fcab6f3c09e934bc016c329806314384a41e";
|
||||
sha256 = "02hvjlk9i63xxrx52xvvrx0bhqajbhrdjvg6ws291dwmxyz285rs";
|
||||
rev = "e49b1e90c1781ce372013de3fa93a91ea29fc34a";
|
||||
sha256 = "0pb33c3dgv6pvn6avc6zrbfrzr63wd9hxkz5rz6y05w633d61mc8";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -263,23 +263,23 @@ in
|
|||
};
|
||||
nvim-lint = buildVimPlugin {
|
||||
pname = "nvim-lint";
|
||||
version = "2023-10-22";
|
||||
version = "2023-10-19";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mfussenegger";
|
||||
repo = "nvim-lint";
|
||||
rev = "a4b0511a9e757e78c8c9f9d3f201e0d8ff158b42";
|
||||
sha256 = "0laj6z74r3nz497nkgpyx9kvc5111hiaia57h5jx4qvajml9ysl1";
|
||||
rev = "e366dc5ed4002d3489d03200c0b132ce2b1ba532";
|
||||
sha256 = "0azmih7djcnfg58wdcmpsr90nvhlqvr3km7h4dv69hh3xjp06qma";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
conform-nvim = buildVimPlugin {
|
||||
pname = "conform.nvim";
|
||||
version = "2023-10-22";
|
||||
version = "2023-10-19";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stevearc";
|
||||
repo = "conform.nvim";
|
||||
rev = "7f5ff6d253ae3543f186787bccafdc411d3f4b0a";
|
||||
sha256 = "1iargrkz4k51bppp7qm2hlqy334x1qjg0d1ax8dr6qpkhi6al36v";
|
||||
rev = "55abaaa9ed4684cd9ba8f0c062379be6cf41b8f3";
|
||||
sha256 = "1nl7qqm61rin8v8xl11qlfajwqjmwzz4x79mwwcrml2d387nksbn";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
@ -307,12 +307,12 @@ in
|
|||
};
|
||||
indent-blankline-nvim = buildVimPlugin {
|
||||
pname = "indent-blankline.nvim";
|
||||
version = "2023-10-23";
|
||||
version = "2023-10-19";
|
||||
src = fetchFromGitHub {
|
||||
owner = "lukas-reineke";
|
||||
repo = "indent-blankline.nvim";
|
||||
rev = "2546441840172cc41e70f67c52e205cc7aa3e6ed";
|
||||
sha256 = "00p9dyqaa6h67pnkn5wh4iyvi8ydpnyqvbq5n6jk82c5c48h2s2s";
|
||||
rev = "8a7b48f5823cc924f815129192288ec2e2b9288f";
|
||||
sha256 = "000mvx49b92ndhgpa8p3a2a089vpn1rqgkn8l09mgmbnpcgn3ib6";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -51,16 +51,6 @@
|
|||
format = "\\[[$symbol($version)]($style)\\]";
|
||||
};
|
||||
|
||||
os = {
|
||||
disabled = true;
|
||||
format = "$symbol";
|
||||
|
||||
symbols = {
|
||||
Macos = " ";
|
||||
NixOS = " ";
|
||||
};
|
||||
};
|
||||
|
||||
package = {
|
||||
symbol = " ";
|
||||
format = "\\[[$symbol$version]($style)\\]";
|
||||
|
|
|
@ -4,7 +4,7 @@ let
|
|||
default-system = "x86_64-linux";
|
||||
|
||||
# overlay-master = _: _: { pkgs-master = import inputs.nixpkgs-master { system = default-system; }; };
|
||||
overlay-deploy-rs = _: _: { inherit (deploy-rs.packages.${default-system}) deploy-rs; };
|
||||
overlay-deploy-rs = _: _: { inherit (inputs.deploy-rs.packages.${default-system}) deploy-rs; };
|
||||
overlay-nifoc = inputs.nifoc-overlay.overlay;
|
||||
|
||||
nixpkgsConfig = {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
certs = {
|
||||
"kempkens.io" = {
|
||||
extraDomainNames = [ "*.kempkens.io" ];
|
||||
domain = "*.kempkens.io";
|
||||
};
|
||||
|
||||
"daniel.sx" = {
|
||||
|
|
|
@ -1,162 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
kempkens-io = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "website-kempkens-io";
|
||||
version = "2023-09-18";
|
||||
|
||||
src = pkgs.fetchFromGitea {
|
||||
domain = "git.kempkens.io";
|
||||
owner = "daniel";
|
||||
repo = "kempkens.io";
|
||||
rev = "3a6ca5be1709ce26772e9cf0e6a9ff7474712e40";
|
||||
hash = "sha256-gMjUH/baPWlRfdkt991H5qf1GcQTZWpJQwpKua0at9c=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [ brotli hugo ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
|
||||
hugo
|
||||
|
||||
find public -type f -regextype posix-extended -iregex '.*\.(css|js|json|html|txt|woff|woff2|xml)' \
|
||||
-exec gzip --best --keep {} ';'
|
||||
find public -type f -regextype posix-extended -iregex '.*\.(css|js|json|html|txt|woff|woff2|xml)' \
|
||||
-exec brotli --best --keep {} ';'
|
||||
|
||||
mv public $out/
|
||||
'';
|
||||
};
|
||||
|
||||
blog-kempkens-io = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "website-blog-kempkens-io";
|
||||
version = "2023-09-18";
|
||||
|
||||
src = pkgs.fetchFromGitea {
|
||||
domain = "git.kempkens.io";
|
||||
owner = "daniel";
|
||||
repo = "blog.kempkens.io";
|
||||
rev = "781c9479051ec7a096a36f51b96030b8cd49b165";
|
||||
hash = "sha256-H/To8dcbEbYklpZAr5mQxAjneNd7vPsNBhfeocJ9amo=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [ brotli hugo ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
|
||||
hugo
|
||||
|
||||
find public -type f -regextype posix-extended -iregex '.*\.(css|js|json|html|txt|woff|woff2|xml)' \
|
||||
-exec gzip --best --keep {} ';'
|
||||
find public -type f -regextype posix-extended -iregex '.*\.(css|js|json|html|txt|woff|woff2|xml)' \
|
||||
-exec brotli --best --keep {} ';'
|
||||
|
||||
mv public $out/
|
||||
'';
|
||||
};
|
||||
|
||||
docs-nifoc-pw = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "website-docs-nifoc-pw";
|
||||
version = "2021-08-30";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nifoc";
|
||||
repo = "nifoc.pw-docs";
|
||||
rev = "24034da912e3d7fddc447734ca4c9a5951a0fa32";
|
||||
sha256 = "sha256-GwVwbLUbxpFidOU1CTHFbYs/MscHpsqiYmnyvLtnYjM=";
|
||||
fetchSubmodules = false;
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [ brotli ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
|
||||
find site -type f -regextype posix-extended -iregex '.*\.(css|js|json|html|txt|woff|woff2|xml)' \
|
||||
-exec gzip --best --keep {} ';'
|
||||
find site -type f -regextype posix-extended -iregex '.*\.(css|js|json|html|txt|woff|woff2|xml)' \
|
||||
-exec brotli --best --keep {} ';'
|
||||
|
||||
mv site $out/
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
# kempkens.io
|
||||
"kempkens.io" = {
|
||||
quic = true;
|
||||
http3 = true;
|
||||
kTLS = true;
|
||||
|
||||
root = "${kempkens-io}/public";
|
||||
forceSSL = true;
|
||||
useACMEHost = "kempkens.io";
|
||||
|
||||
extraConfig = ''
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
add_header Content-Security-Policy "default-src 'none'; manifest-src https://kempkens.io; script-src 'self'; img-src 'self'; style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; font-src 'self'; form-action 'none'; frame-ancestors 'none'; base-uri 'self'";
|
||||
'';
|
||||
|
||||
locations = {
|
||||
"/id".return = "307 https://keyoxide.org/028BCE9BABB5145AAAA1FB8410BE1D47E5ADFF92";
|
||||
"/.well-known/host-meta".return = "301 https://mastodon.kempkens.io/.well-known/host-meta";
|
||||
"/.well-known/webfinger".return = "301 https://mastodon.kempkens.io$request_uri";
|
||||
|
||||
"/.well-known/matrix/server".extraConfig = ''
|
||||
default_type application/json;
|
||||
'';
|
||||
|
||||
"/.well-known/matrix/client".extraConfig = ''
|
||||
default_type application/json;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
"www.kempkens.io" = {
|
||||
quic = true;
|
||||
http3 = true;
|
||||
|
||||
addSSL = true;
|
||||
useACMEHost = "kempkens.io";
|
||||
|
||||
extraConfig = ''
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||
'';
|
||||
|
||||
globalRedirect = "kempkens.io";
|
||||
};
|
||||
|
||||
# blog.kempkens.io
|
||||
"blog.kempkens.io" = {
|
||||
quic = true;
|
||||
http3 = true;
|
||||
kTLS = true;
|
||||
|
||||
root = "${blog-kempkens-io}/public";
|
||||
forceSSL = true;
|
||||
useACMEHost = "kempkens.io";
|
||||
|
||||
extraConfig = ''
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||
add_header X-Frame-Options DENY;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header Referrer-Policy no-referrer;
|
||||
add_header Content-Security-Policy "default-src 'none'; manifest-src https://blog.kempkens.io; script-src 'self'; img-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; form-action 'none'; frame-ancestors 'none'; base-uri 'self'";
|
||||
'';
|
||||
};
|
||||
} // builtins.listToAttrs (builtins.map
|
||||
# Documentation
|
||||
virtualHosts = builtins.listToAttrs (builtins.map
|
||||
(domain: {
|
||||
name = domain;
|
||||
value = {
|
||||
|
@ -164,7 +11,7 @@ in
|
|||
http3 = true;
|
||||
kTLS = true;
|
||||
|
||||
root = "${docs-nifoc-pw}/site/${domain}";
|
||||
root = "${pkgs.website-docs-nifoc-pw}/site/${domain}";
|
||||
forceSSL = true;
|
||||
useACMEHost = "nifoc.pw";
|
||||
|
||||
|
|
Loading…
Reference in a new issue