nvim: added tree-sitter, Satori: misc changes

This commit is contained in:
2021-07-21 19:32:00 +05:30
parent e7da496981
commit 66075be40a
12 changed files with 326 additions and 90 deletions

View File

@@ -3,11 +3,17 @@
{ {
programs.neovim = { programs.neovim = {
enable = true; enable = true;
package = pkgs.neovim-nightly; package = pkgs.neovim-unwrapped.overrideAttrs (_:{
nativeBuildInputs = with pkgs.unstable; [ unzip cmake pkgconfig gettext tree-sitter ];
});
defaultEditor = true; defaultEditor = true;
configure = { configure = {
customRC = "lua << EOF\n" + builtins.readFile ./nvim/init.lua + "\nEOF\n"; customRC = ''
packages.myVimPackage = with pkgs.vimPlugins; { lua << EOF
${builtins.readFile ./nvim/init.lua}
EOF
'';
packages.myVimPackage = with pkgs.unstable.vimPlugins; {
start = [ start = [
nvim-colorizer-lua nvim-colorizer-lua
auto-pairs auto-pairs
@@ -15,17 +21,15 @@
vim-closetag vim-closetag
vim-floaterm vim-floaterm
nerdcommenter nerdcommenter
vim-startify
nvim-compe nvim-compe
nvim-lspconfig nvim-lspconfig
barbar-nvim barbar-nvim
nvim-web-devicons
vim-rooter
vim-polyglot
nvim-tree-lua
presence-nvim presence-nvim
indentLine nvim-web-devicons
nvim-tree-lua
vim-vsnip vim-vsnip
nvim-treesitter
vim-nix
(gruvbox.overrideAttrs (oa: { patches = [ ./nvim/gruvbox.patch ]; })) (gruvbox.overrideAttrs (oa: { patches = [ ./nvim/gruvbox.patch ]; }))
]; ];
}; };

View File

@@ -1,3 +1,4 @@
vim.api.nvim_set_option("termguicolors", true)
local nvim_lsp = require('lspconfig') local nvim_lsp = require('lspconfig')
local comm = vim.api.nvim_command local comm = vim.api.nvim_command
local bind = vim.api.nvim_set_keymap local bind = vim.api.nvim_set_keymap
@@ -40,6 +41,7 @@ vim.o.lazyredraw = true
vim.o.timeoutlen = 100 vim.o.timeoutlen = 100
vim.o.clipboard = "unnamedplus" vim.o.clipboard = "unnamedplus"
vim.o.completeopt = "menuone,noselect" vim.o.completeopt = "menuone,noselect"
vim.o.cursorcolumn = true
--KEYBINDS --KEYBINDS
@@ -181,6 +183,21 @@ end
vim.g.presence_neovim_image_text = "Ballin" vim.g.presence_neovim_image_text = "Ballin"
vim.g.presence_main_image = "file" vim.g.presence_main_image = "file"
--treesitter-nvim
require'nvim-treesitter.configs'.setup {
ensure_installed = "all",
highlight = {
enable = true,
additional_vim_regex_highlighting = true,
},
indent = {
enable = true
}
}
--misc
require'colorizer'.setup()
--lsp and compe stuff i got from various places --lsp and compe stuff i got from various places
local on_attach = function(client, bufnr) local on_attach = function(client, bufnr)
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
@@ -256,16 +273,15 @@ _G.s_tab_complete = function()
end end
end end
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true, silent = true}) bind("i", "<Tab>", "v:lua.tab_complete()", {expr = true, silent = true})
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true, silent = true}) bind("s", "<Tab>", "v:lua.tab_complete()", {expr = true, silent = true})
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true, silent = true}) bind("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true, silent = true})
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true, silent = true}) bind("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true, silent = true})
vim.api.nvim_set_keymap("i", "<CR>", "compe#confirm('<CR>')", {expr = true, silent = true}) bind("i", "<CR>", "compe#confirm('<CR>')", {expr = true, silent = true})
comm("set shortmess+=c") comm("set shortmess+=c")
--STATUSLINE --STATUSLINE
comm("set noruler") comm("set noruler")
vim.o.laststatus = 2 vim.o.laststatus = 2
local function mode() local function mode()
@@ -316,9 +332,8 @@ local statusline = {
'%c ' '%c '
} }
vim.o.statusline = table.concat(statusline) vim.o.statusline = table.concat(statusline)
vim.api.nvim_set_option("termguicolors", true)
local servers = { "ccls", "rust_analyzer", "tsserver", "pyls", "hls"} local servers = { "ccls", "rust_analyzer", "tsserver", "hls", "pylsp" }
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true capabilities.textDocument.completion.completionItem.snippetSupport = true
capabilities.textDocument.completion.completionItem.resolveSupport = { capabilities.textDocument.completion.completionItem.resolveSupport = {
@@ -332,5 +347,3 @@ capabilities.textDocument.completion.completionItem.resolveSupport = {
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup { capabilities = capabilities, on_attach = on_attach } nvim_lsp[lsp].setup { capabilities = capabilities, on_attach = on_attach }
end end
require'colorizer'.setup()

281
flake.lock generated
View File

@@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1620877075, "lastModified": 1626796208,
"narHash": "sha256-XvgTqtmQZHegu9UMDSR50gK5cHEM2gbnRH0qecmdN54=", "narHash": "sha256-NuHzubeQKHBD2GGMUn70I+tOkOsyM8meV3BtrLi4yVA=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "e543aa7d68f222e1e771165da9e9a64b5bf7b3e3", "rev": "85da8b73661cd048386b136a995ff278946a4055",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -18,6 +18,38 @@
"type": "github" "type": "github"
} }
}, },
"blobs": {
"flake": false,
"locked": {
"lastModified": 1604995301,
"narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=",
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"type": "gitlab"
}
},
"discord-ipc-bridge": {
"flake": false,
"locked": {
"lastModified": 1607757308,
"narHash": "sha256-hLdlvH0QITJjD3HQOnu/+7FKWFDsYqpr5h7AOcG+8k8=",
"owner": "hitomi-team",
"repo": "discord-ipc-bridge",
"rev": "7004fd3e073e5d44bde2101cd26203b10c6fa9a4",
"type": "github"
},
"original": {
"owner": "hitomi-team",
"repo": "discord-ipc-bridge",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -36,11 +68,11 @@
}, },
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1610051610, "lastModified": 1623875721,
"narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=", "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc", "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -54,11 +86,30 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1625384440, "lastModified": 1624228557,
"narHash": "sha256-WnDK+LZioER6eeC8Sm7GPvbiS6XPyUqn+qtc2lvjLHo=", "narHash": "sha256-wwOqe73BsrXfRv1PhyXQFNC8iTET50KvE/HitdkRgxs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ac319fd3149b23a3ad8ee24cb2def6e67acf194c", "rev": "35a24648d155843a4d162de98c17b1afd5db51e4",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-21.05",
"repo": "home-manager",
"type": "github"
}
},
"home-manager-unstable": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1626841047,
"narHash": "sha256-DSS2Wuu9P0oUzVRTwkd9J/AALhS9kA2ZwSlX0u8gGsM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "41101d0e62fe3cdb76e8e64349a2650da1433dd4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -69,15 +120,17 @@
}, },
"mailserver": { "mailserver": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3", "blobs": "blobs",
"nixpkgs": "nixpkgs_4",
"nixpkgs-21_05": "nixpkgs-21_05",
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1624568578, "lastModified": 1626125282,
"narHash": "sha256-E6mgpF2PVlPRWpyZBcpie6e03u2kAdWlveB6AI10Bos=", "narHash": "sha256-5yQwvYz698KubuIouKP+6qAD8O853ZnC0t7mcPhhGZg=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "a9f87ca461a1f0e23e85a1ba8c696672ed9e11e2", "rev": "a37dac9d66b0bbfc28ca64e7efbf4ce55be94143",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -88,11 +141,11 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1625397485, "lastModified": 1626869884,
"narHash": "sha256-psfWKhIp10coR+bGMegtagjMnV67vJVCgKO29wKevOw=", "narHash": "sha256-UKLBJteX3hUgY7NOIRRzBpUT5NarwlDt9h79/nG2mPI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0168c6ff9f6f4a67261bdf7ba5aea48ec8e4389a", "rev": "c1e00f694bf1cf14937a8c41e1ce5d75a940a9b1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -111,11 +164,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1625382879, "lastModified": 1626816632,
"narHash": "sha256-pi9EfFYaAdzCJuar24CT+nhkS29FCg2nufai1Qb0mZA=", "narHash": "sha256-QDwTd5lw1T/0iZWLkk77b1lXLv51Q27tGzIeVtjh1rM=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "490615612ed5ec587c8023de28db495b3181de30", "rev": "6f48c018b526a776e38e94f58769c30141de9e0c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -138,13 +191,44 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_2": { "nixpkgs-21_05": {
"locked": { "locked": {
"lastModified": 1625397485, "lastModified": 1625692408,
"narHash": "sha256-psfWKhIp10coR+bGMegtagjMnV67vJVCgKO29wKevOw=", "narHash": "sha256-e9L3TLLDVIJpMnHtiNHJE62oOh6emRtSZ244bgYJUZs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "0168c6ff9f6f4a67261bdf7ba5aea48ec8e4389a", "rev": "c06613c25df3fe1dd26243847a3c105cf6770627",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-21.05",
"type": "indirect"
}
},
"nixpkgs-wine-osu": {
"locked": {
"lastModified": 1621361101,
"narHash": "sha256-jH4vlCdaWgTDMeNU/NUJXmSs+xrpBVPWzwb5xzq2aec=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "73b982e62194a5d85827d87b0851aee06932979f",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "73b982e62194a5d85827d87b0851aee06932979f",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1626869884,
"narHash": "sha256-UKLBJteX3hUgY7NOIRRzBpUT5NarwlDt9h79/nG2mPI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c1e00f694bf1cf14937a8c41e1ce5d75a940a9b1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -153,6 +237,20 @@
} }
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": {
"lastModified": 1626869884,
"narHash": "sha256-UKLBJteX3hUgY7NOIRRzBpUT5NarwlDt9h79/nG2mPI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c1e00f694bf1cf14937a8c41e1ce5d75a940a9b1",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1607522989, "lastModified": 1607522989,
"narHash": "sha256-o/jWhOSAlaK7y2M57OIriRt6whuVVocS/T0mG7fd1TI=", "narHash": "sha256-o/jWhOSAlaK7y2M57OIriRt6whuVVocS/T0mG7fd1TI=",
@@ -167,29 +265,29 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1625286343, "lastModified": 1626679483,
"narHash": "sha256-bTzz52TDRqjFR7/xKyoJxNz90bIHdXQXhOc5BBRFNAM=", "narHash": "sha256-+BziIOkCKGqEvT8Xl59hym6CcB0hakqqxigKSuuBXmM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7918dc5148d7ce7b7e011a1186051693e14e1a4c", "rev": "4181644d09b96af0f92c2f025d3463f9d19c7790",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixpkgs-unstable", "ref": "nixos-21.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1625281901, "lastModified": 1626643364,
"narHash": "sha256-DkZDtTIPzhXATqIps2ifNFpnI+PTcfMYdcrx/oFm00Q=", "narHash": "sha256-RuXbMt9X0j8g4t9i0m85XpbtM0ubzH92zpqZnyfHbG4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "09c38c29f2c719cd76ca17a596c2fdac9e186ceb", "rev": "967d40bec14be87262b21ab901dbace23b7365db",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -199,13 +297,28 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": {
"locked": {
"lastModified": 1626019149,
"narHash": "sha256-0QeLkPoWjTDw9n1fmrwUg9IFIsjuD/YcX/DvMUQtqQw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eed20f01e43e94f0adae14e8407e8ef386897060",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1625385778, "lastModified": 1626856747,
"narHash": "sha256-Eqg3xVVGtgbW2lLke7alDb7+pX+eJvuHqnYVOanNSMk=", "narHash": "sha256-OxBQNKIHCMFkxYLc8Lyhv/mpmljgdjzxkhzMjG+HPxM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "45e7ba0f1eb13b76f4b978b0d9295d594aaf29f5", "rev": "d77d673535ef0068779600c39cdfabf2af94de59",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -218,14 +331,14 @@
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"neovim-flake": "neovim-flake", "neovim-flake": "neovim-flake",
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1625386273, "lastModified": 1626855407,
"narHash": "sha256-72a9jmmR5LDU68jiDzQuwme8DuwGgbfCoco0wIjzCq4=", "narHash": "sha256-tw+NRzsImNXFV/bnDTTmVTt6y/W2j7l2sh5/yn1dIE4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "85ac1e60a0d8ec5bff474219bf64f2c4b320f9c1", "rev": "2ff2c52368a4e92c06e3cb01a5b7b174fc046dd5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -234,31 +347,90 @@
"type": "github" "type": "github"
} }
}, },
"oglfPatches": {
"flake": false,
"locked": {
"lastModified": 1624106954,
"narHash": "sha256-PPchKKmTcGqCSMzmOcj2PhTeWcLgfzuCOU/yMAQh6mU=",
"owner": "openglfreak",
"repo": "wine-tkg-userpatches",
"rev": "ff6328a6b5e36dd8a007a7273290aa30ab3164d9",
"type": "github"
},
"original": {
"owner": "openglfreak",
"repo": "wine-tkg-userpatches",
"rev": "ff6328a6b5e36dd8a007a7273290aa30ab3164d9",
"type": "github"
}
},
"osu-nix": {
"inputs": {
"discord-ipc-bridge": "discord-ipc-bridge",
"nixpkgs": "nixpkgs_7",
"nixpkgs-wine-osu": "nixpkgs-wine-osu",
"oglfPatches": "oglfPatches",
"tkgPatches": "tkgPatches",
"utils": "utils_2"
},
"locked": {
"lastModified": 1626818776,
"narHash": "sha256-o/vh2EfywbcAR/+9b7R0a9Dqg1/2GkQd8bGg4ZwoFcw=",
"owner": "fufexan",
"repo": "osu.nix",
"rev": "fdfb4fc0ef43bd75fac12e958f54696d1f777f29",
"type": "github"
},
"original": {
"owner": "fufexan",
"repo": "osu.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"home-manager": "home-manager", "home-manager": "home-manager",
"home-manager-unstable": "home-manager-unstable",
"mailserver": "mailserver", "mailserver": "mailserver",
"master": "master", "master": "master",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"nur": "nur", "nur": "nur",
"nvim": "nvim", "nvim": "nvim",
"stable": "stable", "osu-nix": "osu-nix",
"utils": "utils_2" "unstable": "unstable",
"utils": "utils_3"
} }
}, },
"stable": { "tkgPatches": {
"flake": false,
"locked": { "locked": {
"lastModified": 1625176478, "lastModified": 1624646123,
"narHash": "sha256-s1RTYNKw7ySyqrZjns9Cq+Nnjpp75ePgL06pgcbIpoA=", "narHash": "sha256-MjN479YSlyhLt9fxoishGVCuQLg1SRMLF4TWh7cRuIQ=",
"owner": "Frogging-Family",
"repo": "wine-tkg-git",
"rev": "257bfe71c045db0fbbb9f3896f9697068b9f482a",
"type": "github"
},
"original": {
"owner": "Frogging-Family",
"repo": "wine-tkg-git",
"rev": "257bfe71c045db0fbbb9f3896f9697068b9f482a",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1626793760,
"narHash": "sha256-u8nOZte0QRjwcsx0B/lfutjk3Aufd6rlwOP7BAzISIU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "21b696caf392ad6fa513caf3327d0aa0430ffb72", "rev": "314f595ab1cd09a27ad66dd1283344fa5745e473",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-21.05", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -279,6 +451,21 @@
} }
}, },
"utils_2": { "utils_2": {
"locked": {
"lastModified": 1620759905,
"narHash": "sha256-WiyWawrgmyN0EdmiHyG2V+fqReiVi8bM9cRdMaKQOFg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b543720b25df6ffdfcf9227afafc5b8c1fabfae8",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_3": {
"locked": { "locked": {
"lastModified": 1623875721, "lastModified": 1623875721,
"narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",

View File

@@ -1,33 +1,39 @@
{ {
inputs = { inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable; nixpkgs.url = github:nixos/nixpkgs/nixos-21.05;
stable.url = github:nixos/nixpkgs/nixos-21.05; unstable.url = github:nixos/nixpkgs/nixpkgs-unstable;
master.url = github:nixos/nixpkgs/master; master.url = github:nixos/nixpkgs/master;
home-manager.url = github:nix-community/home-manager; home-manager-unstable.url = github:nix-community/home-manager;
home-manager.url = github:nix-community/home-manager/release-21.05;
nur.url = github:nix-community/NUR; nur.url = github:nix-community/NUR;
agenix.url = github:ryantm/agenix; agenix.url = github:ryantm/agenix;
utils.url = github:numtide/flake-utils; utils.url = github:numtide/flake-utils;
nvim.url = github:nix-community/neovim-nightly-overlay; nvim.url = github:nix-community/neovim-nightly-overlay;
mailserver.url = gitlab:simple-nixos-mailserver/nixos-mailserver; mailserver.url = gitlab:simple-nixos-mailserver/nixos-mailserver;
osu-nix.url = github:fufexan/osu.nix;
}; };
outputs = inputs@{self, nixpkgs, stable, master, ... }: outputs = inputs@{self, nixpkgs, unstable, master, ... }:
inputs.utils.lib.eachDefaultSystem (system: inputs.utils.lib.eachDefaultSystem (system:
let let
channels = final: prev: {
unstable = unstable.legacyPackages.${prev.system};
master = master.legacyPackages.${prev.system};
stable = nixpkgs.legacyPackages.${prev.system};
};
overlays = [ overlays = [
(import ./overlays/overridesandshit.nix) (import ./overlays/overridesandshit.nix)
(import ./overlays/packages.nix) (import ./overlays/packages.nix)
]; ];
in in
{ {
packages = import nixpkgs { legacyPackages = import nixpkgs {
inherit system; inherit system;
overlays = overlays ++ [ overlays = overlays ++ [
inputs.nur.overlay inputs.nur.overlay
inputs.nvim.overlay inputs.nvim.overlay
(_:_: {unstable = nixpkgs.legacyPackages.${system};}) channels
(_:_: {stable = stable.legacyPackages.${system};}) (_:_: {osu-nix = inputs.osu-nix.defaultPackage.${system};})
(_:_: {master = master.legacyPackages.${system};})
]; ];
config.allowUnfree = true; config.allowUnfree = true;
config.allowBroken = true; config.allowBroken = true;
@@ -42,7 +48,7 @@
imports = [ imports = [
./home/natto.nix ./home/natto.nix
]; ];
nixpkgs.overlays = self.packages.x86_64-linux.overlays; nixpkgs.overlays = self.legacyPackages.x86_64-linux.overlays;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowBroken = true; nixpkgs.config.allowBroken = true;
}; };
@@ -60,7 +66,7 @@
inputs.agenix.nixosModules.age inputs.agenix.nixosModules.age
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
{ {
nixpkgs.pkgs = self.packages.x86_64-linux; nixpkgs.pkgs = self.legacyPackages.x86_64-linux;
} }
]; ];
}; };
@@ -72,7 +78,7 @@
./hosts/servers/marisa.nix ./hosts/servers/marisa.nix
#inputs.mailserver.nixosModules.mailserver #inputs.mailserver.nixosModules.mailserver
{ {
nixpkgs.pkgs = self.packages.aarch64-linux; nixpkgs.pkgs = self.legacyPackages.aarch64-linux;
} }
]; ];
}; };
@@ -82,7 +88,7 @@
modules = [ modules = [
./hosts/servers/marisa.nix ./hosts/servers/marisa.nix
{ {
nixpkgs.pkgs = (self.packages.x86_64-linux) // {crossSystem.config = "aarch64-unknown-linux-gnu";}; nixpkgs.pkgs = (self.legacyPackages.x86_64-linux) // {crossSystem.config = "aarch64-unknown-linux-gnu";};
} }
]; ];
}; };
@@ -94,7 +100,7 @@
./hosts/servers/remilia.nix ./hosts/servers/remilia.nix
inputs.mailserver.nixosModules.mailserver inputs.mailserver.nixosModules.mailserver
{ {
nixpkgs.pkgs = self.packages.x86_64-linux; nixpkgs.pkgs = self.legacyPackages.x86_64-linux;
} }
]; ];
}; };

