-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
173 lines (146 loc) · 4.47 KB
/
flake.nix
File metadata and controls
173 lines (146 loc) · 4.47 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
{
description = "Home Manager configuration of zhifan";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nvim-configuration.url = "github:c3n21/nvim-configuration/develop";
# https://github.com/hyprwm/Hyprland/issues/5891
# https://github.com/NixOS/nix/issues/6633
hyprland = {
submodules = true;
url = "https://github.com/hyprwm/Hyprland";
type = "git";
};
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/disko";
};
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
};
split-monitor-workspaces = {
url = "github:Duckonaut/split-monitor-workspaces";
inputs.hyprland.follows = "hyprland";
};
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
lanzaboote = {
url = "github:nix-community/lanzaboote";
# Optional but recommended to limit the size of your system closure.
inputs.nixpkgs.follows = "nixpkgs";
};
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
};
outputs =
{
self,
nixpkgs,
home-manager,
nixos-hardware,
lanzaboote,
niri,
nixos-wsl,
disko,
noctalia,
...
}@inputs:
let
inherit (self) outputs;
system = "x86_64-linux";
# home-manager common configuration
homeManagerExtraSpecialArgs = { inherit inputs; };
homeManagerModuleConfiguration = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = homeManagerExtraSpecialArgs;
};
pkgs = import nixpkgs {
inherit system;
overlays = [
niri.overlays.niri
noctalia.overlays.default
];
config.allowUnfree = true;
};
in
{
nixosModules = [
niri.nixosModules.niri
];
nixosConfigurations = {
framework-13-7040-amd = nixpkgs.lib.nixosSystem {
inherit system pkgs;
specialArgs = {
inherit inputs outputs;
};
modules = [
nixos-hardware.nixosModules.framework-13-7040-amd
disko.nixosModules.disko
lanzaboote.nixosModules.lanzaboote
home-manager.nixosModules.home-manager
homeManagerModuleConfiguration
./nixos/framework-13-7040-amd/configuration.nix
# TODO: enable when the config is ready
# ./nixos/framework-13-7040-amd/disko.nix
{
home-manager.users.zhifan = ./home-manager/home.nix;
}
{
home-manager.users.zhifan = ./home-manager/linux/packages-profiles/gaming.nix;
}
{
# home-manager modules must be put there
home-manager.users.zhifan.imports = [
inputs.niri.homeModules.niri
inputs.noctalia.homeModules.default
];
}
{
home-manager.users.zhifan = ./home-manager/linux;
}
];
};
wsl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./nixos/common/fish.nix
./nixos/common/nixpkgs-configuration.nix
nixos-wsl.nixosModules.default
home-manager.nixosModules.home-manager
./nixos/wsl/configuration.nix
homeManagerModuleConfiguration
{
home-manager.users.zhifan = ./home-manager/home.nix;
system.stateVersion = "24.05";
wsl.enable = true;
}
];
};
};
homeConfigurations = {
linux = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home-manager/standalone.nix
./home-manager/home.nix
./home-manager/linux
./home-manager/linux/specialisations.nix
inputs.niri.homeModules.niri
];
extraSpecialArgs = homeManagerExtraSpecialArgs;
};
};
};
}