[feat] Add goread module and config

This commit is contained in:
uttarayan21
2024-03-15 22:24:15 +05:30
parent e2503b1c28
commit 9f6137b858
9 changed files with 830 additions and 181 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

View File

@@ -27,8 +27,6 @@ These are dotfiles for my Linux, MacOS and Windows machines
### For nix ### For nix
I'm a recent convert to NixOS from ArchLinux and have been usin it as primary os as well as a package manager on macos so the flake.nix contains configuration for both nix-darwin as well as nixos. It also contains a native home-manager module configuration for non-nixos devices ( like a SteamDeck ). I'm a recent convert to NixOS from ArchLinux and have been usin it as primary os as well as a package manager on macos so the flake.nix contains configuration for both nix-darwin as well as nixos. It also contains a native home-manager module configuration for non-nixos devices ( like a SteamDeck ).
The
#### Tools #### Tools
Some useful tools I regularly use. Some useful tools I regularly use.
@@ -53,25 +51,3 @@ Some useful tools I regularly use.
`zig` zig toolchain can be used to compile tree-sitter definitions without having to go through all the hassle of setting up llvm / MSVC on windows `zig` zig toolchain can be used to compile tree-sitter definitions without having to go through all the hassle of setting up llvm / MSVC on windows
`hx/helix` Vim/Neovim - like editor which has autocomplete, tree-sitter, debugger built-in. `hx/helix` Vim/Neovim - like editor which has autocomplete, tree-sitter, debugger built-in.
`winget` Use winget to install tools onto windows. It comes by default and can easily install most things. `winget` Use winget to install tools onto windows. It comes by default and can easily install most things.
#### Installation
To install on unixes simply do ( needs to have git installed )
```sh
curl sh.uttarayan.me | sh
```
#### Dotfiles
Includes the dotfiles for
- [alacritty](#alacritty)
- [bspwm](#bspwm)
- [conky](#conky)
- [neovim](#neovim)
- [neomutt](#neomutt)
- [picom](#picom)
- [rofi](#rofi)
- [sxhkd](#sxhkd)
- [tmux](#tmux)
- [fish](#fish)
- [zsh](#zsh)

32
common/goread.nix Normal file
View File

@@ -0,0 +1,32 @@
{ pkgs, ... }: {
imports = [ ../modules/goread.nix ];
programs.goread = {
enable = true;
config = {
urls = {
categories = [{
name = "Rust";
desc = "Stuff related to the rust programming language";
subscriptions = [
{
name = "r/rust";
desc = "The rust subreddit";
url = "https://www.reddit.com/r/rust/.rss";
}
{
name = "thesquareplanet";
desc = "jonhoo's blog";
url = "https://thesquareplanet.com/feed.xml";
}
{
name = "Jon Gjengset's Youtube";
desc = "jonhoo's youtube channel";
url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC_iD0xppBwwsrM9DegC5cQQ";
}
];
}];
};
};
};
}

View File

@@ -4,6 +4,7 @@
./tmux.nix ./tmux.nix
./wezterm.nix ./wezterm.nix
./nvim.nix ./nvim.nix
./goread.nix
] ++ lib.optionals device.isLinux [ ../linux ]; ] ++ lib.optionals device.isLinux [ ../linux ];
home.packages = with pkgs; home.packages = with pkgs;
@@ -11,7 +12,6 @@
pandoc pandoc
gnupg gnupg
gpg-tui gpg-tui
ngrok
slack slack
yarn yarn
spotify-player spotify-player
@@ -40,6 +40,7 @@
nil nil
pkg-config pkg-config
lua-language-server lua-language-server
codelldb
(nerdfonts.override { fonts = [ "Hasklig" ]; }) (nerdfonts.override { fonts = [ "Hasklig" ]; })
pfetch-rs pfetch-rs
] ++ lib.optionals device.isLinux [ ] ++ lib.optionals device.isLinux [
@@ -67,18 +68,12 @@
}) })
usbutils usbutils
handlr-regex handlr-regex
handlr-xdg
webcord-vencord webcord-vencord
spotify spotify
lsof lsof
wl-clipboard wl-clipboard
ncpamixer ncpamixer
(pkgs.writeShellApplication {
name = "xdg-open";
runtimeInputs = [ handlr-regex ];
text = ''
handlr open "$@"
'';
})
] ++ lib.optionals device.isMac [ ]; ] ++ lib.optionals device.isMac [ ];
xdg.enable = true; xdg.enable = true;
@@ -171,9 +166,18 @@
settings = settings =
let flavour = "mocha"; # Replace with your preferred palette let flavour = "mocha"; # Replace with your preferred palette
in { in {
# Other config here # Check https://starship.rs/config/#prompt
format = "$all"; # Remove this line to disable the default prompt format format = "$all$character";
palette = "catppuccin_${flavour}"; palette = "catppuccin_${flavour}";
character = {
success_symbol = "[[OK](bold green) ](maroon)";
error_symbol = "[](red)";
vimcmd_symbol = "[](green)";
};
directory = {
truncation_length = 4;
style = "bold lavender";
};
} // builtins.fromTOML (builtins.readFile } // builtins.fromTOML (builtins.readFile
(pkgs.catppuccinThemes.starship + /palettes/${flavour}.toml)); (pkgs.catppuccinThemes.starship + /palettes/${flavour}.toml));
}; };
@@ -219,6 +223,18 @@
if device.isMac then pkgs.pinentry_mac else pkgs.pinentry-qt; if device.isMac then pkgs.pinentry_mac else pkgs.pinentry-qt;
}; };
}; };
# Only for checking markdown previews
vscode = {
enable = true;
package = pkgs.vscodium;
extensions = with pkgs.vscode-extensions; [
shd101wyy.markdown-preview-enhanced
asvetliakov.vscode-neovim
];
};
home-manager = { enable = true; }; home-manager = { enable = true; };
}; };
@@ -249,3 +265,4 @@
]; ];
}; };
} }

