update to NixOS 24.11
This commit is contained in:
parent
cf0c23f54f
commit
9b0219959b
@ -23,8 +23,8 @@
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
nixpkgs.source = builtins.fetchTarball
|
||||
{ url = "https://github.com/NixOS/nixpkgs/archive/c505ebf77752.tar.gz";
|
||||
sha256 = "0sk76hr3l7gd85aa3j9y5j1napvx18xb762fdqz3ibf717s8br5g";
|
||||
{ url = "https://github.com/NixOS/nixpkgs/archive/3f0a8ac25fb6.tar.gz";
|
||||
sha256 = "10i7fllqjzq171afzhdf2d9r1pk9irvmq5n55h92rc47vlaabvr4";
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
@ -68,7 +68,7 @@
|
||||
usePredictableInterfaceNames = false;
|
||||
nameservers = [ "127.0.0.1" ];
|
||||
|
||||
# ensure hostname work without DNS
|
||||
# ensure hostname works without DNS
|
||||
hosts = with config.var;
|
||||
{ ${ipv4LanAddress} = [ hostname ];
|
||||
${ipv6Address} = [ hostname ];
|
||||
@ -186,6 +186,14 @@
|
||||
users.groups."eurofusion-eu".members = [ "nginx" ];
|
||||
|
||||
|
||||
# sensible logging
|
||||
services.journald = {
|
||||
storage = "volatile";
|
||||
extraConfig = ''
|
||||
RuntimeMaxUse=2G
|
||||
'';
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "no";
|
||||
@ -482,47 +490,6 @@
|
||||
relay.onionServices.emergency-access.map = [ 22 ];
|
||||
};
|
||||
|
||||
### Program configuration
|
||||
programs = {
|
||||
fuse.userAllowOther = true;
|
||||
fish.enable = true;
|
||||
tmux = {
|
||||
enable = true;
|
||||
newSession = true;
|
||||
baseIndex = 1;
|
||||
escapeTime = 0;
|
||||
historyLimit = 4096;
|
||||
keyMode = "vi";
|
||||
terminal = "screen-256color";
|
||||
customPaneNavigationAndResize = true;
|
||||
extraConfig = ''
|
||||
set -g mouse on
|
||||
|
||||
# bindings
|
||||
bind | split-window -h
|
||||
bind - split-window -v
|
||||
bind : command-prompt
|
||||
bind -n C-k clear-history
|
||||
|
||||
# colors
|
||||
set -g pane-border-style fg=brightblack
|
||||
set -g pane-active-border fg=green
|
||||
set -g message-style fg=white,bg=black
|
||||
set -g status-style fg=brightblue,bg=black
|
||||
setw -g mode-style fg=black,bg=cyan
|
||||
|
||||
# status line
|
||||
set -g status on
|
||||
set -g status-justify left
|
||||
set -g status-left ""
|
||||
set -g status-right-length 60
|
||||
set -g status-right '#[fg=yellow]#(cut -d\ -f 1-3 /proc/loadavg) | #[fg=brightgreen]%a %H:%M'
|
||||
setw -g window-status-format "#[fg=black#,bg=brightblack] #I #[fg=blue#,bg=black] #W "
|
||||
setw -g window-status-current-format "#[fg=white#,bg=cyan] #I #[fg=black#,bg=brightblack] #W "
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
# Can connect to the Nix daemon
|
||||
# and upload/run code as root!
|
||||
|
@ -3,8 +3,8 @@
|
||||
{
|
||||
imports = [
|
||||
(builtins.fetchTarball {
|
||||
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-24.05/nixos-mailserver-nixos-24.05.tar.gz";
|
||||
sha256 = "0clvw4622mqzk1aqw1qn6shl9pai097q62mq1ibzscnjayhp278b";
|
||||
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-24.05/nixos-mailserver-nixos-24.11.tar.gz";
|
||||
sha256 = "08zdidja5kdqgskynxsmcd8skh1b7cfl9ijjy9pak4b5h3aw2iqv";
|
||||
})
|
||||
];
|
||||
|
||||
|
2
fish.nix
2
fish.nix
@ -1,6 +1,8 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.fish.enable = true;
|
||||
|
||||
programs.fish.shellAbbrs =
|
||||
{ e = "nvim";
|
||||
l = "ls -lh";
|
||||
|
@ -96,10 +96,6 @@ in
|
||||
event_cache_size = "2K";
|
||||
max_upload_size = "1000M";
|
||||
dynamic_thumbnails = true;
|
||||
|
||||
# bridges configuration
|
||||
app_service_config_files =
|
||||
[ "/var/lib/mautrix-whatsapp/whatsapp-registration.yaml" ];
|
||||
};
|
||||
|
||||
# Secrets
|
||||
@ -161,10 +157,6 @@ in
|
||||
relay.enabled = false;
|
||||
mute_bridging = true;
|
||||
};
|
||||
settings.whatsapp =
|
||||
{ os_name = "Chrome (Linux)";
|
||||
browser_name = "chrome";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
89
neovim.nix
89
neovim.nix
@ -15,12 +15,13 @@ let
|
||||
frameline nvim-fzf
|
||||
|
||||
# Syntax
|
||||
playground
|
||||
vim-pandoc-syntax
|
||||
nix-queries fortran-queries
|
||||
(nvim-treesitter.withPlugins (p: with p;
|
||||
[ bash fish
|
||||
c haskell
|
||||
html css markdown
|
||||
c fortran haskell
|
||||
html css
|
||||
nix python lua
|
||||
]))
|
||||
|
||||
@ -47,26 +48,16 @@ let
|
||||
''
|
||||
;; extends
|
||||
|
||||
; /*language*/ highlight (too slow)
|
||||
; ((comment) @language
|
||||
; [
|
||||
; (string_expression (string_fragment) @content)
|
||||
; (indented_string_expression (string_fragment) @content)
|
||||
; ]
|
||||
; (#gsub! @language "/%*%s*([%w%p]+)%s*%*/" "%1"))
|
||||
; @combined
|
||||
|
||||
; writeText highlight
|
||||
(apply_expression
|
||||
function:
|
||||
(apply_expression
|
||||
function: (_) @_func
|
||||
argument: (string_expression (string_fragment) @language))
|
||||
argument: [(string_expression (string_fragment) @content)
|
||||
(indented_string_expression (string_fragment) @content)]
|
||||
(apply_expression function:
|
||||
(apply_expression function: (_) @_func
|
||||
argument: (string_expression (string_fragment) @injection.language))
|
||||
argument: [
|
||||
(string_expression (string_fragment) @injection.content)
|
||||
(indented_string_expression (string_fragment) @injection.content)]
|
||||
(#match? @_func "(^|\\.)writeText(Dir)?$")
|
||||
(#gsub! @language ".*%.(.*)" "%1"))
|
||||
@combined
|
||||
(#gsub! @injection.language ".*%.(.*)" "%1")
|
||||
(#set! injection.combined))
|
||||
'';
|
||||
|
||||
fortran-queries = pkgs.writeTextDir "/queries/fortran/highlights.scm"
|
||||
@ -103,6 +94,7 @@ let
|
||||
opt.ignorecase = true -- Case insensitive search...
|
||||
opt.smartcase = true -- ...for lowercase terms
|
||||
opt.splitkeep = 'screen' -- keep text still when splitting
|
||||
opt.laststatus = 3 -- global statusline
|
||||
|
||||
opt.fsync = true -- Sync writes
|
||||
opt.swapfile = false -- Disable swap files
|
||||
@ -143,28 +135,20 @@ let
|
||||
opt.foldopen:remove("search") -- don't open when searching
|
||||
|
||||
--
|
||||
-- OSC 52 clipboard
|
||||
--
|
||||
-- OSC 52 clipboard for SSH
|
||||
--
|
||||
|
||||
if os.getenv('DISPLAY') == nil then
|
||||
function copy(sel)
|
||||
return function(lines, _)
|
||||
local data = vim.fn.system([[base64 -w0]], lines)
|
||||
io.stdout:write('\027]52;'..sel..';'..data..'\a')
|
||||
vim.g.fallback_clip = lines
|
||||
end
|
||||
end
|
||||
|
||||
function paste(sel)
|
||||
-- currently impossible to implement
|
||||
return function() return {vim.g.fallback_clip, ""} end
|
||||
end
|
||||
|
||||
if os.getenv('SSH_TTY') ~= nil then
|
||||
vim.g.clipboard = {
|
||||
name='ssh',
|
||||
copy={['*']=copy's', ['+']=copy'c'},
|
||||
paste={['*']=paste's', ['+']=paste'c'},
|
||||
name = 'OSC 52',
|
||||
copy = {
|
||||
['+'] = require('vim.ui.clipboard.osc52').copy('+'),
|
||||
['*'] = require('vim.ui.clipboard.osc52').copy('*'),
|
||||
},
|
||||
paste = {
|
||||
['+'] = require('vim.ui.clipboard.osc52').paste('+'),
|
||||
['*'] = require('vim.ui.clipboard.osc52').paste('*'),
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
@ -174,8 +158,8 @@ let
|
||||
|
||||
-- Hide some UI elements
|
||||
autocmd('TermOpen', {pattern='*', command='setlocal nonumber'})
|
||||
autocmd('TermEnter', {pattern='*', command='set noshowcmd'})
|
||||
autocmd('TermLeave', {pattern='*', command='set showcmd'})
|
||||
autocmd('TermEnter', {pattern='*', command='set cmdheight=0 laststatus=0'})
|
||||
autocmd('TermLeave', {pattern='*', command='set cmdheight=1 laststatus=3'})
|
||||
autocmd('VimResized', {pattern='*', command='wincmd ='})
|
||||
|
||||
-- Exit without confirmation
|
||||
@ -187,6 +171,10 @@ let
|
||||
keymap('n', '<C-w>|', ':vsplit +term<CR>', {silent=true}) --
|
||||
keymap('n', '<C-w>t', ':tabnew +term<CR>', {silent=true}) --
|
||||
keymap('n', '<C-w>c', ':quit<CR>', {silent=true}) --
|
||||
keymap('n', '<M-h>', '<C-w>h', {noremap=true}) --
|
||||
keymap('n', '<M-j>', '<C-w>j', {noremap=true}) --
|
||||
keymap('n', '<M-k>', '<C-w>k', {noremap=true}) --
|
||||
keymap('n', '<M-l>', '<C-w>l', {noremap=true}) --
|
||||
|
||||
--
|
||||
-- Keybindings
|
||||
@ -280,6 +268,7 @@ let
|
||||
color('FoldColumn', {ctermfg='none', cterm={}})
|
||||
color('Visual', {ctermfg='none', ctermbg=0})
|
||||
color('Search', {ctermfg='none', ctermbg=0})
|
||||
color('CurSearch', {ctermfg='none', ctermbg=0})
|
||||
|
||||
-- Diff mode
|
||||
color('DiffAdd', {ctermfg=2, ctermbg=0, underline=true})
|
||||
@ -298,9 +287,9 @@ let
|
||||
|
||||
-- Git signs
|
||||
color('SignColumn', {ctermfg=1, ctermbg='none', cterm={}})
|
||||
color('GitAdd', {ctermfg=2})
|
||||
color('GitChange', {ctermfg=3})
|
||||
color('GitDelete', {ctermfg=1})
|
||||
color('GitSignsAdd', {ctermfg=2})
|
||||
color('GitSignsChange', {ctermfg=3})
|
||||
color('GitSignsDelete', {ctermfg=1})
|
||||
|
||||
-- Statusline
|
||||
color('StatusLine', {ctermfg=8, ctermbg=0, cterm={}})
|
||||
@ -334,16 +323,16 @@ let
|
||||
|
||||
-- Pandoc Markdown
|
||||
autocmd({'BufNewFile', 'BufFilePre', 'BufRead'},
|
||||
{pattern='*.md', command='set filetype=markdown.pandoc'})
|
||||
{pattern='*.md', command='set filetype=markdown.pandoc | TSBufDisable highlight'})
|
||||
|
||||
-- Git signs
|
||||
gitsigns = require'gitsigns'
|
||||
gitsigns.setup{signs={
|
||||
add = {hl='GitAdd' , text='+'},
|
||||
change = {hl='GitChange', text='δ'},
|
||||
delete = {hl='GitDelete', text='-'},
|
||||
topdelete = {hl='GitDelete', text='‾'},
|
||||
changedelete = {hl='GitChange', text='~'}}
|
||||
add = {text='+'},
|
||||
change = {text='δ'},
|
||||
delete = {text='-'},
|
||||
topdelete = {text='‾'},
|
||||
changedelete = {text='~'}}
|
||||
}
|
||||
keymap('n', '<leader>gb', function() gitsigns.blame_line{full=true} end, {silent=true})
|
||||
keymap('n', '<leader>gp', function() gitsigns.preview_hunk() end, {silent=true})
|
||||
|
@ -10,9 +10,8 @@
|
||||
};
|
||||
|
||||
haskellPackages = super.haskellPackages.extend (hself: hsuper:
|
||||
{ breve = hself.callCabal2nix "breve" (builtins.fetchTarball
|
||||
{ url = "https://hackage.haskell.org/package/breve-0.5.1.0/breve-0.5.1.0.tar.gz";
|
||||
}) {};
|
||||
{ breve = super.haskell.lib.overrideCabal hsuper.breve
|
||||
(old: { broken = false; });
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user