new formatting, nixvim is working

This commit is contained in:
Charlie Root 2024-05-22 14:29:45 +02:00
commit 0e22544a8a
88 changed files with 1994 additions and 1845 deletions

View file

@ -1,8 +1,12 @@
{ {
description = "My NixOS config flake"; description = "My NixOS config flake";
outputs = inputs@{ self, nixpkgs, ... }: { outputs = inputs @ {
self,
nixpkgs,
...
}: {
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
nixosConfigurations = import ./hosts { inherit inputs; }; nixosConfigurations = import ./hosts {inherit inputs;};
}; };
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -49,7 +53,7 @@
}; };
}; };
spicetify-nix.url = "github:the-argus/spicetify-nix"; spicetify-nix.url = "github:the-argus/spicetify-nix";
nur = { url = "github:nix-community/NUR"; }; nur = {url = "github:nix-community/NUR";};
nixvim = { nixvim = {
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -63,6 +67,5 @@
url = "github:nix-community/fenix"; url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
} }

View file

@ -1,11 +1,10 @@
{ inputs, ... }: {inputs, ...}: let
let
inherit (inputs) self; inherit (inputs) self;
inherit (self) lib; inherit (self) lib;
in { in {
mars = lib.nixosSystem { mars = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit lib inputs self; }; specialArgs = {inherit lib inputs self;};
modules = [ modules = [
inputs.stylix.nixosModules.stylix inputs.stylix.nixosModules.stylix
./vali/mars ./vali/mars
@ -15,5 +14,4 @@ in {
inputs.nixvim.nixosModules.nixvim inputs.nixvim.nixosModules.nixvim
]; ];
}; };
} }

View file

@ -1,31 +1,31 @@
{ pkgs, ... }: { {pkgs, ...}: {
# allow unfree packages # allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Time Zone # Time Zone
time.timeZone = "Europe/Zurich"; time.timeZone = "Europe/Zurich";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "de"; console.keyMap = "de";
nix = { nix = {
settings = { settings = {
substituters = [ "https://hyprland.cachix.org" ]; substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = [ trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
# enable flakes # enable flakes
experimental-features = [ "nix-command" "flakes" ]; experimental-features = ["nix-command" "flakes"];
# reduce file size used & automatic garbage collector # reduce file size used & automatic garbage collector
auto-optimise-store = true; auto-optimise-store = true;
}; };
}; };
security.sudo.package = pkgs.sudo.override { withInsults = true; }; security.sudo.package = pkgs.sudo.override {withInsults = true;};
security.polkit.enable = true; security.polkit.enable = true;
programs.kdeconnect.enable = true; programs.kdeconnect.enable = true;
programs.dconf.enable = true; programs.dconf.enable = true;
# boot.kernelModules = [ "v4l2loopback" ]; # boot.kernelModules = [ "v4l2loopback" ];
boot.kernelPackages = pkgs.linuxPackages_zen; boot.kernelPackages = pkgs.linuxPackages_zen;
# boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ]; # boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
# services.picom.enable = true; # services.picom.enable = true;
services.emacs.enable = true; services.emacs.enable = true;
modules = { modules = {
other = { other = {
@ -75,7 +75,7 @@
dunst.enable = true; dunst.enable = true;
}; };
themes = { themes = {
gtk = { enable = true; }; gtk = {enable = true;};
qt = { qt = {
enable = false; enable = false;
package = pkgs.kde-gruvbox; package = pkgs.kde-gruvbox;

View file

@ -1,22 +1,24 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"];
[ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [];
boot.initrd.kernelModules = [ ]; boot.kernelModules = ["kvm-intel"];
boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/0423508a-6906-4872-baeb-2b1e6bd017a4"; device = "/dev/disk/by-uuid/0423508a-6906-4872-baeb-2b1e6bd017a4";
fsType = "ext4"; fsType = "ext4";
options = [ "noatime" "nodiratime" "discard" ]; options = ["noatime" "nodiratime" "discard"];
}; };
boot.initrd.luks.devices."luks-c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f".device = boot.initrd.luks.devices."luks-c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f".device = "/dev/disk/by-uuid/c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f";
"/dev/disk/by-uuid/c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f";
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D299-5174"; device = "/dev/disk/by-uuid/D299-5174";

View file

@ -1,5 +1,8 @@
{ inputs, pkgs, ... }: {
let inputs,
pkgs,
...
}: let
fenix = inputs.fenix.packages.${pkgs.system}; fenix = inputs.fenix.packages.${pkgs.system};
nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system}; nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system};
in { in {

View file

@ -1,12 +1,11 @@
# Taken from: https://github.com/hlissner/dotfiles/blob/master/lib/options.nix # Taken from: https://github.com/hlissner/dotfiles/blob/master/lib/options.nix
{ lib, ... }: {lib, ...}: let
inherit (lib) mkOption types;
let inherit (lib) mkOption types;
in { in {
mkOpt = type: default: mkOption { inherit type default; }; mkOpt = type: default: mkOption {inherit type default;};
mkOpt' = type: default: description: mkOpt' = type: default: description:
mkOption { inherit type default description; }; mkOption {inherit type default description;};
mkBoolOpt = default: mkBoolOpt = default:
mkOption { mkOption {

View file

@ -1 +1 @@
_: { imports = [ ./neovim.nix ./fish.nix ./nh.nix ]; } _: {imports = [./neovim.nix ./fish.nix ./nh.nix];}

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.fish; cfg = config.modules.programs.fish;
username = config.modules.other.system.username; username = config.modules.other.system.username;
# not needed because I'm using nh os switch # not needed because I'm using nh os switch
@ -12,7 +16,7 @@ in {
extraAliases = mkOption { extraAliases = mkOption {
type = types.attrs; type = types.attrs;
description = "extra shell aliases"; description = "extra shell aliases";
default = { }; default = {};
}; };
}; };
@ -22,12 +26,12 @@ in {
users.users.${username}.shell = pkgs.fish; users.users.${username}.shell = pkgs.fish;
environment = { environment = {
shells = [ pkgs.fish ]; shells = [pkgs.fish];
pathsToLink = [ "/share/fish" ]; pathsToLink = ["/share/fish"];
}; };
home-manager.users.${username} = { home-manager.users.${username} = {
home.packages = with pkgs; [ nix-output-monitor ]; home.packages = with pkgs; [nix-output-monitor];
programs.zoxide.enable = true; programs.zoxide.enable = true;
programs.zoxide.enableFishIntegration = true; programs.zoxide.enableFishIntegration = true;
programs.fish = { programs.fish = {
@ -55,24 +59,26 @@ in {
src = pkgs.fishPlugins.tide.src; src = pkgs.fishPlugins.tide.src;
} }
]; ];
shellAbbrs = { shellAbbrs =
c = "clear"; {
cc = "cd ~ && clear"; c = "clear";
mv = "mv -iv"; cc = "cd ~ && clear";
rm = "trash -v"; mv = "mv -iv";
ls = "eza --icons"; rm = "trash -v";
l = "eza -a --icons"; ls = "eza --icons";
la = "eza -lha --icons --git"; l = "eza -a --icons";
kys = "shutdown now"; la = "eza -lha --icons --git";
lg = "lazygit"; kys = "shutdown now";
cd = "z"; lg = "lazygit";
v = "nvim"; cd = "z";
h = "hx"; v = "nvim";
k = "kak"; h = "hx";
e = "emacs"; k = "kak";
update = ''nh os switch "${gitPath}"''; e = "emacs";
flake = "cd '${gitPath}'"; update = ''nh os switch "${gitPath}"'';
} // cfg.extraAliases; flake = "cd '${gitPath}'";
}
// cfg.extraAliases;
}; };
}; };
}; };

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
let lib,
pkgs,
...
}: let
lazyvim-config = pkgs.fetchFromGitHub { lazyvim-config = pkgs.fetchFromGitHub {
owner = "Dragyx"; owner = "Dragyx";
repo = "lazyvim-config"; repo = "lazyvim-config";
@ -14,7 +17,7 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
home.packages = with pkgs; [ lazygit ripgrep fd gcc xclip rust-analyzer ]; home.packages = with pkgs; [lazygit ripgrep fd gcc xclip rust-analyzer];
programs.neovim = { programs.neovim = {
enable = true; enable = true;
viAlias = true; viAlias = true;
@ -28,6 +31,5 @@ in {
recursive = true; recursive = true;
}; };
}; };
}; };
} }

View file

@ -1,6 +1,10 @@
{ lib, config, ... }: {
with lib; lib,
let cfg = config.modules.programs.nh; config,
...
}:
with lib; let
cfg = config.modules.programs.nh;
in { in {
options.modules.programs.nh.enable = mkEnableOption "nh"; options.modules.programs.nh.enable = mkEnableOption "nh";

View file

@ -1 +1 @@
_: { imports = [ ./cli ./gui ./tui ./other ./services ./editors ./wms ]; } _: {imports = [./cli ./gui ./tui ./other ./services ./editors ./wms];}

View file

@ -1 +1 @@
_: { imports = [ ./emacs.nix ./helix.nix ./kakoune.nix ./nixvim ]; } _: {imports = [./emacs.nix ./helix.nix ./kakoune.nix ./nixvim];}

View file

@ -1,8 +1,12 @@
# Taken from: https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix # Taken from: https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix
{ config, lib, pkgs, inputs, ... }: {
config,
with lib; lib,
let pkgs,
inputs,
...
}:
with lib; let
cfg = config.modules.editors.emacs; cfg = config.modules.editors.emacs;
username = config.modules.other.system.username; username = config.modules.other.system.username;
repoUrl = inputs.doomemacs; repoUrl = inputs.doomemacs;
@ -20,18 +24,18 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
## Emacs itself as an overlay ## Emacs itself as an overlay
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ]; nixpkgs.overlays = [inputs.emacs-overlay.overlay];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
binutils # native-comp needs 'as', provided by this binutils # native-comp needs 'as', provided by this
# 28.2 + native-comp # 28.2 + native-comp
((emacsPackagesFor emacsNativeComp).emacsWithPackages ((emacsPackagesFor emacsNativeComp).emacsWithPackages
(epkgs: [ epkgs.vterm ])) (epkgs: [epkgs.vterm]))
emacs-desktop-symbol emacs-desktop-symbol
## Doom dependencies ## Doom dependencies
git git
(ripgrep.override { withPCRE2 = true; }) (ripgrep.override {withPCRE2 = true;})
gnutls # for TLS connectivity gnutls # for TLS connectivity
## Optional dependencies ## Optional dependencies
@ -41,7 +45,7 @@ in {
## Module dependencies ## Module dependencies
# :checkers spell # :checkers spell
(aspellWithDicts (ds: with ds; [ en en-computers en-science ])) (aspellWithDicts (ds: with ds; [en en-computers en-science]))
# :tools editorconfig # :tools editorconfig
editorconfig-core-c # per-project style config editorconfig-core-c # per-project style config
# :tools lookup & :lang org +roam # :tools lookup & :lang org +roam
@ -52,12 +56,11 @@ in {
beancount beancount
]; ];
home-manager.users.${username}.home.sessionPath = home-manager.users.${username}.home.sessionPath = ["/home/vali/.config/emacs/bin"];
[ "/home/vali/.config/emacs/bin" ];
# modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ]; # modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ];
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; fonts.fonts = [pkgs.emacs-all-the-icons-fonts];
system.userActivationScripts = mkIf cfg.doom.enable { system.userActivationScripts = mkIf cfg.doom.enable {
installDoomEmacs = '' installDoomEmacs = ''

View file

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }: {
let config,
lib,
pkgs,
...
}: let
cfg = config.modules.editors.helix; cfg = config.modules.editors.helix;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -16,26 +20,25 @@ in {
bufferline = "multiple"; bufferline = "multiple";
soft-wrap.enable = true; soft-wrap.enable = true;
lsp.display-messages = true; lsp.display-messages = true;
cursor-shape = { insert = "bar"; }; cursor-shape = {insert = "bar";};
statusline.left = statusline.left = ["mode" "spinner" "version-control" "file-name"];
[ "mode" "spinner" "version-control" "file-name" ];
}; };
keys.normal = { keys.normal = {
C-g = C-g = [":new" ":insert-output lazygit" ":buffer-close!" ":redraw"];
[ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ]; C-t = [":new" ":insert-output fish" ":buffer-close!" ":redraw"];
C-t = [ ":new" ":insert-output fish" ":buffer-close!" ":redraw" ]; esc = ["collapse_selection" "keep_primary_selection"];
esc = [ "collapse_selection" "keep_primary_selection" ];
A-H = "goto_previous_buffer"; A-H = "goto_previous_buffer";
A-L = "goto_next_buffer"; A-L = "goto_next_buffer";
A-w = ":buffer-close"; A-w = ":buffer-close";
}; };
}; };
languages.language = [{ languages.language = [
name = "nix"; {
auto-format = true; name = "nix";
formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt"; auto-format = true;
}]; formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt";
}
];
}; };
}; };
}; };

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.editors.kakoune; cfg = config.modules.editors.kakoune;
username = config.modules.other.system.username; username = config.modules.other.system.username;
# inherit (inputs.kakoune.packages.${pkgs.system}) kakoun; # inherit (inputs.kakoune.packages.${pkgs.system}) kakoun;
@ -41,8 +45,7 @@ in {
mode = "normal"; mode = "normal";
key = "<esc>"; key = "<esc>";
effect = ";,"; effect = ";,";
docstring = docstring = "Press escape to clear highlighted text and collapse cursors";
"Press escape to clear highlighted text and collapse cursors";
} }
{ {
mode = "normal"; mode = "normal";
@ -119,6 +122,5 @@ in {
''; '';
}; };
}; };
}; };
} }

View file

@ -1 +1 @@
_: { imports = [ ./kakoune.nix ]; } _: {imports = [./kakoune.nix];}

View file