View File

@@ -1,4 +1,4 @@
{ pkgs, config, inputs, ... }: { { pkgs, config, inputs, device, ... }: {
imports = [ inputs.nixneovim.nixosModules.default ]; imports = [ inputs.nixneovim.nixosModules.default ];
programs.nixneovim = { programs.nixneovim = {
enable = true; enable = true;
@@ -122,6 +122,7 @@
mappings = { mappings = {
normal = { normal = {
"<leader>ff" = "require'telescope.builtin'.find_files"; "<leader>ff" = "require'telescope.builtin'.find_files";
"<leader>fb" = "require'telescope'.extensions.file_browser.file_browser";
"<leader>gg" = "require'telescope.builtin'.live_grep"; "<leader>gg" = "require'telescope.builtin'.live_grep";
"<leader>;" = "require'telescope.builtin'.buffers"; "<leader>;" = "require'telescope.builtin'.buffers";
"<leader>o" = "[[<cmd>TroubleToggle<cr>]]"; "<leader>o" = "[[<cmd>TroubleToggle<cr>]]";
@@ -141,7 +142,7 @@
"<C-w>%" = "[[<cmd>vsplit<cr>]]"; "<C-w>%" = "[[<cmd>vsplit<cr>]]";
"<leader>bb" = "require'dap'.toggle_breakpoint"; "<leader>bb" = "require'dap'.toggle_breakpoint";
"<leader>dd" = "require'dapui'.toggle"; "<leader>du" = "require'dapui'.toggle";
"<leader>dr" = "[[<cmd>RustLsp debuggables<cr>]]"; "<leader>dr" = "[[<cmd>RustLsp debuggables<cr>]]";
"<C-l>" = "[[<cmd>Outline<cr>]]"; "<C-l>" = "[[<cmd>Outline<cr>]]";
@@ -202,153 +203,185 @@
pkgs.tree-sitter-grammars.tree-sitter-just pkgs.tree-sitter-grammars.tree-sitter-just
# Testing
neotest
# neotest-rust
]; ];
extraConfigLua = /* lua */ '' extraConfigLua =
require('rest-nvim').setup() let
require('telescope').setup { codelldb = pkgs.codelldb;
defaults = { liblldb =
initial_mode = 'insert', if device.isLinux then
}, "${codelldb}/lldb/lib/liblldb.so"
extensions = { else if device.isMac then
fzf = { "${codelldb}/lldb/lib/liblldb.dylib"
fuzzy = true, -- false will only do exact matching else null
override_generic_sorter = true, -- override the generic sorter ;
override_file_sorter = true, -- override the file sorter in
case_mode = "smart_case", -- or "ignore_case" or "respect_case" /* lua */
} ''
require'neotest'.setup({
adapters = {
-- require('neotest-rust') {
-- args = { "--no-capture" },
-- }
require('rustaceanvim.neotest'),
} }
} })
require('telescope').load_extension("ui-select") require('rest-nvim').setup()
require('telescope').load_extension("dap") require('telescope').setup {
require('telescope').load_extension("fzf") defaults = {
require('telescope').load_extension("file_browser") initial_mode = 'insert',
require('telescope').load_extension("rest") },
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
}
}
}
vim.g.rustaceanvim = { require('telescope').load_extension("ui-select")
tools = { require('telescope').load_extension("dap")
enable_clippy = false, require('telescope').load_extension("fzf")
}, require('telescope').load_extension("file_browser")
server = { require('telescope').load_extension("rest")
capabilities = require 'lsp-zero'.get_capabilities(),
on_attach = function(client, bufnr)
if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint.enable(bufnr, true)
end
end,
},
dap = {
autoload_configurations = false
},
}
require("copilot").setup({ vim.g.rustaceanvim = {
suggestion = { tools = {
enabled = true, enable_clippy = false,
auto_trigger = true, },
keymap = { server = {
accept = "<C-l>", capabilities = require 'lsp-zero'.get_capabilities(),
} on_attach = function(client, bufnr)
}, if client.server_capabilities.inlayHintProvider then
panel = { enabled = true }, vim.lsp.inlay_hint.enable(bufnr, true)
}) end
end,
settings = function(project_root)
local ra = require('rustaceanvim.config.server')
return ra.load_rust_analyzer_settings(project_root, {
settings_file_pattern = 'rust-analyzer.json'
})
end
},
dap = {
autoload_configurations = false,
adapter = require'rustaceanvim.config'.get_codelldb_adapter("${codelldb}/bin/codelldb", "${codelldb}/lldb/lib/liblldb.so")
},
}
require 'fidget'.setup() require("copilot").setup({
-- ======================================================================= suggestion = {
-- nvim-cmp enabled = true,
-- ======================================================================= auto_trigger = true,
local cmp = require("cmp") keymap = {
cmp.setup({ accept = "<C-l>",
view = { }
entries = { name = 'custom', selection_order = 'near_cursor' } },
}, panel = { enabled = true },
snippet = { })
expand = function(args)
require('luasnip').lsp_expand(args.body)
end
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
sources = cmp.config.sources({
{ name = "copilot", },
{ name = 'buffer' },
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'treesitter' },
{ name = 'path' },
{ name = 'git' },
{ name = 'tmux' }
}),
mapping = cmp.mapping.preset.insert({
['<CR>'] = cmp.mapping.confirm(),
['<C-y>'] = cmp.mapping.complete(),
-- ['<C-Space>'] = cmp.mapping.complete(),
['<C-n>'] = cmp.config.next,
['<C-p>'] = cmp.config.prev,
})
})
cmp.setup.cmdline({ '/', '?' }, { require 'fidget'.setup()
mapping = cmp.mapping.preset.cmdline { -- =======================================================================
-- ['<C-n>'] = cmp.config.disable, -- nvim-cmp
-- ['<C-p>'] = cmp.config.disable, -- =======================================================================
}, local cmp = require("cmp")
sources = { cmp.setup({
{ name = 'buffer' } view = {
} entries = { name = 'custom', selection_order = 'near_cursor' }
}) },
cmp.setup.cmdline(':', { snippet = {
mapping = cmp.mapping.preset.cmdline { expand = function(args)
-- ['<C-n>'] = cmp.config.disable, require('luasnip').lsp_expand(args.body)
-- ['<C-p>'] = cmp.config.disable, end
}, },
-- mapping = cmp.mapping.preset.cmdline(), window = {
sources = cmp.config.sources({ completion = cmp.config.window.bordered(),
{ name = 'path' } documentation = cmp.config.window.bordered(),
}, { },
{ name = 'cmdline' } sources = cmp.config.sources({
}) { name = "copilot", },
}) { name = 'buffer' },
cmp.setup.filetype('gitcommit', { { name = 'nvim_lsp' },
sources = cmp.config.sources({ { name = 'luasnip' },
{ name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). { name = 'treesitter' },
}, { { name = 'path' },
{ name = 'buffer' }, { name = 'git' },
}) { name = 'tmux' }
}) }),
require('crates').setup() mapping = cmp.mapping.preset.insert({
require('outline').setup() ['<CR>'] = cmp.mapping.confirm(),
require("noice").setup({ ['<C-y>'] = cmp.mapping.complete(),
lsp = { -- ['<C-Space>'] = cmp.mapping.complete(),
-- override markdown rendering so that **cmp** and other plugins use **Treesitter** ['<C-n>'] = cmp.config.next,
override = { ['<C-p>'] = cmp.config.prev,
["vim.lsp.util.convert_input_to_markdown_lines"] = true, })
["vim.lsp.util.stylize_markdown"] = true, })
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = false, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = true, -- add a border to hover docs and signature help
},
})
require 'FTerm'.setup({ cmp.setup.cmdline({ '/', '?' }, {
border = 'double', mapping = cmp.mapping.preset.cmdline {
dimensions = { -- ['<C-n>'] = cmp.config.disable,
height = 0.95, -- ['<C-p>'] = cmp.config.disable,
width = 0.95, },
}, sources = {
cmd = "fish", { name = 'buffer' }
blend = 10, }
}) })
''; cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline {
-- ['<C-n>'] = cmp.config.disable,
-- ['<C-p>'] = cmp.config.disable,
},
-- mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
}, {
{ name = 'buffer' },
})
})
require('crates').setup()
require('outline').setup()
require("noice").setup({
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = false, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = true, -- add a border to hover docs and signature help
},
})
require 'FTerm'.setup({
border = 'double',
dimensions = {
height = 0.95,
width = 0.95,
},
cmd = "fish",
blend = 10,
})
'';
# builtins.readFile ./extraConfig.lua; # builtins.readFile ./extraConfig.lua;
package = pkgs.neovim-nightly; package = pkgs.neovim-nightly;
}; };

