-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
121 lines (107 loc) · 3.47 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
119
120
{
description = "";
inputs = {
# Nixpkgs
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-staging-next.url = "github:NixOS/nixpkgs/staging-next";
# Home Manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nixos Hardware
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# Nix LD
#nix-ld.url = "github:Mic92/nix-ld";
#nix-ld.inputs.nixpkgs.follows = "nixpkgs";
# Chaotic
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
# NUR
#nurpkgs = {
# url = "github:nix-community/NUR";
# inputs.nixpkgs.follows = "nixpkgs";
#};
hyprland.url = "github:hyprwm/Hyprland";
flake-utils.url = "github:numtide/flake-utils";
# Darwin
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ { self, nix-darwin, nixpkgs, nixpkgs-staging-next, home-manager, nixos-hardware, chaotic, hyprland, ... }:
let
system = "x86_64-linux";
darwin_config = {
# Set Git commit hash for darwin-version.
system.configurationRevision = self.rev or self.dirtyRev or null;
};
in
{
darwinConfigurations = {
darkrai = nix-darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
darwin_config
./hosts/darkrai/configuration.nix
];
};
};
homeConfigurations = {
# TODO: default home-manager config
"Nathan" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit system nixpkgs home-manager; };
modules = [
#hyprland.homeManagerModules.default
./home-manager/home.nix
];
};
};
nixosConfigurations = {
jirachi = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit (nixpkgs) lib;
inherit nixpkgs-staging-next;
inherit inputs; # important for hyprland!
inherit system;
};
modules = [
chaotic.nixosModules.default
#nix-ld.nixosModules.nix-ld
#hyprland.nixosModules.default
#{programs.hyprland.enable = true;}
# TODO: ./secrets/eduroam.nix
nixos-hardware.nixosModules.lenovo-thinkpad-z
./hosts/jirachi/hardware-configuration.nix
./nixos/configuration.nix
#<home-manager/nixos>
];
};
lennar = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit (nixpkgs) lib;
inherit inputs system;
};
modules = [
nixos-hardware.nixosModules.lenovo-thinkpad-x1-7th-gen
hyprland.nixosModules.default
#{programs.hyprland.enable = true;}
./nixos/configuration.nix
./hosts/lennar/hardware-configuration.nix
];
};
};
} // inputs.flake-utils.lib.eachDefaultSystem
(system:
# nix develop
let
pkgs = import inputs.nixpkgs {inherit system; };
in {
devShell = pkgs.mkShell {
name = "installation-shell";
buildInputs = with pkgs; [ home-manager git];
#buildInputs = with pkgs; [ wget s-tar home-manager git vim tmux ];
NIX_CONFIG = "experimental-features = nix-command flakes";
};
}
);
}