-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
114 lines (100 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
107
108
109
110
111
112
113
114
{
description = "SpyHoodle's personal nix system configurations";
inputs = {
# Nixpkgs Unstable
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
# Home Manager
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Nix Darwin
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
# Hyprland
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
hyprland.inputs.nixpkgs.follows = "nixpkgs";
# Any Run
anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs";
# Woomer
woomer.url = "github:coffeeispower/woomer";
woomer.inputs.nixpkgs.follows = "nixpkgs";
# Lix Module
lix-module.url = "git+https://git.lix.systems/lix-project/nixos-module?ref=refs/tags/2.91.0";
lix-module.inputs.nixpkgs.follows = "nixpkgs";
# Neovim configuration
editor.url = "github:spyhoodle/editor";
editor.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, nix-darwin, ... } @ inputs:
let
username = "maddie";
nixpkgs_aarch64_darwin = import nixpkgs {
config.allowUnfree = true;
system = "aarch64-darwin";
};
nixpkgs_x86_64_linux = import nixpkgs {
config.allowUnfree = true;
system = "x86_64-linux";
overlays = import ./overlays.nix;
};
in
{
nixosConfigurations."desktop" = nixpkgs.lib.nixosSystem
{
specialArgs = {
inherit username;
inherit inputs;
};
pkgs = nixpkgs_x86_64_linux;
system = "x86_64-linux";
modules = [
# Home Manager Modules
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = {
inherit username;
inherit inputs;
pkgs = nixpkgs_x86_64_linux;
};
home-manager.users.${username}.imports = [
./homes/common
./homes/desktop
inputs.anyrun.homeManagerModules.default
];
}
# NixOS Modules
./systems/desktop
inputs.lix-module.nixosModules.default
];
};
darwinConfigurations."laptop" = nix-darwin.lib.darwinSystem {
pkgs = nixpkgs_aarch64_darwin;
system = "aarch64-darwin";
specialArgs = {
inherit username;
inherit inputs;
};
modules = [
# Home Manager Modules
home-manager.darwinModules.home-manager
{
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit username;
inherit inputs;
pkgs = nixpkgs_aarch64_darwin;
};
home-manager.users.${username}.imports = [
./homes/laptop
./homes/common
];
}
# Nix Darwin Modules
./systems/laptop
inputs.lix-module.nixosModules.default
];
};
formatter.aarch64-darwin = nixpkgs_aarch64_darwin.legacyPackages.aarch64-darwin.nixpkgs-fmt;
formatter.x86_64-linux = nixpkgs_x86_64_linux.legacyPackages.x86_64-linux.nixpkgs-fmt;
};
}