Skip to content

Commit

Permalink
arch
Browse files Browse the repository at this point in the history
  • Loading branch information
nimueller committed Jun 22, 2024
1 parent 0acfc2e commit a9fb809
Show file tree
Hide file tree
Showing 14 changed files with 154 additions and 146 deletions.
2 changes: 2 additions & 0 deletions config/hypr/autostart.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ exec-once = sleep 1 && flatpak run com.nextcloud.desktopclient.nextcloud
# DBUS
exec-once = wl-paste --watch cliphist store
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

# vim: ft=hyprlang
2 changes: 2 additions & 0 deletions config/hypr/general.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = off
}

# vim: ft=hyprlang
6 changes: 6 additions & 0 deletions config/hypr/hyprland.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source=~/.config/hypr/general.conf
source=~/.config/hypr/autostart.conf
source=~/.config/hypr/hyprpaper.conf
source=~/.config/hypr/keybinds.conf
source=~/.config/hypr/windowrules.conf
source=~/.config/hypr/workspacerules.conf
2 changes: 2 additions & 0 deletions config/hypr/keybinds.conf
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@ bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | tee >(
bind = $mainMod, T, exec, kitty
bind = $mainMod, E, exec, nautilus
bind = $mainMod, B, exec, firefox

# vim: ft=hyprlang
2 changes: 2 additions & 0 deletions config/hypr/windowrules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ windowrulev2 = nofocus,title:^(Wine System Tray)$
windowrulev2 = noinitialfocus,title:^(Wine System Tray)$

windowrulev2 = tile,class:^(upc.exe)$

# vim: ft=hyprlang
2 changes: 2 additions & 0 deletions config/hypr/workspacerules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ windowrulev2 = workspace 6 silent, class:^(WebCord)$
windowrulev2 = workspace 7 silent, class:^(geary)$
windowrulev2 = workspace 8 silent, class:^(org.keepassxc.KeePassXC)$
windowrulev2 = workspace 9 silent, title:^(Spotify.*)$

# vim: ft=hyprlang
216 changes: 108 additions & 108 deletions config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ vim.g.maplocalleader = " "

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)

Expand All @@ -22,55 +22,55 @@ vim.opt.rtp:prepend(lazypath)
-- You can also configure plugins after the setup call,
-- as they will be available in your neovim runtime.
require("lazy").setup({
-- NOTE: First, some plugins that don't require any configuration
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
lazy = false,
config = function()
-- load the colorscheme here
vim.cmd([[colorscheme catppuccin-macchiato]])
end,
},

-- Detect tabstop and shiftwidth automatically
"tpope/vim-sleuth",

-- NOTE: This is where your plugins related to LSP can be installed.
-- The configuration is done below. Search for lspconfig to find it below.
{
-- LSP Configuration & Plugins
"neovim/nvim-lspconfig",
dependencies = {
-- Useful status updates for LSP
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ "j-hui/fidget.nvim", tag = "legacy", opts = {} },

-- Additional lua configuration, makes nvim stuff amazing!
{ "folke/neodev.nvim", opts = {} },
},
},
{
-- Autocompletion
"hrsh7th/nvim-cmp",
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",

-- Adds LSP completion capabilities
"hrsh7th/cmp-nvim-lsp",

-- Adds a number of user-friendly snippets
"rafamadriz/friendly-snippets",
},
},

require("plugins.git"),
require("plugins.editor"),
require("plugins.ui"),
require("plugins.utils"),
-- NOTE: First, some plugins that don't require any configuration
{
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
lazy = false,
config = function()
-- load the colorscheme here
vim.cmd([[colorscheme catppuccin-macchiato]])
end,
},

-- Detect tabstop and shiftwidth automatically
"tpope/vim-sleuth",

-- NOTE: This is where your plugins related to LSP can be installed.
-- The configuration is done below. Search for lspconfig to find it below.
{
-- LSP Configuration & Plugins
"neovim/nvim-lspconfig",
dependencies = {
-- Useful status updates for LSP
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ "j-hui/fidget.nvim", tag = "legacy", opts = {} },

-- Additional lua configuration, makes nvim stuff amazing!
{ "folke/neodev.nvim", opts = {} },
},
},
{
-- Autocompletion
"hrsh7th/nvim-cmp",
dependencies = {
-- Snippet Engine & its associated nvim-cmp source
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",

-- Adds LSP completion capabilities
"hrsh7th/cmp-nvim-lsp",

-- Adds a number of user-friendly snippets
"rafamadriz/friendly-snippets",
},
},

require("plugins.git"),
require("plugins.editor"),
require("plugins.ui"),
require("plugins.utils"),
}, {})

-- Set highlight on search
Expand All @@ -91,23 +91,23 @@ vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagn
-- See `:help vim.highlight.on_yank()`
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
vim.api.nvim_create_autocmd("TextYankPost", {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = "*",
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = "*",
})

