Compare commits

...

10 Commits

Author SHA1 Message Date
9ff6a60990
fix: more 2025-05-13 13:43:20 -04:00
c1f7b3e522
feat: more settings 2025-04-15 20:30:52 -04:00
396b169ec2
feat: remove unused deps 2025-03-27 18:07:49 -04:00
cc14034abe
fix: neovim 2025-03-13 10:36:02 -04:00
7cc0ef8ec7
feat: update deps 2025-03-10 18:35:08 -04:00
50767ba3d0
feat: add more git defaults 2025-02-25 09:35:53 -05:00
807faf0e43
feat: update 2025-02-03 11:52:08 -05:00
8ecab747c1
feat: configure themes 2024-11-22 17:21:26 -05:00
7a891d17cb
feat: format 2024-11-20 10:57:39 -05:00
74c81d7fea
feat: add formatter 2024-11-20 10:31:37 -05:00
14 changed files with 629 additions and 341 deletions

View File

@ -1,23 +1,26 @@
{ config, pkgs, inputs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
config,
pkgs,
inputs,
...
}: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = ["nix-command" "flakes" ];
nix.settings.experimental-features = ["nix-command" "flakes"];
networking.hostName = "falcon-nixos"; # Define your hostname.
users.users.yadunut = {
shell = pkgs.zsh;
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXOpmWsAnl2RtOuJJMRUx+iJTwf2RWJ1iS3FqXJFzFG" ];
extraGroups = ["wheel"]; # Enable sudo for the user.
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXOpmWsAnl2RtOuJJMRUx+iJTwf2RWJ1iS3FqXJFzFG"];
};
security.sudo.wheelNeedsPassword = false;
@ -30,7 +33,6 @@
age.secrets.tailscale.file = ./secrets/tailscale.age;
programs.zsh.enable = true;
# List services that you want to enable:
@ -41,7 +43,7 @@
services.tailscale = {
enable = true;
authKeyFile = config.age.secrets.tailscale.path;
extraUpFlags = [ "--login-server" "http://ts.yadunut.com:444" ];
extraUpFlags = ["--login-server" "http://ts.yadunut.com:444"];
};
environment.variables.EDITOR = "nvim";
@ -60,9 +62,7 @@
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
# Need this for nvidia-smi
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.videoDrivers = ["nvidia"];
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -1,31 +1,35 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/12b222f4-bd4b-4f52-9402-c99057a39382";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/12b222f4-bd4b-4f52-9402-c99057a39382";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0625-632C";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0625-632C";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d56b2565-66f8-4f22-a078-8b0e4c9bb019"; }
];
swapDevices = [
{device = "/dev/disk/by-uuid/d56b2565-66f8-4f22-a078-8b0e4c9bb019";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@ -1,5 +1,8 @@
{ config, pkgs, ... } :
{
config,
pkgs,
...
}: {
home.username = "yadunut";
home.homeDirectory = "/home/yadunut";
@ -31,7 +34,6 @@
};
};
programs.tmux = {
enable = true;
newSession = true;
@ -43,11 +45,9 @@
pain-control
];
};
programs.zsh.prezto.pmodules = [ "tmux" ];
programs.zsh.prezto.pmodules = ["tmux"];
programs.zsh.prezto.tmux.autoStartRemote = true;
programs.fzf.tmux.enableShellIntegration = true;
home.stateVersion = "23.11";
}

View File

