summaryrefslogtreecommitdiff
path: root/nix_archive
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2025-10-17 12:22:00 -0400
committerAndrew Opalach <andrew@akon.city> 2025-10-17 12:32:42 -0400
commit544da1ba50d9cbf51a18ca0abf1db66b3baa7460 (patch)
tree1caa87664ea4937c5f4e6e8dc83c49b3132ddd70 /nix_archive
parent85a47287e56ba9100420246531ebea5996cc0486 (diff)
downloaddotfiles-544da1ba50d9cbf51a18ca0abf1db66b3baa7460.tar.gz
dotfiles-544da1ba50d9cbf51a18ca0abf1db66b3baa7460.tar.bz2
dotfiles-544da1ba50d9cbf51a18ca0abf1db66b3baa7460.zip
Gentoo desktop
Diffstat (limited to 'nix_archive')
-rw-r--r--nix_archive/files/nvim/fzf_no_linenum.diff24
-rw-r--r--nix_archive/files/nvim/init.vim368
-rw-r--r--nix_archive/files/nvim/local/autoload/Juliana.vim46
-rw-r--r--nix_archive/files/nvim/mini_completion_no_title.diff0
-rw-r--r--nix_archive/files/nvim/mini_starter_picture.diff288
-rw-r--r--nix_archive/flake.lock277
-rw-r--r--nix_archive/flake.nix335
-rw-r--r--nix_archive/hosts/moyo/container.nix97
-rw-r--r--nix_archive/hosts/palm/configuration.nix249
-rw-r--r--nix_archive/hosts/palm/hardware-configuration.nix37
-rw-r--r--nix_archive/hosts/palm/programs.nix17
-rw-r--r--nix_archive/hosts/sofue/configuration.nix267
-rw-r--r--nix_archive/hosts/sofue/gccarch_mesa.nix10
-rw-r--r--nix_archive/hosts/sofue/incus.yaml694
-rw-r--r--nix_archive/hosts/sofue/programs.nix29
-rw-r--r--nix_archive/nix/amdgpu.nix51
-rw-r--r--nix_archive/nix/audio.nix113
-rw-r--r--nix_archive/nix/bluetooth.nix16
-rw-r--r--nix_archive/nix/email.nix158
-rw-r--r--nix_archive/nix/gaming.nix110
-rw-r--r--nix_archive/nix/intel.nix15
-rw-r--r--nix_archive/nix/mesa_git.nix16
-rw-r--r--nix_archive/nix/programs/bash.nix65
-rw-r--r--nix_archive/nix/programs/docker.nix4
-rw-r--r--nix_archive/nix/programs/firefox.nix145
-rw-r--r--nix_archive/nix/programs/foot.nix51
-rw-r--r--nix_archive/nix/programs/kdeconnect.nix12
-rw-r--r--nix_archive/nix/programs/kitty.nix112
-rw-r--r--nix_archive/nix/programs/nvim.nix235
-rw-r--r--nix_archive/nix/programs/obs.nix11
-rw-r--r--nix_archive/nix/programs/sunshine.nix29
-rw-r--r--nix_archive/nix/programs/sway.nix360
-rw-r--r--nix_archive/nix/programs/waydroid.nix3
-rw-r--r--nix_archive/nix/programs/zsh.nix76
-rw-r--r--nix_archive/nix/scripts.nix28
-rw-r--r--nix_archive/nix/settings.nix8
-rw-r--r--nix_archive/nix/steam.nix48
-rw-r--r--nix_archive/nix/system.nix134
-rw-r--r--nix_archive/nix/user.nix211
-rw-r--r--nix_archive/nix/virtualisation.nix15
-rw-r--r--nix_archive/nix/x86.nix3
-rw-r--r--nix_archive/nixpkgs-patches/.gitignore0
-rwxr-xr-xnix_archive/port-forward33
-rw-r--r--nix_archive/themes/year_of_snake/snake.nix23
-rw-r--r--nix_archive/themes/year_of_snake/splash.krabin0 -> 1441596 bytes
-rw-r--r--nix_archive/themes/year_of_snake/splash.pngbin0 -> 501920 bytes
-rw-r--r--nix_archive/themes/year_of_snake/wallpaper.krabin0 -> 7984814 bytes
-rw-r--r--nix_archive/themes/year_of_snake/wallpaper.pngbin0 -> 2346081 bytes
48 files changed, 4823 insertions, 0 deletions
diff --git a/nix_archive/files/nvim/fzf_no_linenum.diff b/nix_archive/files/nvim/fzf_no_linenum.diff
new file mode 100644
index 0000000..bed26be
--- /dev/null
+++ b/nix_archive/files/nvim/fzf_no_linenum.diff
@@ -0,0 +1,24 @@
+diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim
+index 67945c3..ccfe729 100755
+--- a/autoload/fzf/vim.vim
++++ b/autoload/fzf/vim.vim
+@@ -789,7 +789,7 @@ endfunction
+
+ function! fzf#vim#_format_buffer(b)
+ let name = bufname(a:b)
+- let line = exists('*getbufinfo') ? getbufinfo(a:b)[0]['lnum'] : 0
++ "let line = exists('*getbufinfo') ? getbufinfo(a:b)[0]['lnum'] : 0
+ let fullname = empty(name) ? '' : fnamemodify(name, ":p:~:.")
+ let dispname = empty(name) ? '[No Name]' : name
+ let flag = a:b == bufnr('') ? s:blue('%', 'Conditional') :
+@@ -797,8 +797,8 @@ function! fzf#vim#_format_buffer(b)
+ let modified = getbufvar(a:b, '&modified') ? s:red(' [+]', 'Exception') : ''
+ let readonly = getbufvar(a:b, '&modifiable') ? '' : s:green(' [RO]', 'Constant')
+ let extra = join(filter([modified, readonly], '!empty(v:val)'), '')
+- let target = empty(name) ? '' : (line == 0 ? fullname : fullname.':'.line)
+- return s:rstrip(printf("%s\t%d\t[%s] %s\t%s\t%s", target, line, s:yellow(a:b, 'Number'), flag, dispname, extra))
++ let target = empty(name) ? '' : (fullname)
++ return s:rstrip(printf("%s\t[%s] %s\t%s\t%s", target, s:yellow(a:b, 'Number'), flag, dispname, extra))
+ endfunction
+
+ function! s:sort_buffers(...)
diff --git a/nix_archive/files/nvim/init.vim b/nix_archive/files/nvim/init.vim
new file mode 100644
index 0000000..7a1d5bc
--- /dev/null
+++ b/nix_archive/files/nvim/init.vim
@@ -0,0 +1,368 @@
+" Basic settings.
+set number
+set noshowmode
+set signcolumn=yes
+set updatetime=250
+set scrolloff=5
+
+" Change directory based on current file.
+if !empty($NIX_SHELL)
+ " Attempt to conflict less with plugins.
+ autocmd BufEnter * if gitbranch#name() != '' | silent! lcd %:p:h
+else
+ set autochdir
+endif
+
+" inotify compat?
+set backupcopy=yes
+
+" Old defaults (I think).
+set splitright
+set splitbelow
+
+" Syntax and indent from filetype.
+set nocompatible
+filetype plugin indent on
+syntax on
+
+" Check for SHIFT_JIS.
+set fileencodings=ucs-bom,utf-8,sjis,default,latin1
+
+" 4 spaces autoindent.
+set tabstop=4
+set shiftwidth=4
+set expandtab
+set autoindent
+
+" C syntax preference.
+let g:c_syntax_for_h=1
+let g:c_no_curly_error=1
+let g:c_function_pointers=1
+set cinoptions=:0,=4,l1,g2,h2,(4,u4,+4,m1,j1,J1
+set cindent
+
+" Set different format for mail and text files.
+set nowrap nolinebreak nolist formatoptions=l textwidth=0
+autocmd FileType mail,text setlocal wrap formatoptions=l textwidth=0
+
+" Ex tab complete that makes sense to me.
+set wildmode=longest,list,full
+set wildmenu
+
+" Allow distinguishing <C-i> from <Tab> in bindings.
+let &t_TI = '\<Esc>[>4;2m'
+let &t_TE = '\<Esc>[>4;m'
+" Treat shift + backspace as normal backspace.
+tnoremap <S-BS> <BS>
+
+" System clipboard on linux.
+set clipboard+=unnamedplus
+
+" Session options.
+set ssop=skiprtp,blank,buffers,folds,winsize,terminal
+set vop-=curdir
+if isdirectory(expand('~/c'))
+ let view_dir = expand('~/c/sessions/nvim/views')
+ if !isdirectory(view_dir)
+ call mkdir(view_dir, 'p', 0755)
+ endif
+ let &viewdir=view_dir
+
+ " Staggered backups.
+ let backup_dir = '/mnt/store/backup/vim'
+ if !isdirectory(backup_dir)
+ let backup_dir = expand('~/c/sessions/nvim/backup//')
+ if !isdirectory(backup_dir)
+ call mkdir(backup_dir, 'p', 0755)
+ endif
+ endif
+ let &backupdir=backup_dir
+ set backup
+
+ " Swap file directory.
+ let swap_dir = expand('~/c/sessions/nvim/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/nvim/undo')
+ if !isdirectory(undo_dir)
+ call mkdir(undo_dir, 'p', 0755)
+ endif
+ let &undodir=undo_dir
+ set undofile
+ endif
+endif
+
+" Colorscheme.
+set termguicolors
+colo wal-gui
+
+" Cursor blink.
+"set guicursor=a:blinkon1
+
+" Highlight whitespace.
+au BufEnter * match ExtraWhitespace /\s\+$/
+au InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
+au InsertLeave * match ExtraWhitespace /\s\+$/
+
+" Fzf format.
+let g:fzf_colors = {
+ \'fg': ['fg', 'Normal'],
+ \'bg': ['bg', 'Normal'],
+ \'hl': ['fg', 'Type'],
+ \'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'],
+ \'bg+': ['bg', 'CursorLine', 'CursorColumn'],
+ \'hl+': ['fg', 'Type'],
+ \'info': ['fg', 'PreProc'],
+ \'border': ['fg', 'Operator'],
+ \'prompt': ['fg', 'Identifier'],
+ \'pointer': ['fg', 'Type'],
+ \'marker': ['fg', 'Keyword'],
+ \'spinner': ['fg', 'String'],
+ \'header': ['fg', 'Type']
+\}
+let g:fzf_preview_window = ['right,55%']
+" This is redundant but I want to keep FZF_DEFAULT_OPTS here.
+let $FZF_DEFAULT_OPTS = '--preview-window=border-sharp'
+let g:fzf_layout = {
+ \'window': { 'width': 0.75, 'height': 0.60, 'rounded': 0 },
+\}
+
+function! StatuslineMode() abort
+ if mode() == nr2char(22)
+ return mode()
+ else
+ return '-'.mode()
+ endif
+endfunction
+
+function! StatuslineGit()
+ let l:branchname = gitbranch#name()
+ return strlen(l:branchname) > 0 ? ' '.l:branchname.' ' : ' '
+endfunction
+
+function! StatuslineLsp() abort
+ return luaeval('get_lsp_name()')
+endfunction
+
+" Custom statusline.
+function! Statusline() abort
+ let focused = g:statusline_winid == win_getid(winnr())
+ let status = focused ? '%#StatusLine#' : '%#StatusLineNC#'
+ let status .= '%{StatuslineGit()}'
+ let status .= ' %f'
+ let status .= ' vim@%{hostname()}'
+ let status .= '%='
+ let status .= ' %y'
+ let status .= '%{StatuslineLsp()}'
+ let status .= ' %{&fileencoding}'
+ let status .= '[%{&fileformat}]'
+ let status .= '%3p%%'
+ let status .= ' %3l:%-3c'
+ return status
+endfunction
+set statusline=%!Statusline()
+
+" Make shift + nav keys no-ops.
+nmap H <nop>
+nmap J <nop>
+nmap K <nop>
+nmap L <nop>
+" Normal mode tab no-op.
+nmap <Tab> <nop>
+" ctrl + c no-op.
+nmap <C-c> <nop>
+" Disable F1 for help.
+nmap <F1> <nop>
+" Disable q: for histroy.
+nmap q: <nop>
+" Simplify split movement.
+nmap <silent> <C-h> :wincmd h<CR>
+nmap <silent> <C-j> :wincmd j<CR>
+nmap <silent> <C-k> :wincmd k<CR>
+nmap <silent> <C-l> :wincmd l<CR>
+nmap <silent> <C-o> :vsplit<CR>
+" Make ctrl + '.' and ',' map to previous buffer.
+nmap <C-,> <C-^>
+nmap <C-.> <C-^>
+" Swap ctrl + f and b.
+"nnoremap <C-b> <C-f>
+"nnoremap <C-f> <C-b>
+" Toggle colorcolumn.
+nmap <silent> C :execute 'set colorcolumn=' . (&colorcolumn == '' ? '101' : '')<CR>
+" Personally intuitive pop-up menu binds.
+inoremap <expr> <CR> pumvisible() ? '<C-y><CR>' : '<CR>'
+inoremap <expr> <Up> pumvisible() ? '<C-p>' : '<Up>'
+inoremap <expr> <Down> pumvisible() ? '<C-n>' : '<Down>'
+" Lsp Binds.
+nmap <C-d> <C-]>
+" Fzf binds.
+nmap <silent> \ :Buffers<CR>
+nmap <silent> <C-o> :GGrep<CR>
+nmap <silent> <C-\> :GFiles<CR>
+" Only Neogit bind, handle all further operations from this menu.
+nmap <silent> Y :Neogit<CR>
+nmap <silent> L :lua neogit_log_current()<CR>
+" Undotree.
+nmap <silent> U :UndotreeToggle<CR>
+" Toggle hex color highlighting.
+nnoremap <silent> # :CccHighlighterToggle<CR>
+
+command Tabify set noexpandtab | %retab! | set expandtab
+command Untabify set expandtab | %retab!
+
+" https://stackoverflow.com/a/37040415
+function! SyntaxGroup()
+ let l:s = synID(line('.'), col('.'), 1)
+ echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
+endfun
+
+" https://vi.stackexchange.com/a/456
+function! TrimWhitespace()
+ let l:save = winsaveview()
+ keeppatterns %s/\s\+$//e
+ call winrestview(l:save)
+endfun
+
+" https://github.com/junegunn/fzf.vim?tab=readme-ov-file#example-git-grep-wrapper
+command! -bang -nargs=* GGrep
+ \ call fzf#vim#grep(
+ \ 'git grep --line-number -- '.fzf#shellescape(<q-args>),
+ \ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
+
+" https://vim.fandom.com/wiki/Replace_a_builtin_command_using_cabbrev
+function! CommandCabbr(abbreviation, expansion)
+ execute 'cabbr ' . a:abbreviation . ' <C-R>=getcmdpos() == 1 && getcmdtype() == ":" ? "' . a:expansion . '" : "' . a:abbreviation . '"<CR>'
+endfunction
+command! -nargs=+ CommandCabbr call CommandCabbr(<f-args>)
+CommandCabbr no nohlsearch
+
+call Juliana#Init() " Custom insert mode tab behavior inherited from Emacs.
+inoremap <silent><Tab> <C-R>=Juliana#CompleteTab('START')<CR>
+ \<C-R>=Juliana#CompleteTab('TAB')<CR>
+ \<C-R>=Juliana#CompleteTab('ALIGN')<CR>
+ \<C-R>=Juliana#CompleteTab('NEXT')<CR>
+inoremap <silent><S-Tab> <C-R>=Juliana#CompleteSTab('PREV')<CR>
+
+lua << EOF
+function get_lsp_name()
+ local active_clients = vim.lsp.get_clients({bufnr = vim.api.nvim_get_current_buf()})
+ if next(active_clients) == nil then
+ return ''
+ else
+ str = '<'
+ for _, v in pairs(active_clients) do
+ str = str .. v.name .. '+'
+ end
+ return str:sub(1, -2) .. '>'
+ end
+end
+
+buf_is_big = function(bufnr)
+ local max_filesize = 100 * 1024 -- 100KB
+ local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(bufnr))
+ if ok and stats and stats.size > max_filesize then
+ return true
+ else
+ return false
+ end
+end
+
+-- LSP configs.
+if os.getenv('NIX_SHELL') ~= nil then
+ vim.diagnostic.config({ virtual_text = true })
+ vim.lsp.config('clangd', {
+ cmd = {
+ 'clangd',
+ '-j=4',
+ '--log=error',
+ '--malloc-trim',
+ '--background-index',
+ '--clang-tidy',
+ '--completion-style=bundled',
+ '--pch-storage=memory',
+ '--header-insertion=never',
+ '--header-insertion-decorators=0',
+ '--query-driver=gcc'
+ },
+ capabilities = {
+ textDocument = {
+ semanticHighlightingCapabilities = {
+ semanticHighlighting = true
+ },
+ completion = {
+ completionItem = {
+ snippetSupport = false
+ }
+ }
+ }
+ },
+ })
+ 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', {
+ callback = function(t)
+ if buf_is_big(t.buf) then
+ vim.o.eventignore = 'FileType'
+ vim.schedule(function()
+ vim.o.eventignore = ''
+ print('Dropped FileType events because the buffer is too big')
+ end)
+ end
+ end
+ })
+ require('inc_rename').setup({})
+ vim.keymap.set('n', '<C-n>', function()
+ return ':IncRename ' .. vim.fn.expand('<cword>')
+ end, { expr = true })
+end
+
+-- Set sessions folder and autowrite.
+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({
+ window = {
+ info = { border = 'none' },
+ signature = { border = 'none' }
+ }
+})
+
+-- Don't use tabs in Neogit.
+require('neogit').setup({
+ disable_hint = true,
+ kind = 'vsplit',
+ commit_editor = { kind = 'split' },
+ commit_select_view = { kind = 'vsplit' },
+ commit_view = { kind = 'vsplit' },
+ log_view = { kind = 'split' },
+ reflog_view = { kind = 'split' },
+ preview_buffer = { kind = 'split' },
+ popup = { kind = 'split' },
+ refs_view = { kind = 'split' },
+ -- Allow basic movement in Neogit without mapping conflicts.
+ mappings = {
+ popup = { ['l'] = false, ['L'] = 'LogPopup', ['d'] = false },
+ status = { ['$'] = false, ['#'] = 'CommandHistory' }
+ },
+ integrations = {}
+})
+
+-- Doesn't work consistently.
+function neogit_log_current()
+ require("neogit").action("log", "log_current", { "--", vim.fn.expand("%:p") })()
+end
+
+-- Preview colors in #<hex> format.
+require('ccc').setup({ highlighter = { auto_enable = false, lsp = true } })
+EOF
diff --git a/nix_archive/files/nvim/local/autoload/Juliana.vim b/nix_archive/files/nvim/local/autoload/Juliana.vim
new file mode 100644
index 0000000..1b684b9
--- /dev/null
+++ b/nix_archive/files/nvim/local/autoload/Juliana.vim
@@ -0,0 +1,46 @@
+" https://github.com/neitanod/vim-clevertab
+
+function! Juliana#Init()
+ let g:Juliana#has_selection = 0
+ augroup JulianaPersistAu
+ autocmd ModeChanged [V\x16]*:i let g:Juliana#has_selection = 1
+ autocmd InsertLeave * let g:Juliana#has_selection = 0
+ augroup END
+endfunction
+
+function! Juliana#CompleteTab(type)
+ if a:type == "START"
+ let g:Juliana#stop=0
+ return ""
+ endif
+
+ if !g:Juliana#stop
+ " Vanilla <Tab> if we are at the front of a line.
+ if a:type == "TAB" && col(".") >= col("$") && !pumvisible()
+ let g:Juliana#stop=1
+ return "\<Tab>"
+ elseif a:type == "ALIGN" && !pumvisible() " Align if !pumvisible().
+ let g:Juliana#stop=1
+ if g:Juliana#has_selection
+ return "\<ESC>gv=i"
+ else
+ return "\<ESC>\<C-v>=i"
+ endif
+ elseif a:type == "NEXT" " If pumvisible(), goto the next result.
+ let g:Juliana#stop=1
+ return "\<C-n>"
+ endif
+ endif
+
+ return ""
+endfunction
+
+function! Juliana#CompleteSTab(type)
+ if a:type == "PREV"
+ if pumvisible() " If pumvisible(), goto the previous result.
+ return "\<C-p>"
+ else
+ return "\<Tab>" " <S-Tab> = <Tab>
+ endif
+ endif
+endfunction
diff --git a/nix_archive/files/nvim/mini_completion_no_title.diff b/nix_archive/files/nvim/mini_completion_no_title.diff
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nix_archive/files/nvim/mini_completion_no_title.diff
diff --git a/nix_archive/files/nvim/mini_starter_picture.diff b/nix_archive/files/nvim/mini_starter_picture.diff
new file mode 100644
index 0000000..2efc2a1
--- /dev/null
+++ b/nix_archive/files/nvim/mini_starter_picture.diff
@@ -0,0 +1,288 @@
+diff --git a/lua/mini/starter.lua b/lua/mini/starter.lua
+index 66d46a52..9b7e4397 100644
+--- a/lua/mini/starter.lua
++++ b/lua/mini/starter.lua
+@@ -138,7 +138,7 @@
+ --- local timer = vim.loop.new_timer()
+ --- local n_seconds = 0
+ --- timer:start(0, 1000, vim.schedule_wrap(function()
+---- if vim.bo.filetype ~= 'ministarter' then
++--- if vim.bo.filetype ~= 'dashboard' then
+ --- timer:stop()
+ --- return
+ --- end
+@@ -239,6 +239,9 @@ MiniStarter.config = {
+ -- If `nil` (default), default items will be used (see |mini.starter|).
+ items = nil,
+
++ -- Empty lines at the top of the content.
++ top_padding = 0,
++
+ -- 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 = {
+ -- evaluated first. If `nil` (default), default usage help will be shown.
+ footer = nil,
+
++ -- Amount of empty lines between items and the footer.
++ footer_offset = 1,
++
++ -- Picture to show to the side of the content.
++ picture = nil,
++
+ -- 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)
+ data.footer = H.normalize_header_footer(config.footer or H.default_footer)
+
+ -- Evaluate content
+- local content = H.make_initial_content(data.header, items, data.footer)
++ local content = H.make_initial_content(data.header, items, data.footer, config)
+ local hooks = config.content_hooks or H.default_content_hooks
+ for _, f in ipairs(hooks) do
+ content = f(content, buf_id)
+@@ -400,6 +409,16 @@ MiniStarter.refresh = function(buf_id)
+
+ -- Apply current query (clear command line afterwards)
+ H.make_query(buf_id)
++
++ -- 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
+@@ -729,18 +748,45 @@ MiniStarter.gen_hook.aligning = function(horizontal, vertical)
+ local win_id = vim.fn.bufwinid(buf_id)
+ if win_id < 0 then return end
+
++ local config = H.get_config()
++
+ local line_strings = MiniStarter.content_to_lines(content)
+
++ H.win_width = vim.api.nvim_win_get_width(win_id)
++ H.win_height = vim.api.nvim_win_get_height(win_id)
++
+ -- Align horizontally
+ -- Don't use `string.len()` to account for multibyte characters
+ local lines_width = vim.tbl_map(function(l) return vim.fn.strdisplaywidth(l) end, line_strings)
+- local min_right_space = vim.api.nvim_win_get_width(win_id) - math.max(unpack(lines_width))
++ -- Ignore the max line width
++ local min_right_space = H.win_width -- - math.max(unpack(lines_width))
+ local left_pad = math.max(math.floor(horiz_coef * min_right_space), 0)
+
+ -- Align vertically
+- local bottom_space = vim.api.nvim_win_get_height(win_id) - #line_strings
++ local bottom_space = H.win_height - #line_strings
+ local top_pad = math.max(math.floor(vert_coef * bottom_space), 0)
+
++ -- Position picture
++ if config.picture ~= nil then
++ if config.picture.width == nil then config.picture.width = 25 end
++ if config.picture.position ~= 'right' then config.picture.position = 'left' end
++ if config.picture.padding == nil then config.picture.padding = {} end
++ if config.picture.padding.left == nil then config.picture.padding.left = 0 end
++ if config.picture.padding.top == nil then config.picture.padding.top = 0 end
++ if config.picture.padding.text == nil then config.picture.padding.text = 0 end
++
++ local picture_left_pad = (config.picture.width / 2.0) - config.picture.padding.left
++
++ left_pad = left_pad + config.picture.padding.text
++ if config.picture.position == 'left' then
++ H.picture_x = left_pad - picture_left_pad
++ else
++ H.picture_x = left_pad + picture_left_pad
++ end
++ if H.picture_x < 0.0 then H.picture_x = 0.0 end
++ H.picture_y = top_pad + config.picture.padding.top + config.top_padding
++ end
++
+ return MiniStarter.gen_hook.padding(left_pad, top_pad)(content)
+ end
+ end
+@@ -1003,7 +1049,7 @@ H.default_footer = [[
+ Type query to filter items
+ <BS> deletes latest character from query
+ <Esc> resets current query
+-<Down/Up>, <C-n/p>, <M-j/k> move current item
++<C-j/k> move current item
+ <CR> executes action of current item
+ <C-c> closes this buffer]]
+
+@@ -1044,8 +1090,54 @@ end
+
+ H.apply_config = function(config) MiniStarter.config = config end
+
++H.is_file_readable = function(path)
++ return vim.fn.filereadable(vim.fn.expand(path)) ~= 0
++end
++
++H.draw_picture = function(config, clear)
++ if config ~= nil then
++ if config.picture == nil or config.picture.path == nil or not H.is_file_readable(config.picture.path) then return end
++ else
++ -- No picture, so nothing to clear
++ if H.picture_x == nil or H.picture_y == nil then return end
++ end
++ local cmd = ''
++ if clear and not config.picture.kitty then
++ cmd = ('for i in $(seq %d %d); do tput cup $i 0 && tput el; done'):format(0, H.win_height - 1)
++ else
++ cmd = ('chafa %s --align left,top -s %dx%d 2>&1'):format(config.picture.path, config.picture.width, (H.win_height - 2) - H.picture_y)
++ end
++ -- Resizing will not clear on non-kitty mode
++ local output = ''
++ if config.picture.kitty then
++ output = output .. '\027_Ga=d\027\\'
++ end
++ if not clear or not config.picture.kitty then
++ local handle = io.popen(cmd)
++ output = output .. handle:read('*a')
++ -- `rc` doesn't work when run from inside vim (last tested in neovim-0.9)
++ local rc = {handle:close()}
++ end
++ local tty, err = io.open('/proc/self/fd/0', 'wb')
++ if tty then
++ tty:write('\x1b[s')
++ if not clear then
++ tty:write(('\x1b[%d;%dH'):format(H.picture_y, H.picture_x))
++ elseif not config.picture.kitty then
++ tty:write('\x1b[48;5;0m')
++ end
++ tty:write(output)
++ if not clear then
++ tty:write('\x1b[u')
++ end
++ tty:close()
++ else
++ H.echo('Error opening tty: ' .. err)
++ end
++end
++
+ H.create_autocommands = function(config)
+- local gr = vim.api.nvim_create_augroup('MiniStarter', {})
++ H.augroup = vim.api.nvim_create_augroup('MiniStarter', {})
+
+ if config.autoopen then
+ local on_vimenter = function()
+@@ -1057,7 +1149,7 @@ H.create_autocommands = function(config)
+ vim.cmd('noautocmd lua MiniStarter.open()')
+ end
+
+- local au_opts = { group = gr, nested = true, once = true, callback = on_vimenter, desc = 'Open on VimEnter' }
++ local au_opts = { group = H.augroup, nested = true, once = true, callback = on_vimenter, desc = 'Open on VimEnter' }
+ vim.api.nvim_create_autocmd('VimEnter', au_opts)
+ end
+
+@@ -1103,9 +1195,11 @@ H.normalize_header_footer = function(x)
+ end
+
+ -- Work with buffer content ---------------------------------------------------
+-H.make_initial_content = function(header, items, footer)
++H.make_initial_content = function(header, items, footer, config)
+ local content = {}
+
++ H.content_add_empty_lines(content, config.top_padding)
++
+ -- Add header lines
+ for _, l in ipairs(header) do
+ H.content_add_line(content, { H.content_unit(l, 'header', 'MiniStarterHeader') })
+@@ -1116,7 +1210,7 @@ H.make_initial_content = function(header, items, footer)
+ H.content_add_items(content, items)
+
+ -- Add footer lines
+- H.content_add_empty_lines(content, #footer > 0 and 1 or 0)
++ H.content_add_empty_lines(content, #footer > 0 and config.footer_offset or 0)
+ for _, l in ipairs(footer) do
+ H.content_add_line(content, { H.content_unit(l, 'footer', 'MiniStarterFooter') })
+ end
+@@ -1319,11 +1413,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')
+
++ local config = H.get_config()
++
+ local cache_showtabline = vim.o.showtabline
+ au('BufLeave', function()
+ if vim.o.cmdheight > 0 then vim.cmd("echo ''") end
+ if vim.o.showtabline == 1 then vim.o.showtabline = cache_showtabline end
++ H.draw_picture(config, true)
+ end, 'On BufLeave')
++
++ au('BufEnter', function()
++ 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)
+@@ -1336,7 +1442,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
+- vim.cmd('noautocmd silent! set filetype=ministarter')
++ vim.cmd('noautocmd silent! set filetype=dashboard')
+
+ local options = {
+ -- Taken from 'vim-startify'
+@@ -1383,12 +1489,8 @@ H.apply_buffer_mappings = function(buf_id)
+
+ buf_keymap('<CR>', 'MiniStarter.eval_current_item()')
+
+- buf_keymap('<Up>', [[MiniStarter.update_current_item('prev')]])
+- buf_keymap('<C-p>', [[MiniStarter.update_current_item('prev')]])
+- buf_keymap('<M-k>', [[MiniStarter.update_current_item('prev')]])
+- buf_keymap('<Down>', [[MiniStarter.update_current_item('next')]])
+- buf_keymap('<C-n>', [[MiniStarter.update_current_item('next')]])
+- buf_keymap('<M-j>', [[MiniStarter.update_current_item('next')]])
++ buf_keymap('<C-k>', [[MiniStarter.update_current_item('prev')]])
++ buf_keymap('<C-j>', [[MiniStarter.update_current_item('next')]])
+
+ -- Make all special symbols to update query
+ for _, key in ipairs(vim.split(H.get_config().query_updaters, '')) do
+@@ -1464,21 +1566,21 @@ H.is_something_shown = function()
+ end
+
+ -- Utilities ------------------------------------------------------------------
+-H.error = function(msg) error('(mini.starter) ' .. msg, 0) end
++H.error = function(msg) error('' .. msg, 0) end
+
+ H.check_type = function(name, val, ref, allow_nil)
+ if type(val) == ref or (ref == 'callable' and vim.is_callable(val)) or (allow_nil and val == nil) then return end
+ H.error(string.format('`%s` should be %s, not %s', name, ref, type(val)))
+ end
+
+-H.set_buf_name = function(buf_id, name) vim.api.nvim_buf_set_name(buf_id, 'ministarter://' .. buf_id .. '/' .. name) end
++H.set_buf_name = function(buf_id, name) vim.api.nvim_buf_set_name(buf_id, '*dashboard*') end
+
+ H.echo = function(msg, is_important)
+ if H.get_config().silent then return end
+
+ -- Construct message chunks
+ msg = type(msg) == 'string' and { { msg } } or msg
+- table.insert(msg, 1, { '(mini.starter) ', 'WarningMsg' })
++ table.insert(msg, 1, { '', 'Warning' })
+
+ -- Avoid hit-enter-prompt
+ local max_width = vim.o.columns * math.max(vim.o.cmdheight - 1, 0) + vim.v.echospace
+@@ -1527,7 +1629,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
+- vim.cmd(x)
++ pcall(function() vim.cmd(x) end)
+ else
+ return x
+ end
diff --git a/nix_archive/flake.lock b/nix_archive/flake.lock
new file mode 100644
index 0000000..4109bf8
--- /dev/null
+++ b/nix_archive/flake.lock
@@ -0,0 +1,277 @@
+{
+ "nodes": {
+ "camu": {
+ "inputs": {
+ "home-manager": [
+ "home-manager"
+ ],
+ "nixgl": "nixgl",
+ "nixos-hardware": [
+ "nixos-hardware"
+ ],
+ "nixos-wsl": "nixos-wsl",
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1757553294,
+ "narHash": "sha256-GOdswZ7kgdrXFF3qPlCBgPaPfYYGjsJ4sOt1SblHnUA=",
+ "ref": "refs/heads/master",
+ "rev": "77837d7b63240c069b3351a919a7d2af670f46cd",
+ "revCount": 149,
+ "type": "git",
+ "url": "https://git.akon.city/camu"
+ },
+ "original": {
+ "type": "git",
+ "url": "https://git.akon.city/camu"
+ }
+ },
+ "flake-compat": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1747046372,
+ "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-parts": {
+ "inputs": {
+ "nixpkgs-lib": [
+ "nur",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1733312601,
+ "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1731533236,
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "home-manager": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1760312644,
+ "narHash": "sha256-U9SkK45314urw9P7MmjhEgiQwwD/BTj+T3HTuz1JU1Q=",
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "rev": "e121f3773fa596ecaba5b22e518936a632d72a90",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "type": "github"
+ }
+ },
+ "mauri": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1755211482,
+ "narHash": "sha256-ifly37Yij9iKGHVo0m1OaY6gKNogn8tFMPZqopOhgoQ=",
+ "ref": "refs/heads/master",
+ "rev": "ca800f761080289735561154f02eddb21198a876",
+ "revCount": 72,
+ "type": "git",
+ "url": "https://git.akon.city/mauri"
+ },
+ "original": {
+ "type": "git",
+ "url": "https://git.akon.city/mauri"
+ }
+ },
+ "nixgl": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ },
+ "locked": {
+ "lastModified": 1752054764,
+ "narHash": "sha256-Ob/HuUhANoDs+nvYqyTKrkcPXf4ZgXoqMTQoCK0RFgQ=",
+ "owner": "nix-community",
+ "repo": "nixGL",
+ "rev": "a8e1ce7d49a149ed70df676785b07f63288f53c5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "nixGL",
+ "type": "github"
+ }
+ },
+ "nixos-hardware": {
+ "locked": {
+ "lastModified": 1760106635,
+ "narHash": "sha256-2GoxVaKWTHBxRoeUYSjv0AfSOx4qw5CWSFz2b+VolKU=",
+ "owner": "NixOS",
+ "repo": "nixos-hardware",
+ "rev": "9ed85f8afebf2b7478f25db0a98d0e782c0ed903",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "master",
+ "repo": "nixos-hardware",
+ "type": "github"
+ }
+ },
+ "nixos-wsl": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "nixpkgs": "nixpkgs_2"
+ },
+ "locked": {
+ "lastModified": 1757427959,
+ "narHash": "sha256-p0i07rLfAMzJWYfsjFOXEtIWeS1EGVxJaCi9gfyCwRE=",
+ "owner": "nix-community",
+ "repo": "NixOS-WSL",
+ "rev": "785f1b67b6c53de088f640f2a7da50ca4b2d7161",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "ref": "main",
+ "repo": "NixOS-WSL",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1746378225,
+ "narHash": "sha256-OeRSuL8PUjIfL3Q0fTbNJD/fmv1R+K2JAOqWJd3Oceg=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "93e8cdce7afc64297cfec447c311470788131cd9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1757068644,
+ "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
+ "locked": {
+ "lastModified": 1760284886,
+ "narHash": "sha256-TK9Kr0BYBQ/1P5kAsnNQhmWWKgmZXwUQr4ZMjCzWf2c=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "cf3f5c4def3c7b5f1fc012b3d839575dbe552d43",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nur": {
+ "inputs": {
+ "flake-parts": "flake-parts",
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1760455591,
+ "narHash": "sha256-QrVA0pTq+NDxjY4lJSp81XpKByguMKLD18Yy/y2Jwww=",
+ "owner": "nix-community",
+ "repo": "NUR",
+ "rev": "881b3f1edac47a9eb36e9cbeae13d5627ef1cad6",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "NUR",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "camu": "camu",
+ "home-manager": "home-manager",
+ "mauri": "mauri",
+ "nixos-hardware": "nixos-hardware",
+ "nixpkgs": "nixpkgs_3",
+ "nur": "nur"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/nix_archive/flake.nix b/nix_archive/flake.nix
new file mode 100644
index 0000000..ca1992f
--- /dev/null
+++ b/nix_archive/flake.nix
@@ -0,0 +1,335 @@
+{
+ inputs = {
+ nixpkgs = {
+ url = "github:NixOS/nixpkgs/nixos-unstable";
+ };
+ home-manager = {
+ url = "github:nix-community/home-manager";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ nixos-hardware = {
+ url = "github:NixOS/nixos-hardware/master";
+ };
+ nur = {
+ url = "github:nix-community/NUR";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ #chaotic = {
+ # url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
+ #};
+ camu = {
+ url = "git+https://git.akon.city/camu";
+ inputs.nixpkgs.follows = "nixpkgs";
+ inputs.home-manager.follows = "home-manager";
+ inputs.nixos-hardware.follows = "nixos-hardware";
+ };
+ mauri = {
+ url = "git+https://git.akon.city/mauri";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+ };
+
+ outputs = { self, nixpkgs, nixos-hardware, home-manager, nur, camu, mauri }: let
+ local-fonts = {
+ name = "Local Fonts";
+ src = ./../files/fonts;
+ installPhase = ''
+ mkdir -p $out/share/fonts/local
+ cp * $out/share/fonts/local
+ '';
+ };
+ optimizeWithFlags = (pkg: flags:
+ pkg.overrideAttrs (oldAttrs: {
+ env.NIX_CFLAGS_COMPILE = (oldAttrs.env.NIX_CFLAGS_COMPILE or "") + " ${flags}";
+ })
+ );
+ in {
+ settingsModule = { lib, ... }:
+ with lib;
+ let
+ fontSettings = types.submodule {
+ options = {
+ name = mkOption { type = types.str; };
+ size = mkOption { type = types.int; };
+ baseline = mkOption { type = types.int; };
+ cell-height-offset = mkOption { type = types.int; };
+ };
+ };
+ scriptSettings = types.submodule {
+ options = {
+ imports = mkOption { type = types.listOf types.str; };
+ };
+ };
+ themeSettings = types.submodule {
+ options = {
+ lightness = mkOption { type = types.str; }; # light/dark
+ background = mkOption { type = types.str; };
+ background-alt = mkOption { type = types.str; }; # solid color wallpaper
+ foreground = mkOption { type = types.str; };
+ # bright black and white should be different from black and white.
+ color0 = mkOption { type = types.str; }; # black
+ color1 = mkOption { type = types.str; }; # red
+ color2 = mkOption { type = types.str; }; # green
+ color3 = mkOption { type = types.str; }; # yellow
+ color4 = mkOption { type = types.str; }; # blue
+ color5 = mkOption { type = types.str; }; # magenta
+ color6 = mkOption { type = types.str; }; # cyan
+ color7 = mkOption { type = types.str; }; # white
+ color8 = mkOption { type = types.str; }; # bright black
+ color9 = mkOption { type = types.str; }; # bright red
+ color10 = mkOption { type = types.str; }; # bright green
+ color11 = mkOption { type = types.str; }; # bright yellow
+ color12 = mkOption { type = types.str; }; # bright blue
+ color13 = mkOption { type = types.str; }; # bright magenta
+ color14 = mkOption { type = types.str; }; # bright cyan
+ color15 = mkOption { type = types.str; }; # bright white
+ alpha = mkOption { type = types.float; };
+ };
+ };
+ starterPadSettings = types.submodule {
+ options = {
+ left = mkOption { type = types.int; };
+ top = mkOption { type = types.int; };
+ text = mkOption { type = types.int; };
+ };
+ };
+ starterSettings = types.submodule {
+ options = {
+ top_padding = mkOption { type = types.int; };
+ picture = mkOption { type = types.path; };
+ width = mkOption { type = types.int; };
+ padding = mkOption { type = starterPadSettings; };
+ position = mkOption { type = types.str; };
+ header = mkOption { type = types.str; };
+ footer = mkOption { type = types.str; };
+ footer-offset = mkOption { type = types.int; };
+ };
+ };
+ monitorSettings = types.submodule {
+ options = {
+ monitor1 = mkOption { type = types.str; };
+ monitor2 = mkOption { type = types.str; };
+ monitor3 = mkOption { type = types.str; };
+ };
+ };
+ in {
+ options.local = {
+ font = mkOption { type = fontSettings; };
+ ui-font = mkOption { type = fontSettings; };
+ emoji-font = mkOption { type = fontSettings; };
+ scripts = mkOption { type = scriptSettings; };
+ scheme = mkOption { type = themeSettings; };
+ starter = mkOption { type = starterSettings; };
+ monitors = mkOption { type = monitorSettings; };
+ };
+ };
+
+ nixosConfigurations.sofue = let
+ system = "x86_64-linux";
+ source-pkgs = nixpkgs.legacyPackages.${system};
+ nixpkgs-patched = source-pkgs.applyPatches {
+ name = "nixpkgs-patched";
+ src = nixpkgs;
+ patches = [];
+ };
+ nixosSystem = import (nixpkgs-patched + "/nixos/lib/eval-config.nix");
+ in nixosSystem {
+ system = system;
+ modules = [
+ self.settingsModule
+ ({ lib, ... }: { nixpkgs.overlays = [
+ nur.overlays.default
+ (self: super: {
+ asNeeded = (pkg: commands:
+ (lib.lists.forEach commands (command: super.writeShellScriptBin "${command}" ''
+ install-as-needed "${pkg}" ${command} "$@"
+ ''))
+ );
+ })
+ (self: super: { local-fonts = super.stdenv.mkDerivation local-fonts; })
+ (self: super: {
+ camu = camu.packages.${system}.default;
+ camu-devshell = camu.packages.${system}.shellWrapper;
+ })
+ (self: super: { mauri = mauri.packages.${system}.default; })
+ (self: super: {
+ mpv-unwrapped = super.mpv-unwrapped.override { cddaSupport = true; };
+ })
+ (self: super: {
+ mesa = (optimizeWithFlags super.mesa "-O3 -march=znver2 -mtune=znver2 -fno-semantic-interposition").overrideAttrs (oldAttrs: {
+ patches = oldAttrs.patches ++ [
+ ];
+ });
+ })
+ (self: super: {
+ mesa_git = (optimizeWithFlags super.mesa_git "-O3 -march=znver2 -mtune=znver2 -fno-semantic-interposition").overrideAttrs (oldAttrs: {
+ patches = oldAttrs.patches ++ [
+ ];
+ });
+ })
+ (self: super: {
+ kitty = (optimizeWithFlags super.kitty "-O3 -march=znver2 -mtune=znver2 -fno-semantic-interposition").overrideAttrs (oldAttrs: {
+ patches = oldAttrs.patches ++ [
+ ];
+ });
+ })
+ (self: super: {
+ adw-gtk3 = super.adw-gtk3.overrideAttrs (oldAttrs: {
+ patches = [
+ ../files/patches/adw-gtk3-non-blue-accent.diff
+ ];
+ });
+ })
+ (self: super: {
+ neovim-unwrapped = (optimizeWithFlags super.neovim-unwrapped "-O3 -march=znver2 -mtune=znver2 -fno-semantic-interposition -flto");
+ })
+ (self: super: {
+ gamescope = super.gamescope.overrideAttrs (oldAttrs: {
+ patches = oldAttrs.patches ++ [
+ ./files/gamescope_1826.diff
+ ];
+ });
+ })
+ #(self: super: {
+ # sway-unwrapped = super.sway-unwrapped.overrideAttrs (oldAttrs: {
+ # patches = oldAttrs.patches ++ [
+ # ./files/sway_background_covered.diff
+ # ];
+ # });
+ #})
+ (self: super: {
+ python = super.python.override ({
+ packageOverrides = (python-self: python-super: {
+ });
+ });
+ })
+ (self: super: {
+ vimPlugins = super.vimPlugins.extend (final: prev: {
+ mini-nvim = prev.mini-nvim.overrideAttrs (oldAttrs: {
+ patches = [
+ ./files/nvim/mini_starter_picture.diff
+ ./files/nvim/mini_completion_no_title.diff
+ ];
+ });
+ fzf-vim = prev.fzf-vim.overrideAttrs (oldAttrs: {
+ patches = [
+ ./files/nvim/fzf_no_linenum.diff
+ ];
+ });
+ });
+ })
+ (self: super: {
+ dia = super.dia.overrideAttrs (oldAttrs: {
+ nativeBuildInputs = with super; [
+ gobject-introspection
+ python3.pkgs.wrapPython
+ ] ++ old.nativeBuildInputs;
+ pythonPath = with super.python3.pkgs; [ pygobject3 ];
+ # https://github.com/NixOS/nixpkgs/pull/273060/files#diff-b78e5b1234a71c390023923ab5e62fc67b8e7d4371bc6687b7c7de4f392d1facR56
+ postFixup = ''
+ buildPythonPath "$pythonPath"
+ patchPythonScript $out/share/dia/python/scascale.py
+ '';
+ });
+ })
+ ];})
+ home-manager.nixosModules.home-manager {
+ home-manager.useGlobalPkgs = true;
+ home-manager.useUserPackages = true;
+ }
+ nur.modules.nixos.default
+ #chaotic.nixosModules.default
+ ./hosts/sofue/configuration.nix
+ ];
+ };
+
+ nixosConfigurations.palm = let
+ system = "x86_64-linux";
+ source-pkgs = nixpkgs.legacyPackages.${system};
+ nixpkgs-patched = source-pkgs.applyPatches {
+ name = "nixpkgs-patched";
+ src = nixpkgs;
+ patches = [];
+ };
+ nixosSystem = import (nixpkgs-patched + "/nixos/lib/eval-config.nix");
+ in nixosSystem {
+ system = system;
+ modules = [
+ self.settingsModule
+ ({ lib, ... }: { nixpkgs.overlays = [
+ nur.overlays.default
+ (self: super: {
+ asNeeded = (pkg: commands:
+ (lib.lists.forEach commands (command: super.writeShellScriptBin "${command}" ''
+ install-as-needed "${pkg}" ${command} ''$@
+ ''))
+ );
+ })
+ (self: super: { local-fonts = super.stdenv.mkDerivation local-fonts; })
+ (self: super: {
+ camu = camu.packages.${system}.default;
+ camu-devshell = camu.packages.${system}.shellWrapper;
+ })
+ (self: super: { mauri = mauri.packages.${system}.default; })
+ #(self: super: {
+ # sway-unwrapped = super.sway-unwrapped.overrideAttrs (oldAttrs: {
+ # patches = oldAttrs.patches ++ [];
+ # });
+ #})
+ (self: super: {
+ adw-gtk3 = super.adw-gtk3.overrideAttrs (oldAttrs: {
+ patches = [
+ ../files/patches/adw-gtk3-non-blue-accent.diff
+ ];
+ });
+ })
+ (self: super: {
+ vimPlugins = super.vimPlugins.extend (final: prev: {
+ mini-nvim = prev.mini-nvim.overrideAttrs (oldAttrs: {
+ patches = [
+ ./files/nvim/mini_starter_picture.diff
+ ./files/nvim/mini_completion_no_title.diff
+ ];
+ });
+ fzf-vim = prev.fzf-vim.overrideAttrs (oldAttrs: {
+ patches = [
+ ./files/nvim/fzf_no_linenum.diff
+ ];
+ });
+ });
+ })
+ ];})
+ home-manager.nixosModules.home-manager {
+ home-manager.useGlobalPkgs = true;
+ home-manager.useUserPackages = true;
+ }
+ nur.modules.nixos.default
+ nixos-hardware.nixosModules.common-pc-laptop
+ nixos-hardware.nixosModules.common-pc-laptop-ssd
+ nixos-hardware.nixosModules.common-cpu-intel
+ nixos-hardware.nixosModules.common-gpu-nvidia-disable
+ nixos-hardware.nixosModules.common-gpu-intel-kaby-lake
+ ./hosts/palm/configuration.nix
+ ];
+ };
+
+ nixosConfigurations.the-p = let
+ system = "x86_64-linux";
+ source-pkgs = nixpkgs.legacyPackages.${system};
+ nixpkgs-patched = source-pkgs.applyPatches {
+ name = "nixpkgs-patched";
+ src = nixpkgs;
+ patches = [ ];
+ };
+ nixosSystem = import (nixpkgs-patched + "/nixos/lib/eval-config.nix");
+ in nixosSystem {
+ system = system;
+ modules = [
+ ({ ... }: { nixpkgs.overlays = [
+ #(self: super: { jdk21 = (optimizeWithFlags super.jdk21 "-O2 -march=znver1 -mtune=znver1 -fno-semantic-interposition -flto"); })
+ ]; })
+ ./hosts/moyo/container.nix
+ ];
+ };
+ };
+}
diff --git a/nix_archive/hosts/moyo/container.nix b/nix_archive/hosts/moyo/container.nix
new file mode 100644
index 0000000..23e7b02
--- /dev/null
+++ b/nix_archive/hosts/moyo/container.nix
@@ -0,0 +1,97 @@
+{ config, lib, pkgs, modulesPath, ... }: {
+ imports = [
+ "${modulesPath}/virtualisation/lxc-container.nix"
+ ];
+
+ boot.isContainer = true;
+
+ nix = {
+ settings = {
+ experimental-features = [ "nix-command" "flakes" ];
+ auto-optimise-store = true;
+ download-buffer-size = 134217728;
+ };
+ gc.automatic = false;
+ optimise.automatic = true;
+ };
+
+ nixpkgs.config.allowUnfree = true;
+ hardware.enableRedistributableFirmware = true;
+
+ users.users.andrew = {
+ isNormalUser = true;
+ uid = 1000;
+ extraGroups = [ "wheel" ];
+ };
+ nix.settings.trusted-users = [ "andrew" ];
+
+ nix.settings.system-features = [ "gccarch-znver1" ];
+ nixpkgs.hostPlatform = {
+ #gcc.arch = "znver1";
+ #gcc.tune = "znver1";
+ system = "x86_64-linux";
+ };
+
+ time.timeZone = "America/New_York";
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ networking = {
+ hostName = "the-p";
+ useDHCP = false;
+ dhcpcd.enable = false;
+ useHostResolvConf = false;
+ wireless.enable = false;
+ firewall = {
+ enable = false;
+ allowedTCPPorts = [ 22 25565 ];
+ allowedUDPPorts = [ ];
+ };
+ };
+
+ systemd.network = {
+ enable = true;
+ networks."50-eth0" = {
+ matchConfig.Name = "eth0";
+ networkConfig = {
+ DHCP = "ipv4";
+ IPv6AcceptRA = true;
+ };
+ linkConfig.RequiredForOnline = "routable";
+ };
+ };
+
+ users.defaultUserShell = pkgs.bashInteractive;
+
+ programs.screen = {
+ enable = true;
+ screenrc = ''
+ termcapinfo xterm* ti@:te@
+ '';
+ };
+
+ environment.systemPackages = with pkgs; [
+ git # flakes
+ kitty.terminfo
+ htop
+ jq
+ ((vim-full.override {
+ features = "small";
+ guiSupport = "off";
+ luaSupport = false;
+ pythonSupport = false;
+ rubySupport = false;
+ cscopeSupport = false;
+ netbeansSupport = false;
+ ximSupport = false;
+ ftNixSupport = false;
+ sodiumSupport = false;
+ }).customize {
+ name = "vi";
+ vimrcConfig = { customRC = ""; };
+ })
+ #jdk23
+ graalvm-ce
+ ];
+
+ system.stateVersion = "25.05";
+}
diff --git a/nix_archive/hosts/palm/configuration.nix b/nix_archive/hosts/palm/configuration.nix
new file mode 100644
index 0000000..42cf14c
--- /dev/null
+++ b/nix_archive/hosts/palm/configuration.nix
@@ -0,0 +1,249 @@
+{ config, lib, pkgs, ... }:
+let
+ loc = config.local;
+ colo = loc.scheme;
+ inherit (import ../../nix/settings.nix) disks;
+in {
+ imports = [
+ ./hardware-configuration.nix
+ ../../nix/user.nix
+ ../../nix/system.nix
+ ../../nix/audio.nix
+ ../../nix/bluetooth.nix
+ ../../nix/email.nix
+ ../../nix/intel.nix
+ ../../nix/gaming.nix
+ ../../nix/virtualisation.nix
+ ../../nix/scripts.nix
+ ../../nix/programs/bash.nix
+ ../../nix/programs/nvim.nix
+ ../../nix/programs/sway.nix
+ ../../nix/programs/kitty.nix
+ ../../nix/programs/firefox.nix
+ ../../nix/programs/obs.nix
+ ../../nix/programs/waydroid.nix
+ ../../nix/programs/kdeconnect.nix
+ ./programs.nix
+ ];
+
+ local = rec {
+ font = {
+ name = "Lotion";
+ size = 15;
+ baseline = -2;
+ cell-height-offset = 0;
+ };
+ ui-font = {
+ name = "M+ 2p";
+ size = 11;
+ baseline = 0;
+ cell-height-offset = 0;
+ };
+ emoji-font = {
+ name = "Blobmoji";
+ size = ui-font.size;
+ baseline = 0;
+ cell-height-offset = 0;
+ };
+ scheme = import ../../themes/year_of_snake/snake.nix;
+ starter = {
+ top_padding = 0;
+ picture = ../../themes/year_of_snake/splash.png;
+ width = 64;
+ padding = { top = -3; left = -4; text = 5; };
+ position = "left";
+ header = "";
+ footer = "";
+ footer-offset = 0;
+ };
+ monitors = {
+ monitor1 = "eDP-1";
+ monitor2 = "DP-2";
+ };
+ };
+
+ nix.settings.system-features = [ "gccarch-skylake" ];
+ nixpkgs.hostPlatform = {
+ #gcc.arch = "skylake";
+ #gcc.tune = "skylake";
+ system = "x86_64-linux";
+ };
+ boot.binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
+
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+ boot.loader.systemd-boot.enable = true;
+ boot.kernelParams = [ "mitigations=off" "file_caps=1" ];
+ services.fwupd.enable = true;
+
+ virtualisation.kvmgt = {
+ enable = true;
+ vgpus = {
+ "i915-GVTg_V5_4" = {
+ uuid = [ "2efaf13a-e65a-11ef-84b4-235363f4a8d4" ];
+ };
+ };
+ };
+
+ security.wrappers = {
+ "mount.nfs" = {
+ owner = "root";
+ group = "root";
+ source = "${pkgs.nfs-utils.out}/bin/mount.nfs";
+ setuid = true;
+ };
+ };
+
+ services.thermald.enable = true;
+ services.tlp = {
+ enable = true;
+ settings = {
+ CPU_SCALING_GOVERNOR_ON_AC = "performance";
+ CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
+
+ CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
+ CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
+
+ CPU_MIN_PERF_ON_AC = 0;
+ CPU_MAX_PERF_ON_AC = 100;
+ CPU_MIN_PERF_ON_BAT = 0;
+ CPU_MAX_PERF_ON_BAT = 20;
+
+ START_CHARGE_THRESH_BAT0 = 40;
+ STOP_CHARGE_THRESH_BAT0 = 85;
+ };
+ };
+ programs.light.enable = true;
+
+ networking = {
+ hostName = "palm";
+ nameservers = [
+ "9.9.9.9"
+ "149.112.112.112"
+ "1.1.1.1"
+ "1.0.0.1"
+ ];
+ useDHCP = false;
+ dhcpcd.enable = false;
+ networkmanager = {
+ enable = true;
+ dns = "none";
+ wifi.powersave = true;
+ };
+ firewall = {
+ enable = true;
+ allowedTCPPorts = [];
+ };
+ extraHosts = ''
+ 192.168.1.192 iroha
+ 192.168.1.206 moyo
+ 192.168.1.207 denpa
+ 66.135.26.42 rod
+ 173.62.191.72 boomerang
+ '';
+ };
+ users.users.andrew.extraGroups = [ "networkmanager" ];
+
+ fileSystems."/mnt/nfs/c" = {
+ device = "moyo:/srv/nfs/c";
+ fsType = "nfs4";
+ options = disks.nfs_options;
+ };
+
+ fileSystems."/mnt/nfs/pics" = {
+ device = "moyo:/srv/nfs/pics";
+ fsType = "nfs4";
+ options = disks.nfs_options;
+ };
+
+ environment.systemPackages = with pkgs; [
+ linuxPackages_latest.perf
+ linuxPackages_latest.cpupower
+ (pkgs.writeShellScriptBin "run-sway" ''
+ export WLR_RENDERER=vulkan
+ export WLR_DRM_DEVICES=/dev/dri/card1
+ cd $HOME
+ exec ${pkgs.sway}/bin/sway
+ '')
+ ];
+
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ programs.kitty = {
+ extraConfig = ''
+ repaint_delay 9
+ input_delay 3
+ '';
+ };
+ wayland.windowManager.sway = let
+ monitor1 = loc.monitors.monitor1;
+ monitor2 = loc.monitors.monitor2;
+ in {
+ checkConfig = false;
+ config = {
+ output = {
+ "${monitor1}" = {
+ mode = "3000x2000@59.999Hz";
+ position = "1024 540";
+ render_bit_depth = "10";
+ allow_tearing = "no";
+ max_render_time = "10";
+ scale = "2";
+ bg = "${../../themes/year_of_snake/wallpaper.png} fit";
+ };
+ "${monitor2}" = {
+ mode = "1024x768@60.004Hz";
+ position = "0 0";
+ render_bit_depth = "10";
+ allow_tearing = "yes";
+ max_render_time = "10";
+ scale = "1";
+ bg = "#${colo.background-alt} solid_color";
+ };
+ };
+ workspaceOutputAssign = [
+ { workspace = "1"; output = "${monitor1}"; }
+ { workspace = "2"; output = "${monitor1}"; }
+ { workspace = "3"; output = "${monitor1}"; }
+ { workspace = "4"; output = "${monitor1}"; }
+ { workspace = "5"; output = "${monitor1}"; }
+ { workspace = "6"; output = "${monitor2}"; }
+ { workspace = "7"; output = "${monitor2}"; }
+ { workspace = "8"; output = "${monitor2}"; }
+ { workspace = "9"; output = "${monitor2}"; }
+ ];
+ keybindings = let
+ mod1 = "Mod1";
+ mod4 = "Mod4";
+ in {
+ "${mod1}+1" = "workspace 1";
+ "${mod1}+2" = "workspace 2";
+ "${mod1}+3" = "workspace 3";
+ "${mod1}+4" = "workspace 4";
+ "${mod1}+5" = "workspace 5";
+ "${mod4}+1" = "workspace 6";
+ "${mod4}+2" = "workspace 7";
+ "${mod4}+3" = "workspace 8";
+ "${mod4}+4" = "workspace 9";
+ "${mod1}+Shift+1" = "move container to workspace 1";
+ "${mod1}+Shift+2" = "move container to workspace 2";
+ "${mod1}+Shift+3" = "move container to workspace 3";
+ "${mod1}+Shift+4" = "move container to workspace 4";
+ "${mod1}+Shift+5" = "move container to workspace 5";
+ "${mod4}+Shift+1" = "move container to workspace 6";
+ "${mod4}+Shift+2" = "move container to workspace 7";
+ "${mod4}+Shift+3" = "move container to workspace 8";
+ "${mod4}+Shift+4" = "move container to workspace 9";
+ "${mod4}+r" = "exec swaymsg -- output ${monitor1} transform 270";
+ "${mod4}+Shift+r" = "exec swaymsg -- output ${monitor1} transform 0";
+ "${mod4}+F1" = "exec swaymsg -- output ${monitor1} bg \\#${colo.background-alt} solid_color";
+ "${mod4}+F2" = "exec swaymsg -- output ${monitor1} bg ${../../themes/year_of_snake/wallpaper.png} fill";
+ };
+ };
+ };
+
+ home.stateVersion = "${config.system.stateVersion}";
+ };
+
+ system.stateVersion = "24.11";
+}
diff --git a/nix_archive/hosts/palm/hardware-configuration.nix b/nix_archive/hosts/palm/hardware-configuration.nix
new file mode 100644
index 0000000..fe5e08d
--- /dev/null
+++ b/nix_archive/hosts/palm/hardware-configuration.nix
@@ -0,0 +1,37 @@
+{ config, lib, pkgs, modulesPath, ... }:
+{
+ imports =
+ [ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" ];
+ boot.initrd.kernelModules = [ "dm-snapshot" ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/yashinoki-vg0/root";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/05A6-59CE";
+ fsType = "vfat";
+ };
+
+ boot.initrd.luks.devices."home" =
+ { device = "/dev/yashinoki-vg0/home";
+ preLVM = false;
+ };
+
+ fileSystems."/home/andrew" =
+ { device = "/dev/mapper/home";
+ fsType = "ext4";
+ };
+
+ swapDevices =
+ [ { device = "/dev/yashinoki-vg0/swap"; }
+ ];
+
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/nix_archive/hosts/palm/programs.nix b/nix_archive/hosts/palm/programs.nix
new file mode 100644
index 0000000..d82e72a
--- /dev/null
+++ b/nix_archive/hosts/palm/programs.nix
@@ -0,0 +1,17 @@
+{ lib, pkgs, ... }: {
+ environment.systemPackages = with pkgs; lib.lists.flatten [
+ (asNeeded "krita" ["krita"])
+ yt-dlp
+ (asNeeded "[wineWowPackages.staging winetricks cabextract]" ["function_grep.pl" "msidb" "msiexec" "notepad" "regedit" "regsvr32" "widl" "wine" "wine-preloader" "wine64" "wine64-preloader" "wineboot" "winebuild" "winecfg" "wineconsole" "winecpp" "winedbg" "winedump" "winefile" "wineg++" "winegcc" "winemaker" "winemine" "winepath" "wineserver" "wmc" "wrc"])
+ (discord.override { withOpenASAR = true; })
+ (asNeeded "imv" ["imv"])
+ (asNeeded "mpv" ["mpv"])
+ #camu
+ #camu-devshell
+ #mauri
+ ];
+ local.scripts.imports = [
+ "battery"
+ "discord-wayland"
+ ];
+}
diff --git a/nix_archive/hosts/sofue/configuration.nix b/nix_archive/hosts/sofue/configuration.nix
new file mode 100644
index 0000000..f3f908e
--- /dev/null
+++ b/nix_archive/hosts/sofue/configuration.nix
@@ -0,0 +1,267 @@
+{ config, lib, pkgs, modulesPath, ... }:
+let
+ loc = config.local;
+ colo = loc.scheme;
+ inherit (import ../../nix/settings.nix) disks;
+in rec {
+ imports = [
+ "${modulesPath}/virtualisation/lxc-container.nix"
+ ../../nix/system.nix
+ ../../nix/x86.nix
+ ../../nix/user.nix
+ ../../nix/bluetooth.nix
+ ../../nix/email.nix
+ ../../nix/amdgpu.nix
+ #../../nix/intel.nix
+ ../../nix/gaming.nix
+ ../../nix/steam.nix
+ ../../nix/virtualisation.nix
+ ../../nix/scripts.nix
+ ../../nix/programs/bash.nix
+ ../../nix/programs/nvim.nix
+ ../../nix/programs/sway.nix
+ ../../nix/programs/kitty.nix
+ ../../nix/programs/firefox.nix
+ ../../nix/programs/obs.nix
+ ../../nix/programs/kdeconnect.nix
+ #../../nix/programs/docker.nix
+ ./programs.nix
+ ];
+
+ local = rec {
+ font = {
+ name = "Comic Code";
+ size = 13;
+ baseline = -2;
+ cell-height-offset = 1;
+ };
+ ui-font = {
+ name = "Livvic";
+ size = 11;
+ baseline = 0;
+ cell-height-offset = 0;
+ };
+ emoji-font = {
+ name = "Blobmoji";
+ size = ui-font.size;
+ baseline = 0;
+ cell-height-offset = 0;
+ };
+ scheme = import ../../themes/street_fighter_summer/street_fighter_summer.nix;
+ starter = {
+ top_padding = 2;
+ picture = ../../themes/street_fighter_summer/cammy_splash.png;
+ width = 60;
+ padding = {
+ top = -9;
+ left = -9;
+ text = 5;
+ };
+ position = "left";
+ header = "";
+ footer = "";
+ footer-offset = 0;
+ };
+ monitors = {
+ #monitor1 = "DP-2";
+ #monitor2 = "HDMI-A-3";
+ #monitor3 = "DP-1";
+ monitor1 = "DP-1";
+ monitor2 = "DP-2";
+ monitor3 = "HDMI-A-1";
+ };
+ };
+
+ boot.isContainer = true;
+
+ users.groups.audio.gid = lib.mkForce 18;
+ users.groups.cdrom.gid = lib.mkForce 19;
+ users.groups.dialout.gid = lib.mkForce 20;
+ users.groups.floppy.gid = lib.mkForce 11;
+ users.groups.input.gid = lib.mkForce 97;
+ users.groups.lp.gid = lib.mkForce 7;
+ users.groups.render.gid = lib.mkForce 28;
+ users.groups.uucp.gid = lib.mkForce 14;
+ users.groups.video.gid = lib.mkForce 27;
+
+ nix.settings.system-features = [ "gccarch-znver2" ];
+ nixpkgs.hostPlatform = {
+ #gcc.arch = "znver2";
+ #gcc.tune = "znver2";
+ system = "x86_64-linux";
+ };
+
+ boot.binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
+ # Only needed in containers.
+ fileSystems."/proc/sys/fs/binfmt_misc" = {
+ device = "binfmt_misc";
+ fsType = "binfmt_misc";
+ };
+
+ networking = {
+ hostName = "sofue";
+ wireless.enable = false;
+ dhcpcd.enable = false;
+ useDHCP = false;
+ useHostResolvConf = false;
+ firewall.enable = false;
+ extraHosts = ''
+ 192.168.1.192 iroha
+ 192.168.1.206 moyo
+ 192.168.1.207 denpa
+ 192.168.1.234 zasshi
+ 66.135.26.42 rod
+ 108.52.160.112 boomerang
+ '';
+ };
+ systemd.network = {
+ enable = true;
+ networks."50-eth0" = {
+ matchConfig.Name = "eth0";
+ networkConfig = {
+ DHCP = "ipv4";
+ IPv6AcceptRA = true;
+ };
+ linkConfig.RequiredForOnline = "routable";
+ };
+ };
+
+ fileSystems."/media/cdrom" = {
+ device = "/dev/sr0";
+ fsType = "udf,iso9660";
+ options = disks.cdrom_options;
+ };
+
+ services.flatpak.enable = true;
+
+ environment.systemPackages = with pkgs; [
+ linuxPackages_latest.perf
+ linuxPackages_latest.cpupower
+ (writeShellScriptBin "run-sway" ''
+ export TTY=/dev/tty3
+ export XDG_VTNR=3
+ export WLR_RENDERER=vulkan
+ export PULSE_SERVER=unix:/home/andrew/.pulsewire-native-socket
+ export PIPEWIRE_REMOTE=/tmp/pipewire-0-manager
+ cd $HOME
+ exec ${kbd}/bin/openvt --switch --login --console 3 -f -- ${swayfx}/bin/sway
+ '')
+ pipewire # Using server from host.
+ pavucontrol
+ ];
+
+ systemd.services.copy-udev = {
+ description = "Copy host udev data to container";
+ after = [ "multi-user.target" "rc-local.service" "systemd-user-sessions.service" ];
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "/bin/sh -c '${pkgs.coreutils}/bin/cp /tmp/udev/data/* /run/udev/data/'";
+ RemainAfterExit = true;
+ };
+ };
+
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ programs.kitty = {
+ # My understanding is that if repaint_delay equates to a refresh rate
+ # of just under my monitor's that VRR can avoid all tearing.
+ extraConfig = ''
+ repaint_delay 7
+ input_delay 1
+ '';
+ };
+ wayland.windowManager.sway = let
+ monitor1 = loc.monitors.monitor1;
+ monitor2 = loc.monitors.monitor2;
+ monitor3 = loc.monitors.monitor3;
+ in {
+ checkConfig = false;
+ config = {
+ output = {
+ "${monitor1}" = {
+ mode = "2560x1440@144.000Hz";
+ position = "3000 200";
+ #position = "1080 200";
+ allow_tearing = "yes";
+ max_render_time = "off";
+ adaptive_sync = "on";
+ render_bit_depth = "10";
+ bg = "${../../themes/street_fighter_summer/wallpaper1.png} fit";
+ };
+ "${monitor2}" = {
+ mode = "1920x1080@60.000Hz";
+ transform = "270";
+ position = "1920 0";
+ #position = "0 0";
+ allow_tearing = "no";
+ max_render_time = "7";
+ render_bit_depth = "10";
+ bg = "${../../themes/street_fighter_summer/wallpaper_vert2.png} fit";
+ };
+ "${monitor3}" = {
+ mode = "1920x1080@60.000Hz";
+ position = "0 1000";
+ max_render_time = "7";
+ render_bit_depth = "10";
+ allow_tearing = "no";
+ bg = "#${colo.background-alt} solid_color";
+ };
+ };
+ workspaceOutputAssign = [
+ { workspace = "1"; output = "${monitor1}"; }
+ { workspace = "2"; output = "${monitor1}"; }
+ { workspace = "3"; output = "${monitor1}"; }
+ { workspace = "4"; output = "${monitor1}"; }
+ { workspace = "5"; output = "${monitor2}"; }
+ { workspace = "6"; output = "${monitor2}"; }
+ { workspace = "7"; output = "${monitor2}"; }
+ { workspace = "8"; output = "${monitor2}"; }
+ { workspace = "9"; output = "${monitor3}"; }
+ ];
+ keybindings = let
+ mod1 = "Mod1";
+ mod4 = "Mod4";
+ in {
+ "${mod1}+1" = "workspace 1";
+ "${mod1}+2" = "workspace 2";
+ "${mod1}+3" = "workspace 3";
+ "${mod1}+4" = "workspace 4";
+ "${mod4}+1" = "workspace 5";
+ "${mod4}+2" = "workspace 6";
+ "${mod4}+3" = "workspace 7";
+ "${mod4}+4" = "workspace 8";
+ "${mod4}+5" = "workspace 9";
+ "${mod4}+z" = "fullscreen toggle";
+ "${mod1}+Shift+1" = "move container to workspace 1";
+ "${mod1}+Shift+2" = "move container to workspace 2";
+ "${mod1}+Shift+3" = "move container to workspace 3";
+ "${mod1}+Shift+4" = "move container to workspace 4";
+ "${mod4}+Shift+1" = "move container to workspace 5";
+ "${mod4}+Shift+2" = "move container to workspace 6";
+ "${mod4}+Shift+3" = "move container to workspace 7";
+ "${mod4}+Shift+4" = "move container to workspace 8";
+ "${mod4}+Shift+5" = "move container to workspace 9";
+ "${mod4}+r" = "exec swaymsg -- output ${monitor1} transform 90";
+ "${mod4}+Shift+r" = "exec swaymsg -- output ${monitor1} transform 0";
+ "${mod4}+F1" = "exec swaymsg -- output ${monitor1} bg \\#${colo.background-alt} solid_color";
+ "${mod4}+F2" = "exec swaymsg -- output ${monitor1} bg ${../../themes/street_fighter_summer/wallpaper1.png} fit";
+ "${mod4}+F3" = "exec swaymsg -- output ${monitor2} bg \\#${colo.background-alt} solid_color";
+ "${mod4}+F4" = "exec swaymsg -- output ${monitor2} bg ${../../themes/street_fighter_summer/wallpaper_vert1.png} fit";
+ "${mod4}+F5" = "exec swaymsg -- output ${monitor2} bg ${../../themes/street_fighter_summer/wallpaper_vert2.png} fit";
+ #"${mod4}+F1" = "exec printf '||' > $HOME/.config/taro/${monitor1}/selection";
+ #"${mod4}+F2" = "exec printf '||' > $HOME/.config/taro/${monitor1}/selection";
+ "Pause" = "exec $HOME/c/camu/scripts/cmv_add.sh PAUSE";
+ };
+ startup = [
+ #{ command = "${pkgs.mauri}/bin/tarod"; }
+ ];
+ };
+ };
+
+ home.stateVersion = "${config.system.stateVersion}";
+ };
+
+ system.stateVersion = "25.05";
+}
diff --git a/nix_archive/hosts/sofue/gccarch_mesa.nix b/nix_archive/hosts/sofue/gccarch_mesa.nix
new file mode 100644
index 0000000..e06bdd5
--- /dev/null
+++ b/nix_archive/hosts/sofue/gccarch_mesa.nix
@@ -0,0 +1,10 @@
+let
+ pkgs = import <nixpkgs> {
+ localSystem = {
+ gcc.arch = "znver2";
+ gcc.tune = "znver2";
+ system = "x86_64-linux";
+ };
+ };
+in
+ pkgs.mesa
diff --git a/nix_archive/hosts/sofue/incus.yaml b/nix_archive/hosts/sofue/incus.yaml
new file mode 100644
index 0000000..407e604
--- /dev/null
+++ b/nix_archive/hosts/sofue/incus.yaml
@@ -0,0 +1,694 @@
+container:
+ architecture: x86_64
+ config:
+ image.architecture: amd64
+ image.description: Nixos unstable amd64 (20240402_02:18)
+ image.os: Nixos
+ image.release: unstable
+ image.requirements.secureboot: "false"
+ image.serial: "20240402_02:18"
+ image.type: squashfs
+ image.variant: default
+ limits.kernel.memlock: unlimited
+ limits.kernel.nice: "-11"
+ limits.kernel.nofile: "1048576"
+ limits.kernel.rtprio: "99"
+ raw.lxc: |-
+ lxc.mount.auto = proc:rw sys:rw cgroup:rw:force
+ lxc.cgroup2.devices.allow = c 7:* rwm
+ lxc.cgroup2.devices.allow = c 10:* rwm
+ lxc.cgroup2.devices.allow = c 13:* rwm
+ lxc.cgroup2.devices.allow = c 116:* rwm
+ lxc.cgroup2.devices.allow = c 189:* rwm
+ lxc.cgroup2.devices.allow = c 226:0 rwm
+ lxc.cgroup2.devices.allow = c 226:128 rwm
+ lxc.cgroup2.devices.allow = c 247:* rwm
+ security.nesting: "true"
+ security.privileged: "false"
+ security.syscalls.intercept.bpf: "true"
+ security.syscalls.intercept.bpf.devices: "true"
+ security.syscalls.intercept.mknod: "true"
+ security.syscalls.intercept.mount: "true"
+ 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: 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}]'
+ volatile.idmap.next: '[{"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}]'
+ volatile.last_state.idmap: '[]'
+ volatile.last_state.power: RUNNING
+ volatile.last_state.ready: "false"
+ 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
+ gid: "100"
+ listen: unix:/tmp/pipewire-0
+ mode: "0666"
+ security.gid: "100"
+ security.uid: "1000"
+ type: proxy
+ uid: "1000"
+ PipewireSocket2:
+ bind: container
+ connect: unix:/run/user/1000/pipewire-0-manager
+ gid: "100"
+ listen: unix:/tmp/pipewire-0-manager
+ mode: "0666"
+ security.gid: "100"
+ security.uid: "1000"
+ type: proxy
+ uid: "1000"
+ PulseSocket1:
+ bind: container
+ connect: unix:/run/user/1000/pulse/native
+ gid: "100"
+ listen: unix:/home/andrew/.pulsewire-native-socket
+ mode: "0666"
+ security.gid: "100"
+ security.uid: "1000"
+ type: proxy
+ uid: "1000"
+ binder:
+ gid: "100"
+ mode: "0666"
+ path: /dev/binder
+ source: /dev/binder
+ type: unix-char
+ bluraydrive:
+ mode: "0666"
+ path: /dev/sr0
+ source: /dev/sr0
+ type: unix-block
+ code:
+ path: /mnt/nfs/c
+ source: /mnt/nfs/c
+ type: disk
+ data:
+ path: /mnt/data
+ source: /mnt/data
+ type: disk
+ devshm:
+ path: /dev/shm2
+ source: /dev/shm
+ type: disk
+ duckyone:
+ gid: "97"
+ mode: "0666"
+ productid: "0201"
+ type: unix-hotplug
+ vendorid: 04d9
+ ext_ssd:
+ path: /mnt/ext_ssd
+ source: /mnt/ext_ssd
+ type: disk
+ googlepixel:
+ mode: "0666"
+ productid: 4ee7
+ type: unix-hotplug
+ vendorid: 18d1
+ hdd:
+ path: /mnt/hdd
+ source: /mnt/hdd
+ type: disk
+ hhkb:
+ gid: "97"
+ mode: "0666"
+ productid: "0021"
+ type: unix-hotplug
+ vendorid: 04fe
+ hidraw0:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw0
+ required: "false"
+ source: /dev/hidraw0
+ type: unix-char
+ hidraw1:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw1
+ required: "false"
+ source: /dev/hidraw1
+ type: unix-char
+ hidraw2:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw2
+ required: "false"
+ source: /dev/hidraw2
+ type: unix-char
+ hidraw3:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw3
+ required: "false"
+ source: /dev/hidraw3
+ type: unix-char
+ hidraw4:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw4
+ required: "false"
+ source: /dev/hidraw4
+ type: unix-char
+ hostportcamu:
+ connect: tcp:127.0.0.1:14356
+ listen: tcp:0.0.0.0:14356
+ type: proxy
+ hwbinder:
+ gid: "100"
+ mode: "0666"
+ path: /dev/hwbinder
+ source: /dev/hwbinder
+ type: unix-char
+ lazermouse:
+ gid: "97"
+ mode: "0666"
+ productid: "2510"
+ type: unix-hotplug
+ vendorid: 093a
+ logibolt:
+ gid: "97"
+ mode: "0666"
+ productid: c548
+ type: unix-hotplug
+ vendorid: 046d
+ loop0:
+ mode: "0666"
+ path: /dev/loop0
+ source: /dev/loop0
+ type: unix-block
+ loop1:
+ mode: "0666"
+ path: /dev/loop1
+ source: /dev/loop1
+ type: unix-block
+ loopcontrol:
+ mode: "0666"
+ path: /dev/loop-control
+ source: /dev/loop-control
+ type: unix-char
+ mayflashgc:
+ gid: "97"
+ mode: "0666"
+ productid: "0337"
+ type: unix-hotplug
+ vendorid: 057e
+ ntsync:
+ mode: "0666"
+ path: /dev/ntsync
+ source: /dev/ntsync
+ type: unix-char
+ pcie4slotgpu:
+ mode: "0666"
+ pci: 0000:0f:00.0
+ type: gpu
+ 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
+ source: /mnt/ssd
+ type: disk
+ store:
+ path: /mnt/store
+ source: /mnt/store
+ type: disk
+ switchpro:
+ gid: "97"
+ mode: "0666"
+ productid: "2009"
+ type: unix-hotplug
+ vendorid: 057e
+ tty:
+ mode: "0666"
+ path: /dev/tty
+ source: /dev/tty
+ type: unix-char
+ tty0:
+ mode: "0666"
+ path: /dev/tty0
+ source: /dev/tty0
+ type: unix-char
+ tty3:
+ mode: "0666"
+ path: /dev/tty3
+ source: /dev/tty3
+ type: unix-char
+ tty4:
+ mode: "0666"
+ path: /dev/tty4
+ source: /dev/tty4
+ type: unix-char
+ udevdata:
+ path: /tmp/udev/data
+ readonly: "true"
+ source: /run/udev/data
+ type: disk
+ uinput:
+ gid: "97"
+ mode: "0666"
+ path: /dev/uinput
+ source: /dev/uinput
+ type: unix-char
+ video0:
+ mode: "0666"
+ path: /dev/video0
+ source: /dev/video0
+ type: unix-char
+ video1:
+ mode: "0666"
+ path: /dev/video1
+ required: "false"
+ source: /dev/video1
+ type: unix-char
+ vndbinder:
+ gid: "100"
+ mode: "0666"
+ path: /dev/vndbinder
+ source: /dev/vndbinder
+ type: unix-char
+ wacom:
+ gid: "97"
+ mode: "0666"
+ productid: 037a
+ type: unix-hotplug
+ vendorid: 056a
+ xbox360controller:
+ gid: "97"
+ mode: "0666"
+ productid: 028e
+ type: unix-hotplug
+ vendorid: 045e
+ xboxonecontroller:
+ gid: "97"
+ mode: "0666"
+ productid: "02e6"
+ type: unix-hotplug
+ vendorid: 045e
+ zowiemouse:
+ gid: "97"
+ mode: "0666"
+ productid: "8001"
+ type: unix-hotplug
+ vendorid: 04a5
+ ephemeral: false
+ profiles:
+ - default
+ stateful: false
+ description: ""
+ created_at: 2024-04-03T13:10:43.339168029Z
+ expanded_config:
+ boot.autostart: "false"
+ image.architecture: amd64
+ image.description: Nixos unstable amd64 (20240402_02:18)
+ image.os: Nixos
+ image.release: unstable
+ image.requirements.secureboot: "false"
+ image.serial: "20240402_02:18"
+ image.type: squashfs
+ image.variant: default
+ limits.kernel.memlock: unlimited
+ limits.kernel.nice: "-11"
+ limits.kernel.nofile: "1048576"
+ limits.kernel.rtprio: "99"
+ raw.idmap: |-
+ uid 1000 1000
+ gid 100 100
+ gid 18 17
+ gid 97 174
+ raw.lxc: |-
+ lxc.mount.auto = proc:rw sys:rw cgroup:rw:force
+ lxc.cgroup2.devices.allow = c 7:* rwm
+ lxc.cgroup2.devices.allow = c 10:* rwm
+ lxc.cgroup2.devices.allow = c 13:* rwm
+ lxc.cgroup2.devices.allow = c 116:* rwm
+ lxc.cgroup2.devices.allow = c 189:* rwm
+ lxc.cgroup2.devices.allow = c 226:0 rwm
+ lxc.cgroup2.devices.allow = c 226:128 rwm
+ lxc.cgroup2.devices.allow = c 247:* rwm
+ security.nesting: "true"
+ security.privileged: "false"
+ security.syscalls.intercept.bpf: "true"
+ security.syscalls.intercept.bpf.devices: "true"
+ security.syscalls.intercept.mknod: "true"
+ security.syscalls.intercept.mount: "true"
+ 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: 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}]'
+ volatile.idmap.next: '[{"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}]'
+ volatile.last_state.idmap: '[]'
+ volatile.last_state.power: RUNNING
+ volatile.last_state.ready: "false"
+ 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
+ gid: "100"
+ listen: unix:/tmp/pipewire-0
+ mode: "0666"
+ security.gid: "100"
+ security.uid: "1000"
+ type: proxy
+ uid: "1000"
+ PipewireSocket2:
+ bind: container
+ connect: unix:/run/user/1000/pipewire-0-manager
+ gid: "100"
+ listen: unix:/tmp/pipewire-0-manager
+ mode: "0666"
+ security.gid: "100"
+ security.uid: "1000"
+ type: proxy
+ uid: "1000"
+ PulseSocket1:
+ bind: container
+ connect: unix:/run/user/1000/pulse/native
+ gid: "100"
+ listen: unix:/home/andrew/.pulsewire-native-socket
+ mode: "0666"
+ security.gid: "100"
+ security.uid: "1000"
+ type: proxy
+ uid: "1000"
+ binder:
+ gid: "100"
+ mode: "0666"
+ path: /dev/binder
+ source: /dev/binder
+ type: unix-char
+ bluraydrive:
+ mode: "0666"
+ path: /dev/sr0
+ source: /dev/sr0
+ type: unix-block
+ code:
+ path: /mnt/nfs/c
+ source: /mnt/nfs/c
+ type: disk
+ data:
+ path: /mnt/data
+ source: /mnt/data
+ type: disk
+ devshm:
+ path: /dev/shm2
+ source: /dev/shm
+ type: disk
+ duckyone:
+ gid: "97"
+ mode: "0666"
+ productid: "0201"
+ type: unix-hotplug
+ vendorid: 04d9
+ eth0:
+ name: eth0
+ network: incusbr0
+ type: nic
+ ext_ssd:
+ path: /mnt/ext_ssd
+ source: /mnt/ext_ssd
+ type: disk
+ googlepixel:
+ mode: "0666"
+ productid: 4ee7
+ type: unix-hotplug
+ vendorid: 18d1
+ hdd:
+ path: /mnt/hdd
+ source: /mnt/hdd
+ type: disk
+ hhkb:
+ gid: "97"
+ mode: "0666"
+ productid: "0021"
+ type: unix-hotplug
+ vendorid: 04fe
+ hidraw0:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw0
+ required: "false"
+ source: /dev/hidraw0
+ type: unix-char
+ hidraw1:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw1
+ required: "false"
+ source: /dev/hidraw1
+ type: unix-char
+ hidraw2:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw2
+ required: "false"
+ source: /dev/hidraw2
+ type: unix-char
+ hidraw3:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw3
+ required: "false"
+ source: /dev/hidraw3
+ type: unix-char
+ hidraw4:
+ gid: "97"
+ mode: "0666"
+ path: /dev/hidraw4
+ required: "false"
+ source: /dev/hidraw4
+ type: unix-char
+ hostportcamu:
+ connect: tcp:127.0.0.1:14356
+ listen: tcp:0.0.0.0:14356
+ type: proxy
+ hwbinder:
+ gid: "100"
+ mode: "0666"
+ path: /dev/hwbinder
+ source: /dev/hwbinder
+ type: unix-char
+ lazermouse:
+ gid: "97"
+ mode: "0666"
+ productid: "2510"
+ type: unix-hotplug
+ vendorid: 093a
+ logibolt:
+ gid: "97"
+ mode: "0666"
+ productid: c548
+ type: unix-hotplug
+ vendorid: 046d
+ loop0:
+ mode: "0666"
+ path: /dev/loop0
+ source: /dev/loop0
+ type: unix-block
+ loop1:
+ mode: "0666"
+ path: /dev/loop1
+ source: /dev/loop1
+ type: unix-block
+ loopcontrol:
+ mode: "0666"
+ path: /dev/loop-control
+ source: /dev/loop-control
+ type: unix-char
+ mayflashgc:
+ gid: "97"
+ mode: "0666"
+ productid: "0337"
+ type: unix-hotplug
+ vendorid: 057e
+ ntsync:
+ mode: "0666"
+ path: /dev/ntsync
+ source: /dev/ntsync
+ type: unix-char
+ pcie4slotgpu:
+ mode: "0666"
+ pci: 0000:0f:00.0
+ type: gpu
+ 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
+ type: disk
+ store:
+ path: /mnt/store
+ source: /mnt/store
+ type: disk
+ switchpro:
+ gid: "97"
+ mode: "0666"
+ productid: "2009"
+ type: unix-hotplug
+ vendorid: 057e
+ tty:
+ mode: "0666"
+ path: /dev/tty
+ source: /dev/tty
+ type: unix-char
+ tty0:
+ mode: "0666"
+ path: /dev/tty0
+ source: /dev/tty0
+ type: unix-char
+ tty3:
+ mode: "0666"
+ path: /dev/tty3
+ source: /dev/tty3
+ type: unix-char
+ tty4:
+ mode: "0666"
+ path: /dev/tty4
+ source: /dev/tty4
+ type: unix-char
+ udevdata:
+ path: /tmp/udev/data
+ readonly: "true"
+ source: /run/udev/data
+ type: disk
+ uinput:
+ gid: "97"
+ mode: "0666"
+ path: /dev/uinput
+ source: /dev/uinput
+ type: unix-char
+ video0:
+ mode: "0666"
+ path: /dev/video0
+ source: /dev/video0
+ type: unix-char
+ video1:
+ mode: "0666"
+ path: /dev/video1
+ required: "false"
+ source: /dev/video1
+ type: unix-char
+ vndbinder:
+ gid: "100"
+ mode: "0666"
+ path: /dev/vndbinder
+ source: /dev/vndbinder
+ type: unix-char
+ wacom:
+ gid: "97"
+ mode: "0666"
+ productid: 037a
+ type: unix-hotplug
+ vendorid: 056a
+ xbox360controller:
+ gid: "97"
+ mode: "0666"
+ productid: 028e
+ type: unix-hotplug
+ vendorid: 045e
+ xboxonecontroller:
+ gid: "97"
+ mode: "0666"
+ productid: "02e6"
+ type: unix-hotplug
+ vendorid: 045e
+ zowiemouse:
+ gid: "97"
+ mode: "0666"
+ productid: "8001"
+ type: unix-hotplug
+ vendorid: 04a5
+ name: sofue
+ status: Running
+ status_code: 103
+ last_used_at: 2025-05-27T23:32:26.92570937Z
+ location: none
+ type: container
+ project: iroha
+pool:
+ config:
+ source: /var/lib/incus/storage-pools/default
+ description: ""
+ name: default
+ driver: dir
+ used_by: []
+ status: Created
+ locations:
+ - none
+profiles:
+- config:
+ boot.autostart: "false"
+ raw.idmap: |-
+ uid 1000 1000
+ gid 100 100
+ gid 18 17
+ gid 97 174
+ description: Incus profile for iroha
+ devices:
+ eth0:
+ name: eth0
+ network: incusbr0
+ type: nic
+ root:
+ path: /
+ pool: default
+ type: disk
+ name: default
+ used_by: []
+ project: iroha
+volume:
+ config: {}
+ description: ""
+ name: sofue
+ type: container
+ used_by: []
+ location: none
+ content_type: filesystem
+ project: iroha
+ created_at: 2024-04-03T13:10:43.339168029Z
diff --git a/nix_archive/hosts/sofue/programs.nix b/nix_archive/hosts/sofue/programs.nix
new file mode 100644
index 0000000..d964fbf
--- /dev/null
+++ b/nix_archive/hosts/sofue/programs.nix
@@ -0,0 +1,29 @@
+{ lib, pkgs, ... }: {
+ environment.systemPackages = with pkgs; lib.lists.flatten [
+ (asNeeded "dia" ["dia"])
+ (asNeeded "gftp" ["gftp"])
+ (asNeeded "audacity" ["audacity"])
+ (asNeeded "krita" ["krita"])
+ (asNeeded "olive-editor" ["olive-editor"])
+ yt-dlp
+ (asNeeded "[chatterino2 streamlink]" ["chatterino2"])
+ (asNeeded "megatools" ["megacopy" "megadf" "megadl" "megaexport" "megaget" "megals" "megamkdir" "megaput" "megareg" "megarm" "megatest" "megatools"])
+ (asNeeded "gdown" ["gdown"])
+ wineWowPackages.staging
+ winetricks
+ cabextract
+ (asNeeded "qbittorrent" ["qbittorrent"])
+ (asNeeded "ungoogled-chromium" ["chromium"])
+ (asNeeded "brave" ["brave"])
+ (discord.override { withOpenASAR = true; })
+ (asNeeded "imv" ["imv"])
+ (asNeeded "mpv" ["mpv"])
+ (asNeeded "vlc" ["vlc"])
+ #camu
+ #camu-devshell
+ #mauri
+ ];
+ local.scripts.imports = [
+ "discord-wayland"
+ ];
+}
diff --git a/nix_archive/nix/amdgpu.nix b/nix_archive/nix/amdgpu.nix
new file mode 100644
index 0000000..3d28b1d
--- /dev/null
+++ b/nix_archive/nix/amdgpu.nix
@@ -0,0 +1,51 @@
+{ pkgs, ... }: {
+ boot.kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ];
+ environment.sessionVariables = with pkgs; {
+ VDPAU_DRIVER = "radeonsi";
+ LIBVA_DRIVER_NAME = "radeonsi";
+ AMD_VULKAN_ICD = "RADV";
+ VK_ICD_FILENAMES="${pkgsi686Linux.mesa}/share/vulkan/icd.d/radeon_icd.i686.json:${mesa}/share/vulkan/icd.d/radeon_icd.x86_64.json";
+ __EGL_VENDOR_LIBRARY_FILENAMES="${pkgsi686Linux.mesa}/share/glvnd/egl_vendor.d/50_mesa.json:${mesa}/share/glvnd/egl_vendor.d/50_mesa.json";
+ };
+ environment.systemPackages = with pkgs; [
+ radeontop
+ (writeShellScriptBin "proton-env-amdvlk" ''
+ export AMD_VULKAN_ICD="AMDVLK"
+ export VK_ICD_FILENAMES="${amdvlk}/share/vulkan/icd.d/amd_icd64.json"
+ proton-env "$@"
+ '')
+ ];
+ security.wrappers = {
+ radeontop = {
+ owner = "root";
+ group = "root";
+ source = "${pkgs.radeontop}/bin/radeontop";
+ capabilities = "cap_perfmon+ep";
+ };
+ };
+ # https://github.com/sibradzic/amdgpu-clocks
+ # @TODO: Fetch and patch scripts from the git repo.
+ #environment.etc = { # XFX RX 6600
+ # "default/amdgpu-custom-states.card0".text = ''
+ # OD_VDDGFX_OFFSET:
+ # -55mV
+ # FORCE_POWER_CAP: 120000000
+ # FORCE_PERF_LEVEL: auto
+ # FORCE_POWER_PROFILE: 1
+ # '';
+ #};
+ #environment.systemPackages = [ amdgpu-clocks pkgs.radeontop ];
+ #systemd.services.amdgpu-clocks = {
+ # description = "Set custom amdgpu clocks & voltages";
+ # after = [ "multi-user.target" "rc-local.service" "systemd-user-sessions.service" ];
+ # wants = [ "modprobe@amdgpu.service" ];
+ # wantedBy = [ "multi-user.target" ];
+ # serviceConfig = {
+ # Type = "oneshot";
+ # ExecStart = "${amdgpu-clocks}/bin/amdgpu-clocks";
+ # ExecStop = "${amdgpu-clocks}/bin/amdgpu-clocks restore";
+ # ExecReload = "${amdgpu-clocks}/bin/amdgpu-clocks";
+ # RemainAfterExit = true;
+ # };
+ #};
+}
diff --git a/nix_archive/nix/audio.nix b/nix_archive/nix/audio.nix
new file mode 100644
index 0000000..adac55b
--- /dev/null
+++ b/nix_archive/nix/audio.nix
@@ -0,0 +1,113 @@
+{ pkgs, ... }: {
+ #hardware.pulseaudio = {
+ # enable = true;
+ # support32Bit = true;
+ #};
+ #nixpkgs.config.pulseaudio = true;
+ services.pipewire = {
+ enable = true;
+ pulse.enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ extraConfig = {
+ # cat /proc/asound/card1/stream0
+ pipewire = {
+ "92-user" = {
+ "context.properties" = {
+ "default.clock.rate" = 48000;
+ "default.clock.allowed-rates" = [ 44100 48000 88200 96000 176400 192000 352800 384000 ];
+ "default.clock.quantum" = 512;
+ "default.clock.min-quantum" = 32;
+ "default.clock.max-quantum" = 4096;
+ "default.clock.quantum-limit" = 4096;
+ "default.video.width" = 640;
+ "default.video.height" = 480;
+ "default.video.rate.num" = 25;
+ "default.video.rate.denom" = 1;
+ };
+ "context.modules" = [{
+ "name" = "libpipewire-module-filter-chain";
+ "args" = {
+ "node.description" = "Focal Elegia EQ (Convolver)";
+ "media.name" = "Focal Elegia EQ (Convolver)";
+ "filter.graph" = {
+ "nodes" = [{
+ "type" = "builtin";
+ "name" = "Convolver EQ";
+ "label" = "convolver";
+ "config" = {
+ "filename" = [
+ "/etc/convolver/Focal_Elegia_minimum_phase_44100Hz.wav"
+ "/etc/convolver/Focal_Elegia_minimum_phase_48000Hz.wav"
+ ];
+ "resample_quality" = 10;
+ };
+ }];
+ };
+ "capture.props" = {
+ "node.name" = "eq_input.elegia_convolver_eq";
+ "media.class" = "Audio/Sink";
+ "audio.channels" = 2;
+ "audio.position" = [ "FL" "FR" ];
+ };
+ "playback.props" = {
+ "node.name" = "eq_output.elegia_convolver_eq";
+ "node.passive" = true;
+ "audio.channels" = 2;
+ "audio.position" = [ "FL" "FR" ];
+ };
+ };
+ }];
+ "stream.properties" = {
+ "resample.quality" = 10;
+ "channelmix.normalize" = false;
+ };
+ };
+ };
+ client = {
+ "92-client-user" = {
+ "stream.properties" = {
+ "resample.quality" = 10;
+ "channelmix.normalize" = false;
+ };
+ };
+ };
+ pipewire-pulse = {
+ "92-pulse-user" = {
+ "pulse.properties" = {
+ "pulse.default.format" = "S32";
+ "pulse.default.position" = [ "FL" "FR" ];
+ };
+ "stream.properties" = {
+ "resample.quality" = 10;
+ "channelmix.normalize" = false;
+ };
+ };
+ };
+ };
+ wireplumber = {
+ enable = true;
+ extraConfig = {
+ "alsa-conf" = {
+ "monitor.alsa.properties" = {
+ "alsa.use-acp" = true;
+ };
+ "wireplumber.profiles" = {
+ "main" = {
+ "monitor.alsa.reserve-device" = "disabled";
+ };
+ };
+ };
+ };
+ };
+ };
+ environment.systemPackages = with pkgs; [
+ pipewire
+ pavucontrol
+ ];
+ environment.etc = {
+ "convolver/Focal_Elegia_minimum_phase_44100Hz.wav".source = ../../files/audio/convolver/Focal_Elegia_minimum_phase_44100Hz.wav;
+ "convolver/Focal_Elegia_minimum_phase_48000Hz.wav".source = ../../files/audio/convolver/Focal_Elegia_minimum_phase_48000Hz.wav;
+ };
+ security.rtkit.enable = true;
+}
diff --git a/nix_archive/nix/bluetooth.nix b/nix_archive/nix/bluetooth.nix
new file mode 100644
index 0000000..18b9a42
--- /dev/null
+++ b/nix_archive/nix/bluetooth.nix
@@ -0,0 +1,16 @@
+{ ... }: {
+ hardware.bluetooth = {
+ enable = true;
+ powerOnBoot = true;
+ settings = {
+ General = {
+ ControllerMode = "dual";
+ };
+ LE = {
+ MinConnectionInterval = 7;
+ MaxConnectionInterval = 9;
+ ConnectionLatency = 0;
+ };
+ };
+ };
+}
diff --git a/nix_archive/nix/email.nix b/nix_archive/nix/email.nix
new file mode 100644
index 0000000..8320d88
--- /dev/null
+++ b/nix_archive/nix/email.nix
@@ -0,0 +1,158 @@
+{ config, pkgs, ... }: {
+ environment.systemPackages = with pkgs; [ lynx urlscan ];
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ accounts.email.maildirBasePath = "mail";
+ accounts.email.accounts."andrew" = {
+ address = "andrew@akon.city";
+ realName = "Andrew Opalach";
+ userName = "andrew@akon.city";
+ maildir.path = "";
+ primary = true;
+ passwordCommand = "${pkgs.pass}/bin/pass andrew@akon.city";
+ folders.inbox = "INBOX";
+ imap = {
+ host = "mail.akon.city";
+ port = 993;
+ tls.enable = true;
+ };
+ smtp = {
+ host = "mail.akon.city";
+ port = 465;
+ tls.enable = true;
+ };
+ mbsync = {
+ enable = true;
+ create = "maildir";
+ };
+ msmtp.enable = true;
+ imapnotify = {
+ enable = true;
+ boxes = [ "INBOX" ];
+ onNotify = "${pkgs.notmuch}/bin/notmuch new";
+ onNotifyPost = "${pkgs.libnotify}/bin/notify-send '📥 New Mail!'";
+ };
+ notmuch = {
+ enable = true;
+ neomutt = {
+ enable = true;
+ virtualMailboxes = [
+ { name = "INBOX"; query = "folder:INBOX"; }
+ { name = "Sent"; query = "folder:Sent"; }
+ { name = "Archive"; query = "folder:Archive"; }
+ { name = "Drafts"; query = "folder:Drafts"; }
+ { name = "Trash"; query = "folder:Trash"; }
+ { name = "Junk"; query = "folder:Junk"; }
+ ];
+ };
+ };
+ neomutt.enable = true;
+ };
+ programs.mbsync.enable = true;
+ services.mbsync.enable = true;
+ programs.msmtp.enable = true;
+ services.imapnotify.enable = true;
+ programs.notmuch = {
+ enable = true;
+ hooks = {
+ preNew = "${pkgs.notmuch}/bin/notmuch search --output=files --format=text0 tag:deleted | xargs -0 rm -f; ${pkgs.isync}/bin/mbsync --all -ngfuX";
+ };
+ };
+ programs.neomutt = {
+ enable = true;
+ vimKeys = false;
+ sidebar = {
+ enable = true;
+ width = 18;
+ shortPath = true;
+ };
+ sort = "reverse-date";
+ binds = [
+ { key = "i"; action = "noop"; map = [ "index" "pager" ]; }
+ { key = "g"; action = "noop"; map = [ "index" "pager" ]; }
+ { key = "gg"; action = "first-entry"; map = [ "index" ]; }
+ { key = "j"; action = "next-entry"; map = [ "index" ]; }
+ { key = "k"; action = "previous-entry"; map = [ "index" ]; }
+ { key = "G"; action = "last-entry"; map = [ "index" ]; }
+ { key = "<Return>"; action = "view-mailcap"; map = [ "attach" ]; }
+ { key = "l"; action = "view-mailcap"; map = [ "attach" ]; }
+ { key = "<space>"; action = "noop"; map = [ "editor" ]; }
+ { key = "j"; action = "next-line"; map = [ "pager" ]; }
+ { key = "k"; action = "previous-line"; map = [ "pager" ]; }
+ { key = "gg"; action = "top"; map = [ "pager" ]; }
+ { key = "G"; action = "bottom"; map = [ "pager" ]; }
+ { key = "l"; action = "view-attachments"; map = [ "pager" ]; }
+ { key = "h"; action = "noop"; map = [ "index" ]; }
+ { key = "h"; action = "exit"; map = [ "pager" "attach" ]; }
+ { key = "\\Ck"; action = "sidebar-prev"; map = [ "index" "pager" ]; }
+ { key = "\\Cj"; action = "sidebar-next"; map = [ "index" "pager" ]; }
+ { key = "\\Co"; action = "sidebar-open"; map = [ "index" "pager" ]; }
+ { key = "<Tab>"; action = "complete-query"; map = [ "editor" ]; }
+ { key = "l"; action = "select-entry"; map = [ "browser" ]; }
+ { key = "gg"; action = "top-page"; map = [ "browser" ]; }
+ { key = "G"; action = "bottom-page"; map = [ "browser" ]; }
+ { key = "H"; action = "view-raw-message"; map = [ "index" "pager" ]; }
+ ];
+ macros = let
+ delete-macro = "<modify-labels>+deleted<enter>";
+ undelete-macro = "<modify-labels>-deleted<enter>";
+ in [
+ { key = "\\Cb"; action = "<pipe-message>${pkgs.urlscan}/bin/urlscan -cW<enter>"; map = [ "index" "pager" ]; }
+ { key = "\\Cb"; action = "<pipe-entry>${pkgs.urlscan}/bin/urlscan -cW<enter>"; map = [ "attach" "compose" ]; }
+ { key = "h"; action = "<change-dir><kill-line>..<enter>"; map = [ "browser" ]; }
+ { key = "o"; action = "<shell-escape>${pkgs.notmuch}/bin/notmuch new<enter><sync-mailbox>"; map = [ "index" ]; }
+ { key = "\\Cd"; action = delete-macro; map = [ "index" ]; }
+ { key = "\\Cu"; action = undelete-macro; map = [ "index" ]; }
+ ];
+ extraConfig = ''
+ unmailboxes ${homeDir}/mail/INBOX
+ set mail_check_stats = yes
+ set delete = ask-yes
+
+ # https://github.com/LukeSmithxyz/mutt-wizard/blob/10a16e0ee6442425e7ca1634b1d3356e6d4d04f6/share/mutt-wizard.muttrc#L14
+ set rfc2047_parameters = yes
+ set sleep_time = 0
+ set markers = no
+ set wait_key = no
+ set reverse_name
+ set fast_reply
+ set fcc_attach
+ set mime_forward = no
+ set forward_attachments = yes
+ set forward_format = "Fwd: %s"
+ set forward_quote
+
+ set index_format="%2C (%Z) %[%D %I:%M %p] %-15.15F %s (%c, %g)"
+
+ auto_view text/html
+ auto_view application/pgp-encrypted
+ alternative_order text/plain text/enriched text/html
+
+ color normal blue black
+ color attachment brightyellow black
+ color hdrdefault blue black
+ color indicator black blue
+ color markers brightred black
+ color quoted green black
+ color signature blue black
+ color status black red
+ color tilde blue black
+ color tree red black
+
+ color index red black ~D
+ color index magenta black ~T
+
+ color header brightgreen black ^From:
+ color header brightblue black ^To:
+ color header brightblue black ^Reply-To:
+ color header brightblue black ^Cc:
+ color header brightblue black ^Subject:
+
+ color body brightred black [\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+
+ color body brightblue black (https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+
+ '';
+ };
+ home.file.".mailcap".source = ../../files/mailcap;
+ };
+}
diff --git a/nix_archive/nix/gaming.nix b/nix_archive/nix/gaming.nix
new file mode 100644
index 0000000..e86cd61
--- /dev/null
+++ b/nix_archive/nix/gaming.nix
@@ -0,0 +1,110 @@
+{ config, lib, pkgs, ... }: let
+ loc = config.local;
+ colo = loc.scheme;
+in {
+ users.users.andrew = {
+ extraGroups = [ "gamemode" ];
+ };
+ environment.systemPackages = with pkgs; lib.lists.flatten [
+ (asNeeded "gamepad-tool" ["gamepad-tool"])
+ (asNeeded "sdl-jstest" ["sdl-jstest" "sdl2-jstest"])
+ (asNeeded "parsec-bin" ["parsecd"])
+ (asNeeded "[lutris umu-launcher]" ["lutris"])
+ (asNeeded "(retroarch.withCores (cores: with cores; [ mesen bsnes ]))" ["retroarch"])
+ (asNeeded "dolphin-emu" ["dolphin-emu"])
+ (asNeeded "cemu" ["cemu"])
+ (asNeeded "ryujinx" ["ryujinx"])
+ (asNeeded "pcsx2" ["pcsx2-qt"])
+ (asNeeded "(ppsspp.override { enableQt = true; })" ["ppsspp"])
+ (asNeeded "rpcs3" ["rpcs3"])
+ (asNeeded "prismlauncher" ["prismlauncher"])
+ (asNeeded "osu-lazer-bin" ["osu!"])
+ ];
+ #hardware.xone.enable = true;
+ #hardware.opentabletdriver.enable = true;
+ #services.udev.packages = [ pkgs.dolphinEmu ];
+ #boot.extraModulePackages = [
+ # config.boot.kernelPackages.gcadapter-oc-kmod
+ #];
+ #boot.kernelModules = [ "gcadapter_oc" ];
+ programs.gamemode = {
+ enable = true;
+ settings = {
+ general.desiredgov = "schedutil";
+ general.inhibit_screensaver = 0;
+ general.renice = 10;
+ # Can't set GPU parameters from an unprivileged container.
+ #gpu = {
+ # apply_gpu_optimisations = "accept-responsibility";
+ # gpu_device = 0;
+ # amd_performance_level = "high";
+ #};
+ };
+ };
+ programs.gamescope = {
+ enable = true;
+ package = pkgs.gamescope;
+ capSysNice = true;
+ };
+ #services.ananicy = {
+ # enable = true;
+ # #package = pkgs.ananicy-cpp;
+ # settings = {
+ # apply_nice = true;
+ # };
+ # extraTypes = [
+ # { type = "realtime"; nice = -20; }
+ # ];
+ # extraRules = [
+ # { name = "gamescope"; type = "realtime"; }
+ # ];
+ #};
+ #security.wrappers = {
+ # gamescope = {
+ # owner = "root";
+ # group = "root";
+ # source = "${pkgs.gamescope}/bin/gamescope";
+ # capabilities = "cap_sys_nice+eip";
+ # };
+ #};
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ programs.mangohud = {
+ enable = true;
+ enableSessionWide = false;
+ package = (pkgs.mangohud.override { nvidiaSupport = false; });
+ settings = {
+ gamemode = true;
+ cpu_temp = true;
+ cpu_mhz = true;
+ vulkan_driver = true;
+ gpu_name = true;
+ gpu_power = true;
+ gpu_temp = true;
+ gpu_junction_temp = true;
+ gpu_core_clock = true;
+ gpu_voltage = true;
+ vram = true;
+ gpu_mem_temp = true;
+ gpu_mem_clock = true;
+ engine_version = true;
+ wine = true;
+ winesync = true;
+ display_server = true;
+ present_mode = true;
+ table_columns = 4;
+ cellpadding_y = -0.100;
+ font_size = 22;
+ round_corners = true;
+ toggle_preset = "";
+ toggle_hud_position = "";
+ toggle_fps_limit = "";
+ toggle_logging = "";
+ reload_cfg = "";
+ upload_log = "";
+ toggle_hud = "Shift_R+F10";
+ };
+ };
+ };
+}
diff --git a/nix_archive/nix/intel.nix b/nix_archive/nix/intel.nix
new file mode 100644
index 0000000..7b69ba8
--- /dev/null
+++ b/nix_archive/nix/intel.nix
@@ -0,0 +1,15 @@
+{ pkgs, ... }: {
+ environment.sessionVariables = with pkgs; {
+ VDPAU_DRIVER = "va_gl";
+ LIBVA_DRIVER_NAME = "iHD";
+ AMD_VULKAN_ICD = "ANV";
+ VK_ICD_FILENAMES="${pkgsi686Linux.mesa}/share/vulkan/icd.d/intel_icd.i686.json:${mesa}/share/vulkan/icd.d/intel_icd.x86_64.json";
+ __EGL_VENDOR_LIBRARY_FILENAMES="${pkgsi686Linux.mesa}/share/glvnd/egl_vendor.d/50_mesa.json:${mesa}/share/glvnd/egl_vendor.d/50_mesa.json";
+ };
+ hardware.graphics = {
+ extraPackages = with pkgs; [
+ intel-media-driver
+ ];
+ };
+ hardware.intel-gpu-tools.enable = true;
+}
diff --git a/nix_archive/nix/mesa_git.nix b/nix_archive/nix/mesa_git.nix
new file mode 100644
index 0000000..ba2dcc1
--- /dev/null
+++ b/nix_archive/nix/mesa_git.nix
@@ -0,0 +1,16 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ (writeShellScriptBin "proton-env-anv" ''
+ export AMD_VULKAN_ICD="ANV"
+ export VK_ICD_FILENAMES="${pkgsi686Linux.mesa_git}/share/vulkan/icd.d/intel_icd.i686.json:${mesa_git}/share/vulkan/icd.d/intel_icd.x86_64.json"
+ proton-env "$@"
+ '')
+ (writeShellScriptBin "proton-env-radv" ''
+ export AMD_VULKAN_ICD="RADV"
+ export VK_ICD_FILENAMES="${pkgsi686Linux.mesa_git}/share/vulkan/icd.d/radeon_icd.i686.json:${mesa_git}/share/vulkan/icd.d/radeon_icd.x86_64.json"
+ export __EGL_VENDOR_LIBRARY_FILENAMES="${pkgsi686Linux.mesa_git}/share/glvnd/egl_vendor.d/50_mesa.json:${mesa_git}/share/glvnd/egl_vendor.d/50_mesa.json"
+ export LD_LIBRARY_PATH="${pkgsi686Linux.mesa_git}/lib:${mesa_git}/lib:$LD_LIBRARY_PATH"
+ proton-env "$@"
+ '')
+ ];
+}
diff --git a/nix_archive/nix/programs/bash.nix b/nix_archive/nix/programs/bash.nix
new file mode 100644
index 0000000..571b4fe
--- /dev/null
+++ b/nix_archive/nix/programs/bash.nix
@@ -0,0 +1,65 @@
+{ config, pkgs, ... }: {
+ users.defaultUserShell = pkgs.bashInteractive;
+ environment.sessionVariables = {
+ SHELL = "${pkgs.bashInteractive}/bin/bash";
+ };
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ programs.bash = {
+ enable = true;
+ shellAliases = {
+ cp = "rsync -av";
+ top = "htop";
+ bc = "bc -l";
+ pgrep = "pgrep -f";
+ make = "make -j6";
+ diff = "diff -u";
+ gdb = "gdb -q";
+ mail = "neomutt";
+ iroha = "ssh andrew@iroha";
+ moyo = "ssh andrew@moyo";
+ zasshi = "ssh andrew@zasshi";
+ denpa = "ssh moyo -t 'ssh 192.168.122.89'";
+ rod = "ssh -p 1738 rod";
+ bmrg = "ssh boomerang";
+ cmv-add = "$HOME/c/camu/scripts/cmv_add.sh";
+ cmv-pause = "cmv-add PAUSE";
+ cmv-next = "cmv-add NEXT";
+ cmv-prev = "cmv-add PREV";
+ cmv-shuffle = "cmv-add SHUFFLE";
+ cmv-sort = "cmv-add SORT";
+ cmv-reverse = "cmv-add REVERSE";
+ cmv-clear = "cmv-add CLEAR";
+ };
+ historyControl = [ "erasedups" ];
+ historySize = 10000;
+ historyFile = "${homeDir}/.bash_history";
+ historyFileSize = 100000;
+ initExtra = ''
+ bind 'set completion-query-items 0'
+ bind 'set show-all-if-ambiguous on'
+ bind 'set show-all-if-unmodified on'
+ bind 'set menu-complete-display-prefix on'
+ bind '"\t": menu-complete'
+ bind '"\e[Z": menu-complete-backward'
+ RESET="\001\017\002"
+ NORMAL="\001\033[0m\002"
+ YELLOW="\001\033[0;33m\002"
+ BLUE="\001\033[0;34m\002"
+ MAGENTA="\001\033[0;35m\002"
+ CYAN="\001\033[0;36m\002"
+ RED="\001\033[0;31m\002"
+ exit_code_guy()
+ {
+ if [ $? -eq 0 ]; then
+ printf "(・_・) >"
+ else
+ printf "(″ロ゛) >"
+ fi
+ }
+ export PS1="$RESET$MAGENTA\u@$CYAN\H$MAGENTA:\w\$(exit_code_guy)$NORMAL "
+ '';
+ };
+ };
+}
diff --git a/nix_archive/nix/programs/docker.nix b/nix_archive/nix/programs/docker.nix
new file mode 100644
index 0000000..3491a80
--- /dev/null
+++ b/nix_archive/nix/programs/docker.nix
@@ -0,0 +1,4 @@
+{ ... }: {
+ virtualisation.docker.enable = true;
+ users.users.andrew.extraGroups = [ "docker" ];
+}
diff --git a/nix_archive/nix/programs/firefox.nix b/nix_archive/nix/programs/firefox.nix
new file mode 100644
index 0000000..d278bd4
--- /dev/null
+++ b/nix_archive/nix/programs/firefox.nix
@@ -0,0 +1,145 @@
+{ config, pkgs, ... }:
+let
+ colo = config.local.scheme;
+in {
+ environment.systemPackages = with pkgs; [
+ firefox-wayland
+ ];
+ environment.sessionVariables = {
+ BROWSER = "firefox";
+ };
+ services.psd.enable = true;
+ home-manager.users.andrew = {
+ home.file."user-overrides.js" = {
+ target = ".mozilla/firefox/default/user-overrides.js";
+ source = ../../../files/firefox/user-overrides.js;
+ };
+ home.file."firefox-gnome-theme" = {
+ target = ".mozilla/firefox/default/chrome/firefox-gnome-theme";
+ source = (pkgs.fetchFromGitHub {
+ owner = "rafaelmardojai";
+ repo = "firefox-gnome-theme";
+ rev = "0909cfe4a2af8d358ad13b20246a350e14c2473d";
+ hash = "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=";
+ });
+ };
+ home.file."customChrome.css" = {
+ target = ".mozilla/firefox/default/chrome/customChrome.css";
+ source = pkgs.writeText "customChrome.css" ''
+ @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+ @media (prefers-color-scheme: ${colo.lightness}) {
+ :root {
+ /* Accent */
+ --gnome-accent-bg: #${colo.color3};
+ --gnome-accent: #${colo.color4};
+
+ --gnome-toolbar-star-button: #${colo.color4};
+
+ /* Window */
+ --gnome-window-background: #${colo.background};
+ --gnome-window-color: #${colo.foreground};
+ --gnome-view-background: #${colo.background};
+ --gnome-sidebar-background: #${colo.color5};
+ --gnome-secondary-sidebar-background: #${colo.color4};
+
+ /* Card */
+ --gnome-card-background: #${colo.background};
+ --gnome-card-shade-color: #${colo.color4};
+
+ /* Menu */
+ --gnome-menu-background: #${colo.background};
+
+ /* Header bar */
+ --gnome-headerbar-background: #${colo.background};
+ --gnome-headerbar-shade-color: #${colo.background};
+
+ /* Toolbars */
+ --gnome-toolbar-icon-fill: #${colo.foreground};
+
+ /* Tabs */
+ --gnome-tabbar-tab-hover-background: #${colo.color5};
+ --gnome-tabbar-tab-active-background: #${colo.color4};
+ --gnome-tabbar-tab-active-background-contrast: #${colo.color4};
+ --gnome-tabbar-tab-active-hover-background: #${colo.color5};
+
+ --gnome-tabbar-identity-color-green: var(--gnome-palette-green-1);
+ --gnome-tabbar-identity-color-yellow: var(--gnome-palette-yellow-2);
+ --gnome-tabbar-identity-color-orange: var(--gnome-palette-orange-3);
+ --gnome-tabbar-identity-color-red: var(--gnome-palette-red-1);
+ --gnome-tabbar-identity-color-purple: var(--gnome-palette-purple-1);
+
+ /* Text color for Firefox Logo in new private tab */
+ --gnome-private-wordmark: #${colo.background};
+ /* New private tab background */
+ --gnome-private-in-content-page-background: #${colo.background};
+ /* Private browsing info box */
+ --gnome-private-text-primary-color: #${colo.background};
+ }
+
+ /* Backdrop colors */
+ :root:-moz-window-inactive {
+ --gnome-tabbar-tab-hover-background: #${colo.background};
+ --gnome-tabbar-tab-active-background: #${colo.background};
+ }
+
+ /* Private colors */
+ :root[privatebrowsingmode="temporary"] {
+ --gnome-accent-fg: #${colo.color4};
+ /* Headerbar */
+ --gnome-headerbar-background: #${colo.color5} !important;
+ /* Tabs */
+ --gnome-tabbar-tab-hover-background: #${colo.color5};
+ --gnome-tabbar-tab-active-background: #${colo.background};
+ --gnome-tabbar-tab-active-background-contrast: #${colo.background};
+ --gnome-tabbar-tab-active-hover-background: #${colo.color5};
+ }
+
+ /* Private and backdrop colors */
+ :root[privatebrowsingmode="temporary"]:-moz-window-inactive {
+ --gnome-headerbar-background: #${colo.color5} !important;
+ --gnome-tabbar-tab-hover-background: #${colo.color5};
+ --gnome-tabbar-tab-active-background: #${colo.color5};
+ }
+ }
+ '';
+ };
+ home.sessionVariables = {
+ MOZ_WEBRENDER = "1";
+ MOZ_USE_XINPUT2 = "1";
+ MOZ_ENABLE_WAYLAND = "1";
+ };
+ programs.firefox = {
+ enable = true;
+ profiles.default = {
+ extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
+ ublock-origin
+ skip-redirect
+ cookies-txt
+ youtube-recommended-videos
+ istilldontcareaboutcookies
+ hls-stream-detector
+ old-reddit-redirect
+ tampermonkey
+ enhanced-h264ify
+ ];
+ userChrome = ''
+ @import "firefox-gnome-theme/userChrome.css";
+ @import "customChrome.css";
+ #urlbar .search-one-offs {
+ display: none !important;
+ }
+ #tabbrowser-tabpanels{
+ background-color: #${colo.background} !important;
+ }
+ '';
+ userContent = ''
+ @import "firefox-gnome-theme/userContent.css";
+ @-moz-document url("about:home"),url("about:blank"),url("about:newtab"),url("about:privatebrowsing") {
+ body{ background-color: #${colo.background} !important }
+ }
+ '';
+ };
+ };
+ };
+}
diff --git a/nix_archive/nix/programs/foot.nix b/nix_archive/nix/programs/foot.nix
new file mode 100644
index 0000000..5c85ce7
--- /dev/null
+++ b/nix_archive/nix/programs/foot.nix
@@ -0,0 +1,51 @@
+{ config, pkgs, ... }:
+let
+ loc = config.local;
+ colo = loc.scheme;
+in {
+ environment.sessionVariables = {
+ TERMINAL = "${pkgs.foot}/bin/footclient";
+ };
+ home-manager.users.andrew = {
+ programs.foot = {
+ enable = true;
+ server.enable = true;
+ settings = {
+ main = {
+ font = "${s.font.name}:size=${toString s.font.size}";
+ };
+ colors = {
+ foreground = "${colo.foreground}";
+ background = "${colo.background}";
+ regular0 = "${colo.color0}";
+ regular1 = "${colo.color1}";
+ regular2 = "${colo.color2}";
+ regular3 = "${colo.color3}";
+ regular4 = "${colo.color4}";
+ regular5 = "${colo.color5}";
+ regular6 = "${colo.color6}";
+ regular7 = "${colo.color7}";
+ bright0 = "${colo.color8}";
+ bright1 = "${colo.color9}";
+ bright2 = "${colo.color10}";
+ bright3 = "${colo.color11}";
+ bright4 = "${colo.color12}";
+ bright5 = "${colo.color13}";
+ bright6 = "${colo.color14}";
+ bright7 = "${colo.color15}";
+ alpha = "1.0";
+ };
+ };
+ };
+ wayland.windowManager.sway = {
+ config = rec {
+ terminal = "${pkgs.foot}/bin/footclient";
+ keybindings = let
+ mod1 = "Mod1";
+ in {
+ "${mod1}+Return" = "exec ${terminal}";
+ };
+ };
+ };
+ };
+}
diff --git a/nix_archive/nix/programs/kdeconnect.nix b/nix_archive/nix/programs/kdeconnect.nix
new file mode 100644
index 0000000..8d8b366
--- /dev/null
+++ b/nix_archive/nix/programs/kdeconnect.nix
@@ -0,0 +1,12 @@
+{ ... }: {
+ networking.firewall = {
+ allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
+ allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
+ };
+ home-manager.users.andrew = {
+ services.kdeconnect = {
+ enable = true;
+ indicator = false;
+ };
+ };
+}
diff --git a/nix_archive/nix/programs/kitty.nix b/nix_archive/nix/programs/kitty.nix
new file mode 100644
index 0000000..86ad720
--- /dev/null
+++ b/nix_archive/nix/programs/kitty.nix
@@ -0,0 +1,112 @@
+{ config, lib, pkgs, ... }:
+let
+ loc = config.local;
+ colo = loc.scheme;
+in {
+ environment.sessionVariables = {
+ TERMINAL = "${pkgs.kitty}/bin/kitty -1";
+ };
+ home-manager.users.andrew = {
+ programs.kitty = {
+ enable = true;
+ font = {
+ name = loc.font.name;
+ size = loc.font.size;
+ };
+ shellIntegration = {
+ mode = "enabled";
+ enableBashIntegration = true;
+ };
+ extraConfig = ''
+ shell ${pkgs.bashInteractive}/bin/bash --login
+ update_check_interval 0
+ confirm_os_window_close 0
+ sync_to_monitor no
+ allow_remote_control yes
+ linux_display_server wayland
+ remember_window_size no
+ initial_window_width 720
+ initial_window_height 480
+ resize_debounce_time 0.025 0.5
+ window_padding_width 1
+ placement_strategy top-left
+ scrollback_lines 3000
+ paste_actions confirm,confirm-if-large
+ disable_ligatures always
+ modify_font baseline ${toString loc.font.baseline}
+ modify_font cell_height ${toString loc.font.cell-height-offset}
+ cursor_shape block
+ #cursor_blink_interval -1 linear ease-out
+ #cursor_stop_blinking_after 20.0
+ #cursor_trail 2
+ #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}
+ color0 #${colo.color0}
+ color1 #${colo.color1}
+ color2 #${colo.color2}
+ color3 #${colo.color3}
+ color4 #${colo.color4}
+ color5 #${colo.color5}
+ color6 #${colo.color6}
+ color7 #${colo.color7}
+ color8 #${colo.color8}
+ color9 #${colo.color9}
+ color10 #${colo.color10}
+ color11 #${colo.color11}
+ color12 #${colo.color12}
+ color13 #${colo.color13}
+ color14 #${colo.color14}
+ color15 #${colo.color15}
+ selection_foreground #${colo.background}
+ selection_background #${colo.color6}
+ mark1_foreground #${colo.background}
+ mark1_background #${colo.color5}
+ mark2_foreground #${colo.background}
+ mark2_background #${colo.color6}
+ mark3_foreground #${colo.background}
+ mark3_background #${colo.color4}
+ background_opacity ${toString colo.alpha}
+ 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
+ '';
+ };
+ 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 = ''
+ layout splits
+ launch --var window=main
+ launch --location=vsplit --bias=17.1 /home/andrew/dl/tmp/clock/a.out
+ focus_matching_window var:window=first
+ '';
+ wayland.windowManager.sway = {
+ config = rec {
+ terminal = "${pkgs.kitty}/bin/kitty -1";
+ keybindings = let
+ mod1 = "Mod1";
+ in {
+ "${mod1}+Return" = "exec ${terminal}";
+ "${mod1}+backslash" = "exec ${pkgs.kitty}/bin/kitten quick-access-terminal";
+ };
+ };
+ };
+ };
+}
diff --git a/nix_archive/nix/programs/nvim.nix b/nix_archive/nix/programs/nvim.nix
new file mode 100644
index 0000000..3cdf12e
--- /dev/null
+++ b/nix_archive/nix/programs/nvim.nix
@@ -0,0 +1,235 @@
+{ config, pkgs, ... }:
+let
+ colo = config.local.scheme;
+ local-nvim = pkgs.vimUtils.buildVimPlugin {
+ pname = "local";
+ version = "0.2";
+ src = ../../files/nvim/local;
+ };
+ wal = pkgs.vimUtils.buildVimPlugin {
+ # https://github.com/neovim/neovim/blob/ec8922978eb14fe62671628bb25215743712eac0/src/nvim/highlight_group.c#L432
+ # ...neovim-unwrapped-0.10.4/share/nvim/runtime/syntax/c.vim
+ pname = "wal";
+ version = "3.3";
+ src = pkgs.writeTextDir "colors/wal-gui.vim" ''
+ let g:colors_name = "wal-gui"
+
+ set background=${colo.lightness}
+ set pumblend=10
+
+ " Lag Fix
+ hi! link CurSearch Search
+
+ " Plugins
+ hi MiniStarterInactive guifg=#${colo.foreground}
+ hi MiniStarterQuery guifg=#${colo.color5} gui=bold
+ hi MiniStarterItemPrefix guifg=#${colo.color4}
+
+ " https://github.com/NeogitOrg/neogit/blob/nightly/lua/neogit/lib/hl.lua
+ hi link NeogitDiffContext Normal
+ hi link NeogitDiffContextHighlight Normal
+ hi link NeogitDiffContextCursor Normal
+ hi link NeogitHunkHeader NeogitHunkHeaderHighlight
+
+ " Custom
+ hi ExtraWhitespace guibg=#${colo.color4}
+
+ hi Normal guifg=#${colo.foreground} guibg=#${colo.background}
+
+ " Necessary even without tree-sitter.
+ hi @variable guifg=#${colo.foreground}
+
+ " UI
+ hi Added guifg=#${colo.color2}
+ hi Changed guifg=#${colo.color3}
+ hi ColorColumn guibg=#${colo.color6}
+ hi Conceal guifg=#${colo.color5}
+ hi CurSearch guifg=#${colo.background} guibg=#${colo.color4}
+ hi CursorColumn guibg=#${colo.background}
+ hi CursorLine guibg=#${colo.color5}
+ hi DiffAdd guifg=#${colo.color2} guibg=#${colo.background}
+ hi DiffChange guifg=#${colo.color3} guibg=#${colo.background}
+ hi DiffDelete guifg=#${colo.color1} guibg=#${colo.background} gui=bold
+ hi DiffText guifg=#${colo.color4} guibg=#${colo.background}
+ hi Directory guifg=#${colo.color2}
+ hi ErrorMsg guifg=#${colo.color1}
+ hi FloatShadow guibg=#${colo.color6} blend=80
+ hi FloatShadowThrough guibg=#${colo.color6} blend=100
+ hi Folded guifg=#${colo.color5} guibg=#${colo.background}
+ hi LineNr guifg=#${colo.color2}
+ hi MatchParen guifg=#${colo.color2} guibg=#${colo.background} gui=bold
+ hi ModeMsg guifg=#${colo.color4}
+ hi MoreMsg guifg=#${colo.color2}
+ hi NonText guifg=#${colo.color6}
+ hi NormalFloat guibg=#${colo.color5}
+ hi Pmenu guibg=#${colo.color5}
+ hi PmenuThumb guibg=#${colo.color4}
+ hi PmenuSel guibg=#${colo.color5} " Font color.
+ hi PmenuSbar guibg=#${colo.color5}
+ hi Question guifg=#${colo.color3}
+ hi QuickFixLine guifg=#${colo.color3}
+ hi RedrawDebugClear guibg=#${colo.color2}
+ hi RedrawDebugComposed guibg=#${colo.background}
+ hi RedrawDebugRecompose guibg=#${colo.color3}
+ hi Removed guifg=#${colo.color1}
+ hi Search guifg=#${colo.foreground} guibg=#${colo.color1}
+ hi SignColumn guifg=#${colo.color6}
+ hi SpecialKey guifg=#${colo.color6}
+ hi SpellBad guisp=#${colo.color1} gui=undercurl
+ hi SpellCap guisp=#${colo.color4} gui=undercurl
+ hi SpellLocal guisp=#${colo.color4} gui=undercurl
+ hi SpellRare guisp=#${colo.color3} gui=undercurl
+ hi StatusLine guifg=#${colo.background} guibg=#${colo.color5}
+ hi StatusLineNC guifg=#${colo.background} guibg=#${colo.color4}
+ hi Title guifg=#${colo.foreground} gui=bold
+ hi Visual guibg=#${colo.color3}
+ hi WarningMsg guifg=#${colo.color3}
+ hi WinBar guifg=#${colo.color5} guibg=#${colo.background} gui=bold
+ hi WinBarNC guifg=#${colo.color5} guibg=#${colo.background}
+
+ " // Syntax
+ " "default link Character Constant",
+ " "default link Number Constant",
+ " "default link Boolean Constant",
+ " "default link Float Number",
+ " "default link Conditional Statement",
+ " "default link Repeat Statement",
+ " "default link Label Statement",
+ " "default link Keyword Statement",
+ " "default link Exception Statement",
+ " "default link Include PreProc",
+ " "default link Define PreProc",
+ " "default link Macro PreProc",
+ " "default link PreCondit PreProc",
+ " "default link StorageClass Type",
+ " "default link Structure Type",
+ " "default link Typedef Type",
+ " "default link Tag Special",
+ " "default link SpecialChar Special",
+ " "default link SpecialComment Special",
+ " "default link Debug Special",
+ " "default link Ignore Normal",
+
+ " Syntax Overrides
+ hi Structure guifg=#${colo.color4} gui=bold
+ hi StorageClass guifg=#${colo.color4} gui=bold
+ hi Number guifg=#${colo.foreground}
+ " -----
+ hi link Boolean Number
+ hi link Character String
+ hi link SpecialChar Character
+
+ " Syntax
+ hi Constant guifg=#${colo.foreground}
+ hi Operator guifg=#${colo.foreground}
+ hi PreProc guifg=#${colo.foreground}
+ hi Type guifg=#${colo.foreground} gui=bold
+ hi Delimiter guifg=#${colo.foreground}
+
+ hi Comment guifg=#${colo.color2}
+ hi String guifg=#${colo.color2}
+ hi Identifier guifg=#${colo.foreground}
+ hi Function guifg=#${colo.foreground}
+ hi Statement guifg=#${colo.foreground} gui=bold
+ hi Special guifg=#${colo.color6}
+ hi Error guifg=#${colo.color1} guibg=#${colo.foreground} " Used for Neogit delete.
+ hi Todo guifg=#${colo.foreground} gui=bold
+
+ " Diagnostic
+ hi DiagnosticError guifg=#${colo.color1}
+ hi DiagnosticWarn guifg=#${colo.color3}
+ hi DiagnosticInfo guifg=#${colo.color2}
+ hi DiagnosticHint guifg=#${colo.foreground}
+ hi DiagnosticOk guifg=#${colo.color4}
+ hi DiagnosticUnderlineError guisp=#${colo.color1} gui=underline
+ hi DiagnosticUnderlineWarn guisp=#${colo.color3} gui=underline
+ hi DiagnosticUnderlineInfo guisp=#${colo.color2} gui=underline
+ hi DiagnosticUnderlineHint guisp=#${colo.foreground} gui=underline
+ hi DiagnosticUnderlineOk guisp=#${colo.color4} gui=underline
+ hi DiagnosticDeprecated guisp=#${colo.color3} gui=strikethrough
+ '';
+ };
+in {
+ environment.sessionVariables = {
+ EDITOR = "nvim";
+ };
+ home-manager.users.andrew = {
+ programs.neovim = let
+ s = config.local.starter;
+ in {
+ enable = true;
+ viAlias = true;
+ vimAlias = true;
+ extraConfig = ''
+ lua << EOF
+ -- Simpler mini.starter builtin actions.
+ local builtin_actions_edit = function()
+ return {
+ { name = 'Edit new buffer', action = 'enew', section = 'Actions' },
+ { name = 'Quit', action = 'qall', section = 'Actions' }
+ }
+ end
+ local starter = require('mini.starter')
+ starter.setup({
+ items = {
+ starter.sections.sessions(6, true),
+ starter.sections.recent_files(7, false, false),
+ builtin_actions_edit()
+ },
+ content_hooks = {
+ starter.gen_hook.adding_bullet(),
+ starter.gen_hook.aligning('center', 'center')
+ },
+ top_padding = ${toString s.top_padding},
+ header = '${s.header}',
+ footer = '${s.footer}',
+ footer_offset = ${toString s.footer-offset},
+ picture = {
+ path = '${s.picture}',
+ kitty = os.getenv('TERM') == 'xterm-kitty',
+ width = ${toString s.width},
+ position = '${s.position}',
+ padding = {
+ top = ${toString s.padding.top},
+ left = ${toString s.padding.left},
+ text = ${toString s.padding.text}
+ }
+ }
+ })
+ EOF
+ '' + builtins.readFile(../../files/nvim/init.vim);
+ extraPackages = with pkgs; [
+ fzf
+ chafa
+ ripgrep
+ xxd
+ ];
+ #(pkgs.vimUtils.buildVimPlugin {
+ # pname = "";
+ # version = "";
+ # src = pkgs.fetchFromGitHub {
+ # owner = "";
+ # repo = "";
+ # rev = "";
+ # hash = "";
+ # };
+ # meta.homepage = "";
+ #})
+ plugins = with pkgs.vimPlugins; [
+ local-nvim
+ wal
+ undotree
+ fzfWrapper
+ fzf-vim
+ vim-gitbranch
+ vim-signify
+ nvim-lspconfig
+ inc-rename-nvim
+ mini-nvim
+ neogit
+ plenary-nvim
+ ccc-nvim
+ ];
+ };
+ };
+}
diff --git a/nix_archive/nix/programs/obs.nix b/nix_archive/nix/programs/obs.nix
new file mode 100644
index 0000000..59dca35
--- /dev/null
+++ b/nix_archive/nix/programs/obs.nix
@@ -0,0 +1,11 @@
+{ config, pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ obs-studio
+ ];
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ home.file.".config/obs-studio/plugins/wlrobs/bin/64bit/libwlrobs.so".source = "${pkgs.obs-studio-plugins.wlrobs}/lib/obs-plugins/libwlrobs.so";
+ home.file.".config/obs-studio/plugins/wlrobs/bin/64bit/obs-vaapi.so".source = "${pkgs.obs-studio-plugins.obs-vaapi}/lib/obs-plugins/obs-vaapi.so";
+ };
+}
diff --git a/nix_archive/nix/programs/sunshine.nix b/nix_archive/nix/programs/sunshine.nix
new file mode 100644
index 0000000..dff4d97
--- /dev/null
+++ b/nix_archive/nix/programs/sunshine.nix
@@ -0,0 +1,29 @@
+{ pkgs, ... }: {
+ #environment.systemPackages = with pkgs; [ sunshine ];
+ services.sunshine = {
+ enable = true;
+ capSysAdmin = true;
+ settings = {
+ sunshine_name = "Iroha";
+ };
+ applications = {
+ env = {
+ PATH = "$(PATH)";
+ };
+ apps = [
+ {
+ name = "Steam Gamescope";
+ cmd = "gamescope -w 960 -W 960 -h 544 -H 544 -r 60 -O DP-1 -e -- steam steam://open/bigpicture";
+ }
+ ];
+ };
+ };
+ #security.wrappers = {
+ # sunshine = {
+ # owner = "root";
+ # group = "root";
+ # source = "${pkgs.sunshine}/bin/sunshine";
+ # capabilities = "cap_sys_admin+p";
+ # };
+ #};
+}
diff --git a/nix_archive/nix/programs/sway.nix b/nix_archive/nix/programs/sway.nix
new file mode 100644
index 0000000..b5dcb5f
--- /dev/null
+++ b/nix_archive/nix/programs/sway.nix
@@ -0,0 +1,360 @@
+{ config, lib, pkgs, ... }:
+let
+ loc = config.local;
+ colo = loc.scheme;
+in {
+ services.xserver.videoDrivers = [ "modesetting" ];
+ programs.sway = {
+ enable = true;
+ package = pkgs.swayfx;
+ extraPackages = with pkgs; [
+ libinput
+ swaybg
+ swayidle
+ wl-clipboard
+ libnotify
+ bemenu
+ slurp
+ grim
+ wf-recorder
+ wlsunset
+ xorg.xprop
+ xorg.xset
+ xorg.xrdb
+ xorg.xrandr
+ ];
+ };
+ local.scripts.imports = [
+ "dbus-sway-environment"
+ "dmenu-path"
+ "dmenu-path0"
+ "dmenu-emoji"
+ "wlsunset-toggle"
+ "screenshot"
+ ];
+ services.dbus.enable = true;
+ security.polkit.enable = true;
+ programs.dconf.enable = true;
+ xdg.portal = {
+ enable = true;
+ wlr.enable = true;
+ extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
+ };
+ xdg.icons.enable = true;
+ #services.getty.autologinUser = "andrew";
+ #services.greetd = {
+ # enable = false;
+ # settings = {
+ # vt=3;
+ # default_session = {
+ # command = "run-sway";
+ # user = "root";
+ # };
+ # };
+ #};
+ qt = {
+ enable = true;
+ platformTheme = "qt5ct"; # Also selects qt6ct.
+ style = "adwaita";
+ };
+ home-manager.users.andrew = {
+ home.sessionVariables = {
+ MAIN_MONITOR="${loc.monitors.monitor1}";
+ XDG_CURRENT_DESKTOP = "sway";
+ MOZ_ENABLE_WAYLAND = "1";
+ SDL_VIDEODRIVER = "wayland";
+ GDK_BACKEND = "wayland,x11";
+ QT_QPA_PLATFORM = "wayland;xcb";
+ QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
+ _JAVA_AWT_WM_NONREPARENTING = "1";
+ };
+ xresources.properties = {
+ "*background" = "#${colo.background}";
+ "*foreground" = "#${colo.foreground}";
+ "*color0" = "#${colo.color0}";
+ "*color1" = "#${colo.color1}";
+ "*color2" = "#${colo.color2}";
+ "*color3" = "#${colo.color3}";
+ "*color4" = "#${colo.color4}";
+ "*color5" = "#${colo.color5}";
+ "*color6" = "#${colo.color6}";
+ "*color7" = "#${colo.color7}";
+ "*color8" = "#${colo.color8}";
+ "*color9" = "#${colo.color9}";
+ "*color10" = "#${colo.color10}";
+ "*color11" = "#${colo.color11}";
+ "*color12" = "#${colo.color12}";
+ "*color13" = "#${colo.color13}";
+ "*color14" = "#${colo.color14}";
+ "*color15" = "#${colo.color15}";
+ };
+ gtk = let
+ # *_shade_color is adjusted from black by default.
+ extraCss3 = ''
+ @define-color shade_color #${colo.background};
+ @define-color scrollbar_outline_color #${colo.foreground};
+ @define-color window_bg_color #${colo.background};
+ @define-color window_fg_color #${colo.foreground};
+ @define-color view_bg_color #${colo.background};
+ @define-color view_fg_color #${colo.foreground};
+ @define-color accent_bg_color #${colo.color4};
+ @define-color accent_fg_color #${colo.background};
+ @define-color accent_color #${colo.color4};
+ @define-color headerbar_bg_color #${colo.background};
+ @define-color headerbar_fg_color #${colo.foreground};
+ @define-color headerbar_backdrop_color #${colo.background};
+ @define-color headerbar_border_color #${colo.color6};
+ @define-color secondary_headerbar_bg_color #${colo.background};
+ @define-color secondary_headerbar_fg_color #${colo.foreground};
+ @define-color secondary_headerbar_backdrop_color #${colo.background};
+ @define-color secondary_headerbar_border_color #${colo.color5};
+ @define-color thumbnail_bg_color #${colo.background};
+ @define-color thumbnail_fg_color #${colo.foreground};
+ @define-color card_bg_color #${colo.background};
+ @define-color card_fg_color #${colo.foreground};
+ @define-color popover_bg_color #${colo.background};
+ @define-color popover_fg_color #${colo.foreground};
+ @define-color dialog_bg_color #${colo.background};
+ @define-color dialog_fg_color #${colo.foreground};
+ @define-color panel_bg_color #${colo.background};
+ @define-color panel_fg_color #${colo.foreground};
+ @define-color sidebar_bg_color #${colo.background};
+ @define-color sidebar_fg_color #${colo.foreground};
+ @define-color sidebar_backdrop_color #${colo.background};
+ @define-color sidebar_border_color #${colo.color5};
+ @define-color secondary_sidebar_bg_color #${colo.background};
+ @define-color secondary_sidebar_fg_color #${colo.foreground};
+ @define-color secondary_sidebar_backdrop_color #${colo.background};
+ @define-color secondary_sidebar_border_color #${colo.color6};
+ @define-color warning_bg_color #${colo.color4};
+ @define-color warning_fg_color #${colo.foreground};
+ @define-color warning_color #${colo.color4};
+ @define-color error_bg_color #${colo.color3};
+ @define-color error_fg_color #${colo.foreground};
+ @define-color error_color #${colo.color3};
+ @define-color success_bg_color #${colo.color2};
+ @define-color success_fg_color #${colo.background};
+ @define-color success_color #${colo.color2};
+ @define-color destructive_bg_color #${colo.color5};
+ @define-color destructive_fg_color #${colo.background};
+ @define-color destructive_color #${colo.color5};
+ '';
+ extraCss4 = ''
+ '';
+ in {
+ enable = true;
+ theme = {
+ name = "adw-gtk3" + (if colo.lightness == "light" then "" else "-dark");
+ package = pkgs.adw-gtk3;
+ };
+ cursorTheme = {
+ name = "WhiteSur-cursors";
+ };
+ #iconTheme = {
+ # name = "suru";
+ # package = pkgs.ubuntu-themes;
+ #};
+ gtk3.extraCss = extraCss3;
+ gtk4.extraCss = extraCss3;
+ };
+ home.pointerCursor = {
+ name = "WhiteSur-cursors";
+ package = pkgs.whitesur-cursors;
+ };
+ wayland.windowManager.sway = {
+ enable = true;
+ systemd.enable = true;
+ xwayland = true;
+ wrapperFeatures = { base = true; gtk = true; };
+ swaynag = {
+ enable = true;
+ settings = {
+ "<config>" = {
+ edge = "top";
+ font = "${loc.ui-font.name} ${toString loc.ui-font.size}";
+ background = "${colo.background}";
+ border = "${colo.background}";
+ text = "${colo.foreground}";
+ button-text = "${colo.foreground}";
+ button-background = "${colo.color6}";
+ message-padding = 5;
+ border-bottom-size = 1;
+ details-border-size = 1;
+ button-border-size = 1;
+ button-gap = 3;
+ button-dismiss-gap = 7;
+ button-padding = 3;
+ button-margin-right = 5;
+ };
+ };
+ };
+ config = rec {
+ input = {
+ "type:keyboard" = {
+ repeat_rate = "45";
+ repeat_delay = "220";
+ xkb_options = "ctrl:nocaps";
+ };
+ "type:touchpad" = {
+ natural_scroll = "enabled";
+ };
+ "1189:32769:BenQ_ZOWIE_BenQ_ZOWIE_Gaming_Mouse" = {
+ accel_profile = "flat";
+ pointer_accel = "-0.675";
+ scroll_factor = "1.0";
+ };
+ "1241:44368:USB_Gaming_Mouse" = { # Finalmouse Ultralight 2
+ accel_profile = "flat";
+ scroll_factor = "0.75";
+ };
+ "1133:45104:Logi_POP_Mouse" = {
+ accel_profile = "flat";
+ scroll_factor = "0.75";
+ };
+ "1133:50504:Logitech_USB_Receiver_Mouse" = {
+ accel_profile = "flat";
+ scroll_factor = "0.75";
+ };
+ "2362:9488:PixArt_USB_Optical_Mouse" = {
+ accel_profile = "flat";
+ scroll_factor = "0.75";
+ };
+ "1390:268:ELECOM_TrackBall_Mouse_HUGE_TrackBall" = {
+ accel_profile = "flat";
+ scroll_factor = "0.25";
+ scroll_method = "on_button_down";
+ scroll_button = "276";
+ };
+ "1386:890:Wacom_One_by_Wacom_S_Pen" = {
+ map_to_output = loc.monitors.monitor1;
+ left_handed = "enabled";
+ };
+ };
+ modifier = "Mod1";
+ menu = "dmenu-path | bemenu-colored | ${pkgs.findutils}/bin/xargs swaymsg exec --";
+ focus.wrapping = "yes";
+ keybindings = let
+ mod1 = "Mod1";
+ in {
+ "button4" = "nop";
+ "button5" = "nop";
+ "${mod1}+d" = "exec ${menu}";
+ "${mod1}+e" = "exec dmenu-emoji | bemenu-colored | awk '{split($0,a);printf \"%s\", a[1];}' | wl-copy";
+ "${mod1}+q" = "exec screenshot qrcode";
+ "${mod1}+c" = "exec screenshot color";
+ "${mod1}+Shift+q" = "kill";
+ "${mod1}+h" = "focus left";
+ "${mod1}+j" = "focus down";
+ "${mod1}+k" = "focus up";
+ "${mod1}+l" = "focus right";
+ "${mod1}+Shift+h" = "move left";
+ "${mod1}+Shift+j" = "move down";
+ "${mod1}+Shift+k" = "move up";
+ "${mod1}+Shift+l" = "move right";
+ "${mod1}+b" = "split h";
+ "${mod1}+v" = "split v";
+ "${mod1}+f" = "fullscreen toggle";
+ "${mod1}+space" = "floating toggle";
+ "${mod1}+r" = "mode \"resize\"";
+ "${mod1}+Shift+c" = "reload";
+ "${mod1}+Shift+e" = "exec swaynag -m 'Do you really want to exit?' -B 'Yes' 'swaymsg exit'";
+ "Print" = "exec screenshot main";
+ "Shift+Print" = "exec screenshot full";
+ "${mod1}+Shift+s" = "exec screenshot";
+ "${mod1}+s" = "exec wlsunset-toggle";
+ "${mod1}+Shift+t" = "exec swaymsg -- input 1386:890:Wacom_One_by_Wacom_S_Pen events disabled";
+ };
+ modes = {
+ resize = {
+ Escape = "mode default";
+ h = "resize shrink width 1 px";
+ j = "resize grow height 1 px";
+ k = "resize shrink height 1 px";
+ l = "resize grow width 1 px";
+ };
+ };
+ fonts = {
+ names = [ loc.ui-font.name ];
+ style = "Regular";
+ size = loc.ui-font.size + 0.0;
+ };
+ bars = [ ];
+ window = {
+ border = 2;
+ titlebar = false;
+ commands = [
+ { command = "move to scratchpad"; criteria.app_id = "kitty-server"; }
+ { command = "allow_tearing yes"; criteria.app_id = "kitty"; }
+ { command = "inhibit_idle fullscreen; floating enable"; criteria.app_id = "cmv"; }
+ { command = "floating enable"; criteria.class = "cmv.exe"; }
+ { command = "floating enable"; criteria.app_id = "mauri"; }
+ { command = "inhibit_idle fullscreen"; criteria.title = "Parsec"; }
+ { command = "inhibit_idle fullscreen"; criteria.class = "streaming_client"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = "steam_app_.*"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes; floating enable"; criteria.app_id = "gamescope"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = ".gamescope-wrapped"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.app_id = "osu!"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = "cs2"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.class = "Minecraft*"; }
+ { command = "inhibit_idle fullscreen; allow_tearing yes"; criteria.title = "Overwatch"; }
+ { command = "inhibit_idle fullscreen"; criteria.class = "Ryujinx"; }
+ { command = "inhibit_idle fullscreen"; criteria.app_id = "org.yuzu_emu.yuzu"; }
+ { command = "inhibit_idle fullscreen"; criteria.app_id = "info.cemu.Cemu"; }
+ { command = "inhibit_idle fullscreen"; criteria.class = "dolphin-emu"; }
+ { command = "inhibit_idle fullscreen"; criteria.class = "AppRun"; } # Ishiiruka-Dolphin
+ { command = "inhibit_idle fullscreen"; criteria.class = "SuperMeatBoy"; }
+ ];
+ };
+ colors = let
+ bg = "#${colo.background}";
+ fg = "#${colo.foreground}";
+ ch = "#${colo.color4}";
+ urgent = "#${colo.color1}";
+ in {
+ background = bg;
+ focused = { background = bg; border = ch; childBorder = ch; indicator = ch; text = fg; };
+ focusedInactive = { background = bg; border = ch; childBorder = ch; indicator = ch; text = fg; };
+ unfocused = { background = bg; border = bg; childBorder = bg; indicator = bg; text = fg; };
+ urgent = { background = urgent; border = urgent; childBorder = urgent; indicator = urgent; text = fg; };
+ placeholder = { background = bg; border = bg; childBorder = bg; indicator = bg; text = fg; };
+ };
+ startup = let
+ gnome-schema = "org.gnome.desktop.interface";
+ in [
+ { command = "dconf write /org/gnome/desktop/interface/color-scheme \"'prefer-${colo.lightness}'\""; always = true; }
+ { command = "dbus-sway-environment"; }
+ { command = "swaymsg 'seat * hide_cursor 4000'"; always = true; }
+ { command = "kitty -1 --class=\"kitty-server\""; }
+ { command = "wlsunset-toggle"; }
+ ];
+ };
+# extraConfig = ''
+# blur enable
+# blur_passes 4
+# blur_radius 2
+# blur_contrast 1.5
+# blur_saturation 1.1
+# '';
+ };
+ services.swayidle = {
+ enable = true;
+ timeouts = [
+ {
+ timeout = 300;
+ command = "${pkgs.sway}/bin/swaymsg \"output * dpms off\"";
+ resumeCommand = "${pkgs.sway}/bin/swaymsg \"output * dpms on\"";
+ }
+ ];
+ };
+ services.mako = {
+ enable = true;
+ settings = {
+ default-timeout = 14000;
+ font = "${loc.font.name} ${toString loc.ui-font.size}";
+ background-color = "#${colo.background}";
+ text-color = "#${colo.foreground}";
+ border-color = "#${colo.color6}";
+ };
+ };
+ };
+}
diff --git a/nix_archive/nix/programs/waydroid.nix b/nix_archive/nix/programs/waydroid.nix
new file mode 100644
index 0000000..af0c207
--- /dev/null
+++ b/nix_archive/nix/programs/waydroid.nix
@@ -0,0 +1,3 @@
+{ ... }: {
+ virtualisation.waydroid.enable = true;
+}
diff --git a/nix_archive/nix/programs/zsh.nix b/nix_archive/nix/programs/zsh.nix
new file mode 100644
index 0000000..6071429
--- /dev/null
+++ b/nix_archive/nix/programs/zsh.nix
@@ -0,0 +1,76 @@
+{ config, pkgs, ... }: {
+ programs.zsh.enable = true;
+
+ environment.shells = [ pkgs.zsh ];
+ environment.pathsToLink = [ "/share/zsh" ];
+ users.defaultUserShell = pkgs.zsh;
+ environment.sessionVariables = {
+ SHELL = "${pkgs.zsh}/bin/zsh";
+ };
+
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ programs.zsh = {
+ enable = true;
+ shellAliases = {
+ sudo = "nocorrect sudo ";
+ xargs = "nocorrect xargs ";
+ cp = "rsync -avz";
+ top = "htop";
+ bc = "bc -l";
+ pgrep = "pgrep -f";
+ make = "make -j6";
+ diff = "diff -u";
+ gdb = "gdb -q";
+ mail = "neomutt";
+ iroha = "ssh andrew@iroha";
+ moyo = "ssh andrew@moyo";
+ zasshi = "ssh andrew@zasshi";
+ denpa = "ssh moyo -t 'ssh 192.168.122.89'";
+ rod = "ssh -p 1738 rod";
+ bmrg = "ssh boomerang";
+ cmv = "$HOME/c/camu/scripts/cmv.sh";
+ cmv-add = "$HOME/c/camu/scripts/cmv_add.sh";
+ cmv-pause = "cmv-add PAUSE";
+ cmv-next = "cmv-add NEXT";
+ cmv-prev = "cmv-add PREV";
+ cmv-shuffle = "cmv-add SHUFFLE";
+ cmv-sort = "cmv-add SORT";
+ cmv-reverse = "cmv-add REVERSE";
+ cmv-clear = "cmv-add CLEAR";
+ };
+ defaultKeymap = "emacs";
+ history = {
+ save = 10000;
+ size = 10000;
+ append = true;
+ expireDuplicatesFirst = true;
+ extended = true;
+ path = "${homeDir}/.histfile";
+ # Don't share history between sessions.
+ share = false;
+ };
+ # Completion tanks startup performance.
+ enableCompletion = false;
+ zprof.enable = false;
+ initExtra = ''
+ autoload -U colors && colors
+ exit_code_guy()
+ {
+ if [[ $? == 0 ]]; then
+ echo "(・_・) >"
+ else
+ echo "(″ロ゛) > %{$fg[red]%}$?%{$fg[cyan]%}"
+ fi
+ }
+ setopt prompt_subst
+ if [[ -v NIX_SHELL ]]; then
+ PS1="($NIX_SHELL)%{$fg[yellow]%}%n%{$fg[red]%}@%{$fg[light\ red]%}%M%{$fg[cyan]%}:%~\$(exit_code_guy)%{$reset_color%} "
+ else
+ PS1="%{$fg[yellow]%}%n%{$fg[red]%}@%{$fg[light\ red]%}%M%{$fg[cyan]%}:%~\$(exit_code_guy)%{$reset_color%} "
+ fi
+ '';
+ };
+ };
+}
diff --git a/nix_archive/nix/scripts.nix b/nix_archive/nix/scripts.nix
new file mode 100644
index 0000000..2f53a2a
--- /dev/null
+++ b/nix_archive/nix/scripts.nix
@@ -0,0 +1,28 @@
+{ config, lib, pkgs, ... }:
+let
+ loc = config.local;
+ colo = loc.scheme;
+in {
+ environment.etc = {
+ "emoji.json".source = builtins.fetchurl {
+ url = "https://raw.githubusercontent.com/github/gemoji/0eca75db9301421efc8710baf7a7576793ae452a/db/emoji.json";
+ sha256 = "sha256-sXSuKusyG1L2Stuf9BL5ZqfzOIOdeAeE3RXcrXAsLdY=";
+ };
+ };
+ environment.systemPackages = with pkgs; [
+ (writeShellScriptBin "bemenu-colored" ''
+ bemenu -C --single-instance -B 0 -M 0 --hp 6 \
+ --fn "${loc.font.name} ${toString (loc.font.size - 1)}" -H ${toString ((loc.font.size * 2) - 4)} \
+ --cf "#${colo.foreground}" --cb "#${colo.background}" \
+ --hf "#${colo.background}" --hb "#${colo.color4}" \
+ --nf "#${colo.foreground}" --nb "#${colo.background}" \
+ --ff "#${colo.foreground}" --fb "#${colo.background}" \
+ --af "#${colo.foreground}" --ab "#${colo.background}" -p ""
+ '')
+ ] ++ (lib.lists.forEach loc.scripts.imports (x: pkgs.writeTextFile {
+ name = x;
+ text = (builtins.readFile ../../scripts/desktop/${x});
+ executable = true;
+ destination = "/bin/${x}";
+ }));
+}
diff --git a/nix_archive/nix/settings.nix b/nix_archive/nix/settings.nix
new file mode 100644
index 0000000..743529c
--- /dev/null
+++ b/nix_archive/nix/settings.nix
@@ -0,0 +1,8 @@
+{
+ disks = {
+ nfs_options = [ "noatime" "nodiratime" "rw" "bg" "hard" "fsc" "proto=tcp" "timeo=600" "nfsvers=4" "minorversion=2" "x-systemd.automount" "noauto" "x-systemd.idle-timeout=60" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ];
+ hdd_options = [ "noatime" ];
+ cdrom_options = [ "ro" "user" "noauto" "unhide" ];
+ ntfs_options = [ "uid=1000" "gid=100" "rw" "user" "exec" "umask=000" ];
+ };
+}
diff --git a/nix_archive/nix/steam.nix b/nix_archive/nix/steam.nix
new file mode 100644
index 0000000..66d675f
--- /dev/null
+++ b/nix_archive/nix/steam.nix
@@ -0,0 +1,48 @@
+{ config, lib, pkgs, ... }: let
+ loc = config.local;
+in {
+ environment.systemPackages = with pkgs; lib.lists.flatten [
+ (asNeeded "protontricks" ["protontricks" "protontricks-launch"])
+ (writeShellScriptBin "run-steam-gamescope" ''
+ export TTY=/dev/tty4
+ export XDG_VTNR=4
+ cd $HOME
+ exec ${pkgs.kbd}/bin/openvt --switch --login --console 4 -f -- steam-gamescope
+ '')
+ (writeShellScriptBin "proton-env" ''
+ export STEAM_COMPAT_LAUNCHER_SERVICE=proton
+ export DXVK_HUD=compiler
+ export DXVK_LOG_LEVEL=none
+ export DXVK_DEBUG=none
+ export VKD3D_HUD=compiler
+ export VKD3D_CONFIG=dxr
+ export VKD3D_DEBUG=none
+ export VKD3D_SHADER_DEBUG=none
+ export mesa_glthread=true
+ xrandr --output ${loc.monitors.monitor1} --primary
+ exec env --unset=SDL_VIDEODRIVER --unset=SDL_VIDEO_DRIVER MANGOHUD=1 gamemoderun "$@"
+ '')
+ ];
+ programs.steam = {
+ enable = true;
+ gamescopeSession = let
+ width = "2560";
+ height = "1440";
+ in {
+ enable = true;
+ args = [
+ "-W ${width}" "-H ${height}"
+ "-w ${width}" "-h ${height}"
+ "-r 144"
+ "-O ${loc.monitors.monitor1}"
+ "--rt"
+ "-f"
+ "-e"
+ #"-o 10"
+ "--adaptive-sync"
+ #"--force-grab-cursor"
+ "--mangoapp"
+ ];
+ };
+ };
+}
diff --git a/nix_archive/nix/system.nix b/nix_archive/nix/system.nix
new file mode 100644
index 0000000..92b95df
--- /dev/null
+++ b/nix_archive/nix/system.nix
@@ -0,0 +1,134 @@
+{ config, lib, pkgs, ... }: {
+ nix = {
+ settings = {
+ experimental-features = [ "nix-command" "flakes" ];
+ system-features = [ "big-parallel" "kvm" ];
+ auto-optimise-store = true;
+ download-buffer-size = 134217728;
+ };
+ gc.automatic = false;
+ optimise.automatic = true;
+ };
+
+ nixpkgs.config.allowUnfree = true;
+ hardware.enableRedistributableFirmware = true;
+
+ security.pam.loginLimits = [
+ {
+ domain = "*";
+ type = "soft";
+ item = "nice";
+ value = "-11";
+ }
+ {
+ domain = "*";
+ type = "hard";
+ item = "nice";
+ value = "-11";
+ }
+ {
+ domain = "*";
+ type = "soft";
+ item = "rtprio";
+ value = "99";
+ }
+ {
+ domain = "*";
+ type = "hard";
+ item = "rtprio";
+ value = "99";
+ }
+ {
+ domain = "*";
+ type = "soft";
+ item = "nofile";
+ value = "8192";
+ }
+ {
+ domain = "*";
+ type = "hard";
+ item = "nofile";
+ value = "1048576";
+ }
+ {
+ domain = "*";
+ type = "soft";
+ item = "memlock";
+ value = "unlimited";
+ }
+ {
+ domain = "*";
+ type = "hard";
+ item = "memlock";
+ value = "unlimited";
+ }
+ ];
+ #systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 134217728;
+
+ security.wrappers = {
+ ping = {
+ owner = "root";
+ group = "root";
+ source = "${pkgs.iputils.out}/bin/ping";
+ capabilities = "cap_net_raw+p";
+ };
+ };
+
+ hardware.graphics = {
+ enable = true;
+ extraPackages = with pkgs; [
+ libvdpau-va-gl
+ vaapiVdpau
+ ];
+ };
+
+ environment.systemPackages = with pkgs; [
+ git # flakes
+ appimage-run
+ i2c-tools
+ pciutils
+ smartmontools
+ lm_sensors
+ libdrm
+ libva-utils
+ vulkan-loader
+ vulkan-validation-layers
+ vulkan-tools
+ mesa-demos
+ ];
+
+ boot.binfmt.registrations.appimage = {
+ wrapInterpreterInShell = false;
+ interpreter = "${pkgs.appimage-run}/bin/appimage-run";
+ recognitionType = "magic";
+ offset = 0;
+ mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
+ magicOrExtension = ''\x7fELF....AI\x02'';
+ };
+
+ services.openssh.enable = true;
+
+ time.timeZone = "America/New_York";
+ i18n.defaultLocale = "en_US.UTF-8";
+ i18n.supportedLocales = [
+ "C.UTF-8/UTF-8"
+ "${config.i18n.defaultLocale}/UTF-8"
+ "ja_JP.UTF-8/UTF-8"
+ "ko_KR.UTF-8/UTF-8"
+ ];
+ i18n.glibcLocales = pkgs.glibcLocales.override {
+ allLocales = false;
+ locales = [
+ "C.UTF-8/UTF-8"
+ "${config.i18n.defaultLocale}/UTF-8"
+ "ja_JP.UTF-8/UTF-8"
+ "ko_KR.UTF-8/UTF-8"
+ ];
+ };
+
+ console = {
+ font = "Lat2-Terminus16";
+ keyMap = "us";
+ useXkbConfig = false;
+ };
+}
diff --git a/nix_archive/nix/user.nix b/nix_archive/nix/user.nix
new file mode 100644
index 0000000..817d36e
--- /dev/null
+++ b/nix_archive/nix/user.nix
@@ -0,0 +1,211 @@
+{ config, lib, pkgs, ... }: let
+ loc = config.local;
+ colo = loc.scheme;
+in {
+ users.users.andrew = {
+ isNormalUser = true;
+ uid = 1000;
+ extraGroups = [ "wheel" "input" "audio" "video" "render" "disk" "cdrom" ];
+ };
+ nix.settings.trusted-users = [ "andrew" ];
+
+ documentation = {
+ enable = true;
+ man.enable = true;
+ dev.enable = true;
+ };
+
+ fonts = {
+ fontDir.enable = true;
+ packages = with pkgs; [
+ local-fonts
+ vistafonts
+ noto-fonts
+ noto-fonts-extra
+ noto-fonts-cjk-sans
+ noto-fonts-cjk-serif
+ noto-fonts-emoji-blob-bin
+ mplus-outline-fonts.osdnRelease
+ intel-one-mono
+ nanum-gothic-coding
+ iosevka-comfy.comfy
+ dina-font
+ freefont_ttf # FreeMono
+ ];
+ fontconfig = {
+ enable = true;
+ includeUserConf = false;
+ allowBitmaps = true;
+ cache32Bit = true;
+ antialias = true;
+ hinting = {
+ enable = false;
+ style = "slight";
+ };
+ subpixel = {
+ rgba = "rgb";
+ lcdfilter = "light";
+ };
+ defaultFonts = {
+ serif = [ loc.ui-font.name ];
+ sansSerif = [ loc.ui-font.name ];
+ monospace = [ loc.font.name ];
+ emoji = [ loc.emoji-font.name ];
+ };
+ };
+ };
+
+ environment.systemPackages = with pkgs; lib.lists.flatten [
+ man-pages
+ man-pages-posix
+ home-manager
+ mercurial
+ file
+ bc
+ screen
+ loccount
+ (aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]))
+ rsync
+ (python3.withPackages (python-pkgs: [ python-pkgs.requests python-pkgs.beautifulsoup4 ]))
+ htop
+ neofetch
+ ufetch
+ (asNeeded "cmatrix" ["cmatrix"])
+ hdparm
+ #dcfldd
+ ddrescue
+ cdrtools
+ usbutils
+ cryptsetup
+ (asNeeded "nix-index" ["nix-channel-index" "nix-index" "nix-locate"])
+ imagemagick
+ pngcheck
+ (asNeeded "optipng" ["optipng"])
+ (asNeeded "dmtx-utils" ["dmtxquery" "dmtxread" "dmtxwrite"])
+ (asNeeded "zbar" ["zbarcam" "zbarcam-gtk" "zbarcam-qt" "zbarimg"])
+ perlPackages.ArchiveZip # For crc32.
+ b3sum
+ libfaketime
+ cpulimit
+ dos2unix
+ socat
+ curl
+ (asNeeded "httrack" ["htsserver" "httrack" "proxytrack" "webhttrack"])
+ libuchardet
+ (unzip.override { enableNLS = true; })
+ rar
+ unrar
+ p7zip
+ rclone
+ ffmpeg-headless
+ xdg-utils
+ jq
+ when
+ evtest
+ linuxConsoleTools
+ wev
+ gcr
+ pass
+ zenity
+ ];
+
+ local.scripts.imports = [
+ "install-as-needed"
+ "cpu-vulns"
+ "sp" # spell
+ "ts-date"
+ "term-font-size"
+ "shift-jis-zip"
+ "7z-password"
+ "moonrune-charset-utf8"
+ "gpg-pubkey"
+ "img-fstype"
+ "mount-nfs"
+ "rewrite-git"
+ "xbox360-ffmpeg-enc"
+ ];
+
+ programs.screen = {
+ enable = true;
+ screenrc = ''
+ termcapinfo xterm* ti@:te@
+ defscrollback 10000
+ startup_message off
+ '';
+ };
+
+ programs.mtr.enable = true;
+ services.gnome.gnome-keyring.enable = false;
+ programs.gnupg.agent = {
+ enable = true;
+ pinentryPackage = pkgs.pinentry-gnome3;
+ enableSSHSupport = true;
+ settings = {
+ default-cache-ttl = 28800;
+ max-cache-ttl = 28800;
+ };
+ };
+ programs.ssh = {
+ extraConfig = "AddKeysToAgent yes";
+ };
+
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ home.username = "andrew";
+ xdg.userDirs = {
+ enable = true;
+ desktop = "${homeDir}/tmp";
+ documents = "${homeDir}/docs";
+ download = "${homeDir}/dl";
+ music = "${homeDir}/tmp";
+ pictures = "${homeDir}/pics";
+ publicShare = "${homeDir}/tmp";
+ templates = "${homeDir}/tmp";
+ videos = "${homeDir}/dl/mp4";
+ };
+ home.sessionVariables = {
+ GOPATH = "${homeDir}/tmp/go";
+ };
+ programs.git = {
+ enable = true;
+ userEmail = "andrew@akon.city";
+ userName = "Andrew Opalach";
+ signing = {
+ key = "99659CB58598BDDB"; # The last digits of the key.
+ signByDefault = true;
+ };
+ extraConfig = {
+ format.signOff = true;
+ init.defaultBranch = "master";
+ };
+ };
+ home.file.".config/gdb/gdbinit".source = ../../files/gdbinit;
+ home.file.".config/colors.json".text = ''
+ {
+ "special": {
+ "background": "${colo.background}",
+ "foreground": "${colo.foreground}"
+ },
+ "colors": {
+ "color0": "${colo.color0}",
+ "color1": "${colo.color1}",
+ "color2": "${colo.color2}",
+ "color3": "${colo.color3}",
+ "color4": "${colo.color4}",
+ "color5": "${colo.color5}",
+ "color6": "${colo.color6}",
+ "color7": "${colo.color7}",
+ "color8": "${colo.color8}",
+ "color9": "${colo.color9}",
+ "color10": "${colo.color10}",
+ "color11": "${colo.color11}",
+ "color12": "${colo.color12}",
+ "color13": "${colo.color13}",
+ "color14": "${colo.color14}",
+ "color15": "${colo.color15}"
+ }
+ }
+ '';
+ };
+}
diff --git a/nix_archive/nix/virtualisation.nix b/nix_archive/nix/virtualisation.nix
new file mode 100644
index 0000000..bc6a6c0
--- /dev/null
+++ b/nix_archive/nix/virtualisation.nix
@@ -0,0 +1,15 @@
+{ pkgs, ... }: {
+ users.users.andrew.extraGroups = [ "libvirtd" "kvm" ];
+ virtualisation.libvirtd.enable = true;
+ programs.virt-manager.enable = true;
+ virtualisation.spiceUSBRedirection.enable = true;
+ environment.systemPackages = with pkgs; [
+ virt-manager
+ OVMF
+ spice-gtk
+ looking-glass-client
+ ];
+ local.scripts.imports = [
+ "looking-glass"
+ ];
+}
diff --git a/nix_archive/nix/x86.nix b/nix_archive/nix/x86.nix
new file mode 100644
index 0000000..a8ebdd1
--- /dev/null
+++ b/nix_archive/nix/x86.nix
@@ -0,0 +1,3 @@
+{ ... }: {
+ hardware.graphics.enable32Bit = true;
+}
diff --git a/nix_archive/nixpkgs-patches/.gitignore b/nix_archive/nixpkgs-patches/.gitignore
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/nix_archive/nixpkgs-patches/.gitignore
diff --git a/nix_archive/port-forward b/nix_archive/port-forward
new file mode 100755
index 0000000..f1965a6
--- /dev/null
+++ b/nix_archive/port-forward
@@ -0,0 +1,33 @@
+#! /usr/bin/env sh
+
+if [ "$(id -u)" -ne 0 ]; then
+ echo 'This script must be run by root.' >&2
+ exit 1
+fi
+
+# Sunshine
+#iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.251:47984 || \
+# iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.251:47984
+#
+#iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.251:47984 || \
+# iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.251:47984
+#
+#iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47989 -j DNAT --to-destination 192.168.211.251:47989 || \
+# iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47989 -j DNAT --to-destination 192.168.211.251:47989
+#
+#iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 48010 -j DNAT --to-destination 192.168.211.251:48010 || \
+# iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 48010 -j DNAT --to-destination 192.168.211.251:48010
+#
+#iptables -t nat -C PREROUTING -p udp -i enp7s0 --dport 47998:48000 -j DNAT --to-destination 192.168.211.251:47998-48000 || \
+# iptables -t nat -A PREROUTING -p udp -i enp7s0 --dport 47998:48000 -j DNAT --to-destination 192.168.211.251:47998-48000
+
+# KDEConnect
+iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.251:1714-1764 || \
+ iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.251:1714-1764
+
+iptables -t nat -C PREROUTING -p udp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.251:1714-1764 || \
+ iptables -t nat -A PREROUTING -p udp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.251:1714-1764
+
+# Delete KDEConnect
+#iptables -t nat -D PREROUTING -p tcp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.252:1714-1764
+#iptables -t nat -D PREROUTING -p udp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.252:1714-1764
diff --git a/nix_archive/themes/year_of_snake/snake.nix b/nix_archive/themes/year_of_snake/snake.nix
new file mode 100644
index 0000000..a764487
--- /dev/null
+++ b/nix_archive/themes/year_of_snake/snake.nix
@@ -0,0 +1,23 @@
+rec {
+ lightness = "dark";
+ background = "2d1a1a"; #2d1a1a
+ background-alt = "2d1a1a"; #2d1a1a
+ foreground = "ffffff"; #ffffff
+ color0 = "${background}";
+ color1 = "7b3837"; #7b3837
+ color2 = "f3eff0"; #f3eff0
+ color3 = "9e4746"; #9e4746
+ color4 = "e5d6cf"; #e5d6cf
+ color5 = "f2d7b9"; #f2d7b9
+ color6 = "f5c4a4"; #f5c4a4
+ color7 = "${foreground}";
+ color8 = "${color6}";
+ color9 = "${color1}";
+ color10 = "${color2}";
+ color11 = "${color3}";
+ color12 = "${color4}";
+ color13 = "${color5}";
+ color14 = "${color6}";
+ color15 = "${color7}";
+ alpha = 0.985;
+}
diff --git a/nix_archive/themes/year_of_snake/splash.kra b/nix_archive/themes/year_of_snake/splash.kra
new file mode 100644
index 0000000..8f94fa2
--- /dev/null
+++ b/nix_archive/themes/year_of_snake/splash.kra
Binary files differ
diff --git a/nix_archive/themes/year_of_snake/splash.png b/nix_archive/themes/year_of_snake/splash.png
new file mode 100644
index 0000000..bedee26
--- /dev/null
+++ b/nix_archive/themes/year_of_snake/splash.png
Binary files differ
diff --git a/nix_archive/themes/year_of_snake/wallpaper.kra b/nix_archive/themes/year_of_snake/wallpaper.kra
new file mode 100644
index 0000000..5503f36
--- /dev/null
+++ b/nix_archive/themes/year_of_snake/wallpaper.kra
Binary files differ
diff --git a/nix_archive/themes/year_of_snake/wallpaper.png b/nix_archive/themes/year_of_snake/wallpaper.png
new file mode 100644
index 0000000..df88d73
--- /dev/null
+++ b/nix_archive/themes/year_of_snake/wallpaper.png
Binary files differ