chore: revert neovim changes, remove tmux + fish from nix-darwin 🔨

This commit is contained in:
DannyDannyDanny 2025-09-08 20:41:49 +02:00
parent b7f63f305d
commit 7544e12117
3 changed files with 94 additions and 74 deletions

22
nixos/flake.lock generated
View file

@ -34,6 +34,27 @@
"type": "github" "type": "github"
} }
}, },
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1757130842,
"narHash": "sha256-4i7KKuXesSZGUv0cLPLfxbmF1S72Gf/3aSypgvVkwuA=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "15f067638e2887c58c4b6ba1bdb65a0b61dc58c5",
"type": "github"
},
"original": {
"owner": "nix-darwin",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"nixos-wsl": { "nixos-wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -102,6 +123,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nix-darwin": "nix-darwin",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"vscode-server": "vscode-server" "vscode-server": "vscode-server"

View file

@ -57,8 +57,10 @@
darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem { darwinConfigurations."Daniel-Macbook-Air" = nix-darwin.lib.darwinSystem {
modules = [ modules = [
./hosts/macos.nix ./hosts/macos.nix
./tmux.nix # TODO: nix-darwin lacks tmux options; move to Home Manager.x
./neovim.nix # ./tmux.nix
# TODO: add neovim via homemanager, that should work the same for NixOS as Nix-Darwin
# ./neovim.nix # NOTE: Option only exists on NixOS.
./fish.nix ./fish.nix
]; ];
}; };

View file

@ -1,12 +1,9 @@
{ lib, config, pkgs, ... }: { config, pkgs, ... }:
{ {
# Only apply the Neovim NixOS module options on Linux.
config = lib.mkIf pkgs.stdenv.isLinux {
programs.neovim = { programs.neovim = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
configure = { configure = {
customRC = '' customRC = ''
set title set title
@ -21,6 +18,7 @@
local f=io.open(config_file, "r") local f=io.open(config_file, "r")
if f~=nil then if f~=nil then
local system_theme = f:read() local system_theme = f:read()
-- f:close()
io.close(f) io.close(f)
if system_theme == 'dark' then if system_theme == 'dark' then
vim.cmd("set bg=dark") vim.cmd("set bg=dark")
@ -29,11 +27,11 @@
else else
print('warning: expected value "light" or "dark"') print('warning: expected value "light" or "dark"')
print(' got:', system_theme) print(' got:', system_theme)
print(' expected path:', config_file) print(' expected path:', file)
end end
else else
print('warning: nvim color scheme not found') print('warning: nvim color scheme not found')
print(' expected path:', config_file) print(' expected path:', file)
end end
EOF EOF
@ -58,15 +56,14 @@
set spell spelllang=en_us set spell spelllang=en_us
setlocal spell! spelllang=en_us setlocal spell! spelllang=en_us
''; '';
# vimPlugins inspired from Alexnortung # vimPlugins inspired from Alexnortung
# https://discourse.nixos.org/t/neovim-no-longer-uses-config-or-plugins/13399/4 # https://discourse.nixos.org/t/neovim-no-longer-uses-config-or-plugins/13399/4
packages.nix = with pkgs.vimPlugins; { packages.nix = with pkgs.vimPlugins; {
start = [ start = [
vim-surround # shortcuts for setting () {} etc. vim-surround # shortcuts for setting () {} etc.
vim-gitgutter # git diff in sign column vim-gitgutter # git diff in sign column
# vim-airline # nice and light status bar (disabled for tmux) # vim-airline # nice and light status bar # doesn't work nicely with tmux
# coc-nvim coc-* plugins (disabled for now) # coc-nvim coc-git coc-highlight coc-python coc-rls coc-vetur coc-vimtex coc-yaml coc-html coc-json # auto completion
vim-nix # nix highlight vim-nix # nix highlight
vimtex # latex stuff vimtex # latex stuff
fzf-vim # fuzzy finder through vim fzf-vim # fuzzy finder through vim
@ -81,5 +78,4 @@
}; };
}; };
}; };
};
} }