@ -1,6 +1,11 @@
{ config, lib, pkgs, buildGoModule, ... }: {
with lib; config,
let lib,
pkgs,
buildGoModule,
...
}:
with lib; let
cfg = config.modules.programs.kakoune; cfg = config.modules.programs.kakoune;
username = config.modules.other.system.username; username = config.modules.other.system.username;
kakship = pkgs.rustPlatform.buildRustPackage rec { kakship = pkgs.rustPlatform.buildRustPackage rec {
@ -16,8 +21,7 @@ let
lockFile = "${src}/Cargo.lock"; lockFile = "${src}/Cargo.lock";
outputHashes = { outputHashes = {
"kak-0.1.2" = "sha256-RhtHQkC9yCSJtr/kbC5c9MavbL79acrsiEGXyoAST8U="; "kak-0.1.2" = "sha256-RhtHQkC9yCSJtr/kbC5c9MavbL79acrsiEGXyoAST8U=";
"yew-ansi-0.1.0" = "yew-ansi-0.1.0" = "sha256-dSaEzqiOon+OqCZKQudzLRNP+Iv97kC+XZcTElKNrzs=";
"sha256-dSaEzqiOon+OqCZKQudzLRNP+Iv97kC+XZcTElKNrzs=";
}; };
}; };
@ -70,7 +74,7 @@ let
description = "Handy Kakoune companion."; description = "Handy Kakoune companion.";
homepage = "https://github.com/kkga/kks"; homepage = "https://github.com/kkga/kks";
license = licenses.unfree; license = licenses.unfree;
maintainers = with maintainers; [ kalbasit ]; maintainers = with maintainers; [kalbasit];
}; };
}; };
kak-alacritty = pkgs.kakouneUtils.buildKakounePluginFrom2Nix rec { kak-alacritty = pkgs.kakouneUtils.buildKakounePluginFrom2Nix rec {
@ -97,7 +101,7 @@ let
in { in {
options.modules.programs.kakoune.enable = mkEnableOption "kakoune"; options.modules.programs.kakoune.enable = mkEnableOption "kakoune";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { programs.kakoune.enable = true; }; home-manager.users.${username} = {programs.kakoune.enable = true;};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
rust-analyzer rust-analyzer
rustfmt # Rust LSP rustfmt # Rust LSP

View file

@ -244,7 +244,8 @@
{ {
mode = "n"; mode = "n";
key = "<C-d>"; key = "<C-d>";
action = "<C-d>zz"; action = "<C-d>";
#action = "<C-d>zz";
options = { options = {
desc = "Allow C-d and C-u to keep the cursor in the middle"; desc = "Allow C-d and C-u to keep the cursor in the middle";
}; };
@ -253,7 +254,8 @@
{ {
mode = "n"; mode = "n";
key = "<C-u>"; key = "<C-u>";
action = "<C-u>zz"; #action = "<C-u>zz";
action = "<C-u>";
options = { options = {
desc = "Allow C-d and C-u to keep the cursor in the middle"; desc = "Allow C-d and C-u to keep the cursor in the middle";
}; };

View file

@ -1,122 +1,122 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins = { plugins = {
cmp-emoji = {enable = true;}; cmp-emoji = {enable = true;};
cmp = { cmp = {
enable = true; enable = true;
settings = { settings = {
autoEnableSources = true; autoEnableSources = true;
experimental = {ghost_text = true;}; experimental = {ghost_text = true;};
performance = { performance = {
debounce = 60; debounce = 60;
fetchingTimeout = 200; fetchingTimeout = 200;
maxViewEntries = 30; maxViewEntries = 30;
}; };
snippet = {expand = "luasnip";}; snippet = {expand = "luasnip";};
formatting = {fields = ["kind" "abbr" "menu"];}; formatting = {fields = ["kind" "abbr" "menu"];};
sources = [ sources = [
{name = "nvim_lsp";} {name = "nvim_lsp";}
{name = "emoji";} {name = "emoji";}
{ {
name = "buffer"; # text within current buffer name = "buffer"; # text within current buffer
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
keywordLength = 3; keywordLength = 3;
} }
{ {
name = "path"; # file system paths name = "path"; # file system paths
keywordLength = 3; keywordLength = 3;
} }
{ {
name = "luasnip"; # snippets name = "luasnip"; # snippets
keywordLength = 3; keywordLength = 3;
} }
]; ];
window = { window = {
completion = {border = "solid";}; completion = {border = "solid";};
documentation = {border = "solid";}; documentation = {border = "solid";};
}; };
mapping = { mapping = {
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
"<C-j>" = "cmp.mapping.select_next_item()"; "<C-j>" = "cmp.mapping.select_next_item()";
"<C-k>" = "cmp.mapping.select_prev_item()"; "<C-k>" = "cmp.mapping.select_prev_item()";
"<C-e>" = "cmp.mapping.abort()"; "<C-e>" = "cmp.mapping.abort()";
"<C-b>" = "cmp.mapping.scroll_docs(-4)"; "<C-b>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)"; "<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()"; "<C-Space>" = "cmp.mapping.complete()";
"<CR>" = "cmp.mapping.confirm({ select = true })"; "<CR>" = "cmp.mapping.confirm({ select = true })";
"<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })"; "<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
};
}; };
}; };
cmp-nvim-lsp = {enable = true;}; # lsp
cmp-buffer = {enable = true;};
cmp-path = {enable = true;}; # file system paths
cmp_luasnip = {enable = true;}; # snippets
cmp-cmdline = {enable = false;}; # autocomplete for cmdline
}; };
cmp-nvim-lsp = {enable = true;}; # lsp extraConfigLua = ''
cmp-buffer = {enable = true;}; luasnip = require("luasnip")
cmp-path = {enable = true;}; # file system paths kind_icons = {
cmp_luasnip = {enable = true;}; # snippets Text = "󰊄",
cmp-cmdline = {enable = false;}; # autocomplete for cmdline Method = "",
}; Function = "󰡱",
extraConfigLua = '' Constructor = "",
luasnip = require("luasnip") Field = "",
kind_icons = { Variable = "󱀍",
Text = "󰊄", Class = "",
Method = "", Interface = "",
Function = "󰡱", Module = "󰕳",
Constructor = "", Property = "",
Field = "", Unit = "",
Variable = "󱀍", Value = "",
Class = "", Enum = "",
Interface = "", Keyword = "",
Module = "󰕳", Snippet = "",
Property = "", Color = "",
Unit = "", File = "",
Value = "", Reference = "",
Enum = "", Folder = "",
Keyword = "", EnumMember = "",
Snippet = "", Constant = "",
Color = "", Struct = "",
File = "", Event = "",
Reference = "", Operator = "",
Folder = "", TypeParameter = "",
EnumMember = "", }
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
local cmp = require'cmp' local cmp = require'cmp'
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({'/', "?" }, { cmp.setup.cmdline({'/', "?" }, {
sources = { sources = {
{ name = 'buffer' } { name = 'buffer' }
} }
})
-- Set configuration for specific filetype.
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, {
{ name = 'buffer' },
}) })
})
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -- Set configuration for specific filetype.
cmp.setup.cmdline(':', { cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'path' } { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, { }, {
{ name = 'cmdline' } { name = 'buffer' },
}), })
-- formatting = { })
-- format = function(_, vim_item)
-- vim_item.kind = cmdIcons[vim_item.kind] or "FOO" -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
-- return vim_item cmp.setup.cmdline(':', {
-- end sources = cmp.config.sources({
-- } { name = 'path' }
}) ''; }, {
}; { name = 'cmdline' }
}),
-- formatting = {
-- format = function(_, vim_item)
-- vim_item.kind = cmdIcons[vim_item.kind] or "FOO"
-- return vim_item
-- end
-- }
}) '';
};
} }

View file

@ -1,78 +1,78 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.gitsigns = { plugins.gitsigns = {
enable = true; enable = true;
settings = { settings = {
trouble = true; trouble = true;
current_line_blame = true; current_line_blame = true;
signs = { signs = {
add = { add = {
text = ""; text = "";
}; };
change = { change = {
text = ""; text = "";
}; };
delete = { delete = {
text = "_"; text = "_";
}; };
topdelete = { topdelete = {
text = ""; text = "";
}; };
changedelete = { changedelete = {
text = "~"; text = "~";
}; };
untracked = { untracked = {
text = ""; text = "";
};
}; };
}; };
}; };
keymaps = [
{
mode = ["n" "v"];
key = "<leader>gh";
action = "gitsigns";
options = {
silent = true;
desc = "+hunks";
};
}
{
mode = "n";
key = "<leader>ghb";
action = ":Gitsigns blame_line<CR>";
options = {
silent = true;
desc = "Blame line";
};
}
{
mode = "n";
key = "<leader>ghd";
action = ":Gitsigns diffthis<CR>";
options = {
silent = true;
desc = "Diff This";
};
}
{
mode = "n";
key = "<leader>ghR";
action = ":Gitsigns reset_buffer<CR>";
options = {
silent = true;
desc = "Reset Buffer";
};
}
{
mode = "n";
key = "<leader>ghS";
action = ":Gitsigns stage_buffer<CR>";
options = {
silent = true;
desc = "Stage Buffer";
};
}
];
}; };
keymaps = [
{
mode = ["n" "v"];
key = "<leader>gh";
action = "gitsigns";
options = {
silent = true;
desc = "+hunks";
};
}
{
mode = "n";
key = "<leader>ghb";
action = ":Gitsigns blame_line<CR>";
options = {
silent = true;
desc = "Blame line";
};
}
{
mode = "n";
key = "<leader>ghd";
action = ":Gitsigns diffthis<CR>";
options = {
silent = true;
desc = "Diff This";
};
}
{
mode = "n";
key = "<leader>ghR";
action = ":Gitsigns reset_buffer<CR>";
options = {
silent = true;
desc = "Reset Buffer";
};
}
{
mode = "n";
key = "<leader>ghS";
action = ":Gitsigns stage_buffer<CR>";
options = {
silent = true;
desc = "Stage Buffer";
};
}
];
};
} }

View file

@ -1,22 +1,22 @@
{pkgs, ...}: { {pkgs, ...}: {
programs.nixvim = { programs.nixvim = {
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [
lazygit-nvim lazygit-nvim
]; ];
extraConfigLua = '' extraConfigLua = ''
require("telescope").load_extension("lazygit") require("telescope").load_extension("lazygit")
''; '';
keymaps = [ keymaps = [
{ {
mode = "n"; mode = "n";
key = "<leader>gg"; key = "<leader>gg";
action = "<cmd>LazyGit<CR>"; action = "<cmd>LazyGit<CR>";
options = { options = {
desc = "LazyGit (root dir)"; desc = "LazyGit (root dir)";
}; };
} }
]; ];
}; };
} }

View file

@ -1,101 +1,101 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.fidget = { plugins.fidget = {
enable = true; enable = true;
logger = { logger = {
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace” level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
floatPrecision = 0.01; # Limit the number of decimals displayed for floats floatPrecision = 0.01; # Limit the number of decimals displayed for floats
}; };
progress = { progress = {
pollRate = 0; # How and when to poll for progress messages pollRate = 0; # How and when to poll for progress messages
suppressOnInsert = true; # Suppress new messages while in insert mode suppressOnInsert = true; # Suppress new messages while in insert mode
ignoreDoneAlready = false; # Ignore new tasks that are already complete ignoreDoneAlready = false; # Ignore new tasks that are already complete
ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message
clearOnDetach = clearOnDetach =
# Clear notification group when LSP server detaches # Clear notification group when LSP server detaches
'' ''
function(client_id) function(client_id)
local client = vim.lsp.get_client_by_id(client_id) local client = vim.lsp.get_client_by_id(client_id)
return client and client.name or nil return client and client.name or nil
end
'';
notificationGroup =
# How to get a progress message's notification group key
''
function(msg) return msg.lsp_client.name end
'';
ignore = []; # List of LSP servers to ignore
lsp = {
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
};
display = {
renderLimit = 16; # How many LSP messages to show at once
doneTtl = 3; # How long a message should persist after completion
doneIcon = ""; # Icon shown when all LSP progress tasks are complete
doneStyle = "Constant"; # Highlight group for completed LSP tasks
progressTtl = "math.huge"; # How long a message should persist when in progress
progressIcon = {
pattern = "dots";
period = 1;
}; # Icon shown when LSP progress tasks are in progress
progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks
groupStyle = "Title"; # Highlight group for group name (LSP server name)
iconStyle = "Question"; # Highlight group for group icons
priority = 30; # Ordering priority for LSP notification group
skipHistory = true; # Whether progress notifications should be omitted from history
formatMessage = ''
require ("fidget.progress.display").default_format_message
''; # How to format a progress message
formatAnnote = ''
function (msg) return msg.title end
''; # How to format a progress annotation
formatGroupName = ''
function (group) return tostring (group) end
''; # How to format a progress notification group's name
overrides = {
rust_analyzer = {
name = "rust-analyzer";
};
}; # Override options from the default notification config
};
};
notification = {
pollRate = 10; # How frequently to update and render notifications
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
historySize = 128; # Number of removed messages to retain in history
overrideVimNotify = true;
redirect = ''
function(msg, level, opts)
if opts and opts.on_open then
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
end
end end
''; '';
notificationGroup = configs = {
# How to get a progress message's notification group key default = "require('fidget.notification').default_config";
'' };
function(msg) return msg.lsp_client.name end
'';
ignore = []; # List of LSP servers to ignore
lsp = {
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
};
display = {
renderLimit = 16; # How many LSP messages to show at once
doneTtl = 3; # How long a message should persist after completion
doneIcon = ""; # Icon shown when all LSP progress tasks are complete
doneStyle = "Constant"; # Highlight group for completed LSP tasks
progressTtl = "math.huge"; # How long a message should persist when in progress
progressIcon = {
pattern = "dots";
period = 1;
}; # Icon shown when LSP progress tasks are in progress
progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks
groupStyle = "Title"; # Highlight group for group name (LSP server name)
iconStyle = "Question"; # Highlight group for group icons
priority = 30; # Ordering priority for LSP notification group
skipHistory = true; # Whether progress notifications should be omitted from history
formatMessage = ''
require ("fidget.progress.display").default_format_message
''; # How to format a progress message
formatAnnote = ''
function (msg) return msg.title end
''; # How to format a progress annotation
formatGroupName = ''
function (group) return tostring (group) end
''; # How to format a progress notification group's name
overrides = {
rust_analyzer = {
name = "rust-analyzer";
};
}; # Override options from the default notification config
};
};
notification = {
pollRate = 10; # How frequently to update and render notifications
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
historySize = 128; # Number of removed messages to retain in history
overrideVimNotify = true;
redirect = ''
function(msg, level, opts)
if opts and opts.on_open then
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
end
end
'';
configs = {
default = "require('fidget.notification').default_config";
};
window = { window = {
normalHl = "Comment"; normalHl = "Comment";
winblend = 0; winblend = 0;
border = "none"; # none, single, double, rounded, solid, shadow border = "none"; # none, single, double, rounded, solid, shadow
zindex = 45; zindex = 45;
maxWidth = 0; maxWidth = 0;
maxHeight = 0; maxHeight = 0;
xPadding = 1; xPadding = 1;
yPadding = 0; yPadding = 0;
align = "bottom"; align = "bottom";
relative = "editor"; relative = "editor";
}; };
view = { view = {
stackUpwards = true; # Display notification items from bottom to top stackUpwards = true; # Display notification items from bottom to top
iconSeparator = " "; # Separator between group name and icon iconSeparator = " "; # Separator between group name and icon
groupSeparator = "---"; # Separator between notification groups groupSeparator = "---"; # Separator between notification groups
groupSeparatorHl = groupSeparatorHl =
# Highlight group used for group separator # Highlight group used for group separator
"Comment"; "Comment";
};
}; };
}; };
}; };
};
} }

View file

