-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
114 lines (97 loc) · 3.3 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 = "My nix configs";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05";
nixos-hardware.url = "github:nixos/nixos-hardware/master";
flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
hyprland.url = "github:hyprwm/Hyprland";
};
outputs = { nixpkgs, nixpkgs-stable, nixpkgs-master, home-manager, flake-utils, ... }@inputs:
let
inherit (builtins) attrValues;
inherit (flake-utils.lib) eachDefaultSystemMap;
inherit (home-manager.lib) homeManagerConfiguration;
in
rec {
# Conjunto de mudanças à coleção de pacotes
overlays = {
# Nossas modificações
default = import ./overlay;
# Pacotes e modificações que o hyprland exporta
};
# Exportar pacotes com todas as overlays aplicadas
packages = eachDefaultSystemMap (system:
import nixpkgs {
inherit system;
overlays = attrValues overlays;
config.allowUnfree = true;
}
);
packages-stable = eachDefaultSystemMap (system:
import nixpkgs-stable {
inherit system;
overlays = attrValues overlays;
config.allowUnfree = true;
}
);
packages-master = eachDefaultSystemMap (system:
import nixpkgs-master {
inherit system;
overlays = attrValues overlays;
config.allowUnfree = true;
}
);
# Configurações NixOS
nixosConfigurations = {
slowdive = nixpkgs.lib.nixosSystem {
# Configuração
modules = [
./hosts/slowdive
];
# Repassar nossos inputs, para permitir referenciar da config
specialArgs = { inherit inputs; };
# Nossos pacotes
system = "x86_64-linux";
};
rasp = nixpkgs-stable.lib.nixosSystem {
modules = [
./hosts/rasp
];
specialArgs = { inherit inputs; };
system = "aarch64-linux";
};
frostbyte = nixpkgs.lib.nixosSystem {
modules = [
./hosts/frostbyte
];
specialArgs = { inherit inputs; };
system = "x86_64-linux";
};
};
homeConfigurations = {
"gui@slowdive" = homeManagerConfiguration {
# Configuração
modules = [ ./home/gui/slowdive ./modules/home-manager ];
# Repassar nossos inputs, para permitir referenciar da config
extraSpecialArgs = { inherit inputs; pkgs-master = packages-master.x86_64-linux; };
# Nossos pacotes
pkgs = packages.x86_64-linux;
};
"gui@rasp" = homeManagerConfiguration {
modules = [ ./home/gui/rasp ];
extraSpecialArgs = { inherit inputs; };
pkgs = packages.aarch64-linux;
};
"gui@frostbyte" = homeManagerConfiguration {
modules = [ ./home/gui/frostbyte ./modules/home-manager ];
extraSpecialArgs = { inherit inputs; pkgs-master = packages-master.x86_64-linux; };
pkgs = packages.x86_64-linux;
};
};
};
}