-
-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy pathflake.nix
81 lines (73 loc) · 2.01 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
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
72
73
74
75
76
77
78
79
80
81
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
astal = {
url = "github:aylur/astal";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
astal,
}: let
systems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
lib.bundle = import ./nix/bundle.nix {
inherit self;
pkgs = nixpkgs.legacyPackages.x86_64-linux;
};
packages = forAllSystems (
system: let
inherit (astal.packages.${system}) astal3 astal4 io gjs;
pkgs = nixpkgs.legacyPackages.${system};
astal-io = io;
astal-gjs = "${gjs}/share/astal/gjs";
agsPackages = {
default = self.packages.${system}.ags;
ags = pkgs.callPackage ./nix {
inherit astal3 astal4 astal-io astal-gjs;
};
agsFull = pkgs.callPackage ./nix {
inherit astal3 astal4 astal-io astal-gjs;
extraPackages = builtins.attrValues (
builtins.removeAttrs astal.packages.${system} ["docs"]
);
};
};
in
astal.packages.${system} // agsPackages
);
templates.default = {
path = ./nix/template;
description = "Example flake.nix that shows how to package a project.";
welcomeText = ''
# Getting Started
- run `nix develop` to enter the development environment
- run `ags init -d . -f` to setup an initial ags project
- run `ags run .` to run the project
'';
};
homeManagerModules = {
default = self.homeManagerModules.ags;
ags = import ./nix/hm-module.nix self;
};
devShells = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
packages = with pkgs; [
markdownlint-cli2
marksman
vtsls
vscode-langservers-extracted
go
gopls
gotools
go-tools
];
};
});
};
}