dotfiles/flake.nix

63 lines
1.4 KiB
Nix
Raw Permalink Normal View History

2024-04-21 19:07:19 +00:00
{
description = "My dotfiles";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
2024-12-29 21:20:56 +00:00
devenv-root = {
url = "file+file:///dev/null";
flake = false;
};
devenv.url = "github:cachix/devenv";
2024-04-21 19:07:19 +00:00
};
2025-03-01 21:34:30 +00:00
nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};
2024-04-21 19:07:19 +00:00
outputs = {
nixpkgs,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
2024-12-29 21:20:56 +00:00
imports = [
inputs.devenv.flakeModule
];
2024-04-21 19:07:19 +00:00
systems = nixpkgs.lib.systems.flakeExposed;
2024-12-18 23:15:20 +00:00
perSystem = {
pkgs,
self',
2025-03-25 17:48:52 +00:00
lib,
2024-12-18 23:15:20 +00:00
...
}: {
2025-03-25 17:48:52 +00:00
packages = lib.packagesFromDirectoryRecursive {
inherit (pkgs) callPackage;
directory = ./packages;
};
2024-12-18 23:15:20 +00:00
2024-12-29 21:20:56 +00:00
devenv.shells.default = {
devenv.root = let
devenvRootFileContent = builtins.readFile inputs.devenv-root.outPath;
in
pkgs.lib.mkIf (devenvRootFileContent != "") devenvRootFileContent;
env.PLOW_FROM = "./home";
2025-01-05 14:22:27 +00:00
env.PLOW_CACHE = "./.plowcache";
2024-12-29 21:20:56 +00:00
imports = [
./devenv.nix
];
2024-04-21 19:07:19 +00:00
2024-12-29 21:20:56 +00:00
packages = [
self'.packages.plow
2025-03-25 17:48:52 +00:00
self'.packages.codeinit
2024-12-29 21:20:56 +00:00
];
2024-04-21 19:07:19 +00:00
};
};
};
}