forked from getpaseo/paseo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
71 lines (67 loc) · 1.84 KB
/
Copy pathflake.nix
File metadata and controls
71 lines (67 loc) · 1.84 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
60
61
62
63
64
65
66
67
68
69
70
71
{
description = "Paseo - self-hosted daemon for AI coding agents";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{
self,
nixpkgs,
}:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgsFor = system: import nixpkgs { inherit system; };
in
{
packages = forAllSystems (
system:
let
pkgs = pkgsFor system;
paseo = pkgs.callPackage ./nix/package.nix { };
versionParts = pkgs.lib.splitString "." paseo.version;
sourceRevision = if self ? revCount && self.revCount != null then self.revCount else 0;
buildRevision = sourceRevision - (sourceRevision / 10000) * 10000;
desktopBuildVersion = pkgs.lib.concatStringsSep "." [
(builtins.elemAt versionParts 0)
(builtins.elemAt versionParts 1)
(toString buildRevision)
];
in
{
default = paseo;
paseo = paseo;
desktop = pkgs.callPackage ./nix/desktop-package.nix {
inherit paseo;
buildVersion = desktopBuildVersion;
};
}
);
nixosModules.default = self.nixosModules.paseo;
nixosModules.paseo =
{ pkgs, lib, ... }:
{
imports = [ ./nix/module.nix ];
services.paseo.package = lib.mkDefault self.packages.${pkgs.stdenv.hostPlatform.system}.default;
};
devShells = forAllSystems (
system:
let
pkgs = pkgsFor system;
in
{
default = pkgs.mkShell {
packages = [
pkgs.nodejs_22
pkgs.python3
];
};
}
);
};
}