@ -1,98 +1,98 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins = { plugins = {
lsp-format = {enable = true;}; lsp-format = {enable = true;};
lsp = { lsp = {
enable = true; enable = true;
servers = { servers = {
eslint = {enable = true;}; eslint = {enable = true;};
html = {enable = true;}; html = {enable = true;};
lua-ls = {enable = true;}; lua-ls = {enable = true;};
nil_ls = {enable = true;}; nil_ls = {enable = true;};
marksman = {enable = true;}; marksman = {enable = true;};
pyright = {enable = true;}; pyright = {enable = true;};
gopls = {enable = true;}; gopls = {enable = true;};
terraformls = {enable = true;}; terraformls = {enable = true;};
tsserver = {enable = false;}; tsserver = {enable = false;};
yamlls = { yamlls = {
enable = true; enable = true;
};
};
keymaps = {
silent = true;
lspBuf = {
gd = {
action = "definition";
desc = "Goto Definition";
};
gr = {
action = "references";
desc = "Goto References";
};
gD = {
action = "declaration";
desc = "Goto Declaration";
};
gI = {
action = "implementation";
desc = "Goto Implementation";
};
gT = {
action = "type_definition";
desc = "Type Definition";
};
K = {
action = "hover";
desc = "Hover";
};
"<leader>cw" = {
action = "workspace_symbol";
desc = "Workspace Symbol";
};
"<leader>cr" = {
action = "rename";
desc = "Rename";
}; };
}; };
diagnostic = { keymaps = {
"<leader>cd" = { silent = true;
action = "open_float"; lspBuf = {
desc = "Line Diagnostics"; gd = {
action = "definition";
desc = "Goto Definition";
};
gr = {
action = "references";
desc = "Goto References";
};
gD = {
action = "declaration";
desc = "Goto Declaration";
};
gI = {
action = "implementation";
desc = "Goto Implementation";
};
gT = {
action = "type_definition";
desc = "Type Definition";
};
K = {
action = "hover";
desc = "Hover";
};
"<leader>cw" = {
action = "workspace_symbol";
desc = "Workspace Symbol";
};
"<leader>cr" = {
action = "rename";
desc = "Rename";
};
}; };
"[d" = { diagnostic = {
action = "goto_next"; "<leader>cd" = {
desc = "Next Diagnostic"; action = "open_float";
}; desc = "Line Diagnostics";
"]d" = { };
action = "goto_prev"; "[d" = {
desc = "Previous Diagnostic"; action = "goto_next";
desc = "Next Diagnostic";
};
"]d" = {
action = "goto_prev";
desc = "Previous Diagnostic";
};
}; };
}; };
}; };
}; };
extraConfigLua = ''
local _border = "rounded"
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
vim.lsp.handlers.hover, {
border = _border
}
)
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
vim.lsp.handlers.signature_help, {
border = _border
}
)
vim.diagnostic.config{
float={border=_border}
};
require('lspconfig.ui.windows').default_options = {
border = _border
}
'';
}; };
extraConfigLua = ''
local _border = "rounded"
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
vim.lsp.handlers.hover, {
border = _border
}
)
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(
vim.lsp.handlers.signature_help, {
border = _border
}
)
vim.diagnostic.config{
float={border=_border}
};
require('lspconfig.ui.windows').default_options = {
border = _border
}
'';
};
} }

View file

@ -1,188 +1,188 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.lspsaga = { plugins.lspsaga = {
enable = true;
beacon = {
enable = true; enable = true;
}; beacon = {
ui = { enable = true;
border = "rounded"; # One of none, single, double, rounded, solid, shadow };
codeAction = "💡"; # Can be any symbol you want 💡 ui = {
}; border = "rounded"; # One of none, single, double, rounded, solid, shadow
hover = { codeAction = "💡"; # Can be any symbol you want 💡
openCmd = "!floorp"; # Choose your browser };
openLink = "gx"; hover = {
}; openCmd = "!floorp"; # Choose your browser
diagnostic = { openLink = "gx";
borderFollow = true; };
diagnosticOnlyCurrent = false; diagnostic = {
showCodeAction = true; borderFollow = true;
}; diagnosticOnlyCurrent = false;
symbolInWinbar = { showCodeAction = true;
enable = true; # Breadcrumbs };
}; symbolInWinbar = {
codeAction = { enable = true; # Breadcrumbs
extendGitSigns = false; };
showServerName = true; codeAction = {
onlyInCursor = true; extendGitSigns = false;
numShortcut = true; showServerName = true;
keys = { onlyInCursor = true;
exec = "<CR>"; numShortcut = true;
quit = ["<Esc>" "q"]; keys = {
exec = "<CR>";
quit = ["<Esc>" "q"];
};
};
lightbulb = {
enable = false;
sign = false;
virtualText = true;
};
implement = {
enable = false;
};
rename = {
autoSave = false;
keys = {
exec = "<CR>";
quit = ["<C-k>" "<Esc>"];
select = "x";
};
};
outline = {
autoClose = true;
autoPreview = true;
closeAfterJump = true;
layout = "normal"; # normal or float
winPosition = "right"; # left or right
keys = {
jump = "e";
quit = "q";
toggleOrJump = "o";
};
};
scrollPreview = {
scrollDown = "<C-f>";
scrollUp = "<C-b>";
}; };
}; };
lightbulb = { keymaps = [
enable = false; {
sign = false; mode = "n";
virtualText = true; key = "gd";
}; action = "<cmd>Lspsaga finder def<CR>";
implement = { options = {
enable = false; desc = "Goto Definition";
}; silent = true;
rename = { };
autoSave = false; }
keys = { {
exec = "<CR>"; mode = "n";
quit = ["<C-k>" "<Esc>"]; key = "gr";
select = "x"; action = "<cmd>Lspsaga finder ref<CR>";
}; options = {
}; desc = "Goto References";
outline = { silent = true;
autoClose = true; };
autoPreview = true; }
closeAfterJump = true;
layout = "normal"; # normal or float # {
winPosition = "right"; # left or right # mode = "n";
keys = { # key = "gD";
jump = "e"; # action = "<cmd>Lspsaga show_line_diagnostics<CR>";
quit = "q"; # options = {
toggleOrJump = "o"; # desc = "Goto Declaration";
}; # silent = true;
}; # };
scrollPreview = { # }
scrollDown = "<C-f>";
scrollUp = "<C-b>"; {
}; mode = "n";
key = "gI";
action = "<cmd>Lspsaga finder imp<CR>";
options = {
desc = "Goto Implementation";
silent = true;
};
}
{
mode = "n";
key = "gT";
action = "<cmd>Lspsaga peek_type_definition<CR>";
options = {
desc = "Type Definition";
silent = true;
};
}
{
mode = "n";
key = "K";
action = "<cmd>Lspsaga hover_doc<CR>";
options = {
desc = "Hover";
silent = true;
};
}
{
mode = "n";
key = "<leader>cw";
action = "<cmd>Lspsaga outline<CR>";
options = {
desc = "Outline";
silent = true;
};
}
{
mode = "n";
key = "<leader>cr";
action = "<cmd>Lspsaga rename<CR>";
options = {
desc = "Rename";
silent = true;
};
}
{
mode = "n";
key = "<leader>ca";
action = "<cmd>Lspsaga code_action<CR>";
options = {
desc = "Code Action";
silent = true;
};
}
{
mode = "n";
key = "<leader>cd";
action = "<cmd>Lspsaga show_line_diagnostics<CR>";
options = {
desc = "Line Diagnostics";
silent = true;
};
}
{
mode = "n";
key = "[d";
action = "<cmd>Lspsaga diagnostic_jump_next<CR>";
options = {
desc = "Next Diagnostic";
silent = true;
};
}
{
mode = "n";
key = "]d";
action = "<cmd>Lspsaga diagnostic_jump_prev<CR>";
options = {
desc = "Previous Diagnostic";
silent = true;
};
}
];
}; };
keymaps = [
{
mode = "n";
key = "gd";
action = "<cmd>Lspsaga finder def<CR>";
options = {
desc = "Goto Definition";
silent = true;
};
}
{
mode = "n";
key = "gr";
action = "<cmd>Lspsaga finder ref<CR>";
options = {
desc = "Goto References";
silent = true;
};
}
# {
# mode = "n";
# key = "gD";
# action = "<cmd>Lspsaga show_line_diagnostics<CR>";
# options = {
# desc = "Goto Declaration";
# silent = true;
# };
# }
{
mode = "n";
key = "gI";
action = "<cmd>Lspsaga finder imp<CR>";
options = {
desc = "Goto Implementation";
silent = true;
};
}
{
mode = "n";
key = "gT";
action = "<cmd>Lspsaga peek_type_definition<CR>";
options = {
desc = "Type Definition";
silent = true;
};
}
{
mode = "n";
key = "K";
action = "<cmd>Lspsaga hover_doc<CR>";
options = {
desc = "Hover";
silent = true;
};
}
{
mode = "n";
key = "<leader>cw";
action = "<cmd>Lspsaga outline<CR>";
options = {
desc = "Outline";
silent = true;
};
}
{
mode = "n";
key = "<leader>cr";
action = "<cmd>Lspsaga rename<CR>";
options = {
desc = "Rename";
silent = true;
};
}
{
mode = "n";
key = "<leader>ca";
action = "<cmd>Lspsaga code_action<CR>";
options = {
desc = "Code Action";
silent = true;
};
}
{
mode = "n";
key = "<leader>cd";
action = "<cmd>Lspsaga show_line_diagnostics<CR>";
options = {
desc = "Line Diagnostics";
silent = true;
};
}
{
mode = "n";
key = "[d";
action = "<cmd>Lspsaga diagnostic_jump_next<CR>";
options = {
desc = "Next Diagnostic";
silent = true;
};
}
{
mode = "n";
key = "]d";
action = "<cmd>Lspsaga diagnostic_jump_prev<CR>";
options = {
desc = "Previous Diagnostic";
silent = true;
};
}
];
};
} }

View file

@ -1,52 +1,52 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.none-ls = { plugins.none-ls = {
enable = true; enable = true;
enableLspFormat = true; enableLspFormat = true;
updateInInsert = false; updateInInsert = false;
sources = { sources = {
code_actions = { code_actions = {
gitsigns.enable = true; gitsigns.enable = true;
statix.enable = true; statix.enable = true;
};
diagnostics = {
statix.enable = true;
yamllint.enable = true;
};
formatting = {
alejandra.enable = true;
black = {
enable = true;
withArgs = ''
{
extra_args = { "--fast" },
}
'';
}; };
prettier = { diagnostics = {
enable = true; statix.enable = true;
disableTsServerFormatter = true; yamllint.enable = true;
withArgs = '' };
{ formatting = {
extra_args = { "--no-semi", "--single-quote" }, alejandra.enable = true;
} black = {
''; enable = true;
withArgs = ''
{
extra_args = { "--fast" },
}
'';
};
prettier = {
enable = true;
disableTsServerFormatter = true;
withArgs = ''
{
extra_args = { "--no-semi", "--single-quote" },
}
'';
};
stylua.enable = true;
yamlfmt.enable = true;
}; };
stylua.enable = true;
yamlfmt.enable = true;
}; };
}; };
keymaps = [
{
mode = ["n" "v"];
key = "<leader>cf";
action = "<cmd>lua vim.lsp.buf.format()<cr>";
options = {
silent = true;
desc = "Format";
};
}
];
}; };
keymaps = [
{
mode = ["n" "v"];
key = "<leader>cf";
action = "<cmd>lua vim.lsp.buf.format()<cr>";
options = {
silent = true;
desc = "Format";
};
}
];
};
} }

View file

@ -5,36 +5,34 @@
disabledFiletypes = { disabledFiletypes = {
statusline = ["dashboard" "alpha" "starter"]; statusline = ["dashboard" "alpha" "starter"];
}; };
# theme = { # theme = {
# normal = { # normal = {
# a = { # a = {
# bg = "#b4befe"; # bg = "#b4befe";
# fg = "#1c1d21"; # fg = "#1c1d21";
# }; # };
# b = { # b = {
# bg = "nil"; # bg = "nil";
# }; # };
# c = { # c = {
# bg = "nil"; # bg = "nil";
# }; # };
# z = { # z = {
# bg = "nil"; # bg = "nil";
# }; # };
# y = { # y = {
# bg = "nil"; # bg = "nil";
# }; # };
# }; # };
# }; # };
sections = { sections = {
lualine_a = [ lualine_a = [
{ {
name = "mode"; name = "mode";
fmt = "string.lower"; fmt = "string.lower";
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
} }
]; ];
@ -43,10 +41,8 @@
name = "branch"; name = "branch";
icon = ""; icon = "";
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
} }
"diff" "diff"
@ -63,10 +59,8 @@
}; };
}; };
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
} }
]; ];
@ -89,10 +83,8 @@
}; };
}; };
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
separator.left = ""; separator.left = "";
} }
@ -101,10 +93,8 @@
{ {
name = "location"; name = "location";
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
} }
]; ];

View file

@ -11,36 +11,36 @@
}; };
in { in {
programs.nixvim = { programs.nixvim = {
filetype.extension.liq = "liquidsoap"; filetype.extension.liq = "liquidsoap";
filetype.extension.nu = "nu"; filetype.extension.nu = "nu";
plugins.treesitter = { plugins.treesitter = {
enable = true; enable = true;
indent = true; indent = true;
folding = true; folding = true;
languageRegister.nu = "nu"; languageRegister.nu = "nu";
languageRegister.liq = "liquidsoap"; languageRegister.liq = "liquidsoap";
nixvimInjections = true; nixvimInjections = true;
grammarPackages = grammarPackages =
[ [
nu-grammar nu-grammar
] ]
++ pkgs.vimPlugins.nvim-treesitter.allGrammars; ++ pkgs.vimPlugins.nvim-treesitter.allGrammars;
};
extraFiles = {
"/queries/nu/highlights.scm" = builtins.readFile "${nu-grammar}/queries/nu/highlights.scm";
"/queries/nu/injections.scm" = builtins.readFile "${nu-grammar}/queries/nu/injections.scm";
};
extraConfigLua = ''
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.liquidsoap = {
filetype = "liquidsoap",
}
parser_config.nu = {
filetype = "nu",
}
'';
}; };
extraFiles = {
"/queries/nu/highlights.scm" = builtins.readFile "${nu-grammar}/queries/nu/highlights.scm";
"/queries/nu/injections.scm" = builtins.readFile "${nu-grammar}/queries/nu/injections.scm";
};
extraConfigLua = ''
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.liquidsoap = {
filetype = "liquidsoap",
}
parser_config.nu = {
filetype = "nu",
}
'';
};
} }

View file

@ -1,93 +1,93 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.alpha = let plugins.alpha = let
nixFlake = [ nixFlake = [
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
"" ""
]; ];
in { in {
enable = true; enable = true;
layout = [ layout = [
{ {
type = "padding"; type = "padding";
val = 4; val = 4;
} }
{ {
opts = { opts = {
hl = "AlphaHeader"; hl = "AlphaHeader";
position = "center"; position = "center";
};
type = "text";
val = nixFlake;
}
{
type = "padding";
val = 2;
}
{
type = "group";
val = let
mkButton = shortcut: cmd: val: hl: {
type = "button";
inherit val;
opts = {
inherit hl shortcut;
keymap = [
"n"
shortcut
cmd
{}
];
position = "center";
cursor = 0;
width = 40;
align_shortcut = "right";
hl_shortcut = "Keyword";
};
}; };
in [ type = "text";
( val = nixFlake;
mkButton }
"f" {
"<CMD>lua require('telescope.builtin').find_files({hidden = true})<CR>" type = "padding";
"🔍 Find File" val = 2;
"Operator" }
) {
( type = "group";
mkButton val = let
"q" mkButton = shortcut: cmd: val: hl: {
"<CMD>qa<CR>" type = "button";
"💣 Quit Neovim" inherit val;
"String" opts = {
) inherit hl shortcut;
]; keymap = [
} "n"
{ shortcut
type = "padding"; cmd
val = 2; {}
} ];
{ position = "center";
opts = { cursor = 0;
hl = "GruvboxBlue"; width = 40;
position = "center"; align_shortcut = "right";
}; hl_shortcut = "Keyword";
type = "text"; };
val = "https://github.com/elythh/nixvim"; };
} in [
]; (
mkButton
"f"
"<CMD>lua require('telescope.builtin').find_files({hidden = true})<CR>"
"🔍 Find File"
"Operator"
)
(
mkButton
"q"
"<CMD>qa<CR>"
"💣 Quit Neovim"
"String"
)
];
}
{
type = "padding";
val = 2;
}
{
opts = {
hl = "Gruvbox";
position = "center";
};
type = "text";
val = "https://github.com/bloxx12/nichts";
}
];
};
}; };
};
} }

