-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
114 lines (106 loc) · 3.09 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
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-gnome-theme = {
url = "github:rafaelmardojai/firefox-gnome-theme";
flake = false;
};
thunderbird-gnome-theme = {
url = "github:rafaelmardojai/thunderbird-gnome-theme";
flake = false;
};
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
home-manager,
...
}@inputs:
let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
systems = [
"aarch64-linux"
"x86_64-linux"
];
pkgsFor = lib.genAttrs systems (system: import nixpkgs { inherit system; });
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
in
{
inherit lib;
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
packages = forEachSystem (pkgs: import ./pkgs { inherit inputs pkgs; });
devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
overlays = import ./overlays { inherit inputs outputs; };
nixosConfigurations = {
# Main desktop
acrux = lib.nixosSystem {
modules = [ ./hosts/acrux ];
specialArgs = {
inherit inputs outputs;
};
};
# Oracle Cloud Ampere A1 in Osaka
antares = lib.nixosSystem {
modules = [ ./hosts/antares ];
specialArgs = {
inherit inputs outputs;
};
};
# Oracle Cloud Ampere A1 (a single core instance) in Osaka
canopus = lib.nixosSystem {
modules = [ ./hosts/canopus ];
specialArgs = {
inherit inputs outputs;
};
};
};
homeConfigurations = {
"honnip@acrux" = lib.homeManagerConfiguration {
modules = [ ./home/honnip/acrux.nix ];
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
"honnip@antares" = lib.homeManagerConfiguration {
modules = [ ./home/honnip/antares.nix ];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
"honnip@canopus" = lib.homeManagerConfiguration {
modules = [ ./home/honnip/canopus.nix ];
pkgs = pkgsFor.aarch64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
};
};
};
}