Compare commits
No commits in common. "main" and "integration" have entirely different histories.
main
...
integratio
|
|
@ -41,12 +41,12 @@ D('sealight.xyz', REG_NONE, DnsProvider(DNS_HEDNS),
|
|||
A('ci', '69.61.2.203', TTL(300)),
|
||||
A('write', '69.61.2.203', TTL(300)),
|
||||
A('photos', '69.61.2.203', TTL(300)),
|
||||
// vultr melbourne: lituus
|
||||
A('@', '67.219.99.225', TTL(300)),
|
||||
A('jitsi', '67.219.99.225', TTL(300)),
|
||||
A('chat', '67.219.99.225', TTL(300)),
|
||||
A('element', '67.219.99.225', TTL(300)),
|
||||
A('turn', '67.219.99.225', TTL(300)),
|
||||
// vultr: lituus
|
||||
A('@', '45.77.48.108', TTL(300)),
|
||||
A('jitsi', '45.77.48.108', TTL(300)),
|
||||
A('chat', '45.77.48.108', TTL(300)),
|
||||
A('element', '45.77.48.108', TTL(300)),
|
||||
A('turn', '45.77.48.108', TTL(300)),
|
||||
//nullhex free email real estate
|
||||
CNAME('key1._domainkey', 'key1.nullhex.com.'),
|
||||
CNAME('autoconfig', 'autoconfig.nullhex.com.'),
|
||||
|
|
|
|||
806
flake.lock
806
flake.lock
File diff suppressed because it is too large
Load diff
22
flake.nix
22
flake.nix
|
|
@ -65,12 +65,6 @@
|
|||
inputs.nixpkgs.follows = "unstable";
|
||||
};
|
||||
|
||||
# Tangled (atproto tools)
|
||||
tangled = {
|
||||
url = "git+https://tangled.org/@tangled.org/core";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Others
|
||||
nur.url = "github:nix-community/NUR";
|
||||
rust-overlay = {
|
||||
|
|
@ -79,10 +73,6 @@
|
|||
};
|
||||
tidalcycles.url = "github:mitchmindtree/tidalcycles.nix";
|
||||
tidalcycles.inputs.nixpkgs.follows = "unstable";
|
||||
autohide-tdrop = {
|
||||
url = "github:I-Want-ToBelieve/autohide-tdrop";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
# TODO hundred rabbits software
|
||||
# TODO needs secrets
|
||||
# dhyan.url = "git+ssh://gitea@git.sealight.xyz/aynish/dhyan?ref=main";
|
||||
|
|
@ -94,8 +84,8 @@
|
|||
|
||||
outputs = { self, nixpkgs, unstable, nixos-hardware, home-manager, deploy-rs
|
||||
, agenix, disko, basant, grasp, nix-matrix-appservices, nur, tidalcycles
|
||||
, rust-overlay, vimwikicli, autohide-tdrop, darwin, nix-homebrew, homebrew-bundle
|
||||
, homebrew-core, homebrew-cask, jovian, tangled, ... }@inputs:
|
||||
, rust-overlay, vimwikicli, darwin, nix-homebrew, homebrew-bundle
|
||||
, homebrew-core, homebrew-cask, jovian, ... }@inputs:
|
||||
let
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"aarch64-linux"
|
||||
|
|
@ -111,7 +101,6 @@
|
|||
};
|
||||
vimwikiOverlay = final: prev: {
|
||||
vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli;
|
||||
autohide-tdrop = autohide-tdrop.packages.${prev.system}.default;
|
||||
};
|
||||
|
||||
nixpkgsFor = forAllSystems (system:
|
||||
|
|
@ -127,7 +116,6 @@
|
|||
"vcv-rack"
|
||||
"SunVox"
|
||||
"renoise"
|
||||
"bitwig-studio-unwrapped"
|
||||
];
|
||||
};
|
||||
overlays = [
|
||||
|
|
@ -153,7 +141,6 @@
|
|||
# ];
|
||||
overlays = [
|
||||
agenix.overlays.default
|
||||
tangled.overlays.default # atproto tools only on lite deployments
|
||||
self.overlays.additions
|
||||
self.overlays.modifications
|
||||
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
|
||||
|
|
@ -331,7 +318,7 @@
|
|||
pkgs = deckPkgsFor.${system};
|
||||
modules = [
|
||||
./hosts/deck
|
||||
# jovian.nixosModules.default
|
||||
jovian.nixosModules.default
|
||||
self.nixosModules.wireguard
|
||||
agenix.nixosModules.age
|
||||
self.nixosModules.backup
|
||||
|
|
@ -392,9 +379,8 @@
|
|||
};
|
||||
};
|
||||
lituus = {
|
||||
hostname = "67.219.99.225";
|
||||
hostname = "sealight.xyz";
|
||||
autoRollback = false;
|
||||
remoteBuild = true;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
git-machete
|
||||
bottom
|
||||
gptfdisk
|
||||
difftastic
|
||||
starship
|
||||
jq
|
||||
manix
|
||||
|
|
@ -56,8 +55,6 @@
|
|||
gnupg
|
||||
syncthing
|
||||
dijo
|
||||
nixfmt-rfc-style
|
||||
nix-tree
|
||||
#ssb-patchwork
|
||||
fontconfig
|
||||
pandoc
|
||||
|
|
@ -162,7 +159,6 @@
|
|||
initContent = ''
|
||||
bindkey -v
|
||||
autopair-init
|
||||
export PATH="$PATH:/Users/anishlakhwara/go/bin"
|
||||
'';
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
|
|
@ -305,12 +301,11 @@
|
|||
nepl = "n repl '<nixpkgs>'";
|
||||
srch = "ns nixpkgs";
|
||||
orch = "ns override";
|
||||
# Impure for bitwig on linux, not sure what it's for in darwin
|
||||
nrb = ''
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
cd ~/usr/helm && sudo darwin-rebuild switch --impure --flake ".#Anishs-MacBook-Pro" && cd $OLDPWD
|
||||
else
|
||||
cd /tmp && sudo nixos-rebuild switch --flake --impure '/home/anish/usr/helm#curve' && cd $OLDPWD
|
||||
cd /tmp && sudo nixos-rebuild switch --flake '/home/anish/usr/helm#curve' && cd $OLDPWD
|
||||
fi
|
||||
'';
|
||||
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@ mouse_map left click ungrabbed mouse_click_url_or_select
|
|||
confirm_os_window_close 0
|
||||
enable_audio_bell no
|
||||
|
||||
|
||||
|
||||
# Ctrl+V for paste
|
||||
map ctrl+v paste_from_clipboard
|
||||
mouse_map middle release ungrabbed paste_from_clipboard
|
||||
|
||||
-- Allows zen-mode.nvim to increase font size
|
||||
-- allow_remote_control socket-only
|
||||
-- listen_on unix:/tmp/kitty
|
||||
|
|
|
|||
|
|
@ -2,35 +2,12 @@
|
|||
|
||||
@import "config.rasi"
|
||||
|
||||
textbox {
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
listview {
|
||||
columns: 9;
|
||||
lines: 7;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
flow: horizontal;
|
||||
reverse: false;
|
||||
fixed-height: true;
|
||||
fixed-columns: true;
|
||||
}
|
||||
|
||||
element {
|
||||
orientation: vertical;
|
||||
}
|
||||
|
||||
element-text {
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
font: "FiraCode Nerd Font 24";
|
||||
columns: 4;
|
||||
}
|
||||
|
||||
textbox-icon {
|
||||
str: "❇️ ";
|
||||
str: "🎑";
|
||||
}
|
||||
|
||||
prompt {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ super + Return
|
|||
kitty
|
||||
|
||||
ctrl + super + Return
|
||||
tdrop -n tdrop_kitty --post-create-hook "autohide-tdrop &" -ma -h 60% -w 70% -x 15% -y 32 kitty --class=tdrop_kitty
|
||||
xst -e bash -c "(tmux ls | grep -qEv 'attached|scratch' && tmux at) || tmux"
|
||||
|
||||
super + space
|
||||
rofi -show drun -modi drun,run -show-icons -theme theme/appmenu.rasi
|
||||
|
|
@ -25,7 +25,7 @@ super + Tab
|
|||
rofi -show window -show-icons -theme theme/windowmenu.rasi
|
||||
|
||||
super + e
|
||||
rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy --hidden-descriptions
|
||||
rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy
|
||||
|
||||
super + a
|
||||
paste
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
#xdg.configFile = {
|
||||
# "git/config".source = ./config;
|
||||
|
|
@ -8,10 +7,6 @@
|
|||
|
||||
programs.lazygit.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
unstable.git-spice
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Anish Lakhwara";
|
||||
|
|
|
|||
8
home/profiles/nvim/amp-plugin.nix
Normal file
8
home/profiles/nvim/amp-plugin.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs }:
|
||||
|
||||
# Remove the conditional entirely for now to test
|
||||
pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "amp-nvim";
|
||||
version = "unstable";
|
||||
src = /Users/anishlakhwara/usr/amp.nvim;
|
||||
}
|
||||
5
home/profiles/nvim/amp.lua
Normal file
5
home/profiles/nvim/amp.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-- amp.nvim configuration
|
||||
require('amp').setup({
|
||||
auto_start = true,
|
||||
log_level = "info"
|
||||
})
|
||||
|
|
@ -11,16 +11,6 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
amp-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "amp-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "sourcegraph";
|
||||
repo = "amp.nvim";
|
||||
rev = "main";
|
||||
sha256 = "Sm/SQEIZlnqu/sD+MhZzgGm3bf+HnADOOimZ2Q++MXU=";
|
||||
};
|
||||
};
|
||||
|
||||
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "lspsaga.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
|
|
@ -113,6 +103,7 @@ let
|
|||
doInstallCheck = false;
|
||||
nvimRequireCheck = "none";
|
||||
};
|
||||
amp-nvim = import ./amp-plugin.nix { inherit pkgs; };
|
||||
};
|
||||
|
||||
my-python-packages = python-packages: with python-packages; [
|
||||
|
|
@ -233,7 +224,6 @@ in
|
|||
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
||||
nnoremap <leader>ft <cmd>Telescope tags<cr>
|
||||
nnoremap <leader>fr <cmd>lua KitaabRecent()<cr>
|
||||
|
||||
" exit normal mode in terminal
|
||||
:tnoremap <C-n> <C-\><C-n>
|
||||
|
|
@ -327,10 +317,10 @@ in
|
|||
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
|
||||
|
||||
" lsp commands
|
||||
nnoremap gd :lua vim.lsp.buf.definition()<CR>
|
||||
nnoremap gI :lua require('telescope.builtin').lsp_implementation()<CR>
|
||||
nnoremap gK :lua vim.lsp.buf.signature_help()<CR>
|
||||
nnoremap gr :lua require('telescope.builtin').lsp_references()<CR>
|
||||
nnoremap <leader>vgd :lua vim.lsp.buf.definition()<CR>
|
||||
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
|
||||
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
|
||||
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
|
||||
" nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
|
||||
" nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
|
||||
" nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
|
||||
|
|
@ -339,9 +329,9 @@ in
|
|||
" nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
|
||||
" lspsaga stuff doesn't work
|
||||
nnoremap <leader>vd :Lspsaga peek_definition<CR>
|
||||
nnoremap <leader>cr :Lspsaga rename<CR><CR>
|
||||
nnoremap K :Lspsaga hover_doc<CR>
|
||||
nnoremap <leader>ca :Lspsaga code_action<CR>
|
||||
nnoremap <leader>vrn :Lspsaga rename<CR><CR>
|
||||
nnoremap <leader>vh :Lspsaga hover_doc<CR>
|
||||
nnoremap <leader>vca :Lspsaga code_action<CR>
|
||||
nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR>
|
||||
nnoremap <leader>vs :Dasht<Space>
|
||||
nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR>
|
||||
|
|
@ -929,7 +919,7 @@ in
|
|||
map("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts)
|
||||
|
||||
-- Preview a linked note.
|
||||
map("n", "<leader>ck", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||
map("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||
-- Open the code actions for a visual selection.
|
||||
map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)
|
||||
|
||||
|
|
@ -1023,7 +1013,7 @@ in
|
|||
vim.keymap.set({'n', 't'}, '<M-l>', '<CMD>NavigatorRight<CR>')
|
||||
|
||||
-- Disable Ctrl+V in nvim so Kitty can handle paste
|
||||
vim.keymap.set('i', '<C-v>', '<C-r>+', {noremap = true, silent = true})
|
||||
vim.keymap.set({'v', 'i'}, '<C-v>', '<Nop>', {noremap = true, silent = true})
|
||||
|
||||
-- Pane resizing with Alt+Shift+hjkl (to match tmux)
|
||||
vim.keymap.set('n', '<M-S-h>', '<Cmd>vertical resize -2<CR>', {silent = true})
|
||||
|
|
@ -1031,110 +1021,6 @@ in
|
|||
vim.keymap.set('n', '<M-S-k>', '<Cmd>resize +2<CR>', {silent = true})
|
||||
vim.keymap.set('n', '<M-S-l>', '<Cmd>vertical resize +2<CR>', {silent = true})
|
||||
|
||||
-- Kitaab recent files (only date-based files, sorted reverse)
|
||||
function KitaabRecent()
|
||||
local pickers = require('telescope.pickers')
|
||||
local finders = require('telescope.finders')
|
||||
local conf = require('telescope.config').values
|
||||
|
||||
-- Use current working directory
|
||||
local kitaab_path = vim.fn.getcwd()
|
||||
|
||||
-- Get all files (depth 1, exclude directories)
|
||||
local files = vim.fn.readdir(kitaab_path, function(name)
|
||||
return vim.fn.isdirectory(kitaab_path .. '/' .. name) == 0
|
||||
end)
|
||||
|
||||
-- Filter to only date-based files (starting with digit)
|
||||
local date_files = {}
|
||||
for _, filename in ipairs(files) do
|
||||
if filename:match('^%d') then
|
||||
table.insert(date_files, filename)
|
||||
end
|
||||
end
|
||||
|
||||
-- Sort in reverse (most recent first)
|
||||
table.sort(date_files, function(a, b) return a > b end)
|
||||
|
||||
pickers.new({}, {
|
||||
prompt_title = 'Kitaab Recent',
|
||||
finder = finders.new_table({
|
||||
results = date_files,
|
||||
entry_maker = function(entry)
|
||||
return {
|
||||
value = kitaab_path .. '/' .. entry,
|
||||
display = entry,
|
||||
ordinal = entry,
|
||||
path = kitaab_path .. '/' .. entry,
|
||||
}
|
||||
end
|
||||
}),
|
||||
previewer = conf.file_previewer({}),
|
||||
sorter = conf.generic_sorter({}),
|
||||
}):find()
|
||||
end
|
||||
|
||||
-- Setup amp.nvim
|
||||
require('amp').setup({
|
||||
auto_start = true,
|
||||
log_level = "info"
|
||||
})
|
||||
|
||||
-- Amp commands
|
||||
vim.api.nvim_create_user_command("AmpSend", function(opts)
|
||||
local message = opts.args
|
||||
if message == "" then
|
||||
print("Please provide a message to send")
|
||||
return
|
||||
end
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_message(message)
|
||||
end, {
|
||||
nargs = "*",
|
||||
desc = "Send a message to Amp",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("AmpSendBuffer", function(opts)
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)
|
||||
local content = table.concat(lines, "\n")
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_message(content)
|
||||
end, {
|
||||
nargs = "?",
|
||||
desc = "Send current buffer contents to Amp",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("AmpPromptSelection", function(opts)
|
||||
local lines = vim.api.nvim_buf_get_lines(0, opts.line1 - 1, opts.line2, false)
|
||||
local text = table.concat(lines, "\n")
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_to_prompt(text)
|
||||
end, {
|
||||
range = true,
|
||||
desc = "Add selected text to Amp prompt",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("AmpPromptRef", function(opts)
|
||||
local bufname = vim.api.nvim_buf_get_name(0)
|
||||
if bufname == "" then
|
||||
print("Current buffer has no filename")
|
||||
return
|
||||
end
|
||||
local relative_path = vim.fn.fnamemodify(bufname, ":.")
|
||||
local ref = "@" .. relative_path
|
||||
if opts.line1 ~= opts.line2 then
|
||||
ref = ref .. "#L" .. opts.line1 .. "-" .. opts.line2
|
||||
elseif opts.line1 > 1 then
|
||||
ref = ref .. "#L" .. opts.line1
|
||||
end
|
||||
local amp_message = require("amp.message")
|
||||
amp_message.send_to_prompt(ref)
|
||||
end, {
|
||||
range = true,
|
||||
desc = "Add file reference (with selection) to Amp prompt",
|
||||
})
|
||||
|
||||
EOF
|
||||
|
||||
'';
|
||||
|
|
@ -1253,11 +1139,12 @@ in
|
|||
# custom
|
||||
yuck-vim
|
||||
nvim-parinfer
|
||||
amp-nvim
|
||||
# vim-processing
|
||||
] ++ lib.optionals pkgs.stdenv.isLinux [
|
||||
# Linux-only plugins
|
||||
vim-tidal # requires SuperCollider which is Linux-only
|
||||
] ++ lib.optionals (customPlugins.amp-nvim != null) [
|
||||
customPlugins.amp-nvim
|
||||
];
|
||||
withPython3 = true;
|
||||
extraPython3Packages = pkgs: with pkgs; [ tasklib six packaging ];
|
||||
|
|
@ -1265,4 +1152,3 @@ in
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,37 +2,10 @@ set -g base-index 1
|
|||
setw -g pane-base-index 1
|
||||
|
||||
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
|
||||
# colors
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -ga terminal-overrides ",*256col*:Tc"
|
||||
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
||||
set-environment -g COLORTERM "truecolor"
|
||||
set -sa terminal-features ",tmux-256color:RGB:Nobr"
|
||||
set -g allow-passthrough on
|
||||
|
||||
set -g set-clipboard on
|
||||
|
||||
# shift enter for amp
|
||||
set -s extended-keys on
|
||||
set -as terminal-features 'tmux*:extkeys'
|
||||
|
||||
# pane colors for amp diff view
|
||||
# set-option -g pane-colours[0] "#4D5566"
|
||||
# set-option -g pane-colours[1] "#F27983"
|
||||
# set-option -g pane-colours[2] "#A6CC70"
|
||||
# set-option -g pane-colours[3] "#F29E74"
|
||||
# set-option -g pane-colours[4] "#77A8D9"
|
||||
# set-option -g pane-colours[5] "#A37ACC"
|
||||
# set-option -g pane-colours[6] "#4CBF99"
|
||||
# set-option -g pane-colours[7] "#F0F0F0"
|
||||
# set-option -g pane-colours[8] "#000000"
|
||||
# set-option -g pane-colours[9] "#FF3333"
|
||||
# set-option -g pane-colours[10] "#BAE67E"
|
||||
# set-option -g pane-colours[11] "#FFA759"
|
||||
# set-option -g pane-colours[12] "#73D0FF"
|
||||
# set-option -g pane-colours[13] "#D4BFFF"
|
||||
# set-option -g pane-colours[14] "#95E6CB"
|
||||
# set-option -g pane-colours[15] "#ffffff"
|
||||
|
||||
# Mouse works as expected
|
||||
set-option -g mouse on
|
||||
|
|
@ -43,10 +16,6 @@ set -g focus-events on
|
|||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
|
||||
# amp commands
|
||||
set -g @amp/fork-thread-command 'new-window -n forked-thread $SHELL -c "amp threads fork; amp threads continue"'
|
||||
bind -N 'Fork Amp thread' f "#{@amp/fork-thread-command}"
|
||||
|
||||
# don't rename windows automatically
|
||||
set-option -g allow-rename off
|
||||
|
||||
|
|
@ -94,7 +63,6 @@ set -g message-style 'fg=yellow bg=green bold'
|
|||
|
||||
# Unbind Ctrl+V so it passes through to Kitty for paste
|
||||
unbind C-v
|
||||
set -g set-clipboard on
|
||||
|
||||
# Vim-aware pane navigation with Alt+hjkl
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@
|
|||
../profiles/wallabag
|
||||
../profiles/finance
|
||||
../profiles/sync/website
|
||||
../profiles/sync/music
|
||||
../profiles/grasp
|
||||
# ../profiles/archivebox
|
||||
# ../profiles/woodpecker-agent
|
||||
|
|
|
|||
|
|
@ -23,15 +23,12 @@
|
|||
settings.PermitRootLogin = "no";
|
||||
};
|
||||
|
||||
hardware.keyboard.qmk.enable = true;
|
||||
services.udev.packages = with pkgs; [ via ];
|
||||
|
||||
# import profiling tools
|
||||
programs.systemtap.enable = true;
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "btrfs";
|
||||
environment.systemPackages = with pkgs; [ docker-compose via ];
|
||||
environment.systemPackages = with pkgs; [ docker-compose ];
|
||||
|
||||
# Speed up boot by removing dependency on network
|
||||
systemd = {
|
||||
|
|
@ -72,7 +69,7 @@
|
|||
|
||||
# lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?)
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22 4173 3000 ]; # allow ssh and vibekanban
|
||||
allowedTCPPorts = [ 22 4173 ]; # allow ssh
|
||||
allowedTCPPortRanges = [{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
|
|
|
|||
|
|
@ -73,9 +73,8 @@
|
|||
# };
|
||||
|
||||
# Enable automatic login for the user.
|
||||
# Disabled: jovian.steam.autoStart handles this
|
||||
# services.xserver.displayManager.autoLogin.enable = true;
|
||||
# services.xserver.displayManager.autoLogin.user = "anish";
|
||||
services.xserver.displayManager.autoLogin.enable = true;
|
||||
services.xserver.displayManager.autoLogin.user = "anish";
|
||||
|
||||
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, pkgs, config, lib, ... }:
|
||||
{ self, pkgs, config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
|
|
@ -31,16 +31,13 @@
|
|||
# theme = "motion";
|
||||
# };
|
||||
|
||||
# jovian.steam.enable = true;
|
||||
# jovian.devices.steamdeck.enable = true;
|
||||
# jovian.steam.user = "anish";
|
||||
# jovian.steam.autoStart = true;
|
||||
# jovian.steam.desktopSession = "gnome";
|
||||
jovian.steam.enable = true;
|
||||
jovian.devices.steamdeck.enable = true;
|
||||
jovian.steam.user = "anish";
|
||||
jovian.steam.autoStart = true;
|
||||
jovian.steam.desktopSession = "gnome";
|
||||
# jovian.steam.desktopSession = "none+bspwm";
|
||||
|
||||
# Disable lightdm from desktop profile
|
||||
services.xserver.displayManager.lightdm.enable = lib.mkForce false;
|
||||
|
||||
# Install XR drivers
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# xrlinuxdriver
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Block storage mount
|
||||
fileSystems."/srv/sealight" = {
|
||||
device = "/dev/disk/by-id/virtio-mel-3b1f60a89cd649";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
|
||||
# Bind mounts for service data
|
||||
# PostgreSQL moved to NVMe for performance - data lives directly on /var/lib/postgresql
|
||||
# fileSystems."/var/lib/postgresql" = {
|
||||
# device = "/srv/sealight/postgresql";
|
||||
# fsType = "none";
|
||||
# options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
|
||||
# };
|
||||
|
||||
fileSystems."/var/lib/matrix-synapse" = {
|
||||
device = "/srv/sealight/matrix-synapse";
|
||||
fsType = "none";
|
||||
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/matrix-as-discord" = {
|
||||
device = "/srv/sealight/matrix-as-discord";
|
||||
fsType = "none";
|
||||
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/mautrix-telegram" = {
|
||||
device = "/srv/sealight/mautrix-telegram";
|
||||
fsType = "none";
|
||||
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/wireguard" = {
|
||||
device = "/srv/sealight/wireguard";
|
||||
fsType = "none";
|
||||
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/www" = {
|
||||
device = "/srv/sealight/www";
|
||||
fsType = "none";
|
||||
options = [ "bind" "x-systemd.requires-mounts-for=/srv/sealight" ];
|
||||
};
|
||||
|
||||
# Ensure services wait for mounts
|
||||
# PostgreSQL no longer needs to wait for /srv/sealight mount
|
||||
# systemd.services.postgresql.unitConfig.RequiresMountsFor = [ "/srv/sealight" ];
|
||||
systemd.services.matrix-synapse.unitConfig.RequiresMountsFor = [ "/srv/sealight" ];
|
||||
}
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
{ self, profiles, suites, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
./block-storage.nix
|
||||
../profiles/core
|
||||
../profiles/server
|
||||
../profiles/metrics
|
||||
|
|
|
|||
|
|
@ -1,22 +1,27 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "floppy" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/f9e9468f-ff3b-430d-9ecf-ba275cf2f716";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/3b8b2c4b-835e-4822-8ac8-0effdc8270d6";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
virtualisation.hypervGuest.enable = true;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ in {
|
|||
# tic-80
|
||||
ytfzf
|
||||
yt-dlp
|
||||
# autohide-tdrop
|
||||
];
|
||||
|
||||
xdg.portal = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.ffmpeg ];
|
||||
mossnet.gonic.enable = true;
|
||||
mossnet.gonic.settings = ''
|
||||
music-path /mnt/two/music/
|
||||
|
|
|
|||
|
|
@ -17,14 +17,11 @@
|
|||
age.secrets.synapse-config.file = "${self}/secrets/synapse-config.age";
|
||||
age.secrets.synapse-config.owner = "matrix-synapse";
|
||||
|
||||
systemd.services.matrix-synapse.serviceConfig.TimeoutStartSec = "10min";
|
||||
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
settings = {
|
||||
max_upload_size = "100M";
|
||||
server_name = "sealight.xyz";
|
||||
federation_sender_instances = [];
|
||||
listeners = [
|
||||
{
|
||||
port = 8448;
|
||||
|
|
@ -213,12 +210,7 @@
|
|||
root = "/var/www/sealight.xyz";
|
||||
};
|
||||
locations."/_matrix" = {
|
||||
proxyPass = "http://127.0.0.1:8448";
|
||||
extraConfig = ''
|
||||
proxy_read_timeout 300s;
|
||||
proxy_connect_timeout 300s;
|
||||
proxy_send_timeout 300s;
|
||||
'';
|
||||
proxyPass = "http://localhost:8448";
|
||||
};
|
||||
# locations."/slackbridge" = {
|
||||
# proxyPass = "http://localhost:9899";
|
||||
|
|
@ -230,11 +222,6 @@
|
|||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8448";
|
||||
extraConfig = ''
|
||||
proxy_read_timeout 300s;
|
||||
proxy_connect_timeout 300s;
|
||||
proxy_send_timeout 300s;
|
||||
'';
|
||||
};
|
||||
};
|
||||
## virtual host for Riot/Web
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
# ardour
|
||||
# reaper
|
||||
# renoise
|
||||
bitwig-studio
|
||||
];
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
|
|
|
|||
|
|
@ -5,19 +5,16 @@
|
|||
serviceConfig.Type = "oneshot";
|
||||
path = [
|
||||
pkgs.coreutils
|
||||
pkgs.openssh
|
||||
pkgs.gawk
|
||||
pkgs.rsync
|
||||
pkgs.beets
|
||||
];
|
||||
script = builtins.readFile ./get-music.sh;
|
||||
serviceConfig = {
|
||||
User = "anish";
|
||||
};
|
||||
};
|
||||
systemd.timers.get-music-sync = {
|
||||
systemd.timers.get-music-timer = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
partOf = [ "get-music-sync.service" ];
|
||||
timerConfig.OnCalendar = [ "hourly" ];
|
||||
timerConfig.OnCalendar = [ "daily" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
64
hosts/profiles/sync/music/get-music.sh
Executable file → Normal file
64
hosts/profiles/sync/music/get-music.sh
Executable file → Normal file
|
|
@ -1,61 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
rsync -r --ignore-existing --log-file=/data/incoming/download-log hypercube@talos.feralhosting.com:private/transmission/data/* /data/incoming
|
||||
|
||||
set -euo pipefail
|
||||
# you need to set defaults for beets
|
||||
# if already imported -> Skip
|
||||
# Auto accept changes
|
||||
# also install it lmao
|
||||
#beet import /data/incoming
|
||||
|
||||
REMOTE_HOST="aynish@talos.feralhosting.com"
|
||||
REMOTE_PATH="private/transmission/data/"
|
||||
LOCAL_PATH="/mnt/two/incoming"
|
||||
TRACKING_FILE="/mnt/two/incoming/.downloaded_albums"
|
||||
LOG_FILE="/mnt/two/incoming/download-log"
|
||||
|
||||
# Create tracking file if it doesn't exist
|
||||
touch "$TRACKING_FILE"
|
||||
|
||||
# Get list of albums on remote server
|
||||
echo "$(date): Checking for new albums on seedbox..." >>"$LOG_FILE"
|
||||
REMOTE_ALBUMS=$(rsync --dry-run --list-only "$REMOTE_HOST:$REMOTE_PATH" | grep '^d' | awk '{$1=$2=$3=$4=""; sub(/^ +/, ""); print}' | grep -v '^\.') || true
|
||||
|
||||
if [ -z "$REMOTE_ALBUMS" ]; then
|
||||
echo "$(date): No albums found on remote server" >>"$LOG_FILE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check each album against tracking file
|
||||
NEW_ALBUMS=""
|
||||
while IFS= read -r album; do
|
||||
if [ -n "$album" ] && ! grep -qF "$album" "$TRACKING_FILE"; then
|
||||
NEW_ALBUMS="$NEW_ALBUMS$album\n"
|
||||
echo "$(date): Found new album: $album" >>"$LOG_FILE"
|
||||
fi
|
||||
done <<<"$REMOTE_ALBUMS"
|
||||
|
||||
if [ -z "$NEW_ALBUMS" ]; then
|
||||
echo "$(date): No new albums to download" >>"$LOG_FILE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Download new albums only
|
||||
echo "$(date): Starting download of new albums..." >>"$LOG_FILE"
|
||||
while IFS= read -r album; do
|
||||
if [ -n "$album" ]; then
|
||||
echo "$(date): Downloading $album" >>"$LOG_FILE"
|
||||
if rsync -r --log-file="$LOG_FILE" "$REMOTE_HOST:$REMOTE_PATH$album/" "$LOCAL_PATH/$album/"; then
|
||||
echo "$album" >>"$TRACKING_FILE"
|
||||
echo "$(date): Successfully downloaded $album" >>"$LOG_FILE"
|
||||
|
||||
# Import to beets
|
||||
echo "$(date): Importing $album to beets..." >>"$LOG_FILE"
|
||||
# Set umask to allow group read/write access
|
||||
umask 002
|
||||
if beet -p fetchart import -m -l /home/anish/music.log -q -g "$LOCAL_PATH/$album"; then
|
||||
echo "$(date): Successfully imported $album to beets" >>"$LOG_FILE"
|
||||
else
|
||||
echo "$(date): Failed to import $album to beets" >>"$LOG_FILE"
|
||||
fi
|
||||
else
|
||||
echo "$(date): Failed to download $album" >>"$LOG_FILE"
|
||||
fi
|
||||
fi
|
||||
done <<<"$(echo -e "$NEW_ALBUMS")"
|
||||
|
||||
echo "$(date): Music sync completed" >>"$LOG_FILE"
|
||||
|
|
|
|||
Loading…
Reference in a new issue