-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (55 loc) · 1.37 KB
/
Copy pathflake.nix
File metadata and controls
62 lines (55 loc) · 1.37 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
{
description = "a fast terminal card for your project, git state, and machine";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
home-manager,
}:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgsFor = nixpkgs.legacyPackages;
in
{
packages = forAllSystems (system: {
default = pkgsFor.${system}.callPackage ./. { };
});
apps = forAllSystems (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/mew";
};
});
homeManagerModules.default =
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.mew;
in
{
options.programs.mew = {
enable = lib.mkEnableOption "mew";
package = lib.mkOption {
type = lib.types.package;
default = self.packages.${pkgs.system}.default;
description = "the mew package";
};
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
};
};
};
}