update to NixOS 24.11
This commit is contained in:
parent
cf0c23f54f
commit
9b0219959b
@ -23,8 +23,8 @@
|
|||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
nixpkgs.source = builtins.fetchTarball
|
nixpkgs.source = builtins.fetchTarball
|
||||||
{ url = "https://github.com/NixOS/nixpkgs/archive/c505ebf77752.tar.gz";
|
{ url = "https://github.com/NixOS/nixpkgs/archive/3f0a8ac25fb6.tar.gz";
|
||||||
sha256 = "0sk76hr3l7gd85aa3j9y5j1napvx18xb762fdqz3ibf717s8br5g";
|
sha256 = "10i7fllqjzq171afzhdf2d9r1pk9irvmq5n55h92rc47vlaabvr4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
@ -68,7 +68,7 @@
|
|||||||
usePredictableInterfaceNames = false;
|
usePredictableInterfaceNames = false;
|
||||||
nameservers = [ "127.0.0.1" ];
|
nameservers = [ "127.0.0.1" ];
|
||||||
|
|
||||||
# ensure hostname work without DNS
|
# ensure hostname works without DNS
|
||||||
hosts = with config.var;
|
hosts = with config.var;
|
||||||
{ ${ipv4LanAddress} = [ hostname ];
|
{ ${ipv4LanAddress} = [ hostname ];
|
||||||
${ipv6Address} = [ hostname ];
|
${ipv6Address} = [ hostname ];
|
||||||
@ -186,6 +186,14 @@
|
|||||||
users.groups."eurofusion-eu".members = [ "nginx" ];
|
users.groups."eurofusion-eu".members = [ "nginx" ];
|
||||||
|
|
||||||
|
|
||||||
|
# sensible logging
|
||||||
|
services.journald = {
|
||||||
|
storage = "volatile";
|
||||||
|
extraConfig = ''
|
||||||
|
RuntimeMaxUse=2G
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PermitRootLogin = "no";
|
settings.PermitRootLogin = "no";
|
||||||
@ -482,47 +490,6 @@
|
|||||||
relay.onionServices.emergency-access.map = [ 22 ];
|
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 = {
|
nix.settings = {
|
||||||
# Can connect to the Nix daemon
|
# Can connect to the Nix daemon
|
||||||
# and upload/run code as root!
|
# and upload/run code as root!
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(builtins.fetchTarball {
|
(builtins.fetchTarball {
|
||||||
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-24.05/nixos-mailserver-nixos-24.05.tar.gz";
|
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-24.05/nixos-mailserver-nixos-24.11.tar.gz";
|
||||||
sha256 = "0clvw4622mqzk1aqw1qn6shl9pai097q62mq1ibzscnjayhp278b";
|
sha256 = "08zdidja5kdqgskynxsmcd8skh1b7cfl9ijjy9pak4b5h3aw2iqv";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
2
fish.nix
2
fish.nix
@ -1,6 +1,8 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
programs.fish.shellAbbrs =
|
programs.fish.shellAbbrs =
|
||||||
{ e = "nvim";
|
{ e = "nvim";
|
||||||
l = "ls -lh";
|
l = "ls -lh";
|
||||||
|
@ -96,10 +96,6 @@ in
|
|||||||
event_cache_size = "2K";
|
event_cache_size = "2K";
|
||||||
max_upload_size = "1000M";
|
max_upload_size = "1000M";
|
||||||
dynamic_thumbnails = true;
|
dynamic_thumbnails = true;
|
||||||
|
|
||||||
# bridges configuration
|
|
||||||
app_service_config_files =
|
|
||||||
[ "/var/lib/mautrix-whatsapp/whatsapp-registration.yaml" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Secrets
|
# Secrets
|
||||||
@ -161,10 +157,6 @@ in
|
|||||||
relay.enabled = false;
|
relay.enabled = false;
|
||||||
mute_bridging = true;
|
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
|
frameline nvim-fzf
|
||||||
|
|
||||||
# Syntax
|
# Syntax
|
||||||
|
playground
|
||||||
vim-pandoc-syntax
|
vim-pandoc-syntax
|
||||||
nix-queries fortran-queries
|
nix-queries fortran-queries
|
||||||
(nvim-treesitter.withPlugins (p: with p;
|
(nvim-treesitter.withPlugins (p: with p;
|
||||||
[ bash fish
|
[ bash fish
|
||||||
c haskell
|
c fortran haskell
|
||||||
html css markdown
|
html css
|
||||||
nix python lua
|
nix python lua
|
||||||
]))
|
]))
|
||||||
|
|
||||||
@ -47,26 +48,16 @@ let
|
|||||||
''
|
''
|
||||||
;; extends
|
;; 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
|
; writeText highlight
|
||||||
(apply_expression
|
(apply_expression function:
|
||||||
function:
|
(apply_expression function: (_) @_func
|
||||||
(apply_expression
|
argument: (string_expression (string_fragment) @injection.language))
|
||||||
function: (_) @_func
|
argument: [
|
||||||
argument: (string_expression (string_fragment) @language))
|
(string_expression (string_fragment) @injection.content)
|
||||||
argument: [(string_expression (string_fragment) @content)
|
(indented_string_expression (string_fragment) @injection.content)]
|
||||||
(indented_string_expression (string_fragment) @content)]
|
|
||||||
(#match? @_func "(^|\\.)writeText(Dir)?$")
|
(#match? @_func "(^|\\.)writeText(Dir)?$")
|
||||||
(#gsub! @language ".*%.(.*)" "%1"))
|
(#gsub! @injection.language ".*%.(.*)" "%1")
|
||||||
@combined
|
(#set! injection.combined))
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fortran-queries = pkgs.writeTextDir "/queries/fortran/highlights.scm"
|
fortran-queries = pkgs.writeTextDir "/queries/fortran/highlights.scm"
|
||||||
@ -103,6 +94,7 @@ let
|
|||||||
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.splitkeep = 'screen' -- keep text still when splitting
|
||||||
|
opt.laststatus = 3 -- global statusline
|
||||||
|
|
||||||
opt.fsync = true -- Sync writes
|
opt.fsync = true -- Sync writes
|
||||||
opt.swapfile = false -- Disable swap files
|
opt.swapfile = false -- Disable swap files
|
||||||
@ -143,28 +135,20 @@ let
|
|||||||
opt.foldopen:remove("search") -- don't open when searching
|
opt.foldopen:remove("search") -- don't open when searching
|
||||||
|
|
||||||
--
|
--
|
||||||
-- OSC 52 clipboard
|
-- OSC 52 clipboard for SSH
|
||||||
--
|
|
||||||
--
|
--
|
||||||
|
|
||||||
if os.getenv('DISPLAY') == nil then
|
if os.getenv('SSH_TTY') ~= 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
|
|
||||||
|
|
||||||
vim.g.clipboard = {
|
vim.g.clipboard = {
|
||||||
name='ssh',
|
name = 'OSC 52',
|
||||||
copy={['*']=copy's', ['+']=copy'c'},
|
copy = {
|
||||||
paste={['*']=paste's', ['+']=paste'c'},
|
['+'] = 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
|
end
|
||||||
|
|
||||||
@ -174,8 +158,8 @@ let
|
|||||||
|
|
||||||
-- Hide some UI elements
|
-- Hide some UI elements
|
||||||
autocmd('TermOpen', {pattern='*', command='setlocal nonumber'})
|
autocmd('TermOpen', {pattern='*', command='setlocal nonumber'})
|
||||||
autocmd('TermEnter', {pattern='*', command='set noshowcmd'})
|
autocmd('TermEnter', {pattern='*', command='set cmdheight=0 laststatus=0'})
|
||||||
autocmd('TermLeave', {pattern='*', command='set showcmd'})
|
autocmd('TermLeave', {pattern='*', command='set cmdheight=1 laststatus=3'})
|
||||||
autocmd('VimResized', {pattern='*', command='wincmd ='})
|
autocmd('VimResized', {pattern='*', command='wincmd ='})
|
||||||
|
|
||||||
-- Exit without confirmation
|
-- Exit without confirmation
|
||||||
@ -187,6 +171,10 @@ let
|
|||||||
keymap('n', '<C-w>|', ':vsplit +term<CR>', {silent=true}) --
|
keymap('n', '<C-w>|', ':vsplit +term<CR>', {silent=true}) --
|
||||||
keymap('n', '<C-w>t', ':tabnew +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', '<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
|
-- Keybindings
|
||||||
@ -280,6 +268,7 @@ let
|
|||||||
color('FoldColumn', {ctermfg='none', cterm={}})
|
color('FoldColumn', {ctermfg='none', cterm={}})
|
||||||
color('Visual', {ctermfg='none', ctermbg=0})
|
color('Visual', {ctermfg='none', ctermbg=0})
|
||||||
color('Search', {ctermfg='none', ctermbg=0})
|
color('Search', {ctermfg='none', ctermbg=0})
|
||||||
|
color('CurSearch', {ctermfg='none', ctermbg=0})
|
||||||
|
|
||||||
-- Diff mode
|
-- Diff mode
|
||||||
color('DiffAdd', {ctermfg=2, ctermbg=0, underline=true})
|
color('DiffAdd', {ctermfg=2, ctermbg=0, underline=true})
|
||||||
@ -298,9 +287,9 @@ let
|
|||||||
|
|
||||||
-- Git signs
|
-- Git signs
|
||||||
color('SignColumn', {ctermfg=1, ctermbg='none', cterm={}})
|
color('SignColumn', {ctermfg=1, ctermbg='none', cterm={}})
|
||||||
color('GitAdd', {ctermfg=2})
|
color('GitSignsAdd', {ctermfg=2})
|
||||||
color('GitChange', {ctermfg=3})
|
color('GitSignsChange', {ctermfg=3})
|
||||||
color('GitDelete', {ctermfg=1})
|
color('GitSignsDelete', {ctermfg=1})
|
||||||
|
|
||||||
-- Statusline
|
-- Statusline
|
||||||
color('StatusLine', {ctermfg=8, ctermbg=0, cterm={}})
|
color('StatusLine', {ctermfg=8, ctermbg=0, cterm={}})
|
||||||
@ -334,16 +323,16 @@ let
|
|||||||
|
|
||||||
-- 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 | TSBufDisable highlight'})
|
||||||
|
|
||||||
-- Git signs
|
-- Git signs
|
||||||
gitsigns = require'gitsigns'
|
gitsigns = require'gitsigns'
|
||||||
gitsigns.setup{signs={
|
gitsigns.setup{signs={
|
||||||
add = {hl='GitAdd' , text='+'},
|
add = {text='+'},
|
||||||
change = {hl='GitChange', text='δ'},
|
change = {text='δ'},
|
||||||
delete = {hl='GitDelete', text='-'},
|
delete = {text='-'},
|
||||||
topdelete = {hl='GitDelete', text='‾'},
|
topdelete = {text='‾'},
|
||||||
changedelete = {hl='GitChange', text='~'}}
|
changedelete = {text='~'}}
|
||||||
}
|
}
|
||||||
keymap('n', '<leader>gb', function() gitsigns.blame_line{full=true} end, {silent=true})
|
keymap('n', '<leader>gb', function() gitsigns.blame_line{full=true} end, {silent=true})
|
||||||
keymap('n', '<leader>gp', function() gitsigns.preview_hunk() end, {silent=true})
|
keymap('n', '<leader>gp', function() gitsigns.preview_hunk() end, {silent=true})
|
||||||
|
@ -10,9 +10,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
haskellPackages = super.haskellPackages.extend (hself: hsuper:
|
haskellPackages = super.haskellPackages.extend (hself: hsuper:
|
||||||
{ breve = hself.callCabal2nix "breve" (builtins.fetchTarball
|
{ breve = super.haskell.lib.overrideCabal hsuper.breve
|
||||||
{ url = "https://hackage.haskell.org/package/breve-0.5.1.0/breve-0.5.1.0.tar.gz";
|
(old: { broken = false; });
|
||||||
}) {};
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user