Compare commits

...

10 Commits

Author SHA1 Message Date
248b7bf232 enable all features for cargo 2024-01-22 15:53:22 -05:00
fdd2b7fac8 tmux configuration 2024-01-21 17:51:44 -05:00
f763dc381f Set vi line editing and some additional nix options 2024-01-18 09:27:19 -05:00
b9ad9eac83 Readd omnisharp and disable roslyn
It isnt quite ready for prime time yet. diagnostics
arent getting handled.
2024-01-09 12:24:39 -05:00
fcb1d2420b Roslyn is "working" 2024-01-09 08:30:42 -05:00
5a1f4042e3 A bunch more treesitter parsers in neovim 2024-01-06 11:36:58 -05:00
21a38c3747 Some diagnostic configs for lua editing. 2024-01-06 11:06:37 -05:00
234f291d3a Updated a bunch of stuff in the lua config 2024-01-06 11:06:05 -05:00
f7370dffae Harpoon config updates. 2024-01-05 16:34:03 -05:00
3357c037e6 Stop using deprecated builder 2024-01-05 16:12:25 -05:00
9 changed files with 361 additions and 250 deletions

5
.luarc.json Normal file
View File

@ -0,0 +1,5 @@
{
"diagnostics.disable": [
"missing-fields"
]
}

View File

@ -1,3 +1,4 @@
set -o vi
export PROMPT='%F{green}[%T] %F{cyan}(%n@%m) %F{lightgrey}(%y) %F{cyan} %~ export PROMPT='%F{green}[%T] %F{cyan}(%n@%m) %F{lightgrey}(%y) %F{cyan} %~
%F{white}%(!.>>.$>) ' %F{white}%(!.>>.$>) '

View File

