-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
134 lines (110 loc) · 3.83 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
# About flakes by hand7s
# flakes is core of nixos and nix
# flakes contains inputs with links
# and outputs with args, modules
# with flakes you can declare everything
# basically, you can have all your nixos inside flake.nix
# in my flake.nix you can find links to great flakes, like:
# nixgl - helps with OpenGL apps nix outside of nixos
# nix-darwin - nixpkgs for darwin (mac)
# chaotic-nyx - chaotic-aur for nix
# more info you can find in flake urls itself!
{
description = "actually, stock but good reference flake xd";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
nixpkgs-small = {
url = "github:nixos/nixpkgs/nixos-unstable-small";
};
nixpkgs-stable = {
url = "github:nixos/nixpkgs/nixos-24.05";
};
nixpkgs-stable-small = {
url = "github:nixos/nixpkgs/nixos-24.05-small";
};
nixpkgs-master = {
url = "github:nixos/nixpkgs/master";
};
# ^^^ you can basically rename -master / -stable / -small to just nixpkgs in case you need only one of 'em
nixgl = {
url = "github:nix-community/nixGL";
};
nur = {
url = "github:nix-community/NUR";
};
impermanence = {
url = "github:nix-community/impermanence";
};
home-manager = {
url = "github:nix-community/home-manager/";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager/";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
# ^^^ nix-community flakes that i found usable
agenix = {
url = "github:ryantm/agenix";
};
chaotic = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
};
chaotic-master = {
url = "github:chaotic-cx/nyx/main";
};
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
};
stylix = {
url = "github:danth/stylix";
};
};
outputs = {
self,
nixpkgs,
home-manager,
nix-darwin,
...
} @ inputs:
{
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem { # nixpkgs option goes here
system = "x86_64-linux";
modules = [
./nixos/modules.nix # path to your nixos *.nix with nixos configuration, inside your new host directory
# here you place modules for flakes inputs like a chaotic or stylix
];
};
};
homeConfigurations = {
nixuser = home-manager.lib.homeManagerConfiguration { # hm option goes here, inside your new host directory
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
./nixusr/home.nix # path to your home-manager configuration, standalone version
# here you place modules for flakes inputs like a chaotic or stylix
];
};
};
};
# about inputs:
# you can add as much as you need inputs,
# like new hosts, home-manager and nix-darwin
# AND nixos itself. in case you need new..
# just use existing options as template!
}