dotfiles/flake.nix

54 lines
1.1 KiB
Nix
Raw Normal View History

2024-04-21 19:07:19 +00:00
{
description = "My dotfiles";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2024-12-29 21:20:56 +00:00
2024-04-21 19:07:19 +00:00
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
};
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',
...
}: {
packages.plow = pkgs.callPackage ./plow {};
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";
imports = [
./devenv.nix
];
2024-04-21 19:07:19 +00:00
2024-12-29 21:20:56 +00:00
packages = [
self'.packages.plow
];
2024-04-21 19:07:19 +00:00
};
};
};
}