@ -1,8 +1,6 @@
let
let
system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHMBVrt8ORitBVmkDSf78zli0M2+ggQtdnPEywqaaKA root@nixos";
systems = [ system1 ];
in
{
systems = [system1];
in {
"tailscale.age".publicKeys = systems;
}

View File

@ -8,11 +8,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1723293904,
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"lastModified": 1736955230,
"narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=",
"owner": "ryantm",
"repo": "agenix",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c",
"type": "github"
},
"original": {
@ -43,41 +43,6 @@
"type": "github"
}
},
"devshell": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1728330715,
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
"owner": "numtide",
"repo": "devshell",
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -86,11 +51,11 @@
]
},
"locked": {
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"lastModified": 1741352980,
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
"type": "github"
},
"original": {
@ -135,55 +100,21 @@
"type": "github"
}
},
"git-hooks": {
"flake-utils_3": {
"inputs": {
"flake-compat": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
"systems": "systems_4"
},
"locked": {
"lastModified": 1731363552,
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
@ -215,32 +146,11 @@
]
},
"locked": {
"lastModified": 1731887066,
"narHash": "sha256-uw7K/RsYioJicV79Nl39yjtfhdfTDU2aRxnBgvFhkZ8=",
"lastModified": 1743097780,
"narHash": "sha256-5tUbaMBKYbfTe/4aXACxmiXG22TgwPBNcfZ8Kg3rt+g=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f3a2ff69586f3a54b461526e5702b1a2f81e740a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1731604581,
"narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10",
"rev": "b14a70c40f4fd0b73d095ab04a7c6e31fbc18e52",
"type": "github"
},
"original": {
@ -277,27 +187,6 @@
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1731642829,
"narHash": "sha256-vG+O2RZRzYZ8BUMNNJ+BLSj6PUoGW7taDQbp6QNJ3Xo=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "f86f158efd4bab8dce3e207e4621f1df3a760b7a",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1703013332,
@ -316,11 +205,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1731676054,
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
"lastModified": 1742889210,
"narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
"rev": "698214a32beb4f4c8e3942372c694f40848b360d",
"type": "github"
},
"original": {
@ -330,26 +219,36 @@
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1733759999,
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"home-manager": "home-manager_3",
"nix-darwin": "nix-darwin",
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
"nuschtosSearch": "nuschtosSearch"
},
"locked": {
"lastModified": 1731883908,
"narHash": "sha256-Yt/eVhoj+SwpsQVK0YxM8jou55ni0+dqANuQ2IvIA28=",
"lastModified": 1742991302,
"narHash": "sha256-5S+qnc5ijgFWlAWS9+L7uAgpDnL0RtVEDhVpHWGoavA=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "5bc3fa6996ee37b754f2e815a165be6e4d0cfcb9",
"rev": "1c0dd320d9c4f250ac33382e11d370b7abe97622",
"type": "github"
},
"original": {
@ -368,11 +267,11 @@
]
},
"locked": {
"lastModified": 1731582522,
"narHash": "sha256-1w6aM4bG5cl2E4jHLPnMKkrUO4tY1jUX1NI6/RwJN7Y=",
"lastModified": 1742659553,
"narHash": "sha256-i/JCrr/jApVorI9GkSV5to+USrRCa0rWuQDH8JSlK2A=",
"owner": "NuschtOS",
"repo": "search",
"rev": "13300b2297c51368e0892c3ebe220f688014fe15",
"rev": "508752835128a3977985a4d5225ff241f7756181",
"type": "github"
},
"original": {
@ -387,7 +286,27 @@
"flake-utils": "flake-utils",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim"
"nixvim": "nixvim",
"superhtml": "superhtml"
}
},
"superhtml": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1733963442,
"narHash": "sha256-upfDKS5CXtbbzCZICGqCsCwkHtjVa01jMWCj6rjO4zI=",
"ref": "refs/heads/main",
"rev": "c17d0ffe2440a81842055e5d4649723b7829a5da",
"revCount": 141,
"type": "git",
"url": "https://git.yadunut.dev/yadunut/superhtml"
},
"original": {
"type": "git",
"url": "https://git.yadunut.dev/yadunut/superhtml"
}
},
"systems": {
@ -435,24 +354,18 @@
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"systems_4": {
"locked": {
"lastModified": 1730321837,
"narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "746901bb8dba96d154b66492a29f5db0693dbfcc",
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}

View File

@ -9,14 +9,24 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
# ziggy.url = "github:kristoff-it/ziggy";
superhtml.url = "git+https://git.yadunut.dev/yadunut/superhtml";
};
outputs = { nixpkgs, home-manager, flake-utils, agenix, nixvim, ... }@inputs: {
outputs = {
nixpkgs,
home-manager,
flake-utils,
agenix,
nixvim,
...
} @ inputs: {
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;
homeConfigurations = {
"yadunut@yadunut-mbp" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
@ -28,7 +38,7 @@
extraSpecialArgs = {
inherit inputs;
};
modules = [ ./yadunut-mbp/home.nix ];
modules = [./yadunut-mbp/home.nix];
};
"yadunut@yadunut-mba" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
@ -44,13 +54,13 @@
./yadunut-mba/home.nix
];
};
};
};
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./falcon-nixos/configuration.nix
agenix.nixosModules.default
{ _module.args = { inherit inputs; };}
{_module.args = {inherit inputs;};}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;

