-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
251 lines (244 loc) · 9.97 KB
/
Copy pathdefault.nix
File metadata and controls
251 lines (244 loc) · 9.97 KB
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
{
config,
lib,
pkgs,
modulesPath,
...
}: let
cfg = config.essence;
#cfg_user = config.essence.user;
in {
imports = [
# paths of other modules
./modules/audio.nix
./modules/desktop.nix
./modules/graphics.nix
./modules/lockscreen.nix
./modules/patches.nix
./modules/user.nix
./modules/programs/update.nix
];
# TODO Pull in Serivce Creation into this file. as that is the only way to build out togglable service service scripts for each user
options = {
essence = {
basics = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Enable the standard system basics I like on a minimal system.
'';
};
};
programs = {
git = {
username = lib.mkOption {
type = lib.types.str;
default = "";
description = ''
The username given to git.
'';
};
email = lib.mkOption {
type = lib.types.str;
default = "";
description = ''
The email given to git.
'';
};
token = lib.mkOption {
type = lib.types.str;
default = "";
description = ''
The token given to git.
'';
};
};
};
# user = lib.mkOption {
# default = { };
# type = lib.types.attrsOf (lib.types.submodule (import ./user/. {
# inherit lib;
# inherit pkgs;
# inherit config;
# }));
# };
};
};
config = let
builder = import ./modules/functions/service_builder.nix {
inherit lib;
inherit pkgs;
};
programs_builder = x:
builtins.trace x.function.productivity.development.enable
{
gamescope.enable = lib.mkDefault x.function.gaming.enable;
git.enable = lib.mkDefault true; #Yea... this used to be toggleable but you'll thank me later for leaving this true by default
# Note to be able to push commits to github repos using Lazygit login using <Username>:<Github_Personal_Access_Token>
# TODO in Jan 01 2026 Generate a new <Github_Personal_Access_Token> https://github.com/settings/tokens
lazygit.enable = lib.mkDefault x.function.productivity.development.enable; #as a test terminal git ui
steam = lib.mkIf (x.function.gaming.enable == true) {
enable = lib.mkDefault true;
extest.enable = lib.mkDefault true; #translate X11 input events to uinput events (e.g. for using Steam Input on Wayland) .
#extraCompatPackages = with pkgs; [ proton-ge-bin ];
gamescopeSession.enable = lib.mkDefault true;
localNetworkGameTransfers.openFirewall = lib.mkDefault true;
protontricks.enable = lib.mkDefault true;
remotePlay.openFirewall = lib.mkDefault true;
};
};
in
lib.mkMerge [
#(lib.mkIf (config.essence.user != { }) lib.mkMerge [
# # {
# # users.users =
# # (lib.mapAttrs (
# # user: setting:
# # {
# # extraGroups = []
# # # Audio Groups
# # ++ (if (setting.function.audio.enable == true) then [ "audio" ] else [])
# # ;
# # packages = []
# # # Audio Packages
# # ++ (if (setting.function.audio.enable == true) then
# # setting.function.audio.packages
# # else [])
# # # Gaming Packages
# # ++ (if (setting.function.gaming.enable == true) then
# # setting.function.gaming.packages
# # else [])
# # ++ (if (setting.function.gaming.emulator.enable == true) then
# # setting.function.gaming.emulator.packages
# # else [])
# # ++ (if (setting.function.gaming.vr.enable == true) then
# # setting.function.gaming.vr.packages
# # else [])
# # # Productivity packages
# # ++ (if (setting.function.productivity.administration.enable == true) then
# # setting.function.productivity.administration.packages
# # else [])
# # ++ (if (setting.function.productivity.development.enable == true) then
# # setting.function.productivity.development.packages
# # else [])
# # ++ (if (setting.function.productivity.office.enable == true) then
# # setting.function.productivity.office.packages
# # else [])
# # ;
# # }
# # ) config.essence.user);
# # }
# {
# programs = programs_builder (lib.attrsets.mergeAttrsList (builtins.attrValues config.essence.user));
# }
# {
# systemd.user.services = lib.mkMerge (builder.build_a_service config.essence.user);
# }
#])
{
environment = lib.mkIf (config.essence.basics.enable == true) {
binsh = "${pkgs.dash}/bin/dash"; #set default sh to be dash This is an faster bash interpreter
systemPackages = with pkgs; [
# btop # Resource Monitor
cifs-utils # Samba client utils
ffmpeg # Multimedia framework
git-credential-manager # it is what it is
imagemagick
jq
# rar # Utility for RAR archives
vim
wget
];
};
fonts = lib.mkIf (config.essence.basics.enable == true) {
packages = with pkgs; [
inter-nerdfont
nerd-fonts.bigblue-terminal
nerd-fonts.dejavu-sans-mono
nerd-fonts.gohufont
nerd-fonts.hack
nerd-fonts.jetbrains-mono
];
};
nix = lib.mkIf (config.essence.basics.enable == true) {
settings = {
# Nix automatically detects files in the store that have identical contents, and replaces them with hard links to a single copy.
auto-optimise-store = lib.mkDefault true;
# Enable Flakes
experimental-features = ["nix-command" "flakes"];
};
};
nixpkgs.config = {
packageOverrides = pkgs: {
curl-impersonate-1-25 = pkgs.callPackage ./packages/curl-impersonate/package.nix {};
demonsaw = pkgs.callPackage ./packages/demonsaw/default.nix {};
#fooyin = pkgs.callPackage ./packages/fooyin/default.nix {};
#lmstudio = pkgs.callPackage ./packages/lmstudio/default.nix {};
nook-desktop = pkgs.callPackage ./packages/nook-desktop/default.nix {};
ta-lib = pkgs.callPackage ./packages/ta-lib/default.nix {};
python313 = pkgs.python313.override {
packageOverrides = python-self: python-super: {
ta-lib = python-self.callPackage ./packages/python-ta-lib/default.nix { ta-lib = pkgs.callPackage ./packages/ta-lib/default.nix {}; };
rapids-cudf = python-self.callPackage ./packages/cudf/default.nix {
# Match your system CUDA version. If you use cudaPackages (without
# a version suffix) adjust accordingly.
cudaPackages = pkgs.cudaPackages_12_8;
};
};
};
theme_pack = pkgs.callPackage ./packages/theme_pack/default.nix {};
void-editor = pkgs.callPackage ./packages/void-editor/default.nix {
vscode-generic = (modulesPath + "../../../pkgs/applications/editors/vscode/generic.nix"); #<nixpkgs/pkgs/applications/editors/vscode/generic.nix>;
};
wallpapers = pkgs.callPackage ./packages/wallpapers/default.nix {};
# winboat = pkgs.callPackage ./packages/winboat/package.nix {};
zen-browser = pkgs.callPackage ./packages/zen-browser/default.nix {};
};
};
programs = lib.mkIf (config.essence.basics.enable == true) {
appimage = {
enable = true;
binfmt = true;
};
bash = {
completion.enable = lib.mkDefault true;
enableLsColors = lib.mkDefault true;
#shellAliases = {};
};
firefox.enable = lib.mkDefault true; # Add a web browser so user can't be stupid unless they disable
git = {
enable = lib.mkDefault true; # Source Code Control so that config can always be managed
package = lib.mkDefault pkgs.git;
};
nano = {
enable = lib.mkDefault true;
syntaxHighlight = lib.mkDefault true;
};
nh = {
enable = lib.mkDefault true;
clean = {
dates = "weekly";
enable = lib.mkDefault true;
extraArgs = "--keep 30 --keep-since 30d";
};
};
zsh = {
enable = lib.mkDefault true; # make sure user has a working shell
setOptions = [
"HIST_IGNORE_DUPS"
"SHARE_HISTORY"
"HIST_FCNTL_LOCK"
"HIST_EXPIRE_DUPS_FIRST"
"HIST_SAVE_NO_DUPS"
];
syntaxHighlighting.enable = true;
};
};
xdg = {
autostart.enable = lib.mkDefault true;
menus.enable = lib.mkDefault true;
};
}
];
}