View file

@ -1,22 +1,22 @@
{pkgs, ...}: { {pkgs, ...}: {
programs.nixvim = { programs.nixvim = {
extraPlugins = with pkgs.vimUtils; [ extraPlugins = with pkgs.vimUtils; [
(buildVimPlugin { (buildVimPlugin {
pname = "btw.nvim"; pname = "btw.nvim";
version = "2024-04-36"; version = "2024-04-36";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "letieu"; owner = "letieu";
repo = "btw.nvim"; repo = "btw.nvim";
rev = "47f6419e90d3383987fd06e8f3e06a4bc032ac83"; rev = "47f6419e90d3383987fd06e8f3e06a4bc032ac83";
hash = "sha256-91DZUfa4FBvXnkcNHdllr82Dr1Ie+MGVD3ibwkqo04c="; hash = "sha256-91DZUfa4FBvXnkcNHdllr82Dr1Ie+MGVD3ibwkqo04c=";
}; };
}) })
]; ];
extraConfigLua = '' extraConfigLua = ''
require('btw').setup({ require('btw').setup({
text = "I use Neovim (and NixOS, BTW)", text = "I use Neovim (and NixOS, BTW)",
}) })
''; '';
}; };
} }

View file

@ -6,172 +6,172 @@
colors = import ../../colors/${config.theme}.nix {}; colors = import ../../colors/${config.theme}.nix {};
in { in {
programs.nixvim = { programs.nixvim = {
plugins = { plugins = {
bufferline = { bufferline = {
enable = true; enable = true;
separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin” separatorStyle = "thick"; # “slant”, “padded_slant”, “slope”, “padded_slope”, “thick”, “thin”
highlights = { highlights = {
fill = { fill = {
fg = colors.base00; fg = colors.base00;
bg = colors.base00; bg = colors.base00;
}; };
background = { background = {
fg = colors.base03; fg = colors.base03;
bg = colors.base00; bg = colors.base00;
}; };
bufferSelected = { bufferSelected = {
fg = colors.base05; fg = colors.base05;
bg = colors.base00; bg = colors.base00;
italic = false; italic = false;
}; };
bufferVisible = { bufferVisible = {
fg = colors.base03; fg = colors.base03;
bg = colors.base00; bg = colors.base00;
}; };
closeButton = { closeButton = {
fg = colors.base03; fg = colors.base03;
bg = colors.base00; bg = colors.base00;
}; };
closeButtonVisible = { closeButtonVisible = {
fg = colors.base03; fg = colors.base03;
bg = colors.base00; bg = colors.base00;
}; };
closeButtonSelected = { closeButtonSelected = {
fg = colors.base08; fg = colors.base08;
bg = colors.base00; bg = colors.base00;
}; };
indicatorSelected = { indicatorSelected = {
fg = colors.base00; fg = colors.base00;
bg = colors.base00; bg = colors.base00;
}; };
modified = { modified = {
fg = colors.base03; fg = colors.base03;
bg = colors.base00; bg = colors.base00;
}; };
modifiedVisible = { modifiedVisible = {
fg = colors.base00; fg = colors.base00;
bg = colors.base00; bg = colors.base00;
}; };
modifiedSelected = { modifiedSelected = {
fg = colors.base0B; fg = colors.base0B;
bg = colors.base00; bg = colors.base00;
}; };
tabClose = { tabClose = {
fg = colors.base00; fg = colors.base00;
bg = colors.base00; bg = colors.base00;
};
}; };
}; };
}; };
keymaps = [
{
mode = "n";
key = "<Tab>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
{
mode = "n";
key = "<S-Tab>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<S-l>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
{
mode = "n";
key = "<S-h>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<leader>bd";
action = "<cmd>bdelete<cr>";
options = {
desc = "Delete buffer";
};
}
{
mode = "n";
key = "<leader>bb";
action = "<cmd>e #<cr>";
options = {
desc = "Switch to Other Buffer";
};
}
# {
# mode = "n";
# key = "<leader>`";
# action = "<cmd>e #<cr>";
# options = {
# desc = "Switch to Other Buffer";
# };
# }
{
mode = "n";
key = "<leader>br";
action = "<cmd>BufferLineCloseRight<cr>";
options = {
desc = "Delete buffers to the right";
};
}
{
mode = "n";
key = "<leader>bl";
action = "<cmd>BufferLineCloseLeft<cr>";
options = {
desc = "Delete buffers to the left";
};
}
{
mode = "n";
key = "<leader>bo";
action = "<cmd>BufferLineCloseOthers<cr>";
options = {
desc = "Delete other buffers";
};
}
{
mode = "n";
key = "<leader>bp";
action = "<cmd>BufferLineTogglePin<cr>";
options = {
desc = "Toggle pin";
};
}
{
mode = "n";
key = "<leader>bP";
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
options = {
desc = "Delete non-pinned buffers";
};
}
];
}; };
keymaps = [
{
mode = "n";
key = "<Tab>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
{
mode = "n";
key = "<S-Tab>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<S-l>";
action = "<cmd>BufferLineCycleNext<cr>";
options = {
desc = "Cycle to next buffer";
};
}
{
mode = "n";
key = "<S-h>";
action = "<cmd>BufferLineCyclePrev<cr>";
options = {
desc = "Cycle to previous buffer";
};
}
{
mode = "n";
key = "<leader>bd";
action = "<cmd>bdelete<cr>";
options = {
desc = "Delete buffer";
};
}
{
mode = "n";
key = "<leader>bb";
action = "<cmd>e #<cr>";
options = {
desc = "Switch to Other Buffer";
};
}
# {
# mode = "n";
# key = "<leader>`";
# action = "<cmd>e #<cr>";
# options = {
# desc = "Switch to Other Buffer";
# };
# }
{
mode = "n";
key = "<leader>br";
action = "<cmd>BufferLineCloseRight<cr>";
options = {
desc = "Delete buffers to the right";
};
}
{
mode = "n";
key = "<leader>bl";
action = "<cmd>BufferLineCloseLeft<cr>";
options = {
desc = "Delete buffers to the left";
};
}
{
mode = "n";
key = "<leader>bo";
action = "<cmd>BufferLineCloseOthers<cr>";
options = {
desc = "Delete other buffers";
};
}
{
mode = "n";
key = "<leader>bp";
action = "<cmd>BufferLineTogglePin<cr>";
options = {
desc = "Toggle pin";
};
}
{
mode = "n";
key = "<leader>bP";
action = "<Cmd>BufferLineGroupClose ungrouped<CR>";
options = {
desc = "Delete non-pinned buffers";
};
}
];
};
} }

View file

@ -1,47 +1,47 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.notify = { plugins.notify = {
enable = true; enable = true;
backgroundColour = "#000000"; backgroundColour = "#000000";
fps = 60; fps = 60;
render = "default"; render = "default";
timeout = 1000; timeout = 1000;
topDown = true; topDown = true;
};
keymaps = [
{
mode = "n";
key = "<leader>un";
action = ''
<cmd>lua require("notify").dismiss({ silent = true, pending = true })<cr>
'';
options = {
desc = "Dismiss All Notifications";
};
}
];
extraConfigLua = ''
local notify = require("notify")
local filtered_message = { "No information available" }
-- Override notify function to filter out messages
---@diagnostic disable-next-line: duplicate-set-field
vim.notify = function(message, level, opts)
local merged_opts = vim.tbl_extend("force", {
on_open = function(win)
local buf = vim.api.nvim_win_get_buf(win)
vim.api.nvim_buf_set_option(buf, "filetype", "markdown")
end,
}, opts or {})
for _, msg in ipairs(filtered_message) do
if message == msg then
return
end
end
return notify(message, level, merged_opts)
end
'';
}; };
keymaps = [
{
mode = "n";
key = "<leader>un";
action = ''
<cmd>lua require("notify").dismiss({ silent = true, pending = true })<cr>
'';
options = {
desc = "Dismiss All Notifications";
};
}
];
extraConfigLua = ''
local notify = require("notify")
local filtered_message = { "No information available" }
-- Override notify function to filter out messages
---@diagnostic disable-next-line: duplicate-set-field
vim.notify = function(message, level, opts)
local merged_opts = vim.tbl_extend("force", {
on_open = function(win)
local buf = vim.api.nvim_win_get_buf(win)
vim.api.nvim_buf_set_option(buf, "filetype", "markdown")
end,
}, opts or {})
for _, msg in ipairs(filtered_message) do
if message == msg then
return
end
end
return notify(message, level, merged_opts)
end
'';
};
} }

View file

@ -1,212 +1,212 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.telescope = { plugins.telescope = {
enable = true; enable = true;
extensions = { extensions = {
file-browser = { file-browser = {
enable = true; enable = true;
};
fzf-native = {
enable = true;
};
}; };
fzf-native = { settings = {
enable = true; defaults = {
layout_config = {
horizontal = {
prompt_position = "top";
};
};
sorting_strategy = "ascending";
};
}; };
}; keymaps = {
settings = { "<leader><space>" = {
defaults = { action = "find_files, {}";
layout_config = { options = {
horizontal = { desc = "Find project files";
prompt_position = "top";
}; };
}; };
sorting_strategy = "ascending"; "<leader>/" = {
}; action = "live_grep";
}; options = {
keymaps = { desc = "Grep (root dir)";
"<leader><space>" = { };
action = "find_files, {}";
options = {
desc = "Find project files";
}; };
}; "<leader>:" = {
"<leader>/" = { action = "command_history, {}";
action = "live_grep"; options = {
options = { desc = "Command History";
desc = "Grep (root dir)"; };
}; };
}; "<leader>b" = {
"<leader>:" = { action = "buffers, {}";
action = "command_history, {}"; options = {
options = { desc = "+buffer";
desc = "Command History"; };
}; };
}; "<leader>ff" = {
"<leader>b" = { action = "find_files, {}";
action = "buffers, {}"; options = {
options = { desc = "Find project files";
desc = "+buffer"; };
}; };
}; "<leader>fr" = {
"<leader>ff" = { action = "live_grep, {}";
action = "find_files, {}"; options = {
options = { desc = "Find text";
desc = "Find project files"; };
}; };
}; "<leader>fR" = {
"<leader>fr" = { action = "resume, {}";
action = "live_grep, {}"; options = {
options = { desc = "Resume";
desc = "Find text"; };
}; };
}; "<leader>fg" = {
"<leader>fR" = { action = "oldfiles, {}";
action = "resume, {}"; options = {
options = { desc = "Recent";
desc = "Resume"; };
}; };
}; "<leader>fb" = {
"<leader>fg" = { action = "buffers, {}";
action = "oldfiles, {}"; options = {
options = { desc = "Buffers";
desc = "Recent"; };
}; };
}; "<C-p>" = {
"<leader>fb" = { action = "git_files, {}";
action = "buffers, {}"; options = {
options = { desc = "Search git files";
desc = "Buffers"; };
}; };
}; "<leader>gc" = {
"<C-p>" = { action = "git_commits, {}";
action = "git_files, {}"; options = {
options = { desc = "Commits";
desc = "Search git files"; };
}; };
}; "<leader>gs" = {
"<leader>gc" = { action = "git_status, {}";
action = "git_commits, {}"; options = {
options = { desc = "Status";
desc = "Commits"; };
}; };
}; "<leader>sa" = {
"<leader>gs" = { action = "autocommands, {}";
action = "git_status, {}"; options = {
options = { desc = "Auto Commands";
desc = "Status"; };
}; };
}; "<leader>sb" = {
"<leader>sa" = { action = "current_buffer_fuzzy_find, {}";
action = "autocommands, {}"; options = {
options = { desc = "Buffer";
desc = "Auto Commands"; };
}; };
}; "<leader>sc" = {
"<leader>sb" = { action = "command_history, {}";
action = "current_buffer_fuzzy_find, {}"; options = {
options = { desc = "Command History";
desc = "Buffer"; };
}; };
}; "<leader>sC" = {
"<leader>sc" = { action = "commands, {}";
action = "command_history, {}"; options = {
options = { desc = "Commands";
desc = "Command History"; };
}; };
}; "<leader>sD" = {
"<leader>sC" = { action = "diagnostics, {}";
action = "commands, {}"; options = {
options = { desc = "Workspace diagnostics";
desc = "Commands"; };
}; };
}; "<leader>sh" = {
"<leader>sD" = { action = "help_tags, {}";
action = "diagnostics, {}"; options = {
options = { desc = "Help pages";
desc = "Workspace diagnostics"; };
}; };
}; "<leader>sH" = {
"<leader>sh" = { action = "highlights, {}";
action = "help_tags, {}"; options = {
options = { desc = "Search Highlight Groups";
desc = "Help pages"; };
}; };
}; "<leader>sk" = {
"<leader>sH" = { action = "keymaps, {}";
action = "highlights, {}"; options = {
options = { desc = "Keymaps";
desc = "Search Highlight Groups"; };
}; };
}; "<leader>sM" = {
"<leader>sk" = { action = "man_pages, {}";
action = "keymaps, {}"; options = {
options = { desc = "Man pages";
desc = "Keymaps"; };
}; };
}; "<leader>sm" = {
"<leader>sM" = { action = "marks, {}";
action = "man_pages, {}"; options = {
options = { desc = "Jump to Mark";
desc = "Man pages"; };
}; };
}; "<leader>so" = {
"<leader>sm" = { action = "vim_options, {}";
action = "marks, {}"; options = {
options = { desc = "Options";
desc = "Jump to Mark"; };
}; };
}; "<leader>sR" = {
"<leader>so" = { action = "resume, {}";
action = "vim_options, {}"; options = {
options = { desc = "Resume";
desc = "Options"; };
}; };
}; "<leader>uC" = {
"<leader>sR" = { action = "colorscheme, {}";
action = "resume, {}"; options = {
options = { desc = "Colorscheme preview";
desc = "Resume"; };
};
};
"<leader>uC" = {
action = "colorscheme, {}";
options = {
desc = "Colorscheme preview";
}; };
}; };
}; };
}; keymaps = [
keymaps = [ {
{ mode = "n";
mode = "n"; key = "<leader>sd";
key = "<leader>sd"; action = "<cmd>Telescope diagnostics bufnr=0<cr>";
action = "<cmd>Telescope diagnostics bufnr=0<cr>"; options = {
options = { desc = "Document diagnostics";
desc = "Document diagnostics"; };
}; }
} {
{ mode = "n";
mode = "n"; key = "<leader>fe";
key = "<leader>fe"; action = "<cmd>Telescope file_browser<cr>";
action = "<cmd>Telescope file_browser<cr>"; options = {
options = { desc = "File browser";
desc = "File browser"; };
}; }
} {
{ mode = "n";
mode = "n"; key = "<leader>fE";
key = "<leader>fE"; action = "<cmd>Telescope file_browser path=%:p:h select_buffer=true<cr>";
action = "<cmd>Telescope file_browser path=%:p:h select_buffer=true<cr>"; options = {
options = { desc = "File browser";
desc = "File browser"; };
}; }
} ];
]; extraConfigLua = ''
extraConfigLua = '' require("telescope").setup{
require("telescope").setup{ pickers = {
pickers = { colorscheme = {
colorscheme = { enable_preview = true
enable_preview = true }
} }
} }
} '';
''; };
};
} }

