-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
192 lines (170 loc) · 5.61 KB
/
Copy pathflake.nix
File metadata and controls
192 lines (170 loc) · 5.61 KB
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# NixOS: flake.nix
{
description = "bbaserdem's NixOS configuration";
inputs = {
# ----- System Flakes ----- #
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Home manager
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nix user repository
nur.url = "github:nix-community/NUR";
# Flake utilities
flake-utils.url = "github:numtide/flake-utils";
# Hardware fixes
hardware.url = "github:nixos/nixos-hardware";
# Raspberry Pi
nixos-raspberrypi.url = "github:nvmd/nixos-raspberrypi/main";
# ----- Utilities ----- #
# Automated disk partitioning, and mounting
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# Secret deployment
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nix database w/out running nix-index
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# Nixcats for neovim management
nixCats = {
url = "github:bbaserdem/NixCats";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# My new flake
dendriticFlake.url = "github:bbaserdem/NixOS-Config-Dendritic";
# ----- MacOS ----- #
# Nix darwin
nix-darwin = {
url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
# Eventually want to set up disk impermanence
# TODO: Set this up
impermanence.url = "github:nix-community/impermanence";
# ----- Desktop ----- #
# Hyprland dynamic monitor setup
hyprdynamicmonitors = {
url = "github:fiffeek/hyprdynamicmonitors";
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.flake-utils.follows = "flake-utils";
};
# Noctalia shell
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# ----- Flair and small functionality ----- #
# Nixifying theming and styling
stylix = {
url = "github:danth/stylix/release-25.11";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
# Discord client
nixcord = {
url = "github:kaylorben/nixcord";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {self, ...} @ inputs: let
# Let us pass our outputs to relevant modules
inherit self;
inherit (self) outputs;
# Import my library functions
lib = import ./lib {inherit inputs outputs;};
# Convenient shortcut for flake-utils
utils = inputs.flake-utils.lib;
# List of hosts that are already configured
configuredHosts = [
# {
# arch = utils.system.x86_64-linux;
# host = "umay";
# }
{
arch = utils.system.x86_64-linux;
host = "yertengri";
}
{
arch = utils.system.x86_64-linux;
host = "yel-ana";
}
{
arch = utils.system.x86_64-linux;
host = "su-ata";
}
];
in
utils.eachDefaultSystem (system: let
pkgs = lib.pkgsFor system;
in {
# Outputs that need a system definition, to be available on all systems
# My custom packages, executed by `nix build .#<pkgname>`
packages = import ./pkgs {inherit pkgs;};
#legacyPackages = import ./pkgs {inherit pkgs;};
# Dev shells for this flake
devShells = import ./shells {inherit pkgs inputs system;};
# Formatter to use with nix fmt command
formatter = pkgs.alejandra;
# Checking functions, executed by `nix flake check`
# checks = import ./checks {inherit pkgs; };
# Custom applications, executed by `nix run .#<name>
# apps = = import ./apps.nix {inherit pkgs; };
})
// {
# Outputs that don't need system definition
# My library functions
inherit lib;
# Overlays to the package list, function of the form `final: prev: {};`
overlays = import ./overlays {inherit inputs outputs;};
# My flake templates,
templates = import ./templates;
# Modules provided by this flake
nixosModules = import ./modules/nixos {inherit inputs outputs;};
darwinModules = import ./modules/nix-darwin {inherit inputs outputs;};
homeManagerModules = import ./modules/home-manager {inherit inputs outputs;};
# NixOS configurations
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations =
{
od-ata = inputs.nixos-raspberrypi.lib.nixosSystemFull {
specialArgs = {
inherit inputs outputs;
nixos-raspberrypi = inputs.nixos-raspberrypi;
};
modules = [./nixos/hosts/od-ata];
};
}
// (lib.mkConfiguredHost configuredHosts);
# MacOS configurations
# Available through darwin-rebuild --switch
darwinConfigurations = {
"su-ana" = inputs.nix-darwin.lib.darwinSystem {
modules = [./nixos/hosts/su-ana];
specialArgs = {
inherit inputs outputs;
arch = utils.system.aarch64-darwin;
host = "su-ana";
};
};
};
# # Standalone HM configurations
# Don't need this unless we switch back to standalone again
# # Available through 'home-manager --flake .#your-username@your-hostname'
# homeConfigurations =
# {
# # Put standalone HM configs here
# }
# // (lib.mkConfiguredUser "batuhan" configuredHosts);
};
}