-- document existing key chains
require("which-key").register({
["<leader>c"] = { name = "[C]ode", _ = "which_key_ignore" },
["<leader>d"] = { name = "[D]ocument", _ = "which_key_ignore" },
["<leader>g"] = { name = "[G]it", _ = "which_key_ignore" },
["<leader>h"] = { name = "More git", _ = "which_key_ignore" },
["<leader>r"] = { name = "[R]ename", _ = "which_key_ignore" },
["<leader>s"] = { name = "[S]earch", _ = "which_key_ignore" },
["<leader>w"] = { name = "[W]orkspace", _ = "which_key_ignore" },
["<leader>f"] = { name = "[F]ile", _ = "which_key_ignore" },
["<leader>c"] = { name = "[C]ode", _ = "which_key_ignore" },
["<leader>d"] = { name = "[D]ocument", _ = "which_key_ignore" },
["<leader>g"] = { name = "[G]it", _ = "which_key_ignore" },
["<leader>h"] = { name = "More git", _ = "which_key_ignore" },
["<leader>r"] = { name = "[R]ename", _ = "which_key_ignore" },
["<leader>s"] = { name = "[S]earch", _ = "which_key_ignore" },
["<leader>w"] = { name = "[W]orkspace", _ = "which_key_ignore" },
["<leader>f"] = { name = "[F]ile", _ = "which_key_ignore" },
})

-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
Expand All @@ -122,44 +122,44 @@ require("luasnip.loaders.from_vscode").lazy_load()
luasnip.config.setup({})

cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete({}),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
}),
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
},
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_next_item(),
["<C-p>"] = cmp.mapping.select_prev_item(),
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete({}),
["<CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
}),
sources = {
{ name = "nvim_lsp" },
{ name = "luasnip" },
},
})

require("settings/general")
Expand Down
21 changes: 10 additions & 11 deletions home-manager/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@ in
inputs.spicetify-nix.homeManagerModule
./apps.nix
./gaming.nix
./symlinks.nix
../theme/desktop.nix
];

# Basic Hyprland configuration
wayland.windowManager.hyprland = {
enable = true;
extraConfig =
builtins.readFile ../../config/hypr/general.conf +
builtins.readFile ../../config/hypr/windowrules.conf +
builtins.readFile ../../config/hypr/workspacerules.conf +
builtins.readFile ../../config/hypr/keybinds.conf +
builtins.readFile ../../config/hypr/autostart.conf;
};

xdg.configFile."waybar".source = config.lib.file.mkOutOfStoreSymlink "${config.dotfiles}/config/waybar";
# wayland.windowManager.hyprland = {
# enable = true;
# extraConfig =
# builtins.readFile ../../config/hypr/general.conf +
# builtins.readFile ../../config/hypr/windowrules.conf +
# builtins.readFile ../../config/hypr/workspacerules.conf +
# builtins.readFile ../../config/hypr/keybinds.conf +
# builtins.readFile ../../config/hypr/autostart.conf;
# };

xdg.configFile."nwg-bar/style.css".source = ../../config/nwg-bar/style.css;
xdg.configFile."nwg-bar/bar.json".text =
Expand Down
6 changes: 6 additions & 0 deletions home-manager/desktop/symlinks.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ config, ... }:
{
xdg.configFile."hypr".source = config.lib.file.mkOutOfStoreSymlink "${config.dotfiles}/config/hypr";
xdg.configFile."waybar".source = config.lib.file.mkOutOfStoreSymlink "${config.dotfiles}/config/waybar";
}

7 changes: 3 additions & 4 deletions home-manager/headless/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, pkgs, username, ... }:
{ pkgs, username, ... }:
{
# Basic home manager settings
programs.home-manager.enable = true;
Expand All @@ -12,6 +12,7 @@
gcc

# Terminal programs
tmux # GOAT
fzf # Lifesaver!
autojump # Lifesaver #2!
tldr
Expand All @@ -24,8 +25,8 @@
];

imports = [
./tmux.nix
./neovim.nix
./symlinks.nix
../theme/default.nix
];

Expand All @@ -40,8 +41,6 @@
enableCompletion = true;
syntaxHighlighting.enable = true;

initExtra = builtins.readFile ../../config/zshrc;

oh-my-zsh = {
enable = true;
theme = "skaro";
Expand Down
7 changes: 1 addition & 6 deletions home-manager/headless/neovim.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
programs.neovim.enable = true;

xdg.configFile."nvim/init.lua".source = ../../config/nvim/init.lua;
# xdg.configFile."nvim/lua".source = config.lib.file.mkOutOfStoreSymlink "${config.dotfiles}/config/nvim/lua";
xdg.configFile."nvim/lua".source = config.lib.file.mkOutOfStoreSymlink "${config.dotfiles}/config/nvim/lua";

home.packages = with pkgs; [
# neovim plugin package dependencies
ripgrep
Expand Down
6 changes: 6 additions & 0 deletions home-manager/headless/symlinks.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ config, ... }:
{
home.file.".zshrc".source = config.lib.file.mkOutOfStoreSymlink "${config.dotfiles}/config/zshrc";
home.file.".tmux.conf".source = config.lib.file.mkOutOfStoreSymlink "${config.dotfiles}/config/tmux.conf";
xdg.configFile."nvim".source = config.lib.file.mkOutOfStoreSymlink "${config.dotfiles}/config/nvim";
}
13 changes: 0 additions & 13 deletions home-manager/headless/tmux.nix

This file was deleted.

Loading

0 comments on commit a9fb809

Please sign in to comment.