-
-
Notifications
You must be signed in to change notification settings - Fork 125
/
flake.nix
57 lines (49 loc) · 1.46 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
astal = {
url = "github:aylur/astal";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
astal,
}: let
inherit (astal.packages.${system}) astal3 astal4 io gjs;
system = "x86_64-linux"; # TODO: other architectures
pkgs = nixpkgs.legacyPackages.x86_64-linux;
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 {
lib.bundle = import ./nix/bundle.nix {inherit self pkgs;};
packages.${system} = 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;
};
};
}