-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
133 lines (112 loc) · 3.63 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{
description = "Multiplatform dotfiles for development and gaming usage.";
outputs = inputs @ {...}: let
getPkgs = {
system,
extraOverlays ? [],
}:
import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
overlays =
[
inputs.nur.overlay
(final: prev: {
master = import inputs.nixpkgs-master { inherit system; };
cumulus = inputs.cumulus.packages."${system}".default;
})
]
++ extraOverlays;
};
forAllSystems = function:
inputs.nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-darwin"
] (
system:
function
{
pkgs = getPkgs {inherit system;};
inherit system;
}
);
in {
formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra);
packages = forAllSystems ({
pkgs,
system,
}: {
defaultbrowser = pkgs.defaultbrowser;
shellcheck = pkgs.shellcheck;
shfmt = pkgs.shfmt;
jq = pkgs.jq;
stylua = pkgs.stylua;
home-manager = inputs.home-manager.packages."${system}".default;
nix-darwin = inputs.nix-darwin.packages."${system}".default;
mac-app-util = inputs.mac-app-util.packages."${system}".default;
});
apps = forAllSystems ({
pkgs,
system,
}: {
sponge = {
type = "app";
program = "${pkgs.moreutils}/bin/sponge";
};
});
nixosConfigurations = import ./modules/nixos/nixos.nix {
inherit inputs;
pkgs = getPkgs {system = "x86_64-linux";};
};
darwinConfigurations = import ./modules/macos/darwin.nix {
inherit inputs;
pkgs = getPkgs {
system = "aarch64-darwin";
extraOverlays = [inputs.nixpkgs-firefox-darwin.overlay];
};
};
# Having Home Manager declarations alone allow them to be executed from the
# command line, obligatory for the dynamic theme changing
homeConfigurations.valhalla = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = getPkgs {system = "x86_64-linux";};
modules = [
./modules/nixos/home.nix
inputs.stylix.homeManagerModules.stylix
inputs.ags.homeManagerModules.default
./modules/common/home.nix
];
};
homeConfigurations.nirvana = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = getPkgs {
system = "aarch64-darwin";
extraOverlays = [inputs.nixpkgs-firefox-darwin.overlay];
};
modules = [
./modules/macos/home.nix
inputs.stylix.homeManagerModules.stylix
inputs.mac-app-util.homeManagerModules.default
./modules/common/home.nix
];
};
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
nixpkgs-firefox-darwin.url = "github:bandithedoge/nixpkgs-firefox-darwin";
nixpkgs-firefox-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/NUR";
nur.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin.url = "github:lnl7/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
mac-app-util.url = "github:hraban/mac-app-util";
mac-app-util.inputs.nixpkgs.follows = "nixpkgs";
ags.url = "github:Aylur/ags";
ags.inputs.nixpkgs.follows = "nixpkgs";
stylix.url = "github:danth/stylix";
stylix.inputs.nixpkgs.follows = "nixpkgs";
cumulus.url = "path:./cumulus";
cumulus.inputs.nixpkgs.follows = "nixpkgs";
};
}