summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2025-05-28 14:24:58 -0400
committerAndrew Opalach <andrew@akon.city> 2025-05-28 14:24:58 -0400
commita28487fe6fbac72c7b1a752acab42dcc6ab46476 (patch)
treec3b1b9b751dd5e96b4afc835decf14ce38fd35f8
parent75ad6c3fcad1f19c4f4f5c345fbb43ce80d9c461 (diff)
downloaddotfiles-a28487fe6fbac72c7b1a752acab42dcc6ab46476.tar.gz
dotfiles-a28487fe6fbac72c7b1a752acab42dcc6ab46476.tar.bz2
dotfiles-a28487fe6fbac72c7b1a752acab42dcc6ab46476.zip
Post server fs corruption
-rw-r--r--NOTES.txt3
-rw-r--r--files/nvim/init.vim72
-rw-r--r--files/nvim/mini_starter_picture.diff57
-rw-r--r--files/windows/MSI_util_v3.zipbin0 -> 19006 bytes
-rw-r--r--files/windows/xp_activate32.exe (renamed from files/winxp/xp_activate32.exe)bin18432 -> 18432 bytes
-rw-r--r--flake.lock26
-rwxr-xr-xhosts/iroha/scripts/game.sh (renamed from hosts/iroha/scripts/game)5
-rwxr-xr-xhosts/iroha/scripts/prepare-network-mounts7
-rwxr-xr-xhosts/iroha/scripts/rebuild-modules3
-rwxr-xr-xhosts/iroha/scripts/xbox-controller-battery2
-rw-r--r--hosts/moyo/samba/smb.conf6
-rwxr-xr-xhosts/moyo/scripts/id-dm-device2
-rwxr-xr-xhosts/moyo/scripts/mount-luks11
-rw-r--r--hosts/sofue/incus.yaml80
-rw-r--r--hosts/yashinoki/configuration.nix2
-rw-r--r--nix/programs/bash.nix2
-rw-r--r--nix/programs/kitty.nix9
-rw-r--r--nix/programs/nvim.nix2
-rw-r--r--nix/scripts.nix2
-rw-r--r--nix/system.nix1
-rw-r--r--nix/user.nix1
-rwxr-xr-xscripts/desktop/7z-password2
-rwxr-xr-xscripts/desktop/battery (renamed from scripts/battery)0
-rwxr-xr-xscripts/desktop/cpu-vulns (renamed from scripts/cpu-vulns)0
-rwxr-xr-xscripts/desktop/dbus-sway-environment (renamed from scripts/dbus-sway-environment)0
-rwxr-xr-xscripts/desktop/discord-wayland (renamed from scripts/discord-wayland)0
-rwxr-xr-xscripts/desktop/dmenu-emoji (renamed from scripts/dmenu-emoji)0
-rwxr-xr-xscripts/desktop/dmenu-path (renamed from scripts/dmenu-path)0
-rwxr-xr-xscripts/desktop/dmenu-path0 (renamed from scripts/dmenu-path0)0
-rwxr-xr-xscripts/desktop/gpg-pubkey (renamed from scripts/gpg-pubkey)0
-rwxr-xr-xscripts/desktop/img-fstype (renamed from scripts/img-fstype)0
-rwxr-xr-xscripts/desktop/install-as-needed (renamed from scripts/install-as-needed)0
-rwxr-xr-xscripts/desktop/looking-glass (renamed from scripts/looking-glass)0
-rwxr-xr-xscripts/desktop/moonrune-charset-utf8 (renamed from scripts/moonrune-charset-utf8)0
-rwxr-xr-xscripts/desktop/mount-nfs (renamed from scripts/mount-nfs)0
-rwxr-xr-xscripts/desktop/rewrite-git (renamed from scripts/rewrite-git)0
-rwxr-xr-xscripts/desktop/screenshot (renamed from scripts/screenshot)0
-rwxr-xr-xscripts/desktop/shift-jis-zip (renamed from scripts/shift-jis-zip)0
-rwxr-xr-xscripts/desktop/sp (renamed from scripts/sp)0
-rwxr-xr-xscripts/desktop/term-font-size (renamed from scripts/term-font-size)0
-rwxr-xr-xscripts/desktop/ts-date (renamed from scripts/ts-date)0
-rwxr-xr-xscripts/desktop/wlsunset-toggle (renamed from scripts/wlsunset-toggle)0
-rwxr-xr-xscripts/desktop/xbox360-ffmpeg-enc (renamed from scripts/xbox360-ffmpeg-enc)0
-rwxr-xr-xscripts/sync/diff.sh8
-rwxr-xr-xscripts/sync/pull.sh34
-rwxr-xr-xscripts/sync/push.sh34
46 files changed, 260 insertions, 111 deletions
diff --git a/NOTES.txt b/NOTES.txt
index 17fc8e2..9642404 100644
--- a/NOTES.txt
+++ b/NOTES.txt
@@ -40,4 +40,7 @@ yashinoki
* https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/blob/main/config?ref_type=heads
* https://lore.kernel.org/lkml/20250505110946.1095363-15-mingo@kernel.org/
+== Server
+ * https://serverfault.com/a/211083
+
// vim: set syntax=asciidoc:
diff --git a/files/nvim/init.vim b/files/nvim/init.vim
index 017f128..7325928 100644
--- a/files/nvim/init.vim
+++ b/files/nvim/init.vim
@@ -58,30 +58,39 @@ set clipboard+=unnamedplus
" Session options.
set ssop=skiprtp,blank,buffers,folds,winsize,terminal
set vop-=curdir
-let view_dir = expand('~/c/sessions/views')
-if !isdirectory(view_dir)
- call mkdir(view_dir, 'p', 0700)
-endif
-let &viewdir=view_dir
+if isdirectory(expand('~/c'))
+ let view_dir = expand('~/c/sessions/views')
+ if !isdirectory(view_dir)
+ call mkdir(view_dir, 'p', 0755)
+ endif
+ let &viewdir=view_dir
-" Staggered backups.
-if isdirectory(expand('/mnt/store/backup/vim'))
- set backupdir=/mnt/store/backup/vim//
-else
- set backupdir=~/c/sessions/backup//
-endif
-set backup
+ " Staggered backups.
+ let backup_dir = '/mnt/store/backup/vim'
+ if !isdirectory(backup_dir)
+ let backup_dir = expand('~/c/sessions/backup//')
+ if !isdirectory(backup_dir)
+ call mkdir(backup_dir, 'p', 0755)
+ endif
+ endif
+ let &backupdir=backup_dir
+ set backup
-" Swap file directory.
-set directory=~/c/sessions/swaps//
+ " Swap file directory.
+ let swap_dir = expand('~/c/sessions/swaps//')
+ if !isdirectory(swap_dir)
+ call mkdir(swap_dir, 'p', 0755)
+ endif
+ let &directory=swap_dir
-if has('persistent_undo')
- let undo_dir = expand('~/c/sessions/undo')
- if !isdirectory(undo_dir)
- call mkdir(undo_dir, 'p', 0700)
+ if has('persistent_undo')
+ let undo_dir = expand('~/c/sessions/undo')
+ if !isdirectory(undo_dir)
+ call mkdir(undo_dir, 'p', 0755)
+ endif
+ let &undodir=undo_dir
+ set undofile
endif
- let &undodir=undo_dir
- set undofile
endif
" Colorscheme.
@@ -240,7 +249,11 @@ function get_lsp_name()
if next(active_clients) == nil then
return ''
else
- return '+'..active_clients[1].name
+ str = '<'
+ for _, v in pairs(active_clients) do
+ str = str .. v.name .. '+'
+ end
+ return str:sub(1, -2) .. '>'
end
end
@@ -257,8 +270,7 @@ end
-- LSP configs.
if os.getenv('NIX_SHELL') ~= nil then
vim.diagnostic.config({ virtual_text = true })
- local lsp = require('lspconfig')
- lsp.clangd.setup({
+ vim.lsp.config('clangd', {
cmd = {
'clangd',
'-j=4',
@@ -285,7 +297,7 @@ if os.getenv('NIX_SHELL') ~= nil then
}
},
})
- lsp.ruff.setup({})
+ vim.lsp.enable({'clangd', 'ruff', 'ty'})
-- https://github.com/neovim/nvim-lspconfig/issues/2626#issuecomment-2117022664
-- https://github.com/neovim/nvim-lspconfig/issues/2508
vim.api.nvim_create_autocmd('BufReadPre', {
@@ -306,11 +318,13 @@ if os.getenv('NIX_SHELL') ~= nil then
end
-- Set sessions folder and autowrite.
-require('mini.sessions').setup({
- autoread = false,
- autowrite = true,
- directory = '~/c/sessions'
-})
+if vim.fn.isdirectory(vim.fn.expand('~/c')) then
+ require('mini.sessions').setup({
+ autoread = false,
+ autowrite = true,
+ directory = '~/c/sessions'
+ })
+end
-- Completion.
require('mini.completion').setup({
diff --git a/files/nvim/mini_starter_picture.diff b/files/nvim/mini_starter_picture.diff
index 3ecd564..b64025c 100644
--- a/files/nvim/mini_starter_picture.diff
+++ b/files/nvim/mini_starter_picture.diff
@@ -1,5 +1,5 @@
diff --git a/lua/mini/starter.lua b/lua/mini/starter.lua
-index 3e0570f3..0f4a384e 100644
+index cc10d101..78c4e5c1 100644
--- a/lua/mini/starter.lua
+++ b/lua/mini/starter.lua
@@ -138,7 +138,7 @@
@@ -11,7 +11,7 @@ index 3e0570f3..0f4a384e 100644
--- timer:stop()
--- return
--- end
-@@ -239,6 +239,9 @@ MiniStarter.config = {
+@@ -248,6 +248,9 @@ MiniStarter.config = {
-- If `nil` (default), default items will be used (see |mini.starter|).
items = nil,
@@ -21,7 +21,7 @@ index 3e0570f3..0f4a384e 100644
-- Header to be displayed before items. Converted to single string via
-- `tostring` (use `\n` to display several lines). If function, it is
-- evaluated first. If `nil` (default), polite greeting will be used.
-@@ -249,6 +252,12 @@ MiniStarter.config = {
+@@ -258,6 +261,12 @@ MiniStarter.config = {
-- evaluated first. If `nil` (default), default usage help will be shown.
footer = nil,
@@ -34,7 +34,7 @@ index 3e0570f3..0f4a384e 100644
-- Array of functions to be applied consecutively to initial content.
-- Each function should take and return content for Starter buffer (see
-- |mini.starter| and |MiniStarter.get_content()| for more details).
-@@ -373,7 +382,7 @@ MiniStarter.refresh = function(buf_id)
+@@ -382,7 +391,7 @@ MiniStarter.refresh = function(buf_id)
data.footer = H.normalize_header_footer(config.footer or H.default_footer)
-- Evaluate content
@@ -43,20 +43,24 @@ index 3e0570f3..0f4a384e 100644
local hooks = config.content_hooks or H.default_content_hooks
for _, f in ipairs(hooks) do
content = f(content, buf_id)
-@@ -400,6 +409,12 @@ MiniStarter.refresh = function(buf_id)
+@@ -409,6 +418,16 @@ MiniStarter.refresh = function(buf_id)
-- Apply current query (clear command line afterwards)
H.make_query(buf_id)
+
-+ local timer = vim.loop.new_timer()
-+ timer:start(0, 0, vim.schedule_wrap(function()
-+ timer:stop()
-+ H.draw_picture(config, false)
-+ end))
++ -- The picture drawn here used to get cleared at some point
++ -- that _usually_ came before any scheduled timers fired.
++ -- That seems to not happen anymore (nvim-0.11.1, kitty 0.42.1).
++ H.draw_picture(config, false)
++ --local timer = vim.loop.new_timer()
++ --timer:start(0, 0, vim.schedule_wrap(function()
++ -- timer:stop()
++ -- H.draw_picture(config, false)
++ --end))
end
--- Close Starter buffer
-@@ -731,18 +746,45 @@ MiniStarter.gen_hook.aligning = function(horizontal, vertical)
+@@ -738,18 +757,45 @@ MiniStarter.gen_hook.aligning = function(horizontal, vertical)
local win_id = vim.fn.bufwinid(buf_id)
if win_id < 0 then return end
@@ -104,7 +108,7 @@ index 3e0570f3..0f4a384e 100644
return MiniStarter.gen_hook.padding(left_pad, top_pad)(content)
end
end
-@@ -1005,7 +1047,7 @@ H.default_footer = [[
+@@ -1012,7 +1058,7 @@ H.default_footer = [[
Type query to filter items
<BS> deletes latest character from query
<Esc> resets current query
@@ -113,7 +117,7 @@ index 3e0570f3..0f4a384e 100644
<CR> executes action of current item
<C-c> closes this buffer]]
-@@ -1046,8 +1088,54 @@ end
+@@ -1053,8 +1099,54 @@ end
H.apply_config = function(config) MiniStarter.config = config end
@@ -169,7 +173,7 @@ index 3e0570f3..0f4a384e 100644
if config.autoopen then
local on_vimenter = function()
-@@ -1059,7 +1147,7 @@ H.create_autocommands = function(config)
+@@ -1066,7 +1158,7 @@ H.create_autocommands = function(config)
vim.cmd('noautocmd lua MiniStarter.open()')
end
@@ -178,7 +182,7 @@ index 3e0570f3..0f4a384e 100644
vim.api.nvim_create_autocmd('VimEnter', au_opts)
end
-@@ -1105,9 +1193,11 @@ H.normalize_header_footer = function(x)
+@@ -1112,9 +1204,11 @@ H.normalize_header_footer = function(x)
end
-- Work with buffer content ---------------------------------------------------
@@ -191,7 +195,7 @@ index 3e0570f3..0f4a384e 100644
-- Add header lines
for _, l in ipairs(header) do
H.content_add_line(content, { H.content_unit(l, 'header', 'MiniStarterHeader') })
-@@ -1118,7 +1208,7 @@ H.make_initial_content = function(header, items, footer)
+@@ -1125,7 +1219,7 @@ H.make_initial_content = function(header, items, footer)
H.content_add_items(content, items)
-- Add footer lines
@@ -200,7 +204,7 @@ index 3e0570f3..0f4a384e 100644
for _, l in ipairs(footer) do
H.content_add_line(content, { H.content_unit(l, 'footer', 'MiniStarterFooter') })
end
-@@ -1321,11 +1411,22 @@ H.make_buffer_autocmd = function(buf_id)
+@@ -1328,11 +1422,23 @@ H.make_buffer_autocmd = function(buf_id)
au('VimResized', function() MiniStarter.refresh(buf_id) end, 'Refresh')
au('CursorMoved', function() H.position_cursor_on_current_item(buf_id) end, 'Position cursor')
@@ -214,16 +218,17 @@ index 3e0570f3..0f4a384e 100644
end, 'On BufLeave')
+
+ au('BufEnter', function()
-+ local timer = vim.loop.new_timer()
-+ timer:start(0, 0, vim.schedule_wrap(function()
-+ timer:stop()
-+ H.draw_picture(config, false)
-+ end))
++ H.draw_picture(config, false)
++ --local timer = vim.loop.new_timer()
++ --timer:start(0, 0, vim.schedule_wrap(function()
++ -- timer:stop()
++ -- H.draw_picture(config, false)
++ --end))
+ end, 'On BufEnter')
end
H.apply_buffer_options = function(buf_id)
-@@ -1338,7 +1439,7 @@ H.apply_buffer_options = function(buf_id)
+@@ -1345,7 +1451,7 @@ H.apply_buffer_options = function(buf_id)
vim.api.nvim_feedkeys('\28\14', 'nx', false)
-- Having `noautocmd` is crucial for performance: ~9ms without it, ~1.6ms with it
@@ -232,7 +237,7 @@ index 3e0570f3..0f4a384e 100644
local options = {
-- Taken from 'vim-startify'
-@@ -1385,12 +1486,8 @@ H.apply_buffer_mappings = function(buf_id)
+@@ -1392,12 +1498,8 @@ H.apply_buffer_mappings = function(buf_id)
buf_keymap('<CR>', 'MiniStarter.eval_current_item()')
@@ -247,7 +252,7 @@ index 3e0570f3..0f4a384e 100644
-- Make all special symbols to update query
for _, key in ipairs(vim.split(H.get_config().query_updaters, '')) do
-@@ -1466,21 +1563,21 @@ H.is_something_shown = function()
+@@ -1473,21 +1575,21 @@ H.is_something_shown = function()
end
-- Utilities ------------------------------------------------------------------
@@ -272,7 +277,7 @@ index 3e0570f3..0f4a384e 100644
-- Avoid hit-enter-prompt
local max_width = vim.o.columns * math.max(vim.o.cmdheight - 1, 0) + vim.v.echospace
-@@ -1529,7 +1626,7 @@ H.eval_fun_or_string = function(x, string_as_cmd)
+@@ -1536,7 +1638,7 @@ H.eval_fun_or_string = function(x, string_as_cmd)
if type(x) == 'function' then return x() end
if type(x) == 'string' then
if string_as_cmd then
diff --git a/files/windows/MSI_util_v3.zip b/files/windows/MSI_util_v3.zip
new file mode 100644
index 0000000..0731688
--- /dev/null
+++ b/files/windows/MSI_util_v3.zip
Binary files differ
diff --git a/files/winxp/xp_activate32.exe b/files/windows/xp_activate32.exe
index 1b0018a..1b0018a 100644
--- a/files/winxp/xp_activate32.exe
+++ b/files/windows/xp_activate32.exe
Binary files differ
diff --git a/flake.lock b/flake.lock
index f0b8b68..de777c0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -14,11 +14,11 @@
]
},
"locked": {
- "lastModified": 1746723111,
- "narHash": "sha256-hgN/VKry/B58P3Zv7H3zjqKVXs98jin4lfFO7WN+ghY=",
+ "lastModified": 1748213360,
+ "narHash": "sha256-P8gM26UIseGdje0MZNqpngQHMbKJWQpu53DK9fbgnZI=",
"ref": "refs/heads/master",
- "rev": "bbdc4ed66aa171f89f675aa1c82316477d5fd47e",
- "revCount": 127,
+ "rev": "2fa7ea95c891981684a55b41977172d040c2cc55",
+ "revCount": 130,
"type": "git",
"url": "https://git.akon.city/camu"
},
@@ -88,11 +88,11 @@
]
},
"locked": {
- "lastModified": 1747978958,
- "narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=",
+ "lastModified": 1748391243,
+ "narHash": "sha256-7sCuihzsTRZemtbTXaFUoGJUfuQErhKEcL9v7HKIo1k=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "7419250703fd5eb50e99bdfb07a86671939103ea",
+ "rev": "f5b12be834874f7661db4ced969a621ab2d57971",
"type": "github"
},
"original": {
@@ -176,11 +176,11 @@
},
"nixpkgs_2": {
"locked": {
- "lastModified": 1748026106,
- "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=",
+ "lastModified": 1748370509,
+ "narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c",
+ "rev": "4faa5f5321320e49a78ae7848582f684d64783e9",
"type": "github"
},
"original": {
@@ -199,11 +199,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
- "lastModified": 1748115910,
- "narHash": "sha256-XrtByWu6NjrGq1nysW4XsliVLslZXXKzCKHSC6QM5dY=",
+ "lastModified": 1748439094,
+ "narHash": "sha256-gZaw+Y0KSNnNCO86kED3y5NMWrG06TXq6L4vl/UQ3vU=",
"owner": "nix-community",
"repo": "NUR",
- "rev": "24dcce023477b994838e387ae042c6b93a749288",
+ "rev": "cc59c871120ee0ea17ba17dd3f26d60bb21bc49d",
"type": "github"
},
"original": {
diff --git a/hosts/iroha/scripts/game b/hosts/iroha/scripts/game.sh
index c716f7e..c8d626d 100755
--- a/hosts/iroha/scripts/game
+++ b/hosts/iroha/scripts/game.sh
@@ -1,6 +1,5 @@
#! /usr/bin/env sh
sudo su -c 'echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level'
-#read -p "Waiting..."
-sudo scx_bpfland
+read -p "Waiting..."
+#sudo scx_bpfland
sudo su -c 'echo auto > /sys/class/drm/card0/device/power_dpm_force_performance_level'
-
diff --git a/hosts/iroha/scripts/prepare-network-mounts b/hosts/iroha/scripts/prepare-network-mounts
index 7559c26..06cf01b 100755
--- a/hosts/iroha/scripts/prepare-network-mounts
+++ b/hosts/iroha/scripts/prepare-network-mounts
@@ -1,5 +1,4 @@
#! /usr/bin/env sh
-
-/home/andrew/scripts/mount-nfs /srv/nfs/c /home/andrew/c
-/home/andrew/scripts/mount-nfs /srv/nfs/pics /home/andrew/pics
-/home/andrew/scripts/mount-nfs /srv/nfs/torrents /mnt/store/files/ext/torrents
+$HOME/scripts/mount-nfs /srv/nfs/c /mnt/nfs/c
+$HOME/scripts/mount-nfs /srv/nfs/pics /mnt/nfs/pics
+$HOME/scripts/mount-nfs /srv/nfs/samba /mnt/nfs/samba
diff --git a/hosts/iroha/scripts/rebuild-modules b/hosts/iroha/scripts/rebuild-modules
index 9a0d902..ad400f8 100755
--- a/hosts/iroha/scripts/rebuild-modules
+++ b/hosts/iroha/scripts/rebuild-modules
@@ -1,3 +1,4 @@
#! /usr/bin/env sh
-sudo emerge --ask --verbose v4l2loopback xpad-noone \=games-util/xone-0.3_p20240226 nvidia-drivers
+#sudo emerge --ask --verbose v4l2loopback xpad-noone \=games-util/xone-0.3_p20240226 nvidia-drivers
+sudo emerge --ask --verbose xpad-noone v4l2loopback
diff --git a/hosts/iroha/scripts/xbox-controller-battery b/hosts/iroha/scripts/xbox-controller-battery
new file mode 100755
index 0000000..84913cc
--- /dev/null
+++ b/hosts/iroha/scripts/xbox-controller-battery
@@ -0,0 +1,2 @@
+#! /usr/bin/env sh
+cat /sys/class/power_supply/gip0.0/capacity_level
diff --git a/hosts/moyo/samba/smb.conf b/hosts/moyo/samba/smb.conf
index 1ca1afa..5781f4f 100644
--- a/hosts/moyo/samba/smb.conf
+++ b/hosts/moyo/samba/smb.conf
@@ -11,16 +11,16 @@
max log size = 50
passdb backend = tdbsam
allow insecure wide links = yes
- kernel oplocks = no
+ kernel oplocks = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=32768 SO_SNDBUF=32768
getwd cache = true
acl allow execute always = yes
ea support = yes
store dos attributes = yes
-[code]
+[samba]
comment = code
- path = /srv/nfs/c
+ path = /srv/nfs/samba
valid users = andrew
guest ok = no
browseable = yes
diff --git a/hosts/moyo/scripts/id-dm-device b/hosts/moyo/scripts/id-dm-device
new file mode 100755
index 0000000..b7d5781
--- /dev/null
+++ b/hosts/moyo/scripts/id-dm-device
@@ -0,0 +1,2 @@
+#! /usr/bin/env sh
+sudo sudo dmsetup info /dev/$1
diff --git a/hosts/moyo/scripts/mount-luks b/hosts/moyo/scripts/mount-luks
index 1d89cd2..5be1aaa 100755
--- a/hosts/moyo/scripts/mount-luks
+++ b/hosts/moyo/scripts/mount-luks
@@ -1,10 +1,11 @@
#! /usr/bin/env sh
+
sudo cryptsetup luksOpen /dev/mapper/moyo--vg1-moyo--store0--raid1 moyo-store0
sudo mount /dev/mapper/moyo-store0 /mnt/store0
-sudo mount --bind /mnt/store0/c /srv/nfs/c
-sudo mount --bind /mnt/store0/media/pics /srv/nfs/pics
-sudo mount --bind /mnt/store0/torrents /srv/nfs/torrents
-$HOME/scripts/export-nfs /srv/nfs
+
+sudo mount --bind /mnt/store0/nfs/c /srv/nfs/c
+sudo mount --bind /mnt/store0/nfs/pics /srv/nfs/pics
+sudo mount --bind /mnt/store0/nfs/samba /srv/nfs/samba
$HOME/scripts/export-nfs /srv/nfs/c
$HOME/scripts/export-nfs /srv/nfs/pics
-$HOME/scripts/export-nfs /srv/nfs/torrents
+$HOME/scripts/export-nfs /srv/nfs/samba
diff --git a/hosts/sofue/incus.yaml b/hosts/sofue/incus.yaml
index b01d237..407e604 100644
--- a/hosts/sofue/incus.yaml
+++ b/hosts/sofue/incus.yaml
@@ -29,14 +29,14 @@ container:
security.syscalls.intercept.bpf.devices: "true"
security.syscalls.intercept.mknod: "true"
security.syscalls.intercept.mount: "true"
- security.syscalls.intercept.mount.allowed: ext4,fat32,ntfs
+ security.syscalls.intercept.mount.allowed: ext4,fat32,ntfs,udf
security.syscalls.intercept.mount.shift: "true"
security.syscalls.intercept.sched_setscheduler: "true"
security.syscalls.intercept.setxattr: "true"
security.syscalls.intercept.sysinfo: "true"
volatile.base_image: b57963b527b192cbd262777b137333def448e7dc21fbf954e75a51f1b8acef5c
volatile.cloud-init.instance-id: 8d938ed8-c204-48e1-9670-f3aea059fd57
- volatile.eth0.host_name: veth4220df45
+ volatile.eth0.host_name: veth812d6ba0
volatile.eth0.hwaddr: 00:16:3e:c3:79:59
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000},{"Isuid":true,"Isgid":false,"Hostid":1000,"Nsid":1000,"Maprange":1},{"Isuid":true,"Isgid":false,"Hostid":1001001,"Nsid":1001,"Maprange":999998999},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":17},{"Isuid":false,"Isgid":true,"Hostid":18,"Nsid":17,"Maprange":1},{"Isuid":false,"Isgid":true,"Hostid":1000018,"Nsid":18,"Maprange":82},{"Isuid":false,"Isgid":true,"Hostid":100,"Nsid":100,"Maprange":1},{"Isuid":false,"Isgid":true,"Hostid":1000101,"Nsid":101,"Maprange":73},{"Isuid":false,"Isgid":true,"Hostid":97,"Nsid":174,"Maprange":1},{"Isuid":false,"Isgid":true,"Hostid":1000175,"Nsid":175,"Maprange":999999825}]'
@@ -47,6 +47,12 @@ container:
volatile.uuid: 85cd7ef4-2e99-4d9b-ad55-a0b311d3a7d0
volatile.uuid.generation: 85cd7ef4-2e99-4d9b-ad55-a0b311d3a7d0
devices:
+ 8bitdom30:
+ gid: "97"
+ mode: "0666"
+ productid: "0024"
+ type: unix-hotplug
+ vendorid: 0ca3
PipewireSocket1:
bind: container
connect: unix:/run/user/1000/pipewire-0
@@ -78,6 +84,7 @@ container:
type: proxy
uid: "1000"
binder:
+ gid: "100"
mode: "0666"
path: /dev/binder
source: /dev/binder
@@ -88,8 +95,8 @@ container:
source: /dev/sr0
type: unix-block
code:
- path: /home/andrew/c
- source: /home/andrew/c
+ path: /mnt/nfs/c
+ source: /mnt/nfs/c
type: disk
data:
path: /mnt/data
@@ -105,6 +112,10 @@ container:
productid: "0201"
type: unix-hotplug
vendorid: 04d9
+ ext_ssd:
+ path: /mnt/ext_ssd
+ source: /mnt/ext_ssd
+ type: disk
googlepixel:
mode: "0666"
productid: 4ee7
@@ -160,6 +171,7 @@ container:
listen: tcp:0.0.0.0:14356
type: proxy
hwbinder:
+ gid: "100"
mode: "0666"
path: /dev/hwbinder
source: /dev/hwbinder
@@ -207,8 +219,12 @@ container:
pci: 0000:0f:00.0
type: gpu
pics:
- path: /home/andrew/pics
- source: /home/andrew/pics
+ path: /mnt/nfs/pics
+ source: /mnt/nfs/pics
+ type: disk
+ samba:
+ path: /mnt/nfs/samba
+ source: /mnt/nfs/samba
type: disk
ssd:
path: /mnt/ssd
@@ -218,10 +234,12 @@ container:
path: /mnt/store
source: /mnt/store
type: disk
- torrents:
- path: /mnt/store/files/ext/torrents
- source: /mnt/store/files/ext/torrents
- type: disk
+ switchpro:
+ gid: "97"
+ mode: "0666"
+ productid: "2009"
+ type: unix-hotplug
+ vendorid: 057e
tty:
mode: "0666"
path: /dev/tty
@@ -265,6 +283,7 @@ container:
source: /dev/video1
type: unix-char
vndbinder:
+ gid: "100"
mode: "0666"
path: /dev/vndbinder
source: /dev/vndbinder
@@ -334,14 +353,14 @@ container:
security.syscalls.intercept.bpf.devices: "true"
security.syscalls.intercept.mknod: "true"
security.syscalls.intercept.mount: "true"
- security.syscalls.intercept.mount.allowed: ext4,fat32,ntfs
+ security.syscalls.intercept.mount.allowed: ext4,fat32,ntfs,udf
security.syscalls.intercept.mount.shift: "true"
security.syscalls.intercept.sched_setscheduler: "true"
security.syscalls.intercept.setxattr: "true"
security.syscalls.intercept.sysinfo: "true"
volatile.base_image: b57963b527b192cbd262777b137333def448e7dc21fbf954e75a51f1b8acef5c
volatile.cloud-init.instance-id: 8d938ed8-c204-48e1-9670-f3aea059fd57
- volatile.eth0.host_name: veth4220df45
+ volatile.eth0.host_name: veth812d6ba0
volatile.eth0.hwaddr: 00:16:3e:c3:79:59
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000},{"Isuid":true,"Isgid":false,"Hostid":1000,"Nsid":1000,"Maprange":1},{"Isuid":true,"Isgid":false,"Hostid":1001001,"Nsid":1001,"Maprange":999998999},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":17},{"Isuid":false,"Isgid":true,"Hostid":18,"Nsid":17,"Maprange":1},{"Isuid":false,"Isgid":true,"Hostid":1000018,"Nsid":18,"Maprange":82},{"Isuid":false,"Isgid":true,"Hostid":100,"Nsid":100,"Maprange":1},{"Isuid":false,"Isgid":true,"Hostid":1000101,"Nsid":101,"Maprange":73},{"Isuid":false,"Isgid":true,"Hostid":97,"Nsid":174,"Maprange":1},{"Isuid":false,"Isgid":true,"Hostid":1000175,"Nsid":175,"Maprange":999999825}]'
@@ -352,6 +371,12 @@ container:
volatile.uuid: 85cd7ef4-2e99-4d9b-ad55-a0b311d3a7d0
volatile.uuid.generation: 85cd7ef4-2e99-4d9b-ad55-a0b311d3a7d0
expanded_devices:
+ 8bitdom30:
+ gid: "97"
+ mode: "0666"
+ productid: "0024"
+ type: unix-hotplug
+ vendorid: 0ca3
PipewireSocket1:
bind: container
connect: unix:/run/user/1000/pipewire-0
@@ -383,6 +408,7 @@ container:
type: proxy
uid: "1000"
binder:
+ gid: "100"
mode: "0666"
path: /dev/binder
source: /dev/binder
@@ -393,8 +419,8 @@ container:
source: /dev/sr0
type: unix-block
code:
- path: /home/andrew/c
- source: /home/andrew/c
+ path: /mnt/nfs/c
+ source: /mnt/nfs/c
type: disk
data:
path: /mnt/data
@@ -414,6 +440,10 @@ container:
name: eth0
network: incusbr0
type: nic
+ ext_ssd:
+ path: /mnt/ext_ssd
+ source: /mnt/ext_ssd
+ type: disk
googlepixel:
mode: "0666"
productid: 4ee7
@@ -469,6 +499,7 @@ container:
listen: tcp:0.0.0.0:14356
type: proxy
hwbinder:
+ gid: "100"
mode: "0666"
path: /dev/hwbinder
source: /dev/hwbinder
@@ -516,13 +547,17 @@ container:
pci: 0000:0f:00.0
type: gpu
pics:
- path: /home/andrew/pics
- source: /home/andrew/pics
+ path: /mnt/nfs/pics
+ source: /mnt/nfs/pics
type: disk
root:
path: /
pool: default
type: disk
+ samba:
+ path: /mnt/nfs/samba
+ source: /mnt/nfs/samba
+ type: disk
ssd:
path: /mnt/ssd
source: /mnt/ssd
@@ -531,10 +566,12 @@ container:
path: /mnt/store
source: /mnt/store
type: disk
- torrents:
- path: /mnt/store/files/ext/torrents
- source: /mnt/store/files/ext/torrents
- type: disk
+ switchpro:
+ gid: "97"
+ mode: "0666"
+ productid: "2009"
+ type: unix-hotplug
+ vendorid: 057e
tty:
mode: "0666"
path: /dev/tty
@@ -578,6 +615,7 @@ container:
source: /dev/video1
type: unix-char
vndbinder:
+ gid: "100"
mode: "0666"
path: /dev/vndbinder
source: /dev/vndbinder
@@ -609,7 +647,7 @@ container:
name: sofue
status: Running
status_code: 103
- last_used_at: 2025-05-02T10:45:55.80642907Z
+ last_used_at: 2025-05-27T23:32:26.92570937Z
location: none
type: container
project: iroha
diff --git a/hosts/yashinoki/configuration.nix b/hosts/yashinoki/configuration.nix
index 06a6700..932637a 100644
--- a/hosts/yashinoki/configuration.nix
+++ b/hosts/yashinoki/configuration.nix
@@ -139,7 +139,7 @@ in {
};
users.users.andrew.extraGroups = [ "networkmanager" ];
- fileSystems."/home/andrew/c" = {
+ fileSystems."/mnt/nfs/c" = {
device = "moyo:/srv/nfs/c";
fsType = "nfs4";
options = disks.nfs_options;
diff --git a/nix/programs/bash.nix b/nix/programs/bash.nix
index ca6b7d9..4fb9cd3 100644
--- a/nix/programs/bash.nix
+++ b/nix/programs/bash.nix
@@ -9,7 +9,7 @@
programs.bash = {
enable = true;
shellAliases = {
- cp = "rsync -avz";
+ cp = "rsync -av";
top = "htop";
bc = "bc -l";
pgrep = "pgrep -f";
diff --git a/nix/programs/kitty.nix b/nix/programs/kitty.nix
index c070871..74b6c6a 100644
--- a/nix/programs/kitty.nix
+++ b/nix/programs/kitty.nix
@@ -17,7 +17,6 @@ in {
mode = "enabled";
enableBashIntegration = true;
};
- # @TODO: https://sw.kovidgoyal.net/kitty/conf/#opt-kitty.active_tab_title_template
extraConfig = ''
shell ${pkgs.bashInteractive}/bin/bash --login
update_check_interval 0
@@ -41,6 +40,7 @@ in {
cursor_trail_decay 0.075 0.425
cursor_trail_start_threshold 3
cursor #${colo.foreground}
+ #cursor none
cursor_text_color background
foreground #${colo.foreground}
background #${colo.background}
@@ -72,6 +72,11 @@ in {
active_border_color #${colo.color4}
bell_border_color #${colo.color1}
inactive_border_color #${colo.color3}
+ active_tab_foreground #${colo.background}
+ active_tab_background #${colo.color5}
+ active_tab_font_style bold-italic
+ inactive_tab_foreground #${colo.background}
+ inactive_tab_background #${colo.color4}
url_color #${colo.color5}
enabled_layouts splits,stack
'';
@@ -79,12 +84,12 @@ in {
home.file.".config/kitty/quick-access-terminal.conf".text = ''
lines 18
background_opacity 0.925
+ output_name ${loc.monitors.monitor1}
kitty_override startup_session=quick-access-session.conf
kitty_override placement_strategy=bottom-right
kitty_override window_padding_width=0 12 8 0
'';
home.file.".config/kitty/quick-access-session.conf".text = ''
- output_name ${loc.monitors.monitor1}
layout splits
launch --var window=main
launch --location=vsplit --bias=17.1 /home/andrew/dl/tmp/clock/a.out
diff --git a/nix/programs/nvim.nix b/nix/programs/nvim.nix
index 5c70f35..b12ad52 100644
--- a/nix/programs/nvim.nix
+++ b/nix/programs/nvim.nix
@@ -185,7 +185,7 @@ in {
footer_offset = ${toString s.footer-offset},
picture = {
path = '${s.picture}',
- kitty = true,
+ kitty = os.getenv('TERM') == 'xterm-kitty',
width = ${toString s.width},
position = '${s.position}',
padding = {
diff --git a/nix/scripts.nix b/nix/scripts.nix
index e8c63f6..c965157 100644
--- a/nix/scripts.nix
+++ b/nix/scripts.nix
@@ -21,7 +21,7 @@ in {
'')
] ++ (lib.lists.forEach loc.scripts.imports (x: pkgs.writeTextFile {
name = x;
- text = (builtins.readFile ../scripts/${x});
+ text = (builtins.readFile ../scripts/desktop/${x});
executable = true;
destination = "/bin/${x}";
}));
diff --git a/nix/system.nix b/nix/system.nix
index 5f1943e..92b95df 100644
--- a/nix/system.nix
+++ b/nix/system.nix
@@ -87,6 +87,7 @@
appimage-run
i2c-tools
pciutils
+ smartmontools
lm_sensors
libdrm
libva-utils
diff --git a/nix/user.nix b/nix/user.nix
index 0050182..01d6e84 100644
--- a/nix/user.nix
+++ b/nix/user.nix
@@ -108,6 +108,7 @@ in {
"ts-date"
"term-font-size"
"shift-jis-zip"
+ "7z-password"
"moonrune-charset-utf8"
"gpg-pubkey"
"img-fstype"
diff --git a/scripts/desktop/7z-password b/scripts/desktop/7z-password
new file mode 100755
index 0000000..72e90f9
--- /dev/null
+++ b/scripts/desktop/7z-password
@@ -0,0 +1,2 @@
+#! /usr/bin/env sh
+7z a -p -mhe=on $1 $2
diff --git a/scripts/battery b/scripts/desktop/battery
index c09992a..c09992a 100755
--- a/scripts/battery
+++ b/scripts/desktop/battery
diff --git a/scripts/cpu-vulns b/scripts/desktop/cpu-vulns
index e55ad9c..e55ad9c 100755
--- a/scripts/cpu-vulns
+++ b/scripts/desktop/cpu-vulns
diff --git a/scripts/dbus-sway-environment b/scripts/desktop/dbus-sway-environment
index 249d610..249d610 100755
--- a/scripts/dbus-sway-environment
+++ b/scripts/desktop/dbus-sway-environment
diff --git a/scripts/discord-wayland b/scripts/desktop/discord-wayland
index ec8a106..ec8a106 100755
--- a/scripts/discord-wayland
+++ b/scripts/desktop/discord-wayland
diff --git a/scripts/dmenu-emoji b/scripts/desktop/dmenu-emoji
index 07c1900..07c1900 100755
--- a/scripts/dmenu-emoji
+++ b/scripts/desktop/dmenu-emoji
diff --git a/scripts/dmenu-path b/scripts/desktop/dmenu-path
index 9c8122a..9c8122a 100755
--- a/scripts/dmenu-path
+++ b/scripts/desktop/dmenu-path
diff --git a/scripts/dmenu-path0 b/scripts/desktop/dmenu-path0
index 593ecf6..593ecf6 100755
--- a/scripts/dmenu-path0
+++ b/scripts/desktop/dmenu-path0
diff --git a/scripts/gpg-pubkey b/scripts/desktop/gpg-pubkey
index 5353972..5353972 100755
--- a/scripts/gpg-pubkey
+++ b/scripts/desktop/gpg-pubkey
diff --git a/scripts/img-fstype b/scripts/desktop/img-fstype
index 82df6b8..82df6b8 100755
--- a/scripts/img-fstype
+++ b/scripts/desktop/img-fstype
diff --git a/scripts/install-as-needed b/scripts/desktop/install-as-needed
index 9db4ff1..9db4ff1 100755
--- a/scripts/install-as-needed
+++ b/scripts/desktop/install-as-needed
diff --git a/scripts/looking-glass b/scripts/desktop/looking-glass
index 5ce9cf4..5ce9cf4 100755
--- a/scripts/looking-glass
+++ b/scripts/desktop/looking-glass
diff --git a/scripts/moonrune-charset-utf8 b/scripts/desktop/moonrune-charset-utf8
index d3e8343..d3e8343 100755
--- a/scripts/moonrune-charset-utf8
+++ b/scripts/desktop/moonrune-charset-utf8
diff --git a/scripts/mount-nfs b/scripts/desktop/mount-nfs
index a07f4cf..a07f4cf 100755
--- a/scripts/mount-nfs
+++ b/scripts/desktop/mount-nfs
diff --git a/scripts/rewrite-git b/scripts/desktop/rewrite-git
index b48ba4d..b48ba4d 100755
--- a/scripts/rewrite-git
+++ b/scripts/desktop/rewrite-git
diff --git a/scripts/screenshot b/scripts/desktop/screenshot
index ddeb73a..ddeb73a 100755
--- a/scripts/screenshot
+++ b/scripts/desktop/screenshot
diff --git a/scripts/shift-jis-zip b/scripts/desktop/shift-jis-zip
index 30dab2e..30dab2e 100755
--- a/scripts/shift-jis-zip
+++ b/scripts/desktop/shift-jis-zip
diff --git a/scripts/sp b/scripts/desktop/sp
index 19d38a1..19d38a1 100755
--- a/scripts/sp
+++ b/scripts/desktop/sp
diff --git a/scripts/term-font-size b/scripts/desktop/term-font-size
index 0637b12..0637b12 100755
--- a/scripts/term-font-size
+++ b/scripts/desktop/term-font-size
diff --git a/scripts/ts-date b/scripts/desktop/ts-date
index f16517f..f16517f 100755
--- a/scripts/ts-date
+++ b/scripts/desktop/ts-date
diff --git a/scripts/wlsunset-toggle b/scripts/desktop/wlsunset-toggle
index 7dcd06e..7dcd06e 100755
--- a/scripts/wlsunset-toggle
+++ b/scripts/desktop/wlsunset-toggle
diff --git a/scripts/xbox360-ffmpeg-enc b/scripts/desktop/xbox360-ffmpeg-enc
index aab754f..aab754f 100755
--- a/scripts/xbox360-ffmpeg-enc
+++ b/scripts/desktop/xbox360-ffmpeg-enc
diff --git a/scripts/sync/diff.sh b/scripts/sync/diff.sh
new file mode 100755
index 0000000..61ff628
--- /dev/null
+++ b/scripts/sync/diff.sh
@@ -0,0 +1,8 @@
+#! /usr/bin/env sh
+set -e
+REMOTE="$(cat remote)"
+if [ ! -d $REMOTE ]; then
+ echo "Path $REMOTE does not exist."
+ exit 1
+fi
+diff --brief --recursive --new-file --no-dereference . $REMOTE
diff --git a/scripts/sync/pull.sh b/scripts/sync/pull.sh
new file mode 100755
index 0000000..1bf5b48
--- /dev/null
+++ b/scripts/sync/pull.sh
@@ -0,0 +1,34 @@
+#! /usr/bin/env sh
+
+set -e
+
+SOURCE="$(cat remote)/"
+if [ ! -d $SOURCE ]; then
+ echo "Path $SOURCE does not exist."
+ exit 1
+fi
+
+ARGS=()
+FORCE=0
+while getopts 'cfdr' opt; do
+ case "$opt" in
+ c) # Changes
+ ARGS+=('--delete')
+ ;;
+ f) # Full
+ ARGS+=('--checksum')
+ ;;
+ d) # Dry
+ ARGS+=('--dry-run')
+ ;;
+ r) # Revert
+ FORCE=1
+ ;;
+ esac
+done
+
+if [ $FORCE = 0 ]; then
+ ARGS+=('--update')
+fi
+
+rsync --archive --itemize-changes "${ARGS[@]}" $SOURCE .
diff --git a/scripts/sync/push.sh b/scripts/sync/push.sh
new file mode 100755
index 0000000..3adbd02
--- /dev/null
+++ b/scripts/sync/push.sh
@@ -0,0 +1,34 @@
+#! /usr/bin/env sh
+
+set -e
+
+DEST="$(cat remote)"
+if [ ! -d $DEST ]; then
+ echo "Path $DEST does not exist."
+ exit 1
+fi
+
+ARGS=()
+FORCE=0
+while getopts 'cfdr' opt; do
+ case "$opt" in
+ c) # Changes
+ ARGS+=('--delete')
+ ;;
+ f) # Full
+ ARGS+=('--checksum')
+ ;;
+ d) # Dry
+ ARGS+=('--dry-run')
+ ;;
+ r) # Revert
+ FORCE=1
+ ;;
+ esac
+done
+
+if [ $FORCE = 0 ]; then
+ ARGS+=('--update')
+fi
+
+rsync --archive --itemize-changes "${ARGS[@]}" ./ $DEST