-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
executable file
·95 lines (90 loc) · 3.05 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
{
description = "The Sanatana Linux NixOS Configuration";
inputs = {
# SFMono w/ patches
sf-mono-liga-src = {
url = "github:shaunsingh/SFMono-Nerd-Font-Ligaturized";
flake = false;
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
nixpkgs-f2k.url = "github:moni-dz/nixpkgs-f2k";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
nur.url = "github:nix-community/NUR";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:nixos/nixos-hardware";
nixos-generators.url = "github:nix-community/nixos-generators";
rust-overlay.url = "github:oxalica/rust-overlay";
higgs-boson = {
url = "github:ThomasHighbaugh/firefox";
flake = false;
};
nil = {
url = "github:oxalica/nil";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay";
};
firefox-nightly.url = "github:nix-community/flake-firefox-nightly";
nps.url = "github:OleMussmann/Nix-Package-Search";
bhairava-grub-theme = {
url = "github:Sanatana-Linux/Bhairava-Grub-Theme";
inputs.nixpkgs.follows = "nixpkgs";
};
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
nixos-hardware,
bhairava-grub-theme,
nur,
chaotic,
...
} @ inputs: let
inherit (self) outputs;
forEachSystem = nixpkgs.lib.genAttrs ["x86_64-linux"]; # when needed add "aarch64-linux"
forEachPkgs = f: forEachSystem (sys: f nixpkgs.legacyPackages.${sys});
in {
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
overlays = import ./overlays {inherit inputs outputs;};
packages = forEachPkgs (pkgs: import ./pkgs {inherit pkgs;});
devShells = forEachPkgs (pkgs: import ./shell.nix {inherit pkgs;});
nixosConfigurations = {
# Laptop
macbook-air = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs nixos-hardware bhairava-grub-theme home-manager;};
modules = [
nur.nixosModules.nur
nixos-hardware.nixosModules.apple-macbook-air-6
./hosts/macbook-air
bhairava-grub-theme.nixosModule
home-manager.nixosModules.home-manager
chaotic.nixosModules.default
{
home-manager = {
useUserPackages = true;
backupFileExtension = "bak";
users.tlh = {imports = [./home/tlh/macbook-air];};
};
}
];
};
};
homeConfigurations = {
"tlh@macbook-air" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
extraSpecialArgs = {inherit inputs outputs;};
modules = [./home/tlh/macbook-air];
};
};
};
}