mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
Merge branch 'trunk' into tungsten-btrfs-test
This commit is contained in:
commit
f740985bff
44 changed files with 331 additions and 318 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
|
local methods = vim.lsp.protocol.Methods
|
||||||
|
|
||||||
----------------------
|
----------------------
|
||||||
-- Language servers --
|
-- Language servers --
|
||||||
|
|
@ -75,22 +76,31 @@ local servers = {
|
||||||
-------------
|
-------------
|
||||||
-- Helpers --
|
-- Helpers --
|
||||||
-------------
|
-------------
|
||||||
local on_attach = function(client, bufno)
|
local on_attach = function(client, bufnr)
|
||||||
vim.api.nvim_set_option_value("omnifunc", "v:lua.vim.lsp.omnifunc", { buf = bufno })
|
vim.api.nvim_set_option_value("omnifunc", "v:lua.vim.lsp.omnifunc", { buf = bufnr })
|
||||||
local ts = require("telescope.builtin")
|
local telescope = require("telescope.builtin")
|
||||||
local opts = { buffer = bufno }
|
|
||||||
|
|
||||||
map("n", "K", vim.lsp.buf.hover, opts)
|
map("n", "K", vim.lsp.buf.hover, { buffer = bufnr })
|
||||||
map("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
map("n", "<C-k>", vim.lsp.buf.signature_help, { buffer = bufnr })
|
||||||
map("n", "gd", vim.lsp.buf.definition, opts)
|
map("n", "gd", telescope.lsp_definitions, { buffer = bufnr })
|
||||||
-- conflicts with tabs
|
-- conflicts with tabs
|
||||||
-- map("n", "gtd", vim.lsp.buf.type_definition, opts)
|
-- map("n", "gtd", vim.lsp.buf.type_definition, { buffer = bufnr })
|
||||||
map("n", "gi", vim.lsp.buf.implementation, opts)
|
-- map("n", "gi", vim.lsp.buf.implementation, { buffer = bufnr })
|
||||||
map("n", "gu", ts.lsp_references, opts)
|
map("n", "gu", telescope.lsp_references, { buffer = bufnr })
|
||||||
map("n", "<leader>ca", vim.lsp.buf.code_action, opts)
|
map("n", "<leader>ca", vim.lsp.buf.code_action, { buffer = bufnr })
|
||||||
map("n", "<leader>cl", vim.lsp.codelens.run, opts)
|
map("n", "<leader>cl", vim.lsp.codelens.run, { buffer = bufnr })
|
||||||
map("n", "<leader>r", vim.lsp.buf.rename, opts)
|
map("n", "<leader>r", vim.lsp.buf.rename, { buffer = bufnr })
|
||||||
map("n", "<leader>f", function() vim.lsp.buf.format { async = true } end, opts)
|
map("n", "<leader>f", function() vim.lsp.buf.format { async = true } end, { buffer = bufnr })
|
||||||
|
|
||||||
|
local filetype = vim.api.nvim_get_option_value("filetype", { buf = bufnr })
|
||||||
|
if
|
||||||
|
client:supports_method(methods.textDocument_inlayHint)
|
||||||
|
-- Never start cabal with inlay hint request
|
||||||
|
-- Related: https://github.com/mrcjkb/haskell-tools.nvim/discussions/485
|
||||||
|
and filetype ~= "cabal"
|
||||||
|
then
|
||||||
|
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Helix style border
|
-- Helix style border
|
||||||
|
|
@ -112,14 +122,11 @@ function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Diagnostic display configuration
|
-- Diagnostic display configuration
|
||||||
vim.diagnostic.config { virtual_text = true, severity_sort = true }
|
vim.diagnostic.config { virtual_text = false, severity_sort = true }
|
||||||
|
|
||||||
-- Set log level
|
-- Set log level
|
||||||
vim.lsp.set_log_level("off")
|
vim.lsp.set_log_level("off")
|
||||||
|
|
||||||
-- Enable inlay hints
|
|
||||||
vim.lsp.inlay_hint.enable()
|
|
||||||
|
|
||||||
-- Gutter symbols setup
|
-- Gutter symbols setup
|
||||||
vim.fn.sign_define("DiagnosticSignError", { text = "E", texthl = "DiagnosticSignError", numhl = "DiagnosticSignError" })
|
vim.fn.sign_define("DiagnosticSignError", { text = "E", texthl = "DiagnosticSignError", numhl = "DiagnosticSignError" })
|
||||||
vim.fn.sign_define("DiagnosticSignWarn", { text = "W", texthl = "DiagnosticSignWarn", numhl = "DiagnosticSignWarn" })
|
vim.fn.sign_define("DiagnosticSignWarn", { text = "W", texthl = "DiagnosticSignWarn", numhl = "DiagnosticSignWarn" })
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
require("oil").setup {
|
require("oil").setup {
|
||||||
|
-- This bug would prevent downloading language files from working
|
||||||
|
-- https://github.com/stevearc/oil.nvim/issues/483
|
||||||
default_file_explorer = false,
|
default_file_explorer = false,
|
||||||
columns = {
|
columns = {
|
||||||
-- "icon",
|
-- "icon",
|
||||||
|
|
@ -11,7 +13,7 @@ require("oil").setup {
|
||||||
keymaps = {
|
keymaps = {
|
||||||
["g?"] = "actions.show_help",
|
["g?"] = "actions.show_help",
|
||||||
["<CR>"] = "actions.select",
|
["<CR>"] = "actions.select",
|
||||||
["<C-v>"] = "actions.select_vsplit",
|
-- ["<C-v>"] = "actions.select_vsplit",
|
||||||
["<C-x>"] = "actions.select_split",
|
["<C-x>"] = "actions.select_split",
|
||||||
["<C-t>"] = "actions.select_tab",
|
["<C-t>"] = "actions.select_tab",
|
||||||
["<C-p>"] = "actions.preview",
|
["<C-p>"] = "actions.preview",
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
local ts = require("telescope")
|
local telescope = require("telescope")
|
||||||
local actions = require("telescope.actions")
|
local actions = require("telescope.actions")
|
||||||
local themes = require("telescope.themes")
|
local themes = require("telescope.themes")
|
||||||
local config = require("telescope.config")
|
local config = require("telescope.config")
|
||||||
local builtin = require("telescope.builtin")
|
local builtin = require("telescope.builtin")
|
||||||
local map = vim.keymap.set
|
local state = require("telescope.state")
|
||||||
|
|
||||||
-- Clone the default Telescope configuration
|
-- Clone the default Telescope configuration
|
||||||
local vimgrep_arguments = { unpack(config.values.vimgrep_arguments) }
|
local vimgrep_arguments = { unpack(config.values.vimgrep_arguments) }
|
||||||
|
|
@ -12,31 +12,68 @@ table.insert(vimgrep_arguments, "--hidden") -- search hidden
|
||||||
table.insert(vimgrep_arguments, "--glob") -- ignore git
|
table.insert(vimgrep_arguments, "--glob") -- ignore git
|
||||||
table.insert(vimgrep_arguments, "!**/.git/*")
|
table.insert(vimgrep_arguments, "!**/.git/*")
|
||||||
|
|
||||||
ts.setup {
|
telescope.setup {
|
||||||
defaults = {
|
-- Workaround
|
||||||
|
-- https://github.com/nvim-telescope/telescope.nvim/issues/938#issuecomment-877539724
|
||||||
|
defaults = themes.get_ivy {
|
||||||
vimgrep_arguments = vimgrep_arguments,
|
vimgrep_arguments = vimgrep_arguments,
|
||||||
mappings = {
|
mappings = {
|
||||||
|
n = {
|
||||||
|
["<C-c>"] = actions.close,
|
||||||
|
},
|
||||||
i = {
|
i = {
|
||||||
["<esc>"] = actions.close,
|
["<C-Up>"] = actions.cycle_history_prev,
|
||||||
|
["<C-Down>"] = actions.cycle_history_next,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
layout_config = { height = 0.4 },
|
||||||
|
borderchars = { "", "", "", "│", "", "", "", "" },
|
||||||
},
|
},
|
||||||
pickers = {
|
pickers = {
|
||||||
find_files = {
|
find_files = {
|
||||||
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
|
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
|
||||||
},
|
},
|
||||||
|
current_buffer_fuzzy_find = {
|
||||||
|
layout_config = { height = 0.8 },
|
||||||
|
},
|
||||||
|
lsp_references = {
|
||||||
|
layout_config = { height = 0.8 },
|
||||||
|
initial_mode = "normal",
|
||||||
|
},
|
||||||
|
live_grep = {
|
||||||
|
layout_config = { height = 0.8 },
|
||||||
|
},
|
||||||
|
resume = {
|
||||||
|
initial_mode = "normal",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Enable telescope fzf native, if installed
|
-- Enable telescope fzf native, if installed
|
||||||
pcall(require("telescope").load_extension, "fzf")
|
pcall(require("telescope").load_extension, "fzf")
|
||||||
|
|
||||||
map("n", "<leader>/", function() builtin.current_buffer_fuzzy_find(themes.get_dropdown { previewer = false }) end)
|
-- Waiting for better state management upstream
|
||||||
map("n", "<leader>sf", builtin.find_files)
|
-- Currently we have to wire the state ourselves
|
||||||
map("n", "<leader>gf", builtin.git_files)
|
local buffer_picker = nil
|
||||||
map("n", "<leader>?", builtin.help_tags)
|
local init_buffer_picker = function()
|
||||||
map("n", "<leader>sw", builtin.grep_string)
|
builtin["current_buffer_fuzzy_find"]()
|
||||||
map("n", "<leader>sg", builtin.live_grep)
|
local cached_pickers = state.get_global_key("cached_pickers") or {}
|
||||||
map("n", "<leader>sd", builtin.diagnostics)
|
buffer_picker = cached_pickers[1]
|
||||||
map("n", "<leader>b", builtin.buffers)
|
end
|
||||||
map("n", "<leader>sp", builtin.spell_suggest)
|
local cached_buffer_picker = function()
|
||||||
|
if buffer_picker == nil then
|
||||||
|
init_buffer_picker()
|
||||||
|
else
|
||||||
|
builtin.resume { picker = buffer_picker }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.keymap.set("n", "/", init_buffer_picker)
|
||||||
|
vim.keymap.set("n", "?", cached_buffer_picker)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>/", builtin["find_files"])
|
||||||
|
-- vim.keymap.set("n", "<leader>g/", builtin["git_files"])
|
||||||
|
vim.keymap.set("n", "<leader>?", builtin["help_tags"])
|
||||||
|
vim.keymap.set("n", "<leader>g/", builtin["live_grep"])
|
||||||
|
vim.keymap.set("n", "<leader>d", builtin["diagnostics"])
|
||||||
|
vim.keymap.set("n", "<leader>b", builtin["buffers"])
|
||||||
|
vim.keymap.set("n", "<leader>sp", builtin["spell_suggest"])
|
||||||
|
|
|
||||||
|
|
@ -25,32 +25,5 @@ require("nvim-treesitter.configs").setup {
|
||||||
if ok and stats and stats.size > max_filesize then return true end
|
if ok and stats and stats.size > max_filesize then return true end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- Text objets
|
indent = true,
|
||||||
textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true,
|
|
||||||
keymaps = {
|
|
||||||
["af"] = "@function.outer",
|
|
||||||
["if"] = "@function.inner",
|
|
||||||
["ac"] = "@class.outer",
|
|
||||||
["ic"] = "@class.inner",
|
|
||||||
},
|
|
||||||
selection_modes = {
|
|
||||||
["@parameter.outer"] = "v", -- charwise
|
|
||||||
["@function.outer"] = "V", -- linewise
|
|
||||||
["@class.outer"] = "<c-v>", -- blockwise
|
|
||||||
},
|
|
||||||
include_surrounding_whitespace = true,
|
|
||||||
},
|
|
||||||
swap = {
|
|
||||||
enable = true,
|
|
||||||
swap_next = {
|
|
||||||
["<leader>a"] = "@parameter.inner",
|
|
||||||
},
|
|
||||||
swap_previous = {
|
|
||||||
["<leader>A"] = "@parameter.inner",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ vim.keymap.set("v", "=", "=gv")
|
||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||||
vim.keymap.set("n", "gd", "gdzz")
|
vim.keymap.set("n", "gd", "gdzz")
|
||||||
vim.keymap.set("n", "gD", "<C-w><C-v><C-w>wgd", { remap = true })
|
vim.keymap.set("n", "gD", "<C-w>vgd", { remap = true })
|
||||||
vim.keymap.set("n", "``", "``zz")
|
vim.keymap.set("n", "``", "``zz")
|
||||||
vim.keymap.set("n", "n", "nzzzv")
|
vim.keymap.set("n", "n", "nzzzv")
|
||||||
vim.keymap.set("n", "N", "Nzzzv")
|
vim.keymap.set("n", "N", "Nzzzv")
|
||||||
|
|
@ -45,8 +45,8 @@ vim.keymap.set("n", "Q", "<nop>") -- *do not* repeat the last recorded register
|
||||||
|
|
||||||
-- Diagnostics
|
-- Diagnostics
|
||||||
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float)
|
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float)
|
||||||
vim.keymap.set("n", "<leader>pe", vim.diagnostic.goto_prev)
|
vim.keymap.set("n", "<leader>pe", function() vim.diagnostic.jump { count = -1, float = true } end)
|
||||||
vim.keymap.set("n", "<leader>ne", vim.diagnostic.goto_next)
|
vim.keymap.set("n", "<leader>ne", function() vim.diagnostic.jump { count = 1, float = true } end)
|
||||||
|
|
||||||
vim.keymap.set("t", "<Leader><ESC>", "<C-\\><C-n>")
|
vim.keymap.set("t", "<Leader><ESC>", "<C-\\><C-n>")
|
||||||
|
|
||||||
|
|
@ -73,21 +73,18 @@ vim.keymap.set("n", "<leader>gl", function()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Fugitive
|
-- Fugitive
|
||||||
vim.keymap.set("n", "<leader>gP", function() vim.cmd("G push") end)
|
|
||||||
vim.keymap.set("n", "<leader>gp", function() vim.cmd("G pull") end)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader><space>", ":Git<CR>5<Down>")
|
vim.keymap.set("n", "<leader><space>", ":Git<CR>5<Down>")
|
||||||
vim.keymap.set("n", "<leader>gu", ":diffget //2<CR>")
|
vim.keymap.set("n", "<leader>gu", ":diffget //2<CR>")
|
||||||
vim.keymap.set("n", "<leader>gh", ":diffget //3<CR>")
|
vim.keymap.set("n", "<leader>gh", ":diffget //3<CR>")
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = "fugitive",
|
|
||||||
callback = function() vim.keymap.set("n", "<leader><space>", ":q<CR>", { buffer = true }) end,
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>gb", ":Git blame<CR>")
|
vim.keymap.set("n", "<leader>gb", ":Git blame<CR>")
|
||||||
vim.keymap.set("n", "<leader>gB", ":Git blame --ignore-revs-file=.git-blame-ignore-revs<CR>")
|
vim.keymap.set("n", "<leader>gB", ":Git blame --ignore-revs-file=.git-blame-ignore-revs<CR>")
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = "fugitiveblame",
|
vim.api.nvim_create_autocmd("WinClosed", {
|
||||||
callback = function() vim.keymap.set("n", "<leader>gb", ":q<CR>", { buffer = true }) end,
|
group = vim.api.nvim_create_augroup("conf_fugitive_prevwin", {}),
|
||||||
|
callback = function(args)
|
||||||
|
local win = tonumber(args.match)
|
||||||
|
if win == vim.api.nvim_get_current_win() and vim.bo.filetype == "fugitive" then vim.cmd.wincmd("p") end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- NoNeckPain
|
-- NoNeckPain
|
||||||
|
|
|
||||||
|
|
@ -31,3 +31,6 @@ vim.o.showmode = false
|
||||||
|
|
||||||
vim.opt.listchars = { tab = "│ ", trail = "␣" }
|
vim.opt.listchars = { tab = "│ ", trail = "␣" }
|
||||||
vim.o.list = true
|
vim.o.list = true
|
||||||
|
|
||||||
|
vim.o.splitright = true
|
||||||
|
vim.o.splitbelow = true
|
||||||
|
|
|
||||||
8
Justfile
8
Justfile
|
|
@ -5,7 +5,7 @@ os host action:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./nix/sources.nix; in sources.nixpkgs.outPath" | jq -r .)
|
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .)
|
||||||
sudo nixos-rebuild {{ action }} \
|
sudo nixos-rebuild {{ action }} \
|
||||||
-I nixpkgs=${nixpkgs} \
|
-I nixpkgs=${nixpkgs} \
|
||||||
-I nixos-config=./nix/configurations/{{ host }}.nix \
|
-I nixos-config=./nix/configurations/{{ host }}.nix \
|
||||||
|
|
@ -17,12 +17,16 @@ install host:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./nix/sources.nix; in sources.nixpkgs.outPath" | jq -r .)
|
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .)
|
||||||
sudo nixos-install \
|
sudo nixos-install \
|
||||||
-I nixpkgs=${nixpkgs} \
|
-I nixpkgs=${nixpkgs} \
|
||||||
-I nixos-config=./nix/configurations/{{ host }}.nix \
|
-I nixos-config=./nix/configurations/{{ host }}.nix \
|
||||||
--file ./default.nix \
|
--file ./default.nix \
|
||||||
--attr "nixosConfigurations.{{ host }}"
|
--attr "nixosConfigurations.{{ host }}"
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
sudo nix-env --delete-generations +10 -p /nix/var/nix/profiles/system
|
||||||
|
nix-env --delete-generations +10 -p ~/.local/state/nix/profiles/home-manager
|
||||||
|
|
||||||
update:
|
update:
|
||||||
npins update
|
npins update
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ This repo is managed with Nix + GNU stow
|
||||||
- Installation (iirc the disko auto install has some issues)
|
- Installation (iirc the disko auto install has some issues)
|
||||||
```bash
|
```bash
|
||||||
# Are you sure the disko config has the right drive path?
|
# Are you sure the disko config has the right drive path?
|
||||||
disko -- -m disko ./disko.nix # format the drive
|
disko -m disko ./disko.nix # format the drive
|
||||||
|
|
||||||
# optional for unknown hard ware
|
# optional for unknown hard ware
|
||||||
nixos-generate-config --no-filesystems --root /mnt --dir . # disko will take care of the file system configuration
|
nixos-generate-config --no-filesystems --root /mnt --dir . # disko will take care of the file system configuration
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{sources ? import ./nix/sources.nix}: {
|
{sources ? import ./npins}: {
|
||||||
lib = import (sources.nixpkgs + "/lib");
|
lib = import (sources.nixpkgs + "/lib");
|
||||||
|
|
||||||
nixosConfigurations = builtins.mapAttrs (_: import (sources.nixpkgs + "/nixos/lib/eval-config.nix")) {
|
nixosConfigurations = builtins.mapAttrs (_: import (sources.nixpkgs + "/nixos/lib/eval-config.nix")) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Entry point to cherry pick modules
|
# Entry point to cherry pick modules
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
|
|
||||||
hostname = "tungsten";
|
hostname = "tungsten";
|
||||||
username = "leana";
|
username = "leana";
|
||||||
|
|
@ -134,7 +134,6 @@ in
|
||||||
../homeModules/common/vim
|
../homeModules/common/vim
|
||||||
../homeModules/common/wired
|
../homeModules/common/wired
|
||||||
../homeModules/common/atuin.nix
|
../homeModules/common/atuin.nix
|
||||||
../homeModules/common/battery-notify.nix
|
|
||||||
../homeModules/common/direnv.nix
|
../homeModules/common/direnv.nix
|
||||||
../homeModules/common/feh.nix
|
../homeModules/common/feh.nix
|
||||||
../homeModules/common/firefox.nix
|
../homeModules/common/firefox.nix
|
||||||
|
|
@ -144,7 +143,6 @@ in
|
||||||
../homeModules/common/kitty.nix
|
../homeModules/common/kitty.nix
|
||||||
../homeModules/common/leana.nix
|
../homeModules/common/leana.nix
|
||||||
../homeModules/common/locale.nix
|
../homeModules/common/locale.nix
|
||||||
../homeModules/common/neovim.nix
|
|
||||||
../homeModules/common/packages.nix
|
../homeModules/common/packages.nix
|
||||||
../homeModules/common/password-store.nix
|
../homeModules/common/password-store.nix
|
||||||
../homeModules/common/sioyek.nix
|
../homeModules/common/sioyek.nix
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,6 @@
|
||||||
pkgs.xbrightness
|
pkgs.xbrightness
|
||||||
pkgs.dmenu
|
pkgs.dmenu
|
||||||
pkgs.xclip
|
pkgs.xclip
|
||||||
pkgs.playerctl # talk to playerctld
|
|
||||||
pkgs.xscreensaver # talk to xscreensaver
|
pkgs.xscreensaver # talk to xscreensaver
|
||||||
pkgs.xcolor
|
pkgs.xcolor
|
||||||
|
|
||||||
|
|
@ -104,12 +103,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
components = ["secrets"];
|
components = ["secrets"];
|
||||||
};
|
};
|
||||||
|
|
||||||
battery-notify = {
|
|
||||||
enable = true;
|
|
||||||
device_full = "/sys/class/power_supply/BAT0/charge_full";
|
|
||||||
device_now = "/sys/class/power_supply/BAT0/charge_now";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -9,20 +9,38 @@
|
||||||
, position = BottomH 30
|
, position = BottomH 30
|
||||||
, commands = [ Run Date "%a %d %H:%M:%S" "date" 10
|
, commands = [ Run Date "%a %d %H:%M:%S" "date" 10
|
||||||
, Run Battery
|
, Run Battery
|
||||||
[ "-t", "<acstatus>:<left>%"
|
[ "-t", "<left> (<timeleft>)"
|
||||||
, "--"
|
, "-H", "70"
|
||||||
, "-O", ""
|
, "-L", "20"
|
||||||
, "-i", ""
|
|
||||||
, "-o", ""
|
|
||||||
, "-h", "green"
|
, "-h", "green"
|
||||||
, "-m", "yell"
|
, "-n", "orange"
|
||||||
, "-l", "red"
|
, "-l", "red"
|
||||||
|
, "--"
|
||||||
|
, "-P"
|
||||||
|
, "-A", "20"
|
||||||
|
, "-a", "notify-send -u critical \"Battery Low\" \"Please charge your battery\""
|
||||||
] 10
|
] 10
|
||||||
, Run XMonadLog
|
, Run XMonadLog
|
||||||
|
, Run
|
||||||
|
DynNetwork
|
||||||
|
[ "--template"
|
||||||
|
, "<dev>: ↑ <tx> kB/s ↓ <rx> kB/s"
|
||||||
|
, "--Low"
|
||||||
|
, "102400"
|
||||||
|
, "--High"
|
||||||
|
, "1024000"
|
||||||
|
, "--low"
|
||||||
|
, "green"
|
||||||
|
, "--normal"
|
||||||
|
, "orange"
|
||||||
|
, "--high"
|
||||||
|
, "red"
|
||||||
|
]
|
||||||
|
10
|
||||||
]
|
]
|
||||||
, sepChar = "%"
|
, sepChar = "%"
|
||||||
, alignSep = "}{"
|
, alignSep = "}{"
|
||||||
, template = " %XMonadLog% }{ %battery% | %date% "
|
, template = " %XMonadLog% }{ %dynnetwork% | %battery% | %date% "
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@
|
||||||
|
|
||||||
services.fprintd.enable = false;
|
services.fprintd.enable = false;
|
||||||
|
|
||||||
programs.weylus = {
|
# programs.weylus = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
users = ["leana"];
|
# users = ["leana"];
|
||||||
openFirewall = true;
|
# openFirewall = true;
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Entry point to cherry pick modules
|
# Entry point to cherry pick modules
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
|
|
||||||
hostname = "vanadium";
|
hostname = "vanadium";
|
||||||
username = "leana";
|
username = "leana";
|
||||||
|
|
@ -153,7 +153,6 @@ in
|
||||||
../homeModules/common/vim
|
../homeModules/common/vim
|
||||||
../homeModules/common/wired
|
../homeModules/common/wired
|
||||||
../homeModules/common/atuin.nix
|
../homeModules/common/atuin.nix
|
||||||
../homeModules/common/battery-notify.nix
|
|
||||||
../homeModules/common/direnv.nix
|
../homeModules/common/direnv.nix
|
||||||
../homeModules/common/feh.nix
|
../homeModules/common/feh.nix
|
||||||
../homeModules/common/firefox.nix
|
../homeModules/common/firefox.nix
|
||||||
|
|
@ -164,7 +163,6 @@ in
|
||||||
../homeModules/common/leana.nix
|
../homeModules/common/leana.nix
|
||||||
../homeModules/common/locale.nix
|
../homeModules/common/locale.nix
|
||||||
../homeModules/common/lazygit.nix
|
../homeModules/common/lazygit.nix
|
||||||
../homeModules/common/neovim.nix
|
|
||||||
../homeModules/common/packages.nix
|
../homeModules/common/packages.nix
|
||||||
../homeModules/common/password-store.nix
|
../homeModules/common/password-store.nix
|
||||||
../homeModules/common/sioyek.nix
|
../homeModules/common/sioyek.nix
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,10 @@
|
||||||
pkgs.taplo # toml
|
pkgs.taplo # toml
|
||||||
pkgs.vscode-langservers-extracted # JSON etc
|
pkgs.vscode-langservers-extracted # JSON etc
|
||||||
pkgs.yaml-language-server # yaml
|
pkgs.yaml-language-server # yaml
|
||||||
|
|
||||||
|
# bash
|
||||||
|
pkgs.shfmt
|
||||||
|
pkgs.nodePackages.bash-language-server
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
policies = {
|
policies = {
|
||||||
RequestedLocales = ["fr" "en-US" "zh-TW"];
|
|
||||||
|
|
||||||
SearchEngines = {
|
SearchEngines = {
|
||||||
Default = "Google en@en";
|
Default = "Google en@en";
|
||||||
Remove = ["Google"];
|
Remove = ["Google"];
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
|
|
||||||
emacs = {
|
emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.emacs28;
|
package = pkgs.unsafe-emacs28;
|
||||||
};
|
};
|
||||||
|
|
||||||
lazygit.enable = true;
|
lazygit.enable = true;
|
||||||
|
|
@ -106,7 +106,6 @@
|
||||||
# productivity / media
|
# productivity / media
|
||||||
pkgs.evolution
|
pkgs.evolution
|
||||||
pkgs.libreoffice
|
pkgs.libreoffice
|
||||||
pkgs.iamb
|
|
||||||
pkgs.calibre
|
pkgs.calibre
|
||||||
# pkgs.rawtherapee
|
# pkgs.rawtherapee
|
||||||
pkgs.digikam
|
pkgs.digikam
|
||||||
|
|
@ -159,12 +158,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
components = ["secrets"];
|
components = ["secrets"];
|
||||||
};
|
};
|
||||||
|
|
||||||
battery-notify = {
|
|
||||||
enable = true;
|
|
||||||
device_full = "/sys/class/power_supply/BAT1/charge_full";
|
|
||||||
device_now = "/sys/class/power_supply/BAT1/charge_now";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
{
|
{
|
||||||
programs.xmobar = {
|
programs.xmobar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# XMobar's config file is not a segment of valid Haskell source code -- it is instead a DSL
|
||||||
|
# Note how `Run` handles its arguments properly without parens?
|
||||||
|
#
|
||||||
|
# Also xmobar wants GHC if we use it as a library, and I'm lazy, you probably want to keep it this way.
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
Config { overrideRedirect = False
|
Config { overrideRedirect = False
|
||||||
, font = "Iosevka 13"
|
, font = "Iosevka 13"
|
||||||
|
|
@ -9,20 +13,48 @@
|
||||||
, position = BottomH 30
|
, position = BottomH 30
|
||||||
, commands = [ Run Date "%a %d %H:%M:%S" "date" 10
|
, commands = [ Run Date "%a %d %H:%M:%S" "date" 10
|
||||||
, Run Battery
|
, Run Battery
|
||||||
[ "-t", "<acstatus>:<left>%"
|
[ "-t", "<left> (<timeleft>)"
|
||||||
, "--"
|
, "-H", "70"
|
||||||
, "-O", ""
|
, "-L", "20"
|
||||||
, "-i", ""
|
|
||||||
, "-o", ""
|
|
||||||
, "-h", "green"
|
, "-h", "green"
|
||||||
, "-m", "yell"
|
, "-n", "orange"
|
||||||
, "-l", "red"
|
, "-l", "red"
|
||||||
] 10
|
, "--"
|
||||||
|
, "-P"
|
||||||
|
, "-A", "20"
|
||||||
|
, "-a", "notify-send -u critical \"Battery Low\" \"Please charge your battery\""
|
||||||
|
]
|
||||||
|
600
|
||||||
, Run XMonadLog
|
, Run XMonadLog
|
||||||
|
, Run
|
||||||
|
DynNetwork
|
||||||
|
[ "--template"
|
||||||
|
, "<dev>: ↑ <tx> kB/s ↓ <rx> kB/s"
|
||||||
|
, "--Low"
|
||||||
|
, "102400"
|
||||||
|
, "--High"
|
||||||
|
, "1024000"
|
||||||
|
, "--low"
|
||||||
|
, "green"
|
||||||
|
, "--normal"
|
||||||
|
, "orange"
|
||||||
|
, "--high"
|
||||||
|
, "red"
|
||||||
|
]
|
||||||
|
100
|
||||||
|
, Run
|
||||||
|
Weather "LFRN"
|
||||||
|
[ "-t", "<station>: <tempC>C"
|
||||||
|
, "-L","10", "-H", "25"
|
||||||
|
, "--normal", "white"
|
||||||
|
, "--high", "orange"
|
||||||
|
, "--low", "blue"
|
||||||
|
]
|
||||||
|
9000
|
||||||
]
|
]
|
||||||
, sepChar = "%"
|
, sepChar = "%"
|
||||||
, alignSep = "}{"
|
, alignSep = "}{"
|
||||||
, template = " %XMonadLog% }{ %battery% | %date% "
|
, template = " %XMonadLog% }{ %dynnetwork% | %LFRN% | %battery% | %date% "
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import XMonad.Util.SpawnOnce (spawnOnce)
|
||||||
import XMonad.Layout.NoBorders (smartBorders)
|
import XMonad.Layout.NoBorders (smartBorders)
|
||||||
import XMonad.Layout.Reflect (reflectHoriz)
|
import XMonad.Layout.Reflect (reflectHoriz)
|
||||||
import XMonad.Layout.Spacing (smartSpacingWithEdge)
|
import XMonad.Layout.Spacing (smartSpacingWithEdge)
|
||||||
|
import XMonad.Layout.Renamed (named)
|
||||||
import XMonad.Layout.ResizableTile (ResizableTall(ResizableTall), MirrorResize (MirrorShrink, MirrorExpand))
|
import XMonad.Layout.ResizableTile (ResizableTall(ResizableTall), MirrorResize (MirrorShrink, MirrorExpand))
|
||||||
|
|
||||||
import XMonad.Hooks.ManageHelpers (isFullscreen, (~?), composeOne, (-?>))
|
import XMonad.Hooks.ManageHelpers (isFullscreen, (~?), composeOne, (-?>))
|
||||||
|
|
@ -93,7 +94,8 @@ main = xmonad
|
||||||
let tallr = reflectMsg . reflectHoriz
|
let tallr = reflectMsg . reflectHoriz
|
||||||
$ ResizableTall 1 (1/10) (3/7) []
|
$ ResizableTall 1 (1/10) (3/7) []
|
||||||
in smartBorders
|
in smartBorders
|
||||||
( smartSpacingWithEdge 5 tallr
|
( named "Normal"
|
||||||
|
(smartSpacingWithEdge 5 tallr)
|
||||||
||| Full
|
||| Full
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -184,9 +186,9 @@ main = xmonad
|
||||||
|
|
||||||
-- Screenshots
|
-- Screenshots
|
||||||
++ (let
|
++ (let
|
||||||
fullscreen = "maim | xclip -in -selection clipboard -t image/png"
|
fullscreen = "maim -u | xclip -in -selection clipboard -t image/png"
|
||||||
withSelection = "maim -s -b 5 -o | xclip -in -selection clipboard -t image/png"
|
withSelection = "maim -u -s -b 5 -o | xclip -in -selection clipboard -t image/png"
|
||||||
toFloat = "maim -s -b 5 -o | feh --auto-zoom -"
|
toFloat = "maim -u -s -b 5 -o | feh --auto-zoom -"
|
||||||
in
|
in
|
||||||
[ ((0, xK_Print), spawn fullscreen )
|
[ ((0, xK_Print), spawn fullscreen )
|
||||||
, ((superMask .|. shiftMask, xK_3 ), spawn fullscreen )
|
, ((superMask .|. shiftMask, xK_3 ), spawn fullscreen )
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@
|
||||||
|
|
||||||
services.fprintd.enable = false;
|
services.fprintd.enable = false;
|
||||||
|
|
||||||
programs.weylus = {
|
# programs.weylus = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
users = ["leana"];
|
# users = ["leana"];
|
||||||
openFirewall = true;
|
# openFirewall = true;
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../../sources.nix;
|
sources = import ../../../npins;
|
||||||
lib = import (sources.nixpkgs + "/lib");
|
lib = import (sources.nixpkgs + "/lib");
|
||||||
|
|
||||||
infuse-lib = import sources.infuse {
|
infuse-lib = import sources.infuse {
|
||||||
|
|
@ -54,4 +54,18 @@ in
|
||||||
./patches/fcitx5-chinese-addons/disable-fullwidth.patch
|
./patches/fcitx5-chinese-addons/disable-fullwidth.patch
|
||||||
# Note: disabling pinyin helper breaks canjie
|
# Note: disabling pinyin helper breaks canjie
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# TODO: remove this when upstream is updated
|
||||||
|
sudo.__output.patches.__append = [
|
||||||
|
(final.fetchpatch {
|
||||||
|
name = "CVE-2025-32462";
|
||||||
|
url = "https://github.com/sudo-project/sudo/commit/d530367828e3713d09489872743eb92d31fb11ff.patch";
|
||||||
|
hash = "sha256-mS8fcPV1QDv9SDuGN7dfDLtVLSBP+apotYW1UsEBPvU=";
|
||||||
|
})
|
||||||
|
(final.fetchpatch {
|
||||||
|
name = "CVE-2025-32463";
|
||||||
|
url = "https://github.com/sudo-project/sudo/commit/fdafc2ceb36382b07e604c0f39903d56bef54016.patch";
|
||||||
|
hash = "sha256-4FP8z5pKwcOfJxjJ9X/IbCgriKJm1H/HnswuvYjBlt8=";
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# This is the non flake shell that just gets the basics of flora so I can have hls support outside of docker
|
# This is the non flake shell that just gets the basics of flora so I can have hls support outside of docker
|
||||||
#
|
#
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
{pkgs ? import sources.pin-florashell {}}:
|
{pkgs ? import sources.pin-florashell {}}:
|
||||||
pkgs.mkShell (let
|
pkgs.mkShell (let
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
{pkgs ? import sources.pin-necro-man-nixpkgs {}}: let
|
{pkgs ? import sources.pin-necro-man-nixpkgs {}}: let
|
||||||
shell = {
|
shell = {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
{pkgs ? import sources.pin-vim-tw {}}:
|
{pkgs ? import sources.pin-vim-tw {}}:
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
|
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.services."battery-notify";
|
|
||||||
in {
|
|
||||||
options = {
|
|
||||||
services."battery-notify" = {
|
|
||||||
enable = lib.mkEnableOption "battery-notify";
|
|
||||||
triggerLevel = lib.mkOption {
|
|
||||||
type = with lib.types; ints.between 0 100;
|
|
||||||
description = "Below which percentage should the script send a notification";
|
|
||||||
default = 20;
|
|
||||||
};
|
|
||||||
checkAt = lib.mkOption {
|
|
||||||
type = with lib.types; listOf str;
|
|
||||||
description = "At which frequency should the service check for the battery status";
|
|
||||||
default = ["*:0/5"]; # every five minutes
|
|
||||||
};
|
|
||||||
device_full = lib.mkOption {
|
|
||||||
type = with lib.types; str;
|
|
||||||
description = "The device to read for full energy status";
|
|
||||||
};
|
|
||||||
device_now = lib.mkOption {
|
|
||||||
type = with lib.types; str;
|
|
||||||
description = "The device to read for current energy status";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
systemd.user.services."battery-notify" = {
|
|
||||||
Unit.Description = "Notify when battery is low";
|
|
||||||
Install = {
|
|
||||||
WantedBy = ["multi-user.target"];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStart = let
|
|
||||||
script = pkgs.writeShellApplication {
|
|
||||||
name = "battery-notify";
|
|
||||||
runtimeInputs = [
|
|
||||||
pkgs.libnotify
|
|
||||||
pkgs.bc
|
|
||||||
pkgs.uutils-coreutils-noprefix
|
|
||||||
];
|
|
||||||
text = ''
|
|
||||||
now="$(cat ${cfg.device_now})"
|
|
||||||
full="$(cat ${cfg.device_full})"
|
|
||||||
|
|
||||||
if (( $(bc -l <<< "($now / $full) * 100 < ${builtins.toString cfg.triggerLevel}") )); then
|
|
||||||
notify-send -u critical "Battery Low" "Please charge your battery"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in "${lib.getExe script}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.timers."battery-notify" = {
|
|
||||||
Unit.Description = "Notify when battery is low";
|
|
||||||
Timer = {
|
|
||||||
OnCalendar = cfg.checkAt;
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
Install.WantedBy = ["timers.target"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -3,36 +3,24 @@
|
||||||
in {
|
in {
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
# https://mozilla.github.io/policy-templates
|
# https://mozilla.github.io/policy-templates
|
||||||
|
# The following have more complex logic, keep them as policies and not profiles
|
||||||
policies = {
|
policies = {
|
||||||
|
# Trans lations are of poor quality anyways
|
||||||
|
RequestedLocales = ["en-US"];
|
||||||
|
|
||||||
SearchEngines = {
|
SearchEngines = {
|
||||||
Remove = ["Bing" "DuckDuckGo" "Qwant" "eBay"];
|
Remove = ["Bing" "DuckDuckGo" "Qwant" "eBay"];
|
||||||
};
|
};
|
||||||
HardwareAcceleration = true;
|
NoDefaultBookmarks = true;
|
||||||
DisableFirefoxScreenshots = false;
|
|
||||||
DisablePocket = true;
|
|
||||||
DisplayMenuBar = "never";
|
DisplayMenuBar = "never";
|
||||||
DisplayBookmarksToolbar = "never";
|
DisplayBookmarksToolbar = "never";
|
||||||
NoDefaultBookmarks = true;
|
|
||||||
OfferToSaveLogins = false;
|
|
||||||
OfferToSaveLoginsDefault = false;
|
|
||||||
PasswordManagerEnabled = false;
|
|
||||||
FirefoxHome = {
|
|
||||||
Search = true;
|
|
||||||
TopSites = true;
|
|
||||||
SponsoredTopSites = false;
|
|
||||||
Highlights = false;
|
|
||||||
Pocket = false;
|
|
||||||
SponsoredPocket = false;
|
|
||||||
};
|
|
||||||
UserMessaging = {
|
|
||||||
ExtensionRecommendations = false;
|
|
||||||
SkipOnboarding = true;
|
|
||||||
};
|
|
||||||
DNSOverHTTPS = {
|
DNSOverHTTPS = {
|
||||||
Enabled = true;
|
Enabled = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# https://searchfox.org/mozilla-central/source/browser/components/enterprisepolicies/Policies.sys.mjs
|
||||||
|
# Some policies can be rewritten to profiles configuration
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
settings = {
|
settings = {
|
||||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
|
|
@ -40,6 +28,45 @@ in {
|
||||||
"browser.ctrlTab.sortByRecentlyUsed" = false;
|
"browser.ctrlTab.sortByRecentlyUsed" = false;
|
||||||
"layout.css.devPixelsPerPx" = 1.1;
|
"layout.css.devPixelsPerPx" = 1.1;
|
||||||
"full-screen-api.ignore-widgets" = true; # limit fullscreen mode to window
|
"full-screen-api.ignore-widgets" = true; # limit fullscreen mode to window
|
||||||
|
|
||||||
|
# Sponsored crap
|
||||||
|
# Yes
|
||||||
|
"browser.newtabpage.activity-stream.showSearch" = true;
|
||||||
|
"browser.newtabpage.activity-stream.feeds.topsites" = true;
|
||||||
|
# No
|
||||||
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||||
|
"browser.newtabpage.activity-stream.feeds.section.highlights" = false;
|
||||||
|
"browser.newtabpage.activity-stream.feeds.system.topstories" = false;
|
||||||
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
|
||||||
|
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||||
|
|
||||||
|
# URL
|
||||||
|
# Yes
|
||||||
|
"browser.urlbar.suggest.quicksuggest.nonsponsored" = true;
|
||||||
|
# No
|
||||||
|
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
|
||||||
|
|
||||||
|
# Pasword manager
|
||||||
|
"signon.rememberSignons" = false;
|
||||||
|
"services.passwordSavingEnabled" = false;
|
||||||
|
"pref.privacy.disable_button.view_passwords" = false;
|
||||||
|
|
||||||
|
# Hardware acceleration
|
||||||
|
"layers.acceleration.disabled" = false;
|
||||||
|
|
||||||
|
# Screenshot
|
||||||
|
"screenshots.browser.component.enabled" = true;
|
||||||
|
|
||||||
|
# Recommendations
|
||||||
|
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false;
|
||||||
|
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;
|
||||||
|
"extensions.htmlaboutaddons.recommendations.enabled" = false; # Addons
|
||||||
|
|
||||||
|
# Onboarding
|
||||||
|
"browser.aboutwelcome.enabled" = false;
|
||||||
|
|
||||||
|
# AI crap
|
||||||
|
"browser.ml.chat.enabled" = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
extensions.packages = let
|
extensions.packages = let
|
||||||
|
|
@ -47,6 +74,15 @@ in {
|
||||||
in [
|
in [
|
||||||
addons.ublock-origin
|
addons.ublock-origin
|
||||||
addons.privacy-badger
|
addons.privacy-badger
|
||||||
|
|
||||||
|
/*
|
||||||
|
Here's to you who want to remove news feed eradicator because you find it annoying:
|
||||||
|
It is here to annoy you so it is less likely for you to be on the agency inversion path.
|
||||||
|
DO NOT REMOVE IT. I repeat, DO NOT REMOVE IT.
|
||||||
|
|
||||||
|
If you think it's annoying, go do some jump rope, sing, live.
|
||||||
|
*/
|
||||||
|
addons.news-feed-eradicator # did you read the comment above?
|
||||||
addons.multi-account-containers
|
addons.multi-account-containers
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,21 @@
|
||||||
{lib, ...}: {
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# git plugins
|
# git plugins
|
||||||
programs.git = {
|
programs.git = {
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
difftastic = {
|
patdiff.enable = true;
|
||||||
enable = true;
|
};
|
||||||
enableAsDifftool = true;
|
|
||||||
|
# 懶惰鬼賴皮
|
||||||
|
programs.lazygit = let
|
||||||
|
patdiffCfg = config.programs.git.patdiff;
|
||||||
|
in
|
||||||
|
lib.mkIf patdiffCfg.enable {
|
||||||
|
settings = {
|
||||||
|
git.paging.externalDiffCommand = "${lib.getExe' patdiffCfg.package "patdiff-git-wrapper"}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.neovim;
|
|
||||||
in {
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
home.packages = [
|
|
||||||
# might be useful for servers, serves as minimal configuration
|
|
||||||
pkgs.nodePackages.bash-language-server
|
|
||||||
pkgs.shellcheck
|
|
||||||
pkgs.shfmt
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +1,5 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
security.sudo.extraConfig = ''
|
security.sudo.extraConfig = ''
|
||||||
Defaults lecture = always
|
Defaults lecture = always
|
||||||
Defaults lecture_file = ${pkgs.writeText "sudo_lecture_file" ''
|
|
||||||
λλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλ
|
|
||||||
|
|
||||||
λλλλ
|
|
||||||
λλλ
|
|
||||||
λλλ
|
|
||||||
λλλ Beep Boop
|
|
||||||
λλλ Are you sure about this?
|
|
||||||
λ λλλ Think twice :3
|
|
||||||
λ λλλ
|
|
||||||
λ λλλ
|
|
||||||
λ λλλ
|
|
||||||
λ λλλλ
|
|
||||||
|
|
||||||
λλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλλ
|
|
||||||
''}
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
final: _: {
|
final: _: {
|
||||||
inherit (final.callPackage sources.agenix {}) agenix;
|
inherit (final.callPackage sources.agenix {}) agenix;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
final: _: {
|
final: _: {
|
||||||
disko =
|
disko =
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
final: prev: {
|
final: prev: {
|
||||||
fcitx5-table-extra = prev.fcitx5-table-extra.overrideAttrs (oldAttrs: {
|
fcitx5-table-extra = prev.fcitx5-table-extra.overrideAttrs (oldAttrs: {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Run the one with my cool feature here for now
|
# Run the one with my cool feature here for now
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
inherit (sources) nil;
|
inherit (sources) nil;
|
||||||
inherit (nil.repository) owner repo;
|
inherit (nil.repository) owner repo;
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# The one in nixpkgs doesn't work
|
# The one in nixpkgs doesn't work
|
||||||
# Getting nix-tree: user error (Failed parsing nix path-info output.)
|
# Getting nix-tree: user error (Failed parsing nix path-info output.)
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
final: _: {
|
final: _: {
|
||||||
nix-tree = (import sources.nix-tree).packages.${final.system}.default;
|
nix-tree = (import sources.nix-tree).packages.${final.system}.default;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
_: prev: {
|
_: prev: {
|
||||||
nur = import sources.nur {
|
nur = import sources.nur {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
_: _: {
|
_: _: {
|
||||||
emacs28 = (import sources.pin-emacs28 {}).emacs;
|
unsafe-emacs28 = (import sources.pin-emacs28 {}).emacs;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
_: _: {
|
_: _: {
|
||||||
# Isabelle version 2023
|
# Isabelle version 2023
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
_: _: {
|
_: _: {
|
||||||
# Wireshark bug
|
# Wireshark bug
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
_: _: {
|
_: _: {
|
||||||
wallpapers = import sources.wallpapers {};
|
wallpapers = import sources.wallpapers {};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
let
|
let
|
||||||
sources = import ../sources.nix;
|
sources = import ../../npins;
|
||||||
in
|
in
|
||||||
(import sources.wired-notify).overlays.default
|
(import sources.wired-notify).overlays.default
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{sources ? import ../sources.nix}: let
|
{sources ? import ../../npins}: let
|
||||||
scopeOverlay = overlay: final: prev: {export = prev.export or {} // overlay final prev;};
|
scopeOverlay = overlay: final: prev: {export = prev.export or {} // overlay final prev;};
|
||||||
in
|
in
|
||||||
(
|
(
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
# Compatibility shim that redirects to npins
|
|
||||||
import ../npins
|
|
||||||
|
|
@ -84,13 +84,13 @@
|
||||||
"repo": "lix"
|
"repo": "lix"
|
||||||
},
|
},
|
||||||
"pre_releases": false,
|
"pre_releases": false,
|
||||||
"version_upper_bound": "2.93.1",
|
"version_upper_bound": null,
|
||||||
"release_prefix": null,
|
"release_prefix": null,
|
||||||
"submodules": false,
|
"submodules": false,
|
||||||
"version": "2.93.0",
|
"version": "2.93.2",
|
||||||
"revision": "47aad376c87e2e65967f17099277428e4b3f8e5a",
|
"revision": "22be6ff62626c8cdbb9cdb59a3e4bd910fedd0d6",
|
||||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2.93.0.tar.gz",
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2.93.2.tar.gz",
|
||||||
"hash": "0g17i8yz5j0i2v29c2fddksvnc5n8fc5ml2pz0jhxaia7ghmxhc6"
|
"hash": "10pr6xp2m3fmnhywakv9msb33gllkr85qi0bl40wlgn7hlp9r317"
|
||||||
},
|
},
|
||||||
"lix-module": {
|
"lix-module": {
|
||||||
"type": "GitRelease",
|
"type": "GitRelease",
|
||||||
|
|
@ -118,9 +118,9 @@
|
||||||
},
|
},
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"submodules": false,
|
"submodules": false,
|
||||||
"revision": "4e5ac6ec65c775fbc6adba1c6022b29c7eccde0f",
|
"revision": "b043bfe1f3f4c4be4b688e24c5ae96e81f525805",
|
||||||
"url": "https://github.com/oxalica/nil/archive/4e5ac6ec65c775fbc6adba1c6022b29c7eccde0f.tar.gz",
|
"url": "https://github.com/oxalica/nil/archive/b043bfe1f3f4c4be4b688e24c5ae96e81f525805.tar.gz",
|
||||||
"hash": "0fvkmiipmswzhak0n0hf472q5rw4k7iankv40g89ilw6ra8zwrn2"
|
"hash": "0jpdb5wpk6jc4b2smi7wvjrjjbi2l6r3yi95wz3jsr12xzbs0xnd"
|
||||||
},
|
},
|
||||||
"nix-tree": {
|
"nix-tree": {
|
||||||
"type": "GitRelease",
|
"type": "GitRelease",
|
||||||
|
|
@ -160,9 +160,9 @@
|
||||||
},
|
},
|
||||||
"branch": "nixos-25.05",
|
"branch": "nixos-25.05",
|
||||||
"submodules": false,
|
"submodules": false,
|
||||||
"revision": "a676066377a2fe7457369dd37c31fd2263b662f4",
|
"revision": "b43c397f6c213918d6cfe6e3550abfe79b5d1c51",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/a676066377a2fe7457369dd37c31fd2263b662f4.tar.gz",
|
"url": "https://github.com/NixOS/nixpkgs/archive/b43c397f6c213918d6cfe6e3550abfe79b5d1c51.tar.gz",
|
||||||
"hash": "17vgcpydmk9qw2knszsdnnnh4zfxd2x7jpgifkkkz2rdg8bcwvyd"
|
"hash": "1dkp9sxci4b4f111x0ck493fiag68qjs5c927khzcj2a5pdbsayl"
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
|
@ -173,9 +173,9 @@
|
||||||
},
|
},
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"submodules": false,
|
"submodules": false,
|
||||||
"revision": "00b0005dbbb931014fdfe55d0db1f47af4f9aab5",
|
"revision": "c41210bd9aea6b7cd8fea393385bef84ee1355e8",
|
||||||
"url": "https://github.com/nix-community/nur/archive/00b0005dbbb931014fdfe55d0db1f47af4f9aab5.tar.gz",
|
"url": "https://github.com/nix-community/nur/archive/c41210bd9aea6b7cd8fea393385bef84ee1355e8.tar.gz",
|
||||||
"hash": "0lrdcaayxifnq2n4sza7sma0w8rqghc7rkb3ly1n7rdnrbmn3f8b"
|
"hash": "0lc3rzqspf9lz7fx4xb8k6690bf0hxdam51nlfckf4llx523vl9w"
|
||||||
},
|
},
|
||||||
"pin-emacs28": {
|
"pin-emacs28": {
|
||||||
"type": "Git",
|
"type": "Git",
|
||||||
|
|
|
||||||
22
shell.nix
22
shell.nix
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
sources ? import ./nix/sources.nix,
|
sources ? import ./npins,
|
||||||
pkgs ?
|
pkgs ?
|
||||||
import sources.nixpkgs {
|
import sources.nixpkgs {
|
||||||
overlays = map import [
|
overlays = map import [
|
||||||
|
|
@ -7,20 +7,19 @@
|
||||||
./nix/packages/overlay.nix
|
./nix/packages/overlay.nix
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
}: rec {
|
withXMonad ? false,
|
||||||
default = pkgs.mkShell {
|
}: let
|
||||||
packages = with pkgs; [
|
inherit (pkgs) lib;
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
packages = with pkgs;
|
||||||
|
[
|
||||||
just
|
just
|
||||||
jq
|
jq
|
||||||
npins
|
npins
|
||||||
disko
|
disko
|
||||||
];
|
]
|
||||||
};
|
++ lib.optionals withXMonad [
|
||||||
|
|
||||||
withXMonad = pkgs.mkShell {
|
|
||||||
inputsFrom = with pkgs; [
|
|
||||||
default
|
|
||||||
|
|
||||||
(haskellPackages.ghcWithPackages (self: [
|
(haskellPackages.ghcWithPackages (self: [
|
||||||
self.xmonad-contrib
|
self.xmonad-contrib
|
||||||
self.xmonad-extras
|
self.xmonad-extras
|
||||||
|
|
@ -28,5 +27,4 @@
|
||||||
haskell-language-server
|
haskell-language-server
|
||||||
cabal-install
|
cabal-install
|
||||||
];
|
];
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue