-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
88 lines (79 loc) · 2.69 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
{
description = "My NixOS and home-manager configuration";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small";
# Nixpkgs (next)
# nixpkgs-next.url = "github:nixos/nixpkgs/nixos-25.05-small";
# Nixpkgs (unstable)
nixpkgs-unstable.url = "github:nixos/nixpkgs/master";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-24.11";
# NixOS WSL
nixos-wsl.url = "github:nix-community/nixos-wsl/2405.5.4";
# nixvim
nixvim.url = "github:nix-community/nixvim/nixos-24.11";
};
outputs =
{
self,
nixpkgs,
home-manager,
...
}@inputs:
let
inherit (self) outputs;
in
{
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays { inherit inputs; };
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
vm = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [ ./hosts/vm/configuration.nix ];
};
wsl = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [ ./hosts/wsl/configuration.nix ];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"nixos@linux-x86_64" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [ ./home-manager/linux ];
};
"nixos@linux-aarch64" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [ ./home-manager/linux ];
};
"henry@darwin-legacy" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-darwin; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [ ./home-manager/darwin ];
};
"henry@darwin" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-darwin; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [ ./home-manager/darwin ];
};
};
};
}