initial commit
Just base laptop system on demilich
This commit is contained in:
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# Ignore build outputs from performing a nix-build or command
|
||||
result
|
||||
result-*
|
||||
|
||||
# Ignore automatically generated direnv output (if using nix-direnv)
|
||||
.direnv
|
||||
|
||||
# Ignore NixOS interactive test driver history
|
||||
**/.nixos-test-history
|
||||
94
configuration.nix
Normal file
94
configuration.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
./services.nix
|
||||
./packages.nix
|
||||
./security.nix
|
||||
];
|
||||
|
||||
# Enable flakes and nix-command
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
};
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"electron-39.8.10"
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot = {
|
||||
loader = {
|
||||
limine = {
|
||||
efiSupport = true;
|
||||
enable = true;
|
||||
enableEditor = true;
|
||||
maxGenerations = 10;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "demilich";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Winnipeg";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_CA.UTF-8";
|
||||
console = {
|
||||
# keyMap = "us";
|
||||
useXkbConfig = true;
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# Configure keymap in X11
|
||||
# services.xserver.xkb.layout = "us";
|
||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
# services.printing.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.stobbsm = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "seat" ]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "26.05"; # Did you read the comment?
|
||||
}
|
||||
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1786313170,
|
||||
"narHash": "sha256-9BG7OgUWdu0ONDO5X2q6+K4bsuBITkX/3W4nNJu1Ito=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fcb8fcd6bf2d0adecae5bd491afaaaf8311b758d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-26.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
16
flake.nix
Normal file
16
flake.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
inputs = {
|
||||
# This is pointing to an unstable release.
|
||||
# If you prefer a stable release instead, you can change the word unstable to the latest number shown here: https://nixos.org/download
|
||||
# i.e. nixos-24.11
|
||||
# Use `nix flake update` to update the flake to the latest revision of the chosen release channel.
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
};
|
||||
outputs = inputs@{ self, nixpkgs, ... }: {
|
||||
# NOTE: 'nixos' is the default hostname
|
||||
nixosConfigurations."demilich" = nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./configuration.nix ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
33
hardware-configuration.nix
Normal file
33
hardware-configuration.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "iwlwifi" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" "iwlwifi" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/e3f1509a-7556-4eb9-ab4d-20dc2d5ff47d";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/6E60-FBDB";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/eaab6975-f924-485a-a84e-9d37973127ca"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
358
nvim.lua
Normal file
358
nvim.lua
Normal file
@@ -0,0 +1,358 @@
|
||||
-- {{{ plugins
|
||||
local gh = "https://github.com/"
|
||||
local plugins = {
|
||||
{ src = gh .. "MunifTanjim/nui.nvim", name = "nui" },
|
||||
{ src = gh .. "catgoose/nvim-colorizer.lua", name = "colorizer" }, -- show colours of colour codes
|
||||
{ src = gh .. "echasnovski/mini.nvim", name = "mini" }, -- a bunch of useful plugins
|
||||
{ src = gh .. "folke/noice.nvim", name = "noice" },
|
||||
{ src = gh .. "folke/snacks.nvim", name = "snacks" },
|
||||
{ src = gh .. "kdheepak/lazygit.nvim", name = "lazygit" },
|
||||
{ src = gh .. "nvim-lua/plenary.nvim", name = "plenary" },
|
||||
{ src = gh .. "stevearc/conform.nvim", name = "conform" },
|
||||
{ src = gh .. "folke/which-key.nvim", name = "whichkey" },
|
||||
{ src = gh .. "mikavilpas/yazi.nvim", name = "yazi" },
|
||||
{ src = gh .. "nvimdev/dashboard-nvim", name = "dashboard" },
|
||||
{ src = gh .. "Dan7h3x/neaterm.nvim", name = "neaterm" },
|
||||
}
|
||||
|
||||
vim.pack.add(plugins)
|
||||
local function update_plugins()
|
||||
local plist = {}
|
||||
for _, v in ipairs(plugins)
|
||||
do
|
||||
table.insert(plist, v.name)
|
||||
end
|
||||
vim.pack.update(plist)
|
||||
end -- }}}
|
||||
-- {{{ Helper functions
|
||||
function R(name)
|
||||
require("plenary.reload").reload_module(name)
|
||||
end
|
||||
-- }}}
|
||||
|
||||
-- {{{ Global settings
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
vim.g.have_nerd_font = true
|
||||
-- Common defaults
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.inccommand = "split"
|
||||
vim.opt.modeline = true
|
||||
vim.opt.mouse = "a"
|
||||
vim.opt.number = true
|
||||
vim.opt.preserveindent = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.ruler = true
|
||||
vim.opt.scrolloff = 5
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.showmode = true
|
||||
vim.opt.showtabline = 1
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
||||
vim.opt.inccommand = "split"
|
||||
-- Set foldmethod, change in .editorconfig of projects
|
||||
vim.opt.foldmethod = "marker"
|
||||
-- General gui settings
|
||||
vim.o.guifont = "JetBrainsMono Nerd Font:12"
|
||||
vim.cmd.colorscheme "evening"
|
||||
-- }}}
|
||||
|
||||
require("snacks").setup({ -- {{{
|
||||
animate = {},
|
||||
dim = {},
|
||||
image = {},
|
||||
indent = {},
|
||||
lazygit = {},
|
||||
picker = {},
|
||||
}) -- }}}
|
||||
require("colorizer").setup({})
|
||||
require("conform").setup({ -- {{{
|
||||
formatters_by_ft = {
|
||||
nix = { "nixfmt" },
|
||||
},
|
||||
})
|
||||
vim.g.snacks_animate = true -- }}}
|
||||
require("noice").setup({ -- {{{
|
||||
lsp = {
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
},
|
||||
},
|
||||
popupmenu = {
|
||||
enabled = true,
|
||||
backend = "nui",
|
||||
},
|
||||
notify = {
|
||||
enabled = true,
|
||||
view = "notify",
|
||||
},
|
||||
routes = {
|
||||
{
|
||||
view = "notify",
|
||||
filter = { event = "msg_showmode" },
|
||||
},
|
||||
},
|
||||
}) -- }}}
|
||||
require("yazi").setup({ -- {{{
|
||||
open_for_directories = true,
|
||||
keymaps = {
|
||||
show_help = "<f1>",
|
||||
},
|
||||
})
|
||||
vim.g.loaded_netrwPlugin = 1 -- }}}
|
||||
require("dashboard").setup({ -- {{{
|
||||
theme = "hyper",
|
||||
config = {
|
||||
shortcut = {
|
||||
{ desc = " Update ", group = "@property", key = "u", action = update_plugins },
|
||||
{ desc = " Projects ", group = "label", key = "p", action = Snacks.picker.projects },
|
||||
{ desc = " Files ", group = "OkMsg", key = "f", action = Snacks.picker.files },
|
||||
{ desc = " Quit ", group = "ErrorMsg", key = "q", action = ":q" },
|
||||
},
|
||||
packages = { enable = false }, -- show number of installed plugins
|
||||
project = { enable = true, limit = 8, label = "", action = Snacks.picker.projects },
|
||||
},
|
||||
}) -- }}}
|
||||
require("which-key").setup({ -- {{{
|
||||
preset = "modern",
|
||||
}) -- }}}
|
||||
require("neaterm").setup() -- {{{
|
||||
-- Done neaterm }}}
|
||||
-- Filetype configuration {{{
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
Containerfile = "dockerfile",
|
||||
Dockerfile = "dockerfile",
|
||||
containerfile = "containerfile",
|
||||
dockerfile = "dockerfile",
|
||||
j2 = "jinja",
|
||||
jinja = "jinja",
|
||||
jinja2 = "jinja",
|
||||
tf = "terraform",
|
||||
tfstate = "json",
|
||||
tfvars = "terraform",
|
||||
templ = "templ",
|
||||
},
|
||||
}) -- }}}
|
||||
-- {{{ LSP Configuration
|
||||
local lspproto = vim.lsp.protocol
|
||||
local capabilities = lspproto.make_client_capabilities()
|
||||
-- Formatter autocmd
|
||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||
callback = function(args)
|
||||
require("conform").format({ bufnr = args.buf })
|
||||
end,
|
||||
})
|
||||
-- Simple lspconfigs
|
||||
vim.lsp.config("bashls", capabilities)
|
||||
vim.lsp.enable("bashls")
|
||||
|
||||
vim.lsp.config("dockerls", capabilities)
|
||||
vim.lsp.enable("dockerls")
|
||||
|
||||
vim.lsp.config("lua_ls", { -- {{{
|
||||
on_init = function(client)
|
||||
if client.workspace_folders then
|
||||
local path = client.workspace_folders[1].name
|
||||
if vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat(path .. "/.luarc.jsonc") then
|
||||
return
|
||||
end
|
||||
end
|
||||
client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, {
|
||||
runtime = { version = "LuaJIT" },
|
||||
workspace = { checkThirdParty = false, library = { vim.env.VIMRUNTIME, "''${3rd}/luv/library" } },
|
||||
format = { enable = true, defaultConfig = { indent_style = "space", indent_size = "2" } },
|
||||
diagnostics = { globals = { "vim", "Snacks", "MiniSessions", "MiniPick", "MiniStatusline" } },
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {}
|
||||
}
|
||||
})
|
||||
vim.lsp.enable("lua_ls") -- }}}
|
||||
|
||||
vim.lsp.config("nginx_language_server", capabilities)
|
||||
vim.lsp.enable("nginx_language_server")
|
||||
|
||||
vim.lsp.config("nixd", capabilities)
|
||||
vim.lsp.enable("nixd")
|
||||
|
||||
vim.lsp.config("systemd-language-server", capabilities)
|
||||
vim.lsp.enable("systemd-language-server")
|
||||
|
||||
vim.lsp.config("yamlls", {
|
||||
format = { enable = true, bracketSpacing = true },
|
||||
})
|
||||
vim.lsp.enable("yamlls")
|
||||
|
||||
-- end LSPConfig }}}
|
||||
|
||||
-- {{{ mini.nvim setup
|
||||
require("mini.basics").setup()
|
||||
require("mini.ai").setup({ n_lines = 200 })
|
||||
require("mini.align").setup()
|
||||
require("mini.completion").setup()
|
||||
require("mini.diff").setup()
|
||||
require("mini.extra").setup()
|
||||
require("mini.git").setup()
|
||||
require("mini.icons").setup()
|
||||
require("mini.move").setup()
|
||||
require("mini.operators").setup()
|
||||
require("mini.pairs").setup()
|
||||
require("mini.snippets").setup()
|
||||
require("mini.splitjoin").setup()
|
||||
require("mini.statusline").setup({
|
||||
content = {
|
||||
active = function()
|
||||
local check_macro_recording = function()
|
||||
if vim.fn.reg_recording() ~= "" then
|
||||
return "@" .. vim.fn.reg_recording()
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end
|
||||
|
||||
-- configure statusline for active windows
|
||||
local mode, mode_hl = MiniStatusline.section_mode { trunc_width = 120 }
|
||||
local git = MiniStatusline.section_git { trunc_width = 40 }
|
||||
local diff = MiniStatusline.section_diff { trunc_width = 75 }
|
||||
local diagnostics = MiniStatusline.section_diagnostics { trunc_width = 75 }
|
||||
local lsp = MiniStatusline.section_lsp { trunc_width = 75 }
|
||||
local filename = MiniStatusline.section_filename { trunc_width = 140 }
|
||||
local fileinfo = MiniStatusline.section_fileinfo { trunc_width = 120 }
|
||||
local location = MiniStatusline.section_location { trunc_width = 75 }
|
||||
local search = MiniStatusline.section_searchcount { trunc_width = 75 }
|
||||
local macro = check_macro_recording()
|
||||
|
||||
return MiniStatusline.combine_groups {
|
||||
{ hl = mode_hl, strings = { mode } },
|
||||
{ hl = "MiniStatuslineDevinfo", strings = { git, diff, diagnostics, lsp } },
|
||||
"%<", -- Mark general truncate point
|
||||
{ hl = "MiniStatuslineFilename", strings = { filename } },
|
||||
"%=", -- End left alignment
|
||||
{ hl = "MiniStatuslineFilename", strings = { macro } },
|
||||
{ hl = "MiniStatuslineFileinfo", strings = { fileinfo } },
|
||||
{ hl = mode_hl, strings = { search, location } },
|
||||
}
|
||||
end,
|
||||
use_icons = true,
|
||||
set_vim_settings = true,
|
||||
},
|
||||
}) -- }}}
|
||||
-- {{{ which-key config
|
||||
local wk = require("which-key")
|
||||
local wke = require("which-key.extras")
|
||||
wk.add({
|
||||
{ -- Normal Mode
|
||||
{ "<Tab>", ">>", desc = "increase tab depth of line" },
|
||||
{ "<S-Tab>", "<<", desc = "decrease tab depth of line" },
|
||||
|
||||
-- file group
|
||||
{ "<leader>f", group = "file" },
|
||||
{ "<leader>fb", "<cmd>Yazi<cr>", desc = "[f]ile [b]rowser" },
|
||||
{ "<leader>fd", "<cmd>Yazi cwd<cr>", desc = "[f]ile browser for current [d]irectory" },
|
||||
{ "<leader>fp", Snacks.picker.files, desc = "[f]ile [p]icker" },
|
||||
{ "<leader>fg", Snacks.picker.grep, desc = "[f]ile [g]rep picker" },
|
||||
{ "<leader>fz", Snacks.picker.zoxide, desc = "[f]ile [z]oxide picker" },
|
||||
|
||||
-- buffer group
|
||||
{
|
||||
"<leader>b",
|
||||
group = "buffers",
|
||||
expand = function()
|
||||
return wke.expand.buf()
|
||||
end
|
||||
},
|
||||
{ "<leader>be", "<cmd>e %<cr>", desc = "[b]uffer r[e]load" },
|
||||
{ "<leader>bp", Snacks.picker.buffers, desc = "[b]uffer [p]icker" },
|
||||
{ "<leader>bl", Snacks.picker.lines, desc = "[b]uffer pick [l]ine" },
|
||||
|
||||
-- project group
|
||||
{ "<leader>pp", Snacks.picker.projects, desc = "[p]ick [p]roject" },
|
||||
|
||||
-- help group
|
||||
{ "<leader>h", group = "help" },
|
||||
{ "<leader>hh", Snacks.picker.help, desc = "[h]pick [h]elp" },
|
||||
{ "<leader>hk", Snacks.picker.keymaps, desc = "[h]pick [k]eymaps" },
|
||||
{ "<leader>hi", Snacks.picker.icons, desc = "[h]pick icon" },
|
||||
|
||||
-- git group
|
||||
{ "<leader>g", group = "git" },
|
||||
{ "<leader>gi", "<cmd>LazyGit<CR>", desc = "lazy[g][i]t open" },
|
||||
{ "<leader>gc", "<cmd>LazyGitCurrentFile<CR>", desc = "lazy[g]it [c]urrent file" },
|
||||
{ "<leader>go", "<cmd>LazyGitConfig<CR>", desc = "lazy[g]it c[o]nfig" },
|
||||
{ "<leader>gl", "<cmd>LazyGitLog<CR>", desc = "Lazy[g]it [l]og" },
|
||||
|
||||
-- lsp group
|
||||
{ "<leader>l", group = "LSP" },
|
||||
{ "<leader>lh", vim.lsp.buf.hover, desc = "[l]sp [h]over Documentation" },
|
||||
{ "<leader>ls", vim.lsp.buf.signature_help, desc = "[l]sp [s]ignature help" },
|
||||
{ "<leader>lr", vim.lsp.buf.rename, desc = "[l]sp [r]ename" },
|
||||
{ "<leader>lf", vim.lsp.buf.format, desc = "[l]sp [f]ormat buffer" },
|
||||
{ "<leader>lgD", Snacks.picker.lsp_declarations, desc = "[l]sp [g]oto [D]eclaration" },
|
||||
{ "<leader>lgI", Snacks.picker.lsp_implementations, desc = "[l]sp [g]oto [I]mplementation" },
|
||||
{ "<leader>lgS", Snacks.picker.lsp_workspace_symbols, desc = "[l]sp [g]oto workspace [S]ymbol" },
|
||||
{ "<leader>lgd", Snacks.picker.lsp_definitions, desc = "[l]sp [g]oto [d]efinition" },
|
||||
{ "<leader>lgr", Snacks.picker.lsp_references, desc = "[l]sp [g]oto [r]eferences" },
|
||||
{ "<leader>lgs", Snacks.picker.lsp_symbols, desc = "[l]sp [g]oto document [s]ymbol" },
|
||||
{ "<leader>lde", vim.diagnostic.open_float, desc = "[l]sp [d]iagnostic [e]rror messages" },
|
||||
{ "<leader>ldq", vim.diagnostic.setloclist, desc = "[l]sp [d]iagnostic [q]uickfix list" },
|
||||
|
||||
-- diagnostics
|
||||
{
|
||||
"[d",
|
||||
function() vim.diagnostic.jump({ count = -1, float = true }) end,
|
||||
desc = "goto previous [d]iagnostic message"
|
||||
},
|
||||
{
|
||||
"]d",
|
||||
function() vim.diagnostic.jump({ count = 1, float = true }) end,
|
||||
desc = "goto next [d]iagnostic message"
|
||||
},
|
||||
|
||||
-- misc
|
||||
{ "<Esc>", ":nohl<CR>", desc = "Clear Highlights" },
|
||||
{ "<leader>rr", ":source %<CR>", desc = "sou[r]ce cu[r]rent file as neovim lua" },
|
||||
},
|
||||
{ -- Visual Mode
|
||||
mode = "v",
|
||||
{ "<Tab>", ">>", desc = "increase tab depth of selection" },
|
||||
{ "<S-Tab>", "<<", desc = "decrease tab depth of selection" },
|
||||
},
|
||||
{ -- Insert Mode
|
||||
mode = "i",
|
||||
{ "<C-i>", vim.lsp.buf.signature_help, desc = "signature help" },
|
||||
{ "<C-d>", vim.lsp.buf.hover, desc = "Hover [d]ocumentation" },
|
||||
{ "<Tab>", "<C-t>", desc = "restore tab functionality" },
|
||||
{ "<S-Tab>", "<C-d>", desc = "restore de-tab functionality" },
|
||||
},
|
||||
{ -- Terminal Mode
|
||||
mode = "t",
|
||||
{ "<Esc>", "<C-\\><C-n>", desc = "Exit terminal mode" },
|
||||
-- Window navigation
|
||||
{ "<C-h>", "<C-\\><C-n><C-w>h", desc = "Navigate to left window" },
|
||||
{ "<C-j>", "<C-\\><C-n><C-w>j", desc = "Navigate to lower window" },
|
||||
{ "<C-k>", "<C-\\><C-n><C-w>k", desc = "Navigate to upper window" },
|
||||
{ "<C-l>", "<C-\\><C-n><C-w>l", desc = "Navigate to right window" },
|
||||
-- Tab navigation
|
||||
{ "<M-h>", "<C-\\><C-n><cmd>tabprev<CR>", desc = "Navigate to previous tab" },
|
||||
{ "<M-l>", "<C-\\><C-n><cmd>tabnext<CR>", desc = "Navigate to next tab" },
|
||||
},
|
||||
{ -- Normal, Insert mode
|
||||
mode = { "n", "i" },
|
||||
-- Window navigation
|
||||
{ "<C-h>", "<C-w>h", desc = "Navigate to left window" },
|
||||
{ "<C-j>", "<C-w>j", desc = "Navigate to lower window" },
|
||||
{ "<C-k>", "<C-w>k", desc = "Navigate to upper window" },
|
||||
{ "<C-l>", "<C-w>l", desc = "Navigate to right window" },
|
||||
-- Tab navigation
|
||||
{ "<M-h>", "<cmd>tabprev<CR>", desc = "Navigate to previous tab" },
|
||||
{ "<M-l>", "<cmd>tabnext<CR>", desc = "Navigate to next tab" },
|
||||
},
|
||||
}) -- }}}
|
||||
125
packages.nix
Normal file
125
packages.nix
Normal file
@@ -0,0 +1,125 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
bitwarden-desktop = prev.bitwarden-desktop // {
|
||||
electron_39 = final.electron_39-bin;
|
||||
};
|
||||
})
|
||||
];
|
||||
# List packages installed in system profile.
|
||||
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||
environment.systemPackages = with pkgs; [
|
||||
# language servers useful on a system level
|
||||
bash-language-server
|
||||
dockerfile-language-server
|
||||
lua-language-server
|
||||
nginx-language-server
|
||||
nixd
|
||||
systemd-language-server
|
||||
yaml-language-server
|
||||
|
||||
# system wide applications
|
||||
bitwarden-cli
|
||||
bitwarden-desktop
|
||||
btop
|
||||
curl
|
||||
direnv
|
||||
eza
|
||||
fd
|
||||
firefox
|
||||
fuzzel
|
||||
fzf
|
||||
ghostscript_headless
|
||||
ghostty
|
||||
git
|
||||
imagemagick
|
||||
lazygit
|
||||
mako
|
||||
mermaid-cli
|
||||
neovide
|
||||
neohtop
|
||||
nixfmt
|
||||
restic
|
||||
ripgrep
|
||||
rsync
|
||||
seafile-client
|
||||
sqlite
|
||||
starship
|
||||
stow
|
||||
swayidle
|
||||
swaylock
|
||||
tectonic
|
||||
trash-cli
|
||||
tree-sitter
|
||||
wl-clipboard
|
||||
xwayland-satellite
|
||||
yazi
|
||||
zoxide
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.caskaydia-cove
|
||||
nerd-fonts.caskaydia-mono
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.fantasque-sans-mono
|
||||
nerd-fonts.fira-mono
|
||||
nerd-fonts.geist-mono
|
||||
nerd-fonts.go-mono
|
||||
nerd-fonts.hack
|
||||
nerd-fonts.hasklug
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.liberation
|
||||
nerd-fonts.monoid
|
||||
nerd-fonts.mononoki
|
||||
nerd-fonts.noto
|
||||
nerd-fonts.open-dyslexic
|
||||
nerd-fonts.overpass
|
||||
nerd-fonts.profont
|
||||
nerd-fonts.proggy-clean-tt
|
||||
nerd-fonts.recursive-mono
|
||||
nerd-fonts.roboto-mono
|
||||
nerd-fonts.sauce-code-pro
|
||||
nerd-fonts.shure-tech-mono
|
||||
nerd-fonts.space-mono
|
||||
nerd-fonts.symbols-only
|
||||
nerd-fonts.terminess-ttf
|
||||
nerd-fonts.ubuntu
|
||||
nerd-fonts.ubuntu-mono
|
||||
nerd-fonts.ubuntu-sans
|
||||
nerd-fonts.victor-mono
|
||||
nerd-fonts.zed-mono
|
||||
];
|
||||
|
||||
programs = {
|
||||
waybar = {
|
||||
enable = true;
|
||||
};
|
||||
niri = {
|
||||
enable = true;
|
||||
};
|
||||
neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
configure = {
|
||||
treesitter = {
|
||||
enable = true;
|
||||
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||
bash
|
||||
lua
|
||||
nix
|
||||
regex
|
||||
];
|
||||
};
|
||||
customLuaRC = builtins.readFile ./nvim.lua;
|
||||
};
|
||||
};
|
||||
zsh = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
8
security.nix
Normal file
8
security.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
security = {
|
||||
polkit.enable = true;
|
||||
pam.services.swaylock = {};
|
||||
};
|
||||
}
|
||||
43
services.nix
Normal file
43
services.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
systemd.user.services.niri.enableDefaultPath = false;
|
||||
|
||||
xdg.portal.config.niri = {
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
|
||||
};
|
||||
|
||||
services = {
|
||||
displayManager = {
|
||||
enable = true;
|
||||
lemurs = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.options = "ctrl:nocaps";
|
||||
};
|
||||
pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
libinput.enable = true;
|
||||
printing.enable = true;
|
||||
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${config.programs.niri.package}/bin/niri-session";
|
||||
user = "stobbsm";
|
||||
};
|
||||
};
|
||||
};
|
||||
gnome = {
|
||||
gnome-keyring = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user