-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
106 lines (96 loc) · 3.27 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
{
description = "My dotfiles";
nixConfig = {
# substituers will be appended to the default substituters when fetching packages
extra-substituters = [
"https://anyrun.cachix.org"
"https://hyprland.cachix.org"
"https://nix-gaming.cachix.org"
];
extra-trusted-public-keys = [
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
xremap-flake = {
url = "github:xremap/nix-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs-darwin";
};
hyprland = {
url = "github:hyprwm/Hyprland/v0.39.1";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-gaming.url = "github:fufexan/nix-gaming";
};
outputs = { self, nixpkgs, nixpkgs-unstable, nix-darwin, home-manager, ... }@inputs:
let
pkgs-unstable = import inputs.nixpkgs-unstable {
system = "x86_64-linux";
};
in {
nixosConfigurations = {
nixos-desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/nixos-desktop/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs // { inherit pkgs-unstable; };
home-manager.users.key5n = import ./home/linux/home.nix;
}
];
specialArgs = inputs // { inherit pkgs-unstable; };
};
nixos-subdesktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/nixos-subdesktop/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs;
home-manager.users.key5n = import ./home/linux/home.nix;
}
];
specialArgs = inputs;
};
};
darwinConfigurations = let
userName = "key5n";
hostName = "Key5n-MacBook-Pro";
in {
${hostName} = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
./hosts/darwin-macbook/configuration.nix
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs // { inherit userName hostName; };
home-manager.users."${userName}" = import ./home/darwin/home.nix;
}
];
specialArgs = inputs // { inherit userName hostName; };
};
};
};
}