build please?
This commit is contained in:
@@ -1,46 +1,52 @@
|
||||
{
|
||||
description = "ags config";
|
||||
description = "ags config";
|
||||
|
||||
inputs = {
|
||||
inputs = {
|
||||
|
||||
ags.url = "github:Aylur/ags";
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, ... }@inputs: {
|
||||
|
||||
hmModule = { config, lib, pkgs, ... }: {
|
||||
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
gtksourceview
|
||||
webkitgtk
|
||||
accountsservice
|
||||
];
|
||||
};
|
||||
|
||||
home.file.".config/ags/launcher.js".text = ''
|
||||
function Launcher() {
|
||||
return Widget.EventBox({
|
||||
class_name: "launcher",
|
||||
hpack: "center",
|
||||
child: Widget.Icon({
|
||||
icon: '${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake.png',
|
||||
css: 'font-size: 24px;'
|
||||
}),
|
||||
on_primary_click: () => {Utils.execAsync('rofi -show drun')},
|
||||
margin_left: 10,
|
||||
})
|
||||
}
|
||||
|
||||
export default Launcher
|
||||
'';
|
||||
ags.url = "github:Aylur/ags";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
outputs = { self, ... }@inputs: {
|
||||
|
||||
hmModule = { config, lib, pkgs, ... }: {
|
||||
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
options.homeconfig.ags.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.ags.enable {
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
gtksourceview
|
||||
webkitgtk
|
||||
accountsservice
|
||||
];
|
||||
};
|
||||
|
||||
home.file.".config/ags/launcher.js".text = /*javascript*/ ''
|
||||
function Launcher() {
|
||||
return Widget.EventBox({
|
||||
class_name: "launcher",
|
||||
hpack: "center",
|
||||
child: Widget.Icon({
|
||||
icon: '${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake.png',
|
||||
css: 'font-size: 24px;'
|
||||
}),
|
||||
on_primary_click: () => {Utils.execAsync('rofi -show drun')},
|
||||
margin_left: 10,
|
||||
})
|
||||
}
|
||||
|
||||
export default Launcher
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
calcurse
|
||||
libnotify
|
||||
];
|
||||
options.homeconfig.calcurse.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.calcurse.enable {
|
||||
home.packages = with pkgs; [
|
||||
calcurse
|
||||
libnotify
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,324 +17,12 @@
|
||||
pyprland
|
||||
];
|
||||
|
||||
home.file.".config/hypr/pyprland.toml".text = ''
|
||||
[pyprland]
|
||||
plugins = [
|
||||
"scratchpads"
|
||||
]
|
||||
|
||||
[scratchpads.nvim]
|
||||
animation = "fromTop"
|
||||
command = "kitty --class scratchpad-nvim -e nvim ~"
|
||||
lazy = false
|
||||
class = "scratchpad-nvim"
|
||||
margin = 100
|
||||
multi = true
|
||||
excludes = "*"
|
||||
|
||||
[scratchpads.free]
|
||||
animation = "fromBottom"
|
||||
command = "kitty --class scratchpad"
|
||||
class = "scratchpad"
|
||||
lazy = false
|
||||
margin = 100
|
||||
multi = true
|
||||
excludes = "*"
|
||||
'';
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
|
||||
enable = true;
|
||||
|
||||
systemd.variables = [ "--all" ];
|
||||
|
||||
extraConfig = ''
|
||||
|
||||
#------------------------------------------------#
|
||||
# _ _ _ _ #
|
||||
#| | | | | | | | #
|
||||
#| |___| |_ _ ____ _ _| | __ _.-.___ ___| | #
|
||||
#| ___ | | | | _ \| |/ | |/ _` | _ \/ _ | #
|
||||
#| | | | |_| | |_) | /| | (_| | | | | (_| | #
|
||||
#|_| |_|\__, | __/|__| |_|\__,_|_| |_|\___/_| #
|
||||
# |___/|_| #
|
||||
# #
|
||||
#------------------------------------------------#
|
||||
|
||||
|
||||
monitor=eDP-1,1920x1080@60,0x0,1
|
||||
|
||||
exec-once=onSystemStart
|
||||
|
||||
# Some default env vars.
|
||||
env = XCURSOR_SIZE,16
|
||||
|
||||
source = ./otf.conf
|
||||
source = ~/.cache/wal/colors-hypr.conf
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
cursor {
|
||||
no_hardware_cursors = true
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 4
|
||||
border_size = 2
|
||||
col.active_border = $color1 $color5 100deg
|
||||
col.inactive_border = $color0
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 2
|
||||
|
||||
blur {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_status = "master"
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = off
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = false
|
||||
disable_splash_rendering = true
|
||||
force_default_wallpaper = 2
|
||||
}
|
||||
|
||||
# Binds
|
||||
$mainMod = ALT
|
||||
|
||||
bind = $mainMod, E, exec, colorPrefix kitty
|
||||
|
||||
bind = $mainMod, B, exec, firefox
|
||||
|
||||
bind = $mainMod SHIFT, B, exec, firefox --private-window
|
||||
|
||||
bind = $mainMod, Q, killactive,
|
||||
|
||||
bind = $mainMod, R, exec, colorPrefix kitty -e _systemRebuild
|
||||
|
||||
bind = $mainMod SHIFT, R, exec, colorPrefix kitty -e _homeRebuild
|
||||
|
||||
bind = $mainMod, C, exec, colorPrefix kitty -e bash -c "cd ~/Projects/System; nvim ~/Projects/System/flake.nix"
|
||||
|
||||
bind = $mainMod, F, exec, thunar
|
||||
bind = $mainMod SHIFT, F, fullscreen
|
||||
|
||||
bind = $mainMod, semicolon, exec, colorPrefix kitty -e nvim ~
|
||||
|
||||
bind = $mainMod, Insert, exec, libreoffice &
|
||||
|
||||
bind = $mainMod, H, exec, bluetoothctl connect 88:D0:39:F9:83:CE
|
||||
|
||||
bind = $mainMod, V, togglefloating,
|
||||
|
||||
bind = $mainMod SHIFT, V, exec, vlc &
|
||||
|
||||
bind = , Menu, exec, rofi -show drun
|
||||
|
||||
bind = $mainMod, Menu, exec, killall .ags-wrapped; ags &
|
||||
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
|
||||
bind = $mainMod, Z, togglesplit, # dwindle
|
||||
|
||||
bind = $mainMod, M, exec, spotify
|
||||
|
||||
bind = $mainMod SHIFT, M, exec, firefox --new-window soundcloud.com/you/library
|
||||
|
||||
bind = $mainMod CTRL, M, exec, colorPrefix kitty -e ncmpcpp -s browser
|
||||
|
||||
bind = $mainMod, XF86AudioPlay, exec, mpc load casual
|
||||
|
||||
bind = , XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause
|
||||
|
||||
bind = , XF86AudioPause, exec, ${pkgs.playerctl}/bin/playerctl pause
|
||||
bind = $mainMod, F9, exec, ${pkgs.playerctl}/bin/playerctl pause
|
||||
|
||||
bind = , XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next
|
||||
|
||||
bind = , XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous
|
||||
|
||||
bind = , XF86Launch2, exec, steam &
|
||||
bind = $mainMod, XF86Launch2, exec, prismlauncher
|
||||
|
||||
bind = CTRL SHIFT, XF86Launch2, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
|
||||
|
||||
bind = , XF86Calculator, exec, geogebra
|
||||
|
||||
bind = $mainMod SHIFT, Print, exec, firefox --new-window localhost:631
|
||||
bind = , Print, exec, grim -g "$(slurp)"
|
||||
|
||||
bind = $mainMod, Return, exec, ${pkgs.vesktop}/bin/vesktop --enable-features=UseOzonePlatform --ozone-platform=wayland &
|
||||
|
||||
bind = $mainMod CTRL, Return, exec, firefox --new-window https://discord.com/app
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, A, movefocus, l
|
||||
bind = $mainMod, D, movefocus, r
|
||||
bind = $mainMod, W, movefocus, u
|
||||
bind = $mainMod, S, movefocus, d
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
bind = $mainMod, Home, workspace, 11
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
bind = $mainMod SHIFT, Home, movetoworkspace, 11
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, right, workspace, e+1
|
||||
bind = $mainMod, left, workspace, e-1
|
||||
|
||||
#switch network connections
|
||||
bind = CTRL SHIFT, Escape, exec, nmcli device down wlo1
|
||||
bind = CTRL SHIFT, 0, exec, nmcli device down wlo1; nmcli connection up Hotspot
|
||||
bind = CTRL SHIFT, 1, exec, nmcli device wifi connect EagleNet password ~?C##@ZiH
|
||||
bind = CTRL SHIFT, 2, exec, nmcli device down wlo1; nmcli device wifi connect CXNK00813829 password a8d859c8cfb420ab
|
||||
bind = CTRL SHIFT, 3, exec, nmcli device down wlo1; nmcli device wifi connect ATT9MhT2ql password 325qxr89u?3t
|
||||
|
||||
#brightness keys
|
||||
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
|
||||
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
|
||||
|
||||
#volume keys
|
||||
binde = , XF86AudioRaiseVolume, exec, amixer -D default sset Master 10%+
|
||||
binde = , XF86AudioLowerVolume, exec, amixer -D default sset Master 10%-
|
||||
bind = , XF86AudioMute, exec, amixer -D default sset Master toggle
|
||||
|
||||
|
||||
#screen lock key
|
||||
bind = $mainMod, F12, exec, swaylock
|
||||
|
||||
#logout shortcut
|
||||
bind = CTRL ALT, Delete, exec, loginctl kill-session self
|
||||
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bind = $mainMod SHIFT, W, movewindow, u
|
||||
bind = $mainMod SHIFT, S, movewindow, d
|
||||
bind = $mainMod SHIFT, A, movewindow, l
|
||||
bind = $mainMod SHIFT, D, movewindow, r
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod SHIFT, mouse:272, resizewindow
|
||||
|
||||
$scratchpadsize = size 60% 80%
|
||||
$scratchpad = class:^(scratchpad)$
|
||||
|
||||
windowrulev2 = float, $scratchpad
|
||||
windowrulev2 = $scratchpadsize, $scratchpad
|
||||
windowrulev2 = workspace special silent, $scratchpad
|
||||
|
||||
$kitty = class:^(scratchpad-kitty)$
|
||||
|
||||
windowrulev2 = float, $kitty
|
||||
windowrulev2 = $scratchpadsize, $kitty
|
||||
windowrulev2 = workspace special silent, $kitty
|
||||
$nvim = class:^(scratchpad-nvim)$
|
||||
|
||||
windowrulev2 = float, $nvim
|
||||
windowrulev2 = $scratchpadsize, $nvim
|
||||
windowrulev2 = workspace special silent, $nvim
|
||||
|
||||
bind = $mainMod SHIFT, N, exec, colorPrefix pypr toggle nvim
|
||||
bind = $mainMod SHIFT, E, exec, colorPrefix pypr toggle free
|
||||
|
||||
|
||||
bind = CTRL SHIFT, Home, exec, ssh -i ~/.ssh/key nathan@69.150.99.129 -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen
|
||||
bind = CTRL SHIFT, End, exec, ssh -i ~/.ssh/key nathan@173.242.244.284 -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen
|
||||
bind = CTRL SHIFT, Home, submap, clean
|
||||
bind = CTRL SHIFT, End, submap, clean
|
||||
|
||||
|
||||
bind = $mainMod CTRL, Home, submap, clean
|
||||
|
||||
submap = clean
|
||||
|
||||
bind = $mainMod CTRL, Home, submap, reset
|
||||
|
||||
submap = reset
|
||||
|
||||
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -1,271 +0,0 @@
|
||||
{
|
||||
description = "neovim config";
|
||||
|
||||
inputs = {
|
||||
|
||||
};
|
||||
|
||||
outputs = { self, ... }@inputs: {
|
||||
|
||||
module = {}: {};
|
||||
|
||||
hmModule = { config, lib, pkgs, ... }: {
|
||||
|
||||
imports = [];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
neovim-remote
|
||||
];
|
||||
|
||||
home.sessionVariables.SUDO_EDITOR = "kitten edit-in-kitty";
|
||||
|
||||
programs.neovim = with pkgs; {
|
||||
enable = true;
|
||||
#package = neovim;
|
||||
defaultEditor = true;
|
||||
extraLuaConfig = ''
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
vim.opt.nu = true
|
||||
vim.opt.rnu = true
|
||||
|
||||
vim.opt.scrolloff = 12
|
||||
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.opt.smartindent = true
|
||||
|
||||
vim.opt.wrap = false
|
||||
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
|
||||
vim.filetype.add({
|
||||
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
||||
})
|
||||
-- vim.opt.termguicolors = true
|
||||
require("nvim-tree").setup()
|
||||
|
||||
local lsp_zero = require('lsp-zero')
|
||||
|
||||
-- lsp_attach is where you enable features that only work
|
||||
-- if there is a language server active in the file
|
||||
local lsp_attach = function(client, bufnr)
|
||||
local opts = {buffer = bufnr}
|
||||
|
||||
vim.keymap.set('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>', opts)
|
||||
vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>', opts)
|
||||
vim.keymap.set('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>', opts)
|
||||
vim.keymap.set('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>', opts)
|
||||
vim.keymap.set('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>', opts)
|
||||
vim.keymap.set('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>', opts)
|
||||
vim.keymap.set('n', 'gs', '<cmd>lua vim.lsp.buf.signature_help()<cr>', opts)
|
||||
vim.keymap.set('n', '<F2>', '<cmd>lua vim.lsp.buf.rename()<cr>', opts)
|
||||
vim.keymap.set({'n', 'x'}, '<F3>', '<cmd>lua vim.lsp.buf.format({async = true})<cr>', opts)
|
||||
vim.keymap.set('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>', opts)
|
||||
end
|
||||
|
||||
lsp_zero.extend_lspconfig({
|
||||
sign_text = true,
|
||||
lsp_attach = lsp_attach,
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities(),
|
||||
})
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.ccls.setup{}
|
||||
lspconfig.nil_ls.setup{}
|
||||
lspconfig.statix.setup{}
|
||||
lspconfig.pyright.setup{}
|
||||
lspconfig.gopls.setup{}
|
||||
|
||||
-- local llm = require('llm')
|
||||
|
||||
-- llm.setup({
|
||||
-- api_token = nil, -- cf Install paragraph
|
||||
-- model = "codellama:7b", -- the model ID, behavior depends on backend
|
||||
-- backend = "ollama", -- backend ID, "huggingface" | "ollama" | "openai" | "tgi"
|
||||
-- url = "http://localhost:11434", -- the http url of the backend
|
||||
-- tokens_to_clear = { "<|endoftext|>" }, -- tokens to remove from the model's output
|
||||
-- parameters that are added to the request body, values are arbitrary, you can set any field:value pair here it will be passed as is to the backend
|
||||
-- request_body = {
|
||||
-- parameters = {
|
||||
-- temperature = 0.2,
|
||||
-- top_p = 0.95,
|
||||
-- },
|
||||
-- },
|
||||
-- set this if the model supports fill in the middle
|
||||
-- fim = {
|
||||
-- enabled = true,
|
||||
-- prefix = "<fim_prefix>",
|
||||
-- middle = "<fim_middle>",
|
||||
-- suffix = "<fim_suffix>",
|
||||
-- },
|
||||
-- debounce_ms = 150,
|
||||
-- accept_keymap = "<Tab>",
|
||||
-- dismiss_keymap = "<S-Tab>",
|
||||
-- tls_skip_verify_insecure = false,
|
||||
-- llm-ls configuration, cf llm-ls section
|
||||
-- lsp = {
|
||||
-- bin_path = vim.api.nvim_call_function("stdpath", { "data" }) .. "${pkgs.llm-ls}/bin/llm-ls",
|
||||
-- host = nil,
|
||||
-- port = nil,
|
||||
-- cmd_env = nil, -- or { LLM_LOG_LEVEL = "DEBUG" } to set the log level of llm-ls
|
||||
-- version = "0.5.3",
|
||||
-- },
|
||||
-- tokenizer = nil, -- cf Tokenizer paragraph
|
||||
-- context_window = 1024, -- max number of tokens for the context window
|
||||
-- enable_suggestions_on_startup = true,
|
||||
-- enable_suggestions_on_files = "*", -- pattern matching syntax to enable suggestions on specific files, either a string or a list of strings
|
||||
-- disable_url_path_completion = false, -- cf Backend
|
||||
-- })
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
|
||||
-- nvim-cmp setup
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-u>'] = cmp.mapping.scroll_docs(-4), -- Up
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4), -- Down
|
||||
-- C-b (back) C-f (forward) for snippet placeholder navigation.
|
||||
['<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_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.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's' }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
},
|
||||
})
|
||||
|
||||
require("noice").setup()
|
||||
require("barbar").setup()
|
||||
require("pywal").setup()
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = 'pywal-nvim',
|
||||
},
|
||||
})
|
||||
vim.cmd[[colorscheme pywal]]
|
||||
vim.notify = require("notify")
|
||||
|
||||
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<CR>", {desc = "find files"})
|
||||
vim.keymap.set("n", "<leader>fa", "<cmd>Telescope find_files no_ignore=true hidden=true<CR>", {desc = "find files"})
|
||||
vim.keymap.set("n", "<leader>fc", "<cmd>Telescope treesitter<CR>", {desc = "find code"})
|
||||
vim.keymap.set("n", "<leader>t", "<cmd>NvimTreeToggle<CR>", {desc = "toggle tree"})
|
||||
|
||||
vim.keymap.set("n", "<C-.>", "<cmd>BufferNext<CR>", {desc = "move to next tab"})
|
||||
vim.keymap.set("n", "<C-,>", "<cmd>BufferPrevious<CR>", {desc = "move to previous tab"})
|
||||
|
||||
vim.keymap.set("n", "<C-h>", "<cmd>wincmd h<CR>", {desc = "move to left window"})
|
||||
vim.keymap.set("n", "<C-j>", "<cmd>wincmd j<CR>", {desc = "move to below window"})
|
||||
vim.keymap.set("n", "<C-k>", "<cmd>wincmd k<CR>", {desc = "move to above window"})
|
||||
vim.keymap.set("n", "<C-l>", "<cmd>wincmd l<CR>", {desc = "move to right window"})
|
||||
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", {desc = "move selected down"})
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", {desc = "move selected up"})
|
||||
|
||||
vim.keymap.set("n", "J", "mzJ`z", {desc = "cursor still when appending next line"})
|
||||
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz", {desc = "cursor mid when page down"})
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz", {desc = "cursor mid when page up"})
|
||||
|
||||
vim.keymap.set("n", "n", "nzzzv", {desc = "search term mid"})
|
||||
vim.keymap.set("n", "N", "Nzzzv", {desc = "search term mid"})
|
||||
|
||||
vim.keymap.set("x", "<leader>p", "\"_dP", {desc = "no overwrite paste buffer"})
|
||||
|
||||
vim.keymap.set("n", "<leader>y", "\"+y", {desc = "yank to system clipboard"})
|
||||
vim.keymap.set("v", "<leader>y", "\"+y", {desc = "^"})
|
||||
vim.keymap.set("n", "<leader>Y", "\"+Y", {desc = "^"})
|
||||
|
||||
vim.keymap.set("n", "Q", "<nop>", {desc = "unmap Q"})
|
||||
|
||||
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], {desc = "replace current word entire file"})
|
||||
vim.keymap.set("n", "<leader>F", function() vim.lsp.buf.format() end, {desc = "format buffer?"})
|
||||
'';
|
||||
plugins = with vimPlugins; [
|
||||
telescope-nvim
|
||||
nvim-tree-lua
|
||||
nvim-web-devicons
|
||||
mini-nvim
|
||||
noice-nvim
|
||||
nvim-notify
|
||||
barbar-nvim
|
||||
pywal-nvim
|
||||
lualine-nvim
|
||||
tokyonight-nvim
|
||||
llm-nvim
|
||||
|
||||
cmp-buffer
|
||||
cmp-nvim-lsp
|
||||
cmp_luasnip
|
||||
luasnip
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
nvim-cmp
|
||||
nvim-lspconfig
|
||||
|
||||
lsp-zero-nvim
|
||||
|
||||
nvim-treesitter
|
||||
nvim-treesitter-parsers.cpp
|
||||
nvim-treesitter-parsers.nix
|
||||
nvim-treesitter-parsers.bash
|
||||
nvim-treesitter-parsers.python
|
||||
nvim-treesitter-parsers.lua
|
||||
nvim-treesitter-parsers.vim
|
||||
nvim-treesitter-parsers.javascript
|
||||
nvim-treesitter-parsers.css
|
||||
nvim-treesitter-parsers.hyprlang
|
||||
|
||||
];
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
nil
|
||||
statix # Lints and suggestions for the nix programming language
|
||||
pyright
|
||||
gopls
|
||||
ccls
|
||||
];
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
# Nixvim template
|
||||
|
||||
This template gives you a good starting point for configuring nixvim standalone.
|
||||
|
||||
## Configuring
|
||||
|
||||
To start configuring, just add or modify the nix files in `./config`.
|
||||
If you add a new configuration file, remember to add it to the
|
||||
[`config/default.nix`](./config/default.nix) file
|
||||
|
||||
## Testing your new configuration
|
||||
|
||||
To test your configuration simply run the following command
|
||||
|
||||
```
|
||||
nix run .
|
||||
```
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
plugins = {
|
||||
bufferline.enable = true;
|
||||
web-devicons.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
# Import all your configuration modules here
|
||||
imports = [ ./bufferline.nix ];
|
||||
|
||||
plugins = {
|
||||
|
||||
lualine.enable = true;
|
||||
|
||||
luasnip.enable = true;
|
||||
|
||||
barbar.enable = true;
|
||||
|
||||
nvim-tree.enable = true;
|
||||
|
||||
noice.enable = true;
|
||||
|
||||
mini.enable = true;
|
||||
|
||||
notify.enable = true;
|
||||
|
||||
telescope.enable = true;
|
||||
|
||||
treesitter.enable = true;
|
||||
|
||||
render-markdown.enable = true;
|
||||
|
||||
web-devicons.enable = true;
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
#js/typescript
|
||||
ts-ls.enable = true;
|
||||
#c/c++
|
||||
ccls.enable = true;
|
||||
#nix
|
||||
nil-ls.enable = true;
|
||||
#python
|
||||
pyright.enable = true;
|
||||
#bash
|
||||
bashls.enable = true;
|
||||
#css
|
||||
cssls.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "cmdline"; }
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
};
|
||||
|
||||
opts = {
|
||||
nu = true;
|
||||
rnu = true;
|
||||
|
||||
scrolloff = 12;
|
||||
|
||||
tabstop = 4;
|
||||
softtabstop = 4;
|
||||
shiftwidth = 4;
|
||||
expandtab = true;
|
||||
|
||||
smartindent = true;
|
||||
|
||||
wrap = false;
|
||||
|
||||
hlsearch = false;
|
||||
incsearch = true;
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ff";
|
||||
action = "<cmd>Telescope find_files hidden=true<CR>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fc";
|
||||
action = "<cmd>Telescope treesitter<CR>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>t";
|
||||
action = "<cmd>NvimTreeToggle<CR>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-.>";
|
||||
action = "<cmd>BufferNext<CR>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-,>";
|
||||
action = "<cmd>BufferPrevious<CR>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-h>";
|
||||
action = "<cmd>wincmd h<CR>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-j>";
|
||||
action = "<cmd>wincmd j<CR>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-k>";
|
||||
action = "<cmd>wincmd k<CR>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-l>";
|
||||
action = "<cmd>wincmd l<CR>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "n";
|
||||
key = "Q";
|
||||
action = "<nop>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "v";
|
||||
key = "J";
|
||||
action = ":m '>+1<CR>gv=gv";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "v";
|
||||
key = "K";
|
||||
action = ":m '<-2<CR>gv=gv";
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
vim.filetype.add({
|
||||
pattern = { [".*/hypr/.*%.conf"] = "hyprlang" },
|
||||
})
|
||||
'';
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
pywal-nvim
|
||||
tokyonight-nvim
|
||||
llm-nvim
|
||||
nvim-lspconfig
|
||||
|
||||
];
|
||||
|
||||
colorscheme = "pywal";
|
||||
}
|
||||
327
home/programs/nixvim/flake.lock
generated
327
home/programs/nixvim/flake.lock
generated
@@ -1,327 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722113426,
|
||||
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"revCount": 57,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727826117,
|
||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727826117,
|
||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"nixvim",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727805723,
|
||||
"narHash": "sha256-b8flytpuc4Ey/g3mcvpS/ICORcD4h56QDZeP5LogevY=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "2f5ae3fc91db865eff2c5a418da85a0fbe6238a3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727383923,
|
||||
"narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ffe2d07e771580a005e675108212597e5b367d2d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727707210,
|
||||
"narHash": "sha256-8XZp5XO2FC6INZEZ2WlwErtvFVpl45ACn8CJ2hfTA0Y=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "f61d5f2051a387a15817007220e9fb3bbead57b3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1727802920,
|
||||
"narHash": "sha256-HP89HZOT0ReIbI7IJZJQoJgxvB2Tn28V6XS3MNKnfLs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "27e30d177e57d912d614c88c622dcfdb2e6e6515",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1727825735,
|
||||
"narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1727634051,
|
||||
"narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727871072,
|
||||
"narHash": "sha256-t+YLQwBB1soQnVjT6d7nQq4Tidaw7tpB8i6Zvpc+Zbs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "0ca98d02104f7f0a703787a7a080a570b7f1bedd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727599661,
|
||||
"narHash": "sha256-0R+1ih0Rfqrz/lcduvpNSnUw3uthUHiaGh0aWPyIqeQ=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "c3c3928b8de7d300c34e9d90fdc19febd1a32062",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727431250,
|
||||
"narHash": "sha256-uGRlRT47ecicF9iLD1G3g43jn2e+b5KaMptb59LHnvM=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "879b29ae9a0378904fbbefe0dadaed43c8905754",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
description = "A nixvim configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ nixvim, flake-parts, ... }@inputs:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
|
||||
perSystem =
|
||||
{ pkgs, system, ... }:
|
||||
let
|
||||
nixvimLib = nixvim.lib.${system};
|
||||
nixvim' = nixvim.legacyPackages.${system};
|
||||
nixvimModule = {
|
||||
inherit pkgs;
|
||||
module = import ./config; # import the module directly
|
||||
# You can use `extraSpecialArgs` to pass additional arguments to your module files
|
||||
extraSpecialArgs = {
|
||||
inherit pkgs;
|
||||
};
|
||||
};
|
||||
nvim = nixvim'.makeNixvimWithModule nixvimModule;
|
||||
in
|
||||
{
|
||||
checks = {
|
||||
# Run `nix flake check .` to verify that your config is not broken
|
||||
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
|
||||
};
|
||||
|
||||
packages = {
|
||||
# Lets you run `nix run .` to start nixvim
|
||||
default = nvim;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
20
home/programs/rofi/default.nix
Normal file
20
home/programs/rofi/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
options.homeconfig.rofi.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homeconfig.rofi.enable {
|
||||
programs.rofi = {
|
||||
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
|
||||
cycle = true;
|
||||
|
||||
theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,23 +1,10 @@
|
||||
{
|
||||
description = "Rofi Config";
|
||||
description = "Rofi Config";
|
||||
|
||||
inputs = {
|
||||
outputs = { self, ... }: {
|
||||
|
||||
};
|
||||
hmModule = import ./.;
|
||||
|
||||
outputs = { self, ... }: {
|
||||
|
||||
hmModule = { config, lib, pkgs, ... }: {
|
||||
programs.rofi = {
|
||||
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
|
||||
cycle = true;
|
||||
|
||||
theme = "/home/nathan/.cache/wal/colors-rofi-dark.rasi";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user