-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
39 lines (35 loc) · 1.02 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
inputs = {
rust-overlay.url = "github:oxalica/rust-overlay";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.follows = "rust-overlay/nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
kidex-src.url = "github:Kirottu/kidex";
kidex-src.flake = false;
};
outputs = inputs@{ nixpkgs, rust-overlay, kidex-src, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({withSystem, ...}: {
systems = ["x86_64-linux"];
perSystem = {
self',
inputs',
config,
pkgs,
system,
...
}: let
inherit (inputs.nixpkgs) lib;
in {
packages = rec {
kidex = pkgs.callPackage ./. { inherit rust-overlay nixpkgs system kidex-src; };
default = kidex;
};
};
flake.homeManagerModules.default = { pkgs, ... }: {
imports = [ ./hm-module.nix ];
services.kidex.package = withSystem pkgs.stdenv.hostPlatform.system ({ config, ... }:
config.packages.default
);
};
});
}