r/o

default to ddg 7f8440a7 parent 44c03127

authored by ~talya

1
{
2
description = "comenzar -- personal search assistant";
3
4
inputs = {
5
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
6
flake-parts.url = "github:hercules-ci/flake-parts";
7
rust-analyzer-src = {
8
url = "github:rust-lang/rust-analyzer/nightly";
9
flake = false;
10
};
11
fenix = {
12
url = "github:nix-community/fenix";
13
inputs.nixpkgs.follows = "nixpkgs";
14
inputs.rust-analyzer-src.follows = "rust-analyzer-src";
15
};
16
};
17
18
outputs =
19
{
20
self,
21
flake-parts,
22
fenix,
23
...
24
}@inputs:
25
flake-parts.lib.mkFlake { inherit inputs; } (
26
{ withSystem, ... }:
27
{
28
systems = [
29
"aarch64-darwin"
30
"aarch64-linux"
31
"x86_64-darwin"
32
"x86_64-linux"
33
];
34
perSystem =
35
{
36
config,
37
system,
38
pkgs,
39
...
40
}:
41
let
42
toolchain = fenix.packages.${system}.stable.minimalToolchain;
43
in
44
{
45
formatter = pkgs.nixfmt;
46
47
packages = {
48
default = config.packages.comenzar;
49
50
comenzar = pkgs.callPackage ./nix/package.nix {
51
rustPlatform = pkgs.makeRustPlatform {
52
cargo = toolchain;
53
rustc = toolchain;
54
};
55
};
56
};
57
58
devShells = {
59
default = pkgs.mkShell {
60
name = "comenzar";
61
62
packages = [
63
(fenix.packages.${system}.stable.withComponents [
64
"cargo"
65
"rustc"
66
"rust-analyzer"
67
"clippy"
68
"rustfmt"
69
"rust-src"
70
])
71
pkgs.pkg-config
72
pkgs.openssl
73
];
74
};
75
};
76
77
checks = {
78
comenzar-nixos-module = pkgs.callPackage ./nix/nixos-module-test.nix { inherit self; };
79
};
80
};
81
82
flake.nixosModules.comenzar =
83
{ pkgs, ... }:
84
{
85
imports = [ ./nix/nixos-module.nix ];
86
services.comenzar.package = withSystem pkgs.stdenv.hostPlatform.system (
87
{ config, ... }: config.packages.comenzar
88
);
89
};
90
91
flake.darwinModules.comenzar =
92
{ pkgs, ... }:
93
{
94
imports = [ ./nix/darwin-module.nix ];
95
services.comenzar.package = withSystem pkgs.stdenv.hostPlatform.system (
96
{ config, ... }: config.packages.comenzar
97
);
98
};
99
}
100
);
101
}
102