@ -512,9 +512,28 @@
"nil-flake": "nil-flake", "nil-flake": "nil-flake",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nurl-flake": "nurl-flake", "nurl-flake": "nurl-flake",
"roslyn-lsp": "roslyn-lsp",
"runwhen-flake": "runwhen-flake", "runwhen-flake": "runwhen-flake",
"rust-overlay-flake": "rust-overlay-flake", "rust-overlay-flake": "rust-overlay-flake",
"sile-flake": "sile-flake" "sile-flake": "sile-flake",
"treesitter-context": "treesitter-context"
}
},
"roslyn-lsp": {
"flake": false,
"locked": {
"lastModified": 1704752101,
"narHash": "sha256-eWKAdrKfuBqSoOW70BSqcANrGQ+NwbmCL8C1jLXdNt8=",
"owner": "zaphar",
"repo": "roslyn.nvim",
"rev": "f1301be34ff786036867137228f3d9f65a3434af",
"type": "github"
},
"original": {
"owner": "zaphar",
"ref": "non_nightly",
"repo": "roslyn.nvim",
"type": "github"
} }
}, },
"runwhen-flake": { "runwhen-flake": {
@ -689,6 +708,23 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"treesitter-context": {
"flake": false,
"locked": {
"lastModified": 1693236978,
"narHash": "sha256-B6BXeFEWxTFf46JrlatsxEQcC6+/hPIDBb5cIcJpLZg=",
"owner": "nvim-treesitter",
"repo": "nvim-treesitter-context",
"rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23",
"type": "github"
},
"original": {
"owner": "nvim-treesitter",
"repo": "nvim-treesitter-context",
"rev": "e6b743ccd4e780bc9cd85b707de67df72eea1a23",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -23,6 +23,11 @@
url = "github:nvim-treesitter/nvim-treesitter-context/e6b743ccd4e780bc9cd85b707de67df72eea1a23"; url = "github:nvim-treesitter/nvim-treesitter-context/e6b743ccd4e780bc9cd85b707de67df72eea1a23";
flake = false; flake = false;
}; };
# We need to pin to this version of treesitter because it breaks after this revision
roslyn-lsp = {
url = "github:zaphar/roslyn.nvim/non_nightly";
flake = false;
};
}; };
outputs = { outputs = {
sile-flake, sile-flake,
@ -35,6 +40,7 @@
nurl-flake, nurl-flake,
harpoon-src, harpoon-src,
treesitter-context, treesitter-context,
roslyn-lsp,
nixpkgs, nixpkgs,
... # We don't use the self or nixpkgs args here so we just glob it. ... # We don't use the self or nixpkgs args here so we just glob it.
}: { }: {
@ -44,41 +50,27 @@
in in
{ config, ...}: let { config, ...}: let
pkgs = nixPkgs; pkgs = nixPkgs;
nvim-treesitter-csharp = pkgs.callPackage ./nvim-treesitter-csharp.nix {
inherit (pkgs.tree-sitter) buildGrammar;
inherit (pkgs) fetchFromGitHub;
};
possession-nvim = pkgs.callPackage ./possession-nvim.nix { possession-nvim = pkgs.callPackage ./possession-nvim.nix {
inherit (pkgs.vimUtils) buildVimPlugin; inherit (pkgs.vimUtils) buildVimPlugin;
inherit (pkgs) fetchFromGitHub; inherit (pkgs) fetchFromGitHub;
}; };
harpoon-nvim = pkgs.callPackage ./harpoon-nvim.nix { harpoon-nvim = pkgs.callPackage ./harpoon-nvim.nix {
inherit (pkgs.vimUtils) buildVimPluginFrom2Nix; inherit (pkgs.vimUtils) buildVimPlugin;
harpoonSrc = harpoon-src; harpoonSrc = harpoon-src;
}; };
nvim-treesitter-context = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-treesitter-context = pkgs.vimUtils.buildVimPlugin {
name = "nvim-treesitter-context"; name = "nvim-treesitter-context";
src = treesitter-context; src = treesitter-context;
}; };
roslyn-nvim = pkgs.vimUtils.buildVimPlugin {
name = "roslyn-nvim";
src = roslyn-lsp;
};
# TODO(jwall): When this actually builds we should use it. # TODO(jwall): When this actually builds we should use it.
#nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix { #nvim-treesitter-powershell = pkgs.callPackage ./nvim-powershell.nix {
# inherit (pkgs.tree-sitter) buildGrammar; # inherit (pkgs.tree-sitter) buildGrammar;
# inherit (pkgs) fetchFromGitHub; # inherit (pkgs) fetchFromGitHub;
#}; #};
expected-parsers = (pkgs.lib.attrVals [
"tree-sitter-rust"
"tree-sitter-lua"
"tree-sitter-toml"
"tree-sitter-yaml"
"tree-sitter-json"
"tree-sitter-html"
"tree-sitter-css"
"tree-sitter-nix"
"tree-sitter-latex"
"tree-sitter-ocaml"
"tree-sitter-tlaplus"
"tree-sitter-julia"
] pkgs.tree-sitter.builtGrammars) ++ [nvim-treesitter-csharp];
in { in {
imports = [ imports = [
./program-neovim.nix ./program-neovim.nix
@ -118,11 +110,36 @@ EOF";
#nvim-dap-ui #nvim-dap-ui
vimagit vimagit
hoon-vim hoon-vim
(nvim-treesitter.withPlugins (_: expected-parsers)) nvim-treesitter
roslyn-nvim
nvim-treesitter-context nvim-treesitter-context
nvim-treesitter-textobjects
nvim-treesitter-parsers.ini nvim-treesitter-parsers.ini
nvim-treesitter-parsers.rust
nvim-treesitter-parsers.c
nvim-treesitter-parsers.c_sharp
nvim-treesitter-parsers.cpp
nvim-treesitter-parsers.clojure
nvim-treesitter-parsers.latex
nvim-treesitter-parsers.terraform nvim-treesitter-parsers.terraform
nvim-treesitter-parsers.hcl nvim-treesitter-parsers.hcl
nvim-treesitter-parsers.yaml
nvim-treesitter-parsers.lua
nvim-treesitter-parsers.vim
nvim-treesitter-parsers.go
nvim-treesitter-parsers.toml
nvim-treesitter-parsers.tlaplus
nvim-treesitter-parsers.typescript
nvim-treesitter-parsers.starlark
nvim-treesitter-parsers.python
nvim-treesitter-parsers.sql
nvim-treesitter-parsers.javascript
nvim-treesitter-parsers.ocaml
nvim-treesitter-parsers.haskell
nvim-treesitter-parsers.css
nvim-treesitter-parsers.promql
nvim-treesitter-parsers.nix
nvim-treesitter-parsers.hoon
omnisharp-extended-lsp-nvim omnisharp-extended-lsp-nvim
#neotest-dotnet #neotest-dotnet
nix-develop-nvim nix-develop-nvim
@ -148,6 +165,7 @@ EOF";
nil-pkg nil-pkg
lua-language-server lua-language-server
rust-analyzer rust-analyzer
omnisharp-roslyn
]); ]);
}; };
}; };
@ -180,22 +198,30 @@ EOF";
source = ./init.lua; source = ./init.lua;
}; };
programs = with pkgs; { programs = {
zsh.enable = true; # default shell on catalina zsh = {
enable = true; # default shell on catalina
# This is a total hack but we don't want the default clobbering it which it does if it's an empty string or null # This is a total hack but we don't want the default clobbering it which it does if it's an empty string or null
zsh.promptInit = "#noop"; promptInit = "#noop";
zsh.interactiveShellInit = (builtins.readFile ./.zshrc); interactiveShellInit = (builtins.readFile ./.zshrc);
};
tmux = {
enable = true;
enableVim = true;
extraConfig = (builtins.readFile ./tmux.conf);
};
}; };
environment.systemPackages = (with pkgs; [ environment.systemPackages = (with pkgs; [
args.pkgs.isabelle args.pkgs.isabelle
args.pkgs.terraform # TODO(jeremy): Replace with opentofu when that is an option. args.pkgs.terraform # TODO(jeremy): Replace with opentofu when that is an option.
tmux-sessionizer
consul consul
consul-template consul-template
nomad nomad
postgresql postgresql
oha oha
nodejs nodejs
tmux
gnumake gnumake
# TODO find a version of the julia package that will install # TODO find a version of the julia package that will install
# on darwin and add it as an overlay # on darwin and add it as an overlay

View File

@ -1,5 +1,5 @@
{buildVimPluginFrom2Nix, harpoonSrc, ...}: {buildVimPlugin, harpoonSrc, ...}:
buildVimPluginFrom2Nix { buildVimPlugin {
name = "harpoon"; name = "harpoon";
src = harpoonSrc; src = harpoonSrc;
} }

View File

@ -91,13 +91,13 @@ cmp.setup({
sources = cmp.config.sources( sources = cmp.config.sources(
{ {
{ name = 'nvim_lsp', keyword_length = 3 }, -- from language server { name = 'nvim_lsp', keyword_length = 3 }, -- from language server
{ name = 'nvim_lsp_signature_help'}, -- display function signatures with current parameter emphasized { name = 'nvim_lsp_signature_help' }, -- display function signatures with current parameter emphasized
}, },
{ {
{ name = 'path' }, -- file paths { name = 'path' }, -- file paths
}, },
{ {
{ name = 'nvim_lua', keyword_length = 2}, -- complete neovim's Lua runtime API such vim.lsp.* { name = 'nvim_lua', keyword_length = 2 }, -- complete neovim's Lua runtime API such vim.lsp.*
{ name = 'buffer', keyword_length = 2 }, -- source current buffer { name = 'buffer', keyword_length = 2 }, -- source current buffer
{ name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip { name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip
}), }),
@ -111,8 +111,6 @@ cmp.setup({
--vim.lsp.set_log_level('trace') --vim.lsp.set_log_level('trace')
--vim.lsp.log.set_format_func(vim.inspect) --vim.lsp.log.set_format_func(vim.inspect)
local roslyn_lsp_dll = vim.fs.normalize("~/bin/Microsoft.CodeAnalysis.LanguageServer.dll")
local caps = vim.tbl_deep_extend( local caps = vim.tbl_deep_extend(
'force', 'force',
vim.lsp.protocol.make_client_capabilities(), vim.lsp.protocol.make_client_capabilities(),
@ -122,13 +120,16 @@ local caps = vim.tbl_deep_extend(
{ workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } }, { workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } },
{ window = { progress = false } } { window = { progress = false } }
); );
vim.lsp.set_log_level(vim.log.levels.TRACE)
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
-- Terraform lsp setup -- Terraform lsp setup
lspconfig.terraformls.setup{} lspconfig.terraformls.setup {}
-- Nix language server support -- Nix language server support
lspconfig.nil_ls.setup{ lspconfig.nil_ls.setup {
--single_file_support = true, --single_file_support = true,
--on_attach = function(client, bufnr) --on_attach = function(client, bufnr)
-- -- disable the semanticTokens because it has issues. -- -- disable the semanticTokens because it has issues.
@ -137,6 +138,14 @@ lspconfig.nil_ls.setup{
capabilities = caps, capabilities = caps,
} }
--require('roslyn').setup({
-- on_attach = function (client, _)
-- --vim.notify(vim.inspect(client))
-- end,
-- capabilities = caps,
-- log_level = "Trace",
--});
local vim_pid = vim.fn.getpid() local vim_pid = vim.fn.getpid()
-- "FormatterOptions:EnableEditorConfigSupport=true" -- "FormatterOptions:EnableEditorConfigSupport=true"
@ -170,33 +179,39 @@ lspconfig.omnisharp.setup {
} }
--ocaml --ocaml
lspconfig.ocamllsp.setup{ lspconfig.ocamllsp.setup {
capabilities = caps capabilities = caps
} }
-- Java language server support -- Java language server support
lspconfig.java_language_server.setup{ lspconfig.java_language_server.setup {
capabilities = caps capabilities = caps
} }
-- Typescript language server support -- Typescript language server support
lspconfig.tsserver.setup{ lspconfig.tsserver.setup {
capabilities = caps capabilities = caps
} }
-- Rust language server support -- Rust language server support
lspconfig.rust_analyzer.setup{ lspconfig.rust_analyzer.setup {
settings = {
-- https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc
['rust-analyzer'] = {
cargo = { features = "all" }
}
},
capabilities = caps capabilities = caps
} }
-- lua language server setup. -- lua language server setup.
lspconfig.lua_ls.setup{ lspconfig.lua_ls.setup {
settings = { settings = {
Lua = { Lua = {
runtime = { version = 'LuaJIT', }, runtime = { version = 'LuaJIT', },
diagnostics = { diagnostics = {
-- Get the language server to recognize the `vim` global -- Get the language server to recognize the `vim` global
globals = {'vim'}, globals = { 'vim' },
}, },
workspace = { workspace = {
-- Make the server aware of Neovim runtime files -- Make the server aware of Neovim runtime files
@ -219,7 +234,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
vim.keymap.set("n", '<C-Space>', function() vim.keymap.set("n", '<C-Space>', function()
vim.lsp.buf.hover() vim.lsp.buf.hover()
end, opts) end, opts)
vim.keymap.set({"n", "v"}, "<Leader>a", vim.lsp.buf.code_action, opts) vim.keymap.set({ "n", "v" }, "<Leader>a", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "<Leader>f", vim.lsp.buf.format, opts) vim.keymap.set("n", "<Leader>f", vim.lsp.buf.format, opts)
local client = vim.lsp.get_client_by_id(args.data.client_id) local client = vim.lsp.get_client_by_id(args.data.client_id)
if client.server_capabilities.codelens then if client.server_capabilities.codelens then
@ -228,7 +243,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
end, end,
}) })
vim.api.nvim_create_autocmd({'BufEnter', 'InsertLeave', 'CursorHold'}, { vim.api.nvim_create_autocmd({ 'BufEnter', 'InsertLeave', 'CursorHold' }, {
callback = function(_) callback = function(_)
local clients = vim.lsp.get_active_clients() local clients = vim.lsp.get_active_clients()
for cid = 1, #clients do for cid = 1, #clients do
@ -249,10 +264,10 @@ local sign = function(opts)
}) })
end end
sign({name = 'DiagnosticSignError', text = '🔥'}) sign({ name = 'DiagnosticSignError', text = '🔥' })
sign({name = 'DiagnosticSignWarn', text = '⚠️'}) sign({ name = 'DiagnosticSignWarn', text = '⚠️' })
sign({name = 'DiagnosticSignHint', text = '➡️'}) sign({ name = 'DiagnosticSignHint', text = '➡️' })
sign({name = 'DiagnosticSignInfo', text = '🗒️'}) sign({ name = 'DiagnosticSignInfo', text = '🗒️' })
vim.diagnostic.config({ vim.diagnostic.config({
virtual_text = false, virtual_text = false,
@ -280,10 +295,10 @@ autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
-- noselect: Do not select, force to select one from the menu -- noselect: Do not select, force to select one from the menu
-- shortness: avoid showing extra messages when using completion -- shortness: avoid showing extra messages when using completion
-- updatetime: set updatetime for CursorHold -- updatetime: set updatetime for CursorHold
vim.opt.completeopt = {'menuone', 'noselect', 'noinsert'} vim.opt.completeopt = { 'menuone', 'noselect', 'noinsert' }
vim.opt.shortmess = vim.opt.shortmess + { c = true} vim.opt.shortmess = vim.opt.shortmess + { c = true }
vim.api.nvim_set_option('updatetime', 300) vim.api.nvim_set_option('updatetime', 300)
vim.opt.sessionoptions = {'buffers', 'curdir', 'skiprtp', 'localoptions', 'terminal', 'tabpages' } vim.opt.sessionoptions = { 'buffers', 'curdir', 'skiprtp', 'localoptions', 'terminal', 'tabpages' }
-- Fixed column for diagnostics to appear -- Fixed column for diagnostics to appear
-- Show autodiagnostic popup on cursor hover_range -- Show autodiagnostic popup on cursor hover_range
-- Goto previous / next diagnostic warning / error -- Goto previous / next diagnostic warning / error
@ -298,7 +313,7 @@ autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
highlight = { highlight = {
enable = true, enable = true,
additional_vim_regex_highlighting=false, additional_vim_regex_highlighting = false,
}, },
--indent = { enable = true }, --indent = { enable = true },
rainbow = { rainbow = {
@ -333,10 +348,10 @@ require('nvim-treesitter.configs').setup {
--}, --},
} }
require'treesitter-context'.setup { require 'treesitter-context'.setup {
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit. max_lines = 5, -- How many lines the window should span. Values <= 0 mean no limit.
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. min_window_height = 45, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
line_numbers = true, line_numbers = true,
multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line
trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
@ -355,7 +370,7 @@ vim.g.loaded_netrwPlugin = 1
vim.opt.termguicolors = true vim.opt.termguicolors = true
-- setup nvim-tree -- setup nvim-tree
require("nvim-tree").setup{ require("nvim-tree").setup {
hijack_unnamed_buffer_when_opening = true, hijack_unnamed_buffer_when_opening = true,
update_focused_file = { update_focused_file = {
enable = true, enable = true,
@ -404,7 +419,7 @@ require("nvim-tree").setup{
}, },
} }
require('trouble').setup{ require('trouble').setup {
icons = false, icons = false,
signs = { signs = {
hint = "➡️", hint = "➡️",
@ -443,7 +458,7 @@ vim.keymap.set("n", "<Leader>mg", function()
vim.cmd("MagitOnly") vim.cmd("MagitOnly")
end) end)
require('possession').setup{ require('possession').setup {
commands = { commands = {
save = 'SSave', save = 'SSave',
load = 'SLoad', load = 'SLoad',
@ -490,10 +505,8 @@ local harpoon = require('harpoon')
harpoon:setup() harpoon:setup()
vim.keymap.set("n", "<leader>ha", function() harpoon:list():append() end) -- telescope keymaps
vim.keymap.set("n", "<leader>he", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) vim.keymap.set("n", "<Leader>pl", telescope.extensions.possession.list)
vim.keymap.set("n", "<leader>pl", telescope.extensions.possession.list)
vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd) vim.keymap.set("n", "<Leader>nff", telescope_builtins.fd)
vim.keymap.set("n", "<Leader>rl", telescope_builtins.lsp_references) vim.keymap.set("n", "<Leader>rl", telescope_builtins.lsp_references)
vim.keymap.set("n", "<Leader>rn", vim.lsp.buf.rename) vim.keymap.set("n", "<Leader>rn", vim.lsp.buf.rename)
@ -501,8 +514,17 @@ vim.keymap.set("n", "<Leader>sl", telescope_builtins.lsp_workspace_symbols)
vim.keymap.set("n", "<Leader>dl", telescope_builtins.diagnostics) vim.keymap.set("n", "<Leader>dl", telescope_builtins.diagnostics)
vim.keymap.set("n", "<Leader>rg", telescope_builtins.live_grep) vim.keymap.set("n", "<Leader>rg", telescope_builtins.live_grep)
vim.keymap.set("n", "<Leader>bl", function() telescope_builtins.buffers({}) end) vim.keymap.set("n", "<Leader>bl", function() telescope_builtins.buffers({}) end)
-- harpoon keymaps
vim.keymap.set("n", "<Leader>ha", function() harpoon:list():append() end)
vim.keymap.set("n", "<Leader>he", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
vim.keymap.set("n", "<Leader>hj", function() harpoon:list():prev() end)
vim.keymap.set("n", "<Leader>hk", function() harpoon:list():next() end)
-- codelens keymaps
vim.keymap.set("n", "<Leader>rr", vim.lsp.codelens.run) vim.keymap.set("n", "<Leader>rr", vim.lsp.codelens.run)
-- debugging DAP keymaps
vim.keymap.set("n", "<Leader>tdb", function() vim.keymap.set("n", "<Leader>tdb", function()
vim.cmd("DBUIToggle") vim.cmd("DBUIToggle")
end) end)
@ -517,7 +539,7 @@ dap.adapters.lldb = {
dap.adapters.coreclr = { dap.adapters.coreclr = {
type = 'executable', type = 'executable',
command = '/run/current-system/sw/bin/netcoredbg', command = '/run/current-system/sw/bin/netcoredbg',
args = {'--interpreter=vscode'} args = { '--interpreter=vscode' }
} }
dap.configurations.rust = { dap.configurations.rust = {
@ -544,4 +566,3 @@ dap.configurations.cs = {
end, end,
}, },
} }

View File

@ -17,7 +17,7 @@ set -g default-terminal "screen-256color"
### example of some useful key-bindings ### example of some useful key-bindings
#bind-key "~" split-window "exec htop" #bind-key "~" split-window "exec htop"
bind-key "R" source-file ~/.tmux.conf bind-key C-c copy-mode
#bind-key "a" select-window -l #bind-key "a" select-window -l
#bind-key "C-a" select-window -l #bind-key "C-a" select-window -l

View File

@ -6,7 +6,8 @@
# SEE: https://github.com/NixOS/nix/issues/4119#issuecomment-1734738812 # SEE: https://github.com/NixOS/nix/issues/4119#issuecomment-1734738812
settings.sandbox = "relaxed"; settings.sandbox = "relaxed";
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes repl-flake
extra-platforms = x86_64-darwin aarch64-darwin x86_64-linux
''; '';
}; };
@ -53,6 +54,9 @@
# programs.bash.enable = true; # default shell on catalina # programs.bash.enable = true; # default shell on catalina
# programs.fish.enable = true; # programs.fish.enable = true;
system.defaults = {
finder.AppleShowAllExtensions = true;
};
system.systemBuilderArgs = lib.mkIf (config.nix.settings.sandbox == "relaxed") { system.systemBuilderArgs = lib.mkIf (config.nix.settings.sandbox == "relaxed") {
sandboxProfile = '' sandboxProfile = ''
(allow file-read* file-write* process-exec mach-lookup (subpath "${builtins.storeDir}")) (allow file-read* file-write* process-exec mach-lookup (subpath "${builtins.storeDir}"))

54
nix/darwin/flake.lock generated
View File

@ -7,11 +7,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1690228878, "lastModified": 1694793763,
"narHash": "sha256-9Xe7JV0krp4RJC9W9W9WutZVlw6BlHTFMiUP/k48LQY=", "narHash": "sha256-y6gTE1C9mIoSkymRYyzCmv62PFgy+hbZ5j8fuiQK5KI=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "d8c973fd228949736dedf61b7f8cc1ece3236792", "rev": "572baca9b0c592f71982fca0790db4ce311e3c75",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -29,6 +29,7 @@
"nil-flake": "nil-flake", "nil-flake": "nil-flake",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nurl-flake": "nurl-flake", "nurl-flake": "nurl-flake",
"roslyn-lsp": "roslyn-lsp",
"runwhen-flake": "runwhen-flake", "runwhen-flake": "runwhen-flake",
"rust-overlay-flake": "rust-overlay-flake", "rust-overlay-flake": "rust-overlay-flake",
"sile-flake": "sile-flake", "sile-flake": "sile-flake",
@ -36,12 +37,12 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-h8APs3KV8oU8sWYFEpSpqFjqJ/QY2a2L90BDfad5VUo=", "narHash": "sha256-Uat1zSsHZfJ0lf1Ya9aW8r0mjBNtbt8woaSmHNyDGRA=",
"path": "/nix/store/0jd7ginq0vz1gglni90j5bzj4bk4ly7q-source/nix/base-system", "path": "/nix/store/4kzm062qwsfzq1vza029ic4lx9zpdy8p-source/nix/base-system",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/0jd7ginq0vz1gglni90j5bzj4bk4ly7q-source/nix/base-system", "path": "/nix/store/4kzm062qwsfzq1vza029ic4lx9zpdy8p-source/nix/base-system",
"type": "path" "type": "path"
} }
}, },
@ -324,11 +325,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1693791390, "lastModified": 1694797768,
"narHash": "sha256-FnT7/iDcGLWSmzwDfD7RQwr7z5+U2j7YOqhR3UM3zrg=", "narHash": "sha256-CA9AQ+lvgbCOfH++A0rHKguTBBn0EEcVRLMAmkDecQo=",
"owner": "martinvonz", "owner": "martinvonz",
"repo": "jj", "repo": "jj",
"rev": "e3c85d6ecc20ee4240cdf3ed80107ce7dc268abe", "rev": "e288a152d052a531e0ccb25ae27ce07412d65447",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -549,11 +550,11 @@
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1695751852, "lastModified": 1701273941,
"narHash": "sha256-4jG+8LPHteAAEfUOtlwK0piK79fQsAMp/SA6Lpob+JQ=", "narHash": "sha256-MwDKOU2JZRHObIJLFbge+XS3ov54dAlDGtzWPtq7/PE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nurl", "repo": "nurl",
"rev": "715246bc9748cf196dafc7795812dec825e30b4b", "rev": "caf9e815a036eec02eac877798ebc9b379adc810",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -568,6 +569,23 @@
"darwin": "darwin_2" "darwin": "darwin_2"
} }
}, },
"roslyn-lsp": {
"flake": false,
"locked": {
"lastModified": 1704752101,
"narHash": "sha256-eWKAdrKfuBqSoOW70BSqcANrGQ+NwbmCL8C1jLXdNt8=",
"owner": "zaphar",
"repo": "roslyn.nvim",
"rev": "f1301be34ff786036867137228f3d9f65a3434af",
"type": "github"
},
"original": {
"owner": "zaphar",
"ref": "non_nightly",
"repo": "roslyn.nvim",
"type": "github"
}
},
"runwhen-flake": { "runwhen-flake": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@ -624,11 +642,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1693793487, "lastModified": 1694743934,
"narHash": "sha256-MS6CDyAC0sJMTE/pRYlfrhBnhlAPvEo43ipwf5ZNzHg=", "narHash": "sha256-4pn0x+OiOFWefBpgyufFVaAeG+LwfVUI/HMCma8xdHU=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "f179280eed5eb93759c94bf3231fbbda28f894b7", "rev": "6a26dd6da9b4f28d9b4c397bd22b5df4bec8f78a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -673,11 +691,11 @@
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1692759315, "lastModified": 1694595810,
"narHash": "sha256-nRA6Oad/CwUdMXlHpv1wW1IY5Pp100BJvIscd1AlYbI=", "narHash": "sha256-tqeteJwXs77NOoSw3jwQu4ImP8wH+omEwNq6MZycrDM=",
"owner": "sile-typesetter", "owner": "sile-typesetter",
"repo": "sile", "repo": "sile",
"rev": "fa84d15c902df4859caff8af8325097022b62f3e", "rev": "770d2b9f68297bb5e9ce75182bf6e57ae1cce3b9",
"type": "github" "type": "github"
}, },
"original": { "original": {