Compare commits
3 Commits
main
...
fdaa327ab8
| Author | SHA1 | Date | |
|---|---|---|---|
| fdaa327ab8 | |||
| 9ec68b1939 | |||
| 34dd35f575 |
@@ -1,35 +0,0 @@
|
|||||||
local hydra_repl = "hydra-repl"
|
|
||||||
|
|
||||||
if not vim.fn.executable(hydra_repl) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local function send(lines)
|
|
||||||
vim.system({ hydra_repl, table.concat(lines, "\n") })
|
|
||||||
end
|
|
||||||
|
|
||||||
local function get_paragraph(buf)
|
|
||||||
local start_ = vim.fn.search("^$", "bnW")
|
|
||||||
local end_ = vim.fn.search("^$", "nW") - 1
|
|
||||||
if end_ < vim.api.nvim_win_get_cursor(0)[1] then
|
|
||||||
end_ = vim.api.nvim_buf_line_count(buf)
|
|
||||||
end
|
|
||||||
return vim.api.nvim_buf_get_lines(buf, start_, end_, false)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function get_selection(buf)
|
|
||||||
return vim.api.nvim_buf_get_lines(buf, vim.fn.line("'<") - 1, vim.fn.line("'>"), false)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = "javascript",
|
|
||||||
callback = function(e)
|
|
||||||
if vim.fn.fnamemodify(vim.api.nvim_buf_get_name(e.buf), ":e") ~= "hydra" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local buf = e.buf
|
|
||||||
vim.keymap.set("n", "<CR>", function() send(get_paragraph(buf)) end, { buffer = buf, desc = "hydra: send block" })
|
|
||||||
vim.keymap.set("v", "<CR>", function() send(get_selection(buf)) end, { buffer = buf, desc = "hydra: send selection" })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
@@ -13,16 +13,11 @@ nm <leader>ww <plug>(wiki-index)
|
|||||||
" nm <leader>s <plug>(wiki-link-follow-split)
|
" nm <leader>s <plug>(wiki-link-follow-split)
|
||||||
" nm <leader>v <plug>(wiki-link-follow-vsplit)
|
" nm <leader>v <plug>(wiki-link-follow-vsplit)
|
||||||
|
|
||||||
function! ZKContextualEcho()
|
autocmd BufEnter *.md if expand('%:t') =~ '_' | echo 'hierarchical relation' | endif
|
||||||
let l:name = expand('%:t')
|
autocmd BufEnter *.md if expand('%:t') =~ '--' | echo 'relation' | endif
|
||||||
if l:name =~ '_' | echo 'hierarchical relation'
|
autocmd BufEnter *.md if expand('%:t') =~ '<>' | echo 'dichotomy' | endif
|
||||||
elseif l:name =~ '--' | echo 'relation'
|
autocmd BufEnter *.md if expand('%:t') =~ 'my-' | echo 'personal file' | endif
|
||||||
elseif l:name =~ '<>' | echo 'dichotomy'
|
autocmd BufEnter *.md if expand('%:t') =~ 'project_' | echo 'project file' | endif
|
||||||
elseif l:name =~ 'my-' | echo 'personal file'
|
|
||||||
elseif l:name =~ 'project_' | echo 'project file'
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
execute 'autocmd BufEnter' g:zk_path . '/*.md' 'call ZKContextualEcho()'
|
|
||||||
|
|
||||||
" Only load wiki.vim for zk directory
|
" Only load wiki.vim for zk directory
|
||||||
let g:wiki_index_name='index'
|
let g:wiki_index_name='index'
|
||||||
|
|||||||
12
dots/.config/nvim/flake.lock
generated
12
dots/.config/nvim/flake.lock
generated
@@ -42,11 +42,11 @@
|
|||||||
},
|
},
|
||||||
"nixCats": {
|
"nixCats": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777273601,
|
"lastModified": 1774835836,
|
||||||
"narHash": "sha256-xBUa8Tl9V7IXI+VmLEuDc81La/EhoSn1C3EVSnJ3cfU=",
|
"narHash": "sha256-6ok7iv/9R82vl6MYe3Lwyyb6S5bmW2PxEZtmjzlqyPs=",
|
||||||
"owner": "BirdeeHub",
|
"owner": "BirdeeHub",
|
||||||
"repo": "nixCats-nvim",
|
"repo": "nixCats-nvim",
|
||||||
"rev": "f69ea013e328841a7def7037ed59788a76be8816",
|
"rev": "ebb9f279a55ca60ff4e37e4accf6518dc627aa8d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -73,11 +73,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777270315,
|
"lastModified": 1775608838,
|
||||||
"narHash": "sha256-yKB4G6cKsQsWN7M6rZGk6gkJPDNPIzT05y4qzRyCDlI=",
|
"narHash": "sha256-2ySoGH+SAi34U0PeuQgABC0WiH9LQ3tkyHTiE93KUeg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6368eda62c9775c38ef7f714b2555a741c20c72d",
|
"rev": "9a01fad67a57e44e1b3e1d905c6881bcfb209e8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -45,23 +45,7 @@
|
|||||||
inherit (nixCats) utils;
|
inherit (nixCats) utils;
|
||||||
luaPath = ./.;
|
luaPath = ./.;
|
||||||
forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all;
|
forEachSystem = utils.eachSystem nixpkgs.lib.platforms.all;
|
||||||
extra_pkg_config = {
|
extra_pkg_config = { };
|
||||||
allowUnfreePredicate =
|
|
||||||
pkg:
|
|
||||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
|
||||||
"vim-sandwich"
|
|
||||||
"jupytext.nvim"
|
|
||||||
"eyeliner.nvim"
|
|
||||||
"context_filetype.vim"
|
|
||||||
"editorconfig-vim"
|
|
||||||
"unicode.vim"
|
|
||||||
"quarto-nvim"
|
|
||||||
"vim-openscad"
|
|
||||||
"lsp_lines.nvim"
|
|
||||||
"nvim-highlight-colors"
|
|
||||||
"nvim-lint"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
mkDependencyOverlays = system: [
|
mkDependencyOverlays = system: [
|
||||||
(utils.standardPluginOverlay inputs)
|
(utils.standardPluginOverlay inputs)
|
||||||
@@ -87,11 +71,9 @@
|
|||||||
{
|
{
|
||||||
lspsAndRuntimeDeps = with pkgs; {
|
lspsAndRuntimeDeps = with pkgs; {
|
||||||
general = [
|
general = [
|
||||||
nodejs_24
|
|
||||||
black
|
black
|
||||||
clang
|
clang
|
||||||
clang-tools
|
clang-tools
|
||||||
curl # → plenary-nvim, mcp-hub
|
|
||||||
delta
|
delta
|
||||||
emmet-language-server
|
emmet-language-server
|
||||||
eslint_d
|
eslint_d
|
||||||
@@ -105,8 +87,6 @@
|
|||||||
mcp-hub
|
mcp-hub
|
||||||
nixd
|
nixd
|
||||||
nixfmt
|
nixfmt
|
||||||
prettier
|
|
||||||
typescript-language-server
|
|
||||||
ormolu
|
ormolu
|
||||||
prettierd
|
prettierd
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
@@ -115,7 +95,6 @@
|
|||||||
stylelint
|
stylelint
|
||||||
stylua
|
stylua
|
||||||
tree-sitter
|
tree-sitter
|
||||||
tailwindcss-language-server
|
|
||||||
typescript-language-server
|
typescript-language-server
|
||||||
vscode-langservers-extracted
|
vscode-langservers-extracted
|
||||||
vtsls
|
vtsls
|
||||||
|
|||||||
@@ -9,6 +9,5 @@ vim.filetype.add({
|
|||||||
["%.env.*"] = "dotenv",
|
["%.env.*"] = "dotenv",
|
||||||
["%.pl$"] = "prolog",
|
["%.pl$"] = "prolog",
|
||||||
[".*.containerfile.*"] = "dockerfile",
|
[".*.containerfile.*"] = "dockerfile",
|
||||||
["%.hydra$"] = "javascript",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -13,19 +13,13 @@ local function get_markdown_files(base)
|
|||||||
return items
|
return items
|
||||||
end
|
end
|
||||||
|
|
||||||
function source:get_keyword_pattern()
|
|
||||||
return "[%w%./%-]*"
|
|
||||||
end
|
|
||||||
|
|
||||||
function source:complete(params, callback)
|
function source:complete(params, callback)
|
||||||
local cursor_before_line = params.context.cursor_before_line
|
local cursor_before_line = params.context.cursor_before_line
|
||||||
local cursor_after_line = params.context.cursor_after_line or ""
|
local cursor_after_line = params.context.cursor_after_line or ""
|
||||||
|
|
||||||
if not cursor_before_line:match("%[[^%]]*%]%(") then
|
local trigger = cursor_before_line:match("%[[^%]]*%]%(([^)]*)$")
|
||||||
callback({})
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
|
if trigger ~= nil then
|
||||||
local items = get_markdown_files(".")
|
local items = get_markdown_files(".")
|
||||||
local next_char = cursor_after_line:sub(1, 1)
|
local next_char = cursor_after_line:sub(1, 1)
|
||||||
|
|
||||||
@@ -38,6 +32,9 @@ function source:complete(params, callback)
|
|||||||
end
|
end
|
||||||
|
|
||||||
callback(items)
|
callback(items)
|
||||||
|
else
|
||||||
|
callback({})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function source:get_trigger_characters()
|
function source:get_trigger_characters()
|
||||||
|
|||||||
1
dots/.config/tmux/hooks/tmux.ssh.conf
Normal file
1
dots/.config/tmux/hooks/tmux.ssh.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
set -g status-style bg=colour12,fg=colour0
|
||||||
@@ -70,6 +70,8 @@ set -g status-right '#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") %a %l:%M:%S
|
|||||||
|
|
||||||
set -g default-terminal "tmux-256color"
|
set -g default-terminal "tmux-256color"
|
||||||
|
|
||||||
|
set-hook -g after-new-session 'if -F "#{==:#{session_name},ssh}" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.ssh.conf" "source ${XDG_CONFIG_HOME}/tmux/hooks/tmux.regular.conf"'
|
||||||
|
|
||||||
# Vi copypaste mode
|
# Vi copypaste mode
|
||||||
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'
|
if-shell "test '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -ge 4 \)'" 'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel'
|
||||||
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection'
|
if-shell '\( #{$TMUX_VERSION_MAJOR} -eq 2 -a #{$TMUX_VERSION_MINOR} -lt 4\) -o #{$TMUX_VERSION_MAJOR} -le 1' 'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection'
|
||||||
|
|||||||
78
flake.lock
generated
78
flake.lock
generated
@@ -38,11 +38,11 @@
|
|||||||
"base16-helix": {
|
"base16-helix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776754714,
|
"lastModified": 1760703920,
|
||||||
"narHash": "sha256-E3OAK27smtATTmX45uoTSRsVD+Y+ZiVVfgM/tjpbtYg=",
|
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-helix",
|
"repo": "base16-helix",
|
||||||
"rev": "4d508123037e7851ad36ebf7d9c48b0e9e1eb581",
|
"rev": "d646af9b7d14bff08824538164af99d0c521b185",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -121,11 +121,11 @@
|
|||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "pkgs/firefox-addons",
|
"dir": "pkgs/firefox-addons",
|
||||||
"lastModified": 1778040175,
|
"lastModified": 1777176175,
|
||||||
"narHash": "sha256-SSXJp3BMjO2LrW/VLjNdGGcjd3RFEyV4FemYA6OGrYw=",
|
"narHash": "sha256-l/0TJCLEarrsyHIKNhAjI4+7lkyGsFqojyx1X1h64Ks=",
|
||||||
"owner": "rycee",
|
"owner": "rycee",
|
||||||
"repo": "nur-expressions",
|
"repo": "nur-expressions",
|
||||||
"rev": "3bd76b0f41e65661866bddcac57ebe83aeadb581",
|
"rev": "515c8c1296021efe49ba1b1318ff27a43e93442b",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -138,11 +138,11 @@
|
|||||||
"firefox-gnome-theme": {
|
"firefox-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776136500,
|
"lastModified": 1775176642,
|
||||||
"narHash": "sha256-r0gN2brVWA351zwMV0Flmlcd6SGMvYqFbvC3DfKFM8Y=",
|
"narHash": "sha256-2veEED0Fg7Fsh81tvVDNYR6SzjqQxa7hbi18Jv4LWpM=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "firefox-gnome-theme",
|
"repo": "firefox-gnome-theme",
|
||||||
"rev": "0f8ba203d475587f477e7ae12661bd8459e225b7",
|
"rev": "179704030c5286c729b5b0522037d1d51341022c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -342,11 +342,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778009629,
|
"lastModified": 1777196875,
|
||||||
"narHash": "sha256-nUoQtf4Zq7DRYJrfv904hjrxjAlWVP6a1pNNFKx3FCg=",
|
"narHash": "sha256-6M/rTHxFRdKJ6WZYxrCl68qIyh3BvjWBmYC7Vufolbg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "00ed86e58bb6979a7921859fd1615d19382eac5c",
|
"rev": "38bf0202cae280174cbb80fc24a63978f16333f7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -415,11 +415,11 @@
|
|||||||
},
|
},
|
||||||
"nixCats": {
|
"nixCats": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777273601,
|
"lastModified": 1774835836,
|
||||||
"narHash": "sha256-xBUa8Tl9V7IXI+VmLEuDc81La/EhoSn1C3EVSnJ3cfU=",
|
"narHash": "sha256-6ok7iv/9R82vl6MYe3Lwyyb6S5bmW2PxEZtmjzlqyPs=",
|
||||||
"owner": "BirdeeHub",
|
"owner": "BirdeeHub",
|
||||||
"repo": "nixCats-nvim",
|
"repo": "nixCats-nvim",
|
||||||
"rev": "f69ea013e328841a7def7037ed59788a76be8816",
|
"rev": "ebb9f279a55ca60ff4e37e4accf6518dc627aa8d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -451,11 +451,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777917524,
|
"lastModified": 1776983936,
|
||||||
"narHash": "sha256-k+LVe9YaO2BEPB9AaCtTtOMCeGi4dxDo6gt4Un3qoPY=",
|
"narHash": "sha256-ZOQyNqSvJ8UdrrqU1p7vaFcdL53idK+LOM8oRWEWh6o=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "df7783100babf59001340a7a874ba3824e441ecb",
|
"rev": "2096f3f411ce46e88a79ae4eafcfc9df8ed41c61",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -467,11 +467,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777954456,
|
"lastModified": 1776877367,
|
||||||
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
|
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
|
"rev": "0726a0ecb6d4e08f6adced58726b95db924cef57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -509,11 +509,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777598946,
|
"lastModified": 1775228139,
|
||||||
"narHash": "sha256-X239dAGaU1+gfDj8jKH8GzlqKMcxaVfXOio+uzBOkeE=",
|
"narHash": "sha256-ebbeHmg+V7w8050bwQOuhmQHoLOEOfqKzM1KgCTexK4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "5d55af01c0f86be583931fe99207fc56c14134b3",
|
"rev": "601971b9c89e0304561977f2c28fa25e73aa7132",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -665,11 +665,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777944972,
|
"lastModified": 1776771786,
|
||||||
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
|
"narHash": "sha256-DRFGPfFV6hbrfO9a1PH1FkCi7qR5FgjSqsQGGvk1rdI=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
|
"rev": "bef289e2248991f7afeb95965c82fbcd8ff72598",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -714,11 +714,11 @@
|
|||||||
"tinted-zed": "tinted-zed"
|
"tinted-zed": "tinted-zed"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777835090,
|
"lastModified": 1776893932,
|
||||||
"narHash": "sha256-VLH8zPweblCOvpnQXp4fVs7f6Q79YhXF5XFKlOrvIFk=",
|
"narHash": "sha256-AFD5cf9eNqXq1brHS63xeZy2xKZMgG9J86XJ9I2eLn8=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "7989a1054b01153212dede6005abfd1576b8328c",
|
"rev": "84971726c7ef0bb3669a5443e151cc226e65c518",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -776,11 +776,11 @@
|
|||||||
"tinted-schemes": {
|
"tinted-schemes": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777041405,
|
"lastModified": 1772661346,
|
||||||
"narHash": "sha256-BAGZ7ObFV/9Z61OJZun7ifPyhkuHqNuW1QIhQ8LuzCo=",
|
"narHash": "sha256-4eu3LqB9tPqe0Vaqxd4wkZiBbthLbpb7llcoE/p5HT0=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "schemes",
|
"repo": "schemes",
|
||||||
"rev": "5f868b3a338b6904c47f3833b9c411be641983a8",
|
"rev": "13b5b0c299982bb361039601e2d72587d6846294",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -792,11 +792,11 @@
|
|||||||
"tinted-tmux": {
|
"tinted-tmux": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777169200,
|
"lastModified": 1772934010,
|
||||||
"narHash": "sha256-h7dDbIzP5hDr9v97w9PL6jdAgXawmj6krcH+959rqpU=",
|
"narHash": "sha256-x+6+4UvaG+RBRQ6UaX+o6DjEg28u4eqhVRM9kpgJGjQ=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "tinted-tmux",
|
"repo": "tinted-tmux",
|
||||||
"rev": "f798c2dce44ef815bb6b8f05a82135c7942d35ac",
|
"rev": "c3529673a5ab6e1b6830f618c45d9ce1bcdd829d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -808,11 +808,11 @@
|
|||||||
"tinted-zed": {
|
"tinted-zed": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777463218,
|
"lastModified": 1772909925,
|
||||||
"narHash": "sha256-Bhkozqtq3BKLqWTlmKm8uAptfX4aRGI8QX3eEL54Vpc=",
|
"narHash": "sha256-jx/5+pgYR0noHa3hk2esin18VMbnPSvWPL5bBjfTIAU=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-zed",
|
"repo": "base16-zed",
|
||||||
"rev": "5768d08ed2e7944a26a958868cdb073cb8856dae",
|
"rev": "b4d3a1b3bcbd090937ef609a0a3b37237af974df",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -76,10 +76,7 @@
|
|||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/${host}
|
./hosts/${host}
|
||||||
{
|
{ nixpkgs.hostPlatform = (myUtils.hostMeta ./hosts/${host}).system; }
|
||||||
nixpkgs.hostPlatform = (myUtils.hostMeta ./hosts/${host}).system;
|
|
||||||
host.name = host;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit
|
inherit
|
||||||
|
|||||||
@@ -47,10 +47,7 @@
|
|||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
modeling.enable = true;
|
modeling.enable = true;
|
||||||
};
|
};
|
||||||
ai-tools = {
|
ai-tools.opencode.enable = true;
|
||||||
claude-code.enable = true;
|
|
||||||
opencode.enable = true;
|
|
||||||
};
|
|
||||||
browser.primary = "librewolf";
|
browser.primary = "librewolf";
|
||||||
cloud.hetzner.enable = true;
|
cloud.hetzner.enable = true;
|
||||||
comms.signal.enable = true;
|
comms.signal.enable = true;
|
||||||
|
|||||||
@@ -43,10 +43,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
modules."3d".printing.enable = true;
|
modules."3d".printing.enable = true;
|
||||||
ai-tools = {
|
ai-tools.opencode.enable = true;
|
||||||
claude-code.enable = true;
|
|
||||||
opencode.enable = true;
|
|
||||||
};
|
|
||||||
browser.primary = "librewolf";
|
browser.primary = "librewolf";
|
||||||
cloud.hetzner.enable = true;
|
cloud.hetzner.enable = true;
|
||||||
comms.signal.enable = true;
|
comms.signal.enable = true;
|
||||||
|
|||||||
@@ -73,11 +73,8 @@
|
|||||||
tirith.enable = true;
|
tirith.enable = true;
|
||||||
opencode.enable = true;
|
opencode.enable = true;
|
||||||
};
|
};
|
||||||
database = {
|
database.mssql.enable = true;
|
||||||
mssql.enable = true;
|
database.postgresql.enable = true;
|
||||||
postgresql.enable = true;
|
|
||||||
redis.enable = true;
|
|
||||||
};
|
|
||||||
git.github.enable = true;
|
git.github.enable = true;
|
||||||
git.gitlab.enable = true;
|
git.gitlab.enable = true;
|
||||||
secrets.vault.enable = true;
|
secrets.vault.enable = true;
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.ai-tools.claude-code;
|
|
||||||
rtk-version = "0.18.1";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.ai-tools.claude-code.enable = lib.mkEnableOption "claude code with rtk and ccline";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
programs.claude-code.enable = true;
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
(stdenv.mkDerivation {
|
|
||||||
name = "ccline";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
|
|
||||||
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
|
|
||||||
};
|
|
||||||
unpackPhase = "tar xzf $src";
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp ccline $out/bin/
|
|
||||||
chmod +x $out/bin/ccline
|
|
||||||
'';
|
|
||||||
meta = {
|
|
||||||
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
|
|
||||||
homepage = "https://github.com/Haleclipse/CCometixLine";
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(stdenv.mkDerivation {
|
|
||||||
name = "rtk-${rtk-version}";
|
|
||||||
version = rtk-version;
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/rtk-ai/rtk/releases/download/v${rtk-version}/rtk-x86_64-unknown-linux-gnu.tar.gz";
|
|
||||||
hash = "sha256-XoTia5K8b00OzcKYCufwx8ApkAS31DxUCpGSU0jFs2Q=";
|
|
||||||
};
|
|
||||||
unpackPhase = "tar xzf $src";
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp rtk $out/bin/
|
|
||||||
chmod +x $out/bin/rtk
|
|
||||||
'';
|
|
||||||
meta = {
|
|
||||||
description = "RTK - AI coding tool enhancer";
|
|
||||||
homepage = "https://www.rtk-ai.app";
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
mcp-nixos
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,116 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
lib,
|
||||||
./claude-code.nix
|
config,
|
||||||
./opencode.nix
|
pkgs,
|
||||||
./skills.nix
|
...
|
||||||
./tirith.nix
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.ai-tools;
|
||||||
|
rtk-version = "0.18.1";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.ai-tools = {
|
||||||
|
claude-code.enable = lib.mkEnableOption "claude code with rtk and ccline";
|
||||||
|
tirith.enable = lib.mkEnableOption "tirith shell security guard";
|
||||||
|
opencode.enable = lib.mkEnableOption "opencode";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkMerge [
|
||||||
|
(lib.mkIf cfg.claude-code.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
claude-code
|
||||||
|
(pkgs.stdenv.mkDerivation {
|
||||||
|
name = "ccline";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/Haleclipse/CCometixLine/releases/download/v1.0.8/ccline-linux-x64.tar.gz";
|
||||||
|
hash = "sha256-Joe3Dd6uSMGi66QT6xr2oY/Tz8rA5RuKa6ckBVJIzI0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
tar xzf $src
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ccline $out/bin/
|
||||||
|
chmod +x $out/bin/ccline
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with pkgs.lib; {
|
||||||
|
description = "CCometixLine Linux x64 CLI (Claude Code statusline)";
|
||||||
|
homepage = "https://github.com/Haleclipse/CCometixLine";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(pkgs.stdenv.mkDerivation {
|
||||||
|
name = "rtk-${rtk-version}";
|
||||||
|
version = rtk-version;
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/rtk-ai/rtk/releases/download/v${rtk-version}/rtk-x86_64-unknown-linux-gnu.tar.gz";
|
||||||
|
hash = "sha256-XoTia5K8b00OzcKYCufwx8ApkAS31DxUCpGSU0jFs2Q=";
|
||||||
|
};
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
tar xzf $src
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp rtk $out/bin/
|
||||||
|
chmod +x $out/bin/rtk
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with pkgs.lib; {
|
||||||
|
description = "RTK - AI coding tool enhancer";
|
||||||
|
homepage = "https://www.rtk-ai.app";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
mcp-nixos
|
||||||
|
];
|
||||||
|
})
|
||||||
|
(lib.mkIf cfg.tirith.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
tirith
|
||||||
|
];
|
||||||
|
})
|
||||||
|
(lib.mkIf (cfg.tirith.enable && cfg.claude-code.enable) {
|
||||||
|
home.file.".claude/hooks/tirith-check.py" = {
|
||||||
|
source = ./tirith-check.py;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.activation.tirith-claude-code = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
${pkgs.tirith}/bin/tirith setup claude-code --with-mcp --scope user --force 2>/dev/null || true
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
(lib.mkIf cfg.opencode.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
opencode
|
||||||
|
];
|
||||||
|
home.file.".config/opencode/opencode.json".text = builtins.toJSON {
|
||||||
|
"$schema" = "https://opencode.ai/config.json";
|
||||||
|
permission = {
|
||||||
|
external_directory = {
|
||||||
|
"/run/secrets/" = "deny";
|
||||||
|
"~/.config/sops/age/keys.txt" = "deny";
|
||||||
|
"~/.ssh/id_rsa" = "deny";
|
||||||
|
"~/.ssh/id_ed25519" = "deny";
|
||||||
|
"~/.ssh/id_ecdsa" = "deny";
|
||||||
|
"~/.ssh/id_dsa" = "deny";
|
||||||
|
"/etc/ssh/ssh_host_rsa_key" = "deny";
|
||||||
|
"/etc/ssh/ssh_host_ed25519_key" = "deny";
|
||||||
|
"/etc/ssh/ssh_host_ecdsa_key" = "deny";
|
||||||
|
"/etc/ssh/ssh_host_dsa_key" = "deny";
|
||||||
|
};
|
||||||
|
command = {
|
||||||
|
sops = "deny";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
plugin = [ "@mohak34/opencode-notifier@latest" ];
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.ai-tools.opencode;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.ai-tools.opencode = {
|
|
||||||
enable = lib.mkEnableOption "opencode";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
home.packages = [ pkgs.opencode ];
|
|
||||||
|
|
||||||
home.file.".config/opencode/opencode.json".text = builtins.toJSON {
|
|
||||||
"$schema" = "https://opencode.ai/config.json";
|
|
||||||
permission = {
|
|
||||||
external_directory = {
|
|
||||||
"/run/secrets/" = "deny";
|
|
||||||
"~/.config/sops/age/keys.txt" = "deny";
|
|
||||||
"~/.ssh/id_rsa" = "deny";
|
|
||||||
"~/.ssh/id_ed25519" = "deny";
|
|
||||||
"~/.ssh/id_ecdsa" = "deny";
|
|
||||||
"~/.ssh/id_dsa" = "deny";
|
|
||||||
"/etc/ssh/ssh_host_rsa_key" = "deny";
|
|
||||||
"/etc/ssh/ssh_host_ed25519_key" = "deny";
|
|
||||||
"/etc/ssh/ssh_host_ecdsa_key" = "deny";
|
|
||||||
"/etc/ssh/ssh_host_dsa_key" = "deny";
|
|
||||||
};
|
|
||||||
command = {
|
|
||||||
sops = "deny";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
plugin = [ "@mohak34/opencode-notifier@latest" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.ai-tools.claude-code;
|
|
||||||
|
|
||||||
skillType = lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
owner = lib.mkOption { type = lib.types.str; };
|
|
||||||
repo = lib.mkOption { type = lib.types.str; };
|
|
||||||
rev = lib.mkOption { type = lib.types.str; };
|
|
||||||
hash = lib.mkOption { type = lib.types.str; };
|
|
||||||
skill = lib.mkOption { type = lib.types.str; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fetchSkill =
|
|
||||||
skill:
|
|
||||||
let
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
inherit (skill)
|
|
||||||
owner
|
|
||||||
repo
|
|
||||||
rev
|
|
||||||
hash
|
|
||||||
;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
name = ".claude/skills/${skill.skill}";
|
|
||||||
value = {
|
|
||||||
source = "${src}/${skill.skill}";
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.ai-tools.claude-code.skills = lib.mkOption {
|
|
||||||
type = lib.types.listOf skillType;
|
|
||||||
default = [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
home.file = builtins.listToAttrs (map fetchSkill cfg.skills);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.ai-tools.tirith;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.ai-tools.tirith = {
|
|
||||||
enable = lib.mkEnableOption "tirith shell security guard";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf cfg.enable {
|
|
||||||
home.packages = [ pkgs.tirith ];
|
|
||||||
})
|
|
||||||
(lib.mkIf (cfg.enable && config.ai-tools.claude-code.enable) {
|
|
||||||
home.file.".claude/hooks/tirith-check.py" = {
|
|
||||||
source = ./tirith-check.py;
|
|
||||||
executable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.activation.tirith-claude-code = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
||||||
${pkgs.tirith}/bin/tirith setup claude-code --with-mcp --scope user --force 2>/dev/null || true
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -9,18 +9,14 @@
|
|||||||
options.database = {
|
options.database = {
|
||||||
mssql.enable = lib.mkEnableOption "MSSQL";
|
mssql.enable = lib.mkEnableOption "MSSQL";
|
||||||
postgresql.enable = lib.mkEnableOption "PostgreSQL";
|
postgresql.enable = lib.mkEnableOption "PostgreSQL";
|
||||||
redis.enable = lib.mkEnableOption "Redis";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
(lib.mkIf config.database.mssql.enable {
|
(lib.mkIf config.database.mssql.enable {
|
||||||
home.packages = with pkgs; [ (config.nixgl.wrap dbeaver-bin) ];
|
home.packages = [ (config.nixgl.wrap pkgs.dbeaver-bin) ];
|
||||||
})
|
})
|
||||||
(lib.mkIf config.database.postgresql.enable {
|
(lib.mkIf config.database.postgresql.enable {
|
||||||
home.packages = with pkgs; [ (config.nixgl.wrap pgadmin4-desktopmode) ];
|
home.packages = [ (config.nixgl.wrap pkgs.pgadmin4-desktopmode) ];
|
||||||
})
|
|
||||||
(lib.mkIf config.database.postgresql.enable {
|
|
||||||
home.packages = with pkgs; [ redis ];
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ in
|
|||||||
clock-show-weekday = true;
|
clock-show-weekday = true;
|
||||||
color-scheme = "prefer-dark";
|
color-scheme = "prefer-dark";
|
||||||
enable-hot-corners = false;
|
enable-hot-corners = false;
|
||||||
# font-name = font;
|
font-name = font;
|
||||||
locate-pointer = true;
|
locate-pointer = true;
|
||||||
monospace-font-name = font;
|
monospace-font-name = font;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,5 +11,9 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = builtins.readFile (dotsPath + "/.config/tmux/tmux.conf");
|
extraConfig = builtins.readFile (dotsPath + "/.config/tmux/tmux.conf");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
".config/tmux/hooks/tmux.ssh.conf".source = dotsPath + "/.config/tmux/hooks/tmux.ssh.conf";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
current_zettel_path="$(cat "$ZK_PATH/current-zettel.txt")"
|
current_zettel_path="$ZK_PATH/$(cat "$ZK_PATH/current-zettel.txt")"
|
||||||
|
|
||||||
if [ -n "${TMUX:-}" ]; then
|
if [ -n "$TMUX" ]; then
|
||||||
cd "$ZK_PATH" && $EDITOR "$current_zettel_path"
|
cd "$ZK_PATH" && $EDITOR "$current_zettel_path"
|
||||||
else
|
else
|
||||||
echo 'Not in tmux'
|
echo 'Not in tmux'
|
||||||
@@ -10,9 +10,13 @@ else
|
|||||||
read -r -p 'Enter your choice: ' choice
|
read -r -p 'Enter your choice: ' choice
|
||||||
case $choice in
|
case $choice in
|
||||||
1)
|
1)
|
||||||
if tmux has-session -t zk 2>/dev/null; then
|
# Check if a tmux session is running with a window named zk
|
||||||
tmux attach -t zk
|
if tmux list-windows -F '#{window_name}' | grep -q zk; then
|
||||||
|
# Attach to the session containing the 'zk' window
|
||||||
|
session="$(tmux list-windows -F '#{window_name} #{session_name}' | grep zk | head -n 1 | awk '{ print $2 }')"
|
||||||
|
tmux attach -t "$session"
|
||||||
else
|
else
|
||||||
|
# Create session with a window named 'zk' and start nvim
|
||||||
tmux new-session -s zk -n zk -d
|
tmux new-session -s zk -n zk -d
|
||||||
tmux send-keys -t zk:zk "cd $ZK_PATH && $EDITOR $current_zettel_path" Enter
|
tmux send-keys -t zk:zk "cd $ZK_PATH && $EDITOR $current_zettel_path" Enter
|
||||||
tmux attach -t zk
|
tmux attach -t zk
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ in
|
|||||||
../../modules/yubikey
|
../../modules/yubikey
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.${config.host.username} = import ../../home/hosts/${config.host.name};
|
home-manager.users.${config.host.username} = import ../../home/hosts/andromache;
|
||||||
|
|
||||||
|
ssh.authorizedHosts = [ "astyanax" ];
|
||||||
|
|
||||||
secrets.nixSigningKey.enable = true;
|
secrets.nixSigningKey.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
host = {
|
host = {
|
||||||
username = "h";
|
username = "h";
|
||||||
highRam = true;
|
name = "andromache";
|
||||||
admin = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,9 @@ in
|
|||||||
../../modules/yubikey
|
../../modules/yubikey
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.${config.host.username} = import ../../home/hosts/${config.host.name};
|
home-manager.users.${config.host.username} = import ../../home/hosts/astyanax;
|
||||||
|
|
||||||
|
ssh.authorizedHosts = [ "andromache" ];
|
||||||
|
|
||||||
secrets.nixSigningKey.enable = true;
|
secrets.nixSigningKey.enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
host = {
|
host = {
|
||||||
username = "h";
|
username = "h";
|
||||||
highRam = true;
|
name = "astyanax";
|
||||||
admin = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,13 @@
|
|||||||
../../modules/ssh
|
../../modules/ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
|
ssh = {
|
||||||
|
authorizedHosts = [
|
||||||
|
"andromache"
|
||||||
|
"astyanax"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelParams = [
|
kernelParams = [
|
||||||
"console=ttyS1,115200n8"
|
"console=ttyS1,115200n8"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
host = {
|
host = {
|
||||||
username = "h";
|
username = "h";
|
||||||
|
name = "eetion-02";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
|
|
||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
|
|
||||||
|
ssh = {
|
||||||
|
authorizedHosts = [
|
||||||
|
"andromache"
|
||||||
|
"astyanax"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
grub.enable = false;
|
grub.enable = false;
|
||||||
generic-extlinux-compatible.enable = true;
|
generic-extlinux-compatible.enable = true;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
host = {
|
host = {
|
||||||
username = "h";
|
username = "h";
|
||||||
|
name = "eetion";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,13 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = config.host.name;
|
networking.hostName = config.host.name;
|
||||||
|
ssh = {
|
||||||
|
authorizedHosts = [
|
||||||
|
"andromache"
|
||||||
|
"astyanax"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
host = {
|
host = {
|
||||||
username = "username";
|
username = "username";
|
||||||
|
name = "hecuba";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
host = {
|
host = {
|
||||||
username = "h";
|
username = "h";
|
||||||
|
name = "vm";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ in
|
|||||||
name = "orange-pi";
|
name = "orange-pi";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ssh.authorizedHosts = [
|
||||||
|
"andromache"
|
||||||
|
"astyanax"
|
||||||
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
|
|||||||
@@ -21,6 +21,11 @@ in
|
|||||||
name = "raspberry-pi";
|
name = "raspberry-pi";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ssh.authorizedHosts = [
|
||||||
|
"andromache"
|
||||||
|
"astyanax"
|
||||||
|
];
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"console=ttyS1,115200n8"
|
"console=ttyS1,115200n8"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
nixpkgs.allowedUnfree = [ "claude-code" ];
|
|
||||||
secrets.groups.opencode = [ "api-key" ];
|
secrets.groups.opencode = [ "api-key" ];
|
||||||
|
|
||||||
sops.templates."opencode/auth.json" = {
|
sops.templates."opencode/auth.json" = {
|
||||||
|
|||||||
@@ -1,11 +1,4 @@
|
|||||||
{ config, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
boot = {
|
boot.loader.systemd-boot.enable = true;
|
||||||
loader = {
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
systemd-boot.enable = true;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
tmp.useTmpfs = config.host.highRam;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,15 +19,5 @@
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "en_US.UTF-8";
|
default = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
highRam = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
admin = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
services.logind.settings.Login = {
|
|
||||||
HandleLidSwitch = "suspend";
|
|
||||||
IdleAction = "suspend";
|
|
||||||
IdleActionSec = 1800;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -9,8 +9,6 @@ let
|
|||||||
cfg = config.desktop;
|
cfg = config.desktop;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ../logind.nix ];
|
|
||||||
|
|
||||||
options.desktop = {
|
options.desktop = {
|
||||||
ly = {
|
ly = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
@@ -37,23 +35,15 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# error:
|
|
||||||
# Failed assertions:
|
|
||||||
# - h profile: xdg.portal: since you installed Home Manager via its NixOS module and
|
|
||||||
# 'home-manager.useUserPackages' is enabled, you need to add
|
|
||||||
#
|
|
||||||
# environment.pathsToLink = [ `/share/applications` `/share/xdg-desktop-portal` ];
|
|
||||||
#
|
|
||||||
# to your NixOS configuration so that the portal definitions and DE
|
|
||||||
# provided configurations get linked.
|
|
||||||
environment.pathsToLink = [
|
|
||||||
"/share/applications"
|
|
||||||
"/share/xdg-desktop-portal"
|
|
||||||
];
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
gnome.gnome-keyring.enable = false;
|
gnome.gnome-keyring.enable = false;
|
||||||
dbus.enable = true;
|
dbus.enable = true;
|
||||||
|
logind.settings.Login = {
|
||||||
|
HandleLidSwitch = "suspend";
|
||||||
|
IdleAction = "suspend";
|
||||||
|
IdleActionSec = 1800;
|
||||||
|
};
|
||||||
|
|
||||||
displayManager.ly = lib.mkIf cfg.ly.enable {
|
displayManager.ly = lib.mkIf cfg.ly.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
{
|
{ lib, config, ... }:
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (config.host) username;
|
inherit (config.host) username;
|
||||||
adminHosts = (import ../../utils { inherit lib; }).adminHosts ../../hosts;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.ssh = {
|
options.ssh = {
|
||||||
@@ -24,6 +19,6 @@ in
|
|||||||
keyFile = ../../hosts/${hostname}/ssh_user.pub;
|
keyFile = ../../hosts/${hostname}/ssh_user.pub;
|
||||||
in
|
in
|
||||||
lib.optionals (builtins.pathExists keyFile) (lib.splitString "\n" (builtins.readFile keyFile))
|
lib.optionals (builtins.pathExists keyFile) (lib.splitString "\n" (builtins.readFile keyFile))
|
||||||
) ((builtins.filter (h: h != config.host.name) adminHosts) ++ config.ssh.authorizedHosts)
|
) config.ssh.authorizedHosts
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
{ lib }:
|
{ lib }:
|
||||||
|
|
||||||
let
|
let
|
||||||
fs = import ./fs.nix { inherit lib; };
|
hosts = import ./hosts.nix;
|
||||||
hosts = import ./hosts.nix { inherit lib; };
|
|
||||||
secrets = import ./secrets.nix { inherit lib; };
|
secrets = import ./secrets.nix { inherit lib; };
|
||||||
in
|
in
|
||||||
fs // hosts // secrets
|
{
|
||||||
|
dirNames =
|
||||||
|
path: builtins.attrNames (lib.filterAttrs (_: type: type == "directory") (builtins.readDir path));
|
||||||
|
}
|
||||||
|
// hosts
|
||||||
|
// secrets
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{ lib }:
|
|
||||||
|
|
||||||
{
|
|
||||||
dirNames =
|
|
||||||
path: builtins.attrNames (lib.filterAttrs (_: t: t == "directory") (builtins.readDir path));
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,3 @@
|
|||||||
{ lib }:
|
|
||||||
|
|
||||||
let
|
|
||||||
fs = import ./fs.nix { inherit lib; };
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
hostMeta =
|
hostMeta =
|
||||||
hostDir:
|
hostDir:
|
||||||
@@ -10,10 +5,4 @@ in
|
|||||||
import (hostDir + "/meta.nix")
|
import (hostDir + "/meta.nix")
|
||||||
else
|
else
|
||||||
throw "meta.nix required in ${hostDir}";
|
throw "meta.nix required in ${hostDir}";
|
||||||
|
|
||||||
adminHosts =
|
|
||||||
hostsPath:
|
|
||||||
builtins.filter (host: ((import (hostsPath + "/${host}/host.nix")).host.admin or false)) (
|
|
||||||
fs.dirNames hostsPath
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user