update to a few things

This commit is contained in:
Anish Lakhwara 2024-09-03 21:43:23 -07:00
parent 57afd743b7
commit e5eef474c6
13 changed files with 539 additions and 1104 deletions

View file

@ -34,7 +34,7 @@
}, },
"locked": { "locked": {
"lastModified": 1682226636, "lastModified": 1682226636,
"narHash": "sha256-fmETHfUtQ5zOVr/4MT5wE7eNALCSQCnEUYZYmV3UEwg=", "narHash": "sha256-f/XuEoZYh+aubCfjeduvwZjd5X7IgRYnmuuhGsdfP/U=",
"ref": "main", "ref": "main",
"rev": "095d14ff2469c8f3de7cbf45d229c0f46a733aae", "rev": "095d14ff2469c8f3de7cbf45d229c0f46a733aae",
"revCount": 77, "revCount": 77,
@ -64,6 +64,23 @@
"type": "github" "type": "github"
} }
}, },
"crane": {
"flake": false,
"locked": {
"lastModified": 1686108916,
"narHash": "sha256-looLH5MdY4erLiJw0XwQohGdr0fJL9y6TJY3898RA2U=",
"owner": "ipetkov",
"repo": "crane",
"rev": "8ab1a49432695bd80ff4b7f6c6515da0e926d922",
"type": "github"
},
"original": {
"owner": "ipetkov",
"ref": "v0.12.2",
"repo": "crane",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -93,11 +110,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709771483, "lastModified": 1724561770,
"narHash": "sha256-Hjzu9nCknHLQvhdaRFfCEprH0o15KcaNu1QDr3J88DI=", "narHash": "sha256-zv8C9RNa86CIpyHwPIVO/k+5TfM8ZbjGwOOpTe1grls=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "550340062c16d7ef8c2cc20a3d2b97bcd3c6b6f6", "rev": "ac5694a0b855a981e81b4d9f14052e3ff46ca39e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -181,27 +198,46 @@
"type": "github" "type": "github"
} }
}, },
"eww": { "dream2nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "devshell": [
"sg-nvim",
"nci"
],
"flake-compat": [
"sg-nvim",
"nci"
],
"flake-parts": [
"sg-nvim",
"nci",
"parts"
],
"nix-unit": [
"sg-nvim",
"nci"
],
"nixpkgs": [ "nixpkgs": [
"sg-nvim",
"nci",
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": [ "pre-commit-hooks": [
"rust-overlay" "sg-nvim",
"nci"
] ]
}, },
"locked": { "locked": {
"lastModified": 1690660426, "lastModified": 1696373678,
"narHash": "sha256-YUuH1BZ3G5dhHRZ1Z9XPXyorm8vV8G+jYbcdIGxOcOs=", "narHash": "sha256-D5yaEkxi7VnoRsBDeHYB86FikFYDL/vq77ajo3Pa3Og=",
"owner": "elkowar", "owner": "nix-community",
"repo": "eww", "repo": "dream2nix",
"rev": "dc3129aee2806823bdad87785f7ef80651d5245c", "rev": "5e2577caaf87661e29405db7e117bda57b0e749d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "elkowar", "owner": "nix-community",
"repo": "eww", "repo": "dream2nix",
"type": "github" "type": "github"
} }
}, },
@ -224,11 +260,11 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1650374568, "lastModified": 1641205782,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8", "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -240,11 +276,11 @@
"flake-compat_3": { "flake-compat_3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1641205782, "lastModified": 1673956053,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -253,6 +289,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1638122382, "lastModified": 1638122382,
@ -287,24 +341,6 @@
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_3"
},
"locked": { "locked": {
"lastModified": 1687709756, "lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
@ -319,9 +355,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_5": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
@ -337,6 +373,64 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_5": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_6": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"sg-nvim",
"pre-commit-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"grasp": { "grasp": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
@ -402,16 +496,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1704099619, "lastModified": 1720042825,
"narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=", "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851", "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.11", "ref": "release-24.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -464,24 +558,43 @@
"type": "github" "type": "github"
} }
}, },
"llamacpp": { "mk-naked-shell": {
"inputs": { "flake": false,
"flake-utils": "flake-utils_3",
"nixpkgs": [
"unstable"
]
},
"locked": { "locked": {
"lastModified": 1691180171, "lastModified": 1681286841,
"narHash": "sha256-ZmSRPACkLlPWtKfux9o+FB0mXZbINowyb0057ouAL/0=", "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=",
"owner": "ggerganov", "owner": "yusdacra",
"repo": "llama.cpp", "repo": "mk-naked-shell",
"rev": "332311234a0aa2974b2450710e22e09d90dd6b0b", "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "ggerganov", "owner": "yusdacra",
"repo": "llama.cpp", "repo": "mk-naked-shell",
"type": "github"
}
},
"nci": {
"inputs": {
"crane": "crane",
"dream2nix": "dream2nix",
"mk-naked-shell": "mk-naked-shell",
"nixpkgs": "nixpkgs_5",
"parts": "parts",
"rust-overlay": "rust-overlay_2",
"treefmt": "treefmt"
},
"locked": {
"lastModified": 1696572678,
"narHash": "sha256-rcznf00l41VtjzvEGMWOxaj5J/5twES6n30VwbJMgl0=",
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"rev": "cacb6c94004a35676c193f04afa8821758986bf0",
"type": "github"
},
"original": {
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"type": "github" "type": "github"
} }
}, },
@ -506,7 +619,7 @@
"nix-homebrew": { "nix-homebrew": {
"inputs": { "inputs": {
"brew-src": "brew-src", "brew-src": "brew-src",
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_3",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
@ -527,7 +640,7 @@
"nix-matrix-appservices": { "nix-matrix-appservices": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_2",
"nixlib": "nixlib", "nixlib": "nixlib",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
@ -589,6 +702,40 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1696019113,
"narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685801374,
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1688049487, "lastModified": 1688049487,
@ -623,16 +770,80 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1704874635, "lastModified": 1724531977,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", "narHash": "sha256-XROVLf9ti4rrNCFLr+DmXRZtPjCQTW4cYy59owTEmxk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", "rev": "2527da1ef492c495d5391f3bcf9c1dd9f4514e32",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-23.11", "ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1696193975,
"narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1696419054,
"narHash": "sha256-EdR+dIKCfqL3voZUDYwcvgRDOektQB9KbhBVcE0/3Mo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7131f3c223a2d799568e4b278380cd9dac2b8579",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1689261696,
"narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "df1eee2aa65052a18121ed4971081576b25d6b5c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1681358109,
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -652,6 +863,28 @@
"type": "github" "type": "github"
} }
}, },
"parts": {
"inputs": {
"nixpkgs-lib": [
"sg-nvim",
"nci",
"nixpkgs"
]
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"poonam": { "poonam": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -659,11 +892,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709870438, "lastModified": 1724637654,
"narHash": "sha256-vhkb5g7bM/y1j3mb42lV5KIGNGTy1xMm5h6UkQvJReY=", "narHash": "sha256-YXmWxUEG3NDsLn46Ctrgn7YcT/h0fsCAxKcSgIhCSLo=",
"ref": "main", "ref": "main",
"rev": "4384fc4dc19822cbfd5ead1fcdb77cac8d238cff", "rev": "521e360df123a530fc4c99187e3580bd5d086a9d",
"revCount": 1376, "revCount": 1467,
"type": "git", "type": "git",
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab" "url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
}, },
@ -673,6 +906,28 @@
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab" "url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
} }
}, },
"pre-commit-nix": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_5",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs_7",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1696516544,
"narHash": "sha256-8rKE8Je6twTNFRTGF63P9mE3lZIq917RAicdc4XJO80=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "66c352d33e0907239e4a69416334f64af2c685cc",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
@ -680,14 +935,12 @@
"darwin": "darwin_2", "darwin": "darwin_2",
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"disko": "disko", "disko": "disko",
"eww": "eww",
"grasp": "grasp", "grasp": "grasp",
"hardware": "hardware", "hardware": "hardware",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"homebrew-bundle": "homebrew-bundle", "homebrew-bundle": "homebrew-bundle",
"homebrew-cask": "homebrew-cask", "homebrew-cask": "homebrew-cask",
"homebrew-core": "homebrew-core", "homebrew-core": "homebrew-core",
"llamacpp": "llamacpp",
"nix-homebrew": "nix-homebrew", "nix-homebrew": "nix-homebrew",
"nix-matrix-appservices": "nix-matrix-appservices", "nix-matrix-appservices": "nix-matrix-appservices",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
@ -695,6 +948,8 @@
"nur": "nur", "nur": "nur",
"poonam": "poonam", "poonam": "poonam",
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay",
"sg-nvim": "sg-nvim",
"sourcegraph-src-cli-cask": "sourcegraph-src-cli-cask",
"tidalcycles": "tidalcycles", "tidalcycles": "tidalcycles",
"unstable": "unstable", "unstable": "unstable",
"vimwikicli": "vimwikicli" "vimwikicli": "vimwikicli"
@ -702,7 +957,7 @@
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_4",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -721,6 +976,79 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_2": {
"flake": false,
"locked": {
"lastModified": 1696558324,
"narHash": "sha256-TnnP4LGwDB8ZGE7h2n4nA9Faee8xPkMdNcyrzJ57cbw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "fdb37574a04df04aaa8cf7708f94a9309caebe2b",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_3": {
"inputs": {
"flake-utils": "flake-utils_6",
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1696558324,
"narHash": "sha256-TnnP4LGwDB8ZGE7h2n4nA9Faee8xPkMdNcyrzJ57cbw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "fdb37574a04df04aaa8cf7708f94a9309caebe2b",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sg-nvim": {
"inputs": {
"flake-parts": "flake-parts",
"nci": "nci",
"nixpkgs": "nixpkgs_6",
"pre-commit-nix": "pre-commit-nix",
"rust-overlay": "rust-overlay_3"
},
"locked": {
"lastModified": 1716664639,
"narHash": "sha256-5wzTW9kJGYq41kXG9JoVAaA5601K26cDrweT2PtpEw8=",
"owner": "sourcegraph",
"repo": "sg.nvim",
"rev": "8bdd4d19da2268072708d5fe18fda9c23e16509d",
"type": "github"
},
"original": {
"owner": "sourcegraph",
"repo": "sg.nvim",
"type": "github"
}
},
"sourcegraph-src-cli-cask": {
"flake": false,
"locked": {
"lastModified": 1722629753,
"narHash": "sha256-3OwvDSoVzklr3ca1qCXR27Kc8hGjshRRdtVQ8OUXQCc=",
"owner": "sourcegraph",
"repo": "homebrew-src-cli",
"rev": "130bd8ab70961e5c1f890811bfb1f7552a2ee5a9",
"type": "github"
},
"original": {
"owner": "sourcegraph",
"repo": "homebrew-src-cli",
"type": "github"
}
},
"superdirt-src": { "superdirt-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -798,6 +1126,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tidal-src": { "tidal-src": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -841,13 +1184,35 @@
"type": "github" "type": "github"
} }
}, },
"treefmt": {
"inputs": {
"nixpkgs": [
"sg-nvim",
"nci",
"nixpkgs"
]
},
"locked": {
"lastModified": 1695822946,
"narHash": "sha256-IQU3fYo0H+oGlqX5YrgZU3VRhbt2Oqe6KmslQKUO4II=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "720bd006d855b08e60664e4683ccddb7a9ff614a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"unstable": { "unstable": {
"locked": { "locked": {
"lastModified": 1704194953, "lastModified": 1724819573,
"narHash": "sha256-RtDKd8Mynhe5CFnVT8s0/0yqtWFMM9LmCzXv/YKxnq4=", "narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bd645e8668ec6612439a9ee7e71f7eac4099d4f6", "rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -3,12 +3,12 @@
inputs = { inputs = {
# Nixpkgs # Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
unstable.url = "github:nixos/nixpkgs/nixos-unstable"; unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# Home manager # Home manager
home-manager.url = "github:nix-community/home-manager/release-23.11"; home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
hardware.url = "github:nixos/nixos-hardware"; hardware.url = "github:nixos/nixos-hardware";
@ -55,21 +55,21 @@
flake = false; flake = false;
}; };
# Sourcegraph
sourcegraph-src-cli-cask = {
url = "github:sourcegraph/homebrew-src-cli";
flake = false;
};
sg-nvim.url = "github:sourcegraph/sg.nvim";
# Others # Others
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
rust-overlay = { rust-overlay = {
url = "github:oxalica/rust-overlay"; url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
eww = {
url = "github:elkowar/eww";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay";
};
tidalcycles.url = "github:mitchmindtree/tidalcycles.nix"; tidalcycles.url = "github:mitchmindtree/tidalcycles.nix";
tidalcycles.inputs.nixpkgs.follows = "unstable"; tidalcycles.inputs.nixpkgs.follows = "unstable";
llamacpp.url = "github:ggerganov/llama.cpp";
llamacpp.inputs.nixpkgs.follows = "unstable";
# TODO hundred rabbits software # TODO hundred rabbits software
# TODO needs secrets # TODO needs secrets
# dhyan.url = "git+ssh://gitea@git.sealight.xyz/aynish/dhyan?ref=main"; # dhyan.url = "git+ssh://gitea@git.sealight.xyz/aynish/dhyan?ref=main";
@ -94,14 +94,14 @@
, nur , nur
, tidalcycles , tidalcycles
, rust-overlay , rust-overlay
, eww
, llamacpp
, vimwikicli , vimwikicli
, darwin , darwin
, nix-homebrew , nix-homebrew
, homebrew-bundle , homebrew-bundle
, homebrew-core , homebrew-core
, homebrew-cask , homebrew-cask
, sourcegraph-src-cli-cask
, sg-nvim
, ... , ...
}@inputs: }@inputs:
let let
@ -116,9 +116,7 @@
# We already have these in scope # We already have these in scope
unstable = unstable.legacyPackages.${prev.system}; unstable = unstable.legacyPackages.${prev.system};
deploy = deploy-rs.packages.${prev.system}.deploy-rs; deploy = deploy-rs.packages.${prev.system}.deploy-rs;
}; sg-nvim = sg-nvim.packages.${prev.system}.default;
llamaOverlay = final: prev: {
llama = llamacpp.packages.${prev.system}.default;
}; };
vimwikiOverlay = final: prev: { vimwikiOverlay = final: prev: {
vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli; vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli;
@ -131,6 +129,7 @@
"VCV-Rack" "VCV-Rack"
"SunVox" "SunVox"
"renoise" "renoise"
"graphite-cli"
]; ];
# config.permittedInsecurePackages = [ # config.permittedInsecurePackages = [
# "python3.10-django-3.1.14" # Needed for archivebox deployments on curve # "python3.10-django-3.1.14" # Needed for archivebox deployments on curve
@ -143,7 +142,6 @@
nur.overlay nur.overlay
nix-matrix-appservices.overlay nix-matrix-appservices.overlay
unstableOverlay unstableOverlay
llamaOverlay
# TODO Not available publically # TODO Not available publically
# vimwikiOverlay # vimwikiOverlay
self.overlays.additions self.overlays.additions
@ -195,9 +193,9 @@
specialArgs = { inherit inputs self; }; specialArgs = { inherit inputs self; };
modules = [ modules = [
./hosts/darwin ./hosts/darwin
# agenix.darwinModule.age
home-manager.darwinModules.home-manager home-manager.darwinModules.home-manager
nix-homebrew.darwinModules.nix-homebrew agenix.darwinModules.default
# nix-homebrew.darwinModules.nix-homebrew
{ {
users.users.anishlakhwara.home = "/Users/anishlakhwara"; users.users.anishlakhwara.home = "/Users/anishlakhwara";
home-manager = { home-manager = {
@ -205,17 +203,18 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
}; };
nix-homebrew = { # nix-homebrew = {
user = "anishlakhwara"; # user = "anishlakhwara";
enable = true; # enable = true;
taps = { # # taps = {
"homebrew/homebrew-core" = homebrew-core; # # "homebrew/homebrew-core" = homebrew-core;
"homebrew/homebrew-cask" = homebrew-cask; # # "homebrew/homebrew-cask" = homebrew-cask;
"homebrew/homebrew-bundle" = homebrew-bundle; # # "homebrew/homebrew-bundle" = homebrew-bundle;
}; # # "sourcegraph/homebrew-src-cli" = sourcegraph-src-cli-cask;
mutableTaps = false; # # };
autoMigrate = true; # mutableTaps = true;
}; # autoMigrate = true;
# };
} }
]; ];
}; };

View file

@ -1,7 +1,7 @@
{ self, pkgs, ... }: { self, pkgs, ... }:
{ {
imports = [ imports = [
../profiles/nvim # ../profiles/nvim
../profiles/cli ../profiles/cli
../profiles/direnv ../profiles/direnv
../profiles/git ../profiles/git

View file

@ -14,7 +14,27 @@
home.homeDirectory = "/Users/anishlakhwara"; home.homeDirectory = "/Users/anishlakhwara";
home.stateVersion = "22.05"; home.stateVersion = "22.05";
programs.zsh.initExtra = "PATH=/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH"; # networking.wg-quick.interfaces = {
# wg0 = {
# address = [ "10.0.69.7/24" ];
# listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers)
# privateKeyFile = "/run/agenix/work-wg";
# peers = [
# # For a client configuration, one peer entry for the server will suffice.
# {
# publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI=";
# allowedIPs = [ "10.0.69.0/24" ];
# # Set this to the server IP and port.
# endpoint = "sealight.xyz:60990"; # TODO: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577
# persistentKeepalive = 25;
# }
# ];
# };
# };
programs.zsh.initExtra = ''
PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH
'';
# Managing sketchybar plugins from home-manager # Managing sketchybar plugins from home-manager
home.file = { home.file = {

View file

@ -7,6 +7,8 @@
dasht dasht
dosfstools dosfstools
# git # git
git-machete
asciinema
bottom bottom
gptfdisk gptfdisk
starship starship
@ -35,7 +37,7 @@
eza eza
bat bat
fd fd
ncdu # ncdu
duf duf
trash-cli trash-cli
nix-index nix-index
@ -255,6 +257,7 @@
# git # git
g = "git"; g = "git";
gl = "git log --pretty=oneline --abbrev-commit";
# grep # grep
grep = "rg"; grep = "rg";

View file

@ -15,6 +15,9 @@
default = current default = current
[pull] [pull]
rebase = true rebase = true
[merge]
mergetool = nvim -d
conflictstyle = diff3
[alias] [alias]
unadd = reset HEAD unadd = reset HEAD
# data analysis # data analysis

View file

@ -1,972 +1,18 @@
{ pkgs, ... }: { pkgs, ... }:
let
customPlugins = {
vim-zettel = pkgs.vimUtils.buildVimPlugin {
name = "vim-zettel";
src = pkgs.fetchFromGitHub {
owner = "michal-h21";
repo = "vim-zettel";
rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d";
sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
};
};
lsp-format = pkgs.vimUtils.buildVimPlugin {
name = "lsp-format";
src = pkgs.fetchFromGitHub {
owner = "lukas-reineke";
repo = "lsp-format.nvim";
rev = "84e117b99bb2bc0d0c8122e2b256046f046f8aff";
sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4=";
};
};
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
name = "lspsaga.nvim";
src = pkgs.fetchFromGitHub {
owner = "glepnir";
repo = "lspsaga.nvim";
rev = "b7b4777369b441341b2dcd45c738ea4167c11c9e";
sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk=";
};
};
nvim-luapad = pkgs.vimUtils.buildVimPlugin {
name = "nvim-luapad";
src = pkgs.fetchFromGitHub {
owner = "rafcamlet";
repo = "nvim-luapad";
rev = "9815e2659ce8e2ef4b55e401531cf09b6423e0ea";
sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo=";
};
};
leap = pkgs.vimUtils.buildVimPlugin {
name = "leap";
src = pkgs.fetchFromGitHub {
owner = "ggandor";
repo = "leap.nvim";
rev = "1bb1fec369b1e9ae96e6ff1b829ea9272c51f844";
sha256 = "dH0v1D5q5OlMLA/omTDMb/taKyIgQ5VfVMYXJ609k/k=";
};
};
nvim-navic = pkgs.vimUtils.buildVimPlugin {
name = "nvim-navic";
src = pkgs.fetchFromGitHub {
owner = "SmiteshP";
repo = "nvim-navic";
rev = "096b23e73c84a653fd317c0c10261875fa573a6d";
sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc=";
};
};
my-which-key-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "which-key.nvim";
version = "2022-05-04";
src = pkgs.fetchFromGitHub {
owner = "folke";
repo = "which-key.nvim";
rev = "bd4411a2ed4dd8bb69c125e339d837028a6eea71";
sha256 = "0vf685xgdb967wmvffk1pfrvbhg1jkvzp1kb7r0vs90mg8gpv1aj";
};
meta.homepage = "https://github.com/folke/which-key.nvim/";
};
scnvim = pkgs.vimUtils.buildVimPlugin {
pname = "scnvim";
version = "2022-06-04";
src = pkgs.fetchFromGitHub {
owner = "davidgranstrom";
repo = "scnvim";
rev = "746cc0db820d02a9c36b8f9ba2eac9725fa73107";
sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc=";
};
};
yuck-vim = pkgs.vimUtils.buildVimPlugin {
pname = "yuck.vim";
version = "2021-08-09";
src = pkgs.fetchFromGitHub {
owner = "elkowar";
repo = "yuck.vim";
rev = "6dc3da77c53820c32648cf67cbdbdfb6994f4e08";
sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE=";
};
};
nvim-parinfer = pkgs.vimUtils.buildVimPlugin {
pname = "nvim-parinfer";
version = "v1.2.0";
src = pkgs.fetchFromGitHub {
owner = "gpanders";
repo = "nvim-parinfer";
rev = "82bce5798993f4fe5ced20e74003b492490b4fe8";
sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc=";
};
};
my-marks = pkgs.vimUtils.buildVimPlugin {
pname = "marks";
version = "2022-08-31";
src = pkgs.fetchFromGitHub {
owner = "chentoast";
repo = "marks.nvim";
rev = "b27cbb78e9082229590b396d3ae4fe07f1aeafe0";
sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk=";
};
};
my-fterm = pkgs.vimUtils.buildVimPlugin {
pname = "fterm";
version = "2022-07-22";
src = pkgs.fetchFromGitHub {
owner = "numToStr";
repo = "FTerm.nvim";
rev = "efd10656724a269e21ba68d65e2b058a4e606424";
sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE=";
};
};
my-nvim-peekup = pkgs.vimUtils.buildVimPlugin {
pname = "nvim-peekup";
version = "0.1.0";
src = pkgs.fetchFromGitHub {
owner = "gennaro-tedesco";
repo = "nvim-peekup";
rev = "73a67c1ee3b5a7ea7b42d85399bf093f428c8ee3";
sha256 = "czKjJgCpvRSdtR7rNGlJrluDgPIdx94KUyx33op5gdY=";
};
};
};
my-python-packages = python-packages: with python-packages; [
tasklib
pynvim
six
pylsp-mypy
#pyls-isort
#pyls-black
black
isort
# other python packages you want
];
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
in
{ {
home.sessionVariables.EDITOR = "nvim"; home.sessionVariables.EDITOR = "nvim";
home.shellAliases = { home.shellAliases = {
k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD"; k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD";
# kitaab zettel
kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD";
# kitaab recents
kr = "cd /home/anish/kitaab/vimwiki; exa --sort=modified --reverse | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
# kitaab get by tagged
kt = "cd /home/anish/kitaab/vimwiki; exa *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
# List files that have no links in them
ku = "cd /home/anish/kitaab/;vim ./vimwiki/$(python3 poonam/main.py report --titles=false | tail -n +4 | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./vimwiki/{}');cd $OLDPWD";
}; };
# Add %update to the highlight clause for vimwiki files
home.file.".config/nvim/after/syntax/vimwiki.vim".text = ''
" match with %update
syntax match VimwikiPlaceholder /^\s*%update\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
" match with %link
syntax match VimwikiPlaceholder /^\s*%link\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
'';
#environment.systemPackages = with customPlugins; [ tidal ];
programs.neovim = { programs.neovim = {
enable = true; enable = true;
package = pkgs.unstable.neovim-unwrapped;
extraConfig = '' extraPackages = with pkgs; [
" so our custom files still get included # used for Cody
set runtimepath+=/home/anish/.config/nvim/
set tabstop=2
set showmatch
set shiftwidth=2
set noexpandtab
set autoindent
set undofile
set signcolumn=auto:4
set title
" set foldmethod=indent " fold based on indent
set number
set nocompatible
set relativenumber
set showtabline=2
set noexpandtab
set autowriteall
set list lcs=tab:\|\
filetype plugin on
" include - in word to move across easier in lisp / clojure
set iskeyword+=-
set termguicolors
colorscheme ayu-mirage
" set spell
set spelllang=en_gb
set ignorecase
set smartcase
set incsearch
" if hidden is not set, TextEdit might fail.
set hidden
" Some servers have issues with backup files, see #649
set nobackup
set nowritebackup
" Better display for messages
set cmdheight=2
" You will have bad experience for diagnostic messages when it's default 4000.
set updatetime=300
" don't give |ins-completion-menu| messages.
set shortmess+=c
" always show signcolumns
set signcolumn=yes
" highlight row
set cursorline
let mapleader = "\<Space>"
let maplocalleader = ","
" window
nmap <leader>wh :topleft vnew<CR>
nmap <leader>wl :botright vnew<CR>
nmap <leader>wk :topleft new<CR>
nmap <leader>wj :botright new<CR>
" tabs
nmap <leader>rt :retab!<CR>
vmap <leader>rt :retab!<CR>
" moving splits with vim movements.
:tnoremap <A-h> <C-\><C-N><C-w>h
:tnoremap <A-j> <C-\><C-N><C-w>j
:tnoremap <A-k> <C-\><C-N><C-w>k
:tnoremap <A-l> <C-\><C-N><C-w>l
:inoremap <A-h> <C-\><C-N><C-w>h
:inoremap <A-j> <C-\><C-N><C-w>j
:inoremap <A-k> <C-\><C-N><C-w>k
:inoremap <A-l> <C-\><C-N><C-w>l
:nnoremap <A-h> <leader>h
:nnoremap <A-j> <leader>j
:nnoremap <A-k> <leader>k
:nnoremap <A-l> <leader>l
:nnoremap <F5> "=strftime("%Y-%m-%d %H:%M")<CR>
:inoremap <F5> <C-R>=strftime("%Y-%m-%d %H:%M")<CR>
:inoremap <F4> <C-R>=strftime("%H:%M")<CR>
" tidal nvim terminal
let g:tidal_target = "terminal"
" latex
" let g:tex_flavor='latex'
" let g:vimtex_view_method='zathura'
" let g:vimtex_quickfix_mode=0
" set conceallevel=1
" let g:tex_conceal='abdmg'
" telescope
" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
nnoremap <leader>ft <cmd>Telescope tags<cr>
" exit normal mode in terminal
:tnoremap <C-n> <C-\><C-n>
" Sexp in Conjure (since it's fennel)
let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck"
let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"
" we only use fennel with love; no we don't...
let g:conjure#client#fennel#stdio#command = "fennel"
" let g:conjure#extract#tree_sitter#enabled = true
map <localleader>lt :ConjureLogToggle<CR>
let g:rainbow_active = 0
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
" general commands
map <leader>t :NERDTreeToggle<CR>
map <leader>s :w<CR>
map <leader>q :q<CR>
map <leader>r :RainbowParenthesesToggleAll<CR>
nnoremap <BS> :noh<CR>
map Q <Nop>
nnoremap Y y$
nnoremap <leader>n :vnew<CR>
" center moving
nnoremap n nzzzv
nnoremap N Nzzzv
nnoremap J mzJ'z
" undo points
inoremap , ,<c-g>u
inoremap . .<c-g>u
inoremap ? ?<c-g>u
inoremap ! !<c-g>u
inoremap ) )<c-g>u
inoremap [ [<c-g>u
inoremap ] ]<c-g>u
inoremap { {<c-g>u
inoremap ( (<c-g>u
inoremap } }<c-g>u
" moving text
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '>-2<CR>gv=gv
inoremap <c-j> <esc>:m .+1<CR>==
inoremap <c-k> <esc>:m .-2<CR>==
nnoremap <leader>j <esc>:m .+1<CR>==
nnoremap <leader>k <esc>:m .-2<CR>==
" Pasting
:map <leader>sy :!xclip -i<CR><CR>
:vmap <leader>sy "*y
:map <leader>sp :r!xclip -o<CR>
" barbar
nnoremap <silent> gT :BufferPrevious<CR>
nnoremap <silent> gt :BufferNext<CR>
nnoremap <silent> gj :BufferPick<CR>
nnoremap <silent> gq :BufferClose<CR>
" git
nnoremap <leader>ga :G fetch --all
nmap <leader>gs :G<CR>
nmap <leader>gl :diffget //3<CR>
nmap <leader>gh :diffget //2<CR>
nmap <leader>gb :GBranches<CR>
nnoremap <leader>gp :Git! push<CR>
nnoremap <leader>gd :Gdiff<CR>
nnoremap <leader>gc :G commit -v -q %:p<CR>
" kitaab
map <leader>cz :VimwikiIndex<CR>:ZettelNew
map <leader>zs :ZettelSearch<CR>
map <leader>zn :ZettelNew<CR>
map <leader>zo :ZettelOpen<CR>
map <leader>zf :Telescope oldfiles only_cwd=true<CR>
map <leader>wt :VimwikiMakeTomorrowDiaryNote
map <leader>wd :VimwikiMakeYesterdayDiaryNote
map <leader>zm :ZenMode<CR>:setlocal nospell<CR>
let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 1 }]
let g:sync_taskwarrior = 0
let g:zettel_format = "%y%m%d-%H%M"
let g:vimwiki_list = [{'path': '~/kitaab/vimwiki', 'nested_syntaxes': {'python': 'python', 'c++': 'cpp', 'nix': 'nix', 'bash': 'sh'}}]
let g:mapleader="\<Space>"
" fzf
" not sure we even use this
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
" lsp commands
nnoremap <leader>vgd :lua vim.lsp.buf.definition()<CR>
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
" nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
" nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
" nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
" nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
" nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
" nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
" lspsaga stuff doesn't work
nnoremap <leader>vd :Lspsaga peek_definition<CR>
nnoremap <leader>vrn :Lspsaga rename<CR><CR>
nnoremap <leader>vh :Lspsaga hover_doc<CR>
nnoremap <leader>vca :Lspsaga code_action<CR>
nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR>
nnoremap <leader>vs :Dasht<Space>
nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR>
nnoremap <leader>vo :LSoutlineToggle<CR>
" dashboard
let g:dashboard_custom_header = [
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\' ',
\]
let g:dashboard_default_executive = 'telescope'
nmap <Leader>ss :<C-u>SessionSave<CR>
nmap <Leader>sl :<C-u>SessionLoad<CR>
" nnoremap <silent> <Leader>fh :DashboardFindHistory<CR>
" nnoremap <silent> <Leader>fm :DashboardJumpMark<CR>
" nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
autocmd FileType dashboard set showtabline=0 | autocmd WinLeave <buffer> set showtabline=2
let g:dashboard_custom_footer = ["Run wild"]
let g:dashboard_custom_section={
\ 'create_zettel': {
\ 'description': [' Create Zettel SPC c z'],
\ 'command': ':VimwikiIndex' },
\ 'load_session': {
\ 'description': [' Load Session SPC s l'],
\ 'command': 'SessionLoad' }
\ }
let g:scnvim_snippet_format = "luasnip"
" lua config
lua <<EOF
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
vim.g.diagnostics_active = true
function _G.toggle_diagnostics()
if vim.g.diagnostics_active then
vim.g.diagnostics_active = false
vim.lsp.diagnostic.clear(0)
vim.lsp.handlers["textDocument/publishDiagnostics"] = function() end
else
vim.g.diagnostics_active = true
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = true,
signs = true,
underline = true,
update_in_insert = false,
}
)
end
end
vim.diagnostic.config({
signs = true,
update_in_insert = false,
underline = false,
severity_sort = true,
float = {
focusable = false,
style = 'minimal',
border = 'rounded',
source = 'always',
},
})
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
vim.lsp.handlers.hover,
{
border = 'rounded',
}
)
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
vim.lsp.handlers.signature_help,
{
border = 'rounded',
}
)
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
opts = opts or {}
opts.border = opts.border or 'rounded'
return orig_util_open_floating_preview(contents, syntax, opts, ...)
end
vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true})
-- autopairs
require('nvim-autopairs').setup{}
-- marks
require('marks').setup{}
-- Setup nvim-cmp.
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
local lspkind = require("lspkind")
local cmp = require('cmp')
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local check_back_space = function()
local col = vim.fn.col(".") - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil
end
cmp.setup {
formatting = {
format = lspkind.cmp_format({
mode = 'symbol_text',
maxwidth = 50,
})
},
mapping = {
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Insert,
select = true
}),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, {"i", "s"}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
},
snippet = {
expand = function(args)
require'luasnip'.lsp_expand(args.body)
end
},
sources = {
{name = 'buffer'}, {name = 'nvim_lsp'},
{name = "look"}, {name = "path"},
{name = "calc"}, {name = "spell"},
{name = 'cmp-conjure'}, {name = "luasnip"},
{name = 'tags'}
},
completion = {completeopt = 'menu,menuone,noinsert'}
}
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
require("luasnip.loaders.from_vscode").lazy_load()
-- null-ls
-- being very janky
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.proselint.with({ filetypes = { "vimwiki", "mail", }, }),
null_ls.builtins.diagnostics.commitlint,
null_ls.builtins.diagnostics.jsonlint,
-- null_ls.builtins.code_actions.statix,
-- null_ls.builtins.diagnostics.clj_kondo,
-- null_ls.builtins.formatting.isort,
-- null_ls.builtins.formatting.black,
},
})
-- Setup lspconfig
require("lsp-format").setup {}
require("nvim-navic").setup {}
local format = require("lsp-format")
local navic = require("nvim-navic")
-- lspsaga, code_action lightbulb is annoying
local saga = require('lspsaga')
saga.init_lsp_saga({
border_style = "rounded",
code_action_icon = "",
code_action_num_shortcut = true,
code_action_lightbulb = {
enable = false,
enable_in_insert = false,
cache_code_action = true,
sign = true,
update_time = 150,
sign_priority = 20,
virtual_text = false,
},
code_action_keys = {
quit = 'q',
exec = '<CR>',
},
-- show outline
show_outline = {
win_position = 'right',
--set special filetype win that outline window split.like NvimTree neotree
-- defx, db_ui
auto_enter = true,
auto_preview = true,
virt_text = '',
jump_key = 'o',
-- auto refresh when change buffer
auto_refresh = true,
},
})
capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require('lspconfig')
-- fennel-ls is bleeding edge
-- require("lspconfig.configs")["fennel-ls"] = {
-- default_config = {
-- cmd = {"fennel-ls"},
-- filetypes = {"fennel"},
-- root_dir = function(dir) return lspconfig.util.find_git_ancestor(dir) end,
-- settings = {}
-- }
-- }
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'lua_ls'}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = function(client, bufnr)
format.on_attach(client)
navic.attach(client, bufnr)
end,
capabilities = capabilities,
}
end
-- rnix doesn't support gps
lspconfig['rnix'].setup {
on_attach = function(client, bufnr)
format.on_attach(client)
end,
capabilities = capabilities,
}
-- fennel-ls doesn't support gps
-- lspconfig['fennel-ls'].setup {
-- on_attach = function(client, bufnr)
-- format.on_attach(client)
-- end,
-- capabilities = capabilities,
-- }
-- deprecated pylsp
-- require('lspconfig').pylsp.setup {
-- on_attach = function(client, bufnr)
-- format.on_attach(client)
-- navic.attach(client, bufnr)
-- end,
-- capabilities = capabilities,
-- settings = {
-- pylsp = {
-- configurationSources = { "flake8", "mypy", "black" },
-- plugins = {
-- black = {enabled = true},
-- jedi_signature_help = {enabled = true},
-- jedi_completion = { include_params = true },
-- pylsp_mypy={ enabled = true },
-- pycodestyle={
-- enabled=true,
-- ignore={'E501', 'E231'},
-- maxLineLength=120,
-- },
-- },
-- },
-- },
-- }
require('gitsigns').setup { sign_priority=80 }
-- treesitter
require('nvim-treesitter.configs').setup {
-- parser_install_dir = "~/.local/share/nvim/site/parser/",
-- ensure_installed={'nix', 'clojure', 'python', 'fennel', 'lua', 'html', 'css', 'regex', 'supercollider', 'beancount', 'janet'},
highlight = { enabled = true, additional_vim_regex_highting = true, },
textobjects = { enabled = true },
}
-- 'glsl' needs c++ compiler lol
-- lualine
local navic = require("nvim-navic")
require('lualine').setup {
options = { theme = 'ayu' },
sections = {
lualine_c = {
'filename', { navic.get_location, condition=navic.is_available },
},
lualine_y = {
function()
local msg = 'No Active Lsp'
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
local clients = vim.lsp.get_active_clients()
if next(clients) == nil then
return msg
end
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
return msg
end
},
lualine_x = {'filetype'}
}
}
-- nvim-lint
-- require('lint').linters_by_ft = {
-- markdown = {'vale'},
-- }
-- f_term
local map = vim.api.nvim_set_keymap
local opts = { noremap = true, silent = true }
map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
map('t', '<A-i>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
-- Custom functions
function update_date()
local time = os.date("%Y-%m-%d %H:%M")
local message = "%update " .. time
local lines = vim.api.nvim_buf_get_lines(0, 0,4,false)
for i=1,4,1 do
if (lines[i]:len() == 0) then
vim.api.nvim_buf_set_lines(0, i-1, i, false, {message, ""})
return
end
end
if (lines[4]:len() ~= 0) then
vim.api.nvim_buf_set_lines(0, 3, 4, false, {message})
end
return
end
vim.api.nvim_create_autocmd(
"BufWritePre",
{ pattern = { "*.wiki" }, callback = update_date}
)
-- set spelling for text files
vim.api.nvim_create_autocmd(
{ "BufRead", "BufNewFile" },
{ pattern = { "*.wiki", "*.txt", "*.md", "*.tex" },
command = "setlocal spell" }
)
vim.api.nvim_create_autocmd(
"FileType",
{ pattern = { "mail" },
command = "setlocal spell" }
)
-- auto session
require('auto-session').setup {
log_level = 'info',
auto_session_suppress_dirs = {'~/'}
}
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal"
require("which-key").setup{}
require('leap').set_default_keymaps()
-- supercollider
-- local scnvim = require 'scnvim'
-- local map = scnvim.map
-- local map_expr = scnvim.map_expr
-- scnvim.setup {
-- keymaps = {
-- ['<localleader>e'] = map('editor.send_line', {'i', 'n'}),
-- ['<localleader>s'] = map_expr('CmdPeriod.run', {'i', 'n'}),
-- ['<localleader>t'] = {
-- map('editor.send_block', {'i', 'n'}),
-- map('editor.send_selection', 'x'),
-- },
-- ['<CR>'] = map('postwin.toggle'),
-- ['<M-CR>'] = map('postwin.toggle', 'i'),
-- ['<M-L>'] = map('postwin.clear', {'n', 'i'}),
-- ['<C-k>'] = map('signature.show', {'n', 'i'}),
-- ['<F12>'] = map('sclang.hard_stop', {'n', 'x', 'i'}),
-- ['<leader>st'] = map('sclang.start'),
-- ['<leader>sk'] = map('sclang.recompile'),
-- ['<F1>'] = map_expr('s.boot'),
-- ['<F2>'] = map_expr('s.meter'),
-- }
-- }
-- You gotta run :SCNvimGenerateAssets for this first
-- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets())
-- zen mode
require('zen-mode').setup{
window = {
backdrop = 1.0, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
-- height and width can be:
-- * an absolute number of cells when > 1
-- * a percentage of the width / height of the editor when <= 1
-- * a function that returns the width or the height
width = 120, -- width of the Zen window
height = 1, -- height of the Zen window
-- by default, no options are changed for the Zen window
-- uncomment any of the options below, or add other vim.wo options you want to apply
options = {
signcolumn = "no", -- disable signcolumn
number = false, -- disable number column
relativenumber = false, -- disable relative numbers
cursorline = false, -- disable cursorline
cursorcolumn = false, -- disable cursor column
foldcolumn = "0", -- disable fold column
list = false, -- disable whitespace characters
},
},
plugins = {
-- disable some global vim options (vim.o...)
-- comment the lines to not apply the options
options = {
enabled = true,
ruler = false, -- disables the ruler text in the cmd line area
showcmd = false, -- disables the command in the last line of the screen
},
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = false }, -- disables the tmux statusline
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
-- - listen_on unix:/tmp/kitty
kitty = {
enabled = true,
font = "+2", -- font size increment
},
},
}
require('twilight').setup{}
-- hologram
require('hologram').setup{
auto_display = false -- WIP automatic markdown image display, may be prone to breaking
}
EOF
'';
extraPackages = with pkgs // customPlugins; [
# used to compile tree-sitter grammar
python-with-my-packages
nodejs nodejs
# clojure-lsp
clojure
rnix-lsp
terraform-lsp
rust-analyzer
# clj-kondo
zls
gcc
nodePackages_latest.pyright
shellcheck
proselint
statix
nodePackages.typescript
nodePackages.typescript-language-server
luajitPackages.lua-lsp
# fennel-ls
]; ];
plugins = with pkgs.vimPlugins // customPlugins; [
# ui
lualine-nvim
fzf-vim
nerdtree
neovim-ayu
rainbow_parentheses-vim
vim-surround
vim-devicons
nvim-web-devicons
undotree
telescope-nvim
plenary-nvim
nvim-navic
(nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.python p.fennel p.lua p.html p.css p.regex p.beancount p.markdown p.glsl p.yaml p.toml p.dockerfile p.json ]))
nvim-treesitter-context
my-fterm
barbar-nvim
auto-session
my-marks
which-key-nvim
nvim-peekup
zen-mode-nvim
twilight-nvim
my-lspsaga
vim-dasht
# language
vim-nix
vim-elixir
emmet-vim
csv-vim
direnv-vim
zig-vim
conjure
# kitaab stuff
vimwiki
taskwiki
vim-zettel
hologram-nvim
# lsp stuff
# nvim-lint
null-ls-nvim
nvim-lspconfig
nvim-cmp
cmp-nvim-lsp
cmp-treesitter
nvim-lsp-ts-utils
cmp-conjure
cmp-buffer
cmp-path
cmp-spell
nvim-autopairs
cmp_luasnip
luasnip
lsp-format
friendly-snippets
lspkind-nvim
# git stuff
vim-fugitive
gitsigns-nvim
fzf-checkout-vim
# Clojure stuff
# conjure
vim-sexp
vim-sexp-mappings-for-regular-people
fennel-vim
# vim-tidal
# experimental
nvim-luapad
# scnvim
leap
vim-beancount
# vimtex
# custom
yuck-vim
nvim-parinfer
# vim-processing
];
withPython3 = true;
extraPython3Packages = pkgs: with pkgs; [ tasklib six ];
vimAlias = true; vimAlias = true;
}; };
} }

