-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
59 lines (55 loc) · 1.57 KB
/
Copy pathflake.nix
File metadata and controls
59 lines (55 loc) · 1.57 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } (
{ moduleWithSystem, ... }:
{
systems = [
"x86_64-linux"
"aarch64-linux"
];
perSystem =
{
config,
pkgs,
lib,
...
}:
{
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "rk-m87-sync";
version = "0.1.0"; # x-release-please-version
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [
libpulseaudio
];
meta = {
description = "Sync system time and volume to RK M87 keyboard LCD";
license = lib.licenses.mit;
mainProgram = "rk-m87-sync";
};
};
devShells.default = pkgs.mkShell {
inputsFrom = [ config.packages.default ];
packages = with pkgs; [
rust-analyzer
clippy
rustfmt
];
};
};
flake.nixosModules.default = moduleWithSystem (
{ config, ... }: _: { imports = [ (import ./nix/module.nix config.packages.default) ]; }
);
}
);
}