-
-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathflake.nix
More file actions
70 lines (61 loc) · 1.8 KB
/
flake.nix
File metadata and controls
70 lines (61 loc) · 1.8 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
{
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;
version = builtins.replaceStrings ["\n"] [""] (builtins.readFile ./cli/version);
in {
packages = forAllSystems (
system: let
inherit (astal.packages.${system}) astal3 astal4 io;
pkgs = nixpkgs.legacyPackages.${system};
agsPackages = {
default = self.packages.${system}.ags;
ags = pkgs.callPackage ./nix {
inherit version astal3 astal4;
astal-io = io;
};
agsFull = pkgs.callPackage ./nix {
inherit version astal3 astal4;
astal-io = io;
extraPackages =
builtins.attrValues (
builtins.removeAttrs astal.packages.${system} ["docs"]
)
++ [pkgs.libadwaita];
};
};
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:
import ./nix/devshell.nix {
inherit self astal;
pkgs = nixpkgs.legacyPackages.${system};
});
};
}