Compare commits
12 commits
002092a44a
...
baf66055e5
Author | SHA1 | Date | |
---|---|---|---|
baf66055e5 | |||
fc3d1832dd | |||
ea785631e6 | |||
2c96318bd1 | |||
c0ced35d15 | |||
f31ede7625 | |||
b10463b126 | |||
291837949a | |||
bc13729194 | |||
d4febae38f | |||
3b9b917b94 | |||
91707ec53e |
21 changed files with 307 additions and 109 deletions
50
flake.lock
50
flake.lock
|
@ -109,11 +109,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697721991,
|
"lastModified": 1698023869,
|
||||||
"narHash": "sha256-Sjm7WaD+zLi9R7x8QKa9HGkizFQXvWGo18WlQtNPPtw=",
|
"narHash": "sha256-iIi9HhMFEhC0ca1GUoBPXhzFp5N4fm7QIBt21ScnX9A=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "c24c3a902935321e1dfa1ca587e66f47edf79faf",
|
"rev": "a3283f0e5cba07dc1f6795a6ee71bf3a23b3fc53",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -282,11 +282,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697688028,
|
"lastModified": 1697964592,
|
||||||
"narHash": "sha256-d9CAOd9W2iTrgB31a8Dvyp6Vgn/gxASCNrD4Z9yzUOY=",
|
"narHash": "sha256-fua0LKNLkYYK2Dgdm9P+VPdqrVgDXUIx+EkQAQByhuc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "c5c1ea85181d2bb44e46e8a944a8a3f56ad88f19",
|
"rev": "219d268a69512ff520fe8da1739ac22d95d52355",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -325,11 +325,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "contrib",
|
"dir": "contrib",
|
||||||
"lastModified": 1697665640,
|
"lastModified": 1698042398,
|
||||||
"narHash": "sha256-dodNEzwAW7MxaHy7BXA8olSZFGna6uB6RBMrf6UD7Sw=",
|
"narHash": "sha256-y4YAeQaQKpAXzLRD4TLryW9qBgmL0YVXn9w4rWeZASk=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "a8fc94a2fdd07edf0679d34f2deaacb25b3fa69f",
|
"rev": "5e5f5174e3faa862a9bc353aa7da41487911140b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -350,11 +350,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697702552,
|
"lastModified": 1698047232,
|
||||||
"narHash": "sha256-Zf38W4riXaKQL8651y4T3rz7x+TxshcAW44p0/vGcDQ=",
|
"narHash": "sha256-l0gFPS83aCvr1dxGpS8sbuGeVb3mnQVr9/LRrdMIbTo=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "4e65cdfa5b08e4943b2e109b4348d595c8584076",
|
"rev": "779a566c0dbeaba7ffec8b76c0ac45beb01fa2d6",
|
||||||
"revCount": 537,
|
"revCount": 545,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.kempkens.io/daniel/nix-overlay"
|
"url": "https://git.kempkens.io/daniel/nix-overlay"
|
||||||
},
|
},
|
||||||
|
@ -385,11 +385,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697745251,
|
"lastModified": 1698053470,
|
||||||
"narHash": "sha256-3yLFt2ySYb2ZiFiCXYaBf/SHOKH3TyIfXaxB7qgdLfo=",
|
"narHash": "sha256-sP8D/41UiwC2qn0X40oi+DfuVzNHMROqIWdSdCI/AYA=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "6e1fd3d5c267b10f44b59e437422f11cc8a3790c",
|
"rev": "80d98a7d55c6e27954a166cb583a41325e9512d7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -401,11 +401,11 @@
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697713104,
|
"lastModified": 1697935353,
|
||||||
"narHash": "sha256-DN7YOyKMCpAVeZ44N42LrujtTkoerkS9+kTufQiuntY=",
|
"narHash": "sha256-dDwl5ziD24Gs0feke2seFXoQibHafb5XeNDWlUZxCbg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6be2c349a30fcb489a3153dd331e9df387ab6449",
|
"rev": "8dfad603247387df1df4826b8bea58efc5d012d8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -417,11 +417,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697688401,
|
"lastModified": 1697915759,
|
||||||
"narHash": "sha256-61QlajY7R9PbK25uFl55zh968CVNspwXX1zzimic4Uo=",
|
"narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "458ef9126aa380996d77d44f53f886c2d8485f53",
|
"rev": "51d906d2341c9e866e48c2efcaac0f2d70bfd43e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -492,11 +492,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696846637,
|
"lastModified": 1697746376,
|
||||||
"narHash": "sha256-0hv4kbXxci2+pxhuXlVgftj/Jq79VSmtAyvfabCCtYk=",
|
"narHash": "sha256-gu77VkgdfaHgNCVufeb6WP9oqFLjwK4jHcoPZmBVF3E=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "42e1b6095ef80a51f79595d9951eb38e91c4e6ca",
|
"rev": "8cc349bfd082da8782b989cad2158c9ad5bd70fd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -25,7 +25,6 @@ in
|
||||||
berkeley-mono
|
berkeley-mono
|
||||||
jetbrains-mono
|
jetbrains-mono
|
||||||
noto-fonts
|
noto-fonts
|
||||||
unifont
|
|
||||||
|
|
||||||
(nerdfonts.override {
|
(nerdfonts.override {
|
||||||
fonts = [
|
fonts = [
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
(set o.showbreak "↪ ")
|
(set o.showbreak "↪ ")
|
||||||
(set o.backspace [:indent :eol :start])
|
(set o.backspace [:indent :eol :start])
|
||||||
(set o.signcolumn :no)
|
(set o.signcolumn :no)
|
||||||
(set o.completeopt [:menu :menuone :noselect])
|
|
||||||
(set o.startofline false)
|
(set o.startofline false)
|
||||||
(set o.synmaxcol 300)
|
(set o.synmaxcol 300)
|
||||||
(set o.viewoptions [:cursor :folds :slash :unix])
|
(set o.viewoptions [:cursor :folds :slash :unix])
|
||||||
|
@ -49,7 +48,7 @@
|
||||||
(set o.conceallevel 2)
|
(set o.conceallevel 2)
|
||||||
(set o.concealcursor :nc)
|
(set o.concealcursor :nc)
|
||||||
(set o.updatetime 1000)
|
(set o.updatetime 1000)
|
||||||
(o.shortmess:append :cS)
|
(o.shortmess:append :S)
|
||||||
(set o.termguicolors true)
|
(set o.termguicolors true)
|
||||||
(set o.mouse :a)
|
(set o.mouse :a)
|
||||||
(set o.mousemodel :popup_setpos)
|
(set o.mousemodel :popup_setpos)
|
||||||
|
|
|
@ -81,7 +81,9 @@
|
||||||
{:expr true})
|
{:expr true})
|
||||||
(keymap.set :i :<S-Tab> "pumvisible() ? \"\\<C-p>\" : \"\\<S-Tab>\""
|
(keymap.set :i :<S-Tab> "pumvisible() ? \"\\<C-p>\" : \"\\<S-Tab>\""
|
||||||
{:expr true})
|
{:expr true})
|
||||||
(keymap.set :i :<CR> "v:lua._G.mini_cr_action()" {:expr true}))
|
(keymap.set :i :<CR> "v:lua._G.mini_cr_action()" {:expr true})
|
||||||
|
(keymap.set :i :<esc> "pumvisible() ? \"\\<C-y>\" : \"\\<esc>\""
|
||||||
|
{:expr true}))
|
||||||
|
|
||||||
(fn mod.lsp-attach [client bufnr]
|
(fn mod.lsp-attach [client bufnr]
|
||||||
(keymap.set :n :<leader>t
|
(keymap.set :n :<leader>t
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
statusline (require :nifoc.statusline)
|
statusline (require :nifoc.statusline)
|
||||||
diagnostic vim.diagnostic
|
diagnostic vim.diagnostic
|
||||||
gitsigns (require :gitsigns)
|
gitsigns (require :gitsigns)
|
||||||
|
gitsigns-ns (api.nvim_create_namespace :gitsigns_extmark_signs_)
|
||||||
augroup (vim.api.nvim_create_augroup :NifocStatuscolumn {:clear true})
|
augroup (vim.api.nvim_create_augroup :NifocStatuscolumn {:clear true})
|
||||||
aucmd vim.api.nvim_create_autocmd]
|
aucmd vim.api.nvim_create_autocmd]
|
||||||
;; Cache
|
;; Cache
|
||||||
|
@ -27,11 +28,12 @@
|
||||||
ret-tab))
|
ret-tab))
|
||||||
|
|
||||||
(fn clear-diagnostics-cache! [bufnr diagnostics]
|
(fn clear-diagnostics-cache! [bufnr diagnostics]
|
||||||
|
(if (vim.tbl_isempty diagnostics) (tset cache :diagnostics bufnr nil)
|
||||||
(let [namespaces (vim.tbl_map #$1.namespace diagnostics)
|
(let [namespaces (vim.tbl_map #$1.namespace diagnostics)
|
||||||
current-cache (. cache :diagnostics bufnr)
|
current-cache (. cache :diagnostics bufnr)
|
||||||
new-cache (cache-filter #(not (vim.tbl_contains namespaces $1.ns))
|
new-cache (cache-filter #(not (vim.tbl_contains namespaces $1.ns))
|
||||||
current-cache)]
|
current-cache)]
|
||||||
(tset cache :diagnostics bufnr new-cache)))
|
(tset cache :diagnostics bufnr new-cache))))
|
||||||
|
|
||||||
(fn update-cache-diagnostics [bufnr diagnostics]
|
(fn update-cache-diagnostics [bufnr diagnostics]
|
||||||
(maybe-setup-buffer-cache! :diagnostics bufnr)
|
(maybe-setup-buffer-cache! :diagnostics bufnr)
|
||||||
|
@ -48,20 +50,34 @@
|
||||||
(fn update-cache-gitsigns [bufnr]
|
(fn update-cache-gitsigns [bufnr]
|
||||||
(maybe-setup-buffer-cache! :gitsigns bufnr)
|
(maybe-setup-buffer-cache! :gitsigns bufnr)
|
||||||
(clear-cache! :gitsigns bufnr)
|
(clear-cache! :gitsigns bufnr)
|
||||||
(let [signs (?. (vim.fn.sign_getplaced bufnr
|
(let [signs (api.nvim_buf_get_extmarks bufnr gitsigns-ns 0 -1
|
||||||
{:group :gitsigns_vimfn_signs_})
|
{:details true})]
|
||||||
1 :signs)]
|
(when (not (vim.tbl_isempty signs))
|
||||||
(when (not= signs nil)
|
(each [_ [_id row _col details] (pairs signs)]
|
||||||
(each [_ sign (pairs signs)]
|
(let [lnum (+ row 1)
|
||||||
(let [lnum sign.lnum
|
|
||||||
current (cached-sign :gitsigns bufnr lnum)]
|
current (cached-sign :gitsigns bufnr lnum)]
|
||||||
(when (= current nil)
|
(when (= current nil)
|
||||||
(tset cache :gitsigns bufnr lnum sign)))))))
|
(tset cache :gitsigns bufnr lnum {:name details.sign_hl_group})))))))
|
||||||
|
|
||||||
(aucmd :DiagnosticChanged
|
(aucmd :DiagnosticChanged
|
||||||
{:callback #(update-cache-diagnostics $1.buf $1.data.diagnostics)
|
{: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)))
|
||||||
:group augroup
|
:group augroup
|
||||||
:desc "Update cached diagnostic signs"})
|
: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
|
(aucmd :User {:pattern :GitSignsUpdate
|
||||||
:callback #(update-cache-gitsigns $1.buf)
|
:callback #(update-cache-gitsigns $1.buf)
|
||||||
:group augroup
|
:group augroup
|
||||||
|
@ -99,7 +115,7 @@
|
||||||
:provider " ▏"
|
:provider " ▏"
|
||||||
:hl #(if $1.has_sign $1.sign.name :StatusLineNC)
|
:hl #(if $1.has_sign $1.sign.name :StatusLineNC)
|
||||||
:on_click {:name :heirline_statuscolumn_gitsigns
|
:on_click {:name :heirline_statuscolumn_gitsigns
|
||||||
:callback (fn [self]
|
:callback (fn [_self]
|
||||||
(let [mouse (vim.fn.getmousepos)
|
(let [mouse (vim.fn.getmousepos)
|
||||||
cursor-pos [mouse.line 0]]
|
cursor-pos [mouse.line 0]]
|
||||||
(api.nvim_win_set_cursor mouse.winid
|
(api.nvim_win_set_cursor mouse.winid
|
||||||
|
@ -114,8 +130,11 @@
|
||||||
mod.gitsigns])
|
mod.gitsigns])
|
||||||
;; Diagnostic signs
|
;; Diagnostic signs
|
||||||
(set mod.diagnostic-signs
|
(set mod.diagnostic-signs
|
||||||
{:condition #(and (= b.nifoc_diagnostics_enabled 1)
|
{:condition #(let [bufnr (api.nvim_get_current_buf)
|
||||||
(> (length (vim.diagnostic.get 0)) 0))
|
buf-diagnostics (. cache :diagnostics bufnr)]
|
||||||
|
(and (= b.nifoc_diagnostics_enabled 1)
|
||||||
|
(not= buf-diagnostics nil)
|
||||||
|
(not (vim.tbl_isempty buf-diagnostics))))
|
||||||
:static {:sign-text {diagnostic.severity.ERROR " "
|
:static {:sign-text {diagnostic.severity.ERROR " "
|
||||||
diagnostic.severity.WARN " "
|
diagnostic.severity.WARN " "
|
||||||
diagnostic.severity.INFO " "
|
diagnostic.severity.INFO " "
|
||||||
|
@ -146,6 +165,5 @@
|
||||||
:scope :line})
|
:scope :line})
|
||||||
100)))}})
|
100)))}})
|
||||||
;; Debug
|
;; Debug
|
||||||
(set mod._debug_cache #cache)
|
(set mod._debug_cache #{: cache})
|
||||||
mod)
|
mod)
|
||||||
|
|
||||||
|
|
|
@ -340,14 +340,13 @@
|
||||||
"🭺"
|
"🭺"
|
||||||
"🭻"]}
|
"🭻"]}
|
||||||
:provider (fn [self]
|
:provider (fn [self]
|
||||||
(let [i (+ (math.floor (* (/ (- self.current-line
|
(let [scrollbar-icons self.scrollbar-icons-block
|
||||||
|
i (+ (math.floor (* (/ (- self.current-line
|
||||||
1)
|
1)
|
||||||
self.total-lines)
|
self.total-lines)
|
||||||
(length self.scrollbar-icons-block)))
|
(length scrollbar-icons)))
|
||||||
1)
|
1)
|
||||||
new-scrollbar (. self
|
new-scrollbar (. scrollbar-icons i)]
|
||||||
:scrollbar-icons-block
|
|
||||||
i)]
|
|
||||||
(string.rep new-scrollbar 2)))
|
(string.rep new-scrollbar 2)))
|
||||||
:hl {:fg colors.purple}})
|
:hl {:fg colors.purple}})
|
||||||
;; Search count
|
;; Search count
|
||||||
|
@ -385,4 +384,3 @@
|
||||||
:hl {:fg (. colors fg) :bg (. colors bg) :bold true}})
|
:hl {:fg (. colors fg) :bg (. colors bg) :bold true}})
|
||||||
|
|
||||||
mod)
|
mod)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
(let [miniclue (require :mini.clue)
|
(let [miniclue (require :mini.clue)
|
||||||
hipatterns (require :mini.hipatterns)]
|
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]
|
||||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-ai.md
|
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-ai.md
|
||||||
((. (require :mini.ai) :setup) {})
|
((. (require :mini.ai) :setup) {})
|
||||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-clue.md
|
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-clue.md
|
||||||
|
@ -12,6 +17,14 @@
|
||||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-comment.md
|
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-comment.md
|
||||||
((. (require :mini.comment) :setup) {})
|
((. (require :mini.comment) :setup) {})
|
||||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-completion.md
|
;; 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
|
((. (require :mini.completion) :setup) {:window {:info {:height 25
|
||||||
:width 80
|
:width 80
|
||||||
:border :rounded}
|
:border :rounded}
|
||||||
|
@ -19,7 +32,12 @@
|
||||||
:width 80
|
:width 80
|
||||||
:border :rounded}}
|
:border :rounded}}
|
||||||
:lsp_completion {:source_func :omnifunc
|
:lsp_completion {:source_func :omnifunc
|
||||||
:auto_setup false}})
|
: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"})
|
||||||
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-hipatterns.md
|
;; https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-hipatterns.md
|
||||||
(hipatterns.setup {:highlighters {:fixme {:pattern "%f[%w]()FIXME()%f[%W]"
|
(hipatterns.setup {:highlighters {:fixme {:pattern "%f[%w]()FIXME()%f[%W]"
|
||||||
:group :MiniHipatternsFixme}
|
:group :MiniHipatternsFixme}
|
||||||
|
|
|
@ -55,4 +55,3 @@
|
||||||
:callback setup-linting
|
:callback setup-linting
|
||||||
:group augroup
|
:group augroup
|
||||||
:desc "Setup Linter"})))
|
:desc "Setup Linter"})))
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
_ {: title :icon " " :color "#F8F8F2"}))
|
_ {: title :icon " " :color "#F8F8F2"}))
|
||||||
|
|
||||||
(wezterm.on :format-tab-title
|
(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)
|
(let [raw-title (extract-tab-title tab)
|
||||||
tab-info (extract-tab-info raw-title)
|
tab-info (extract-tab-info raw-title)
|
||||||
title (wezterm.truncate_right tab-info.title
|
title (wezterm.truncate_right tab-info.title
|
||||||
|
@ -91,6 +91,7 @@
|
||||||
{:Text title}
|
{:Text title}
|
||||||
; Right
|
; Right
|
||||||
{:Text " "}]))))
|
{:Text " "}]))))
|
||||||
|
;; Event: Ligatures
|
||||||
(wezterm.on :update-status
|
(wezterm.on :update-status
|
||||||
(fn [window pane]
|
(fn [window pane]
|
||||||
(local pane-id (pane:pane_id))
|
(local pane-id (pane:pane_id))
|
||||||
|
@ -121,6 +122,20 @@
|
||||||
disable-ligatures-flags)
|
disable-ligatures-flags)
|
||||||
(tset ligature-panes pane-id nil)
|
(tset ligature-panes pane-id nil)
|
||||||
(window:set_config_overrides overrides))))))
|
(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
|
;; Configuration
|
||||||
{:default_prog [_G.shells.fish :--interactive]
|
{:default_prog [_G.shells.fish :--interactive]
|
||||||
;; Appearance
|
;; Appearance
|
||||||
|
@ -155,8 +170,7 @@
|
||||||
"Apple Symbols"
|
"Apple Symbols"
|
||||||
"Apple Color Emoji"
|
"Apple Color Emoji"
|
||||||
"Noto Sans Symbols"
|
"Noto Sans Symbols"
|
||||||
"Noto Sans Symbols2"
|
"Noto Sans Symbols 2"])
|
||||||
:Unifont])
|
|
||||||
:font_size 13
|
:font_size 13
|
||||||
:line_height 0.95
|
:line_height 0.95
|
||||||
:freetype_load_target :Light
|
:freetype_load_target :Light
|
||||||
|
|
|
@ -21,8 +21,6 @@
|
||||||
|
|
||||||
../programs/btop.nix
|
../programs/btop.nix
|
||||||
|
|
||||||
../programs/fzf.nix
|
|
||||||
|
|
||||||
../programs/gallery-dl.nix
|
../programs/gallery-dl.nix
|
||||||
|
|
||||||
../programs/gpg.nix
|
../programs/gpg.nix
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
../programs/bat.nix
|
../programs/bat.nix
|
||||||
|
|
||||||
../programs/fzf.nix
|
|
||||||
|
|
||||||
../programs/jq.nix
|
../programs/jq.nix
|
||||||
|
|
||||||
../programs/scripts.nix
|
../programs/scripts.nix
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
|
|
||||||
../programs/bat.nix
|
../programs/bat.nix
|
||||||
|
|
||||||
../programs/fzf.nix
|
|
||||||
|
|
||||||
../programs/jq.nix
|
../programs/jq.nix
|
||||||
|
|
||||||
../programs/scripts.nix
|
../programs/scripts.nix
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
|
|
||||||
../programs/btop.nix
|
../programs/btop.nix
|
||||||
|
|
||||||
../programs/fzf.nix
|
|
||||||
|
|
||||||
../programs/gallery-dl.nix
|
../programs/gallery-dl.nix
|
||||||
|
|
||||||
../programs/jq.nix
|
../programs/jq.nix
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
../programs/btop.nix
|
../programs/btop.nix
|
||||||
|
|
||||||
../programs/fzf.nix
|
|
||||||
|
|
||||||
../programs/jq.nix
|
../programs/jq.nix
|
||||||
|
|
||||||
../programs/scripts.nix
|
../programs/scripts.nix
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
|
|
||||||
../programs/bat.nix
|
../programs/bat.nix
|
||||||
|
|
||||||
../programs/fzf.nix
|
|
||||||
|
|
||||||
../programs/jq.nix
|
../programs/jq.nix
|
||||||
|
|
||||||
../programs/scripts.nix
|
../programs/scripts.nix
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
header = "#6272a4";
|
header = "#6272a4";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableBashIntegration = false;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = false;
|
enableZshIntegration = true;
|
||||||
enableFishIntegration = false;
|
enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,23 +29,23 @@ in
|
||||||
};
|
};
|
||||||
mini-nvim = buildVimPlugin {
|
mini-nvim = buildVimPlugin {
|
||||||
pname = "mini.nvim";
|
pname = "mini.nvim";
|
||||||
version = "2023-10-19";
|
version = "2023-10-23";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "echasnovski";
|
owner = "echasnovski";
|
||||||
repo = "mini.nvim";
|
repo = "mini.nvim";
|
||||||
rev = "e9a0716013abb8d2d6f8d77331600fb99eb15d51";
|
rev = "66e3cdceaba8c0cd089d6f42cb95e04355718f7a";
|
||||||
sha256 = "0xws1jj4z6w12fl2dl2glfd8i4ig782gk17316h3iwx68ixv0mhs";
|
sha256 = "0sbznyd54snvvrgcj3pls1xnjg1f0b52fxdp9hsdaxivfar3qizl";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nvim-web-devicons = buildVimPlugin {
|
nvim-web-devicons = buildVimPlugin {
|
||||||
pname = "nvim-web-devicons";
|
pname = "nvim-web-devicons";
|
||||||
version = "2023-10-14";
|
version = "2023-10-21";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "kyazdani42";
|
owner = "kyazdani42";
|
||||||
repo = "nvim-web-devicons";
|
repo = "nvim-web-devicons";
|
||||||
rev = "3af745113ea537f58c4b1573b64a429fefad9e07";
|
rev = "f0267921c845c42685968401bc49aa65e18d3e09";
|
||||||
sha256 = "103spgpvwm4pv32h954sv68p6qjizkm4fdvyzndjgw9x9bah5ksh";
|
sha256 = "1qqcjaknnq7bm1rl73nzv9gfcfwx2jrxc8vh2l400m4hj0bgvp9k";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -117,34 +117,34 @@ in
|
||||||
};
|
};
|
||||||
nvim-treesitter = buildVimPlugin {
|
nvim-treesitter = buildVimPlugin {
|
||||||
pname = "nvim-treesitter";
|
pname = "nvim-treesitter";
|
||||||
version = "2023-10-19";
|
version = "2023-10-23";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nvim-treesitter";
|
owner = "nvim-treesitter";
|
||||||
repo = "nvim-treesitter";
|
repo = "nvim-treesitter";
|
||||||
rev = "eb3faef3a44641e5875581e901b0a8df8da2bde4";
|
rev = "0b50cf159283855b72f4c6b22f5ba3c9cf813b37";
|
||||||
sha256 = "0y49lf9b12y24dq3j8g7zllgmgkzzxkwkvm6vv0qdlahnn9bvcn1";
|
sha256 = "0w9hb0n5glhniqx923hvphxf8fy8p3hnwbqsa1fs9cm6bhn8gq5w";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
vim-just = buildVimPlugin {
|
vim-just = buildVimPlugin {
|
||||||
pname = "vim-just";
|
pname = "vim-just";
|
||||||
version = "2023-10-13";
|
version = "2023-10-20";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "NoahTheDuke";
|
owner = "NoahTheDuke";
|
||||||
repo = "vim-just";
|
repo = "vim-just";
|
||||||
rev = "3038ffac026a13edaf1bbb898f25d808b6b0c92a";
|
rev = "3029bdda0da9674682fe46bd6c4b946ad229dcaa";
|
||||||
sha256 = "1dh3jhfvv0vk1khxi3hfy80xnvk021vj3rrlmj3jjgarda06psmv";
|
sha256 = "0m8dbdr9pdisjnfh6x6nfs27zslnzq7wq1h9jndp810b8prngai3";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
rainbow-delimiters-nvim = buildVimPlugin {
|
rainbow-delimiters-nvim = buildVimPlugin {
|
||||||
pname = "rainbow-delimiters.nvim";
|
pname = "rainbow-delimiters.nvim";
|
||||||
version = "2023-10-17";
|
version = "2023-10-22";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "HiPhish";
|
owner = "HiPhish";
|
||||||
repo = "rainbow-delimiters.nvim";
|
repo = "rainbow-delimiters.nvim";
|
||||||
rev = "b160af1d2a2a616718c4b01cd88105a8f4c88a73";
|
rev = "9fda1322e704acfbb5a9691e2c4303368d591367";
|
||||||
sha256 = "04lmqznf3nfky64qvkvvk57h4m2g6dpbk4cjra14pkiyhacjlpqz";
|
sha256 = "1crd6ybikdk768xsm769xvzia8wkg0hx9bh9h3nyak0gj779zdc4";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -161,12 +161,12 @@ in
|
||||||
};
|
};
|
||||||
telescope-nvim = buildVimPlugin {
|
telescope-nvim = buildVimPlugin {
|
||||||
pname = "telescope.nvim";
|
pname = "telescope.nvim";
|
||||||
version = "2023-10-11";
|
version = "2023-10-23";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nvim-telescope";
|
owner = "nvim-telescope";
|
||||||
repo = "telescope.nvim";
|
repo = "telescope.nvim";
|
||||||
rev = "74ce793a60759e3db0d265174f137fb627430355";
|
rev = "4522d7e3ea75ffddabdc39957168a8a7060b5df0";
|
||||||
sha256 = "1m4v097y8ypjm572k1qqii3z56w4x1dsjxd6gp0z24xqyvd4kpa4";
|
sha256 = "143bdqxfzlfbjrd80pw4wkz95szp21qs1zn7i230sdavvrq00b3b";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -219,12 +219,12 @@ in
|
||||||
};
|
};
|
||||||
nvim-lspconfig = buildVimPlugin {
|
nvim-lspconfig = buildVimPlugin {
|
||||||
pname = "nvim-lspconfig";
|
pname = "nvim-lspconfig";
|
||||||
version = "2023-10-16";
|
version = "2023-10-23";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "neovim";
|
owner = "neovim";
|
||||||
repo = "nvim-lspconfig";
|
repo = "nvim-lspconfig";
|
||||||
rev = "e49b1e90c1781ce372013de3fa93a91ea29fc34a";
|
rev = "6428fcab6f3c09e934bc016c329806314384a41e";
|
||||||
sha256 = "0pb33c3dgv6pvn6avc6zrbfrzr63wd9hxkz5rz6y05w633d61mc8";
|
sha256 = "02hvjlk9i63xxrx52xvvrx0bhqajbhrdjvg6ws291dwmxyz285rs";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -263,23 +263,23 @@ in
|
||||||
};
|
};
|
||||||
nvim-lint = buildVimPlugin {
|
nvim-lint = buildVimPlugin {
|
||||||
pname = "nvim-lint";
|
pname = "nvim-lint";
|
||||||
version = "2023-10-19";
|
version = "2023-10-22";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mfussenegger";
|
owner = "mfussenegger";
|
||||||
repo = "nvim-lint";
|
repo = "nvim-lint";
|
||||||
rev = "e366dc5ed4002d3489d03200c0b132ce2b1ba532";
|
rev = "a4b0511a9e757e78c8c9f9d3f201e0d8ff158b42";
|
||||||
sha256 = "0azmih7djcnfg58wdcmpsr90nvhlqvr3km7h4dv69hh3xjp06qma";
|
sha256 = "0laj6z74r3nz497nkgpyx9kvc5111hiaia57h5jx4qvajml9ysl1";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
conform-nvim = buildVimPlugin {
|
conform-nvim = buildVimPlugin {
|
||||||
pname = "conform.nvim";
|
pname = "conform.nvim";
|
||||||
version = "2023-10-19";
|
version = "2023-10-22";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "stevearc";
|
owner = "stevearc";
|
||||||
repo = "conform.nvim";
|
repo = "conform.nvim";
|
||||||
rev = "55abaaa9ed4684cd9ba8f0c062379be6cf41b8f3";
|
rev = "7f5ff6d253ae3543f186787bccafdc411d3f4b0a";
|
||||||
sha256 = "1nl7qqm61rin8v8xl11qlfajwqjmwzz4x79mwwcrml2d387nksbn";
|
sha256 = "1iargrkz4k51bppp7qm2hlqy334x1qjg0d1ax8dr6qpkhi6al36v";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -307,12 +307,12 @@ in
|
||||||
};
|
};
|
||||||
indent-blankline-nvim = buildVimPlugin {
|
indent-blankline-nvim = buildVimPlugin {
|
||||||
pname = "indent-blankline.nvim";
|
pname = "indent-blankline.nvim";
|
||||||
version = "2023-10-19";
|
version = "2023-10-23";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lukas-reineke";
|
owner = "lukas-reineke";
|
||||||
repo = "indent-blankline.nvim";
|
repo = "indent-blankline.nvim";
|
||||||
rev = "8a7b48f5823cc924f815129192288ec2e2b9288f";
|
rev = "2546441840172cc41e70f67c52e205cc7aa3e6ed";
|
||||||
sha256 = "000mvx49b92ndhgpa8p3a2a089vpn1rqgkn8l09mgmbnpcgn3ib6";
|
sha256 = "00p9dyqaa6h67pnkn5wh4iyvi8ydpnyqvbq5n6jk82c5c48h2s2s";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -51,6 +51,16 @@
|
||||||
format = "\\[[$symbol($version)]($style)\\]";
|
format = "\\[[$symbol($version)]($style)\\]";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
os = {
|
||||||
|
disabled = true;
|
||||||
|
format = "$symbol";
|
||||||
|
|
||||||
|
symbols = {
|
||||||
|
Macos = " ";
|
||||||
|
NixOS = " ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
package = {
|
package = {
|
||||||
symbol = " ";
|
symbol = " ";
|
||||||
format = "\\[[$symbol$version]($style)\\]";
|
format = "\\[[$symbol$version]($style)\\]";
|
||||||
|
|
|
@ -4,7 +4,7 @@ let
|
||||||
default-system = "x86_64-linux";
|
default-system = "x86_64-linux";
|
||||||
|
|
||||||
# overlay-master = _: _: { pkgs-master = import inputs.nixpkgs-master { system = default-system; }; };
|
# overlay-master = _: _: { pkgs-master = import inputs.nixpkgs-master { system = default-system; }; };
|
||||||
overlay-deploy-rs = _: _: { inherit (inputs.deploy-rs.packages.${default-system}) deploy-rs; };
|
overlay-deploy-rs = _: _: { inherit (deploy-rs.packages.${default-system}) deploy-rs; };
|
||||||
overlay-nifoc = inputs.nifoc-overlay.overlay;
|
overlay-nifoc = inputs.nifoc-overlay.overlay;
|
||||||
|
|
||||||
nixpkgsConfig = {
|
nixpkgsConfig = {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
certs = {
|
certs = {
|
||||||
"kempkens.io" = {
|
"kempkens.io" = {
|
||||||
domain = "*.kempkens.io";
|
extraDomainNames = [ "*.kempkens.io" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"daniel.sx" = {
|
"daniel.sx" = {
|
||||||
|
|
|
@ -1,9 +1,162 @@
|
||||||
{ pkgs, ... }:
|
{ 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 = {
|
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
|
# Documentation
|
||||||
virtualHosts = builtins.listToAttrs (builtins.map
|
|
||||||
(domain: {
|
(domain: {
|
||||||
name = domain;
|
name = domain;
|
||||||
value = {
|
value = {
|
||||||
|
@ -11,7 +164,7 @@
|
||||||
http3 = true;
|
http3 = true;
|
||||||
kTLS = true;
|
kTLS = true;
|
||||||
|
|
||||||
root = "${pkgs.website-docs-nifoc-pw}/site/${domain}";
|
root = "${docs-nifoc-pw}/site/${domain}";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
useACMEHost = "nifoc.pw";
|
useACMEHost = "nifoc.pw";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue