Compare commits
1 commit
master
...
jellyseerr
Author | SHA1 | Date | |
---|---|---|---|
c4d676c9f9 |
23 changed files with 595 additions and 3309 deletions
3236
flake.lock
generated
3236
flake.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -12,11 +12,6 @@
|
|||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
colmena.url = "github:zhaofengli/colmena";
|
||||
|
||||
nvf = {
|
||||
url = "github:notashelf/nvf";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
git-hooks = {
|
||||
url = "github:cachix/git-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
./neovim
|
||||
./firefox
|
||||
./tidal.nix
|
||||
./gnome
|
||||
|
@ -12,7 +13,6 @@
|
|||
./vscode.nix
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.nvf.homeManagerModules.default
|
||||
];
|
||||
|
||||
xsession.enable = true;
|
||||
|
|
13
home-manager/neovim/bufferline.lua
Normal file
13
home-manager/neovim/bufferline.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
require("bufferline").setup({
|
||||
options = {
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
local icon = level:match("error") and " " or " "
|
||||
return " " .. icon .. count
|
||||
end,
|
||||
separator_style = "slant",
|
||||
hover = { enabled = true, reveal = { "close" } },
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ft", ":BufferLinePick<CR>", {})
|
43
home-manager/neovim/cmp.lua
Normal file
43
home-manager/neovim/cmp.lua
Normal file
|
@ -0,0 +1,43 @@
|
|||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
luasnip.config.setup({})
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete({}),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = { { name = "nvim_lsp" }, { name = "luasnip" } },
|
||||
})
|
2
home-manager/neovim/commentary.lua
Normal file
2
home-manager/neovim/commentary.lua
Normal file
|
@ -0,0 +1,2 @@
|
|||
vim.cmd([[autocmd FileType nix setlocal commentstring=#%s]])
|
||||
vim.cmd([[autocmd FileType terraform setlocal commentstring=#%s]])
|
9
home-manager/neovim/core.lua
Normal file
9
home-manager/neovim/core.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
vim.o.background = "dark"
|
||||
vim.cmd([[colorscheme gruvbox]])
|
||||
vim.g.mapleader = ";"
|
||||
vim.o.signcolumn = "yes"
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = true
|
||||
vim.wo.cursorline = true
|
||||
vim.opt.termguicolors = true
|
||||
vim.o.mousemoveevent = true
|
91
home-manager/neovim/default.nix
Normal file
91
home-manager/neovim/default.nix
Normal file
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.pim.neovim;
|
||||
in {
|
||||
options.pim.neovim.enable = lib.mkEnableOption "neovim";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
defaultEditor = true;
|
||||
extraLuaConfig = builtins.readFile ./core.lua;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
nil
|
||||
pyright
|
||||
gopls
|
||||
terraform-ls
|
||||
nixfmt-classic
|
||||
stylua
|
||||
black
|
||||
nixpkgs-fmt
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./lspconfig.lua;
|
||||
}
|
||||
gruvbox-nvim
|
||||
{
|
||||
plugin = leap-nvim;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./leap.lua;
|
||||
}
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./telescope.lua;
|
||||
}
|
||||
{
|
||||
plugin = vim-commentary;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./commentary.lua;
|
||||
}
|
||||
vim-sleuth
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
type = "lua";
|
||||
config = ''require("gitsigns").setup()'';
|
||||
}
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./cmp.lua;
|
||||
}
|
||||
cmp-nvim-lsp
|
||||
friendly-snippets
|
||||
neodev-nvim
|
||||
luasnip
|
||||
cmp_luasnip
|
||||
{
|
||||
plugin = nvim-treesitter.withAllGrammars;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./treesitter.lua;
|
||||
}
|
||||
{
|
||||
plugin = bufferline-nvim;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./bufferline.lua;
|
||||
}
|
||||
nvim-web-devicons
|
||||
lsp-format-nvim
|
||||
{
|
||||
plugin = pkgs.vimPlugins.none-ls-nvim;
|
||||
type = "lua";
|
||||
config = builtins.readFile ./none-ls.lua;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.git.extraConfig.core.editor = "nvim";
|
||||
};
|
||||
}
|
4
home-manager/neovim/leap.lua
Normal file
4
home-manager/neovim/leap.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
require("leap").add_default_mappings()
|
||||
-- Don't remap 'x' in visual mode.
|
||||
vim.keymap.del({ "x", "o" }, "x")
|
||||
vim.keymap.del({ "x", "o" }, "X")
|
65
home-manager/neovim/lspconfig.lua
Normal file
65
home-manager/neovim/lspconfig.lua
Normal file
|
@ -0,0 +1,65 @@
|
|||
require("lsp-format").setup({})
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
local bufmap = function(keys, func)
|
||||
vim.keymap.set("n", keys, func, { buffer = bufnr })
|
||||
end
|
||||
|
||||
bufmap("<leader>r", vim.lsp.buf.rename)
|
||||
bufmap("<leader>a", vim.lsp.buf.code_action)
|
||||
|
||||
bufmap("gd", vim.lsp.buf.definition)
|
||||
bufmap("gD", vim.lsp.buf.declaration)
|
||||
bufmap("gI", vim.lsp.buf.implementation)
|
||||
bufmap("<leader>D", vim.lsp.buf.type_definition)
|
||||
|
||||
bufmap("gr", require("telescope.builtin").lsp_references)
|
||||
bufmap("<leader>s", require("telescope.builtin").lsp_document_symbols)
|
||||
bufmap("<leader>S", require("telescope.builtin").lsp_dynamic_workspace_symbols)
|
||||
|
||||
bufmap("K", vim.lsp.buf.hover)
|
||||
|
||||
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, {})
|
||||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
||||
|
||||
require("neodev").setup()
|
||||
require("lspconfig").nil_ls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig").pyright.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig").gopls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
require("lspconfig").terraformls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
local function has_treefmt()
|
||||
local git_root = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
if vim.v.shell_error ~= 0 then
|
||||
return false
|
||||
end
|
||||
local treefmt_path = git_root .. "/treefmt.nix"
|
||||
return vim.fn.filereadable(treefmt_path) == 1
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
if vim.fn.expand("%:p") ~= vim.fn.getcwd() .. "/.git/COMMIT_EDITMSG" and has_treefmt() then
|
||||
vim.cmd("silent !treefmt > /dev/null 2>&1")
|
||||
end
|
||||
end,
|
||||
group = vim.api.nvim_create_augroup("TreefmtAutoformat", { clear = true }),
|
||||
})
|
53
home-manager/neovim/none-ls.lua
Normal file
53
home-manager/neovim/none-ls.lua
Normal file
|
@ -0,0 +1,53 @@
|
|||
-- renamed to none-ls
|
||||
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
|
||||
if not null_ls_status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local formatting = null_ls.builtins.formatting
|
||||
local diagnostics = null_ls.builtins.diagnostics
|
||||
local code_actions = null_ls.builtins.code_actions
|
||||
|
||||
-- to setup format on save
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
formatting.stylua,
|
||||
formatting.black,
|
||||
formatting.nixpkgs_fmt,
|
||||
formatting.mix,
|
||||
},
|
||||
|
||||
-- configure format on save
|
||||
-- on_attach = function(current_client, bufnr)
|
||||
-- if current_client.supports_method("textDocument/formatting") then
|
||||
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
-- group = augroup,
|
||||
-- buffer = bufnr,
|
||||
-- callback = function()
|
||||
-- vim.lsp.buf.format({
|
||||
-- filter = function(client)
|
||||
-- -- only use null-ls for formatting instead of lsp server
|
||||
-- return client.name == "null-ls"
|
||||
-- end,
|
||||
-- bufnr = bufnr,
|
||||
-- })
|
||||
-- end,
|
||||
-- })
|
||||
-- end
|
||||
-- end,
|
||||
})
|
||||
|
||||
-- formatting command
|
||||
vim.api.nvim_create_user_command("Format", function()
|
||||
vim.lsp.buf.format(nil, 10000)
|
||||
end, {})
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>fm",
|
||||
":Format<CR>",
|
||||
{ desc = "Format current buffer (also done on save)", noremap = true, silent = true }
|
||||
)
|
17
home-manager/neovim/telescope.lua
Normal file
17
home-manager/neovim/telescope.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
local builtin = require("telescope.builtin")
|
||||
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, {})
|
||||
vim.keymap.set("n", "<leader>fr", builtin.lsp_references, {})
|
||||
vim.keymap.set("n", "<leader>fs", builtin.lsp_document_symbols, {})
|
||||
|
||||
require("telescope").setup({
|
||||
pickers = {
|
||||
find_files = { theme = "dropdown" },
|
||||
live_grep = { theme = "dropdown" },
|
||||
buffers = { theme = "dropdown" },
|
||||
lsp_references = { theme = "dropdown" },
|
||||
lsp_document_symbols = { theme = "dropdown" },
|
||||
},
|
||||
})
|
9
home-manager/neovim/treesitter.lua
Normal file
9
home-manager/neovim/treesitter.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {},
|
||||
|
||||
auto_install = false,
|
||||
|
||||
highlight = { enable = true },
|
||||
|
||||
indent = { enable = true },
|
||||
})
|
|
@ -1,4 +1,12 @@
|
|||
{config, ...}: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [./jellyseerr-module.nix];
|
||||
|
||||
disabledModules = ["services/misc/jellyseerr.nix"];
|
||||
|
||||
config = {
|
||||
facter.reportPath = ./facter.json;
|
||||
system.stateVersion = "23.05";
|
||||
|
@ -10,5 +18,10 @@
|
|||
targetUser = "root";
|
||||
tags = ["server" "kubernetes"];
|
||||
};
|
||||
|
||||
services.jellyseerr = {
|
||||
enable = true;
|
||||
package = pkgs.callPackage ./jellyseerr.nix {};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
76
machines/atlas/jellyseerr-module.nix
Normal file
76
machines/atlas/jellyseerr-module.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.services.jellyseerr;
|
||||
in {
|
||||
meta.maintainers = with lib.maintainers; [camillemndn pizzapim];
|
||||
|
||||
options.services.jellyseerr = {
|
||||
enable = lib.mkEnableOption ''Jellyseerr, a requests manager for Jellyfin'';
|
||||
package = lib.mkPackageOption pkgs "jellyseerr" {};
|
||||
|
||||
openFirewall = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''Open port in the firewall for the Jellyseerr web interface.'';
|
||||
};
|
||||
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 5055;
|
||||
description = ''The port which the Jellyseerr web UI should listen to.'';
|
||||
};
|
||||
|
||||
config_directory = lib.mkOption {
|
||||
description = ''
|
||||
The directory to save run-time configuration.
|
||||
'';
|
||||
type = lib.types.str;
|
||||
example = "/jellyseerr";
|
||||
default = "/var/lib/jellyseerr";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services.jellyseerr = {
|
||||
description = "Jellyseerr, a requests manager for Jellyfin";
|
||||
after = ["network.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
environment = {
|
||||
PORT = toString cfg.port;
|
||||
CONFIG_DIRECTORY = cfg.config_directory;
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "exec";
|
||||
StateDirectory = "jellyseerr";
|
||||
# WorkingDirectory = "${cfg.package}/libexec/jellyseerr/deps/jellyseerr";
|
||||
DynamicUser = true;
|
||||
ExecStart = lib.getExe cfg.package;
|
||||
# BindPaths = ["/var/lib/jellyseerr/:${cfg.package}/libexec/jellyseerr/deps/jellyseerr/config/"];
|
||||
Restart = "on-failure";
|
||||
ProtectHome = true;
|
||||
ProtectSystem = "strict";
|
||||
PrivateTmp = true;
|
||||
PrivateDevices = true;
|
||||
ProtectHostname = true;
|
||||
ProtectClock = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectControlGroups = true;
|
||||
NoNewPrivileges = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
RemoveIPC = true;
|
||||
PrivateMounts = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [cfg.port];
|
||||
};
|
||||
};
|
||||
}
|
89
machines/atlas/jellyseerr.nix
Normal file
89
machines/atlas/jellyseerr.nix
Normal file
|
@ -0,0 +1,89 @@
|
|||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
node-pre-gyp,
|
||||
nodejs,
|
||||
pnpm_9,
|
||||
python3,
|
||||
stdenv,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "jellyseerr";
|
||||
version = "2.1.0";
|
||||
|
||||
src = with finalAttrs;
|
||||
fetchFromGitHub {
|
||||
owner = "Fallenbagel";
|
||||
repo = "jellyseerr";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-5kaeqhjUy9Lgx4/uFcGRlAo+ROEOdTWc2m49rq8R8Hs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
nodejs
|
||||
makeWrapper
|
||||
pnpm_9.configHook
|
||||
|
||||
# Needed for compiling sqlite3 and bcrypt from source
|
||||
node-pre-gyp
|
||||
python3
|
||||
];
|
||||
|
||||
pnpmDeps = pnpm_9.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
hash = "sha256-xu6DeaBArQmnqEnIgjc1DTZujQebSkjuai9tMHeQWCk=";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
pnpm build
|
||||
|
||||
# Fixes "SQLite package has not been found installed" at launch
|
||||
pushd node_modules/sqlite3
|
||||
export CPPFLAGS="-I${nodejs}/include/node"
|
||||
npm run install --build-from-source --nodedir=${nodejs}/include/node
|
||||
popd
|
||||
|
||||
pushd node_modules/bcrypt
|
||||
export CPPFLAGS="-I${nodejs}/include/node"
|
||||
npm run install --build-from-source --nodedir=${nodejs}/include/node
|
||||
popd
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir $out
|
||||
cp ./package.json $out
|
||||
rm -r .next/cache
|
||||
cp -R ./.next $out
|
||||
cp -R ./dist $out
|
||||
cp ./overseerr-api.yml $out
|
||||
cp -R ./node_modules $out
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
makeWrapper '${nodejs}/bin/node' "$out/bin/jellyseerr" \
|
||||
--chdir $out \
|
||||
--add-flags "$out/dist/index.js" \
|
||||
--set NODE_ENV production
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fork of overseerr for jellyfin support";
|
||||
homepage = "https://github.com/Fallenbagel/jellyseerr";
|
||||
longDescription = ''
|
||||
Jellyseerr is a free and open source software application for managing
|
||||
requests for your media library. It is a a fork of Overseerr built to
|
||||
bring support for Jellyfin & Emby media servers!
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [
|
||||
camillemndn
|
||||
pizzapim
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
mainProgram = "jellyseerr";
|
||||
};
|
||||
})
|
|
@ -33,13 +33,6 @@
|
|||
services = {
|
||||
openssh.enable = true;
|
||||
|
||||
ollama = {
|
||||
enable = true;
|
||||
rocmOverrideGfx = "10.3.0";
|
||||
loadModels = ["deepseek-r1:32b" "hf.co/mradermacher/DeepSeek-R1-Distill-Qwen-32B-Uncensored-GGUF:Q4_K_M"];
|
||||
acceleration = "rocm";
|
||||
};
|
||||
|
||||
xserver.displayManager.lightdm.extraSeatDefaults = ''
|
||||
autologin-user=pim
|
||||
'';
|
||||
|
|
|
@ -1,34 +1,25 @@
|
|||
{
|
||||
lib,
|
||||
self,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (self.packages.${pkgs.system}) neovim;
|
||||
in {
|
||||
}: {
|
||||
config = {
|
||||
pim = {
|
||||
tidal.enable = true;
|
||||
gnome.enable = true;
|
||||
vscode.enable = true;
|
||||
syncthing.enable = true;
|
||||
neovim.enable = true;
|
||||
firefox.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
chromium.enable = true;
|
||||
git.extraConfig.core.editor = lib.getExe neovim;
|
||||
};
|
||||
programs.chromium.enable = true;
|
||||
|
||||
home = {
|
||||
username = "pim";
|
||||
homeDirectory = "/home/pim";
|
||||
stateVersion = "23.05";
|
||||
sessionVariables = {
|
||||
MANPAGER = "${lib.getExe neovim} +Man!";
|
||||
EDITOR = lib.getExe neovim;
|
||||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
|
@ -38,17 +29,15 @@ in {
|
|||
};
|
||||
|
||||
home.packages =
|
||||
[self.packages.${pkgs.system}.neovim]
|
||||
++ (with pkgs; [
|
||||
(with pkgs; [
|
||||
jellyfin-media-player
|
||||
virt-manager
|
||||
bottles-unwrapped
|
||||
feishin
|
||||
])
|
||||
++ (with pkgs.unstable; [
|
||||
attic-client
|
||||
dbeaver-bin
|
||||
devenv
|
||||
bottles-unwrapped
|
||||
gimp
|
||||
hexchat
|
||||
impression
|
||||
|
@ -68,6 +57,7 @@ in {
|
|||
wireshark
|
||||
# nheko # Has insecure olm dependency
|
||||
handbrake
|
||||
feishin
|
||||
redfishtool
|
||||
]);
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@ inputs @ {
|
|||
self,
|
||||
...
|
||||
}: {
|
||||
nixosConfigurations = nixpkgs.lib.mapAttrs (_: {
|
||||
nixosConfigurations = nixpkgs.lib.mapAttrs (name: {
|
||||
system,
|
||||
nixosModule,
|
||||
}:
|
||||
|
|
|
@ -4,7 +4,15 @@
|
|||
...
|
||||
}: let
|
||||
cfg = config.pim.data-sharing;
|
||||
nfsShares = ["/mnt/longhorn/persistent/longhorn-backup"];
|
||||
|
||||
nfsShares = [
|
||||
"/mnt/longhorn/persistent/media"
|
||||
"/mnt/longhorn/persistent/media/books"
|
||||
"/mnt/longhorn/persistent/media/movies"
|
||||
"/mnt/longhorn/persistent/media/music"
|
||||
"/mnt/longhorn/persistent/media/shows"
|
||||
"/mnt/longhorn/persistent/longhorn-backup"
|
||||
];
|
||||
|
||||
nfsExports = lib.strings.concatLines (
|
||||
builtins.map
|
||||
|
|
|
@ -128,7 +128,6 @@
|
|||
ncdu
|
||||
lshw
|
||||
sops
|
||||
nix-tree
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -171,6 +170,8 @@
|
|||
};
|
||||
|
||||
nixpkgs = {
|
||||
# hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
config = {
|
||||
allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
|
@ -180,15 +181,11 @@
|
|||
"steam-run"
|
||||
"steam-unwrapped"
|
||||
];
|
||||
|
||||
permittedInsecurePackages = [
|
||||
"electron-31.7.7"
|
||||
];
|
||||
};
|
||||
|
||||
overlays = [
|
||||
inputs.nur.overlays.default
|
||||
(_final: _prev: {
|
||||
inputs.nur.overlay
|
||||
(final: _prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit (pkgs) system;
|
||||
config.allowUnfree = true;
|
||||
|
@ -197,13 +194,9 @@
|
|||
];
|
||||
};
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_6_13;
|
||||
|
||||
kernel.sysctl = {
|
||||
"net.core.default_qdisc" = "fq";
|
||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||
};
|
||||
boot.kernel.sysctl = {
|
||||
"net.core.default_qdisc" = "fq";
|
||||
"net.ipv4.tcp_congestion_control" = "bbr";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
lib,
|
||||
config,
|
||||
self,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.pim.tailscale.advertiseExitNode = lib.mkOption {
|
||||
|
@ -11,8 +10,6 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf (builtins.elem "server" config.deployment.tags) {
|
||||
environment.systemPackages = [pkgs.unar];
|
||||
|
||||
networking = {
|
||||
firewall.allowedTCPPorts = [config.services.prometheus.exporters.node.port];
|
||||
domain = "dmz";
|
||||
|
|
110
packages.nix
110
packages.nix
|
@ -2,120 +2,12 @@
|
|||
nixpkgs,
|
||||
flake-utils,
|
||||
treefmt-nix,
|
||||
nvf,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||
treefmtWrapper = treefmtEval.config.build.wrapper;
|
||||
neovimConfigured = nvf.lib.neovimConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
{
|
||||
config.vim = {
|
||||
preventJunkFiles = true;
|
||||
telescope.enable = true;
|
||||
autopairs.nvim-autopairs.enable = true;
|
||||
autocomplete.nvim-cmp.enable = true;
|
||||
snippets.luasnip.enable = true;
|
||||
filetree.neo-tree.enable = true;
|
||||
tabline.nvimBufferline.enable = true;
|
||||
dashboard.alpha.enable = true;
|
||||
notify.nvim-notify.enable = true;
|
||||
projects.project-nvim.enable = true;
|
||||
comments.comment-nvim.enable = true;
|
||||
|
||||
lsp = {
|
||||
formatOnSave = true;
|
||||
lightbulb.enable = true;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = true;
|
||||
otter-nvim.enable = true;
|
||||
lsplines.enable = true;
|
||||
};
|
||||
|
||||
languages = {
|
||||
enableLSP = true;
|
||||
enableFormat = true;
|
||||
enableTreesitter = true;
|
||||
enableExtraDiagnostics = true;
|
||||
nix.enable = true;
|
||||
markdown.enable = true;
|
||||
bash.enable = true;
|
||||
clang.enable = true;
|
||||
css.enable = true;
|
||||
html.enable = true;
|
||||
sql.enable = true;
|
||||
go.enable = true;
|
||||
python.enable = true;
|
||||
|
||||
rust = {
|
||||
enable = true;
|
||||
crates.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
visuals = {
|
||||
nvim-web-devicons.enable = true;
|
||||
cinnamon-nvim.enable = true;
|
||||
fidget-nvim.enable = true;
|
||||
highlight-undo.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
cellular-automaton.enable = true;
|
||||
};
|
||||
|
||||
statusline.lualine = {
|
||||
enable = true;
|
||||
theme = "gruvbox";
|
||||
};
|
||||
|
||||
theme = {
|
||||
enable = true;
|
||||
name = "gruvbox";
|
||||
style = "dark";
|
||||
transparent = false;
|
||||
};
|
||||
|
||||
binds = {
|
||||
whichKey.enable = true;
|
||||
cheatsheet.enable = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true;
|
||||
};
|
||||
|
||||
utility = {
|
||||
surround.enable = true;
|
||||
diffview-nvim.enable = true;
|
||||
|
||||
motion = {
|
||||
hop.enable = true;
|
||||
leap.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
terminal.toggleterm = {
|
||||
enable = true;
|
||||
lazygit.enable = true;
|
||||
};
|
||||
|
||||
ui = {
|
||||
borders.enable = true;
|
||||
noice.enable = true;
|
||||
colorizer.enable = true;
|
||||
smartcolumn.enable = true;
|
||||
fastaction.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
in {
|
||||
packages = {
|
||||
formatter = treefmtWrapper;
|
||||
inherit (neovimConfigured) neovim;
|
||||
};
|
||||
packages.formatter = treefmtWrapper;
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue