mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 18:30:13 +00:00
rename patches directory to overlays
This commit is contained in:
25
overlays/calibre-web-cloudflare.patch
Normal file
25
overlays/calibre-web-cloudflare.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff --git a/cps/__init__.py b/cps/__init__.py
|
||||
index 1ba1f778..da0bc718 100644
|
||||
--- a/cps/__init__.py
|
||||
+++ b/cps/__init__.py
|
||||
@@ -100,7 +100,6 @@ updater_thread = Updater()
|
||||
def create_app():
|
||||
lm.login_view = 'web.login'
|
||||
lm.anonymous_user = ub.Anonymous
|
||||
- lm.session_protection = 'strong'
|
||||
|
||||
if csrf:
|
||||
csrf.init_app(app)
|
||||
diff --git a/cps/admin.py b/cps/admin.py
|
||||
index 09a553b4..5c646e46 100644
|
||||
--- a/cps/admin.py
|
||||
+++ b/cps/admin.py
|
||||
@@ -104,8 +104,6 @@ def before_request():
|
||||
# make remember me function work
|
||||
if current_user.is_authenticated:
|
||||
confirm_login()
|
||||
- if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path:
|
||||
- logout_user()
|
||||
g.constants = constants
|
||||
g.user = current_user
|
||||
g.allow_registration = config.config_public_reg
|
7
overlays/calibre-web.nix
Normal file
7
overlays/calibre-web.nix
Normal file
@ -0,0 +1,7 @@
|
||||
# Fix: https://github.com/janeczku/calibre-web/issues/2422
|
||||
|
||||
final: prev: {
|
||||
calibre-web = prev.calibre-web.overrideAttrs (old: {
|
||||
patches = (old.patches or [ ]) ++ [ ./calibre-web-cloudflare.patch ];
|
||||
});
|
||||
}
|
42
overlays/neovim-plugins.nix
Normal file
42
overlays/neovim-plugins.nix
Normal file
@ -0,0 +1,42 @@
|
||||
# Adopted from here: https://github.com/DieracDelta/vimconfig/blob/801b62dd56cfee59574639904a6c95b525725f66/plugins.nix
|
||||
|
||||
inputs: final: prev:
|
||||
|
||||
let
|
||||
|
||||
# Use nixpkgs vimPlugin but with source directly from plugin author
|
||||
withSrc = pkg: src: pkg.overrideAttrs (_: { inherit src; });
|
||||
|
||||
# Package plugin
|
||||
plugin = pname: src:
|
||||
prev.vimUtils.buildVimPluginFrom2Nix {
|
||||
inherit pname src;
|
||||
version = "master";
|
||||
};
|
||||
|
||||
in {
|
||||
|
||||
nil = inputs.nil.packages.${prev.system}.nil;
|
||||
|
||||
nvim-lspconfig =
|
||||
(withSrc prev.vimPlugins.nvim-lspconfig inputs.nvim-lspconfig);
|
||||
cmp-nvim-lsp = (withSrc prev.vimPlugins.cmp-nvim-lsp inputs.cmp-nvim-lsp);
|
||||
null-ls-nvim = (withSrc prev.vimPlugins.null-ls-nvim inputs.null-ls-nvim);
|
||||
comment-nvim = (withSrc prev.vimPlugins.comment-nvim inputs.comment-nvim);
|
||||
nvim-treesitter =
|
||||
(withSrc prev.vimPlugins.nvim-treesitter inputs.nvim-treesitter);
|
||||
telescope-nvim =
|
||||
(withSrc prev.vimPlugins.telescope-nvim inputs.telescope-nvim);
|
||||
telescope-project-nvim = (withSrc prev.vimPlugins.telescope-project-nvim
|
||||
inputs.telescope-project-nvim);
|
||||
toggleterm-nvim =
|
||||
(withSrc prev.vimPlugins.toggleterm-nvim inputs.toggleterm-nvim);
|
||||
bufferline-nvim =
|
||||
(withSrc prev.vimPlugins.bufferline-nvim inputs.bufferline-nvim);
|
||||
nvim-tree-lua = (withSrc prev.vimPlugins.nvim-tree-lua inputs.nvim-tree-lua);
|
||||
|
||||
# Packaging plugins with Nix
|
||||
# comment-nvim = plugin "comment-nvim" comment-nvim-src;
|
||||
# plenary-nvim = plugin "plenary-nvim" plenary-nvim-src;
|
||||
|
||||
}
|
Reference in New Issue
Block a user