View File

@@ -45,7 +45,6 @@ in
mpdas mpdas
pavucontrol pavucontrol
anup anup
proxychains
xfce.thunar xfce.thunar
xfce.xfconf xfce.xfconf
xfce.tumbler xfce.tumbler
@@ -54,7 +53,7 @@ in
mpd_discord_richpresence mpd_discord_richpresence
sox sox
qbittorrent qbittorrent
tor-browser-bundle-bin #tor-browser-bundle-bin
mpc_cli mpc_cli
hexchat hexchat
luajit luajit
@@ -67,6 +66,8 @@ in
xorg.xkbcomp xorg.xkbcomp
xorg.xmodmap xorg.xmodmap
p7zip p7zip
unrar
wineWowPackages.staging
glxinfo glxinfo
sxiv sxiv
vim vim
@@ -78,6 +79,7 @@ in
xdotool xdotool
arc-theme arc-theme
arc-icon-theme arc-icon-theme
osu-nix
]; ];
file = { file = {

View File

@@ -1,4 +1,4 @@
{lib, config, ... }: {lib, config, pkgs, ... }:
{ {
services.pipewire = { services.pipewire = {

View File

@@ -13,5 +13,5 @@
./common/xorg.nix ./common/xorg.nix
../../configs/nvim.nix ../../configs/nvim.nix
]; ];
system.stateVersion = "20.09"; system.stateVersion = "21.05";
} }

View File

@@ -2,7 +2,7 @@
{ {
boot = { boot = {
# kernelPackages = pkgs.linuxPackages_lqx; kernelPackages = pkgs.linuxPackages_latest;
initrd={ initrd={
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "vfio-pci"]; availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "vfio-pci"];
/* preDeviceCommands = '' /* preDeviceCommands = ''
@@ -32,5 +32,6 @@
configurationName = "nixbruh"; configurationName = "nixbruh";
}; };
}; };
binfmt.emulatedSystems = [ "aarch64-linux" ];
}; };
} }

View File

@@ -10,15 +10,15 @@
python3 python3
htop htop
nodejs nodejs
wineWowPackages.staging
wget wget
ripgrep ripgrep
kbd kbd
cachix cachix
gcc gcc
rustc rustc
jdk openjdk
virtmanager virtmanager
tree-sitter
]; ];
programs = { programs = {
@@ -71,6 +71,26 @@
dconf.enable = true; dconf.enable = true;
adb.enable = true; adb.enable = true;
light.enable = true; light.enable = true;
noisetorch.enable = true;
proxychains = {
enable = true;
chain.type = "dynamic";
proxyDNS = true;
proxies = {
remilia = {
enable = true;
type = "socks5";
host = "127.0.0.1";
port = 2217;
};
remilia4 = {
enable = true;
type = "socks4";
host = "127.0.0.1";
port = 2217;
};
};
};
}; };
nix = { nix = {
package = pkgs.nixUnstable; package = pkgs.nixUnstable;
@@ -78,7 +98,5 @@
experimental-features = nix-command ca-references flakes experimental-features = nix-command ca-references flakes
''; '';
trustedUsers = [ "root" "natto" ]; trustedUsers = [ "root" "natto" ];
# binaryCaches = ["http://152.67.11.101/" "https://cache.nixos.org/"];
# binaryCachePublicKeys = ["152.67.11.101:lbEG3jz8pB5IxxjCQcZwS1a85XK5HIYN7g2E9Zw0r1M="];
}; };
} }

View File

@@ -7,7 +7,7 @@
./marisa/networking.nix ./marisa/networking.nix
./marisa/hardware.nix ./marisa/hardware.nix
./marisa/boot.nix ./marisa/boot.nix
./marisa/services.nix # ./marisa/services.nix
./marisa/cachix.nix ./marisa/cachix.nix
../../configs/nvim.nix ../../configs/nvim.nix
]; ];

View File

@@ -6,6 +6,7 @@
vim vim
wireguard wireguard
vault vault
tree-sitter
]; ];
programs = { programs = {
zsh = { zsh = {

View File

@@ -48,4 +48,8 @@ final: prev: {
discord = prev.discord.overrideAttrs (_ : { discord = prev.discord.overrideAttrs (_ : {
src = builtins.fetchTarball { url = "https://discord.com/api/download/stable?platform=linux&format=tar.gz"; sha256="1ahj4bhdfd58jcqh54qcgafljqxl1747fqqwxhknqlasa83li75n";}; src = builtins.fetchTarball { url = "https://discord.com/api/download/stable?platform=linux&format=tar.gz"; sha256="1ahj4bhdfd58jcqh54qcgafljqxl1747fqqwxhknqlasa83li75n";};
}); });
proxychains = prev.proxychains.overrideAttrs (_ : {
postInstall = ":";
});
} }