View file

@ -11,48 +11,48 @@
}; };
in { in {
programs.nixvim = { programs.nixvim = {
extraPlugins = with pkgs.vimUtils; [ extraPlugins = with pkgs.vimUtils; [
(buildVimPlugin { (buildVimPlugin {
pname = "copilotchat"; pname = "copilotchat";
version = "2.4.0"; version = "2.4.0";
src = pkgs.fetchFromGitHub copilotChatRepo; src = pkgs.fetchFromGitHub copilotChatRepo;
meta = { meta = {
description = "Chat with GitHub Copilot in Neovim"; description = "Chat with GitHub Copilot in Neovim";
homepage = "https://github.com/CopilotC-Nvim/CopilotChat.nvim/"; homepage = "https://github.com/CopilotC-Nvim/CopilotChat.nvim/";
license = lib.licenses.gpl3; license = lib.licenses.gpl3;
}; };
}) })
]; ];
extraConfigLua = '' extraConfigLua = ''
require("CopilotChat").setup { } require("CopilotChat").setup { }
''; '';
keymaps = [ keymaps = [
{ {
mode = "x"; mode = "x";
key = "<leader>a"; key = "<leader>a";
action = "+copilot"; action = "+copilot";
} }
{ {
mode = "x"; mode = "x";
key = "<leader>ae"; key = "<leader>ae";
action = "<cmd>CopilotChatExplain<cr>"; action = "<cmd>CopilotChatExplain<cr>";
} }
{ {
mode = "x"; mode = "x";
key = "<leader>af"; key = "<leader>af";
action = "<cmd>CopilotChatFix<cr>"; action = "<cmd>CopilotChatFix<cr>";
} }
{ {
mode = "x"; mode = "x";
key = "<leader>ad"; key = "<leader>ad";
action = "<cmd>CopilotChatDocs<cr>"; action = "<cmd>CopilotChatDocs<cr>";
} }
{ {
mode = "x"; mode = "x";
key = "<leader>ac"; key = "<leader>ac";
action = "<cmd>CopilotChatCommit<cr>"; action = "<cmd>CopilotChatCommit<cr>";
} }
]; ];
}; };
} }

View file

@ -1,58 +1,58 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.flash = { plugins.flash = {
enable = true; enable = true;
labels = "asdfghjklqwertyuiopzxcvbnm"; labels = "asdfghjklqwertyuiopzxcvbnm";
search = { search = {
mode = "fuzzy"; mode = "fuzzy";
}; };
jump = { jump = {
autojump = true; autojump = true;
}; };
label = { label = {
uppercase = false; uppercase = false;
rainbow = { rainbow = {
enabled = false; enabled = false;
shade = 5; shade = 5;
};
}; };
}; };
keymaps = [
{
mode = ["n" "x" "o"];
key = "s";
action = "<cmd>lua require('flash').jump()<cr>";
options = {
desc = "Flash";
};
}
{
mode = ["n" "x" "o"];
key = "S";
action = "<cmd>lua require('flash').treesitter()<cr>";
options = {
desc = "Flash Treesitter";
};
}
{
mode = "o";
key = "r";
action = "<cmd>lua require('flash').remote()<cr>";
options = {
desc = "Remote Flash";
};
}
{
mode = ["x" "o"];
key = "R";
action = "<cmd>lua require('flash').treesitter_search()<cr>";
options = {
desc = "Treesitter Search";
};
}
];
}; };
keymaps = [
{
mode = ["n" "x" "o"];
key = "s";
action = "<cmd>lua require('flash').jump()<cr>";
options = {
desc = "Flash";
};
}
{
mode = ["n" "x" "o"];
key = "S";
action = "<cmd>lua require('flash').treesitter()<cr>";
options = {
desc = "Flash Treesitter";
};
}
{
mode = "o";
key = "r";
action = "<cmd>lua require('flash').remote()<cr>";
options = {
desc = "Remote Flash";
};
}
{
mode = ["x" "o"];
key = "R";
action = "<cmd>lua require('flash').treesitter_search()<cr>";
options = {
desc = "Treesitter Search";
};
}
];
};
} }

View file

@ -1,22 +1,22 @@
{pkgs, ...}: { {pkgs, ...}: {
programs.nixvim = { programs.nixvim = {
extraPlugins = with pkgs.vimUtils; [ extraPlugins = with pkgs.vimUtils; [
(buildVimPlugin { (buildVimPlugin {
pname = "grapple.nvim"; pname = "grapple.nvim";
version = "1.0"; version = "1.0";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "cbochs"; owner = "cbochs";
repo = "grapple.nvim"; repo = "grapple.nvim";
rev = "59d458e378c4884f22b7a68e61c07ed3e41aabf0"; rev = "59d458e378c4884f22b7a68e61c07ed3e41aabf0";
hash = "sha256-4k8BE9i8kG4pL7Fj0xw9cG8sjA0u4jzJ40WSV/lBFhY="; hash = "sha256-4k8BE9i8kG4pL7Fj0xw9cG8sjA0u4jzJ40WSV/lBFhY=";
}; };
}) })
]; ];
extraConfigLua = '' extraConfigLua = ''
require('grapple').setup({ require('grapple').setup({
scope = "git_branch", scope = "git_branch",
}) })
''; '';
}; };
} }

View file

@ -1,52 +1,52 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.oil = { plugins.oil = {
enable = true; enable = true;
settings = { settings = {
useDefaultKeymaps = true; useDefaultKeymaps = true;
deleteToTrash = true; deleteToTrash = true;
float = { float = {
padding = 2; padding = 2;
maxWidth = 0; # ''math.ceil(vim.o.lines * 0.8 - 4)''; maxWidth = 0; # ''math.ceil(vim.o.lines * 0.8 - 4)'';
maxHeight = 0; # ''math.ceil(vim.o.columns * 0.8)''; maxHeight = 0; # ''math.ceil(vim.o.columns * 0.8)'';
border = "rounded"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open border = "rounded"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
winOptions = { winOptions = {
winblend = 0; winblend = 0;
};
};
preview = {
border = "rounded";
};
keymaps = {
"g?" = "actions.show_help";
"<CR>" = "actions.select";
"<C-\\>" = "actions.select_vsplit";
"<C-enter>" = "actions.select_split"; # this is used to navigate left
"<C-t>" = "actions.select_tab";
"<C-v>" = "actions.preview";
"<C-c>" = "actions.close";
"<C-r>" = "actions.refresh";
"-" = "actions.parent";
"_" = "actions.open_cwd";
"`" = "actions.cd";
"~" = "actions.tcd";
"gs" = "actions.change_sort";
"gx" = "actions.open_external";
"g." = "actions.toggle_hidden";
"q" = "actions.close";
}; };
}; };
preview = {
border = "rounded";
};
keymaps = {
"g?" = "actions.show_help";
"<CR>" = "actions.select";
"<C-\\>" = "actions.select_vsplit";
"<C-enter>" = "actions.select_split"; # this is used to navigate left
"<C-t>" = "actions.select_tab";
"<C-v>" = "actions.preview";
"<C-c>" = "actions.close";
"<C-r>" = "actions.refresh";
"-" = "actions.parent";
"_" = "actions.open_cwd";
"`" = "actions.cd";
"~" = "actions.tcd";
"gs" = "actions.change_sort";
"gx" = "actions.open_external";
"g." = "actions.toggle_hidden";
"q" = "actions.close";
};
}; };
keymaps = [
{
mode = "n";
key = "-";
action = ":Oil<CR>";
options = {
desc = "Open parent directory";
silent = true;
};
}
];
}; };
keymaps = [
{
mode = "n";
key = "-";
action = ":Oil<CR>";
options = {
desc = "Open parent directory";
silent = true;
};
}
];
};
} }

View file

@ -1,22 +1,22 @@
{ {
programs.nixvim = { programs.nixvim = {
plugins.undotree = { plugins.undotree = {
enable = true; enable = true;
settings = { settings = {
autoOpenDiff = true; autoOpenDiff = true;
focusOnToggle = true; focusOnToggle = true;
};
};
keymaps = [
{
mode = "n";
key = "<leader>ut";
action = "<cmd>UndotreeToggle<CR>";
options = {
silent = true;
desc = "Undotree";
}; };
} };
]; keymaps = [
}; {
mode = "n";
key = "<leader>ut";
action = "<cmd>UndotreeToggle<CR>";
options = {
silent = true;
desc = "Undotree";
};
}
];
};
} }

View file

@ -13,7 +13,7 @@
# Enable auto indenting and set it to spaces # Enable auto indenting and set it to spaces
smartindent = true; smartindent = true;
shiftwidth = 2; shiftwidth = 2;
# Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim) # Enable smart indenting (see https://stackoverflow.com/questions/1204149/smart-wrap-in-vim)
breakindent = true; breakindent = true;
# Enable incremental searching # Enable incremental searching
@ -82,7 +82,6 @@
# We don't need to see things like INSERT anymore # We don't need to see things like INSERT anymore
showmode = false; showmode = false;
}; };
}; };
} }

View file

@ -1,14 +1,18 @@
{ config, pkgs, lib, inputs, ... }: {
config,
with lib; pkgs,
let lib,
inputs,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.anyrun; cfg = config.modules.programs.anyrun;
in { in {
options.modules.programs.anyrun.enable = mkEnableOption "anyrun"; options.modules.programs.anyrun.enable = mkEnableOption "anyrun";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
imports = [ inputs.anyrun.homeManagerModules.default ]; imports = [inputs.anyrun.homeManagerModules.default];
programs.anyrun = { programs.anyrun = {
enable = true; enable = true;
@ -45,4 +49,3 @@ in {
}; };
}; };
} }

View file

@ -1 +1 @@
_: { imports = [ ./anyrun.nix ]; } _: {imports = [./anyrun.nix];}

View file

@ -1,5 +1,10 @@
{ config, inputs, lib, pkgs, ... }: {
let config,
inputs,
lib,
pkgs,
...
}: let
cfg = config.modules.programs.foot; cfg = config.modules.programs.foot;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
@ -11,7 +16,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.sessionVariables = { TERM = "foot"; }; environment.sessionVariables = {TERM = "foot";};
home-manager.users.${username} = { home-manager.users.${username} = {
programs.foot = { programs.foot = {
enable = true; enable = true;
@ -19,29 +24,28 @@ in {
server.enable = cfg.server; server.enable = cfg.server;
settings = { settings = {
main = { main = {
term = "foot"; term = "foot";
app-id = "foot"; app-id = "foot";
title = "foot"; title = "foot";
locked-title = "no"; locked-title = "no";
line-height = 20; line-height = 20;
letter-spacing = 0; letter-spacing = 0;
horizontal-letter-offset = 0; horizontal-letter-offset = 0;
vertical-letter-offset = -0.75; vertical-letter-offset = -0.75;
box-drawings-uses-font-glyphs = "no"; box-drawings-uses-font-glyphs = "no";
dpi-aware = "no"; dpi-aware = "no";
initial-window-size-chars = "104x36"; initial-window-size-chars = "104x36";
initial-window-mode = "windowed"; initial-window-mode = "windowed";
pad = "5x5 center"; pad = "5x5 center";
resize-delay-ms = 100; resize-delay-ms = 100;
notify = notify = "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
"${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
bold-text-in-bright = "no"; bold-text-in-bright = "no";
word-delimiters = '',`|:"'()[]{}<>''; word-delimiters = '',`|:"'()[]{}<>'';
selection-target = "primary"; selection-target = "primary";
}; };
bell = { bell = {
urgent = "yes"; urgent = "yes";
@ -59,8 +63,7 @@ in {
launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}"; launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
label-letters = "sadfjklewcmpgh"; label-letters = "sadfjklewcmpgh";
osc8-underline = "always"; osc8-underline = "always";
protocols = protocols = "http, https, ftp, ftps, file, gemini, gopher, irc, ircs";
"http, https, ftp, ftps, file, gemini, gopher, irc, ircs";
uri-characters = '' uri-characters = ''
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]''; abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]'';
}; };
@ -93,7 +96,7 @@ in {
# bright6 = "94e2d5"; # teal # bright6 = "94e2d5"; # teal
# bright7 = "a6adc8"; # Subtext 0 # bright7 = "a6adc8"; # Subtext 0
# }; # };
csd = { preferred = "server"; }; csd = {preferred = "server";};
key-bindings = { key-bindings = {
show-urls-launch = "Control+Shift+u"; show-urls-launch = "Control+Shift+u";
unicode-input = "Control+Shift+i"; unicode-input = "Control+Shift+i";

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.themes.gtk; cfg = config.modules.themes.gtk;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -47,7 +51,6 @@ in {
home.sessionVariables = { home.sessionVariables = {
#GTK_THEME = "Gruvbox-Dark-BL"; #GTK_THEME = "Gruvbox-Dark-BL";
# GTK_USE_PORTAL = "1"; # GTK_USE_PORTAL = "1";
}; };
}; };
}; };

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.kitty; cfg = config.modules.programs.kitty;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -19,9 +23,7 @@ in {
#background_opacity = "0.9"; #background_opacity = "0.9";
confirm_os_window_close = "0"; confirm_os_window_close = "0";
}; };
}; };
}; };
}; };
} }

View file