View File

@ -1,5 +1,6 @@
{ pkgs, ... }:
{
# https://blog.gitbutler.com/how-git-core-devs-configure-git/
{pkgs, ...}: {
programs.git-credential-oauth.enable = true;
programs.git = {
enable = true;
@ -14,22 +15,42 @@
pull.autostash = true;
rebase.autostash = true;
rebase.autosquash = true;
push.autoSetupRemote = true;
commit.gpgsign = true;
commit.verbose = true;
# merge.conflictstyle = "zdiff2";
diff.colorMoved = true;
diff.algorithm = "histogram";
feature.experimental = true;
branch.sort = "committerdate";
diff.mnemonicPrefix = true;
fetch.all = true;
column.ui = "auto";
tags.sort = "version:refname";
push.followTags = true;
rerere.enabled = true;
rerere.autoupdate = true;
rebase.updateRefs = true;
gpg.format = "ssh";
# credential.helper = "oauth";
credential = {
"https://git.yadunut.dev" = {
oauthClientId = "a4792ccc-144e-407e-86c9-5e7d8d9c3269";
oauthScopes = "read:repository write:repository";
oauthAuthURL = "/login/oauth/authorize";
oauthTokenURL = "/login/oauth/access_token";
oauthAuthURL = "/login/oauth/authorize";
oauthTokenURL = "/login/oauth/access_token";
};
};
};
};
home.packages = [

View File

@ -1,28 +1,53 @@
{ config, pkgs, inputs, lib, ... }:
{
pkgs,
inputs,
lib,
...
}: {
imports = [
inputs.nixvim.homeManagerModules.nixvim
];
programs.nixvim = {
nixpkgs.pkgs = pkgs;
performance.combinePlugins.enable = false;
performance.byteCompileLua.enable = true;
performance.byteCompileLua.enable = false;
performance.byteCompileLua.nvimRuntime = true;
performance.byteCompileLua.plugins = true;
enable = true;
defaultEditor = true;
colorschemes.gruvbox.enable = true;
extraPlugins = [ pkgs.vimPlugins.todo-txt-vim ];
extraPlugins = [pkgs.vimPlugins.todo-txt-vim];
plugins = {
flash.enable = true;
oil.enable = true;
neogit.enable = true;
hardtime.enable = true;
hardtime.enable = false;
image = {
enable = true;
settings = {
backend = "kitty";
};
};
none-ls = {
enable = true;
sources.formatting.ocamlformat.enable = true;
};
lsp = {
# package = pkgs.vimUtils.buildVimPlugin {
# name = "lsp";
# src = pkgs.fetchFromGitHub {
# owner = "neovim";
# repo = "nvim-lspconfig";
# rev = "541f3a2781de481bb84883889e4d9f0904250a56";
# hash = "sha256-f9CqwKBWZgC2ystm+g7FmsHR0fLcM6Wj+GkSwoUIanw=";
# };
# };
enable = true;
servers = {
gleam.enable = true;
# gleam.enable = true;
ts_ls.enable = true; # TS/JS
biome.enable = true; # TS/JS
@ -30,26 +55,79 @@
ruff.enable = true; # python
nil_ls.enable = true; # nix
rust_analyzer.enable = true;
rust_analyzer.installCargo = false;
rust_analyzer.installRustc = false;
cssls.enable = true;
jsonls.enable = true;
html.enable = true;
denols.enable = true;
denols.enable = false;
denols.autostart = false;
gopls.enable = true;
ziggy = {
enable = false;
package = inputs.ziggy.outputs.packages.aarch64-darwin.ziggy;
};
ziggy_schema = {
enable = false;
package = inputs.ziggy.outputs.packages.aarch64-darwin.ziggy;
};
zls= {
package = null;
enable = true;
};
superhtml = {
enable = true;
package = inputs.superhtml.outputs.packages.aarch64-darwin.superhtml;
};
ocamllsp = {
enable = true;
package = null;
};
};
keymaps.lspBuf = {
gd = { action = "definition"; desc = "Goto Definition"; };
gr = { action = "references"; desc = "Goto References"; };
gD = { action = "declaration"; desc = "Goto Declaration"; };
gI = { action = "implementation"; desc = "Goto Implementation"; };
gT = { action = "type_definition"; desc = "Type Definition"; };
K = { action = "hover"; desc = "Hover"; };
"<leader>rn" = { action = "rename"; desc = "Rename"; };
gd = {
action = "definition";
desc = "Goto Definition";
};
gr = {
action = "references";
desc = "Goto References";
};
gD = {
action = "declaration";
desc = "Goto Declaration";
};
gI = {
action = "implementation";
desc = "Goto Implementation";
};
gT = {
action = "type_definition";
desc = "Type Definition";
};
K = {
action = "hover";
desc = "Hover";
};
"<leader>rn" = {
action = "rename";
desc = "Rename";
};
};
keymaps.extra = [
{ action.__raw = "vim.lsp.buf.code_action"; key = "<leader>la"; }
{ action.__raw = "function() vim.lsp.buf.format { async = true } end"; key = "<leader>lf"; }
{
action.__raw = "vim.lsp.buf.code_action";
key = "<leader>la";
}
{
action.__raw = "function() vim.lsp.buf.format { async = true } end";
key = "<leader>lf";
}
];
keymaps.diagnostic = {
"<leader>cd" = {
@ -72,13 +150,22 @@
autoEnableSources = true;
settings = {
sources = [
{ name = "nvim_lsp"; }
{ name = "nvim_lua"; }
{ name = "emoji"; }
{ name = "emoji"; }
{ name = "buffer"; option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; keywordLength = 3; }
{ name = "path"; keywordLength = 3; }
{ name = "luasnip"; keywordLength = 3; }
{name = "nvim_lsp";}
{name = "nvim_lua";}
# {name = "emoji";}
{
name = "buffer";
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
keywordLength = 3;
}
{
name = "path";
keywordLength = 3;
}
{
name = "luasnip";
keywordLength = 3;
}
];
window = {
# completion = { border = "solid"; };
@ -108,7 +195,21 @@
updateFocusedFile.enable = true;
};
luasnip.enable = true;
friendly-snippets.enable = true;
luasnip = {
enable = true;
settings = {
enable_autosnippets = true;
store_selection_keys = "<Tab>";
};
fromVscode = [
{
lazyLoad = true;
paths = "${pkgs.vimPlugins.friendly-snippets}";
}
];
};
bufferline.enable = true;
@ -143,29 +244,40 @@
move = {
enable = true;
gotoNextStart = {
"]m" = { query = "@function.outer"; };
"]]" = { query = "@class.outer"; desc = "Next class start"; };
"]o" = { query = "@loop.*"; };
"]s" = { query = "@scope"; queryGroup = "locals"; desc = "Next scope"; };
"]z" = { query = "@fold"; queryGroup = "folds"; desc = "Next fold"; };
"]m" = {query = "@function.outer";};
"]]" = {
query = "@class.outer";
desc = "Next class start";
};
"]o" = {query = "@loop.*";};
"]s" = {
query = "@scope";
queryGroup = "locals";
desc = "Next scope";
};
"]z" = {
query = "@fold";
queryGroup = "folds";
desc = "Next fold";
};
};
gotoNextEnd = {
"]M" = { query = "@function.outer"; };
"][" = { query = "@class.outer"; };
"]M" = {query = "@function.outer";};
"][" = {query = "@class.outer";};
};
gotoPreviousStart = {
"[m" = { query = "@function.outer"; };
"[[" = { query = "@class.outer"; };
"[m" = {query = "@function.outer";};
"[[" = {query = "@class.outer";};
};
gotoPreviousEnd = {
"[M" = { query = "@function.outer"; };
"[]" = { query = "@class.outer"; };
"[M" = {query = "@function.outer";};
"[]" = {query = "@class.outer";};
};
gotoNext = {
"]d" = { query = "@conditional.outer"; };
"]d" = {query = "@conditional.outer";};
};
gotoPrevious = {
"[d" = { query = "@conditional.outer"; };
"[d" = {query = "@conditional.outer";};
};
};
};
@ -178,20 +290,23 @@
settings = {
defaults = {
mappings = {
i = { "<C-t>".__raw = "require('trouble.sources.telescope').open"; };
n = { "<C-t>".__raw = "require('trouble.sources.telescope').open"; };
i = {"<C-t>".__raw = "require('trouble.sources.telescope').open";};
n = {"<C-t>".__raw = "require('trouble.sources.telescope').open";};
};
};
};
};
project-nvim = {
enable = true;
enableTelescope = true;
};
web-devicons.enable = true;
lean = {
enable = true;
};
copilot-vim.enable = true;
};
opts = {
number = true;
@ -219,25 +334,215 @@
maplocalleader = " ";
};
keymaps = [
{ action = ":"; key = ";"; mode = [ "n" ]; }
{
action = ":";
key = ";";
mode = ["n"];
}
# { action = "gj"; key = "j"; mode = [ "n" ]; }
# { action = "gk"; key = "k"; mode = [ "n" ]; }
{ action = "<Esc>"; key = "jk"; mode = [ "i" ]; }
{
action = "<Esc>";
key = "jk";
mode = ["i"];
}
{ action = "<cmd>Telescope find_files<CR>"; key = "<leader><leader>"; options.desc = "Find Files"; }
{ action = "<cmd>Telescope live_grep<CR>"; key = "<leader>fg"; options.desc = "Grep";}
{ action = "<cmd>Telescope buffers<CR>"; key = "<leader>fb"; options.desc = "Find Buffers";}
{ action = "<cmd>Telescope projects<CR>"; key = "<leader>pp"; options.desc = "Switch Projects";}
{
action = "<cmd>Telescope find_files<CR>";
key = "<leader><leader>";
options.desc = "Find Files";
}
{
action.__raw = "function() require('telescope.builtin').lsp_document_symbols({symbols='method'}) end";
key = "<leader>fm";
options.desc = "Find Methods";
}
{
action = "<cmd>Telescope live_grep<CR>";
key = "<leader>fg";
options.desc = "Grep";
}
{
action = "<cmd>Telescope buffers<CR>";
key = "<leader>fb";
options.desc = "Find Buffers";
}
{
action = "<cmd>Telescope buffers<CR>";
key = "<leader>fb";
options.desc = "Find Buffers";
}
{
action = "<cmd>Telescope projects<CR>";
key = "<leader>pp";
options.desc = "Switch Projects";
}
{ action = "<cmd>Trouble diagnostics toggle<CR>"; key = "<leader>tr"; }
{ action = "<cmd>Neogit<CR>"; key = "<leader>gg"; options.desc = "Open Git"; }
{ action = "<cmd>NvimTreeToggle<CR>"; key = "<leader>tt"; options.desc = "Tree View";}
{
action = "<cmd>Trouble diagnostics toggle<CR>";
key = "<leader>tr";
}
{
action = "<cmd>Neogit<CR>";
key = "<leader>gg";
options.desc = "Open Git";
}
{
action = "<cmd>NvimTreeToggle<CR>";
key = "<leader>tt";
options.desc = "Tree View";
}
{ action.__raw = "function() require('flash').jump() end"; key = "s"; mode = [ "n" "x" "o" ]; options.desc = "Flash"; }
{ action.__raw = "function() require('flash').treesitter() end"; key = "S"; mode = [ "n" "x" "o" ]; options.desc = "Flash Treesitter"; }
{ action.__raw = "function() require('flash').remote() end"; key = "r"; mode = [ "o" ]; options.desc = "Remote Flash"; }
{ action.__raw = "function() require('flash').treesitter_search() end"; key = "R"; mode = [ "o" ]; options.desc = "Treesitter Search"; }
{ action.__raw = "function() require('flash').toggle() end"; key = "<c-s>"; mode = [ "c" ]; options.desc = "Toggle Flash"; }
{
action.__raw = "function() require('flash').jump() end";
key = "s";
mode = ["n" "x" "o"];
options.desc = "Flash";
}
{
action.__raw = "function() require('flash').treesitter() end";
key = "S";
mode = ["n" "x" "o"];
options.desc = "Flash Treesitter";
}
{
action.__raw = "function() require('flash').remote() end";
key = "r";
mode = ["o"];
options.desc = "Remote Flash";
}
{
action.__raw = "function() require('flash').treesitter_search() end";
key = "R";
mode = ["o"];
options.desc = "Treesitter Search";
}
{
action.__raw = "function() require('flash').toggle() end";
key = "<c-s>";
mode = ["c"];
options.desc = "Toggle Flash";
}
];
extraConfigLua = ''
vim.api.nvim_create_autocmd('FileType', {
group = vim.api.nvim_create_augroup('ziggy', {}),
pattern = 'ziggy',
callback = function()
vim.lsp.start {
name = 'Ziggy LSP',
cmd = { 'ziggy', 'lsp' },
root_dir = vim.loop.cwd(),
flags = { exit_timeout = 1000 },
}
end,
})
vim.api.nvim_create_autocmd('FileType', {
group = vim.api.nvim_create_augroup('ziggy_schema', {}),
pattern = 'ziggy_schema',
callback = function()
vim.lsp.start {
name = 'Ziggy LSP',
cmd = { 'ziggy', 'lsp', '--schema' },
root_dir = vim.loop.cwd(),
flags = { exit_timeout = 1000 },
}
end,
})
vim.api.nvim_create_autocmd('FileType', {
group = vim.api.nvim_create_augroup('superhtml', {}),
pattern = 'superhtml',
callback = function()
vim.lsp.start {
name = 'SuperHTML LSP',
cmd = { 'superhtml', 'lsp' },
root_dir = vim.loop.cwd(),
flags = { exit_timeout = 1000 },
}
end,
})
local parser_config = require(
'nvim-treesitter.parsers'
).get_parser_configs()
parser_config.ziggy = {
install_info = {
url = 'https://github.com/kristoff-it/ziggy',
includes = { 'tree-sitter-ziggy/src' },
files = { 'tree-sitter-ziggy/src/parser.c' },
branch = 'main',
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
filetype = 'ziggy',
}
parser_config.ziggy_schema = {
install_info = {
url = 'https://github.com/kristoff-it/ziggy',
files = { 'tree-sitter-ziggy-schema/src/parser.c' },
branch = 'main',
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
filetype = 'ziggy-schema',
}
parser_config.supermd = {
install_info = {
url = 'https://github.com/kristoff-it/supermd',
includes = { 'tree-sitter/supermd/src' },
files = {
'tree-sitter/supermd/src/parser.c',
'tree-sitter/supermd/src/scanner.c'
},
branch = 'main',
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
filetype = 'supermd',
}
parser_config.supermd_inline = {
install_info = {
url = 'https://github.com/kristoff-it/supermd',
includes = { 'tree-sitter/supermd-inline/src' },
files = {
'tree-sitter/supermd-inline/src/parser.c',
'tree-sitter/supermd-inline/src/scanner.c'
},
branch = 'main',
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
filetype = 'supermd_inline',
}
parser_config.superhtml = {
install_info = {
url = 'https://github.com/kristoff-it/superhtml',
includes = { 'tree-sitter-superhtml/src' },
files = {
'tree-sitter-superhtml/src/parser.c',
'tree-sitter-superhtml/src/scanner.c'
},
branch = 'main',
generate_requires_npm = false,
requires_generate_from_grammar = false,
},
filetype = 'superhtml',
}
vim.filetype.add {
extension = {
smd = 'supermd',
shtml = 'superhtml',
ziggy = 'ziggy',
['ziggy-schema'] = 'ziggy_schema',
},
}
'';
};
}

View File

@ -1,10 +1,14 @@
{ config, pkgs, inputs, ... }:
{
config,
pkgs,
inputs,
...
}: {
home.packages = [
pkgs.comic-mono
];
programs.wezterm = {
enable = true;
enable = false;
extraConfig = builtins.readFile ./wezterm.lua;
};
}
}

View File

@ -60,6 +60,16 @@ config.keys = {
nav_pane("j", "Down"),
nav_pane("k", "Up"),
nav_pane("l", "Right"),
{
key = ">",
mods = "LEADER",
action = wezterm.action.MoveTabRelative(1)
},
{
key = "<",
mods = "LEADER",
action = wezterm.action.MoveTabRelative(-1)
},
}
local function get_current_working_dir(tab)

View File

@ -1,8 +1,10 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [
zsh-completions
bat
fd
htop
ripgrep
@ -10,12 +12,23 @@
];
programs.bat = {
enable = true;
config = {
theme = "gruvbox-dark";
};
};
programs.dircolors = {
enable = true;
enableZshIntegration = true;
};
programs.zsh = {
enable = true;
history = {
size = 1000000;
extended = true;
append = true;
expireDuplicatesFirst = true;
ignoreDups = true;
ignoreAllDups = true;
ignoreSpace = true;
};
prezto = {
enable = true;
editor.keymap = "vi";
@ -34,7 +47,8 @@
];
};
shellAliases = {
cat = "bat";
cat = "bat --theme=\"$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo 'gruvbox-dark' || echo 'gruvbox-light')\"";
diff = "delta";
};
};
@ -53,6 +67,8 @@
enableZshIntegration = true;
settings = {
nodejs.disabled = true;
package.disabled = true;
aws.disabled = true;
};
};
}

View File

@ -1,6 +1,10 @@
{ config, pkgs, inputs, lib, ... }:
{
config,
pkgs,
inputs,
lib,
...
}: {
imports = [
../modules/zsh.nix
../modules/neovim.nix
@ -32,10 +36,8 @@
pkgs.zellij
pkgs.httpie
pkgs.emacs
pkgs.wezterm
pkgs.arc-browser
pkgs.raycast
pkgs.tailscale
pkgs.vscode
@ -89,17 +91,17 @@
# /etc/profiles/per-user/yadunut/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
JAVA_HOME="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home";
ANDROID_HOME="$HOME/Library/Android/sdk";
EDITOR="nvim";
VISUAL="nvim";
JAVA_HOME = "/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home";
ANDROID_HOME = "$HOME/Library/Android/sdk";
EDITOR = "nvim";
VISUAL = "nvim";
};
home.sessionPath = [
"$ANDROID_HOME/emulator"
"$ANDROID_HOME/platform-tools"
];
programs.zsh.shellAliases = {
lg = "lazygit";
programs.zsh.shellAliases = {
lg = "lazygit";
};
programs.direnv = {
@ -130,30 +132,30 @@
orange = "#cb4b16";
};
gruvbox-light = {
bg="#d5c4a1";
fg="#504945";
orange="#980005";
green="#79740e";
yellow="#d79921";
blue="#458588";
magenta="#b16286";
cyan="#689d6a";
black="#ebdbb2";
white="#3c3836";
red="#d65d0e";
bg = "#d5c4a1";
fg = "#504945";
orange = "#980005";
green = "#79740e";
yellow = "#d79921";
blue = "#458588";
magenta = "#b16286";
cyan = "#689d6a";
black = "#ebdbb2";
white = "#3c3836";
red = "#d65d0e";
};
gruvbox-dark = {
fg="#ebdbb2";
bg="#504945";
black="#3c3836";
red="#cc241d";
green="#98971a";
yellow="#d79921";
blue="#458588";
magenta="#b16286";
cyan="#689d6a";
white="#fbf1c7";
orange="#d65d0e";
fg = "#ebdbb2";
bg = "#504945";
black = "#3c3836";
red = "#cc241d";
green = "#98971a";
yellow = "#d79921";
blue = "#458588";
magenta = "#b16286";
cyan = "#689d6a";
white = "#fbf1c7";
orange = "#d65d0e";
};
};
};

View File

@ -6,6 +6,7 @@ bartender
brave-browser
calibre
cardhop
chatgpt
daisydisk
darktable
datagrip
@ -16,40 +17,35 @@ font-fantasque-sans-mono
font-jetbrains-mono
font-jetbrains-mono-nerd-font
fork
ghostty
google-chrome
handbrake
inkscape
insomnia
intellij-idea
keybase
kicad
kitty
launchcontrol
ledger-live
lens
logitech-g-hub
loom
lulu
microsoft-teams
mongodb-compass
notion
obs
obsidian
postman
protonvpn
pycharm
raycast
roam-research
skim
slack
spotify
steam
tailscale
telegram
the-unarchiver
thunderbird
todoist
utm
visual-studio-code
vlc
whatsapp
wireshark
whisky
zerotier-one
zoom
zotero
zulu@17

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
pkgs,
inputs,
...
}: {
imports = [
(import ../modules/zsh.nix)
(import ../modules/git.nix)
@ -24,30 +26,31 @@
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
pkgs.go
pkgs.beancount
pkgs.coq
# pkgs.dive
pkgs.entr
pkgs.fava
pkgs.typst
pkgs.typst-lsp
pkgs.tinymist
pkgs.lazygit
pkgs.jq
pkgs.nixfmt-rfc-style
pkgs.just
pkgs.pyright
pkgs.rsync
pkgs.k9s
pkgs.nil # nix lsp
pkgs.vscode-langservers-extracted
pkgs.zellij
pkgs.gh
pkgs.deno
pkgs.poppler
pkgs.procps
pkgs.rust-analyzer
pkgs.claude-code
pkgs.httpie
pkgs.emacs
pkgs.devenv
# (inputs.ziggy.outputs.packages.aarch64-darwin.ziggy)
# (inputs.superhtml.outputs.packages.aarch64-darwin.superhtml)
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
@ -61,9 +64,7 @@
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
@ -79,8 +80,8 @@
home.sessionVariables = {
EDITOR = "nvim";
VISUAL = "nvim";
JAVA_HOME="/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home";
ANDROID_HOME="$HOME/Library/Android/sdk";
JAVA_HOME = "/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home";
ANDROID_HOME = "$HOME/Library/Android/sdk";
};
home.sessionPath = [
@ -88,8 +89,8 @@
"$ANDROID_HOME/platform-tools"
];
programs.zsh.shellAliases = {
lg = "lazygit";
programs.zsh.shellAliases = {
lg = "lazygit";
};
programs.direnv = {
@ -102,7 +103,6 @@
};
programs.kitty.shellIntegration.enableZshIntegration = true;
programs.emacs.enable = true;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
@ -116,4 +116,13 @@
programs.gh = {
enable = true;
};
targets.darwin = {
defaults."com.apple.dock".autohide = true;
defaults."com.apple.finder".AppleShowAllFiles = true;
defaults.NSGlobalDomain.AppleShowAllExtensions = true;
defaults.NSGlobalDomain.KeyRepeat = 2;
defaults.NSGlobalDomain.ApplePressAndHoldEnabled = false;
};
}