-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathflake.nix
131 lines (130 loc) · 3.65 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
121
122
123
124
125
126
127
128
129
130
131
{
description = "My custom multi-machine system flake.";
inputs = {
wezterm.url = "github:wez/wezterm?dir=nix";
ghostty = {
url = "github:ghostty-org/ghostty";
};
nixos-boot.url = "github:HirschBerge/nixos-boot";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
rose-pine-hyprcursor.url = "github:ndom91/rose-pine-hyprcursor";
nur.url = "github:nix-community/nur";
nixCats = {
url = "github:BirdeeHub/nixCats-nvim";
# inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
nixos-boot,
...
} @ inputs: let
# inherit (self) outputs;
pkgs = import nixpkgs {
inherit system;
overlays = [
inputs.nur.overlays.default
];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
# Export Variables
stateVersion = "23.11"; # TODO: change stateVersion
username = "USER_NAME"; # TODO: change username
desktop = "yoitsu"; # TODO: Change Desktop name
laptop = "shirohebi"; # TODO: change Laptop name
system = "x86_64-linux"; # TODO: Rarely, change system architecture
email = "THIS_IS_AN_EMAIL"; # TODO: Change your email for Git and such
discord = "not this time"; # TODO: Change/ remove
in {
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .# your-hostname'
nixosConfigurations = {
${desktop} = nixpkgs.lib.nixosSystem {
specialArgs = let
hostname = "${desktop}";
in {
inherit
inputs
self
username
system
stateVersion
email
discord
hostname
;
};
# Our main nixos configuration file <
modules = [./nixos/${desktop}/configuration.nix nixos-boot.nixosModules.default];
};
${laptop} = nixpkgs.lib.nixosSystem {
specialArgs = let
hostname = "${laptop}";
stateVersion = "23.05";
in {
inherit
inputs
self
username
system
stateVersion
email
discord
hostname
;
};
# Our main nixos configuration file <
modules = [./nixos/${laptop}/configuration.nix nixos-boot.nixosModules.default];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .# your-username@your-hostname'
homeConfigurations = {
"${username}@${desktop}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; # > Our main home-manager configuration file <
modules = [./nixos/${desktop}/home.nix];
extraSpecialArgs = let
hostname = desktop;
in {
inherit
self
inputs
username
hostname
system
stateVersion
email
;
};
};
"${username}@${laptop}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs; # > Our main home-manager configuration file <
modules = [./nixos/${laptop}/home.nix];
extraSpecialArgs = let
hostname = laptop;
stateVersion = "23.05";
in {
inherit
self
inputs
username
hostname
system
stateVersion
email
;
};
};
};
};
}