@ -1,6 +1,11 @@
{ config, lib, inputs, pkgs, ... }: {
with lib; config,
let lib,
inputs,
pkgs,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.minecraft; cfg = config.modules.programs.minecraft;
in { in {
@ -12,7 +17,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Set wayland environment flag # Set wayland environment flag
environment.variables = environment.variables =
mkIf cfg.wayland { __GL_THREADED_OPTIMIZATIONS = 0; }; mkIf cfg.wayland {__GL_THREADED_OPTIMIZATIONS = 0;};
# Install glfw-wayland-minecraft # Install glfw-wayland-minecraft
environment.systemPackages = with pkgs; environment.systemPackages = with pkgs;
mkIf cfg.wayland [ mkIf cfg.wayland [
@ -21,7 +26,7 @@ in {
home-manager.users.${username} = { home-manager.users.${username} = {
# Install minecraft # Install minecraft
home.packages = with pkgs; [ prismlauncher ]; home.packages = with pkgs; [prismlauncher];
}; };
}; };
} }

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.mpv; cfg = config.modules.programs.mpv;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -17,7 +21,7 @@ in {
osd-bar = "no"; osd-bar = "no";
border = "no"; border = "no";
}; };
scripts = with pkgs.mpvScripts; [ mpris thumbfast sponsorblock uosc ]; scripts = with pkgs.mpvScripts; [mpris thumbfast sponsorblock uosc];
}; };
}; };
}; };

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
theme = { theme = {
package = pkgs.gruvbox-gtk-theme; package = pkgs.gruvbox-gtk-theme;
name = "Gruvbox-Dark-BL"; name = "Gruvbox-Dark-BL";
@ -29,7 +33,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; }; environment.sessionVariables = {QT_QPA_PLATFORMTHEME = "qt5ct";};
environment.variables = { environment.variables = {
QT_STYLE_OVERRIDE = lib.mkForce "kvantum"; QT_STYLE_OVERRIDE = lib.mkForce "kvantum";
GTK_THEME = theme.name; GTK_THEME = theme.name;

View file

@ -1,12 +1,14 @@
{ config, pkgs, lib, ... }: {
config,
with lib; pkgs,
let lib,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.rofi; cfg = config.modules.programs.rofi;
in { in {
options.modules.programs.rofi.enable = mkEnableOption "rofi"; options.modules.programs.rofi.enable = mkEnableOption "rofi";
config = config =
mkIf cfg.enable { environment.systemPackages = with pkgs; [ rofi ]; }; mkIf cfg.enable {environment.systemPackages = with pkgs; [rofi];};
} }

View file

@ -1,24 +1,28 @@
{ config, inputs, lib, ... }: {
let config,
inputs,
lib,
...
}: let
cfg = config.modules.programs.schizofox; cfg = config.modules.programs.schizofox;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
in { in {
options.modules.programs.schizofox = { enable = mkEnableOption "schizofox"; }; options.modules.programs.schizofox = {enable = mkEnableOption "schizofox";};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
imports = [ inputs.schizofox.homeManagerModule ]; imports = [inputs.schizofox.homeManagerModule];
programs.schizofox = { programs.schizofox = {
enable = true; enable = true;
theme = { theme = {
# colors = { # colors = {
# background-darker = "181825"; # background-darker = "181825";
# background = "1e1e2e"; # background = "1e1e2e";
# foreground = "cdd6f4"; # foreground = "cdd6f4";
# }; # };
colors = { colors = {
background-darker = "1d2021"; background-darker = "1d2021";
background = "282828"; background = "282828";
@ -34,24 +38,21 @@ in {
}; };
search = { search = {
defaultSearchEngine = "DuckDuckGo"; defaultSearchEngine = "DuckDuckGo";
removeEngines = removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"];
[ "Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" ];
addEngines = [ addEngines = [
{ {
Name = "NixOS Packages"; Name = "NixOS Packages";
Description = "NixOS Unstable package search"; Description = "NixOS Unstable package search";
Alias = "!np"; Alias = "!np";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
"https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
} }
{ {
Name = "NixOS Options"; Name = "NixOS Options";
Description = "NixOS Unstable option search"; Description = "NixOS Unstable option search";
Alias = "!no"; Alias = "!no";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
"https://search.nixos.org/options?channel=unstable&query={searchTerms}";
} }
{ {
Name = "NixOS Wiki"; Name = "NixOS Wiki";
@ -65,32 +66,28 @@ in {
Description = "Home Manager option search"; Description = "Home Manager option search";
Alias = "!hm"; Alias = "!hm";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}";
"https://mipmip.github.io/home-manager-option-search?query={searchTerms}";
} }
{ {
Name = "Arch Wiki"; Name = "Arch Wiki";
Description = "Arch Wiki search"; Description = "Arch Wiki search";
Alias = "!aw"; Alias = "!aw";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}";
"https://wiki.archlinux.org/index.php?search={searchTerms}";
} }
{ {
Name = "Gentoo Wiki"; Name = "Gentoo Wiki";
Description = "Gentoo Wiki search"; Description = "Gentoo Wiki search";
Alias = "!gw"; Alias = "!gw";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}";
"https://wiki.gentoo.org/index.php?search={searchTerms}";
} }
{ {
Name = "Debian Wiki"; Name = "Debian Wiki";
Description = "Debian Wiki search"; Description = "Debian Wiki search";
Alias = "!dw"; Alias = "!dw";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
"https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
} }
{ {
Name = "noogle"; Name = "noogle";
@ -106,15 +103,13 @@ in {
darkreader.enable = true; darkreader.enable = true;
# vimium.enable = true; # vimium.enable = true;
extraExtensions = { extraExtensions = {
"webextension@vimium".install_url = "webextension@vimium".install_url = "https://addons.mozilla.org/firefox/downloads/file/4259790/vimium_ff-2.1.2.xpi";
"https://addons.mozilla.org/firefox/downloads/file/4259790/vimium_ff-2.1.2.xpi";
}; };
}; };
security = { security = {
sanitizeOnShutdown = false; sanitizeOnShutdown = false;
sandbox = true; sandbox = true;
userAgent = userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
}; };
misc = { misc = {

View file

@ -1,5 +1,10 @@
{ config, pkgs, lib, inputs, ... }: {
let config,
pkgs,
lib,
inputs,
...
}: let
cfg = config.modules.programs.spicetify; cfg = config.modules.programs.spicetify;
username = config.modules.other.system.username; username = config.modules.other.system.username;
spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default; spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;
@ -8,7 +13,7 @@ in {
options.modules.programs.spicetify.enable = lib.mkEnableOption "spicetify"; options.modules.programs.spicetify.enable = lib.mkEnableOption "spicetify";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
imports = [ inputs.spicetify-nix.homeManagerModule ]; imports = [inputs.spicetify-nix.homeManagerModule];
programs.spicetify = { programs.spicetify = {
enable = true; enable = true;
spotifyPackage = pkgs.spotify; spotifyPackage = pkgs.spotify;

View file

@ -1,6 +1,11 @@
{ config, lib, inputs, pkgs, ... }: {
with lib; config,
let lib,
inputs,
pkgs,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.steam; cfg = config.modules.programs.steam;
in { in {
@ -16,6 +21,6 @@ in {
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
gamescopeSession.enable = mkIf cfg.gamescope true; gamescopeSession.enable = mkIf cfg.gamescope true;
}; };
home-manager.users.${username} = { }; home-manager.users.${username} = {};
}; };
} }

View file

@ -1,6 +1,10 @@
{ config, pkgs, lib, ... }: {
with lib; config,
let pkgs,
lib,
...
}:
with lib; let
cfg = config.modules.programs.stylix; cfg = config.modules.programs.stylix;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -47,11 +51,10 @@ in {
sizes = { sizes = {
terminal = 14; terminal = 14;
popups = 14; popups = 14;
}; };
monospace = { monospace = {
package = package =
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }); pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
name = "JetBrainsMono"; name = "JetBrainsMono";
}; };
serif = { serif = {

View file

@ -1,14 +1,18 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.vesktop; cfg = config.modules.programs.vesktop;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
options.modules.programs.vesktop = { enable = mkEnableOption "vesktop"; }; options.modules.programs.vesktop = {enable = mkEnableOption "vesktop";};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
home.packages = with pkgs; [ vesktop ]; home.packages = with pkgs; [vesktop];
xdg.configFile."vesktop/settings.json".text = builtins.toJSON { xdg.configFile."vesktop/settings.json".text = builtins.toJSON {
discordBranch = "ptb"; discordBranch = "ptb";
firstLaunch = false; firstLaunch = false;
@ -31,7 +35,7 @@ in {
themeLinks = [ themeLinks = [
"https://github.com/Costeer/Gruvbox-Material-Themes/blob/main/Discord%20Theme/gruvboxmaterial.theme.css" "https://github.com/Costeer/Gruvbox-Material-Themes/blob/main/Discord%20Theme/gruvboxmaterial.theme.css"
]; ];
enabledThemes = [ "gruvboxmaterial.theme.css" ]; enabledThemes = ["gruvboxmaterial.theme.css"];
enableReactDevtools = true; enableReactDevtools = true;
frameless = false; frameless = false;
transparent = false; transparent = false;
@ -129,7 +133,7 @@ in {
iLoveSpam.enabled = true; iLoveSpam.enabled = true;
IgnoreActivities = { IgnoreActivities = {
enabled = true; enabled = true;
ignoredActivities = [ ]; ignoredActivities = [];
}; };
ImageZoom = { ImageZoom = {
enabled = true; enabled = true;
@ -261,8 +265,7 @@ in {
ServerProfile.enabled = true; ServerProfile.enabled = true;
ShikiCodeblocks = { ShikiCodeblocks = {
enabled = true; enabled = true;
theme = theme = "https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json";
"https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json";
tryHljs = "SECONDARY"; tryHljs = "SECONDARY";
uesDevIcon = "GREYSCALE"; uesDevIcon = "GREYSCALE";
}; };

View file

@ -1,13 +1,10 @@
{ pkgs, ... }: {pkgs, ...}: let
let
vivado-desktop-symbol = pkgs.makeDesktopItem { vivado-desktop-symbol = pkgs.makeDesktopItem {
name = "vivado-2019-2"; name = "vivado-2019-2";
desktopName = "Vivado"; desktopName = "Vivado";
exec = "${pkgs.nur.repos.Nick1296.vivado-2019-2}/bin/vivado"; exec = "${pkgs.nur.repos.Nick1296.vivado-2019-2}/bin/vivado";
}; };
in { in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# this propietary software is huge, but I need it for # this propietary software is huge, but I need it for
# university # university

View file

@ -1,5 +1,10 @@
{ config, lib, inputs, pkgs, ... }: {
let config,
lib,
inputs,
pkgs,
...
}: let
cfg = config.modules.programs.waybar; cfg = config.modules.programs.waybar;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
in { in {
@ -12,9 +17,10 @@ in {
settings.mainBar = { settings.mainBar = {
gtk-layer-shell = true; gtk-layer-shell = true;
layer = "top"; layer = "top";
modules-left = [ "custom/launcher" "tray" "hyprland/window" ]; modules-left = ["custom/launcher" "tray" "hyprland/window"];
modules-center = [ "hyprland/workspaces" ]; modules-center = ["hyprland/workspaces"];
modules-right = [ # "custom/dnd" modules-right = [
# "custom/dnd"
"mpd" "mpd"
"cpu" "cpu"
"memory" "memory"
@ -27,9 +33,8 @@ in {
scroll-step = "1"; scroll-step = "1";
format = " {icon} {volume}%"; format = " {icon} {volume}%";
format-muted = " 󰸈 {volume}%"; format-muted = " 󰸈 {volume}%";
format-icons = { default = [ "󰕿" "󰖀" "󰕾" ]; }; format-icons = {default = ["󰕿" "󰖀" "󰕾"];};
on-click = on-click = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
}; };
"hyprland/workspaces" = { "hyprland/workspaces" = {
sort-by-name = true; sort-by-name = true;
@ -75,7 +80,7 @@ in {
icon-size = 18; icon-size = 18;
spacing = 8; spacing = 8;
}; };
# 󰃰 # 󰃰
clock = { clock = {
interval = 1; interval = 1;
format = " {:%a %d %b %H:%M:%S}"; format = " {:%a %d %b %H:%M:%S}";
@ -137,12 +142,11 @@ in {
waves = false; waves = false;
noise_reduction = 0.77; noise_reduction = 0.77;
input_delay = 0; input_delay = 0;
format-icons = [ "" "" "" "" "" "" "" "" ]; format-icons = ["" "" "" "" "" "" "" ""];
actions = { on-click-right = "mode"; }; actions = {on-click-right = "mode";};
}; };
mpd = { mpd = {
format = format = "󰝚 {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})";
"󰝚 {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})";
format-disconnected = "󰝚 Disconnected"; format-disconnected = "󰝚 Disconnected";
format-stopped = "󰝚 Stopped"; format-stopped = "󰝚 Stopped";
interval = 1; interval = 1;
@ -458,4 +462,3 @@ in {
}; };
}; };
} }

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.zathura; cfg = config.modules.programs.zathura;
username = config.modules.other.system.username; username = config.modules.other.system.username;
catppuccin = pkgs.fetchFromGitHub { catppuccin = pkgs.fetchFromGitHub {
@ -9,20 +13,18 @@ let
rev = "4eb02fd206de63b2423f6deb58242d352545b52f"; rev = "4eb02fd206de63b2423f6deb58242d352545b52f";
hash = "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI="; hash = "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI=";
}; };
in { in {
options.modules.programs.zathura.enable = mkEnableOption "zathura"; options.modules.programs.zathura.enable = mkEnableOption "zathura";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
xdg.configFile."zathura/catppuccin-mocha".source = xdg.configFile."zathura/catppuccin-mocha".source = "${catppuccin}/src/catppuccin-mocha";
"${catppuccin}/src/catppuccin-mocha";
programs.zathura = { programs.zathura = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
include catppuccin-mocha include catppuccin-mocha
''; '';
options = { selection-clipboard = "clipboard"; }; options = {selection-clipboard = "clipboard";};
}; };
}; };
}; };

View file

@ -1,2 +1 @@
_: { imports = [ ./home-manager.nix ./system.nix ./xdg.nix ]; } _: {imports = [./home-manager.nix ./system.nix ./xdg.nix];}

View file

@ -1,6 +1,11 @@
{ config, inputs, lib, self, ... }: {
with lib; config,
let inputs,
lib,
self,
...
}:
with lib; let
cfg = config.modules.other.home-manager; cfg = config.modules.other.home-manager;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -13,7 +18,7 @@ in {
home-manager = { home-manager = {
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs self; }; extraSpecialArgs = {inherit inputs self;};
users.${username} = { users.${username} = {
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;

View file

@ -1,6 +1,10 @@
{ config, lib, ... }: {
with lib; config,
let cfg = config.modules.other.system; lib,
...
}:
with lib; let
cfg = config.modules.other.system;
in { in {
options.modules.other.system = { options.modules.other.system = {
hostname = mkOption { hostname = mkOption {
@ -24,7 +28,7 @@ in {
users.users.${cfg.username} = { users.users.${cfg.username} = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = ["wheel"];
}; };
}; };
} }

View file

@ -1,5 +1,4 @@
{ config, ... }: {config, ...}: let
let
username = config.modules.other.system.username; username = config.modules.other.system.username;
hmCfg = config.home-manager.users.${username}; hmCfg = config.home-manager.users.${username};
@ -11,8 +10,7 @@ let
text_editor = "helix.desktop"; text_editor = "helix.desktop";
terminal = "foot.desktop"; terminal = "foot.desktop";
in { in {
environment.sessionVariables = {TERMINAL = "${terminal}";};
environment.sessionVariables = { TERMINAL = "${terminal}"; };
home-manager.users.${username} = { home-manager.users.${username} = {
xdg = { xdg = {
@ -23,42 +21,42 @@ in {
mimeApps = { mimeApps = {
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"text/html" = [ primary_browser ]; "text/html" = [primary_browser];
"x-scheme-handler/http" = [ primary_browser ]; "x-scheme-handler/http" = [primary_browser];
"x-scheme-handler/https" = [ primary_browser ]; "x-scheme-handler/https" = [primary_browser];
"x-scheme-handler/about" = [ primary_browser ]; "x-scheme-handler/about" = [primary_browser];
"x-scheme-handler/unknown" = [ primary_browser ]; "x-scheme-handler/unknown" = [primary_browser];
"x-scheme-handler/mailto" = [ mail_client ]; "x-scheme-handler/mailto" = [mail_client];
"message/rfc822" = [ mail_client ]; "message/rfc822" = [mail_client];
"x-scheme-handler/mid" = [ mail_client ]; "x-scheme-handler/mid" = [mail_client];
"inode/directory" = [ file_manager ]; "inode/directory" = [file_manager];
"audio/mp3" = [ media_player ]; "audio/mp3" = [media_player];
"audio/ogg" = [ media_player ]; "audio/ogg" = [media_player];
"audio/mpeg" = [ media_player ]; "audio/mpeg" = [media_player];
"audio/aac" = [ media_player ]; "audio/aac" = [media_player];
"audio/opus" = [ media_player ]; "audio/opus" = [media_player];
"audio/wav" = [ media_player ]; "audio/wav" = [media_player];
"audio/webm" = [ media_player ]; "audio/webm" = [media_player];
"audio/3gpp" = [ media_player ]; "audio/3gpp" = [media_player];
"audio/3gpp2" = [ media_player ]; "audio/3gpp2" = [media_player];
"video/mp4" = [ media_player ]; "video/mp4" = [media_player];
"video/x-msvideo" = [ media_player ]; "video/x-msvideo" = [media_player];
"video/mpeg" = [ media_player ]; "video/mpeg" = [media_player];
"video/ogg" = [ media_player ]; "video/ogg" = [media_player];
"video/mp2t" = [ media_player ]; "video/mp2t" = [media_player];
"video/webm" = [ media_player ]; "video/webm" = [media_player];
"video/3gpp" = [ media_player ]; "video/3gpp" = [media_player];
"video/3gpp2" = [ media_player ]; "video/3gpp2" = [media_player];
"image/png" = [ image_viewer ]; "image/png" = [image_viewer];
"image/jpeg" = [ image_viewer ]; "image/jpeg" = [image_viewer];
"image/gif" = [ image_viewer ]; "image/gif" = [image_viewer];
"image/avif" = [ image_viewer ]; "image/avif" = [image_viewer];
"image/bmp" = [ image_viewer ]; "image/bmp" = [image_viewer];
"image/vnd.microsoft.icon" = [ image_viewer ]; "image/vnd.microsoft.icon" = [image_viewer];
"image/svg+xml" = [ image_viewer ]; "image/svg+xml" = [image_viewer];
"image/tiff" = [ image_viewer ]; "image/tiff" = [image_viewer];
"image/webp" = [ image_viewer ]; "image/webp" = [image_viewer];
"text/plain" = [ text_editor ]; "text/plain" = [text_editor];
}; };
}; };
}; };

View file

@ -1 +1 @@
_: { imports = [ ./pipewire.nix ./ssh.nix ./greetd.nix ./dunst.nix ]; } _: {imports = [./pipewire.nix ./ssh.nix ./greetd.nix ./dunst.nix];}

View file

@ -1,5 +1,10 @@
{ config, inputs, lib, pkgs, ... }: {
let config,
inputs,
lib,
pkgs,
...
}: let
cfg = config.modules.services.dunst; cfg = config.modules.services.dunst;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
@ -67,7 +72,7 @@ in {
mouse_middle_click = "context"; mouse_middle_click = "context";
mouse_right_click = "close_all"; mouse_right_click = "close_all";
}; };
experimental = { per_monitor_dpi = false; }; experimental = {per_monitor_dpi = false;};
urgency_low = { urgency_low = {
background = "#1E1E2E"; background = "#1E1E2E";
foreground = "#CDD6F4"; foreground = "#CDD6F4";

View file

@ -1,6 +1,11 @@
{ config, inputs, lib, pkgs, ... }: {
with lib; config,
let inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.services.greetd; cfg = config.modules.services.greetd;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
@ -44,8 +49,8 @@ in {
enable = true; enable = true;
settings.default_session = { settings.default_session = {
command = "${ command = "${
inputs.hyprland.packages.${pkgs.system}.hyprland inputs.hyprland.packages.${pkgs.system}.hyprland
}/bin/Hyprland --config ${hyprlandConfig}"; }/bin/Hyprland --config ${hyprlandConfig}";
user = username; user = username;
}; };
}; };

View file

@ -1,6 +1,10 @@
{ config, lib, ... }: {
with lib; config,
let cfg = config.modules.services.pipewire; lib,
...
}:
with lib; let
cfg = config.modules.services.pipewire;
in { in {
options.modules.services.pipewire.enable = mkEnableOption "pipewire"; options.modules.services.pipewire.enable = mkEnableOption "pipewire";

View file

@ -1,11 +1,14 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.ssh; cfg = config.modules.programs.ssh;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
options.modules.programs.ssh.enable = mkEnableOption "ssh"; options.modules.programs.ssh.enable = mkEnableOption "ssh";
config = mkIf cfg.enable { programs.ssh = { startAgent = true; }; }; config = mkIf cfg.enable {programs.ssh = {startAgent = true;};};
} }

View file

@ -1,6 +1,9 @@
{ config, lib, ... }: {
with lib; config,
let lib,
...
}:
with lib; let
cfg = config.modules.programs.btop; cfg = config.modules.programs.btop;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {

View file

@ -1,3 +1,3 @@
_: { _: {
imports = [ ./btop.nix ./neovim.nix ./newsboat.nix ./ncmpcpp.nix ./yazi.nix ]; imports = [./btop.nix ./neovim.nix ./newsboat.nix ./ncmpcpp.nix ./yazi.nix];
} }

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.ncmpcpp; cfg = config.modules.programs.ncmpcpp;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -11,20 +15,16 @@ in {
xdg.configFile."ncmpcpp/config".source = ./config; xdg.configFile."ncmpcpp/config".source = ./config;
programs.ncmpcpp = { programs.ncmpcpp = {
enable = true; enable = true;
package = (pkgs.ncmpcpp.override { visualizerSupport = true; }); package = pkgs.ncmpcpp.override {visualizerSupport = true;};
mpdMusicDir = "/home/vali/Nextcloud/Media/Music"; mpdMusicDir = "/home/vali/Nextcloud/Media/Music";
settings = { settings = {
mpd_host = "127.0.0.1"; mpd_host = "127.0.0.1";
mpd_port = "6600"; mpd_port = "6600";
alternative_header_first_line_format = "$5{$b%t$/b}$9"; alternative_header_first_line_format = "$5{$b%t$/b}$9";
alternative_header_second_line_format = alternative_header_second_line_format = "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}";
"$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}"; song_list_format = " $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)";
song_list_format = song_columns_list_format = "(3f)[red]{n} (3f)[246]{} (35)[white]{t} (18)[blue]{a} (30)[green]{b} (5f)[yellow]{d} (5f)[red]{y} (7f)[magenta]{l}";
" $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)"; song_status_format = "$b $8%A $8$3 $3%t $3$5 $5%b $5$2 $2%y $2$8 %g";
song_columns_list_format =
"(3f)[red]{n} (3f)[246]{} (35)[white]{t} (18)[blue]{a} (30)[green]{b} (5f)[yellow]{d} (5f)[red]{y} (7f)[magenta]{l}";
song_status_format =
"$b $8%A $8$3 $3%t $3$5 $5%b $5$2 $2%y $2$8 %g";
playlist_display_mode = "columns"; playlist_display_mode = "columns";
browser_display_mode = "columns"; browser_display_mode = "columns";
search_engine_display_mode = "columns"; search_engine_display_mode = "columns";

View file

@ -1,6 +1,11 @@
{ config, inputs, lib, pkgs, ... }: {
with lib; config,
let inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.neovim; cfg = config.modules.programs.neovim;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -8,7 +13,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
imports = [ inputs.nixvim.homeManagerModules.nixvim ]; imports = [inputs.nixvim.homeManagerModules.nixvim];
programs.nixvim = { programs.nixvim = {
enable = true; enable = true;
enableMan = true; enableMan = true;
@ -51,7 +56,7 @@ in {
nixvimInjections = true; nixvimInjections = true;
incrementalSelection.enable = true; incrementalSelection.enable = true;
}; };
treesitter-context = { enable = true; }; treesitter-context = {enable = true;};
coq-nvim = { coq-nvim = {
enable = true; enable = true;
installArtifacts = true; installArtifacts = true;
@ -61,7 +66,7 @@ in {
completion.always = false; completion.always = false;
}; };
}; };
neo-tree = { enable = true; }; neo-tree = {enable = true;};
# TODO laytan/cloak.nvim # TODO laytan/cloak.nvim
lsp = { lsp = {
enable = true; enable = true;
@ -118,7 +123,7 @@ in {
rust-tools = { rust-tools = {
enable = true; enable = true;
crateGraph = { crateGraph = {
enabledGraphvizBackends = [ "png" "svg" ]; enabledGraphvizBackends = ["png" "svg"];
backend = "x11"; backend = "x11";
}; };
inlayHints = { inlayHints = {
@ -157,10 +162,9 @@ in {
enable = true; enable = true;
settings.theme = "dark"; settings.theme = "dark";
}; };
}; };
extraPlugins = with pkgs.vimPlugins; [ zen-mode-nvim lazygit-nvim ]; extraPlugins = with pkgs.vimPlugins; [zen-mode-nvim lazygit-nvim];
keymaps = [ keymaps = [
{ {

View file

@ -1,6 +1,9 @@
{ config, lib, ... }: {
with lib; config,
let lib,
...
}:
with lib; let
cfg = config.modules.programs.newsboat; cfg = config.modules.programs.newsboat;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -51,13 +54,11 @@ in {
} }
{ {
title = "Veronica Explains"; title = "Veronica Explains";
url = url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ";
"https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ";
} }
{ {
title = "Mental Outlaw"; title = "Mental Outlaw";
url = url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA";
"https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA";
} }
{ {
title = "Hacker News"; title = "Hacker News";

View file

@ -1,10 +1,13 @@
{ config, lib, ... }: {
with lib; config,
let lib,
...
}:
with lib; let
cfg = config.modules.programs.yazi; cfg = config.modules.programs.yazi;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
options.modules.programs.yazi = { enable = mkEnableOption "yazi"; }; options.modules.programs.yazi = {enable = mkEnableOption "yazi";};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {

View file

@ -1 +1 @@
_: { imports = [ ./wayland ]; } _: {imports = [./wayland];}

View file

@ -1,10 +1,14 @@
{ config, pkgs, inputs, ... }: { {
config,
pkgs,
inputs,
...
}: {
imports = [ imports = [
# inputs.niri.nixosModules.niri # inputs.niri.nixosModules.niri
./hypr ./hypr
./variables.nix ./variables.nix
]; ];
# programs.niri.enable = true; # programs.niri.enable = true;
} }

View file

@ -1 +1 @@
_: { imports = [ ./land.nix ]; } _: {imports = [./land.nix];}

View file

@ -1,18 +1,28 @@
{ config, pkgs, lib, inputs, ... }: {
let config,
pkgs,
lib,
inputs,
...
}: let
cfg = config.modules.wms.wayland.hyprland; cfg = config.modules.wms.wayland.hyprland;
username = config.modules.other.system.username; username = config.modules.other.system.username;
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
inherit (inputs.anyrun.packages.${pkgs.system}) anyrun; inherit (inputs.anyrun.packages.${pkgs.system}) anyrun;
inherit (inputs.nixpkgs-wayland.packages.${pkgs.system}) inherit
foot swww wlsunset; (inputs.nixpkgs-wayland.packages.${pkgs.system})
foot
swww
wlsunset
;
inherit (inputs.waybar.packages.${pkgs.system}) waybar; inherit (inputs.waybar.packages.${pkgs.system}) waybar;
inherit (inputs.split-monitor-workspaces.packages.${pkgs.system}) inherit
split-monitor-workspaces; (inputs.split-monitor-workspaces.packages.${pkgs.system})
split-monitor-workspaces
;
in { in {
options.modules.wms.wayland.hyprland.enable = lib.mkEnableOption "hyprland"; options.modules.wms.wayland.hyprland.enable = lib.mkEnableOption "hyprland";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# xdg Portal # xdg Portal
xdg.portal = { xdg.portal = {
enable = true; enable = true;
@ -27,13 +37,13 @@ in {
enable = true; enable = true;
package = hyprland; package = hyprland;
# Split-monitor-workspaces provides awesome-like workspace behaviour # Split-monitor-workspaces provides awesome-like workspace behaviour
plugins = [ split-monitor-workspaces ]; plugins = [split-monitor-workspaces];
# Xwayland for X applications # Xwayland for X applications
xwayland.enable = true; xwayland.enable = true;
# No idea why I set this # No idea why I set this
systemd = { systemd = {
enable = true; enable = true;
variables = [ "--all" ]; variables = ["--all"];
}; };
# Hyprland settings # Hyprland settings
@ -100,7 +110,7 @@ in {
follow_mouse = true; follow_mouse = true;
repeat_rate = 50; repeat_rate = 50;
repeat_delay = 250; repeat_delay = 250;
tablet = { output = "HDMI-A-2"; }; tablet = {output = "HDMI-A-2";};
}; };
general = { general = {
sensitivity = 1.0; sensitivity = 1.0;
@ -123,7 +133,7 @@ in {
shadow_offset = "2 4"; shadow_offset = "2 4";
shadow_scale = 1; shadow_scale = 1;
}; };
# Bezier curves for aninmations. # Bezier curves for aninmations.
# Generate your own at https://www.cssportal.com/css-cubic-bezier-generator/ # Generate your own at https://www.cssportal.com/css-cubic-bezier-generator/
bezier = [ bezier = [
"dupa, 0.1, 0.9, 0.1, 1.05" "dupa, 0.1, 0.9, 0.1, 1.05"
@ -141,7 +151,7 @@ in {
"workspaces, 1, 5, dupa, slidevert" "workspaces, 1, 5, dupa, slidevert"
]; ];
}; };
dwindle = { no_gaps_when_only = true; }; dwindle = {no_gaps_when_only = true;};
debug.disable_logs = false; debug.disable_logs = false;
@ -220,7 +230,6 @@ in {
"$mainMod, J, movefocus, d" "$mainMod, J, movefocus, d"
"$mainMod, K, movefocus, u" "$mainMod, K, movefocus, u"
"$mainMod, L, movefocus, r" "$mainMod, L, movefocus, r"
]; ];
# Media controls # Media controls
bindl = let bindl = let
@ -291,7 +300,6 @@ in {
}; };
}; };
}; };
environment.systemPackages = with pkgs; [ libnotify ]; environment.systemPackages = with pkgs; [libnotify];
}; };
} }

View file

@ -1,4 +1,9 @@
{ pkgs, theme, config, ... }: {
pkgs,
theme,
config,
...
}:
with theme.colors; { with theme.colors; {
programs.niri.settings = { programs.niri.settings = {
outputs."eDP-1".position = { outputs."eDP-1".position = {
@ -38,11 +43,11 @@ with theme.colors; {
gaps = 16; gaps = 16;
center-focused-column = "never"; center-focused-column = "never";
preset-column-widths = [ preset-column-widths = [
{ proportion = 0.333; } {proportion = 0.333;}
{ proportion = 0.5; } {proportion = 0.5;}
{ proportion = 0.666; } {proportion = 0.666;}
]; ];
default-column-width = { proportion = 0.5; }; default-column-width = {proportion = 0.5;};
focus-ring = { focus-ring = {
enable = true; enable = true;
@ -76,87 +81,91 @@ with theme.colors; {
window-close = smooth; window-close = smooth;
}; };
window-rules = [{ window-rules = [
geometry-corner-radius = let radius = 8.0; {
in { geometry-corner-radius = let
bottom-left = radius; radius = 8.0;
bottom-right = radius; in {
top-left = radius; bottom-left = radius;
top-right = radius; bottom-right = radius;
}; top-left = radius;
clip-to-geometry = true; top-right = radius;
}];
binds = with config.lib.niri.actions;
let sh = spawn "sh" "-c";
in {
"Mod+Return" = {
action = spawn "${pkgs.foot}/bin/foot";
cooldown-ms = 500;
}; };
"Mod+Space".action = spawn "${pkgs.fuzzel}/bin/fuzzel"; clip-to-geometry = true;
"Mod+V".action = sh }
"${pkgs.cliphist}/bin/cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"; ];
"Mod+Shift+Period".action = spawn "emoji";
"XF86AudioRaiseVolume".action = spawn "pamixer" "-i" "5"; binds = with config.lib.niri.actions; let
"XF86AudioLowerVolume".action = spawn "pamixer" "-d" "5"; sh = spawn "sh" "-c";
"XF86AudioMute".action = spawn "pamixer" "-t"; in {
"XF86AudioMicMute".action = spawn "micmute"; "Mod+Return" = {
action = spawn "${pkgs.foot}/bin/foot";
"XF86MonBrightnessUp".action = spawn "brightnessctl" "set" "+5%"; cooldown-ms = 500;
"XF86MonBrightnessDown".action = spawn "brightnessctl" "set" "5%-";
"Super+WheelScrollDown".action = focus-workspace-down;
"Super+WheelScrollDown".cooldown-ms = 500;
"Super+WheelScrollUp".action = focus-workspace-up;
"Super+WheelScrollUp".cooldown-ms = 500;
"Super+WheelScrollRight".action = focus-column-right;
"Super+WheelScrollLeft".action = focus-column-left;
"Super+H".action = focus-column-left;
"Super+L".action = focus-column-right;
"Super+J".action = focus-workspace-down;
"Super+K".action = focus-workspace-up;
"Super+Left".action = focus-column-left;
"Super+Right".action = focus-column-right;
"Super+Down".action = focus-window-down;
"Super+Up".action = focus-window-up;
"Super+Print".action = screenshot-window;
"Super+Shift+Print".action = screenshot-screen;
"Super+Shift+S".action = screenshot;
"Super+Ctrl+H".action = move-column-left;
"Super+Ctrl+J".action = move-window-down;
"Super+Ctrl+K".action = move-window-up;
"Super+Ctrl+L".action = move-column-right;
"Super+U".action = move-workspace-down;
"Super+I".action = move-workspace-up;
"Super+Minus".action = set-column-width "-10%";
"Super+Equal".action = set-column-width "+10%";
"Super+Shift+Minus".action = set-window-height "-10%";
"Super+Shift+Equal".action = set-window-height "+10%";
"Super+Shift+H".action = focus-monitor-left;
"Super+Shift+J".action = focus-monitor-down;
"Super+Shift+K".action = focus-monitor-up;
"Super+Shift+L".action = focus-monitor-right;
"Super+Shift+Ctrl+H".action = move-column-to-monitor-left;
"Super+Shift+Ctrl+J".action = move-column-to-monitor-down;
"Super+Shift+Ctrl+K".action = move-column-to-monitor-up;
"Super+Shift+Ctrl+L".action = move-column-to-monitor-right;
"Super+R".action = switch-preset-column-width;
"Super+F".action = maximize-column;
"Super+Shift+F".action = fullscreen-window;
"Super+C".action = center-column;
"Mod+Q".action = close-window;
}; };
"Mod+Space".action = spawn "${pkgs.fuzzel}/bin/fuzzel";
"Mod+V".action =
sh
"${pkgs.cliphist}/bin/cliphist list | fuzzel --dmenu | cliphist decode | wl-copy";
"Mod+Shift+Period".action = spawn "emoji";
"XF86AudioRaiseVolume".action = spawn "pamixer" "-i" "5";
"XF86AudioLowerVolume".action = spawn "pamixer" "-d" "5";
"XF86AudioMute".action = spawn "pamixer" "-t";
"XF86AudioMicMute".action = spawn "micmute";
"XF86MonBrightnessUp".action = spawn "brightnessctl" "set" "+5%";
"XF86MonBrightnessDown".action = spawn "brightnessctl" "set" "5%-";
"Super+WheelScrollDown".action = focus-workspace-down;
"Super+WheelScrollDown".cooldown-ms = 500;
"Super+WheelScrollUp".action = focus-workspace-up;
"Super+WheelScrollUp".cooldown-ms = 500;
"Super+WheelScrollRight".action = focus-column-right;
"Super+WheelScrollLeft".action = focus-column-left;
"Super+H".action = focus-column-left;
"Super+L".action = focus-column-right;
"Super+J".action = focus-workspace-down;
"Super+K".action = focus-workspace-up;
"Super+Left".action = focus-column-left;
"Super+Right".action = focus-column-right;
"Super+Down".action = focus-window-down;
"Super+Up".action = focus-window-up;
"Super+Print".action = screenshot-window;
"Super+Shift+Print".action = screenshot-screen;
"Super+Shift+S".action = screenshot;
"Super+Ctrl+H".action = move-column-left;
"Super+Ctrl+J".action = move-window-down;
"Super+Ctrl+K".action = move-window-up;
"Super+Ctrl+L".action = move-column-right;
"Super+U".action = move-workspace-down;
"Super+I".action = move-workspace-up;
"Super+Minus".action = set-column-width "-10%";
"Super+Equal".action = set-column-width "+10%";
"Super+Shift+Minus".action = set-window-height "-10%";
"Super+Shift+Equal".action = set-window-height "+10%";
"Super+Shift+H".action = focus-monitor-left;
"Super+Shift+J".action = focus-monitor-down;
"Super+Shift+K".action = focus-monitor-up;
"Super+Shift+L".action = focus-monitor-right;
"Super+Shift+Ctrl+H".action = move-column-to-monitor-left;
"Super+Shift+Ctrl+J".action = move-column-to-monitor-down;
"Super+Shift+Ctrl+K".action = move-column-to-monitor-up;
"Super+Shift+Ctrl+L".action = move-column-to-monitor-right;
"Super+R".action = switch-preset-column-width;
"Super+F".action = maximize-column;
"Super+Shift+F".action = fullscreen-window;
"Super+C".action = center-column;
"Mod+Q".action = close-window;
};
prefer-no-csd = true; prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true; hotkey-overlay.skip-at-startup = true;

View file

@ -1,13 +1,17 @@
{ pkgs, lib, theme, ... }: {
let pkgs,
lib,
theme,
...
}: let
mkService = lib.recursiveUpdate { mkService = lib.recursiveUpdate {
Unit.PartOf = [ "graphical-session.target" ]; Unit.PartOf = ["graphical-session.target"];
Unit.After = [ "graphical-session.target" ]; Unit.After = ["graphical-session.target"];
Install.WantedBy = [ "graphical-session.target" ]; Install.WantedBy = ["graphical-session.target"];
}; };
in { in {
imports = [ ./config.nix ]; imports = [./config.nix];
home.packages = with pkgs; [ pamixer ]; home.packages = with pkgs; [pamixer];
services = { services = {
wlsunset = { wlsunset = {
# TODO: fix opaque red screen issue # TODO: fix opaque red screen issue
@ -28,7 +32,7 @@ in {
tray = { tray = {
Unit = { Unit = {
Description = "Home Manager System Tray"; Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ]; Requires = ["graphical-session-pre.target"];
}; };
}; };
}; };

View file

@ -1,5 +1,9 @@
{ pkgs, inputs, config, ... }: { {
pkgs,
inputs,
config,
...
}: {
programs.niri = { programs.niri = {
enable = true; enable = true;
package = inputs.niri.packages.${pkgs.system}.niri-unstable; package = inputs.niri.packages.${pkgs.system}.niri-unstable;

View file

@ -1,5 +1,8 @@
{ config, lib, ... }: {
let config,
lib,
...
}: let
cfg = config.modules.wms.wayland; cfg = config.modules.wms.wayland;
hyprland = config.modules.wms.wayland.hyprland; hyprland = config.modules.wms.wayland.hyprland;
in { in {
@ -12,7 +15,7 @@ in {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
__GL_GSYNC_ALLOWED = "0"; __GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0"; __GL_VRR_ALLOWED = "0";
# _JAVA_AWT_WM_NONEREPARENTING = "1"; # _JAVA_AWT_WM_NONEREPARENTING = "1";
# SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"; # SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh";
DISABLE_QT5_COMPAT = "0"; DISABLE_QT5_COMPAT = "0";
GDK_BACKEND = "wayland,x11"; GDK_BACKEND = "wayland,x11";
@ -24,15 +27,15 @@ in {
DISABLE_QT_COMPAT = "0"; DISABLE_QT_COMPAT = "0";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
# WLR_BACKEND = "vulkan"; # WLR_BACKEND = "vulkan";
# WLR_RENDERER = "vulkan"; # WLR_RENDERER = "vulkan";
XDG_SESSION_TYPE = "wayland"; XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland"; SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland"; CLUTTER_BACKEND = "wayland";
# WLR_DRM_DEVICES = "/dev/dri/card1:/dev/dri/card0"; # WLR_DRM_DEVICES = "/dev/dri/card1:/dev/dri/card0";
# }; # };
# } # }
# Session variables for Hyprland # Session variables for Hyprland
# (lib.mkIf (hyprland.enable) { # (lib.mkIf (hyprland.enable) {
# environment.variables = { # environment.variables = {
LIBVA_DRIVER_NAME = "nvidia"; LIBVA_DRIVER_NAME = "nvidia";

View file

@ -1,6 +1,11 @@
{ pkgs, lib, config, callPackage, ... }: {
with lib; pkgs,
let lib,
config,
callPackage,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.awesome; cfg = config.modules.programs.awesome;
in { in {
@ -17,8 +22,7 @@ in {
options = "grp:alt_space_toggle"; options = "grp:alt_space_toggle";
}; };
windowManager.awesome.enable = true; windowManager.awesome.enable = true;
displayManager.setupCommands = displayManager.setupCommands = "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1";
"${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1";
}; };
}; };
}; };

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { {pkgs, ...}: {
boot.loader = { boot.loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
grub = { grub = {
@ -9,9 +9,8 @@
}; };
boot.plymouth = { boot.plymouth = {
enable = false; enable = false;
font = font = "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf";
"${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf"; themePackages = [pkgs.catppuccin-plymouth];
themePackages = [ pkgs.catppuccin-plymouth ];
theme = "catppuccin-macchiato"; theme = "catppuccin-macchiato";
}; };
} }

View file

@ -1,5 +1,10 @@
{ config, lib, pkgs, ... }: {
let username = config.modules.other.system.username; config,
lib,
pkgs,
...
}: let
username = config.modules.other.system.username;
in { in {
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
@ -11,8 +16,8 @@ in {
# Bluetooth headset media control buttons # Bluetooth headset media control buttons
systemd.user.services.mpris-proxy = { systemd.user.services.mpris-proxy = {
description = "Mpris proxy"; description = "Mpris proxy";
after = [ "network.target" "sound.target" ]; after = ["network.target" "sound.target"];
wantedBy = [ "default.target" ]; wantedBy = ["default.target"];
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
}; };
} }

View file

@ -1,5 +1,10 @@
{ pkgs, config, inputs, ... }: { {
services.xserver.videoDrivers = [ "nvidia" ]; pkgs,
config,
inputs,
...
}: {
services.xserver.videoDrivers = ["nvidia"];
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
# package = pkgs-unstable.mesa.drivers; # package = pkgs-unstable.mesa.drivers;
@ -13,13 +18,12 @@
powerManagement.finegrained = false; powerManagement.finegrained = false;
nvidiaSettings = false; nvidiaSettings = false;
#package = config.boot.kernelPackages.nvidiaPackages.beta; #package = config.boot.kernelPackages.nvidiaPackages.beta;
package = config.boot.kernelPackages.nvidiaPackages.mkDriver { package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
version = "555.42.02"; version = "555.42.02";
sha256_64bit = "sha256-k7cI3ZDlKp4mT46jMkLaIrc2YUx1lh1wj/J4SVSHWyk="; sha256_64bit = "sha256-k7cI3ZDlKp4mT46jMkLaIrc2YUx1lh1wj/J4SVSHWyk=";
openSha256 = "sha256-3/eI1VsBzuZ3Y6RZmt3Q5HrzI2saPTqUNs6zPh5zy6w="; openSha256 = "sha256-3/eI1VsBzuZ3Y6RZmt3Q5HrzI2saPTqUNs6zPh5zy6w=";
settingsSha256 = ""; settingsSha256 = "";
persistencedSha256 = ""; persistencedSha256 = "";
}; };
}; };
} }

View file

@ -1,5 +1,9 @@
{ config, lib, ... }: {
let username = config.modules.other.system.username; config,
lib,
...
}: let
username = config.modules.other.system.username;
in { in {
networking = { networking = {
networkmanager = { networkmanager = {
@ -9,7 +13,7 @@ in {
}; };
services.resolved = { services.resolved = {
enable = true; enable = true;
fallbackDns = [ "9.9.9.9" "2620::fe::fe" ]; fallbackDns = ["9.9.9.9" "2620::fe::fe"];
}; };
users.users.${username}.extraGroups = [ "networkmanager" ]; users.users.${username}.extraGroups = ["networkmanager"];
} }

View file

@ -1,3 +1,7 @@
{ inputs, lib, ... }: { {
nix.registry = lib.mapAttrs (_: v: { flake = v; }) inputs; inputs,
lib,
...
}: {
nix.registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
} }

View file

@ -1 +1 @@
{ self, ... }: { environment.etc."current-flake".source = self; } {self, ...}: {environment.etc."current-flake".source = self;}

View file

@ -1,9 +1,9 @@
{ pkgs, ... }: { {pkgs, ...}: {
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
material-icons material-icons
material-design-icons material-design-icons
(nerdfonts.override { fonts = [ "Iosevka" "JetBrainsMono" ]; }) (nerdfonts.override {fonts = ["Iosevka" "JetBrainsMono"];})
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk
noto-fonts-cjk noto-fonts-cjk
@ -17,10 +17,10 @@
# this fixes emoji stuff # this fixes emoji stuff
fontconfig = { fontconfig = {
defaultFonts = { defaultFonts = {
monospace = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ]; monospace = ["JetBrainsMono Nerd Font" "Noto Color Emoji"];
sansSerif = [ "Lexend" "Noto Color Emoji" ]; sansSerif = ["Lexend" "Noto Color Emoji"];
serif = [ "Noto Serif" "Noto Color Emoji" ]; serif = ["Noto Serif" "Noto Color Emoji"];
emoji = [ "Noto Color Emoji" ]; emoji = ["Noto Color Emoji"];
}; };
}; };
}; };

View file

@ -1,9 +1,12 @@
{ config, lib, ... }: {
config,
lib,
...
}:
with lib; { with lib; {
options.modules.other.system.monitors = mkOption { options.modules.other.system.monitors = mkOption {
description = "\n List of monitors to use\n "; description = "\n List of monitors to use\n ";
default = [ ]; default = [];
type = with types; type = with types;
types.listOf (submodule { types.listOf (submodule {
options = { options = {
@ -69,5 +72,4 @@ with lib; {
}; };
}); });
}; };
} }

View file

@ -1,6 +1,8 @@
{ inputs, outputs, ... }: {
inputs,
let outputs,
...
}: let
add_nur = self: super: { add_nur = self: super: {
# nur-no-pkgs = import inputs.nur-no-pkgs { pkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; nurpkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; }; # nur-no-pkgs = import inputs.nur-no-pkgs { pkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; nurpkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; };
nur = import inputs.nur { nur = import inputs.nur {
@ -14,4 +16,4 @@ let
}; # .legacyPackages.${profile-config.system}; }; # .legacyPackages.${profile-config.system};
}; };
}; };
in { nixpkgs.overlays = [ add_nur ]; } in {nixpkgs.overlays = [add_nur];}