dotfiles/flake.nix

85 lines
2.5 KiB
Nix
Raw Normal View History

2022-12-25 09:55:30 +00:00
{
2023-01-15 09:54:40 +00:00
nixConfig = {
2023-01-19 15:28:54 +00:00
accept-flake-config = true;
experimental-features = "nix-command flakes";
max-jobs = 12;
2023-01-15 09:54:40 +00:00
};
2022-12-25 09:55:30 +00:00
description = "My personal configuration in Nix (and some native configurations)";
inputs = {
2023-05-02 16:28:34 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-latest.url = "github:nixos/nixpkgs";
2023-06-18 09:51:33 +00:00
# deploy-rs.url = "github:serokell/deploy-rs";
2023-06-23 03:52:40 +00:00
std = {
url = "github:divnix/std";
inputs.devshell.url = "github:numtide/devshell";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly-overlay = {
# need to pin this until darwin build is successful again.
url = "github:pegasust/neovim-nightly-overlay/darwin-fix";
};
nix-boost = {
url = "git+https://git.pegasust.com/pegasust/nix-boost?ref=bleed";
};
kpcli-py = {
url = "github:rebkwok/kpcli";
flake = false;
};
nix-index-database = {
url = "github:mic92/nix-index-database";
# Should show the latest nixpkgs whenever possible
inputs.nixpkgs.follows = "nixpkgs-latest";
};
2023-09-25 00:18:28 +00:00
nixpkgs-vimplugins.url = "github:cornedor/nixpkgs/update-vim-plugins";
2023-06-20 21:10:00 +00:00
sg-nvim = {
2023-06-22 17:34:20 +00:00
url = "git+https://github.com/pegasust/sg.nvim?ref=sg-cody-discover";
2023-06-20 21:10:00 +00:00
};
2022-12-25 09:55:30 +00:00
};
2023-06-18 09:51:33 +00:00
outputs = {
self,
std,
...
} @ inputs:
2023-06-18 00:46:31 +00:00
std.growOn
2023-05-02 16:28:34 +00:00
{
# boilerplate
inherit inputs;
2023-06-20 21:10:00 +00:00
# All cell blocks are under ./nix/<cell>/<cellblock> as `<cellblock>.nix`
2023-05-02 16:28:34 +00:00
# or `<cellblock/default.nix`
2023-06-20 21:10:00 +00:00
cellsFrom = ./nix;
# modules = ./nix/modules;
2023-05-02 16:28:34 +00:00
2023-06-18 00:46:31 +00:00
cellBlocks = let
2023-07-25 20:24:49 +00:00
inherit (std.blockTypes) devshells functions anything installables runnables;
2023-06-18 00:46:31 +00:00
in [
2023-08-01 07:36:14 +00:00
(installables "shells")
2023-06-18 00:46:31 +00:00
(devshells "devshells")
(devshells "userShells")
(functions "home-profiles")
(functions "home-modules")
2023-06-18 09:51:33 +00:00
(anything "home-configs")
(installables "packages")
(anything "lib")
2023-07-25 20:24:49 +00:00
(runnables "formatter")
2023-06-18 00:46:31 +00:00
];
2023-05-02 16:28:34 +00:00
}
2023-01-12 18:42:20 +00:00
{
2023-08-01 07:36:14 +00:00
devShells = std.harvest self [["dotfiles" "devshells"] ["dev" "shells"]];
homeModules = std.pick self [["repo" "home-modules"]];
2023-08-01 07:36:14 +00:00
packages = std.harvest self [
["repo" "packages"]
["dev" "packages"]
];
legacyPackages = std.harvest self [["repo" "home-configs"]];
lib = std.pick self [["repo" "lib"]];
2023-06-18 00:46:31 +00:00
# TODO: Debug only
homeProfiles = std.pick self [["repo" "home-profiles"]];
2023-07-25 20:24:49 +00:00
formatter = std.harvest self [["repo" "formatter"]];
};
2022-12-25 09:55:30 +00:00
}