524
flake.lock generated
View File

@@ -168,6 +168,54 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
@@ -270,6 +318,42 @@
"type": "indirect" "type": "indirect"
} }
}, },
"flake-parts_6": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_7": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1706830856,
"narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@@ -288,6 +372,42 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_10": {
"inputs": {
"systems": "systems_10"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_11": {
"inputs": {
"systems": "systems_11"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
@@ -395,6 +515,61 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_8": {
"inputs": {
"systems": "systems_8"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_9": {
"inputs": {
"systems": "systems_9"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gen-luarc": {
"inputs": {
"flake-parts": "flake-parts_7",
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1708688915,
"narHash": "sha256-Vcfbdo2IOEiimRnehGLUM5l2VEIjZYZdKS0sjYWwfb4=",
"owner": "mrcjkb",
"repo": "nix-gen-luarc-json",
"rev": "6eb62734dae84e5f79368dfc545b3fff305df754",
"type": "github"
},
"original": {
"owner": "mrcjkb",
"repo": "nix-gen-luarc-json",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -417,6 +592,51 @@
"type": "github" "type": "github"
} }
}, },
"gitignore_2": {
"inputs": {
"nixpkgs": [
"rustaceanvim",
"neorocks",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703887061,
"narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_3": {
"inputs": {
"nixpkgs": [
"rustaceanvim",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703887061,
"narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"haumea": { "haumea": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_5"
@@ -566,6 +786,28 @@
"type": "github" "type": "github"
} }
}, },
"neorocks": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_8",
"neovim-nightly": "neovim-nightly",
"nixpkgs": "nixpkgs_8",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1709961913,
"narHash": "sha256-IRSChjhNfpqWKwiC83knmxJ3NUpgcAk4xj3SB99PVkQ=",
"owner": "nvim-neorocks",
"repo": "neorocks",
"rev": "b6f97791287e1974699fa502590c4c36b6a5faff",
"type": "github"
},
"original": {
"owner": "nvim-neorocks",
"repo": "neorocks",
"type": "github"
}
},
"neovim-flake": { "neovim-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_6", "flake-utils": "flake-utils_6",
@@ -590,6 +832,31 @@
"type": "github" "type": "github"
} }
}, },
"neovim-nightly": {
"inputs": {
"flake-utils": "flake-utils_9",
"nixpkgs": [
"rustaceanvim",
"neorocks",
"nixpkgs"
]
},
"locked": {
"dir": "contrib",
"lastModified": 1709934546,
"narHash": "sha256-S24CAQvkeivCFM6tK4D10AEyjsMgE07XVgLIkrh6Ljc=",
"owner": "neovim",
"repo": "neovim",
"rev": "a69c72063994f8e9064b6d9c9f280120423897b8",
"type": "github"
},
"original": {
"dir": "contrib",
"owner": "neovim",
"repo": "neovim",
"type": "github"
}
},
"neovim-nightly-overlay": { "neovim-nightly-overlay": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
@@ -777,6 +1044,42 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-lib_2": {
"locked": {
"dir": "lib",
"lastModified": 1709237383,
"narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib_3": {
"locked": {
"dir": "lib",
"lastModified": 1706550542,
"narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "97b17f32362e475016f942bbdfda4a4a72a8a652",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1704874635, "lastModified": 1704874635,
@@ -793,6 +1096,38 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1704874635,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1704874635,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1706487304, "lastModified": 1706487304,
@@ -856,11 +1191,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1709961763, "lastModified": 1710272261,
"narHash": "sha256-6H95HGJHhEZtyYA3rIQpvamMKAGoa8Yh2rFV29QnuGw=", "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3030f185ba6a4bf4f18b87f345f104e6a6961f34", "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -870,6 +1205,54 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": {
"locked": {
"lastModified": 1708475490,
"narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0e74ca98a74bc7270d28838369593635a5db3260",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1709780214,
"narHash": "sha256-p4iDKdveHMhfGAlpxmkCtfQO3WRzmlD11aIcThwPqhk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f945939fd679284d736112d3d5410eb867f3b31c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1704842529,
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": { "nmd": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -946,6 +1329,32 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_10",
"gitignore": "gitignore_2",
"nixpkgs": [
"rustaceanvim",
"neorocks",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1708018599,
"narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks-nix": { "pre-commit-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@@ -977,6 +1386,28 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_5",
"flake-utils": "flake-utils_11",
"gitignore": "gitignore_3",
"nixpkgs": "nixpkgs_9",
"nixpkgs-stable": "nixpkgs-stable_3"
},
"locked": {
"lastModified": 1708018599,
"narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"anyrun": "anyrun", "anyrun": "anyrun",
@@ -992,7 +1423,8 @@
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixneovim": "nixneovim", "nixneovim": "nixneovim",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_6",
"nur": "nur" "nur": "nur",
"rustaceanvim": "rustaceanvim"
} }
}, },
"rust-overlay": { "rust-overlay": {
@@ -1080,6 +1512,30 @@
"type": "github" "type": "github"
} }
}, },
"rustaceanvim": {
"inputs": {
"flake-parts": "flake-parts_6",
"gen-luarc": "gen-luarc",
"neorocks": "neorocks",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks_2"
},
"locked": {
"lastModified": 1710468696,
"narHash": "sha256-kd0IgnjkLWGgNE1WoY4w6WpTpZBkE/YH6Y1mbupHJFs=",
"owner": "mrcjkb",
"repo": "rustaceanvim",
"rev": "69a22c2ec63ab375190006751562b62ebb318250",
"type": "github"
},
"original": {
"owner": "mrcjkb",
"repo": "rustaceanvim",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@@ -1095,6 +1551,36 @@
"type": "github" "type": "github"
} }
}, },
"systems_10": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_11": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@@ -1184,6 +1670,36 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_8": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_9": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@@ -48,6 +48,10 @@
# url = "github:NixNeovim/NixNeovimPlugins"; # url = "github:NixNeovim/NixNeovimPlugins";
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
# } # }
rustaceanvim = {
url = "github:mrcjkb/rustaceanvim";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.url = "github:Mic92/nix-index-database";
nur.url = "github:nix-community/nur"; nur.url = "github:nix-community/nur";

42
modules/goread.nix Normal file
View File

@@ -0,0 +1,42 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.programs.goread;
in {
options = {
programs.goread = {
enable = mkEnableOption "goread - a terminal RSS/Atom reader";
config = with types; {
urls = mkOption {
type = attrsOf (listOf attrs);
default = { };
description = ''
Urls that will be fetched ~/.config/goread/urls.yml
'';
example = { };
};
colorscheme = mkOption {
type = attrsOf str;
default = { };
example = { };
description = ''
Colorscheme that will be fetched ~/.config/goread/colorscheme.json
'';
};
};
};
};
config = {
home.packages = mkIf cfg.enable [ pkgs.goread ];
xdg.configFile = mkIf cfg.enable {
"goread/urls.yml".text = generators.toYAML { } cfg.config.urls;
# "goread/colorscheme.json".text = lib.generators.toJSON cfg.config.colorscheme;
};
};
}

View File

@@ -1,5 +1,30 @@
{ inputs, ... }: { inputs, ... }:
let let
shell-scipts = final: prev: {
handlr-xdg = (final.pkgs.writeShellApplication {
name = "xdg-open";
runtimeInputs = [ final.pkgs.handlr-regex ];
text = ''
handlr open "$@"
'';
});
};
misc-applications = final: prev: {
goread = final.pkgs.buildGoModule {
pname = "goread";
version = "v1.6.4";
vendorHash = "sha256-/kxEnw8l9S7WNMcPh1x7xqiQ3L61DSn6DCIvJlyrip0";
src = final.pkgs.fetchFromGitHub {
owner = "TypicalAM";
repo = "goread";
rev = "v1.6.4";
sha256 = "sha256-m6reRaJNeFhJBUatfPNm66LwTXPdD/gioT8HTv52QOw";
};
checkPhase = null;
};
};
anyrun-overlay = final: prev: { anyrun-overlay = final: prev: {
anyrun = inputs.anyrun.packages.${prev.system}.anyrun; anyrun = inputs.anyrun.packages.${prev.system}.anyrun;
hyprwin = inputs.anyrun-hyprwin.packages.${prev.system}.hyprwin; hyprwin = inputs.anyrun-hyprwin.packages.${prev.system}.hyprwin;
@@ -94,9 +119,12 @@ in
vimPlugins vimPlugins
tree-sitter-grammars tree-sitter-grammars
tmuxPlugins tmuxPlugins
inputs.neovim-nightly-overlay.overlay
anyrun-overlay anyrun-overlay
nix-index-db
shell-scipts
misc-applications
inputs.neovim-nightly-overlay.overlay
inputs.nixneovim.overlays.default inputs.nixneovim.overlays.default
inputs.nur.overlay inputs.nur.overlay
nix-index-db inputs.rustaceanvim.overlays.default
] ]