-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
118 lines (104 loc) · 3.09 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
107
108
109
110
111
112
113
114
115
116
117
118
{
description = "mahmoudk1000's nixos config";
nixConfig = {
extra-substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://cache.garnix.io"
"https://fortuneteller2k.cachix.org"
];
extra-trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"fortuneteller2k.cachix.org-1:kXXNkMV5yheEQwT0I4XYh1MaCSz+qg72k8XAi2PthJI="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
nixpkgs-f2k = {
url = "github:moni-dz/nixpkgs-f2k";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix.url = "github:ryantm/agenix";
wezterm.url = "github:wez/wezterm/main?dir=nix";
};
outputs =
{
self,
nixpkgs,
...
}@inputs:
let
system = "x86_64-linux";
inherit (nixpkgs.lib) nixosSystem;
overlays = [
(import ./overlays)
inputs.nur.overlays.default
inputs.nixpkgs-f2k.overlays.window-managers
inputs.agenix.overlays.default
];
hosts = {
labbi = {
username = "mahmoud";
hostName = "labbi";
};
};
pkgs = import inputs.nixpkgs {
inherit system overlays;
config.allowUnfree = true;
};
mkHost =
host:
nixosSystem {
inherit system;
modules = [
inputs.home-manager.nixosModules.home-manager
inputs.nur.modules.nixos.default
inputs.agenix.nixosModules.default
{ imports = [ ./hosts/${host.hostName}/configuration.nix ]; }
{ nixpkgs.overlays = overlays; }
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${host.username} = import ./home-manager/${host.hostName}/home.nix;
sharedModules = [
inputs.spicetify-nix.homeManagerModules.default
inputs.agenix.homeManagerModules.default
{ _module.args.theme = import ./modules/themes; }
{ _module.args.font = import ./modules/themes/font.nix { inherit pkgs; }; }
];
extraSpecialArgs = {
inherit self inputs host;
};
};
}
];
specialArgs = {
inherit self inputs host;
};
};
in
{
nixosConfigurations = {
labbi = mkHost hosts.labbi;
};
devShells."${system}".default = pkgs.mkShell {
buildInputs = with pkgs; [
inputs.agenix.packages.${system}.default
git
vim
];
};
};
}