mirror of
https://github.com/itme-brain/nixos.git
synced 2026-05-08 06:50:11 -04:00
init
This commit is contained in:
commit
864c69fe61
147 changed files with 11233 additions and 0 deletions
323
user/bookmarks/default.nix
Normal file
323
user/bookmarks/default.nix
Normal file
|
|
@ -0,0 +1,323 @@
|
|||
[
|
||||
{
|
||||
name = "toolbar";
|
||||
toolbar = true;
|
||||
bookmarks = [
|
||||
{
|
||||
name = "ArchWiki";
|
||||
url = "https://wiki.archlinux.org/";
|
||||
tags = [ "dev" "linux" "docs" ];
|
||||
}
|
||||
{
|
||||
name = "NixOS";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Nixpkgs";
|
||||
url = "https://search.nixos.org/packages";
|
||||
tags = [ "nix" "dev" "linux" ];
|
||||
keyword = "pkgs";
|
||||
}
|
||||
{
|
||||
name = "Home Manager";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Home Manager Option Docs";
|
||||
url = "https://nix-community.github.io/home-manager/options.xhtml";
|
||||
tags = [ "nix" "dev" "linux" ];
|
||||
keyword = "hm";
|
||||
}
|
||||
{
|
||||
name = "Home Manager Option Search";
|
||||
url = "https://home-manager-options.extranix.com";
|
||||
tags = [ "nix" "dev" "linux" ];
|
||||
keyword = "hm";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Nix Docs";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "nix.dev";
|
||||
url = "https://nix.dev";
|
||||
tags = [ "nix" "dev" "docs" ];
|
||||
keyword = "nix";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Gentoo Wiki";
|
||||
url = "https://wiki.gentoo.org";
|
||||
tags = [ "dev" "linux" "docs" ];
|
||||
keyword = "gentoo";
|
||||
}
|
||||
{
|
||||
name = "Email";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Gmail";
|
||||
url = "https://gmail.com";
|
||||
tags = [ "google" "email" ];
|
||||
keyword = "gmail";
|
||||
}
|
||||
{
|
||||
name = "ProtonMail";
|
||||
url = "https://mail.protonmail.com";
|
||||
tags = [ "email" "personal" "work" ];
|
||||
keyword = "email";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Work";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Outlook";
|
||||
url = "https://outlook.office365.com";
|
||||
tags = [ "work" "email" "microsoft" ];
|
||||
keyword = "work";
|
||||
}
|
||||
{
|
||||
name = "Teams";
|
||||
url = "https://teams.microsoft.com";
|
||||
tags = [ "work" "microsoft" ];
|
||||
keyword = "teams";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Youtube";
|
||||
url = "https://youtube.com";
|
||||
tags = [ "social" "entertainment" "google" ];
|
||||
keyword = "youtube";
|
||||
}
|
||||
{
|
||||
name = "Substack";
|
||||
url = "https://substack.com";
|
||||
tags = [ "social" "blogging" "personal" ];
|
||||
keyword = "blog";
|
||||
}
|
||||
{
|
||||
name = "Amazon";
|
||||
url = "https://amazon.com";
|
||||
tags = [ "shopping" "amazon" ];
|
||||
keyword = "amazon";
|
||||
}
|
||||
{
|
||||
name = "Social";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Twitter";
|
||||
url = "https://x.com";
|
||||
tags = [ "social" "forum" ];
|
||||
keyword = "x";
|
||||
}
|
||||
{
|
||||
name = "Reddit";
|
||||
url = "https://reddit.com";
|
||||
tags = [ "social" "forum" ];
|
||||
keyword = "reddit";
|
||||
}
|
||||
{
|
||||
name = "Twitch";
|
||||
url = "https://twitch.com";
|
||||
tags = [ "social" "entertainment" "amazon" ];
|
||||
keyword = "twitch";
|
||||
}
|
||||
{
|
||||
name = "Nostr";
|
||||
url = "https://primal.net";
|
||||
tags = [ "social" "nostr" "bitcoin" ];
|
||||
keyword = "nostr";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "ChatGPT";
|
||||
url = "https://chat.openai.com";
|
||||
tags = [ "dev" "ai" "microsoft" ];
|
||||
keyword = "ai";
|
||||
}
|
||||
{
|
||||
name = "Dev";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Github";
|
||||
url = "https://github.com";
|
||||
tags = [ "dev" "work" "personal" "microsoft" ];
|
||||
keyword = "git";
|
||||
}
|
||||
{
|
||||
name = "Gist";
|
||||
url = "https://gist.github.com";
|
||||
tags = [ "dev" "work" "personal" "microsoft" "blogging" ];
|
||||
keyword = "gist";
|
||||
}
|
||||
{
|
||||
name = "Stack Overflow";
|
||||
url = "https://stackoverflow.com";
|
||||
tags = [ "dev" "work" "forum" ];
|
||||
}
|
||||
{
|
||||
name = "Learning";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Coding";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Leetcode";
|
||||
url = "https://leetcode.com";
|
||||
}
|
||||
{
|
||||
name = "CodeWars";
|
||||
url = "https://codewars.com";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Projects";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Linux From Scratch";
|
||||
url = "https://linuxfromscratch.org/lfs/view/stable/index.html";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Documentation";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "MDN";
|
||||
url = "https://developer.mozilla.org";
|
||||
tags = [ "dev" "docs" ];
|
||||
keyword = "mdn";
|
||||
}
|
||||
{
|
||||
name = "DevDocs";
|
||||
url = "https://devdocs.io";
|
||||
tags = [ "dev" "docs" ];
|
||||
keyword = "docs";
|
||||
}
|
||||
{
|
||||
name = "Linux Kernel";
|
||||
url = "https://docs.kernel.org";
|
||||
}
|
||||
{
|
||||
name = "References";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "ASCII Table";
|
||||
url = "https://asciitable.com";
|
||||
tags = [ "dev" ];
|
||||
keyword = "ascii";
|
||||
}
|
||||
{
|
||||
name = "Regex Cheat Sheet";
|
||||
url = "https://rexegg.com/regex-quickstart.php";
|
||||
tags = [ "dev" ];
|
||||
keyword = "regex";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Tools";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "GitBook";
|
||||
url = "https://gitbook.com";
|
||||
tags = [ "dev" "docs" ];
|
||||
}
|
||||
{
|
||||
name = "Namecheap";
|
||||
url = "https://namecheap.com";
|
||||
tags = [ "dev" "shopping" "hosting" ];
|
||||
}
|
||||
{
|
||||
name = "LetsEncrypt";
|
||||
url = "https://letsencrypt.com";
|
||||
tags = [ "dev" "hosting" ];
|
||||
}
|
||||
{
|
||||
name = "Gitea";
|
||||
url = "https://gitea.com";
|
||||
tags = [ "dev" "hosting" ];
|
||||
}
|
||||
{
|
||||
name = "Hosting";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "DigitalOcean";
|
||||
url = "https://digitalocean.com";
|
||||
tags = [ "dev" "hosting" ];
|
||||
}
|
||||
{
|
||||
name = "Supabase";
|
||||
url = "https://supabase.com";
|
||||
tags = [ "dev" "hosting" ];
|
||||
}
|
||||
{
|
||||
name = "Vercel";
|
||||
url = "https://vercel.com";
|
||||
tags = [ "dev" "hosting" ];
|
||||
}
|
||||
{
|
||||
name = "AWS";
|
||||
url = "https://aws.amazon.com";
|
||||
tags = [ "dev" "hosting" ];
|
||||
}
|
||||
{
|
||||
name = "Azure";
|
||||
url = "https://azure.microsoft.com";
|
||||
tags = [ "dev" "hosting" ];
|
||||
}
|
||||
{
|
||||
name = "Firebase";
|
||||
url = "https://firebase.google.com";
|
||||
tags = [ "dev" "hosting" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Financials";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Fidelity";
|
||||
url = "https://fidelity.com";
|
||||
tags = [ "banking" ];
|
||||
keyword = "bank";
|
||||
}
|
||||
{
|
||||
name = "Chase";
|
||||
url = "https://chase.com";
|
||||
tags = [ "banking" ];
|
||||
}
|
||||
{
|
||||
name = "Wells Fargo";
|
||||
url = "https://wellsfargo.com";
|
||||
tags = [ "banking" ];
|
||||
}
|
||||
{
|
||||
name = "Crapto";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Coinbase";
|
||||
url = "https://coinbase.com";
|
||||
tags = [ "banking" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
]
|
||||
1
user/config/keys/age/yubikey
Normal file
1
user/config/keys/age/yubikey
Normal file
|
|
@ -0,0 +1 @@
|
|||
AGE-PLUGIN-YUBIKEY-1C8CXVQVZUK7AV2CFWEKFP
|
||||
20
user/default.nix
Normal file
20
user/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
user = mkOption {
|
||||
description = "User Configurations";
|
||||
type = types.attrs;
|
||||
default = with pkgs; rec {
|
||||
name = "bryan";
|
||||
email = "bryan@ramos.codes";
|
||||
shell = bash;
|
||||
keys = import ./keys { inherit lib; };
|
||||
|
||||
groups = [ "wheel" "networkmanager" "home-manager" "input" ];
|
||||
bookmarks = import ./bookmarks;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
39
user/home.nix
Normal file
39
user/home.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
pass = pkgs.pass.withExtensions (exts: with exts; [
|
||||
pass-audit
|
||||
pass-otp
|
||||
pass-update
|
||||
]);
|
||||
|
||||
in
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.username = config.user.name;
|
||||
home.homeDirectory = "/home/${config.user.name}";
|
||||
|
||||
# Essential packages for all users
|
||||
home.packages = with pkgs; [
|
||||
pass
|
||||
wget curl fastfetch fd
|
||||
unzip zip rsync
|
||||
calc calcurse
|
||||
age
|
||||
sops
|
||||
];
|
||||
|
||||
programs.bash.shellAliases = {
|
||||
cal = "${pkgs.calcurse}/bin/calcurse";
|
||||
calendar = "${pkgs.calcurse}/bin/calcurse";
|
||||
};
|
||||
|
||||
# Default modules for all users (machines can override with mkForce false)
|
||||
modules.user = {
|
||||
bash.enable = lib.mkDefault true;
|
||||
git.enable = lib.mkDefault true;
|
||||
neovim.enable = lib.mkDefault true;
|
||||
security.gpg.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
1
user/keys/age/yubikey.pub.key
Normal file
1
user/keys/age/yubikey.pub.key
Normal file
|
|
@ -0,0 +1 @@
|
|||
age1yubikey1qfapxqnnkh92zkgayzzm9n0gtpkwaqcvrzy4d4xa4rxnjua8vjhy72hh9r9
|
||||
33
user/keys/default.nix
Normal file
33
user/keys/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib }:
|
||||
|
||||
with builtins;
|
||||
let
|
||||
extractName = filename:
|
||||
let
|
||||
# Remove .key extension
|
||||
noKey = lib.removeSuffix ".key" filename;
|
||||
# Remove .pub/.priv/.public/.private markers
|
||||
noMarkers = replaceStrings
|
||||
[ ".pub" ".priv" ".public" ".private" ]
|
||||
[ "" "" "" "" ]
|
||||
noKey;
|
||||
in noMarkers;
|
||||
|
||||
constructKeys = dir: (
|
||||
listToAttrs (
|
||||
map (subdir: {
|
||||
name = subdir;
|
||||
value = listToAttrs (
|
||||
map (file: {
|
||||
name = extractName file;
|
||||
value = readFile "${dir}/${subdir}/${file}";
|
||||
}) (filter (file:
|
||||
(readDir "${dir}/${subdir}").${file} == "regular" &&
|
||||
lib.hasSuffix ".key" file
|
||||
) (attrNames (readDir "${dir}/${subdir}")))
|
||||
);
|
||||
}) (filter (node: (readDir dir).${node} == "directory") (attrNames (readDir dir)))
|
||||
)
|
||||
);
|
||||
in
|
||||
constructKeys ./.
|
||||
53
user/keys/pgp/company.pub.key
Executable file
53
user/keys/pgp/company.pub.key
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: G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WDogupBc3RpxGP9ET8Th+HJM0IpQLoKeDYl5I
|
||||
9z/kRFbY243tkJ1r65TMfa5My9J9ZdP22ZcOR2ql5z2IT7dvuteupaD82ojSXPzJ
|
||||
uWsnbjV0Rg==
|
||||
=56r2
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
121
user/keys/pgp/work.pub.key
Executable file
121
user/keys/pgp/work.pub.key
Executable file
|
|
@ -0,0 +1,121 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBGZhwAgBEACsQLogtgJt/+UuNQGDDV3I73sBHZrrEm5JgooOL5GLK+YJSrqh
|
||||
/fqidBcNft8/V4sycafOvud9OYs7w1EgeOlmGQXtXgZuQaKf161yUztPvuodzIo0
|
||||
bFGI8NdbyNJVZKgCmvJ3f4H/6f5nxNM6+dp57F8QbvW3hB/W76mCqQSek3kfZPfY
|
||||
vxZB+OS7lnLRVp+xiW3zAnoBvAW2bWhSR7Jn+sLnaJpRlv4Sk3f3/659hvYOBdtt
|
||||
/Qp5N0P8BnDPbb6Yt02F7lX/k9QB0P7XXVyj33lUVZdp6aTWNTqDcMcW1BJa7p2K
|
||||
M6N92QvipVBOQtF63XguFIhQwf60X0O5+LZE1JStsTZh6ALmWei96S2uvHfe/45U
|
||||
WrZQpnZC6UHpEMgMFliT0Enj/PgpW6/tKLuukO4sZBk7jkdCa1fKYbrMPRdjpml7
|
||||
T1sJgTLzJ2TWIbZqVy+GOO0Cqz2fi1p1DQxbWnMhLDtnrZBDUpbZigjS648/wclw
|
||||
xJhhvaWtDNdzpdKCmYl9LETX/S/btDT6xGJDDzYj1ibko+HIarhnPwd51G9nm14J
|
||||
7NXxZ6hcP82IDy/1cJc7OWTf1FEJKrd41ksuF8aYE3EP2R/SXuGPjyt3VHZCU2Oh
|
||||
OHqG5Iz+C8iDFsjpkgBucbZwh5VCiW5H55cE9gtta2WItQN8JwAq9NSZowARAQAB
|
||||
tCtCcnlhbiBSYW1vcyA8YnJ5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/D7L6q
|
||||
YNDe5aCxxa1j9ZhYgh3xGE3BScMNOBZcUAmHb5EcPDkPI4wlwEGkvwKy02NtpD2s
|
||||
UunZB0FZlpuCbAo1WQNxlSn9DtPda8LlrtSts71Rd0Cg5hlrVz3MeeXEiFuI6NQI
|
||||
kKKqzkICa2xmdrac/psmPV+0ututxg3IAXF9CRAJCPS023LHPVlDD/9/eJly6fGy
|
||||
O/hq//a26u4G3TB7ytQ1WXZ5vpHN5KlCl5TzBdyt38fA4NyW7q4JP0RbaNPPIzm8
|
||||
x47WmhEu88wkujNG3+uriM7Ku6CGte9ZDGfB2SSIMqVZczBWrfK2LEsjYKEOeGVJ
|
||||
gJg6zAcDZ3HZSG2iGUme7RcU+bkRKq8YS3dlpRKi5lVwnEhsy6p17HnVaPpQfzLw
|
||||
K+Yh2/+s9HJ4jA3yX7KMo7r+qaP8QytT+gTNHgEHWqtUrhMIWV4seaocCiohE2tH
|
||||
VyOJIAeYZUDbrbSQ92vViutga+jNY6HfSudI2l08Ri1eEVu1rMSN5wQr8jWSyaRN
|
||||
4kbsHmvoEynEbooETU0qFNW1BHiclud70E2P6teCGzHTIkLW6wA7w0jFAQmeh5VA
|
||||
2SxagRyZFmK3e6aBImBDcAfPJJmszI739mQukpCwiYCBtMCoPxhdRNQ2diimragf
|
||||
oyfbltRYs3ko0KGvb9vQUNNbRLLjzPL42GXou8Qh20emTf4/umeUmOZVq3AxZXcE
|
||||
YjTNK3GMrey7oq/jJd305hekweDRDi6MmYBX93sKtR/CrmS5072xypBJkFHGtOwd
|
||||
NkWkspfpqUH+JpjPDG5ift9Q69dteGvyIhe7tAQN6QtDj8jZpa1wiBZ1C8DDjv2C
|
||||
Vv2c5XcFneMcDVBQ28VlwQ2fbIoDokz3Iw==
|
||||
=my/o
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
109
user/keys/pgp/yubikey.pub.key
Normal file
109
user/keys/pgp/yubikey.pub.key
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
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f4o18kETjNPfCbdR3
|
||||
uYrD/qtaehHKFhm8ZeQV2n6ISzj1ABEBAAGJAjYEGAEKACAWIQTx80ZkWEUrLfNR
|
||||
8ehk0SupWs4fLQUCY/QGZAIbIAAKCRBk0SupWs4fLcubD/oDGub4+uep50VBUa0u
|
||||
BZAUu/oS664+53sZyvogMzeIT32DT3vDaa3W2aqUNX/dZVzOcsV07HO4yk6+kiSk
|
||||
1Db2FbRFODbFcs5mBYo/EFSxExhQMQFqgXaW3FrpvL5ljAwsjdoSN93DnMkLnC9K
|
||||
XZUyUT+RDcJnk0xS+0ex77nc8vp13n2huHuXU6BbEGofrT9br7Kyezh84GV9nxls
|
||||
C0PwTX0gBaesqeY/9rtAXq+p+kYBafbny/3zrL8CBwqHqRZWiNbkyGWx9WHvizZE
|
||||
0VJJzGl0CTP7aE/N42t+LDGuaA76SJXkkqGs7GmJ3EHVA8N/2Lwhf0saaG3cBrKx
|
||||
lXrJoSY7TxeoJ7rdt/KRJfKsU0bdXgVXDFrlf4ZvctCLZmQ0nno2cgYemTnELRYv
|
||||
FzrS2itqqWP1ev2iPpCbKp099i/w6D13C3jBVAVYPBapD6aaD7YHWLhHIA5zH7bF
|
||||
n8IgacgKBoJ8u3jo3eeT5CXfsrnwOYdrqposfMCUOriJHx41nGUqjNZDG2ByHxgS
|
||||
mnUd3lrjRDWTUzXj8pRN2K7Uqbbs2Mz4Q64MgbCkkTichMlVux8kH+O/I/veAYto
|
||||
OEpwdDwa67AtzYKG0ssOJI+po9TlbKYS4O4H8XnPhYSOEw8eObNPYCX7jyAjXloo
|
||||
1hbflYLyMYo1BxGR6bPS9gJA2w==
|
||||
=5uun
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
1
user/keys/ssh/graphone.pub.key
Normal file
1
user/keys/ssh/graphone.pub.key
Normal file
|
|
@ -0,0 +1 @@
|
|||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJM1HutPcWXdeTaAXY7ha8SlgeZFtLJGwNa3Kd/DL/R38fq5+fkh3iCoHgv+iiKcordtVTMhbOsHhz3H+Jm274c=
|
||||
1
user/keys/ssh/work.pub.key
Normal file
1
user/keys/ssh/work.pub.key
Normal file
|
|
@ -0,0 +1 @@
|
|||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDXYU5c7AUD5tQQdpzQ73yy3ti3R7dArZ+f/wETN7L2Z2Hw6zo6hDid9/Q4yxdgM/FlTj/Ok2DHBWqxJsEe3S4shwsT9l2qJatjdcUK6zH3/0nFPxGYIaByj87aZ+5dwMoWNGlioPWciUdKeovvau1PwvdBxPabHHap6nwC9yPaSIVbZi4GgYv/zEvOB4LVYLuxLqr0pPdMNz1ddjmjsQCq5alC33jSZWkABERw3GlF02dNHbUq6cZlFq9BudbNWBQ8zFgj/C8amK4DHUSeU8w+ckTmO5PjDjINOnFr8kytDap+/5AQ6kr618evJ2JCwnBj6txb3SVGhcvn3/DJjf2H7flVhZEWIMEMu7452SXfz9mxp3Vu3UMJkjHUj6Lxl302M318k9j+w1fa8EHO7OQHQZajNKrEP5/UK2CDfpP2KIybX5HnEqBcEqoSKhRt7ytNX6VGzURk3/mmk9L+An5z7ve+zqlgNOA8uaIoebB4476+n5pGiNIedO3FRjPofEidYjf5NTZ9YDpqFc5KbfbhduuP63G/kqmgTxXMuTsWINY2xKEc0BPnlEGfezMN+eQpwWINOUxW1ZEk3OYMvC91EndbVwxVbm3aze9894T3+wVTipJ88xARCQeQpu1eaWDSaNduD+8LAouQiTA4whM+jBEeQoWZe6Wf6W4tBeCZ6Q==
|
||||
1
user/keys/ssh/yubikey.pub.key
Normal file
1
user/keys/ssh/yubikey.pub.key
Normal file
|
|
@ -0,0 +1 @@
|
|||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDl4895aB9P5p/lp8Hq5rHun4clvhyTSHFi3U2d6OOBoW5Fm+VcQnW/xbjmCBsXk5BdiowsBxQhwnzdfz/KJL7J5RobomUEaVRwb9UwT88eJveLp14BG8j2J3SjfyhrCX+4jkPx0bPQk1HGcuYY+tPEXf1q/ps88Dhu0CARBIzYQOTYY6b1qWzxpDoFZGHjKG8g5iY6FIu65yKKvvVy1f8IgZ3l3IpwBWVamxgkTcYY0QYSrmzo1n7TXxwrWbvenAqBsQ0cBPs+gVa3uIr+1TJl0Az5SElBVGu3LvUdlk58trtPUj6TQR3YUkg7Vjll7WHOdqhux5ZQNhjkOsHerf0Tw86e6cEzgeTuIbQHIb0LcsUunwKcuh2+au7RO599cvHn0+xZE5MZBxloDDaJ3JsiliM8kyPP/U3ERj03cWLW7BqbT+sfjAOl21RCzk0iQxk1wt/8VmtCr9Adv7IyrtaYvf/bwRP+g+9ldmzKGt8Mdb605uVzZ70H/LLm17f40Te+QHaex5by/6p6cuwEEZtgIg53Wpglu0rA6UxrBfQEHKl/Jt3FLeE0mnEyYkkR2MnHNtyWRIXtuqYZMAm2Ub1pFHH7jQV1gGiDVTw6a2eIwK21a/hXtRjFUpFd1nB1n+KNfJBE4zT3wm3Ud7mKw/6rWnoRyhYZvGXkFdp+iEs49Q==
|
||||
25
user/modules/bash/bash/aliases
Normal file
25
user/modules/bash/bash/aliases
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Navigation
|
||||
alias cd='cd -L'
|
||||
|
||||
# Colors
|
||||
eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
|
||||
# Search
|
||||
alias grep='grep --color=auto'
|
||||
|
||||
# Tree (uses eza if available)
|
||||
if command -v eza >/dev/null 2>&1; then
|
||||
alias tree='eza --tree --icons=never'
|
||||
fi
|
||||
|
||||
# Open (graphical environment only)
|
||||
if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
alias open='xdg-open'
|
||||
fi
|
||||
|
||||
if command -v nvim >/dev/null 2>&1; then
|
||||
alias vim='nvim'
|
||||
fi
|
||||
|
||||
alias cdg='cd "$(git rev-parse --show-toplevel 2>/dev/null)"'
|
||||
21
user/modules/bash/bash/bashrc
Normal file
21
user/modules/bash/bash/bashrc
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Use gpg-agent for SSH (YubiKey support)
|
||||
if command -v gpgconf >/dev/null 2>&1; then
|
||||
export SSH_AUTH_SOCK
|
||||
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
fi
|
||||
|
||||
# Source prompt and aliases
|
||||
BASH_CONFIG_DIR="${BASH_SOURCE%/*}"
|
||||
. "$BASH_CONFIG_DIR/prompt"
|
||||
. "$BASH_CONFIG_DIR/aliases"
|
||||
|
||||
# Vi mode
|
||||
set -o vi
|
||||
|
||||
# Completion
|
||||
bind 'set completion-ignore-case on'
|
||||
bind 'set completion-map-case on'
|
||||
|
||||
if command -v direnv >/dev/null 2>&1; then
|
||||
eval "$(direnv hook bash)"
|
||||
fi
|
||||
179
user/modules/bash/bash/prompt
Normal file
179
user/modules/bash/bash/prompt
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
# Detect graphical environment once at source time
|
||||
if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then
|
||||
_gfx=1
|
||||
_py_sym=$'\ue73c'
|
||||
_js_sym=$'\ue781'
|
||||
_nix_sym=$'\ue843'
|
||||
_proj_sym=$'\ueb45 '
|
||||
_branch_sym=$'\uf418'
|
||||
else
|
||||
_gfx=""
|
||||
_py_sym="py"
|
||||
_js_sym="js"
|
||||
_nix_sym="nix"
|
||||
_proj_sym="../"
|
||||
_branch_sym="git"
|
||||
fi
|
||||
|
||||
# Pre-compute colored icons
|
||||
_python_icon="\[\033[01;33m\]$_py_sym\[\033[00m\]"
|
||||
_node_icon="\[\033[01;93m\]$_js_sym\[\033[00m\]"
|
||||
_nix_icon="\[\033[01;34m\]$_nix_sym\[\033[00m\]"
|
||||
|
||||
# SSH check once at source time
|
||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||
_ssh_PS1="\n\[\033[01;37m\]\u@\h:\[\033[00m\]\n"
|
||||
else
|
||||
_ssh_PS1=""
|
||||
fi
|
||||
|
||||
# Static prompt parts
|
||||
_green_arrow="\[\033[01;32m\]>> "
|
||||
_white_text="\[\033[00m\]"
|
||||
|
||||
# Cache: dir -> "git_root|superproject|" or "-" for non-git
|
||||
declare -A _dir_cache
|
||||
|
||||
# Find git root by walking up (no git spawn)
|
||||
_find_git_root() {
|
||||
local dir="$PWD"
|
||||
while [ -n "$dir" ]; do
|
||||
if [ -e "$dir/.git" ]; then
|
||||
_git_root="$dir"
|
||||
return 0
|
||||
fi
|
||||
dir="${dir%/*}"
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# Find superproject by walking up from git root
|
||||
_find_superproject() {
|
||||
local dir="${_git_root%/*}"
|
||||
_superproject=""
|
||||
while [ -n "$dir" ]; do
|
||||
if [ -e "$dir/.git" ]; then
|
||||
_superproject="$dir"
|
||||
return 0
|
||||
fi
|
||||
dir="${dir%/*}"
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# Read branch from .git/HEAD (no git spawn)
|
||||
_read_branch() {
|
||||
local git_dir="$_git_root/.git"
|
||||
local head_file
|
||||
|
||||
# Submodule: .git is a file with "gitdir: <path>"
|
||||
if [ -f "$git_dir" ]; then
|
||||
read -r _ head_file < "$git_dir"
|
||||
head_file="$head_file/HEAD"
|
||||
else
|
||||
head_file="$git_dir/HEAD"
|
||||
fi
|
||||
|
||||
[ -f "$head_file" ] || return 1
|
||||
|
||||
local head
|
||||
read -r head < "$head_file"
|
||||
|
||||
if [[ "$head" == "ref: refs/heads/"* ]]; then
|
||||
_git_branch="${head#ref: refs/heads/}"
|
||||
else
|
||||
# Detached HEAD - short hash
|
||||
_git_branch="${head:0:7}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Build venv icons (must run every prompt - env can change)
|
||||
_build_venv_icons() {
|
||||
venv_icons=""
|
||||
[ -n "$IN_NIX_SHELL" ] && venv_icons+="$_nix_icon "
|
||||
[ -n "$VIRTUAL_ENV" ] && venv_icons+="$_python_icon "
|
||||
[ -d "$_git_root/node_modules" ] && venv_icons+="$_node_icon "
|
||||
}
|
||||
|
||||
# Main prompt logic
|
||||
_set_prompt() {
|
||||
local cached="${_dir_cache[$PWD]}"
|
||||
|
||||
# Check cache
|
||||
if [ -z "$cached" ]; then
|
||||
if _find_git_root; then
|
||||
_find_superproject
|
||||
_dir_cache[$PWD]="$_git_root|$_superproject|"
|
||||
else
|
||||
_dir_cache[$PWD]="-"
|
||||
cached="-"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Non-git directory
|
||||
if [ "$cached" = "-" ] || [ "${_dir_cache[$PWD]}" = "-" ]; then
|
||||
venv_icons=""
|
||||
[ -n "$IN_NIX_SHELL" ] && venv_icons+="$_nix_icon "
|
||||
[ -n "$VIRTUAL_ENV" ] && venv_icons+="$_python_icon "
|
||||
PS1="$_ssh_PS1\n\[\033[01;34m\]\w\[\033[00m\]\n$venv_icons$_green_arrow$_white_text"
|
||||
return
|
||||
fi
|
||||
|
||||
# Parse cache
|
||||
[ -z "$cached" ] && cached="${_dir_cache[$PWD]}"
|
||||
IFS='|' read -r _git_root _superproject _ <<< "$cached"
|
||||
|
||||
# Get branch (can change without cd) - if fails, git root is gone
|
||||
if ! _read_branch; then
|
||||
unset "_dir_cache[$PWD]"
|
||||
_set_prompt
|
||||
return
|
||||
fi
|
||||
|
||||
# Build paths using bash string ops (no readlink spawn)
|
||||
local git_curr_dir="${PWD#$_git_root}"
|
||||
local git_root_dir="${_git_root##*/}"
|
||||
|
||||
# Build working_dir
|
||||
local working_dir
|
||||
if [ -n "$_superproject" ]; then
|
||||
local super_name="${_superproject##*/}"
|
||||
working_dir="\[\033[01;34m\]$_proj_sym$super_name/$git_root_dir$git_curr_dir\[\033[00m\]"
|
||||
elif [ -z "$git_curr_dir" ]; then
|
||||
working_dir="\[\033[01;34m\]$_proj_sym$git_root_dir\[\033[00m\]"
|
||||
else
|
||||
working_dir="\[\033[01;34m\]$_proj_sym$git_root_dir$git_curr_dir\[\033[00m\]"
|
||||
fi
|
||||
|
||||
# Build branch PS1
|
||||
local git_branch_PS1
|
||||
if [ -n "$_gfx" ]; then
|
||||
git_branch_PS1="\[\033[01;31m\]$_git_branch $_branch_sym:\[\033[00m\]"
|
||||
else
|
||||
git_branch_PS1="\[\033[01;31m\]$_git_branch:\[\033[00m\]"
|
||||
fi
|
||||
|
||||
# Build venv icons
|
||||
_build_venv_icons
|
||||
|
||||
PS1="$_ssh_PS1\n$working_dir\n$venv_icons$_green_arrow$git_branch_PS1$_white_text"
|
||||
}
|
||||
|
||||
# Invalidate cache for current directory
|
||||
_prompt_cache_invalidate() {
|
||||
unset "_dir_cache[$PWD]"
|
||||
}
|
||||
|
||||
# Wrap git to invalidate cache on repo-creating commands
|
||||
git() {
|
||||
command git "$@"
|
||||
local ret=$?
|
||||
[[ "$1" =~ ^(init|clone)$ ]] && _prompt_cache_invalidate
|
||||
return $ret
|
||||
}
|
||||
|
||||
if [ -n "$PROMPT_COMMAND" ]; then
|
||||
PROMPT_COMMAND="_set_prompt;$PROMPT_COMMAND"
|
||||
else
|
||||
PROMPT_COMMAND="_set_prompt"
|
||||
fi
|
||||
32
user/modules/bash/default.nix
Normal file
32
user/modules/bash/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.bash;
|
||||
|
||||
in
|
||||
{ options.modules.user.bash = { enable = mkEnableOption "user.bash"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
initExtra = "source ~/.config/bash/bashrc";
|
||||
};
|
||||
|
||||
home.file.".config/bash" = {
|
||||
source = ./bash;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
ripgrep.enable = true;
|
||||
eza = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = false;
|
||||
enableZshIntegration = false;
|
||||
enableNushellIntegration = false;
|
||||
enableIonIntegration = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
34
user/modules/default.nix
Normal file
34
user/modules/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
let
|
||||
mkModules = dir: isRoot:
|
||||
let
|
||||
entries = builtins.readDir dir;
|
||||
names = builtins.attrNames entries;
|
||||
|
||||
excludedDirs = [ "config" "scripts" ];
|
||||
isSubmodule = path:
|
||||
builtins.pathExists "${path}/.git" &&
|
||||
builtins.readFileType "${path}/.git" == "regular";
|
||||
isModuleDir = path:
|
||||
builtins.pathExists path &&
|
||||
builtins.readFileType path == "directory" &&
|
||||
!(builtins.elem (builtins.baseNameOf path) excludedDirs) &&
|
||||
!(isSubmodule path);
|
||||
isModule = file: file == "default.nix";
|
||||
|
||||
in
|
||||
builtins.concatMap (name:
|
||||
let
|
||||
path = "${dir}/${name}";
|
||||
in
|
||||
if isModuleDir path then
|
||||
mkModules path false
|
||||
else if isModule name && !isRoot then
|
||||
[ dir ]
|
||||
else
|
||||
[]
|
||||
) names;
|
||||
|
||||
in
|
||||
{
|
||||
imports = mkModules ./. true;
|
||||
}
|
||||
32
user/modules/git/default.nix
Normal file
32
user/modules/git/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.git;
|
||||
|
||||
in
|
||||
{ options.modules.user.git = { enable = mkEnableOption "user.git"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
};
|
||||
gh = {
|
||||
enable = true;
|
||||
settings.git_protocol = "ssh";
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
git-crypt
|
||||
];
|
||||
file.".config/git" = {
|
||||
source = ./git;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.bash.initExtra = import ./scripts/cdg.nix;
|
||||
};
|
||||
}
|
||||
9
user/modules/git/git/README.md
Normal file
9
user/modules/git/git/README.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Git Config
|
||||
|
||||
My global git configuration.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
git clone git@github.com:itme-brain/git.git ~/.config/git
|
||||
```
|
||||
28
user/modules/git/git/config
Normal file
28
user/modules/git/git/config
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
[init]
|
||||
defaultBranch = master
|
||||
|
||||
# Use vimdiff for diffs and merge conflicts
|
||||
[diff]
|
||||
tool = vimdiff
|
||||
|
||||
[merge]
|
||||
tool = vimdiff
|
||||
|
||||
[mergetool]
|
||||
keepBackup = false
|
||||
|
||||
[mergetool "vimdiff"]
|
||||
trustExitCode = true
|
||||
|
||||
[user]
|
||||
name = Bryan Ramos
|
||||
email = bryan@ramos.codes
|
||||
signingKey = F1F3466458452B2DF351F1E864D12BA95ACE1F2D
|
||||
|
||||
# Auto-set upstream on first push
|
||||
[push]
|
||||
autoSetupRemote = true
|
||||
|
||||
# Enable per-project with: git config --local commit.gpgSign true
|
||||
[commit]
|
||||
gpgSign = false
|
||||
14
user/modules/git/git/ignore
Normal file
14
user/modules/git/git/ignore
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# JavaScript / Node
|
||||
node_modules
|
||||
|
||||
# Nix
|
||||
.direnv
|
||||
result
|
||||
|
||||
# Haskell
|
||||
dist-newstyle
|
||||
|
||||
# Nuxt
|
||||
.nuxt/
|
||||
.output/
|
||||
dist
|
||||
24
user/modules/git/scripts/cdg.nix
Normal file
24
user/modules/git/scripts/cdg.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
''
|
||||
function cdg() {
|
||||
if [[ $1 == "--help" ]]; then
|
||||
echo "A simple utility for navigating to the root of a git repo"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -n "$1" ]]; then
|
||||
echo "Invalid command: $1. Try 'cdg --help'."
|
||||
return 1
|
||||
fi
|
||||
|
||||
local root_dir
|
||||
root_dir=$(git rev-parse --show-toplevel 2>/dev/null)
|
||||
local git_status=$?
|
||||
|
||||
if [ $git_status -ne 0 ]; then
|
||||
echo "Error: Not a git repo."
|
||||
return 1
|
||||
fi
|
||||
|
||||
cd "$root_dir"
|
||||
}
|
||||
''
|
||||
83
user/modules/gui/alacritty/config/alacritty.nix
Normal file
83
user/modules/gui/alacritty/config/alacritty.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{ config, ... }:
|
||||
|
||||
let
|
||||
hyprland = config.modules.user.gui.wm.hyprland;
|
||||
|
||||
in
|
||||
{
|
||||
scrolling = {
|
||||
history = 10000;
|
||||
multiplier = 3;
|
||||
};
|
||||
|
||||
window = {
|
||||
opacity = if hyprland.enable then 0.9 else 1;
|
||||
};
|
||||
|
||||
keyboard.bindings = [
|
||||
{
|
||||
key = "Enter";
|
||||
mods = "Alt | Shift";
|
||||
action = "SpawnNewInstance";
|
||||
}
|
||||
];
|
||||
|
||||
colors = {
|
||||
primary = {
|
||||
background = "#000000";
|
||||
foreground = "#cdd6f4";
|
||||
};
|
||||
|
||||
normal = {
|
||||
black = "#1e2127";
|
||||
red = "#e06c75";
|
||||
green = "#98c379";
|
||||
yellow = "#d19a66";
|
||||
blue = "#61afef";
|
||||
magenta = "#c678dd";
|
||||
cyan = "#56b6c2";
|
||||
white = "#abb2bf";
|
||||
};
|
||||
|
||||
bright = {
|
||||
black = "#5c6370";
|
||||
red = "#e06c75";
|
||||
green = "#98c379";
|
||||
yellow = "#d19a66";
|
||||
blue = "#61afef";
|
||||
magenta = "#c678dd";
|
||||
cyan = "#56b6c2";
|
||||
white = "#ffffff";
|
||||
};
|
||||
};
|
||||
|
||||
font = {
|
||||
size = 12;
|
||||
normal = {
|
||||
family = "Terminess Nerd Font Propo";
|
||||
style = "Regular";
|
||||
};
|
||||
|
||||
bold = {
|
||||
family = "Terminess Nerd Font Propo";
|
||||
style = "Bold";
|
||||
};
|
||||
|
||||
italic = {
|
||||
family = "Terminess Nerd Font Propo";
|
||||
style = "Italic";
|
||||
};
|
||||
|
||||
bold_italic = {
|
||||
family = "Terminess Nerd Font Propo";
|
||||
style = "Bold Italic";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#cursor = {
|
||||
# shape = "Block";
|
||||
# blinking = "Always";
|
||||
# blink_interval = 750;
|
||||
#};
|
||||
}
|
||||
15
user/modules/gui/alacritty/default.nix
Normal file
15
user/modules/gui/alacritty/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.alacritty;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.alacritty = { enable = mkEnableOption "Enable Alacritty terminal"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = import ./config/alacritty.nix { inherit config; };
|
||||
};
|
||||
};
|
||||
}
|
||||
53
user/modules/gui/browsers/chromium/default.nix
Normal file
53
user/modules/gui/browsers/chromium/default.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.browser.chromium;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.browser.chromium = { enable = mkEnableOption "Enable Chromium browser"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs = {
|
||||
chromium = rec {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
extensions =
|
||||
let
|
||||
vrs = package.version;
|
||||
in
|
||||
[
|
||||
rec {
|
||||
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
|
||||
crxPath = builtins.fetchurl {
|
||||
url = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=${vrs}&acceptformat=crx2,crx3&x=id%3D${id}%26uc";
|
||||
name = "ublock_${version}.crx";
|
||||
sha256 = "0ycnkna72n969crgxfy2lc1qbndjqrj46b9gr5l9b7pgfxi5q0ll";
|
||||
};
|
||||
version = "1.62.0";
|
||||
}
|
||||
rec {
|
||||
id = "dbepggeogbaibhgnhhndojpepiihcmeb";
|
||||
crxPath = builtins.fetchurl {
|
||||
url = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=${vrs}&acceptformat=crx2,crx3&x=id%3D${id}%26uc";
|
||||
name = "vimium_${version}.crx";
|
||||
sha256 = "0m8xski05w2r8igj675sxrlkzxlrl59j3a7m0r6c8pwcvka0r88d";
|
||||
};
|
||||
version = "2.1.2";
|
||||
}
|
||||
rec {
|
||||
id = "naepdomgkenhinolocfifgehidddafch";
|
||||
crxPath = builtins.fetchurl {
|
||||
url = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=${vrs}&acceptformat=crx2,crx3&x=id%3D${id}%26uc";
|
||||
name = "browserpass_${version}.crx";
|
||||
sha256 = "074sc9hxh7vh5j79yjhsrnhb5k4dv3bh5vip0jr30hkkni7nygbd";
|
||||
};
|
||||
version = "3.9.0";
|
||||
}
|
||||
];
|
||||
};
|
||||
browserpass = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
338
user/modules/gui/browsers/firefox/default.nix
Normal file
338
user/modules/gui/browsers/firefox/default.nix
Normal file
|
|
@ -0,0 +1,338 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.browser.firefox;
|
||||
passffHost= {
|
||||
home.packages = with pkgs; [
|
||||
passff-host
|
||||
];
|
||||
home.file = {
|
||||
".mozilla/native-messaging-hosts/passff.json" = {
|
||||
text = ''
|
||||
{
|
||||
"name": "passff",
|
||||
"description": "Host for communicating with zx2c4 pass",
|
||||
"path": "${pkgs.passff-host}/share/passff-host/passff.py",
|
||||
"type": "stdio",
|
||||
"allowed_extensions": [ "passff@invicem.pro" ]
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
assertions =
|
||||
let
|
||||
pinentry = config.services.gpg-agent.pinentry.package;
|
||||
in
|
||||
[
|
||||
{
|
||||
assertion = pinentry != pkgs.pinentry-curses || pinentry != pkgs.pinentry-tty;
|
||||
message = "Firefox plugin passff requires graphical pinentry";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
options.modules.user.gui.browser.firefox = { enable = mkEnableOption "Enable Firefox browser"; };
|
||||
config = mkIf cfg.enable (passffHost // {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
"${config.user.name}" = {
|
||||
isDefault = true;
|
||||
#bookmarks = config.user.bookmarks;
|
||||
|
||||
extensions = {
|
||||
packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
tridactyl
|
||||
#darkreader
|
||||
tampermonkey
|
||||
clearurls
|
||||
passff
|
||||
multi-account-containers
|
||||
];
|
||||
};
|
||||
|
||||
search = {
|
||||
force = true;
|
||||
default = "google";
|
||||
engines = {
|
||||
"Startpage" = {
|
||||
urls = [{
|
||||
template = "https://www.startpage.com/sp/search?q={searchTerms}";
|
||||
}];
|
||||
icon = "https://www.startpage.com/sp/cdn/favicons/favicon--default.ico";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
containersForce = true;
|
||||
containers = {
|
||||
Banking = {
|
||||
color = "green";
|
||||
icon = "dollar";
|
||||
id = 1;
|
||||
};
|
||||
Personal = {
|
||||
color = "orange";
|
||||
icon = "fingerprint";
|
||||
id = 2;
|
||||
};
|
||||
Work = {
|
||||
color = "yellow";
|
||||
icon = "briefcase";
|
||||
id = 3;
|
||||
};
|
||||
Personal_Work = {
|
||||
color = "turquoise";
|
||||
icon = "briefcase";
|
||||
id = 4;
|
||||
};
|
||||
Social = {
|
||||
color = "red";
|
||||
icon = "chill";
|
||||
id = 5;
|
||||
};
|
||||
Shopping = {
|
||||
color = "purple";
|
||||
icon = "cart";
|
||||
id = 6;
|
||||
};
|
||||
Google = {
|
||||
color = "pink";
|
||||
icon = "vacation";
|
||||
id = 7;
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
"layout.spellcheckDefault" = 0;
|
||||
"ui.key.menuAccessKeyFocuses" = false;
|
||||
"signon.rememberSignons" = false;
|
||||
"extensions.pocket.enabled" = false;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
|
||||
# May break extensions due to Nix
|
||||
"extensions.enabledScopes" = 5;
|
||||
|
||||
# May break stuff but increases privacy
|
||||
#"extensions.webextensions.restrictedDomains" = "";
|
||||
#"privacy.resistFingerprinting" = true;
|
||||
#"privacy.resistFingerprinting.letterboxing" = true;
|
||||
#"privacy.resistFingerprinting.block_mozAddonManager" = true;
|
||||
|
||||
"browser.startup.homepage_override.mstone" = "ignore";
|
||||
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"browser.startup.page" = 0;
|
||||
"browser.formfill.enable" = false;
|
||||
"places.history.enabled" = false;
|
||||
|
||||
"browser.urlbar.suggest.history" = false;
|
||||
"browser.urlbar.suggest.topsites" = false;
|
||||
"browser.urlbar.sponsoredTopSites" = false;
|
||||
"browser.urlbar.autoFill" = false;
|
||||
"browser.urlbar.suggest.pocket" = false;
|
||||
"browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
|
||||
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
|
||||
"browser.toolbars.bookmarks.showOtherBookmarks" = false;
|
||||
"browser.aboutwelcome.showModal" = false;
|
||||
"browser.migrate.content-modal.about-welcome-behavior" = "";
|
||||
|
||||
"browser.newtabpage.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
"browser.newtabpage.activity-stream.default.sites" = "";
|
||||
|
||||
"extensions.getAddons.showPane" = false;
|
||||
"extensions.htmlaboutaddons.recommendations.enabled" = false;
|
||||
"browser.discovery.enabled" = false;
|
||||
"browser.shopping.experience2023.enabled" = false;
|
||||
|
||||
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||
"datareporting.healthreport.uploadEnabled" = false;
|
||||
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.server" = "";
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||
"toolkit.telemetry.updatePing.enabled" = false;
|
||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||
"toolkit.telemetry.coverage.opt-out" = false;
|
||||
"toolkit.coverage.endpoint.base" = "";
|
||||
|
||||
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
"app.normandy.enabled" = false;
|
||||
"app.normandy.api_url" = "";
|
||||
|
||||
"breakpad.reportURL" = false;
|
||||
"browser.tabs.crashReporting.sendReport" = false;
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
|
||||
|
||||
"captivedetect.canonicalURL" = "";
|
||||
"network.captive-portal-service.enabled" = false;
|
||||
"network.connectivity-service.enabled" = false;
|
||||
|
||||
"browser.safebrowsing.downloads.remote.enabled" = false;
|
||||
|
||||
"network.prefetch-next" = false;
|
||||
"network.dns.disablePrefetch" = true;
|
||||
"network.predictor.enabled" = false;
|
||||
"network.predictor.enable-prefetch" = false;
|
||||
"network.http.speculative-parallel-limit" = 0;
|
||||
"network.http.speculativeConnect.enabled" = false;
|
||||
|
||||
"network.proxy.sock_remote_dns" = true;
|
||||
"network.file.disable_unc_paths" = true;
|
||||
"network.gio.supported-protocols" = "";
|
||||
|
||||
"browser.urlbar.speculativeConnect.enabled" = false;
|
||||
"browser.search.suggest.enabled" = false;
|
||||
"browser.urlbar.suggest.searches" = false;
|
||||
|
||||
"browser.urlbar.clipboard.featureGate" = false;
|
||||
"browser.urlbar.richSuggestions.featureGate" = false;
|
||||
"browser.urlbar.trending.featureGate" = false;
|
||||
"browser.urlbar.addons.featureGate" = false;
|
||||
"browser.urlbar.pocket.featureGate" = false;
|
||||
"browser.urlbar.weather.featureGate" = false;
|
||||
"browser.urlbar.yelp.featureGate" = false;
|
||||
"browser.urlbar.suggest.engines" = false;
|
||||
|
||||
"signon.autofillForms" = false;
|
||||
"signon.formlessCapture.enabled" = false;
|
||||
|
||||
"network.auth.subresource-http-auth-allow" = 1;
|
||||
|
||||
"browser.privatebrowsing.forceMediaMemoryCache" = true;
|
||||
"media.memory_cache_max_size" = 65536;
|
||||
"browser.sessionstore.privacy_level" = 2;
|
||||
"browser.shell.shortcutFavicons" = false;
|
||||
|
||||
"security.ssl.require_safe_negotiation" = true;
|
||||
"security.tls.enable_0rtt_data" = false;
|
||||
"security.OCSP.enabled" = true;
|
||||
"security.OCSP.require" = true;
|
||||
|
||||
"security.cert_pinning.enforcement_level" = 2;
|
||||
"security.remote_settings.crlite_filters.enabled" = true;
|
||||
"security.pki.crlite_mode" = 2;
|
||||
|
||||
"dom.security.https_only_mode" = true;
|
||||
"dom.security.https_only_mode_send_http_background_request" = false;
|
||||
|
||||
"security.ssl.treat_unsafe_negotiation_as_broken" = true;
|
||||
"browser.xul.error_pages.expert_bad_cert" = true;
|
||||
|
||||
"network.http.referer.XOriginTrimmingPolicy" = 2;
|
||||
|
||||
"privacy.userContext.enabled" = true;
|
||||
"privacy.userContext.ui.enabled" = true;
|
||||
|
||||
"media.peerconnection.ice.proxy_only_if_behind_proxy" = true;
|
||||
"media.peerconnection.ice.default_address_only" = true;
|
||||
|
||||
"dom.disable_window_move_resize" = true;
|
||||
|
||||
"browser.download.start_downloads_in_tmp_dir" = false;
|
||||
"browser.helperApps.deleteTempFileOnExit" = true;
|
||||
"browser.uitour.enabled" = false;
|
||||
|
||||
"devtools.debugger.remote-enabled" = false;
|
||||
"permissions.manager.defaultsUrl" = "";
|
||||
"webchannel.allowObject.urlWhitelist" = "";
|
||||
"network.IDN_show_punycode" = true;
|
||||
|
||||
"pdfjs.disabled" = false;
|
||||
"pdfjs.enableScripting" = false;
|
||||
|
||||
"browser.tabs.searchclipboardfor.middleclick" = false;
|
||||
"browser.contentanalysis.default_allow" = false;
|
||||
|
||||
"browser.download.useDownloadDir" = true;
|
||||
"browser.download.alwaysOpenPanel" = true;
|
||||
"browser.download.manager.addToRecentDocs" = false;
|
||||
"browser.download.always_ask_before_handling_new_types" = true;
|
||||
"extensions.postDownloadThirdPartyPrompt" = true;
|
||||
|
||||
"browser.contentblocking.category" = "strict";
|
||||
|
||||
"privacy.sanitize.sanitizeOnShutdown" = true;
|
||||
"privacy.clearOnShutdown.cache" = true;
|
||||
"privacy.clearOnShutdown_v2.cache" = true;
|
||||
"privacy.clearOnShutdown.downloads" = true;
|
||||
"privacy.clearOnShutdown.formdata" = true;
|
||||
"privacy.clearOnShutdown.history" = true;
|
||||
"privacy.clearOnShutdown_v2.historyFormDataAndDownloads" = true;
|
||||
|
||||
"privacy.clearOnShutdown.cookies" = false;
|
||||
"privacy.clearOnShutdown.offlineApss" = true;
|
||||
"privacy.clearOnShutdown.sessions" = true;
|
||||
"privacy.clearOnShutdown_v2.cookiesAndStorage" = false;
|
||||
|
||||
"privacy.clearSiteData.cache" = true;
|
||||
"privacy.clearSiteData.cookiesAndStorage" = false;
|
||||
"privacy.clearSiteData.historyFormDataAndDownloads" = true;
|
||||
|
||||
"privacy.cpd.cache" = true;
|
||||
"privacy.clearHistory.cache" = true;
|
||||
"privacy.cpd.formdata" = true;
|
||||
"privacy.cpd.history" = true;
|
||||
"privacy.clearHistory.historyFormDataAndDownloads" = true;
|
||||
"privacy.cpd.cookies" = false;
|
||||
"privacy.cpd.sessions" = true;
|
||||
"privacy.cpd.offlineApps" = false;
|
||||
"privacy.clearHistory.cookiesAndStorage" = false;
|
||||
|
||||
"privacy.sanitize.timeSpan" = 0;
|
||||
|
||||
"privacy.window.maxInnerWidth" = 1600;
|
||||
"privacy.window.maxInnerHeight" = 900;
|
||||
|
||||
"privacy.spoof_english" = 1;
|
||||
|
||||
"browser.display.use_system_colors" = false;
|
||||
"widget.non-native-theme.enabled" = true;
|
||||
|
||||
"browser.link.open_newwindow" = 3;
|
||||
"browser.link.open_newwindow.restriction" = 0;
|
||||
"browser.chrome.site_icons" = false;
|
||||
"browser.download.forbid_open_with" = true;
|
||||
|
||||
"extensions.blocklist.enabled" = true;
|
||||
"network.http.referer.spoofSource" = false;
|
||||
"security.dialog_enable_delay" = 1000;
|
||||
"privacy.firstparty.isolate" = false;
|
||||
"extensions.webcompat.enable_shims" = true;
|
||||
"security.tls.version.enable-deprecated" = false;
|
||||
"extensions.webcompat-reporter.enabled" = false;
|
||||
"extensions.quarantinedDomains.enabled" = true;
|
||||
|
||||
"media.videocontrols.picture-in-picture.enabled" = false;
|
||||
|
||||
# VA-API hardware video acceleration (NVIDIA)
|
||||
"media.ffmpeg.vaapi.enabled" = true;
|
||||
"media.rdd-ffmpeg.enabled" = true;
|
||||
"media.av1.enabled" = false; # GTX 1650 doesn't support AV1 decode
|
||||
"gfx.x11-egl.force-enabled" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
policies = {
|
||||
WebsiteFilter = {
|
||||
Block = [
|
||||
"*://*.pokemonshowdown.com/*"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
36
user/modules/gui/corn/default.nix
Normal file
36
user/modules/gui/corn/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.corn;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.corn = { enable = mkEnableOption "Enable Bitcoin client applications"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
#trezor-suite
|
||||
#trezorctl
|
||||
#trezord
|
||||
|
||||
sparrow
|
||||
];
|
||||
|
||||
#systemd.user.services = {
|
||||
# trezord = {
|
||||
# Unit = {
|
||||
# Description = "Trezor Bridge";
|
||||
# After = [ "network.target" ];
|
||||
# Wants = [ "network.target" ];
|
||||
# PartOf = [ "graphical-session.target" ];
|
||||
# };
|
||||
# Service = {
|
||||
# ExecStart = "${pkgs.trezord}/bin/trezord-go";
|
||||
# Restart = "always";
|
||||
# };
|
||||
# Install = {
|
||||
# WantedBy = [ "default.target" ];
|
||||
# };
|
||||
# };
|
||||
#};
|
||||
};
|
||||
}
|
||||
30
user/modules/gui/default.nix
Normal file
30
user/modules/gui/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
programs = config.programs;
|
||||
|
||||
defaultBrowser =
|
||||
if programs.firefox.enable then "firefox.desktop"
|
||||
else if programs.brave.enable then "brave-browser.desktop"
|
||||
else if programs.chromium.enable then "chromium.desktop"
|
||||
else null;
|
||||
|
||||
types = [
|
||||
"text/html" "application/xhtml+xml"
|
||||
"x-scheme-handler/http" "x-scheme-handler/https"
|
||||
"application/pdf"
|
||||
"image/png" "image/jpeg" "image/jpg" "image/gif"
|
||||
"image/webp" "image/avif" "image/bmp" "image/tiff" "image/svg+xml"
|
||||
"video/mp4" "video/webm" "video/mkv" "video/avi"
|
||||
"video/x-matroska" "video/quicktime"
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
xdg.mimeApps = lib.mkIf (defaultBrowser != null) {
|
||||
enable = true;
|
||||
defaultApplications = builtins.listToAttrs (
|
||||
map (t: { name = t; value = [ defaultBrowser ]; }) types
|
||||
);
|
||||
};
|
||||
}
|
||||
14
user/modules/gui/dev/design/default.nix
Normal file
14
user/modules/gui/dev/design/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.dev.design;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.dev.design = { enable = mkEnableOption "Enable design tools"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
penpot-desktop
|
||||
];
|
||||
};
|
||||
}
|
||||
16
user/modules/gui/dev/pcb/default.nix
Normal file
16
user/modules/gui/dev/pcb/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.dev.pcb;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.dev.pcb = { enable = mkEnableOption "Enable PCB development suite"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
arduino-ide
|
||||
kicad-small
|
||||
ngspice
|
||||
];
|
||||
};
|
||||
}
|
||||
82
user/modules/gui/fun/config/discord.config.json
Normal file
82
user/modules/gui/fun/config/discord.config.json
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"settings": {
|
||||
"general": {
|
||||
"menuBar": {
|
||||
"hide": false
|
||||
},
|
||||
"tray": {
|
||||
"disable": false
|
||||
},
|
||||
"taskbar": {
|
||||
"flash": true
|
||||
},
|
||||
"window": {
|
||||
"transparent": false,
|
||||
"hideOnClose": false
|
||||
}
|
||||
},
|
||||
"privacy": {
|
||||
"blockApi": {
|
||||
"science": true,
|
||||
"typingIndicator": false,
|
||||
"fingerprinting": true
|
||||
},
|
||||
"permissions": {
|
||||
"video": null,
|
||||
"audio": true,
|
||||
"fullscreen": true,
|
||||
"notifications": null,
|
||||
"display-capture": true,
|
||||
"background-sync": false
|
||||
}
|
||||
},
|
||||
"advanced": {
|
||||
"csp": {
|
||||
"enabled": true
|
||||
},
|
||||
"cspThirdParty": {
|
||||
"spotify": true,
|
||||
"gif": true,
|
||||
"hcaptcha": true,
|
||||
"youtube": true,
|
||||
"twitter": true,
|
||||
"twitch": true,
|
||||
"streamable": true,
|
||||
"vimeo": true,
|
||||
"soundcloud": true,
|
||||
"paypal": true,
|
||||
"audius": true,
|
||||
"algolia": true,
|
||||
"reddit": true,
|
||||
"googleStorageApi": true
|
||||
},
|
||||
"currentInstance": {
|
||||
"radio": 0
|
||||
},
|
||||
"devel": {
|
||||
"enabled": true
|
||||
},
|
||||
"redirection": {
|
||||
"warn": true
|
||||
},
|
||||
"optimize": {
|
||||
"gpu": true
|
||||
},
|
||||
"webApi": {
|
||||
"webGl": true
|
||||
},
|
||||
"unix": {
|
||||
"autoscroll": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"update": {
|
||||
"notification": {
|
||||
"version": "",
|
||||
"till": ""
|
||||
}
|
||||
},
|
||||
"screenShareStore": {
|
||||
"audio": false
|
||||
}
|
||||
}
|
||||
26
user/modules/gui/fun/default.nix
Normal file
26
user/modules/gui/fun/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.fun;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.fun = { enable = mkEnableOption "Enable entertainment apps"; };
|
||||
config = mkIf cfg.enable {
|
||||
#programs.obs-studio = {
|
||||
# enable = true;
|
||||
# plugins = with pkgs.obs-studio-plugins; [
|
||||
# wlrobs
|
||||
# obs-pipewire-audio-capture
|
||||
# input-overlay
|
||||
# ];
|
||||
#};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
ytmdesktop
|
||||
#discordo
|
||||
#webcord
|
||||
discord
|
||||
];
|
||||
};
|
||||
}
|
||||
16
user/modules/gui/utils/default.nix
Normal file
16
user/modules/gui/utils/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.utils;
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.utils = { enable = mkEnableOption "Enable desktop utils"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.btop.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
gimp
|
||||
libreoffice
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
configuration {
|
||||
font: "SF Pro Rounded 10";
|
||||
show-icons: true;
|
||||
kb-cancel: "Escape,Alt+F1";
|
||||
}
|
||||
|
||||
@theme "~/.config/rofi/material-ocean.rasi"
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
* {
|
||||
background: #0f111a;
|
||||
foreground: #f1f1f1;
|
||||
selected: #ff4151;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 4px 4px 6px 6px;
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
background-color: @background;
|
||||
padding: 4px 0px 0px 6px;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, entry ];
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
expand: false;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @selected;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 4px 0px;
|
||||
position: center;
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
placeholder-color: @foreground;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
blink: true;
|
||||
padding: 4px 0px 0px 4px;
|
||||
}
|
||||
|
||||
case-indicator {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
spacing: 0;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @background;
|
||||
columns: 1;
|
||||
spacing: 5px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 5px;
|
||||
padding: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
border-radius: 4px;
|
||||
padding: 6px 6px 6px 6px;
|
||||
}
|
||||
|
||||
element-text, element-icon {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 18px;
|
||||
border: 4px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @selected;
|
||||
text-color: @background;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @selected;
|
||||
}
|
||||
183
user/modules/gui/wm/hyprland/config/rofi/default.nix
Normal file
183
user/modules/gui/wm/hyprland/config/rofi/default.nix
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
location = "center";
|
||||
terminal = "\${pkgs.alacritty}/bin/alacritty";
|
||||
plugins = with pkgs; [
|
||||
rofi-emoji
|
||||
];
|
||||
|
||||
#theme = {
|
||||
# "*" = {
|
||||
# nord0 = mkLiteral "#2e3440";
|
||||
# nord1 = mkLiteral "#3b4252";
|
||||
# nord2 = mkLiteral "#434c5e";
|
||||
# nord3 = mkLiteral "#4c566a";
|
||||
# nord4 = mkLiteral "#d8dee9";
|
||||
# nord5 = mkLiteral "#e5e9f0";
|
||||
# nord6 = mkLiteral "#eceff4";
|
||||
# nord7 = mkLiteral "#8fbcbb";
|
||||
# nord8 = mkLiteral "#88c0d0";
|
||||
# nord9 = mkLiteral "#81a1c1";
|
||||
# nord10 = mkLiteral "#5e81ac";
|
||||
# nord11 = mkLiteral "#bf616a";
|
||||
# nord12 = mkLiteral "#d08770";
|
||||
# nord13 = mkLiteral "#ebcb8b";
|
||||
# nord14 = mkLiteral "#a3be8c";
|
||||
# nord15 = mkLiteral "#b48ead";
|
||||
# spacing = 2;
|
||||
# background-color = mkLiteral "var(nord1)";
|
||||
# background = mkLiteral "var(nord1)";
|
||||
# foreground = mkLiteral "var(nord4)";
|
||||
# normal-background = mkLiteral "var(background)";
|
||||
# normal-foreground = mkLiteral "var(foreground)";
|
||||
# alternate-normal-background = mkLiteral "var(background)";
|
||||
# alternate-normal-foreground = mkLiteral "var(foreground)";
|
||||
# selected-normal-background = mkLiteral "var(nord8)";
|
||||
# selected-normal-foreground = mkLiteral "var(background)";
|
||||
# active-background = mkLiteral "var(background)";
|
||||
# active-foreground = mkLiteral "var(nord10)";
|
||||
# alternate-active-background = mkLiteral "var(background)";
|
||||
# alternate-active-foreground = mkLiteral "var(nord10)";
|
||||
# selected-active-background = mkLiteral "var(nord10)";
|
||||
# selected-active-foreground = mkLiteral "var(background)";
|
||||
# urgent-background = mkLiteral "var(background)";
|
||||
# urgent-foreground = mkLiteral "var(nord11)";
|
||||
# alternate-urgent-background = mkLiteral "var(background)";
|
||||
# alternate-urgent-foreground = mkLiteral "var(nord11)";
|
||||
# selected-urgent-background = mkLiteral "var(nord11)";
|
||||
# selected-urgent-foreground = mkLiteral "var(background)";
|
||||
# };
|
||||
#
|
||||
# element = {
|
||||
# padding = mkLiteral "0px 0px 0px 7px";
|
||||
# spacing = mkLiteral "5px";
|
||||
# border = 0;
|
||||
# cursor = mkLiteral "pointer";
|
||||
# };
|
||||
|
||||
# "element normal.normal" = {
|
||||
# background-color = mkLiteral "var(normal-background)";
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element normal.urgent" = {
|
||||
# background-color = mkLiteral "var(urgent-background)";
|
||||
# text-color = mkLiteral "var(urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element normal.active" = {
|
||||
# background-color = mkLiteral "var(active-background)";
|
||||
# text-color = mkLiteral "var(active-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.normal" = {
|
||||
# background-color = mkLiteral "var(selected-normal-background)";
|
||||
# text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.urgent" = {
|
||||
# background-color = mkLiteral "var(selected-urgent-background)";
|
||||
# text-color = mkLiteral "var(selected-urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.active" = {
|
||||
# background-color = mkLiteral "var(selected-active-background)";
|
||||
# text-color = mkLiteral "var(selected-active-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.normal" = {
|
||||
# background-color = mkLiteral "var(alternate-normal-background)";
|
||||
# text-color = mkLiteral "var(alternate-normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.urgent" = {
|
||||
# background-color = mkLiteral "var(alternate-urgent-background)";
|
||||
# text-color = mkLiteral "var(alternate-urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.active" = {
|
||||
# background-color = mkLiteral "var(alternate-active-background)";
|
||||
# text-color = mkLiteral "var(alternate-active-foreground)";
|
||||
# };
|
||||
|
||||
# "element-text" = {
|
||||
# background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
# text-color = mkLiteral "inherit";
|
||||
# highlight = mkLiteral "inherit";
|
||||
# cursor = mkLiteral "inherit";
|
||||
# };
|
||||
|
||||
# "element-icon" = {
|
||||
# background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
# size = mkLiteral "1.0000em";
|
||||
# text-color = mkLiteral "inherit";
|
||||
# cursor = mkLiteral "inherit";
|
||||
# };
|
||||
|
||||
# window = {
|
||||
# padding = 0;
|
||||
# border = 0;
|
||||
# background-color = mkLiteral "var(background)";
|
||||
# };
|
||||
|
||||
# mainbox = {
|
||||
# padding = 0;
|
||||
# border = 0;
|
||||
# };
|
||||
|
||||
# message = {
|
||||
# margin = mkLiteral "0px 7px";
|
||||
# };
|
||||
|
||||
# textbox = {
|
||||
# text-color = mkLiteral "var(foreground)";
|
||||
# };
|
||||
|
||||
# listview = {
|
||||
# margin = mkLiteral "0px 0px 5px";
|
||||
# scrollbar = true;
|
||||
# spacing = mkLiteral "2px";
|
||||
# fixed-height = 0;
|
||||
# };
|
||||
|
||||
# scrollbar = {
|
||||
# padding = 0;
|
||||
# handle-width = mkLiteral "14px";
|
||||
# border = 0;
|
||||
# handle-color = mkLiteral "var(nord3)";
|
||||
# };
|
||||
|
||||
# button = {
|
||||
# spacing = 0;
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# cursor = mkLiteral "pointer";
|
||||
# };
|
||||
|
||||
# "button selected" = {
|
||||
# background-color = mkLiteral "var(selected-normal-background)";
|
||||
# text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
# };
|
||||
|
||||
# inputbar = {
|
||||
# padding = mkLiteral "7px";
|
||||
# margin = mkLiteral "7px";
|
||||
# spacing = 0;
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# background-color = mkLiteral "var(nord3)";
|
||||
# children = [ "entry" ];
|
||||
# };
|
||||
|
||||
# entry = {
|
||||
# spacing = 0;
|
||||
# cursor = mkLiteral "text";
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# background-color = mkLiteral "var(nord3)";
|
||||
# };
|
||||
#};
|
||||
}
|
||||
126
user/modules/gui/wm/hyprland/config/waybar/config
Normal file
126
user/modules/gui/wm/hyprland/config/waybar/config
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"output": "HDMI-A-1",
|
||||
"modules-left": [ "custom/logo", "clock", "custom/blockheight", "custom/price", "memory", "cpu" ],
|
||||
"modules-center": [ "hyprland/workspaces" ],
|
||||
"modules-right": [ "tray", "pulseaudio", "network" ],
|
||||
"reload_style_on_change":true,
|
||||
|
||||
"custom/logo": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "alacritty --class sys-specs -e bash -c 'fastfetch; read -n 1'"
|
||||
},
|
||||
|
||||
"hyprland/workspaces": {
|
||||
"format": "<span color='#ffffff'>{icon}</span>",
|
||||
"format-icons": {
|
||||
"1": "",
|
||||
"2": "",
|
||||
"3": "",
|
||||
"4": "",
|
||||
"5": "",
|
||||
"6": "",
|
||||
"active": "",
|
||||
"default": ""
|
||||
},
|
||||
"persistent-workspaces": {
|
||||
"*": [ 2, 3, 4, 5, 6 ]
|
||||
}
|
||||
},
|
||||
|
||||
"custom/weather": {
|
||||
"format": "<span color='#ffffff'>{}</span>",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/weather.sh",
|
||||
"interval": 10,
|
||||
},
|
||||
|
||||
"custom/blockheight": {
|
||||
"format": "<span color='#ef8e19'> </span><span color='#ffffff'>{} </span>",
|
||||
"interval": 30,
|
||||
"exec": "~/.config/waybar/scripts/getBlock",
|
||||
"on-click": "xdg-open https://www.mempool.space",
|
||||
},
|
||||
|
||||
"custom/price": {
|
||||
"format": "<span color='#00ff00'>$</span><span color='#ffffff'>{}</span>",
|
||||
"interval": 10,
|
||||
"exec": "~/.config/waybar/scripts/getPrice",
|
||||
"on-click": "xdg-open https://www.coinbase.com/price/bitcoin",
|
||||
},
|
||||
|
||||
"clock": {
|
||||
"format": "{:%I:%M:%S %p}",
|
||||
"interval":1,
|
||||
"tooltip-format": "\n<big>{:%d %A}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"calendar-weeks-pos": "right",
|
||||
"today-format": "<span color='#7645AD'><b><u>{}</u></b></span>",
|
||||
"format-calendar": "<span color='#aeaeae'><b>{}</b></span>",
|
||||
"format-calendar-weeks": "<span color='#aeaeae'><b>W{:%V}</b></span>",
|
||||
"format-calendar-weekdays": "<span color='#aeaeae'><b>{}</b></span>"
|
||||
},
|
||||
|
||||
"network": {
|
||||
"format-wifi": "<span color='#ffffff'> </span>",
|
||||
"format-ethernet":"<span color='#ffffff'></span>",
|
||||
"format-disconnected": "<span class='#e11e2d'></span>",
|
||||
"tooltip-format": "{ipaddr}",
|
||||
"tooltip-format-wifi": "{essid} ({signalStrength}%) | {ipaddr}",
|
||||
"tooltip-format-ethernet": "{ifname} | {ipaddr}",
|
||||
"tooltip-format-disconnected": "Offline",
|
||||
"on-click": "alacritty -e nmtui"
|
||||
},
|
||||
|
||||
"cpu": {
|
||||
"interval": 1,
|
||||
"format": "<span color='#ffd808'> </span><span color='#ffffff'> {usage}%</span>",
|
||||
"min-length": 6,
|
||||
"max-length": 6,
|
||||
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
|
||||
},
|
||||
|
||||
"memory": {
|
||||
"format": "<span color='#cc63ff'></span><span color='#ffffff'>{percentage}%</span>"
|
||||
},
|
||||
|
||||
"temperature": {
|
||||
"format": "<span color='#99c3ff'> </span><span color='#ffffff'>:{temperatureC}°C</span>",
|
||||
"format-critical": "<span color='#fd4400'></span><span color='#ffffff'>:{temperatureC}°C</span>",
|
||||
"interval": 1,
|
||||
"critical-threshold": 80,
|
||||
"on-click": "alacritty -e btop",
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"format": "<span color='#ffffff'>{icon}</span>",
|
||||
"format-bluetooth":"",
|
||||
"format-muted": "<span font='12'></span>",
|
||||
"format-icons": {
|
||||
"headphones": "",
|
||||
"bluetooth": "",
|
||||
"handsfree": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["","",""]
|
||||
},
|
||||
"justify": "center",
|
||||
"on-click": "alacritty -e pulsemixer",
|
||||
"tooltip-format": "{volume}%"
|
||||
},
|
||||
|
||||
"jack": {
|
||||
"format": "{} ",
|
||||
"format-xrun": "{xruns} xruns",
|
||||
"format-disconnected": "DSP off",
|
||||
"realtime": true
|
||||
},
|
||||
|
||||
"tray": {
|
||||
"icon-size": 14,
|
||||
"spacing": 10
|
||||
},
|
||||
}
|
||||
BIN
user/modules/gui/wm/hyprland/config/waybar/scripts/getBlock
Executable file
BIN
user/modules/gui/wm/hyprland/config/waybar/scripts/getBlock
Executable file
Binary file not shown.
12
user/modules/gui/wm/hyprland/config/waybar/scripts/getPrice
Executable file
12
user/modules/gui/wm/hyprland/config/waybar/scripts/getPrice
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
response=$(curl -s "https://api.coinbase.com/v2/prices/BTC-USD/spot")
|
||||
price=$(echo "$response" | jq -r .data.amount | awk -F. '{print $1}')
|
||||
|
||||
if [ -z "$price" ]; then
|
||||
echo -e "\033[31mErr\033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$price"
|
||||
exit 0
|
||||
24
user/modules/gui/wm/hyprland/config/waybar/scripts/weather.sh
Executable file
24
user/modules/gui/wm/hyprland/config/waybar/scripts/weather.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
BSSIDS="$(nmcli device wifi list |
|
||||
awk 'NR>1 {if ($1 != "*") {print $1}}' |
|
||||
tr -d ":" |
|
||||
tr "\n" ",")"
|
||||
|
||||
LOC=""
|
||||
REQUEST_GEO="$(wget -qO - http://openwifi.su/api/v1/bssids/"$BSSIDS")"
|
||||
if [[ "$(jq ".count_results" <<< "$REQUEST_GEO")" -gt 0 ]] ; then
|
||||
LAT="$(jq ".lat" <<< "$REQUEST_GEO")"
|
||||
LON="$(jq ".lon" <<< "$REQUEST_GEO")"
|
||||
LOC="$LAT,$LON"
|
||||
fi
|
||||
|
||||
text="$(curl -s "https://wttr.in/$LOC?format=1" | sed 's/ //g')"
|
||||
tooltip="$(curl -s "https://wttr.in/$LOC?0QT" |
|
||||
sed 's/\\/\\\\/g' |
|
||||
sed ':a;N;$!ba;s/\n/\\n/g' |
|
||||
sed 's/"/\\"/g')"
|
||||
|
||||
if ! grep -q "Unknown location" <<< "$text"; then
|
||||
echo "{\"text\": \"$text\", \"tooltip\": \"<tt>$tooltip</tt>\", \"class\": \"weather\"}"
|
||||
fi
|
||||
|
||||
73
user/modules/gui/wm/hyprland/config/waybar/style.css
Normal file
73
user/modules/gui/wm/hyprland/config/waybar/style.css
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
* {
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
font-family: "Terminus Nerd Font Propo" ;
|
||||
min-height: 25px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#custom-logo {
|
||||
padding: 0 10px;
|
||||
color: #5277c3;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
padding-left: 5px;
|
||||
border-radius: 15px 0 0 15px;
|
||||
margin-top: 2px;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
.modules-center {
|
||||
padding: 0 15px;
|
||||
margin-top: 2px;
|
||||
border-radius: 15px 15px 15px 15px;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
border-radius: 0 15px 15px 0;
|
||||
margin-top: 2px;
|
||||
background: #000000;
|
||||
}
|
||||
|
||||
#custom-clipboard,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#disk,
|
||||
#memory,
|
||||
#backlight,
|
||||
#cpu,
|
||||
#temperature,
|
||||
#custom-weather,
|
||||
#jack,
|
||||
#tray,
|
||||
#window,
|
||||
#workspaces,
|
||||
#clock {
|
||||
padding: 0 5px;
|
||||
}
|
||||
#pulseaudio {
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
#temperature.critical,
|
||||
#pulseaudio.muted {
|
||||
color: #FF0000;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#clock{
|
||||
color: #5fd1fa;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
246
user/modules/gui/wm/hyprland/default.nix
Normal file
246
user/modules/gui/wm/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
{ pkgs, lib, config, monitors ? [], ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.wm.hyprland;
|
||||
|
||||
wallpaper = builtins.fetchurl {
|
||||
url = "https://images6.alphacoders.com/117/1174033.png";
|
||||
sha256 = "1ph5m9s57076jx6042iipqx2ifzadmd5z4lf5l49wgq4jb92mp16";
|
||||
};
|
||||
|
||||
toHyprlandMonitor = m:
|
||||
"${m.name}, ${toString m.width}x${toString m.height}@${toString m.refreshRate}, ${toString m.x}x${toString m.y}, ${toString m.scale}";
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.wm.hyprland = { enable = mkEnableOption "Enable Hyprland WM"; };
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
settings = {
|
||||
"$mod" = "ALT";
|
||||
"$terminal" = "${pkgs.alacritty}/bin/alacritty";
|
||||
"$menu" = "rofi -show drun -show-icons -drun-icon-theme Qogir -font 'Noto Sans 14'";
|
||||
|
||||
monitor = if monitors != []
|
||||
then map toHyprlandMonitor monitors
|
||||
else [ ", preferred, auto, 1" ];
|
||||
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"hyprctl setcursor Vanilla-DMZ 24"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mod, Return, exec, $terminal"
|
||||
"$mod, q, killactive"
|
||||
|
||||
"$mod, J, movefocus, d"
|
||||
"$mod, K, movefocus, u"
|
||||
"$mod, H, movefocus, l"
|
||||
"$mod, L, movefocus, r"
|
||||
|
||||
"$mod&SHIFT, J, movewindow, d"
|
||||
"$mod&SHIFT, K, movewindow, u"
|
||||
"$mod&SHIFT, H, movewindow, l"
|
||||
"$mod&SHIFT, L, movewindow, r"
|
||||
|
||||
"$mod, F, fullscreen"
|
||||
|
||||
", Print, exec, grim ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png"
|
||||
"$mod&SHIFT, Print, exec, grim -g \"$(slurp)\" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png"
|
||||
"$mod&SHIFT, F, exec, alacritty -e sh -c 'EDITOR=nvim ranger'"
|
||||
''SHIFT, Print, exec, grim -g "$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png''
|
||||
|
||||
"$mod, D, exec, $menu"
|
||||
"$mod&SHIFT, D, exec, rofi -modi emoji -show emoji"
|
||||
] ++ ( builtins.concatLists (builtins.genList (
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in
|
||||
[
|
||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
])
|
||||
10)
|
||||
);
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
"float, title:^(Android Emulator)"
|
||||
"float, title: Extension: (PassFF)"
|
||||
"float, size 400 600, stayfocused, class:sys-specs"
|
||||
];
|
||||
|
||||
general = {
|
||||
layout = "master";
|
||||
border_size = 0;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
};
|
||||
|
||||
master = {
|
||||
drop_at_cursor = false;
|
||||
#new_is_master = false;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
sensitivity = 0.35;
|
||||
};
|
||||
|
||||
cursor = {
|
||||
inactive_timeout = 0;
|
||||
no_hardware_cursors = true;
|
||||
hide_on_touch = false;
|
||||
use_cpu_buffer = 0;
|
||||
enable_hyprcursor = false;
|
||||
};
|
||||
|
||||
env = [
|
||||
"HYPRCURSOR_THEME,Vanilla-DMZ"
|
||||
"HYPRCURSOR_SIZE,24"
|
||||
"GTK_THEME,Juno"
|
||||
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
location = "center";
|
||||
terminal = "alacritty";
|
||||
plugins = with pkgs; [
|
||||
rofi-emoji
|
||||
];
|
||||
};
|
||||
|
||||
home = {
|
||||
file = {
|
||||
".config/rofi" = {
|
||||
source = ./config/rofi/config;
|
||||
recursive = true;
|
||||
};
|
||||
".config/waybar" = {
|
||||
source = ./config/waybar;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
pulsemixer
|
||||
xdg-utils
|
||||
wl-clipboard
|
||||
cliphist
|
||||
|
||||
dconf
|
||||
|
||||
grim
|
||||
jq
|
||||
slurp
|
||||
|
||||
ranger
|
||||
highlight
|
||||
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
NIXOS_OZONE_WL = 1;
|
||||
};
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
splash_offset = 2.0;
|
||||
|
||||
preload =
|
||||
[ "${wallpaper}" ];
|
||||
|
||||
wallpaper = [
|
||||
",${wallpaper}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Juno";
|
||||
package = pkgs.juno-theme;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Qogir";
|
||||
package = pkgs.qogir-icon-theme;
|
||||
};
|
||||
cursorTheme = {
|
||||
package = pkgs.vanilla-dmz;
|
||||
name = "Vanilla-DMZ";
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style = {
|
||||
name = "juno";
|
||||
package = pkgs.juno-theme;
|
||||
};
|
||||
platformTheme.name = "gtk";
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
];
|
||||
config.common.default = "*";
|
||||
};
|
||||
|
||||
programs = {
|
||||
imv.enable = true;
|
||||
mpv.enable = true;
|
||||
zathura.enable = true;
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# Auto-start Hyprland on tty1
|
||||
programs.bash.profileExtra = ''
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec Hyprland
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
7
user/modules/gui/wm/sway/config/rofi/config/config.rasi
Normal file
7
user/modules/gui/wm/sway/config/rofi/config/config.rasi
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
configuration {
|
||||
font: "SF Pro Rounded 10";
|
||||
show-icons: true;
|
||||
kb-cancel: "Escape,Alt+F1";
|
||||
}
|
||||
|
||||
@theme "~/.config/rofi/material-ocean.rasi"
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
* {
|
||||
background: #0f111a;
|
||||
foreground: #f1f1f1;
|
||||
selected: #ff4151;
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 4px 4px 6px 6px;
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
background-color: @background;
|
||||
padding: 4px 0px 0px 6px;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [ textbox-prompt-colon, entry ];
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
expand: false;
|
||||
border: 0px 0px 0px 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @selected;
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 4px 0px;
|
||||
position: center;
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
placeholder-color: @foreground;
|
||||
expand: true;
|
||||
horizontal-align: 0;
|
||||
blink: true;
|
||||
padding: 4px 0px 0px 4px;
|
||||
}
|
||||
|
||||
case-indicator {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
spacing: 0;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @background;
|
||||
columns: 1;
|
||||
spacing: 5px;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
layout: vertical;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @background;
|
||||
children: [ inputbar, listview ];
|
||||
spacing: 5px;
|
||||
padding: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
orientation: horizontal;
|
||||
border-radius: 4px;
|
||||
padding: 6px 6px 6px 6px;
|
||||
}
|
||||
|
||||
element-text, element-icon {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 18px;
|
||||
border: 4px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @selected;
|
||||
text-color: @background;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: @selected;
|
||||
}
|
||||
183
user/modules/gui/wm/sway/config/rofi/default.nix
Normal file
183
user/modules/gui/wm/sway/config/rofi/default.nix
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
location = "center";
|
||||
terminal = "\${pkgs.alacritty}/bin/alacritty";
|
||||
plugins = with pkgs; [
|
||||
rofi-emoji
|
||||
];
|
||||
|
||||
#theme = {
|
||||
# "*" = {
|
||||
# nord0 = mkLiteral "#2e3440";
|
||||
# nord1 = mkLiteral "#3b4252";
|
||||
# nord2 = mkLiteral "#434c5e";
|
||||
# nord3 = mkLiteral "#4c566a";
|
||||
# nord4 = mkLiteral "#d8dee9";
|
||||
# nord5 = mkLiteral "#e5e9f0";
|
||||
# nord6 = mkLiteral "#eceff4";
|
||||
# nord7 = mkLiteral "#8fbcbb";
|
||||
# nord8 = mkLiteral "#88c0d0";
|
||||
# nord9 = mkLiteral "#81a1c1";
|
||||
# nord10 = mkLiteral "#5e81ac";
|
||||
# nord11 = mkLiteral "#bf616a";
|
||||
# nord12 = mkLiteral "#d08770";
|
||||
# nord13 = mkLiteral "#ebcb8b";
|
||||
# nord14 = mkLiteral "#a3be8c";
|
||||
# nord15 = mkLiteral "#b48ead";
|
||||
# spacing = 2;
|
||||
# background-color = mkLiteral "var(nord1)";
|
||||
# background = mkLiteral "var(nord1)";
|
||||
# foreground = mkLiteral "var(nord4)";
|
||||
# normal-background = mkLiteral "var(background)";
|
||||
# normal-foreground = mkLiteral "var(foreground)";
|
||||
# alternate-normal-background = mkLiteral "var(background)";
|
||||
# alternate-normal-foreground = mkLiteral "var(foreground)";
|
||||
# selected-normal-background = mkLiteral "var(nord8)";
|
||||
# selected-normal-foreground = mkLiteral "var(background)";
|
||||
# active-background = mkLiteral "var(background)";
|
||||
# active-foreground = mkLiteral "var(nord10)";
|
||||
# alternate-active-background = mkLiteral "var(background)";
|
||||
# alternate-active-foreground = mkLiteral "var(nord10)";
|
||||
# selected-active-background = mkLiteral "var(nord10)";
|
||||
# selected-active-foreground = mkLiteral "var(background)";
|
||||
# urgent-background = mkLiteral "var(background)";
|
||||
# urgent-foreground = mkLiteral "var(nord11)";
|
||||
# alternate-urgent-background = mkLiteral "var(background)";
|
||||
# alternate-urgent-foreground = mkLiteral "var(nord11)";
|
||||
# selected-urgent-background = mkLiteral "var(nord11)";
|
||||
# selected-urgent-foreground = mkLiteral "var(background)";
|
||||
# };
|
||||
#
|
||||
# element = {
|
||||
# padding = mkLiteral "0px 0px 0px 7px";
|
||||
# spacing = mkLiteral "5px";
|
||||
# border = 0;
|
||||
# cursor = mkLiteral "pointer";
|
||||
# };
|
||||
|
||||
# "element normal.normal" = {
|
||||
# background-color = mkLiteral "var(normal-background)";
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element normal.urgent" = {
|
||||
# background-color = mkLiteral "var(urgent-background)";
|
||||
# text-color = mkLiteral "var(urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element normal.active" = {
|
||||
# background-color = mkLiteral "var(active-background)";
|
||||
# text-color = mkLiteral "var(active-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.normal" = {
|
||||
# background-color = mkLiteral "var(selected-normal-background)";
|
||||
# text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.urgent" = {
|
||||
# background-color = mkLiteral "var(selected-urgent-background)";
|
||||
# text-color = mkLiteral "var(selected-urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element selected.active" = {
|
||||
# background-color = mkLiteral "var(selected-active-background)";
|
||||
# text-color = mkLiteral "var(selected-active-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.normal" = {
|
||||
# background-color = mkLiteral "var(alternate-normal-background)";
|
||||
# text-color = mkLiteral "var(alternate-normal-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.urgent" = {
|
||||
# background-color = mkLiteral "var(alternate-urgent-background)";
|
||||
# text-color = mkLiteral "var(alternate-urgent-foreground)";
|
||||
# };
|
||||
|
||||
# "element alternate.active" = {
|
||||
# background-color = mkLiteral "var(alternate-active-background)";
|
||||
# text-color = mkLiteral "var(alternate-active-foreground)";
|
||||
# };
|
||||
|
||||
# "element-text" = {
|
||||
# background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
# text-color = mkLiteral "inherit";
|
||||
# highlight = mkLiteral "inherit";
|
||||
# cursor = mkLiteral "inherit";
|
||||
# };
|
||||
|
||||
# "element-icon" = {
|
||||
# background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
# size = mkLiteral "1.0000em";
|
||||
# text-color = mkLiteral "inherit";
|
||||
# cursor = mkLiteral "inherit";
|
||||
# };
|
||||
|
||||
# window = {
|
||||
# padding = 0;
|
||||
# border = 0;
|
||||
# background-color = mkLiteral "var(background)";
|
||||
# };
|
||||
|
||||
# mainbox = {
|
||||
# padding = 0;
|
||||
# border = 0;
|
||||
# };
|
||||
|
||||
# message = {
|
||||
# margin = mkLiteral "0px 7px";
|
||||
# };
|
||||
|
||||
# textbox = {
|
||||
# text-color = mkLiteral "var(foreground)";
|
||||
# };
|
||||
|
||||
# listview = {
|
||||
# margin = mkLiteral "0px 0px 5px";
|
||||
# scrollbar = true;
|
||||
# spacing = mkLiteral "2px";
|
||||
# fixed-height = 0;
|
||||
# };
|
||||
|
||||
# scrollbar = {
|
||||
# padding = 0;
|
||||
# handle-width = mkLiteral "14px";
|
||||
# border = 0;
|
||||
# handle-color = mkLiteral "var(nord3)";
|
||||
# };
|
||||
|
||||
# button = {
|
||||
# spacing = 0;
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# cursor = mkLiteral "pointer";
|
||||
# };
|
||||
|
||||
# "button selected" = {
|
||||
# background-color = mkLiteral "var(selected-normal-background)";
|
||||
# text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
# };
|
||||
|
||||
# inputbar = {
|
||||
# padding = mkLiteral "7px";
|
||||
# margin = mkLiteral "7px";
|
||||
# spacing = 0;
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# background-color = mkLiteral "var(nord3)";
|
||||
# children = [ "entry" ];
|
||||
# };
|
||||
|
||||
# entry = {
|
||||
# spacing = 0;
|
||||
# cursor = mkLiteral "text";
|
||||
# text-color = mkLiteral "var(normal-foreground)";
|
||||
# background-color = mkLiteral "var(nord3)";
|
||||
# };
|
||||
#};
|
||||
}
|
||||
184
user/modules/gui/wm/sway/default.nix
Normal file
184
user/modules/gui/wm/sway/default.nix
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
{ pkgs, lib, config, monitors ? [], ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.gui.wm.sway;
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
|
||||
wallpaper = builtins.fetchurl {
|
||||
url = "https://images6.alphacoders.com/117/1174033.png";
|
||||
sha256 = "1ph5m9s57076jx6042iipqx2ifzadmd5z4lf5l49wgq4jb92mp16";
|
||||
};
|
||||
|
||||
barStatus = pkgs.writeShellScript "status.sh" ''
|
||||
#!/usr/bin/env bash
|
||||
while :; do
|
||||
echo "$(ip -4 addr show eno1 | awk '/inet / {print $2}' | cut -d'/' -f1) | $(free -h | awk '/^Mem/ {print $3}') | $(date +'%I:%M:%S %p') | $(date +'%m-%d-%Y')"; sleep 1;
|
||||
done
|
||||
'';
|
||||
|
||||
toSwayOutput = m: {
|
||||
"${m.name}" = {
|
||||
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}Hz";
|
||||
position = "${toString m.x} ${toString m.y}";
|
||||
scale = toString m.scale;
|
||||
bg = "${wallpaper} fill";
|
||||
};
|
||||
};
|
||||
|
||||
outputConfig = if monitors != []
|
||||
then lib.mkMerge (map toSwayOutput monitors)
|
||||
else {
|
||||
"*" = { bg = "${wallpaper} fill"; };
|
||||
};
|
||||
|
||||
in
|
||||
{ options.modules.user.gui.wm.sway = { enable = mkEnableOption "Enable Sway WM"; };
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
xwayland = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
|
||||
extraSessionCommands = ''
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export GTK_THEME=Adwaita-Dark
|
||||
'';
|
||||
|
||||
config = {
|
||||
defaultWorkspace = "workspace number 1";
|
||||
|
||||
fonts = {
|
||||
names = [ "Terminus" ];
|
||||
};
|
||||
|
||||
output = outputConfig;
|
||||
modifier = "Mod1";
|
||||
menu = "rofi -show drun -show-icons -drun-icon-theme Qogir -font 'Noto Sans 14'";
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
|
||||
input = {
|
||||
keyboard = {
|
||||
xkb_numlock = "enabled";
|
||||
xkb_layout = "us";
|
||||
};
|
||||
pointer = {
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.65";
|
||||
};
|
||||
};
|
||||
|
||||
bars = [
|
||||
{
|
||||
position = "top";
|
||||
statusCommand = "${barStatus}";
|
||||
fonts = {
|
||||
names = [ "Terminus" ];
|
||||
size = 12.0;
|
||||
};
|
||||
colors = {
|
||||
background = "#0A0E14";
|
||||
statusline = "#FFFFFF";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
gaps = {
|
||||
smartGaps = false;
|
||||
inner = 10;
|
||||
};
|
||||
|
||||
floating = {
|
||||
titlebar = false;
|
||||
border = 0;
|
||||
criteria = [
|
||||
{
|
||||
title = "Android Emulator";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
window = {
|
||||
titlebar = false;
|
||||
border= 0;
|
||||
};
|
||||
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${modifier}+q" = "kill";
|
||||
"Print" = "exec grim ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png";
|
||||
"${modifier}+Shift+Print" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png";
|
||||
"${modifier}+Print" = ''exec sh -c 'grim -g "$(swaymsg -t get_tree | jq -j '"'"'.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"'"'"')" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png' '';
|
||||
"${modifier}+Shift+f" = "exec alacritty -e sh -c 'EDITOR=nvim ranger'";
|
||||
"${modifier}+Shift+d" = "exec rofi -modi emoji -show emoji";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
exec_always ${pkgs.autotiling}/bin/autotiling -sr "1.61"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.rofi = import ./config/rofi { inherit pkgs config lib; };
|
||||
|
||||
home.file.".config/rofi" = {
|
||||
source = ./config/rofi/config;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
xdg = {
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
];
|
||||
config.common.default = "*";
|
||||
};
|
||||
};
|
||||
|
||||
#gtk = {
|
||||
# enable = true;
|
||||
# theme.package = pkgs.juno-theme;
|
||||
# theme.name = "Juno-ocean";
|
||||
# iconTheme.package = pkgs.qogir-icon-theme;
|
||||
# iconTheme.name = "Qogir";
|
||||
#};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style.package = pkgs.juno-theme;
|
||||
platformTheme.name = "gtk";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pavucontrol
|
||||
xdg-utils
|
||||
wl-clipboard
|
||||
autotiling
|
||||
|
||||
grim
|
||||
jq
|
||||
slurp
|
||||
|
||||
ranger
|
||||
highlight
|
||||
|
||||
nerd-fonts.terminess-ttf
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
];
|
||||
|
||||
programs = {
|
||||
imv.enable = true;
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# Auto-start sway on tty1
|
||||
programs.bash.profileExtra = ''
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec sway
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
5
user/modules/neovim/.luarc.json
Normal file
5
user/modules/neovim/.luarc.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"diagnostics.disable": [
|
||||
"missing-fields"
|
||||
]
|
||||
}
|
||||
23
user/modules/neovim/default.nix
Normal file
23
user/modules/neovim/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.neovim;
|
||||
|
||||
in
|
||||
{ options.modules.user.neovim = { enable = mkEnableOption "user.neovim"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
extraPackages = import ./pkgs.nix { inherit pkgs; };
|
||||
};
|
||||
|
||||
home.file.".config/nvim" = {
|
||||
source = ./nvim;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
73
user/modules/neovim/nvim/README.md
Normal file
73
user/modules/neovim/nvim/README.md
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
# Neovim Configuration
|
||||
|
||||
Portable Neovim configuration using lazy.nvim and native LSP (Neovim 0.11+, tested on 0.12.1).
|
||||
|
||||
## Installation
|
||||
|
||||
### Standalone (any system)
|
||||
```bash
|
||||
git clone git@github.com:itme-brain/nvim.git ~/.config/nvim
|
||||
```
|
||||
|
||||
### As part of NixOS config
|
||||
```bash
|
||||
git clone --recurse-submodules git@github.com:itme-brain/nixos.git
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- **Native LSP** (`vim.lsp.config` / `vim.lsp.enable`) - no manual server list needed
|
||||
- **Smart LSP picker** (`<leader>css`) - auto-detects installed servers for current filetype
|
||||
- **Neovim 0.12 compatible** - uses built-in `:lsp` commands and keeps legacy `:Lsp*` aliases working
|
||||
- **Portable** - works on NixOS (LSPs via extraPackages) or any system (LSPs via Mason)
|
||||
- **Mason** - auto-disabled on NixOS, auto-installs essentials elsewhere
|
||||
|
||||
## LSP Setup
|
||||
|
||||
On NixOS, LSPs come from:
|
||||
- `neovim.extraPackages` (global essentials)
|
||||
- Project `devShell` (project-specific)
|
||||
|
||||
On other systems, Mason auto-installs:
|
||||
- `lua_ls` - Lua/Neovim
|
||||
- `nil_ls` - Nix
|
||||
- `bashls` - Bash/Shell
|
||||
- `jsonls` - JSON
|
||||
- `html` - HTML
|
||||
- `cssls` - CSS
|
||||
- `marksman` - Markdown
|
||||
- `taplo` - TOML
|
||||
- `yamlls` - YAML
|
||||
|
||||
The smart picker (`<leader>css`) scans all lspconfig servers and shows only those with binaries installed.
|
||||
On Neovim 0.12+, start/stop/restart uses the built-in `:lsp` commands under the hood.
|
||||
|
||||
## Key Bindings
|
||||
|
||||
| Key | Action |
|
||||
|-----|--------|
|
||||
| `<leader>css` | Start LSP (smart picker) |
|
||||
| `<leader>csx` | Stop LSP |
|
||||
| `<leader>csr` | Restart LSP |
|
||||
| `<leader>cf` | Format code |
|
||||
| `<leader>ca` | Code action |
|
||||
| `<leader>cr` | Rename symbol |
|
||||
| `gd` | Go to definition |
|
||||
| `<leader>gr` | Find references |
|
||||
| `<leader>e` | Toggle file explorer |
|
||||
| `<leader>bd` | Delete buffer |
|
||||
| `<leader>/` | Live grep from git root |
|
||||
| `<leader>ff` | Find files from git root |
|
||||
|
||||
## Plugins
|
||||
|
||||
- **lazy.nvim** - plugin manager
|
||||
- **nvim-lspconfig** - LSP configurations
|
||||
- **nvim-cmp** - completion
|
||||
- **telescope.nvim** - fuzzy finder
|
||||
- **nvim-treesitter** - syntax highlighting
|
||||
- **neo-tree.nvim** - file explorer
|
||||
- **gitsigns.nvim** - git integration
|
||||
- **lualine.nvim** - statusline
|
||||
- **bufferline.nvim** - buffer tabs
|
||||
- **which-key.nvim** - keybinding hints
|
||||
13
user/modules/neovim/nvim/init.lua
Normal file
13
user/modules/neovim/nvim/init.lua
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
local function load_config_directory(directory)
|
||||
local config_path = vim.fn.stdpath("config") .. "/lua/" .. directory
|
||||
local files = vim.fn.readdir(config_path, function(name)
|
||||
return name:sub(-4) == ".lua"
|
||||
end)
|
||||
|
||||
for _, file in ipairs(files) do
|
||||
local file_name = file:sub(1, -5)
|
||||
require(directory .. "." .. file_name)
|
||||
end
|
||||
end
|
||||
|
||||
load_config_directory("config")
|
||||
23
user/modules/neovim/nvim/lua/config/keymaps.lua
Normal file
23
user/modules/neovim/nvim/lua/config/keymaps.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
-- Keep cursor centered while navigating document
|
||||
vim.keymap.set("n", "<C-U>", "<C-U>zz", { silent = true })
|
||||
vim.keymap.set("n", "<C-D>", "<C-D>zz", { silent = true })
|
||||
|
||||
-- Remap Ctrl + J/K/H/L to navigate between windows
|
||||
vim.keymap.set('n', '<C-j>', '<C-w>j', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<C-k>', '<C-w>k', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<C-h>', '<C-w>h', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<C-l>', '<C-w>l', { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set('n', '<C-Right>', ':vertical resize +10<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<C-Left>', ':vertical resize -10<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<C-Up>', ':horizontal resize +10<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<C-Down>', ':horizontal resize -10<CR>', { noremap = true, silent = true })
|
||||
|
||||
-- Remap Shift + H/L to switch between buffers
|
||||
vim.keymap.set('n', '<S-h>', ':bprevious<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<S-l>', ':bnext<CR>', { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set("v", "<", "<gv")
|
||||
vim.keymap.set("v", ">", ">gv")
|
||||
|
||||
vim.keymap.set("n", "<Esc>", ':nohlsearch<Bar>let @/=""<CR>', { noremap = true, silent = true})
|
||||
35
user/modules/neovim/nvim/lua/config/lazy.lua
Normal file
35
user/modules/neovim/nvim/lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "onedark" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = false },
|
||||
})
|
||||
48
user/modules/neovim/nvim/lua/config/options.lua
Normal file
48
user/modules/neovim/nvim/lua/config/options.lua
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
vim.o.clipboard = "unnamedplus"
|
||||
vim.g.autoformat = false
|
||||
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.cursorline = true
|
||||
-- Enable true color if terminal supports it (disabled in TTY/headless)
|
||||
if vim.env.COLORTERM == "truecolor" or vim.env.COLORTERM == "24bit" then
|
||||
vim.opt.termguicolors = true
|
||||
end
|
||||
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.incsearch = false
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undofile = true
|
||||
|
||||
vim.opt.guicursor = "n-v-c:block,i:block,r:block"
|
||||
|
||||
vim.opt.fillchars = { eob = " " }
|
||||
|
||||
local options_group = vim.api.nvim_create_augroup("config_options", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = options_group,
|
||||
pattern = { "python", "haskell", "c", "cpp" },
|
||||
callback = function()
|
||||
local opt = vim.opt_local
|
||||
opt.tabstop = 4
|
||||
opt.shiftwidth = 4
|
||||
opt.softtabstop = 4
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
|
||||
group = options_group,
|
||||
pattern = "*.purs",
|
||||
callback = function(event)
|
||||
vim.bo[event.buf].filetype = "purescript"
|
||||
end,
|
||||
})
|
||||
40
user/modules/neovim/nvim/lua/plugins/bufferline.lua
Normal file
40
user/modules/neovim/nvim/lua/plugins/bufferline.lua
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
return {
|
||||
{
|
||||
"akinsho/bufferline.nvim",
|
||||
version = "*",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
config = function()
|
||||
require("bufferline").setup{
|
||||
options = {
|
||||
separator_style = "thin",
|
||||
show_buffer_close_buttons = false,
|
||||
show_close_icon = false,
|
||||
},
|
||||
highlights = {
|
||||
-- Force all icon backgrounds to transparent
|
||||
buffer_selected = { bg = "NONE" },
|
||||
buffer_visible = { bg = "NONE" },
|
||||
background = { bg = "NONE" },
|
||||
fill = { bg = "NONE" },
|
||||
separator = { bg = "NONE" },
|
||||
separator_selected = { bg = "NONE" },
|
||||
separator_visible = { bg = "NONE" },
|
||||
close_button = { bg = "NONE" },
|
||||
close_button_selected = { bg = "NONE" },
|
||||
close_button_visible = { bg = "NONE" },
|
||||
modified = { bg = "NONE" },
|
||||
modified_selected = { bg = "NONE" },
|
||||
modified_visible = { bg = "NONE" },
|
||||
duplicate = { bg = "NONE" },
|
||||
duplicate_selected = { bg = "NONE" },
|
||||
duplicate_visible = { bg = "NONE" },
|
||||
indicator_selected = { bg = "NONE" },
|
||||
indicator_visible = { bg = "NONE" },
|
||||
pick = { bg = "NONE" },
|
||||
pick_selected = { bg = "NONE" },
|
||||
pick_visible = { bg = "NONE" },
|
||||
},
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
||||
109
user/modules/neovim/nvim/lua/plugins/colorscheme.lua
Normal file
109
user/modules/neovim/nvim/lua/plugins/colorscheme.lua
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
return {
|
||||
{
|
||||
"chriskempson/base16-vim",
|
||||
config = function()
|
||||
local color_group = vim.api.nvim_create_augroup("config_colorscheme", { clear = true })
|
||||
|
||||
local highlights = {
|
||||
Normal = { bg = "NONE", fg = "#FFFFFF" },
|
||||
Visual = { bg = "Gray", fg = "Black" },
|
||||
NonText = { bg = "NONE" },
|
||||
LineNr = { bg = "NONE" },
|
||||
CursorLine = { bg = "NONE" },
|
||||
CursorLineNr = { bg = "NONE", fg = "#E5C07B", bold = true },
|
||||
Search = { bg = "#FFCC66", fg = "#000000" },
|
||||
Pmenu = { bg = "Black", fg = "White" },
|
||||
PmenuSel = { bg = "Green", fg = "Black" },
|
||||
PmenuThumb = { bg = "Green" },
|
||||
PmenuSbar = { bg = "Black" },
|
||||
WinSeparator = { bg = "NONE" },
|
||||
GitGutterChange = { bg = "NONE" },
|
||||
GitGutterAdd = { bg = "NONE" },
|
||||
GitGutterDelete = { bg = "NONE" },
|
||||
GitSignsAddNr = { bg = "NONE", fg = "#98c379" },
|
||||
GitSignsChangeNr = { bg = "NONE", fg = "#61afef" },
|
||||
GitSignsDeleteNr = { bg = "NONE", fg = "#e06c75" },
|
||||
SignColumn = { bg = "NONE" },
|
||||
NeoTreeGitAdded = { bg = "NONE", fg = "#98c379" },
|
||||
NeoTreeGitModified = { bg = "NONE", fg = "#e5c07b" },
|
||||
NeoTreeGitDeleted = { bg = "NONE", fg = "#e06c75" },
|
||||
NeoTreeGitConflict = { bg = "NONE", fg = "#e06c75" },
|
||||
NeoTreeGitUntracked = { bg = "NONE", fg = "#61afef" },
|
||||
TelescopeSelection = { bg = "Gray", fg = "Green", bold = true },
|
||||
TelescopePreviewMatch = { bg = "Yellow", fg = "Black" },
|
||||
TreesitterContext = { bg = "NONE" },
|
||||
LazyH1 = { bg = "Black", fg = "Green" },
|
||||
IblScope = { bg = "NONE", fg = "Yellow" },
|
||||
ConflictMarker = { fg = "red" },
|
||||
DiffAdd = { bg = "NONE" },
|
||||
DiffChange = { bg = "NONE" },
|
||||
DiffDelete = { bg = "NONE" },
|
||||
DiffText = { bg = "NONE" },
|
||||
BufferLineFill = { bg = "NONE" },
|
||||
BufferLineBackground = { bg = "NONE", fg = "#5c6370" },
|
||||
BufferLineBuffer = { bg = "NONE", fg = "#5c6370" },
|
||||
BufferLineBufferSelected = { bg = "NONE", fg = "#FFFFFF", bold = true },
|
||||
BufferLineBufferVisible = { bg = "NONE", fg = "#abb2bf" },
|
||||
BufferLineCloseButton = { bg = "NONE", fg = "#5c6370" },
|
||||
BufferLineCloseButtonSelected = { bg = "NONE", fg = "#e06c75" },
|
||||
BufferLineCloseButtonVisible = { bg = "NONE", fg = "#5c6370" },
|
||||
BufferLineModified = { bg = "NONE", fg = "#e5c07b" },
|
||||
BufferLineModifiedSelected = { bg = "NONE", fg = "#e5c07b" },
|
||||
BufferLineModifiedVisible = { bg = "NONE", fg = "#e5c07b" },
|
||||
BufferLineSeparator = { bg = "NONE", fg = "#3e4452" },
|
||||
BufferLineSeparatorSelected = { bg = "NONE", fg = "#3e4452" },
|
||||
BufferLineSeparatorVisible = { bg = "NONE", fg = "#3e4452" },
|
||||
BufferLineIndicatorSelected = { bg = "NONE", fg = "#61afef" },
|
||||
YankHighlight = { bg = "yellow", fg = "black" },
|
||||
}
|
||||
|
||||
local function apply_highlights()
|
||||
for group, spec in pairs(highlights) do
|
||||
vim.api.nvim_set_hl(0, group, spec)
|
||||
end
|
||||
end
|
||||
|
||||
local conflict_pattern = [[<<<<<<< HEAD\|=======\|>>>>>>> .\+]]
|
||||
local function apply_conflict_match(win)
|
||||
if vim.w[win].conflict_marker_match_id then
|
||||
pcall(vim.fn.matchdelete, vim.w[win].conflict_marker_match_id, win)
|
||||
end
|
||||
vim.w[win].conflict_marker_match_id = vim.fn.matchadd("ConflictMarker", conflict_pattern, 10, -1, {
|
||||
window = win,
|
||||
})
|
||||
end
|
||||
|
||||
vim.cmd.colorscheme("base16-onedark")
|
||||
apply_highlights()
|
||||
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
group = color_group,
|
||||
callback = apply_highlights,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufWinEnter", "WinEnter" }, {
|
||||
group = color_group,
|
||||
callback = function(event)
|
||||
apply_conflict_match(vim.api.nvim_get_current_win())
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
group = color_group,
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "YankHighlight", timeout = 150 })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
|
||||
{
|
||||
"fei6409/log-highlight.nvim"
|
||||
}
|
||||
|
||||
}
|
||||
5
user/modules/neovim/nvim/lua/plugins/disabled.lua
Normal file
5
user/modules/neovim/nvim/lua/plugins/disabled.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
return {
|
||||
{ "williamboman/mason.nvim", enabled = false },
|
||||
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
||||
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
|
||||
}
|
||||
59
user/modules/neovim/nvim/lua/plugins/gitsigns.lua
Normal file
59
user/modules/neovim/nvim/lua/plugins/gitsigns.lua
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
return {
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require('gitsigns').setup {
|
||||
signs = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '-' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = '+' },
|
||||
change = { text = '~' },
|
||||
delete = { text = '-' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged_enable = true,
|
||||
signcolumn = false, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = true, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
follow_files = true
|
||||
},
|
||||
auto_attach = true,
|
||||
attach_to_untracked = false,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 0,
|
||||
ignore_whitespace = false,
|
||||
virt_text_priority = 100,
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = 'single',
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1
|
||||
},
|
||||
}
|
||||
require("which-key").add({
|
||||
{ "<leader>Gb", ":Gitsigns toggle_current_line_blame<CR>", desc = "Git blame" }
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
||||
22
user/modules/neovim/nvim/lua/plugins/indent-blankline.lua
Normal file
22
user/modules/neovim/nvim/lua/plugins/indent-blankline.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
return {
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
config = function()
|
||||
local hooks = require("ibl.hooks")
|
||||
|
||||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||
vim.api.nvim_set_hl(0, "IblIndent", { link = "Comment" })
|
||||
end)
|
||||
|
||||
require("ibl").setup({
|
||||
indent = {
|
||||
char = "|",
|
||||
highlight = "IblIndent",
|
||||
},
|
||||
scope = {
|
||||
enabled = false
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
310
user/modules/neovim/nvim/lua/plugins/lsp.lua
Normal file
310
user/modules/neovim/nvim/lua/plugins/lsp.lua
Normal file
|
|
@ -0,0 +1,310 @@
|
|||
-- Neovim 0.11+ LSP configuration
|
||||
-- Uses nvim-lspconfig for server definitions + vim.lsp.enable() API
|
||||
|
||||
-- Detect NixOS (Mason doesn't work on NixOS due to FHS issues)
|
||||
local is_nixos = vim.fn.filereadable("/etc/NIXOS") == 1
|
||||
|
||||
-- Servers to ensure are installed via Mason (non-NixOS only)
|
||||
-- On NixOS, install these via extraPackages or per-project devShells
|
||||
local mason_ensure_installed = {
|
||||
"lua_ls", -- Neovim config
|
||||
"nil_ls", -- Nix (nixd not available in Mason)
|
||||
"bashls", -- Shell scripts
|
||||
"jsonls", -- JSON configs
|
||||
"html", -- HTML
|
||||
"cssls", -- CSS
|
||||
"marksman", -- Markdown
|
||||
"taplo", -- TOML
|
||||
"yamlls", -- YAML
|
||||
}
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"c",
|
||||
"cpp",
|
||||
"python",
|
||||
"nix",
|
||||
"rust",
|
||||
"bash",
|
||||
"markdown",
|
||||
"html",
|
||||
"javascript",
|
||||
"css",
|
||||
|
||||
"vim",
|
||||
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"gitcommit",
|
||||
"gitignore"
|
||||
},
|
||||
auto_install = true,
|
||||
sync_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"m4xshen/autoclose.nvim",
|
||||
config = function()
|
||||
require("autoclose").setup()
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
version = "v2.*",
|
||||
build = "make install_jsregexp",
|
||||
},
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"hrsh7th/cmp-nvim-lsp"
|
||||
},
|
||||
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
enabled = function()
|
||||
local context = require("cmp.config.context")
|
||||
if vim.api.nvim_get_mode().mode == "c" then
|
||||
return true
|
||||
else
|
||||
return not context.in_treesitter_capture("comment") and not context.in_syntax_group("comment")
|
||||
end
|
||||
end,
|
||||
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<C-y>"] = cmp.mapping.confirm(),
|
||||
["<CR>"] = cmp.mapping(function(fallback)
|
||||
fallback()
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
}, {
|
||||
{ name = 'buffer' }
|
||||
}),
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
-- Mason: portable LSP installer (disabled on NixOS where it doesn't work)
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
enabled = not is_nixos,
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
enabled = not is_nixos,
|
||||
dependencies = { "williamboman/mason.nvim" },
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = mason_ensure_installed,
|
||||
automatic_installation = false, -- Only install what's in ensure_installed
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require('lspconfig')
|
||||
|
||||
-- Neovim 0.12 exposes built-in :lsp commands and skips lspconfig's legacy
|
||||
-- :Lsp* aliases. Recreate the old names so existing mappings keep working.
|
||||
if vim.fn.exists(':lsp') == 2 and vim.fn.exists(':LspStart') == 0 then
|
||||
vim.api.nvim_create_user_command('LspStart', function(info)
|
||||
vim.cmd('lsp enable ' .. table.concat(info.fargs, ' '))
|
||||
end, { nargs = '*' })
|
||||
|
||||
vim.api.nvim_create_user_command('LspRestart', function(info)
|
||||
vim.cmd('lsp restart ' .. table.concat(info.fargs, ' '))
|
||||
end, { nargs = '*', bang = true })
|
||||
|
||||
vim.api.nvim_create_user_command('LspStop', function(info)
|
||||
local suffix = info.bang and '!' or ''
|
||||
vim.cmd('lsp stop' .. suffix .. ' ' .. table.concat(info.fargs, ' '))
|
||||
end, { nargs = '*', bang = true })
|
||||
end
|
||||
|
||||
-- Diagnostic display configuration
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
prefix = '●',
|
||||
spacing = 2,
|
||||
current_line = true;
|
||||
},
|
||||
float = {
|
||||
border = 'rounded',
|
||||
source = true,
|
||||
},
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = '',
|
||||
[vim.diagnostic.severity.WARN] = '',
|
||||
[vim.diagnostic.severity.INFO] = '',
|
||||
[vim.diagnostic.severity.HINT] = '',
|
||||
},
|
||||
},
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
severity_sort = true,
|
||||
})
|
||||
|
||||
-- Add border to hover and signature help windows.
|
||||
local hover_handler = vim.lsp.handlers.hover
|
||||
vim.lsp.handlers['textDocument/hover'] = function(err, result, ctx, config)
|
||||
return hover_handler(err, result, ctx, vim.tbl_extend('force', config or {}, {
|
||||
border = 'rounded',
|
||||
}))
|
||||
end
|
||||
|
||||
local signature_help_handler = vim.lsp.handlers.signature_help
|
||||
vim.lsp.handlers['textDocument/signatureHelp'] = function(err, result, ctx, config)
|
||||
return signature_help_handler(err, result, ctx, vim.tbl_extend('force', config or {}, {
|
||||
border = 'rounded',
|
||||
}))
|
||||
end
|
||||
|
||||
-- Get all known server names by scanning lspconfig's lsp directory
|
||||
local function get_all_servers()
|
||||
local servers = {}
|
||||
local lsp_path = vim.fn.stdpath('data') .. '/lazy/nvim-lspconfig/lsp'
|
||||
local files = vim.fn.readdir(lsp_path, function(name)
|
||||
return name:sub(-4) == '.lua'
|
||||
end)
|
||||
for _, file in ipairs(files) do
|
||||
local server = file:sub(1, -5)
|
||||
table.insert(servers, server)
|
||||
end
|
||||
return servers
|
||||
end
|
||||
|
||||
local all_servers = get_all_servers()
|
||||
|
||||
-- local navic = require('nvim-navic')
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
-- Global config applied to all servers
|
||||
vim.lsp.config('*', {
|
||||
autostart = false, -- Don't auto-attach, use <leader>css to start manually
|
||||
capabilities = capabilities,
|
||||
-- on_attach = function(client, bufnr)
|
||||
-- if client.server_capabilities.documentSymbolProvider then
|
||||
-- navic.attach(client, bufnr)
|
||||
-- end
|
||||
-- end,
|
||||
})
|
||||
|
||||
-- Server-specific settings (merged with lspconfig defaults)
|
||||
vim.lsp.config.lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- Check if server binary is available
|
||||
local function is_server_installed(config)
|
||||
if config.default_config and config.default_config.cmd then
|
||||
local cmd = config.default_config.cmd[1]
|
||||
return vim.fn.executable(cmd) == 1
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
-- Find and start LSP server(s) for current filetype
|
||||
local function lsp_start_smart()
|
||||
local ft = vim.bo.filetype
|
||||
if ft == '' then
|
||||
vim.notify("No filetype detected", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
|
||||
-- Find all matching servers (filetype match + binary installed)
|
||||
local matching = {}
|
||||
for _, server in ipairs(all_servers) do
|
||||
local ok, config = pcall(require, 'lspconfig.configs.' .. server)
|
||||
if ok and config.default_config and config.default_config.filetypes then
|
||||
if vim.tbl_contains(config.default_config.filetypes, ft) and is_server_installed(config) then
|
||||
table.insert(matching, server)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Sort for consistent ordering
|
||||
table.sort(matching)
|
||||
|
||||
local function start_server(server)
|
||||
vim.lsp.enable(server)
|
||||
end
|
||||
|
||||
if #matching == 0 then
|
||||
vim.notify("No LSP server installed for filetype: " .. ft, vim.log.levels.WARN)
|
||||
elseif #matching == 1 then
|
||||
start_server(matching[1])
|
||||
else
|
||||
vim.ui.select(matching, {
|
||||
prompt = "Select LSP server:",
|
||||
}, function(choice)
|
||||
if choice then
|
||||
start_server(choice)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
-- LSP keybindings
|
||||
require("which-key").add({
|
||||
{ "<leader>cs", group = "LSP Commands" },
|
||||
{ "<leader>cf", function() vim.lsp.buf.format() end, desc = "Code Format" },
|
||||
{ "<leader>csi", ":checkhealth vim.lsp<CR>", desc = "LSP Info" },
|
||||
{ "<leader>csr", ":lsp restart<CR>", desc = "LSP Restart" },
|
||||
{ "<leader>css", lsp_start_smart, desc = "LSP Start" },
|
||||
{ "<leader>csx", ":lsp stop<CR>", desc = "LSP Stop" },
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"taproot-wizards/bitcoin-script-hints.nvim",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
config = function()
|
||||
require("bitcoin-script-hints").setup()
|
||||
end
|
||||
}
|
||||
}
|
||||
60
user/modules/neovim/nvim/lua/plugins/lualine.lua
Normal file
60
user/modules/neovim/nvim/lua/plugins/lualine.lua
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
return {
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"SmiteshP/nvim-navic"
|
||||
},
|
||||
config = function()
|
||||
require("lualine").setup ({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'material',
|
||||
component_separators = { left = '>', right = '|'},
|
||||
section_separators = { left = '', right = ''},
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
},
|
||||
ignore_focus = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
refresh = {
|
||||
statusline = 1000,
|
||||
tabline = 1000,
|
||||
winbar = 1000,
|
||||
}
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {
|
||||
{'filename'},
|
||||
{ function() return require("nvim-navic").get_location() end, cond = function()
|
||||
return require("nvim-navic").is_available()
|
||||
end,
|
||||
},
|
||||
},
|
||||
lualine_x = {'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {},
|
||||
winbar = {},
|
||||
inactive_winbar = {},
|
||||
extensions = {
|
||||
'lazy',
|
||||
'neo-tree',
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
||||
102
user/modules/neovim/nvim/lua/plugins/neotree.lua
Normal file
102
user/modules/neovim/nvim/lua/plugins/neotree.lua
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("neo-tree").setup({
|
||||
enable_diagnostics = false,
|
||||
default_component_configs = {
|
||||
git_status = {
|
||||
symbols = {
|
||||
added = "+",
|
||||
modified = "~",
|
||||
deleted = "-",
|
||||
renamed = ">",
|
||||
untracked = "?",
|
||||
ignored = "!",
|
||||
unstaged = "U",
|
||||
staged = "S",
|
||||
conflict = "C",
|
||||
},
|
||||
},
|
||||
},
|
||||
window = {
|
||||
position = "left",
|
||||
width = 20,
|
||||
},
|
||||
event_handlers = {
|
||||
{
|
||||
event = "neo_tree_window_after_open",
|
||||
handler = function()
|
||||
local win = vim.api.nvim_get_current_win()
|
||||
vim.wo[win].winfixwidth = true
|
||||
vim.wo[win].winfixbuf = true
|
||||
vim.wo[win].cursorline = true
|
||||
end
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Keep the selected entry readable without a solid row background.
|
||||
vim.api.nvim_set_hl(0, "NeoTreeCursorLine", { bg = "NONE", fg = "#a6e3a1" })
|
||||
|
||||
-- Apply highlight and re-apply on colorscheme change
|
||||
vim.api.nvim_create_autocmd({ "FileType", "ColorScheme" }, {
|
||||
pattern = { "neo-tree", "*" },
|
||||
callback = function(ev)
|
||||
if ev.event == "ColorScheme" then
|
||||
vim.api.nvim_set_hl(0, "NeoTreeCursorLine", { bg = "NONE", fg = "#a6e3a1" })
|
||||
end
|
||||
local win = vim.api.nvim_get_current_win()
|
||||
local buf = vim.api.nvim_win_get_buf(win)
|
||||
if vim.bo[buf].filetype == "neo-tree" then
|
||||
vim.wo[win].winhighlight = "CursorLine:NeoTreeCursorLine"
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Lock cursor to leftmost column in neo-tree
|
||||
vim.api.nvim_create_autocmd("CursorMoved", {
|
||||
pattern = "neo-tree*",
|
||||
callback = function()
|
||||
local col = vim.api.nvim_win_get_cursor(0)[2]
|
||||
if col ~= 0 then
|
||||
vim.api.nvim_win_set_cursor(0, { vim.api.nvim_win_get_cursor(0)[1], 0 })
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local function toggle_neotree()
|
||||
local api = vim.api
|
||||
local bufs = api.nvim_list_bufs()
|
||||
|
||||
for _, buf in ipairs(bufs) do
|
||||
local name = api.nvim_buf_get_name(buf)
|
||||
if name:match("neo%-tree filesystem") then
|
||||
vim.cmd("Neotree close")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
vim.cmd("Neotree")
|
||||
end
|
||||
|
||||
require("which-key").add({
|
||||
{ "<leader>e", toggle_neotree, desc = "File Explorer" }
|
||||
})
|
||||
|
||||
--vim.fn.sign_define("DiagnosticSignError",
|
||||
-- {text = " ", texthl = "DiagnosticSignError"})
|
||||
--vim.fn.sign_define("DiagnosticSignWarn",
|
||||
-- {text = " ", texthl = "DiagnosticSignWarn"})
|
||||
--vim.fn.sign_define("DiagnosticSignInfo",
|
||||
-- {text = " ", texthl = "DiagnosticSignInfo"})
|
||||
--vim.fn.sign_define("DiagnosticSignHint",
|
||||
-- {text = "", texthl = "DiagnosticSignHint"})
|
||||
end,
|
||||
},
|
||||
}
|
||||
62
user/modules/neovim/nvim/lua/plugins/telescope.lua
Normal file
62
user/modules/neovim/nvim/lua/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
local function get_root()
|
||||
local result = vim.system({ "git", "rev-parse", "--show-toplevel" }, { text = true }):wait()
|
||||
if result.code == 0 and result.stdout then
|
||||
local git_dir = vim.trim(result.stdout)
|
||||
if git_dir ~= "" then
|
||||
return git_dir
|
||||
end
|
||||
end
|
||||
|
||||
return vim.fn.getcwd()
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = '0.1.x',
|
||||
dependencies = {
|
||||
{ 'nvim-lua/plenary.nvim' },
|
||||
{ 'nvim-tree/nvim-web-devicons' }
|
||||
},
|
||||
config = function()
|
||||
-- Custom Telescope command to grep from Git root
|
||||
require("which-key").add({
|
||||
{ "<leader>/", function()
|
||||
require('telescope.builtin').live_grep({ cwd = get_root() })
|
||||
end,
|
||||
desc = "grep" },
|
||||
{ "<leader>ff", function()
|
||||
require('telescope.builtin').find_files({ cwd = get_root() })
|
||||
end,
|
||||
desc = "Search for Files" },
|
||||
{ "<leader>fp", ":Telescope oldfiles<CR>", desc = "Oldfiles" },
|
||||
{ "<leader>?", ":Telescope command_history<CR>", desc = "Command History" },
|
||||
{ "<leader>cm", ":Telescope man_pages<CR>", desc = "Manpages" },
|
||||
|
||||
-- Code
|
||||
{ "gd",
|
||||
function()
|
||||
local attached = vim.lsp.get_clients({ bufnr = 0 })
|
||||
if next(attached) ~= nil then
|
||||
require('telescope.builtin').lsp_definitions()
|
||||
else
|
||||
vim.api.nvim_feedkeys("gd", "n", false)
|
||||
end
|
||||
end,
|
||||
mode = "n",
|
||||
desc = "Go to Definition"
|
||||
},
|
||||
{ "<leader>gd", ":Telescope lsp_definitions<CR>", desc = "Go to Definition" },
|
||||
{ "<leader>gr", ":Telescope lsp_references<CR>", desc = "Goto References" },
|
||||
{ "<leader>gi", ":Telescope lsp_implementations<CR>", desc = "Go to Implementations" },
|
||||
{ "<leader>gt", ":Telescope lsp_type_definitions<CR>", desc = "Go to Type Definition" },
|
||||
{ "<leader>cv", ":Telescope treesitter<CR>", desc = "Function Names & Variables" },
|
||||
{ "<leader>cd", ":Telescope diagnostics<CR>", desc = "Code Diagnostics" },
|
||||
|
||||
-- Git
|
||||
{ "<leader>Gt", ":Telescope git_branches<CR>", desc = "Git Branches" },
|
||||
{ "<leader>Gc", ":Telescope git_commits<CR>", desc = "Git Commits" },
|
||||
})
|
||||
end
|
||||
}
|
||||
}
|
||||
89
user/modules/neovim/nvim/lua/plugins/which-key.lua
Normal file
89
user/modules/neovim/nvim/lua/plugins/which-key.lua
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
return {
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
spec = {
|
||||
{ "<leader>l", ":Lazy<CR>", desc = "Lazy" },
|
||||
{ "<leader>t",
|
||||
function()
|
||||
vim.cmd.botright("new")
|
||||
vim.opt_local.number = false
|
||||
vim.opt_local.relativenumber = false
|
||||
vim.cmd.resize(10)
|
||||
vim.cmd.terminal()
|
||||
vim.cmd.startinsert()
|
||||
end,
|
||||
mode = "n",
|
||||
desc = "Open Terminal"
|
||||
},
|
||||
|
||||
--{ "<leader>wd", "<cmd>execute 'bd' | execute 'close'<CR>", desc = "Delete window & buffer" },
|
||||
-- Window & Buffer Management
|
||||
{ "<leader>w", group = "Windows"},
|
||||
{ "<leader>wc", ":close<CR>", desc = "Close Window" },
|
||||
{ "<leader>ws", ":split<CR>", desc = "Horizontal Window Split" },
|
||||
{ "<leader>wv", ":vsplit<CR>", desc = "Vertial Window Split" },
|
||||
{ "<leader>wm", "<C-w>_", desc = "Maximize Window" },
|
||||
|
||||
{ "<leader>b", group = "Buffers"},
|
||||
{ "<leader>bd", function()
|
||||
local function is_neotree(bufnr)
|
||||
return vim.bo[bufnr].filetype == "neo-tree"
|
||||
end
|
||||
|
||||
local current_buf = vim.api.nvim_get_current_buf()
|
||||
|
||||
-- Skip if in neo-tree
|
||||
if is_neotree(current_buf) then
|
||||
vim.notify("Cannot delete buffer from neo-tree", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
local buflisted = vim.fn.getbufinfo({ buflisted = 1 })
|
||||
-- Prevent deleting last buffer
|
||||
if #buflisted <= 1 then
|
||||
vim.notify("Cannot delete last buffer", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
vim.cmd.bprevious()
|
||||
vim.cmd.bdelete({ args = { tostring(current_buf) } })
|
||||
-- If we ended up in neo-tree, move back to a regular window
|
||||
local new_buf = vim.api.nvim_get_current_buf()
|
||||
if is_neotree(new_buf) then
|
||||
vim.cmd.wincmd("l")
|
||||
end
|
||||
end, desc = "Delete Buffer" },
|
||||
{ "<leader>bD", function()
|
||||
local current_buf = vim.api.nvim_get_current_buf()
|
||||
local current_win = vim.api.nvim_get_current_win()
|
||||
|
||||
if vim.bo[current_buf].filetype == "neo-tree" then
|
||||
vim.notify("Cannot delete neo-tree buffer", vim.log.levels.WARN)
|
||||
return
|
||||
end
|
||||
|
||||
local wins = vim.fn.win_findbuf(current_buf)
|
||||
if #wins > 1 then
|
||||
vim.api.nvim_win_close(current_win, false)
|
||||
end
|
||||
|
||||
if vim.api.nvim_buf_is_valid(current_buf) then
|
||||
vim.cmd('bdelete! ' .. current_buf)
|
||||
end
|
||||
end, desc = "Delete Window & Buffer" },
|
||||
|
||||
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code Action" },
|
||||
{ "<leader>cr", vim.lsp.buf.rename, desc = "Rename Variable" },
|
||||
{ "<leader>ch", vim.lsp.buf.hover, desc = "Hover Info" },
|
||||
{ "<leader>ce", vim.diagnostic.open_float, desc = "Show Diagnostic" },
|
||||
{ "]d", vim.diagnostic.goto_next, desc = "Next Diagnostic" },
|
||||
{ "[d", vim.diagnostic.goto_prev, desc = "Prev Diagnostic" },
|
||||
|
||||
{ "<leader>G", group = "Git"},
|
||||
{ "<leader>f", group = "Files"},
|
||||
{ "<leader>c", group = "Code"},
|
||||
{ "<leader>g", group = "Goto"},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
24
user/modules/neovim/pkgs.nix
Normal file
24
user/modules/neovim/pkgs.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
# Essential LSPs for config files (project-specific LSPs go in devShells)
|
||||
lsp = with pkgs; [
|
||||
nixd
|
||||
lua-language-server
|
||||
marksman
|
||||
taplo
|
||||
];
|
||||
|
||||
lsp' = with pkgs.nodePackages; [
|
||||
vscode-langservers-extracted # jsonls, html, cssls
|
||||
bash-language-server
|
||||
yaml-language-server
|
||||
];
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
lazygit
|
||||
gcc
|
||||
];
|
||||
|
||||
in
|
||||
extraPackages ++ lsp ++ lsp'
|
||||
50
user/modules/security/gpg/default.nix
Normal file
50
user/modules/security/gpg/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ pkgs, lib, config, osConfig, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.security.gpg;
|
||||
wm = config.modules.user.gui.wm;
|
||||
gui = {
|
||||
enable = builtins.any (mod: mod.enable or false) (builtins.attrValues wm);
|
||||
};
|
||||
|
||||
in
|
||||
{ options.modules.user.security.gpg = { enable = mkEnableOption "Enable GPG module"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
# Use pcscd instead of direct CCID access (avoids conflicts with age-plugin-yubikey)
|
||||
scdaemonSettings = mkIf osConfig.services.pcscd.enable {
|
||||
disable-ccid = true;
|
||||
};
|
||||
publicKeys = [
|
||||
{
|
||||
text = "${config.user.keys.pgp.yubikey}";
|
||||
trust = 5;
|
||||
}
|
||||
] ++ optionals (osConfig.networking.hostName == "workstation") [
|
||||
{
|
||||
text = "${config.user.keys.pgp.work}";
|
||||
trust = 5;
|
||||
}
|
||||
{
|
||||
text = "${config.user.keys.pgp.company}";
|
||||
trust = 5;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
enableBashIntegration = true;
|
||||
enableScDaemon = true;
|
||||
|
||||
pinentry.package =
|
||||
if gui.enable then
|
||||
pkgs.pinentry-gnome3
|
||||
else
|
||||
pkgs.pinentry-tty;
|
||||
};
|
||||
};
|
||||
}
|
||||
16
user/modules/security/yubikey/default.nix
Normal file
16
user/modules/security/yubikey/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.security.yubikey;
|
||||
|
||||
in
|
||||
{ options.modules.user.security.yubikey = { enable = mkEnableOption "Enable Yubikey support"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
yubikey-manager
|
||||
age-plugin-yubikey
|
||||
yubico-piv-tool
|
||||
];
|
||||
};
|
||||
}
|
||||
44
user/modules/tmux/config/tmux.nix
Normal file
44
user/modules/tmux/config/tmux.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
''
|
||||
bind -n M-C source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
# Navigation (matches hyprland Alt+hjkl)
|
||||
bind-key -n M-h select-pane -L
|
||||
bind-key -n M-j select-pane -D
|
||||
bind-key -n M-k select-pane -U
|
||||
bind-key -n M-l select-pane -R
|
||||
|
||||
# Move/swap pane (matches hyprland Alt+Shift+hjkl)
|
||||
bind-key -n M-H swap-pane -s '{left-of}'
|
||||
bind-key -n M-J swap-pane -s '{down-of}'
|
||||
bind-key -n M-K swap-pane -s '{up-of}'
|
||||
bind-key -n M-L swap-pane -s '{right-of}'
|
||||
|
||||
# Actions
|
||||
bind-key -n M-q kill-pane
|
||||
bind-key -n M-Return split-window -c "#{pane_current_path}"
|
||||
bind-key -n M-f resize-pane -Z
|
||||
|
||||
# Windows (like workspaces)
|
||||
bind-key -n M-1 select-window -t 1
|
||||
bind-key -n M-2 select-window -t 2
|
||||
bind-key -n M-3 select-window -t 3
|
||||
bind-key -n M-4 select-window -t 4
|
||||
bind-key -n M-5 select-window -t 5
|
||||
bind-key -n M-6 select-window -t 6
|
||||
bind-key -n M-7 select-window -t 7
|
||||
bind-key -n M-8 select-window -t 8
|
||||
bind-key -n M-9 select-window -t 9
|
||||
bind-key -n M-0 select-window -t 10
|
||||
|
||||
# Move pane to window (like move to workspace)
|
||||
bind-key -n M-! join-pane -t :1
|
||||
bind-key -n M-@ join-pane -t :2
|
||||
bind-key -n M-'#' join-pane -t :3
|
||||
bind-key -n M-'$' join-pane -t :4
|
||||
bind-key -n M-% join-pane -t :5
|
||||
bind-key -n M-^ join-pane -t :6
|
||||
bind-key -n M-& join-pane -t :7
|
||||
bind-key -n M-* join-pane -t :8
|
||||
bind-key -n M-( join-pane -t :9
|
||||
bind-key -n M-) join-pane -t :10
|
||||
''
|
||||
44
user/modules/tmux/default.nix
Normal file
44
user/modules/tmux/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.tmux;
|
||||
gui = config.modules.user.gui.wm;
|
||||
|
||||
wm = {
|
||||
enable = builtins.any (mod: mod.enable or false) (builtins.attrValues gui);
|
||||
};
|
||||
|
||||
in
|
||||
{ options.modules.user.tmux = { enable = mkEnableOption "Enable tmux module"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
newSession = true;
|
||||
disableConfirmationPrompt = true;
|
||||
keyMode = "vi";
|
||||
mouse = if wm.enable then true else false;
|
||||
|
||||
prefix = "M";
|
||||
#shell = "\${pkgs.bash}/bin/bash";
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
{
|
||||
plugin = tilish;
|
||||
extraConfig = ''
|
||||
set -g @tilish-default 'tiled'
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = import ./config/tmux.nix;
|
||||
};
|
||||
|
||||
# Auto-start tmux only on local TTY (not SSH, not in tmux already)
|
||||
programs.bash.profileExtra = mkIf (!wm.enable) ''
|
||||
if [ -t 0 ] && [[ $- == *i* ]] && [ -z "$DISPLAY" ] && [ -z "$TMUX" ] && [ -z "$SSH_TTY" ] && [ -z "$SSH_CONNECTION" ]; then
|
||||
exec tmux
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
57
user/modules/utils/dev/default.nix
Normal file
57
user/modules/utils/dev/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ pkgs, lib, config, osConfig, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.utils.dev;
|
||||
in
|
||||
{ options.modules.user.utils.dev = { enable = mkEnableOption "user.utils.dev"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
unstable.claude-code
|
||||
unstable.codex
|
||||
unstable.opencode
|
||||
|
||||
bubblewrap
|
||||
|
||||
nix-init
|
||||
nix-prefetch-git
|
||||
nurl
|
||||
|
||||
pkg-config
|
||||
qrencode
|
||||
|
||||
# Network/system tools
|
||||
fping
|
||||
wireguard-tools
|
||||
pciutils
|
||||
lshw
|
||||
] ++ optionals (osConfig.virtualisation.libvirtd.enable) [
|
||||
virt-manager
|
||||
];
|
||||
|
||||
programs = {
|
||||
bash = {
|
||||
initExtra = "export LLAMA_API_KEY=$(cat /run/secrets/LLAMA_API_KEY)";
|
||||
};
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
sessionVariables = {
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
};
|
||||
|
||||
# Workaround for direnv_log bug
|
||||
# https://github.com/direnv/direnv/issues/1418#issuecomment-2820125413
|
||||
file.".config/direnv/direnv.toml" = {
|
||||
enable = true;
|
||||
force = true;
|
||||
text = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
561
user/modules/utils/email/config/aerc.conf
Normal file
561
user/modules/utils/email/config/aerc.conf
Normal file
|
|
@ -0,0 +1,561 @@
|
|||
#
|
||||
# aerc main configuration
|
||||
|
||||
[general]
|
||||
#
|
||||
# Used as a default path for save operations if no other path is specified.
|
||||
# ~ is expanded to the current user home dir.
|
||||
#
|
||||
#default-save-path=
|
||||
|
||||
# If set to "gpg", aerc will use system gpg binary and keystore for all crypto
|
||||
# operations. If set to "internal", the internal openpgp keyring will be used.
|
||||
# If set to "auto", the system gpg will be preferred unless the internal
|
||||
# keyring already exists, in which case the latter will be used.
|
||||
#
|
||||
# Default: auto
|
||||
pgp-provider=auto
|
||||
|
||||
# By default, the file permissions of accounts.conf must be restrictive and
|
||||
# only allow reading by the file owner (0600). Set this option to true to
|
||||
# ignore this permission check. Use this with care as it may expose your
|
||||
# credentials.
|
||||
#
|
||||
# Default: false
|
||||
#unsafe-accounts-conf=false
|
||||
|
||||
# Output log messages to specified file. A path starting with ~/ is expanded to
|
||||
# the user home dir. When redirecting aerc's output to a file using > shell
|
||||
# redirection, this setting is ignored and log messages are printed to stdout.
|
||||
#
|
||||
#log-file=
|
||||
|
||||
# Only log messages above the specified level to log-file. Supported levels
|
||||
# are: trace, debug, info, warn and error. When redirecting aerc's output to
|
||||
# a file using > shell redirection, this setting is ignored and the log level
|
||||
# is forced to trace.
|
||||
#
|
||||
# Default: info
|
||||
#log-level=info
|
||||
|
||||
# Set the $TERM environment variable used for the embedded terminal.
|
||||
#
|
||||
# Default: xterm-256color
|
||||
term=xterm-256color
|
||||
|
||||
# Display OSC8 strings in the embedded terminal
|
||||
#
|
||||
# Default: false
|
||||
#enable-osc8=false
|
||||
|
||||
[ui]
|
||||
#
|
||||
# Describes the format for each row in a mailbox view. This is a comma
|
||||
# separated list of column names with an optional align and width suffix. After
|
||||
# the column name, one of the '<' (left), ':' (center) or '>' (right) alignment
|
||||
# characters can be added (by default, left) followed by an optional width
|
||||
# specifier. The width is either an integer representing a fixed number of
|
||||
# characters, or a percentage between 1% and 99% representing a fraction of the
|
||||
# terminal width. It can also be one of the '*' (auto) or '=' (fit) special
|
||||
# width specifiers. Auto width columns will be equally attributed the remaining
|
||||
# terminal width. Fit width columns take the width of their contents. If no
|
||||
# width specifier is set, '*' is used by default.
|
||||
#
|
||||
# Default: date<20,name<17,flags>4,subject<*
|
||||
#index-columns=date<20,name<17,flags>4,subject<*
|
||||
|
||||
#
|
||||
# Each name in index-columns must have a corresponding column-$name setting.
|
||||
# All column-$name settings accept golang text/template syntax. See
|
||||
# aerc-templates(7) for available template attributes and functions.
|
||||
#
|
||||
# Default settings
|
||||
#column-date={{.DateAutoFormat .Date.Local}}
|
||||
#column-name={{index (.From | names) 0}}
|
||||
#column-flags={{.Flags | join ""}}
|
||||
#column-subject={{.ThreadPrefix}}{{.Subject}}
|
||||
|
||||
#
|
||||
# String separator inserted between columns. When the column width specifier is
|
||||
# an exact number of characters, the separator is added to it (i.e. the exact
|
||||
# width will be fully available for the column contents).
|
||||
#
|
||||
# Default: " "
|
||||
#column-separator=" "
|
||||
|
||||
#
|
||||
# See time.Time#Format at https://godoc.org/time#Time.Format
|
||||
#
|
||||
# Default: 2006-01-02 03:04 PM (ISO 8601 + 12 hour time)
|
||||
#timestamp-format=2006-01-02 03:04 PM
|
||||
|
||||
#
|
||||
# Index-only time format for messages that were received/sent today.
|
||||
# If this is not specified, timestamp-format is used instead.
|
||||
#
|
||||
#this-day-time-format=
|
||||
|
||||
#
|
||||
# Index-only time format for messages that were received/sent within the last
|
||||
# 7 days. If this is not specified, timestamp-format is used instead.
|
||||
#
|
||||
#this-week-time-format=
|
||||
|
||||
#
|
||||
# Index-only time format for messages that were received/sent this year.
|
||||
# If this is not specified, timestamp-format is used instead.
|
||||
#
|
||||
#this-year-time-format=
|
||||
|
||||
#
|
||||
# Width of the sidebar, including the border.
|
||||
#
|
||||
# Default: 20
|
||||
#sidebar-width=20
|
||||
|
||||
#
|
||||
# Message to display when viewing an empty folder.
|
||||
#
|
||||
# Default: (no messages)
|
||||
#empty-message=(no messages)
|
||||
|
||||
# Message to display when no folders exists or are all filtered
|
||||
#
|
||||
# Default: (no folders)
|
||||
#empty-dirlist=(no folders)
|
||||
|
||||
# Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel
|
||||
#
|
||||
# Default: false
|
||||
#mouse-enabled=false
|
||||
|
||||
#
|
||||
# Ring the bell when new messages are received
|
||||
#
|
||||
# Default: true
|
||||
#new-message-bell=true
|
||||
|
||||
#
|
||||
# Template to use for Account tab titles
|
||||
#
|
||||
# Default: {{.Account}}
|
||||
#tab-title-account={{.Account}}
|
||||
|
||||
# Marker to show before a pinned tab's name.
|
||||
#
|
||||
# Default: `
|
||||
#pinned-tab-marker='`'
|
||||
|
||||
# Template for the left side of the directory list.
|
||||
# See aerc-templates(7) for all available fields and functions.
|
||||
#
|
||||
# Default: {{.Folder}}
|
||||
#dirlist-left={{.Folder}}
|
||||
|
||||
# Template for the right side of the directory list.
|
||||
# See aerc-templates(7) for all available fields and functions.
|
||||
#
|
||||
# Default: {{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}
|
||||
#dirlist-right={{if .Unread}}{{humanReadable .Unread}}/{{end}}{{if .Exists}}{{humanReadable .Exists}}{{end}}
|
||||
|
||||
# Delay after which the messages are actually listed when entering a directory.
|
||||
# This avoids loading messages when skipping over folders and makes the UI more
|
||||
# responsive. If you do not want that, set it to 0s.
|
||||
#
|
||||
# Default: 200ms
|
||||
#dirlist-delay=200ms
|
||||
|
||||
# Display the directory list as a foldable tree that allows to collapse and
|
||||
# expand the folders.
|
||||
#
|
||||
# Default: false
|
||||
#dirlist-tree=false
|
||||
|
||||
# If dirlist-tree is enabled, set level at which folders are collapsed by
|
||||
# default. Set to 0 to disable.
|
||||
#
|
||||
# Default: 0
|
||||
#dirlist-collapse=0
|
||||
|
||||
# List of space-separated criteria to sort the messages by, see *sort*
|
||||
# command in *aerc*(1) for reference. Prefixing a criterion with "-r "
|
||||
# reverses that criterion.
|
||||
#
|
||||
# Example: "from -r date"
|
||||
#
|
||||
#sort=
|
||||
|
||||
# Moves to next message when the current message is deleted
|
||||
#
|
||||
# Default: true
|
||||
#next-message-on-delete=true
|
||||
|
||||
# Automatically set the "seen" flag when a message is opened in the message
|
||||
# viewer.
|
||||
#
|
||||
# Default: true
|
||||
#auto-mark-read=true
|
||||
|
||||
# The directories where the stylesets are stored. It takes a colon-separated
|
||||
# list of directories. If this is unset or if a styleset cannot be found, the
|
||||
# following paths will be used as a fallback in that order:
|
||||
#
|
||||
# ${XDG_CONFIG_HOME:-~/.config}/aerc/stylesets
|
||||
# ${XDG_DATA_HOME:-~/.local/share}/aerc/stylesets
|
||||
# /nix/store/jzlsc52f1zsczi5rmjrbff45i7ng3cph-aerc-0.15.2/share/aerc/stylesets
|
||||
#
|
||||
#stylesets-dirs=
|
||||
|
||||
# Uncomment to use box-drawing characters for vertical and horizontal borders.
|
||||
#
|
||||
# Default: " "
|
||||
#border-char-vertical=" "
|
||||
#border-char-horizontal=" "
|
||||
|
||||
# Sets the styleset to use for the aerc ui elements.
|
||||
#
|
||||
# Default: default
|
||||
#styleset-name=default
|
||||
|
||||
# Activates fuzzy search in commands and their arguments: the typed string is
|
||||
# searched in the command or option in any position, and need not be
|
||||
# consecutive characters in the command or option.
|
||||
#
|
||||
# Default: false
|
||||
#fuzzy-complete=false
|
||||
|
||||
# How long to wait after the last input before auto-completion is triggered.
|
||||
#
|
||||
# Default: 250ms
|
||||
#completion-delay=250ms
|
||||
|
||||
# The minimum required characters to allow auto-completion to be triggered after
|
||||
# completion-delay.
|
||||
#
|
||||
# Default: 1
|
||||
#completion-min-chars=1
|
||||
|
||||
#
|
||||
# Global switch for completion popovers
|
||||
#
|
||||
# Default: true
|
||||
#completion-popovers=true
|
||||
|
||||
# Uncomment to use UTF-8 symbols to indicate PGP status of messages
|
||||
#
|
||||
# Default: ASCII
|
||||
#icon-unencrypted=
|
||||
#icon-encrypted=✔
|
||||
#icon-signed=✔
|
||||
#icon-signed-encrypted=✔
|
||||
#icon-unknown=✘
|
||||
#icon-invalid=⚠
|
||||
|
||||
# Reverses the order of the message list. By default, the message list is
|
||||
# ordered with the newest (highest UID) message on top. Reversing the order
|
||||
# will put the oldest (lowest UID) message on top. This can be useful in cases
|
||||
# where the backend does not support sorting.
|
||||
#
|
||||
# Default: false
|
||||
#reverse-msglist-order = false
|
||||
|
||||
# Reverse display of the mesage threads. Default order is the the intial
|
||||
# message is on the top with all the replies being displayed below. The
|
||||
# reverse option will put the initial message at the bottom with the
|
||||
# replies on top.
|
||||
#
|
||||
# Default: false
|
||||
#reverse-thread-order=false
|
||||
|
||||
# Sort the thread siblings according to the sort criteria for the messages. If
|
||||
# sort-thread-siblings is false, the thread siblings will be sorted based on
|
||||
# the message UID in ascending order. This option is only applicable for
|
||||
# client-side threading with a backend that enables sorting. Note that there's
|
||||
# a performance impact when sorting is activated.
|
||||
#
|
||||
# Default: false
|
||||
#sort-thread-siblings=false
|
||||
|
||||
#[ui:account=foo]
|
||||
#
|
||||
# Enable a threaded view of messages. If this is not supported by the backend
|
||||
# (IMAP server or notmuch), threads will be built by the client.
|
||||
#
|
||||
# Default: false
|
||||
#threading-enabled=false
|
||||
|
||||
# Force client-side thread building
|
||||
#
|
||||
# Default: false
|
||||
#force-client-threads=false
|
||||
|
||||
# Debounce client-side thread building
|
||||
#
|
||||
# Default: 50ms
|
||||
#client-threads-delay=50ms
|
||||
|
||||
[statusline]
|
||||
#
|
||||
# Describes the format for the status line. This is a comma separated list of
|
||||
# column names with an optional align and width suffix. See [ui].index-columns
|
||||
# for more details. To completely mute the status line except for push
|
||||
# notifications, explicitly set status-columns to an empty string.
|
||||
#
|
||||
# Default: left<*,center:=,right>*
|
||||
#status-columns=left<*,center:=,right>*
|
||||
|
||||
#
|
||||
# Each name in status-columns must have a corresponding column-$name setting.
|
||||
# All column-$name settings accept golang text/template syntax. See
|
||||
# aerc-templates(7) for available template attributes and functions.
|
||||
#
|
||||
# Default settings
|
||||
#column-left=[{{.Account}}] {{.StatusInfo}}
|
||||
#column-center={{.PendingKeys}}
|
||||
#column-right={{.TrayInfo}}
|
||||
|
||||
#
|
||||
# String separator inserted between columns.
|
||||
# See [ui].column-separator for more details.
|
||||
#
|
||||
#column-separator=" "
|
||||
|
||||
# Specifies the separator between grouped statusline elements.
|
||||
#
|
||||
# Default: " | "
|
||||
#separator=" | "
|
||||
|
||||
# Defines the mode for displaying the status elements.
|
||||
# Options: text, icon
|
||||
#
|
||||
# Default: text
|
||||
#display-mode=text
|
||||
|
||||
[viewer]
|
||||
#
|
||||
# Specifies the pager to use when displaying emails. Note that some filters
|
||||
# may add ANSI codes to add color to rendered emails, so you may want to use a
|
||||
# pager which supports ANSI codes.
|
||||
#
|
||||
# Default: less -R
|
||||
#pager=less -R
|
||||
|
||||
#
|
||||
# If an email offers several versions (multipart), you can configure which
|
||||
# mimetype to prefer. For example, this can be used to prefer plaintext over
|
||||
# html emails.
|
||||
#
|
||||
# Default: text/plain,text/html
|
||||
#alternatives=text/plain,text/html
|
||||
|
||||
#
|
||||
# Default setting to determine whether to show full headers or only parsed
|
||||
# ones in message viewer.
|
||||
#
|
||||
# Default: false
|
||||
#show-headers=false
|
||||
|
||||
#
|
||||
# Layout of headers when viewing a message. To display multiple headers in the
|
||||
# same row, separate them with a pipe, e.g. "From|To". Rows will be hidden if
|
||||
# none of their specified headers are present in the message.
|
||||
#
|
||||
# Default: From|To,Cc|Bcc,Date,Subject
|
||||
#header-layout=From|To,Cc|Bcc,Date,Subject
|
||||
|
||||
# Whether to always show the mimetype of an email, even when it is just a single part
|
||||
#
|
||||
# Default: false
|
||||
#always-show-mime=false
|
||||
|
||||
# Parses and extracts http links when viewing a message. Links can then be
|
||||
# accessed with the open-link command.
|
||||
#
|
||||
# Default: true
|
||||
#parse-http-links=true
|
||||
|
||||
[compose]
|
||||
#
|
||||
# Specifies the command to run the editor with. It will be shown in an embedded
|
||||
# terminal, though it may also launch a graphical window if the environment
|
||||
# supports it. Defaults to $EDITOR, or vi.
|
||||
#editor=
|
||||
|
||||
#
|
||||
# Default header fields to display when composing a message. To display
|
||||
# multiple headers in the same row, separate them with a pipe, e.g. "To|From".
|
||||
#
|
||||
# Default: To|From,Subject
|
||||
#header-layout=To|From,Subject
|
||||
|
||||
#
|
||||
# Specifies the command to be used to tab-complete email addresses. Any
|
||||
# occurrence of "%s" in the address-book-cmd will be replaced with what the
|
||||
# user has typed so far.
|
||||
#
|
||||
# The command must output the completions to standard output, one completion
|
||||
# per line. Each line must be tab-delimited, with an email address occurring as
|
||||
# the first field. Only the email address field is required. The second field,
|
||||
# if present, will be treated as the contact name. Additional fields are
|
||||
# ignored.
|
||||
#
|
||||
# This parameter can also be set per account in accounts.conf.
|
||||
#address-book-cmd=
|
||||
|
||||
# Specifies the command to be used to select attachments. Any occurence of '%s'
|
||||
# in the file-picker-cmd will be replaced the argument <arg> to :attach -m
|
||||
# <arg>.
|
||||
#
|
||||
# The command must output the selected files to standard output, one file per
|
||||
# line.
|
||||
#file-picker-cmd=
|
||||
|
||||
#
|
||||
# Allow to address yourself when replying
|
||||
#
|
||||
# Default: true
|
||||
#reply-to-self=true
|
||||
|
||||
#
|
||||
# Warn before sending an email that matches the specified regexp but does not
|
||||
# have any attachments. Leave empty to disable this feature.
|
||||
#
|
||||
# Uses Go's regexp syntax, documented at https://golang.org/s/re2syntax. The
|
||||
# "(?im)" flags are set by default (case-insensitive and multi-line).
|
||||
#
|
||||
# Example:
|
||||
# no-attachment-warning=^[^>]*attach(ed|ment)
|
||||
#
|
||||
#no-attachment-warning=
|
||||
|
||||
#
|
||||
# When set, aerc will generate "format=flowed" bodies with a content type of
|
||||
# "text/plain; format=flowed" as described in RFC3676. This format is easier to
|
||||
# handle for some mailing software, and generally just looks like ordinary
|
||||
# text. To actually make use of this format's features, you'll need support in
|
||||
# your editor.
|
||||
#
|
||||
#format-flowed=false
|
||||
|
||||
[multipart-converters]
|
||||
#
|
||||
# Converters allow to generate multipart/alternative messages by converting the
|
||||
# main text/plain part into any other MIME type. Only exact MIME types are
|
||||
# accepted. The commands are invoked with sh -c and are expected to output
|
||||
# valid UTF-8 text.
|
||||
#
|
||||
# Example (obviously, this requires that you write your main text/plain body
|
||||
# using the markdown syntax):
|
||||
#text/html=pandoc -f markdown -t html --standalone
|
||||
|
||||
[filters]
|
||||
#
|
||||
# Filters allow you to pipe an email body through a shell command to render
|
||||
# certain emails differently, e.g. highlighting them with ANSI escape codes.
|
||||
#
|
||||
# The commands are invoked with sh -c. The following folders are appended to
|
||||
# the system $PATH to allow referencing filters from their name only:
|
||||
#
|
||||
# ${XDG_CONFIG_HOME:-~/.config}/aerc/filters
|
||||
# ${XDG_DATA_HOME:-~/.local/share}/aerc/filters
|
||||
# $PREFIX/share/aerc/filters
|
||||
# /usr/share/aerc/filters
|
||||
#
|
||||
# The following variables are defined in the filter command environment:
|
||||
#
|
||||
# AERC_MIME_TYPE the part MIME type/subtype
|
||||
# AERC_FORMAT the part content type format= parameter
|
||||
# AERC_FILENAME the attachment filename (if any)
|
||||
# AERC_SUBJECT the message Subject header value
|
||||
# AERC_FROM the message From header value
|
||||
#
|
||||
# The first filter which matches the email's mimetype will be used, so order
|
||||
# them from most to least specific.
|
||||
#
|
||||
# You can also match on non-mimetypes, by prefixing with the header to match
|
||||
# against (non-case-sensitive) and a comma, e.g. subject,text will match a
|
||||
# subject which contains "text". Use header,~regex to match against a regex.
|
||||
#
|
||||
text/plain=colorize
|
||||
text/calendar=calendar
|
||||
message/delivery-status=colorize
|
||||
message/rfc822=colorize
|
||||
#text/html=pandoc -f html -t plain | colorize
|
||||
#text/html=html | colorize
|
||||
#text/*=bat -fP --file-name="$AERC_FILENAME"
|
||||
#application/x-sh=bat -fP -l sh
|
||||
#image/*=catimg -w $(tput cols) -
|
||||
#subject,~Git(hub|lab)=lolcat -f
|
||||
#from,thatguywhodoesnothardwraphismessages=wrap -w 100 | colorize
|
||||
|
||||
# This special filter is only used to post-process email headers when
|
||||
# [viewer].show-headers=true
|
||||
# By default, headers are piped directly into the pager.
|
||||
#
|
||||
.headers=colorize
|
||||
|
||||
[openers]
|
||||
#
|
||||
# Openers allow you to specify the command to use for the :open and :open-link
|
||||
# actions on a per-MIME-type basis. The :open-link URL scheme is used to
|
||||
# determine the MIME type as follows: x-scheme-handler/<scheme>.
|
||||
#
|
||||
# {} is expanded as the temporary filename to be opened. If it is not
|
||||
# encountered in the command, the temporary filename will be appened to the end
|
||||
# of the command.
|
||||
#
|
||||
# Like [filters], openers support basic shell globbing. The first opener which
|
||||
# matches the part's MIME type (or URL scheme handler MIME type) will be used,
|
||||
# so order them from most to least specific.
|
||||
#
|
||||
# Examples:
|
||||
# x-scheme-handler/irc=hexchat
|
||||
# x-scheme-handler/http*=firefox
|
||||
# text/html=surf -dfgms
|
||||
# text/plain=gvim {} +125
|
||||
# message/rfc822=thunderbird
|
||||
|
||||
[hooks]
|
||||
#
|
||||
# Hooks are triggered whenever the associated event occurs.
|
||||
|
||||
#
|
||||
# Executed when a new email arrives in the selected folder
|
||||
#mail-received=notify-send "New mail from $AERC_FROM_NAME" "$AERC_SUBJECT"
|
||||
|
||||
#
|
||||
# Executed when aerc starts
|
||||
#aerc-startup=aerc :terminal calcurse && aerc :next-tab
|
||||
|
||||
#
|
||||
# Executed when aerc shuts down.
|
||||
#aerc-shutdown=
|
||||
|
||||
[templates]
|
||||
# Templates are used to populate email bodies automatically.
|
||||
#
|
||||
|
||||
# The directories where the templates are stored. It takes a colon-separated
|
||||
# list of directories. If this is unset or if a template cannot be found, the
|
||||
# following paths will be used as a fallback in that order:
|
||||
#
|
||||
# ${XDG_CONFIG_HOME:-~/.config}/aerc/templates
|
||||
# ${XDG_DATA_HOME:-~/.local/share}/aerc/templates
|
||||
# /nix/store/jzlsc52f1zsczi5rmjrbff45i7ng3cph-aerc-0.15.2/share/aerc/templates
|
||||
#
|
||||
#template-dirs=
|
||||
|
||||
# The default template to be used for new messages.
|
||||
#
|
||||
# default: new_message
|
||||
#new-message=new_message
|
||||
|
||||
# The default template to be used for quoted replies.
|
||||
#
|
||||
# default: quoted_reply
|
||||
#quoted-reply=quoted_reply
|
||||
|
||||
# The default template to be used for forward as body.
|
||||
#
|
||||
# default: forward_as_body
|
||||
#forwards=forward_as_body
|
||||
129
user/modules/utils/email/config/binds.conf
Normal file
129
user/modules/utils/email/config/binds.conf
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
# Binds are of the form <key sequence> = <command to run>
|
||||
# To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>"
|
||||
# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit
|
||||
<C-p> = :prev-tab<Enter>
|
||||
<C-n> = :next-tab<Enter>
|
||||
<C-t> = :term<Enter>
|
||||
? = :help keys<Enter>
|
||||
|
||||
[messages]
|
||||
q = :quit<Enter>
|
||||
|
||||
j = :next<Enter>
|
||||
<Down> = :next<Enter>
|
||||
<C-d> = :next 50%<Enter>
|
||||
<C-f> = :next 100%<Enter>
|
||||
<PgDn> = :next 100%<Enter>
|
||||
|
||||
k = :prev<Enter>
|
||||
<Up> = :prev<Enter>
|
||||
<C-u> = :prev 50%<Enter>
|
||||
<C-b> = :prev 100%<Enter>
|
||||
<PgUp> = :prev 100%<Enter>
|
||||
g = :select 0<Enter>
|
||||
G = :select -1<Enter>
|
||||
|
||||
J = :next-folder<Enter>
|
||||
K = :prev-folder<Enter>
|
||||
H = :collapse-folder<Enter>
|
||||
L = :expand-folder<Enter>
|
||||
|
||||
v = :mark -t<Enter>
|
||||
V = :mark -v<Enter>
|
||||
|
||||
T = :toggle-threads<Enter>
|
||||
|
||||
<Enter> = :view<Enter>
|
||||
d = :prompt 'Really delete this message?' 'delete-message'<Enter>
|
||||
D = :delete<Enter>
|
||||
A = :archive flat<Enter>
|
||||
|
||||
C = :compose<Enter>
|
||||
|
||||
rr = :reply -a<Enter>
|
||||
rq = :reply -aq<Enter>
|
||||
Rr = :reply<Enter>
|
||||
Rq = :reply -q<Enter>
|
||||
|
||||
c = :cf<space>
|
||||
$ = :term<space>
|
||||
! = :term<space>
|
||||
| = :pipe<space>
|
||||
|
||||
/ = :search<space>
|
||||
\ = :filter<space>
|
||||
n = :next-result<Enter>
|
||||
N = :prev-result<Enter>
|
||||
<Esc> = :clear<Enter>
|
||||
|
||||
[messages:folder=Drafts]
|
||||
<Enter> = :recall<Enter>
|
||||
|
||||
[view]
|
||||
/ = :toggle-key-passthrough<Enter>/
|
||||
q = :close<Enter>
|
||||
O = :open<Enter>
|
||||
S = :save<space>
|
||||
| = :pipe<space>
|
||||
D = :delete<Enter>
|
||||
A = :archive flat<Enter>
|
||||
|
||||
<C-l> = :open-link <space>
|
||||
|
||||
f = :forward<Enter>
|
||||
rr = :reply -a<Enter>
|
||||
rq = :reply -aq<Enter>
|
||||
Rr = :reply<Enter>
|
||||
Rq = :reply -q<Enter>
|
||||
|
||||
H = :toggle-headers<Enter>
|
||||
<C-k> = :prev-part<Enter>
|
||||
<C-j> = :next-part<Enter>
|
||||
J = :next<Enter>
|
||||
K = :prev<Enter>
|
||||
|
||||
[view::passthrough]
|
||||
$noinherit = true
|
||||
$ex = <C-x>
|
||||
<Esc> = :toggle-key-passthrough<Enter>
|
||||
|
||||
[compose]
|
||||
# Keybindings used when the embedded terminal is not selected in the compose
|
||||
# view
|
||||
$noinherit = true
|
||||
$ex = <C-x>
|
||||
<C-k> = :prev-field<Enter>
|
||||
<C-j> = :next-field<Enter>
|
||||
<A-p> = :switch-account -p<Enter>
|
||||
<A-n> = :switch-account -n<Enter>
|
||||
<tab> = :next-field<Enter>
|
||||
<backtab> = :prev-field<Enter>
|
||||
<C-p> = :prev-tab<Enter>
|
||||
<C-n> = :next-tab<Enter>
|
||||
|
||||
[compose::editor]
|
||||
# Keybindings used when the embedded terminal is selected in the compose view
|
||||
$noinherit = true
|
||||
$ex = <C-x>
|
||||
<C-k> = :prev-field<Enter>
|
||||
<C-j> = :next-field<Enter>
|
||||
<C-p> = :prev-tab<Enter>
|
||||
<C-n> = :next-tab<Enter>
|
||||
|
||||
[compose::review]
|
||||
# Keybindings used when reviewing a message to be sent
|
||||
y = :send<Enter>
|
||||
n = :abort<Enter>
|
||||
v = :preview<Enter>
|
||||
p = :postpone<Enter>
|
||||
q = :choose -o d discard abort -o p postpone postpone<Enter>
|
||||
e = :edit<Enter>
|
||||
a = :attach<space>
|
||||
d = :detach<space>
|
||||
|
||||
[terminal]
|
||||
$noinherit = true
|
||||
$ex = <C-x>
|
||||
|
||||
<C-p> = :prev-tab<Enter>
|
||||
<C-n> = :next-tab<Enter>
|
||||
19
user/modules/utils/email/default.nix
Normal file
19
user/modules/utils/email/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.utils.email;
|
||||
|
||||
in
|
||||
{ options.modules.user.utils.email = { enable = mkEnableOption "user.utils.email"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.aerc = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.file.".config/aerc" = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
17
user/modules/utils/irc/default.nix
Normal file
17
user/modules/utils/irc/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.utils.irc;
|
||||
|
||||
in
|
||||
{ options.modules.user.utils.irc = { enable = mkEnableOption "user.utils.irc"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
weechat
|
||||
];
|
||||
programs.bash.shellAliases = {
|
||||
chat = "weechat";
|
||||
};
|
||||
};
|
||||
}
|
||||
16
user/modules/utils/writing/default.nix
Normal file
16
user/modules/utils/writing/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.utils.writing;
|
||||
|
||||
in
|
||||
{ options.modules.user.utils.writing = { enable = mkEnableOption "Enable writing tools"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
mdbook
|
||||
pandoc
|
||||
asciidoctor
|
||||
];
|
||||
};
|
||||
}
|
||||
24
user/modules/vim/default.nix
Normal file
24
user/modules/vim/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.user.vim;
|
||||
|
||||
in
|
||||
{ options.modules.user.vim = { enable = mkEnableOption "user.vim"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.bash.shellAliases = {
|
||||
vi = "${pkgs.vim}/bin/vim";
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
vim
|
||||
];
|
||||
file.".vim" = {
|
||||
source = ./vim;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
3
user/modules/vim/vim/.gitignore
vendored
Normal file
3
user/modules/vim/vim/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
autoload
|
||||
plugged
|
||||
.netrwhist
|
||||
74
user/modules/vim/vim/README.md
Normal file
74
user/modules/vim/vim/README.md
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
# Vim Config
|
||||
|
||||
Lightweight Vim config that mirrors the core editing feel of the Neovim setup without the IDE stack.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
git clone git@github.com:itme-brain/vim.git ~/.vim
|
||||
vim # plugins auto-install on first run
|
||||
```
|
||||
|
||||
Requires `curl` and `git` for vim-plug bootstrap. On NixOS this is managed via home-manager instead.
|
||||
|
||||
## How it works
|
||||
|
||||
- Vim auto-loads `~/.vim/vimrc` — no symlinks needed
|
||||
- [vim-plug](https://github.com/junegunn/vim-plug) auto-downloads itself via curl on first run if missing
|
||||
- Missing plugins are installed with `PlugInstall --sync` on `VimEnter`, then the vimrc is re-sourced
|
||||
- `silent! colorscheme` suppresses errors if the colorscheme hasn't been fetched yet (e.g. offline first run)
|
||||
- Undo history persists to `~/.vim/undodir` across sessions (`undofile`)
|
||||
|
||||
## Plugins
|
||||
|
||||
| Plugin | What it does |
|
||||
|--------|-------------|
|
||||
| base16-vim | Colorscheme (onedark) |
|
||||
| vim-surround | Surround text objects (`cs"'`, `ysiw]`) |
|
||||
| auto-pairs | Auto-close brackets/quotes |
|
||||
| fzf + fzf.vim | Fuzzy finder (files, buffers, grep) |
|
||||
| vim-log-highlighting | Syntax highlighting for log files |
|
||||
| vim-highlightedyank | Flash feedback on yank |
|
||||
| lightline.vim | Statusline |
|
||||
| vim-anzu | Search match count in statusline |
|
||||
|
||||
## Keybinds
|
||||
|
||||
Leader is `Space`.
|
||||
|
||||
### File explorer & search
|
||||
| Key | Action |
|
||||
|-----|--------|
|
||||
| `<leader>e` | Toggle netrw sidebar |
|
||||
| `<leader>/` | Ripgrep search from git root |
|
||||
| `<leader>ff` | Find files from git root (fzf) |
|
||||
| `<leader>fp` | Recent files (fzf) |
|
||||
| `<leader>fb` | Open buffers (fzf) |
|
||||
| `<leader>?` | Command history (fzf) |
|
||||
|
||||
### Buffers
|
||||
| Key | Action |
|
||||
|-----|--------|
|
||||
| `H` / `L` | Previous / next buffer |
|
||||
| `<leader>bd` | Delete buffer safely |
|
||||
|
||||
### Windows
|
||||
| Key | Action |
|
||||
|-----|--------|
|
||||
| `<C-h/j/k/l>` | Navigate windows (skips netrw) |
|
||||
| `<C-Arrow>` | Resize windows |
|
||||
| `<leader>wc` | Close window |
|
||||
| `<leader>ws` | Horizontal split |
|
||||
| `<leader>wv` | Vertical split |
|
||||
| `<leader>wm` | Maximize window |
|
||||
|
||||
### Other
|
||||
| Key | Action |
|
||||
|-----|--------|
|
||||
| `<Esc>` | Clear search highlight |
|
||||
| `<C-U>` / `<C-D>` | Scroll half-page (centered) |
|
||||
| `<` / `>` (visual) | Indent and keep selection |
|
||||
| `<leader>t` | Terminal (bottom split) |
|
||||
| `<leader>ts` | Insert timestamp |
|
||||
| `<leader>pu` | PlugUpdate |
|
||||
| `<leader>pi` | PlugInstall |
|
||||
193
user/modules/vim/vim/vimrc
Normal file
193
user/modules/vim/vim/vimrc
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
|
||||
if empty(glob(data_dir . '/autoload/plug.vim'))
|
||||
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
endif
|
||||
|
||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||
\| PlugInstall --sync | source $MYVIMRC
|
||||
\| endif
|
||||
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'chriskempson/base16-vim'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'jiangmiao/auto-pairs'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'mtdl9/vim-log-highlighting'
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
Plug 'itchyny/lightline.vim'
|
||||
Plug 'osyo-manga/vim-anzu'
|
||||
call plug#end()
|
||||
|
||||
let mapleader = "\<Space>"
|
||||
set background=dark
|
||||
if has('termguicolors')
|
||||
set termguicolors
|
||||
endif
|
||||
silent! colorscheme base16-onedark
|
||||
|
||||
highlight Normal ctermbg=NONE guibg=NONE ctermfg=White guifg=#FFFFFF
|
||||
highlight NonText ctermbg=NONE guibg=NONE
|
||||
highlight CursorLine ctermbg=NONE guibg=NONE
|
||||
highlight CursorLineNr ctermfg=Yellow guifg=#E5C07B ctermbg=NONE guibg=NONE cterm=bold gui=bold
|
||||
highlight HighlightedyankRegion ctermfg=Black guifg=#000000 ctermbg=Yellow guibg=yellow
|
||||
highlight NormalNC ctermbg=NONE guibg=NONE
|
||||
highlight Search ctermfg=Black guifg=#000000 ctermbg=Yellow guibg=#FFCC66
|
||||
highlight LineNr ctermbg=NONE guibg=NONE
|
||||
highlight Visual ctermbg=Gray guibg=Gray ctermfg=Black guifg=Black
|
||||
|
||||
let g:highlightedyank_highlight_duration = 140
|
||||
let g:lightline = { 'colorscheme': 'deus', }
|
||||
|
||||
let $FZF_DEFAULT_OPTS = '--bind=tab:up,shift-tab:down'
|
||||
let g:fzf_layout = { 'window': 'enew' }
|
||||
|
||||
" netrw settings
|
||||
let g:netrw_banner = 0
|
||||
let g:netrw_winsize = 20
|
||||
let g:netrw_liststyle = 3
|
||||
let g:netrw_browse_split = 4
|
||||
let g:netrw_altv = 1
|
||||
|
||||
autocmd FileType netrw nnoremap <buffer> <C-l> :wincmd l<CR>
|
||||
autocmd FileType netrw nnoremap <buffer> <C-h> :wincmd h<CR>
|
||||
autocmd FileType netrw nnoremap <buffer> <C-j> :wincmd j<CR>
|
||||
autocmd FileType netrw nnoremap <buffer> <C-k> :wincmd k<CR>
|
||||
|
||||
set laststatus=2
|
||||
|
||||
set number
|
||||
set relativenumber
|
||||
set cursorline
|
||||
set scrolloff=8
|
||||
|
||||
set noincsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
set clipboard=unnamedplus
|
||||
set noswapfile
|
||||
set nobackup
|
||||
set undofile
|
||||
set undodir=~/.vim/undodir
|
||||
|
||||
set hidden
|
||||
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set softtabstop=2
|
||||
set expandtab
|
||||
set smartindent
|
||||
set fillchars=eob:\
|
||||
|
||||
set statusline=%{exists('*anzu#search_status')?anzu#search_status():''}
|
||||
|
||||
" --- Netrw toggle (like neo-tree) ---
|
||||
function! NetrwToggle()
|
||||
for i in range(1, winnr('$'))
|
||||
if getbufvar(winbufnr(i), '&filetype') ==# 'netrw'
|
||||
execute i . 'wincmd w'
|
||||
close
|
||||
return
|
||||
endif
|
||||
endfor
|
||||
let g:netrw_return_win = winnr()
|
||||
Lexplore
|
||||
endfunction
|
||||
|
||||
function! SafeWincmd(dir)
|
||||
let target = winnr(a:dir)
|
||||
if target == winnr()
|
||||
return
|
||||
endif
|
||||
if getbufvar(winbufnr(target), '&filetype') ==# 'netrw'
|
||||
return
|
||||
endif
|
||||
execute 'wincmd ' . a:dir
|
||||
endfunction
|
||||
|
||||
function! GitRoot()
|
||||
let l:root = systemlist('git rev-parse --show-toplevel')
|
||||
if v:shell_error == 0 && !empty(l:root) && !empty(l:root[0])
|
||||
return l:root[0]
|
||||
endif
|
||||
return getcwd()
|
||||
endfunction
|
||||
|
||||
function! SafeBdelete()
|
||||
if &filetype ==# 'netrw'
|
||||
echohl WarningMsg | echom 'Cannot delete buffer from netrw' | echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
let l:buflisted = getbufinfo({'buflisted': 1})
|
||||
if len(l:buflisted) <= 1
|
||||
echohl WarningMsg | echom 'Cannot delete last buffer' | echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
let l:buf = bufnr('%')
|
||||
bprevious
|
||||
execute 'bdelete ' . l:buf
|
||||
endfunction
|
||||
|
||||
" --- Plugin management ---
|
||||
nnoremap <leader>pu :PlugUpdate<CR>
|
||||
nnoremap <leader>pd :PlugUpgrade<CR>
|
||||
nnoremap <leader>ps :PlugStatus<CR>
|
||||
nnoremap <leader>pi :PlugInstall<CR>
|
||||
|
||||
" --- Search (anzu) ---
|
||||
nmap n <Plug>(anzu-n-with-echo)
|
||||
nmap N <Plug>(anzu-N-with-echo)
|
||||
nmap * <Plug>(anzu-star-with-echo)
|
||||
nmap # <Plug>(anzu-sharp-with-echo)
|
||||
nmap <Esc><Esc> <Plug>(anzu-clear-search-status)
|
||||
nnoremap <Esc> :noh<Bar>let @/=""<CR>
|
||||
|
||||
" --- Visual indentation ---
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
||||
" --- Scrolling (centered) ---
|
||||
nnoremap <C-U> <C-U>zz
|
||||
nnoremap <C-D> <C-D>zz
|
||||
|
||||
" --- Window navigation (matches nvim <C-h/j/k/l>, skips netrw) ---
|
||||
nnoremap <C-h> :call SafeWincmd('h')<CR>
|
||||
nnoremap <C-j> :call SafeWincmd('j')<CR>
|
||||
nnoremap <C-k> :call SafeWincmd('k')<CR>
|
||||
nnoremap <C-l> :call SafeWincmd('l')<CR>
|
||||
|
||||
" --- Window resize (matches nvim <C-Arrow>) ---
|
||||
nnoremap <C-Right> :vertical resize +10<CR>
|
||||
nnoremap <C-Left> :vertical resize -10<CR>
|
||||
nnoremap <C-Up> :resize +10<CR>
|
||||
nnoremap <C-Down> :resize -10<CR>
|
||||
|
||||
" --- Window management ---
|
||||
nnoremap <leader>wc :close<CR>
|
||||
nnoremap <leader>ws :split<CR>
|
||||
nnoremap <leader>wv :vsplit<CR>
|
||||
nnoremap <leader>wm <C-w>_
|
||||
nnoremap <leader>ww :wincmd w<CR>
|
||||
nnoremap <leader>wW :wincmd W<CR>
|
||||
|
||||
" --- File explorer & search ---
|
||||
nnoremap <leader>e :call NetrwToggle()<CR>
|
||||
nnoremap <leader>/ :execute 'lcd ' . fnameescape(GitRoot()) <Bar> Rg<Space>
|
||||
nnoremap <leader>ff :execute 'lcd ' . fnameescape(GitRoot()) <Bar> Files<CR>
|
||||
nnoremap <leader>fp :History<CR>
|
||||
nnoremap <leader>fb :Buffers<CR>
|
||||
nnoremap <leader>? :History:<CR>
|
||||
|
||||
" --- Buffers ---
|
||||
nnoremap <leader>bd :call SafeBdelete()<CR>
|
||||
nnoremap H :bprevious<CR>
|
||||
nnoremap L :bnext<CR>
|
||||
|
||||
" --- Terminal ---
|
||||
nnoremap <leader>t :below terminal ++rows=10<CR>
|
||||
|
||||
" --- Misc ---
|
||||
nnoremap <Leader>ts :execute "normal! a" . strftime('[%b %d %H:%M:%S - BR]')<CR>
|
||||
Loading…
Add table
Add a link
Reference in a new issue