update to NixOS 23.11

This commit is contained in:
Michele Guerini Rocco 2023-12-15 00:26:06 +01:00
parent 20455180f9
commit 92c82ca8c6
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450
4 changed files with 36 additions and 22 deletions

View File

@ -76,7 +76,7 @@
users.users ={ users.users ={
# Only needed for local (read emergency) shell access # Only needed for local (read emergency) shell access
root.passwordFile = config.secrets.passwords.root; root.hashedPasswordFile = config.secrets.passwords.root;
# Admin # Admin
rnhmjoj = { rnhmjoj = {

View File

@ -55,6 +55,8 @@ with lib;
''; '';
}; };
system.fsPackages = [ pkgs.nfs-utils ];
systemd.mounts = lib.singleton systemd.mounts = lib.singleton
{ {
description = "backup NFS volume"; description = "backup NFS volume";

View File

@ -16,9 +16,10 @@ let
# Syntax # Syntax
vim-pandoc-syntax vim-pandoc-syntax
nix-queries nix-queries fortran-queries
(nvim-treesitter.withPlugins (p: with p; (nvim-treesitter.withPlugins (p: with p;
[ bash fish [ bash fish
fortran haskell
html css markdown html css markdown
nix python nix python
])) ]))
@ -44,6 +45,8 @@ let
nix-queries = pkgs.writeTextDir "/queries/nix/injections.scm" nix-queries = pkgs.writeTextDir "/queries/nix/injections.scm"
'' ''
;; extends
; /*language*/ highlight (too slow) ; /*language*/ highlight (too slow)
; ((comment) @language ; ((comment) @language
; [ ; [
@ -66,6 +69,14 @@ let
@combined @combined
''; '';
fortran-queries = pkgs.writeTextDir "/queries/fortran/highlights.scm"
''
;; extends
(end_block_construct_statement) @keyword
(implicit_statement) @keyword
'';
conf = pkgs.writeText "init.lua" '' conf = pkgs.writeText "init.lua" ''
local opt = vim.opt local opt = vim.opt
local cmd = vim.api.nvim_command local cmd = vim.api.nvim_command
@ -91,6 +102,7 @@ let
opt.mouse = 'a' -- Enable mouse support opt.mouse = 'a' -- Enable mouse support
opt.ignorecase = true -- Case insensitive search... opt.ignorecase = true -- Case insensitive search...
opt.smartcase = true -- ...for lowercase terms opt.smartcase = true -- ...for lowercase terms
opt.splitkeep = 'screen' -- keep text still when splitting
opt.fsync = true -- Sync writes opt.fsync = true -- Sync writes
opt.swapfile = false -- Disable swap files opt.swapfile = false -- Disable swap files
@ -163,6 +175,7 @@ let
autocmd('TermOpen', {pattern='*', command='setlocal nonumber'}) autocmd('TermOpen', {pattern='*', command='setlocal nonumber'})
autocmd('TermEnter', {pattern='*', command='set noshowcmd'}) autocmd('TermEnter', {pattern='*', command='set noshowcmd'})
autocmd('TermLeave', {pattern='*', command='set showcmd'}) autocmd('TermLeave', {pattern='*', command='set showcmd'})
autocmd('VimResized', {pattern='*', command='wincmd ='})
-- Exit without confirmation -- Exit without confirmation
autocmd('TermClose', {pattern='*', command='call feedkeys("\\<CR>")'}) autocmd('TermClose', {pattern='*', command='call feedkeys("\\<CR>")'})
@ -315,25 +328,24 @@ let
vim.g.neomake_error_sign = {text='E', texthl='ErrorMsg'} vim.g.neomake_error_sign = {text='E', texthl='ErrorMsg'}
vim.g.neomake_highlight_lines = 1 vim.g.neomake_highlight_lines = 1
vim.g.neomake_virtualtext_current_error = 0 vim.g.neomake_virtualtext_current_error = 0
vim.g.neomake_fortran_gfortran_args =
{'-fsyntax-only', '-Wall', '-Wextra', '-Jbuild/obj'}
-- Pandoc Markdown -- Pandoc Markdown
autocmd({'BufNewFile', 'BufFilePre', 'BufRead'}, autocmd({'BufNewFile', 'BufFilePre', 'BufRead'},
{pattern='*.md', command='set filetype=markdown.pandoc'}) {pattern='*.md', command='set filetype=markdown.pandoc'})
-- Git signs -- Git signs
require'gitsigns'.setup{ gitsigns = require'gitsigns'
signs={ gitsigns.setup{signs={
add = {hl='GitAdd' , text='+'}, add = {hl='GitAdd' , text='+'},
change = {hl='GitChange', text='δ'}, change = {hl='GitChange', text='δ'},
delete = {hl='GitDelete', text='-'}, delete = {hl='GitDelete', text='-'},
topdelete = {hl='GitDelete', text=''}, topdelete = {hl='GitDelete', text=''},
changedelete = {hl='GitChange', text='~'}, changedelete = {hl='GitChange', text='~'}}
},
keymaps={
['n <leader>gb'] = ':lua require"gitsigns".blame_line(true)<CR>',
['n <leader>gp'] = ':lua require"gitsigns".preview_hunk()<CR>',
}
} }
keymap('n', '<leader>gb', function() gitsigns.blame_line{full=true} end, {silent=true})
keymap('n', '<leader>gp', function() gitsigns.preview_hunk() end, {silent=true})
-- Tree-sitter -- Tree-sitter
require'nvim-treesitter.configs'.setup{ require'nvim-treesitter.configs'.setup{

View File

@ -26,7 +26,7 @@
smartmontools smartmontools
# namecoin # namecoin
namecoin haskellPackages.rosa namecoind haskellPackages.rosa
]; ];
} }