View file

@ -1,9 +0,0 @@
{
"console.log": {
"prefix": "clog",
"body": [
"console.log('$1')"
],
"description": "Log output to console"
}
}

View file

@ -5,15 +5,23 @@
homebrew.brews = [ homebrew.brews = [
"kind" "kind"
"kubectl" "kubectl"
"bazelisk"
"sourcegraph/src-cli/src-cli"
"gh"
# "postgresql@15"
# "redis"
]; ];
homebrew.casks = [ homebrew.casks = [
# Development Tools # Development Tools
"homebrew/cask/docker" "homebrew/cask/docker"
# "syncthing"
# "insomnia" # "insomnia"
# "tableplus" # "tableplus"
# "ngrok" # "ngrok"
"postico" "postico"
"wireshark" "wireshark"
"1password"
"orbstack"
# Communication Tools # Communication Tools
# Already installed manually # Already installed manually

View file

@ -1,21 +1,43 @@
{ agenix, config, pkgs, ... }: { self, pkgs, ... }:
{ {
imports = [ imports = [
./sketchybar ./sketchybar
./yabai ./yabai
./casks # ./casks
# ../../modules/darwin/secrets.nix
# ../../modules/darwin/home-manager.nix # ../../modules/darwin/home-manager.nix
# ../../modules/shared # ../../modules/shared
# ../../modules/shared/cachix # ../../modules/shared/cachix
# agenix.darwinModules.default
]; ];
environment.systemPackages = [ environment.systemPackages = [
pkgs.go pkgs.go
pkgs.python3
pkgs.cargo
pkgs.k9s
pkgs.kubernetes-helm
]; ];
# age.secrets.curve-wg.file = "${self}/secrets/work-wg.age";
# age.secrets.curve-wg.owner = "anishlakhwara";
# networking.wg-quick.interfaces = {
# wg0 = {
# address = [ "10.0.69.7/24" ];
# listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers)
# privateKeyFile = "/run/agenix/work-wg";
# peers = [
# # For a client configuration, one peer entry for the server will suffice.
# {
# publicKey = "c1J4p63rD3IlszugMZiki7UBV3YmDdqa3DU4UejXzAI=";
# allowedIPs = [ "10.0.69.0/24" ];
# # Set this to the server IP and port.
# endpoint = "sealight.xyz:60990"; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577
# persistentKeepalive = 25;
# }
# ];
# };
# };
# Auto upgrade nix package and the daemon service. # Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true; services.nix-daemon.enable = true;
nixpkgs.hostPlatform = "aarch64-darwin"; nixpkgs.hostPlatform = "aarch64-darwin";
@ -48,8 +70,8 @@
# ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; }); # ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; });
# Enable fonts dir # Enable fonts dir
fonts.fontDir.enable = true; # fonts.fontDir.enable = true;
fonts.fonts = with pkgs; [ fonts.packages = with pkgs; [
fira-code fira-code
fira-code-symbols fira-code-symbols
hermit hermit
@ -105,6 +127,7 @@
mouse-over-hilite-stack = true; mouse-over-hilite-stack = true;
orientation = "bottom"; orientation = "bottom";
tilesize = 48; tilesize = 48;
mru-spaces = false;
}; };
finder = { finder = {

View file

@ -1,26 +0,0 @@
_:
[
# Development Tools
"homebrew/cask/docker"
# "insomnia"
# "tableplus"
# "ngrok"
"postico"
"wireshark"
# Communication Tools
"loom"
# Already installed manually
# "slack"
# "zoom"
# Utility Tools
"syncthing"
# Productivity Tools
"raycast"
# AI
# "diffusionbee"
]

View file

@ -6,6 +6,7 @@ let
lituus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2lAb33LH3JNuOfBXt971u0tHe+NURFecQdfjwEj+C+ root@lituus"; lituus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2lAb33LH3JNuOfBXt971u0tHe+NURFecQdfjwEj+C+ root@lituus";
helix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKrL6IDHNnHmxi0q9nzu87NOyidPm3HpE7klU368lEf root@helix"; helix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKrL6IDHNnHmxi0q9nzu87NOyidPm3HpE7klU368lEf root@helix";
helix2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2G81z1E51ioJQGLHnTJEjgSdBqLM6mb72Z+0atE6Bf root@helix"; helix2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK2G81z1E51ioJQGLHnTJEjgSdBqLM6mb72Z+0atE6Bf root@helix";
work = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHOnfDvR2D2nGnC+DZYDUXiokzz+eLfZwkp+O8WjWutp anishlakhwara@Anishs-MacBook-Pro.local";
curve = [ system user ]; curve = [ system user ];
allUserKeys = [ system user mossnet ]; allUserKeys = [ system user mossnet ];
systemOnly = [ system mossnet lituus helix ]; systemOnly = [ system mossnet lituus helix ];
@ -34,4 +35,6 @@ in
"box-wg.age".publicKeys = [ mossnet ]; "box-wg.age".publicKeys = [ mossnet ];
"wallabag-password.age".publicKeys = [ mossnet ]; "wallabag-password.age".publicKeys = [ mossnet ];
"wallabag-secret.age".publicKeys = [ mossnet ]; "wallabag-secret.age".publicKeys = [ mossnet ];
"work-wg.age".publicKeys = [ work user system ];
} }

BIN
secrets/work-wg.age Normal file

Binary file not shown.