-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
142 lines (119 loc) · 3.22 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
134
135
136
137
138
139
140
141
142
{
description = "nix-config";
inputs = {
#
# Shared inputs
#
# Packages
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
# User profile manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Declartive theming
nix-colors.url = "github:misterio77/nix-colors";
# Firefox hardening
arkenfox = {
url = "github:dwarfmaster/arkenfox-nixos";
inputs.nixpkgs.follows = "nixpkgs";
};
# Declartive vim config
nixvim = {
url = "github:pta2002/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
#
# NixOS-specific inputs
#
# Secure Boot
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.3.0";
inputs.nixpkgs.follows = "nixpkgs";
};
# Links persistent folders into system
impermanence.url = "github:babeuh/impermanence";
# Provides module support for specific vendor hardware
nixos-hardware.url = "github:NixOS/nixos-hardware";
# Secrets using age
agenix = {
url = "github:babeuh/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Window manager
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
# NixOS image builder
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
# Declartive disk partitioning
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
#
# Darwin-specific inputs
#
nix-darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
nixos-generators,
...
}@inputs:
let
inherit (self) outputs;
libx = import ./lib { inherit inputs outputs; };
in
{
# Devshell for bootstrapping
# Acessible through 'nix develop' or 'nix-shell' (legacy)
devShells = libx.forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./shell.nix { inherit pkgs inputs; }
);
# Your custom packages and modifications, exported as overlays
overlays = import ./overlay { inherit inputs; };
nixosConfigurations = {
# FIXME: Hyprland is broken so temporarily using GNOME
atlas = libx.mkSystem {
hostname = "atlas";
username = "babeuh";
platform = "x86_64-linux";
stateVersion = "23.05";
desktop = "gnome";
};
};
darwinConfigurations = {
"Macbook-Air" = libx.mkSystem {
hostname = "Macbook-Air";
username = "raphael";
platform = "aarch64-darwin";
stateVersion = "24.05";
desktop = "darwin";
};
};
/*
TODO: THIS SHOULD BE REWORKED
installer = nixos-generators.nixosGenerate {
system = "x86_64-linux";
format = "install-iso";
specialArgs = { inherit inputs; };
modules = [
inputs.disko.nixosModules.default
./hosts/installer
];
};
*/
};
}