Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
172 lines (143 loc) · 4.7 KB
/
Copy pathflake.nix
File metadata and controls
172 lines (143 loc) · 4.7 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
{
description = "NixOS system configuration";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-stable.url = "nixpkgs/nixos-26.05";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
neovim.url = "path:/home/melker/.config/nvim";
# No `nixpkgs.follows`, or the kernel won't hit Chaotic-Nyx's binary cache
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
stylix.url = "github:nix-community/stylix";
stylix.inputs.nixpkgs.follows = "nixpkgs";
minimal-tmux.url = "github:niksingh710/minimal-tmux-status";
minimal-tmux.inputs.nixpkgs.follows = "nixpkgs";
nix-search-tv.url = "github:3timeslazy/nix-search-tv";
nix-search-tv.inputs.nixpkgs.follows = "nixpkgs";
# 2026-11-08: build failure
# nox.url = "github:madsbv/nix-options-search";
# nox.inputs.nixpkgs.follows = "nixpkgs";
zen-browser.url = "github:0xc000022070/zen-browser-flake";
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
jaunte.url = "github:mawkler/jaunte";
jaunte.inputs.nixpkgs.follows = "nixpkgs";
lig.url = "github:KevenGoncalves/lig";
lig.inputs.nixpkgs.follows = "nixpkgs";
nix-servant.url = "github:mawkler/nix-servant";
# Not used as a flake, so that it's built against nixpkgs' Hyprland
hyprexpo.url = "github:sandwichfarm/hyprexpo";
hyprexpo.flake = false;
dux.url = "github:duxlabs-dev/dux-shell";
dux.inputs.nixpkgs.follows = "nixpkgs";
dms-plugin-registry.url = "github:AvengeMedia/dms-plugin-registry";
dms-plugin-registry.inputs.nixpkgs.follows = "nixpkgs";
dux-files.url = "github:duxlabs-dev/dux-files";
dux-files.inputs.nixpkgs.follows = "nixpkgs";
vicinae-extensions.url = "github:vicinaehq/extensions";
vicinae-extensions.inputs.nixpkgs.follows = "nixpkgs";
# LLM agent skills
agent-skills.url = "github:Kyure-A/agent-skills-nix";
skills.url = "github:mawkler/agent-skills";
skills.flake = false;
rust-skills.url = "github:actionbook/rust-skills";
rust-skills.flake = false;
ponytail.url = "github:DietrichGebert/ponytail";
ponytail.flake = false;
};
outputs =
{ nixpkgs, home-manager, ... }@inputs:
let
overlays = import ./overlays { inherit inputs; };
specialArgs = {
inherit
inputs
overlays
username
rootPath
;
};
system = "x86_64-linux";
username = "melker";
rootPath = "/home/melker/.config/nixos";
# The keys double as hostnames, which are used in `trusted-substituters`
# in nix-serve
hosts = {
thinkpad-nixos = [
./features/core.nix
./features/laptop.nix
./packages
];
beauty = [
./features/core.nix
./features/gpu/nvidia.nix
./features/ssh.nix
./packages
];
framework13-df = [
./features/core.nix
./packages
./hosts/framework13-df/packages
];
};
mkNixosConfigs =
hosts:
builtins.mapAttrs (
hostname: modules:
nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // {
inherit hostname;
hostnames = builtins.attrNames hosts;
};
inherit modules;
}
) hosts;
in
{
# NixOS
nixosConfigurations = mkNixosConfigs hosts;
# Home Manager
homeConfigurations =
let
config = hostname: {
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = specialArgs // {
inherit hostname;
hostnames = builtins.attrNames hosts;
};
};
in
{
"${username}@thinkpad-nixos" = home-manager.lib.homeManagerConfiguration (
config "thinkpad-nixos"
// {
modules = [
./home
./home/dux
./home/vicinae.nix
];
}
);
"${username}@beauty" = home-manager.lib.homeManagerConfiguration (
config "beauty"
// {
modules = [
./home
./home/dux
./home/vicinae.nix
];
}
);
"${username}@framework13-df" = home-manager.lib.homeManagerConfiguration (
config "framework13-df"
// {
modules = [
./home
./hosts/framework13-df/home
];
}
);
};
};
}