-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
159 lines (149 loc) · 5.35 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
{
outputs = {
nixpkgs,
nixpkgs-unstable,
nixos-hardware,
home-manager,
stylix,
self,
...
} @ inputs: let
# -------------------- SYSTEM SETTINGS ------------------------------
systemSettings = {
nix = {
system = "x86_64-linux"; # Your arch
version = "24.05"; # NixOS version
};
host = {
hostname = "nixos-t2"; # Your hostname
timezone = "Europe/Rome"; # Timezone config
locale = "it_IT.UTF-8"; # Locale config
keymap = "it"; # Global keymap
};
profile = {
name = "personal"; # personal / server / work / hypervisor
host = "mbp-16-2"; # your hardware config
};
monitor = {
resolution = "2560x1600";
refreshRate = "60";
scaling = "1.666";
};
};
# -------------------- USER SETTINGS --------------------------------
userSettings = {
user = {
username = "matteocavestri"; # Your username
name = "Matteo Cavestri"; # For git config
email = "[email protected]"; # For git config
dotfilesDir = ".dotfiles"; # Your dotfiles dir (for cave helper)
};
wm = "hyprland"; # gnome / hyprland / cinnamon / pantheon / cde / xfce / plasma / cosmic / mate / budgie / deepin / lumina
appearance = {
theme = "grigna-dark"; # See ./themes
font = "Inconsolata Nerd Font"; # Your font name
fontPkg = pkgs.inconsolata-nerdfont; # Your font package
cursor = "catppuccin-mocha-dark-cursors"; # Your cursor theme name
cursorPkg =
pkgs.catppuccin-cursors.mochaDark; # Your cursor theme package
icons = "Papirus"; # See docs
iconsPkg = pkgs.papirus-icon-theme; # Your icons package
};
environment = {
term = "kitty"; # Your default term (fix hyprland)
browser = "firefox"; # Only firefox
editor = "nvim"; # Only neovim
};
};
# -------------------------------------------------------------------
inherit (nixpkgs) lib;
pkgs = import nixpkgs {inherit (systemSettings.nix) system;};
pkgs-unstable = import nixpkgs-unstable {inherit (systemSettings.nix) system;};
in {
# -------------------- NixOS Configuration --------------------------
nixosConfigurations = {
${systemSettings.host.hostname} = lib.nixosSystem {
modules = [
(./.
+ "/profile/name"
+ ("/" + systemSettings.profile.name)
+ "/configuration.nix")
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
users.${userSettings.user.username} = import (./.
+ "/profile/name"
+ ("/" + systemSettings.profile.name)
+ "/home.nix");
extraSpecialArgs = {
inherit userSettings;
inherit systemSettings;
inherit inputs;
inherit pkgs-unstable;
};
};
}
];
specialArgs = {
inherit systemSettings;
inherit userSettings;
inherit inputs;
inherit pkgs-unstable;
};
};
};
};
# -------------------Inputs -----------------------------------------
inputs = {
# ------------------ NixOS Hardware ---------------------------------
nixos-hardware.url = "github:nixos/nixos-hardware";
# ------------------ NixPkgs ----------------------------------------
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
nixpkgs.url = "nixpkgs/nixos-24.05";
nurpkgs.url = "github:nix-community/NUR";
# ------------------ Home Manager -----------------------------------
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# ------------------ Hyprland ---------------------------------------
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland";
submodules = true;
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
# ------------------ Pyprland ----------------------------------------
pyprland = {
url = "github:hyprland-community/pyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
# ------------------ Stylix ------------------------------------------
stylix.url = "github:danth/stylix/release-24.05";
# ------------------ Firefox Addons ----------------------------------
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
# ------------------ Nevica ------------------------------------------
nevica = {
url = "github:matteocavestri/nevica";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# ------------------ Cave --------------------------------------------
cave.url = "github:matteocavestri/cave";
# ------------------ Cosmic ------------------------------------------
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
}