-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
58 lines (56 loc) · 1.56 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
{
description = "Root flake for NixOS, Nix shells and Home Manager";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager/release-24.11";
};
ghostty.url = "github:ghostty-org/ghostty";
};
outputs = {
home-manager,
flake-utils,
nixpkgs,
self,
unstable,
ghostty,
nixos-hardware,
}: let
user = builtins.getEnv "USER";
in
flake-utils.lib.eachDefaultSystem (
system: let
stable-pkgs = nixpkgs.legacyPackages.${system};
pkgs = import unstable {
system = stable-pkgs.system;
config.allowUnfree = true;
};
devShells = import ./src/nix/shells/main.nix {inherit pkgs;};
nixos-entry = import ./src/nix/nixos/nixos-entry.nix {
inherit
ghostty
home-manager
nixos-hardware
nixpkgs
pkgs
stable-pkgs
system
;
};
in {
inherit devShells;
packages = {
nixosConfigurations = nixos-entry;
homeConfigurations."${user}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [./src/nix/home-manager/home.nix];
extraSpecialArgs = {inherit pkgs stable-pkgs;};
};
};
}
);
}