blob: 9aed9bed2013917f8d79af1072f1eb15d8746ab2 (
plain)
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
|
{ config, lib, pkgs, ... }:
{
imports = [
./programs
./home.nix
./system.nix
];
options = {
# Primary user of the system
user = lib.mkOption {
type = lib.types.str;
description = "Primary user of the system";
};
fullName = lib.mkOption {
type = lib.types.str;
description = "Human readable name of the user";
};
homePath = lib.mkOption {
type = lib.types.str;
description = "Home directory path of the user";
default = "/home/${config.user}";
};
dotfilesPath = lib.mkOption {
type = lib.types.str;
description = "Dotfiles path inside the users home dir";
default = "${config.homePath}/.config/nix";
};
email = lib.mkOption {
type = lib.types.str;
description = "Primary email of the user";
};
# Toggable components
desktop = {
enable = lib.mkEnableOption {
description = "Enable the gui.";
default = false;
};
};
system = {
enable = lib.mkEnableOption {
description = "Enable system services.";
default = false;
};
};
# Monitor
monitor = {
name = lib.mkOption {
type = lib.types.str;
description = "Name of the primary monitor.";
default = "";
};
scale = lib.mkOption {
type = lib.types.float;
description = "Scale of the primary monitor.";
default = 1.0;
};
};
# Theme of the system
theme = {
colors = lib.mkOption {
type = lib.types.attrs;
description = "base16 color scheme";
default = (import ./themes).catppuccin.mocha;
};
accentColor = lib.mkOption {
type = lib.types.str;
description = "Theme accent color.";
default = config.theme.colors.base0D;
};
opacity = lib.mkOption {
type = lib.types.float;
description = "Window opacity.";
default = 1.0;
};
font = lib.mkOption {
type = lib.types.str;
description = "Theme primary font.";
default = "JetBrains Mono";
};
fontSize = lib.mkOption {
type = lib.types.int;
description = "Theme primary font size.";
default = 14;
};
headerFont = lib.mkOption {
type = lib.types.str;
description = "Theme header font.";
default = "JetBrains Mono ExtraBold";
};
monospaceFont = lib.mkOption {
type = lib.types.str;
description = "Theme monospace font.";
default = "monospace";
};
iconFont = lib.mkOption {
type = lib.types.str;
description = "Theme icon font.";
default = "Font Awesome 6 Pro";
};
borderWidth = lib.mkOption {
type = lib.types.int;
description = "Theme border width";
default = 3;
};
outerRadius = lib.mkOption {
type = lib.types.int;
description = "Theme outer border radius.";
default = 5;
};
innerRadius = lib.mkOption {
type = lib.types.int;
description = "Theme inner border radius.";
default = 2;
};
outerGap = lib.mkOption {
type = lib.types.int;
description = "Theme outer gap/spacing.";
default = 10;
};
innerGap = lib.mkOption {
type = lib.types.int;
description = "Theme inner gap/spacing.";
default = 3;
};
};
wallpaper = lib.mkOption {
type = lib.types.str;
description = "Path to wallpaper image";
default = "";
};
avatar = lib.mkOption {
type = lib.types.str;
description = "Path to avatar image";
default = "";
};
};
config = {
# use system packages in home manager
home-manager.useGlobalPkgs = true;
# install user packages to /etc/profiles and not home directory
home-manager.useUserPackages = true;
# allow flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# allow unfree packages
nixpkgs.config.allowUnfree = true;
# set state version
home-manager.users.${config.user}.home.stateVersion = "25.05";
home-manager.users.root.home.stateVersion = "25.05";
system.stateVersion = "25.05";
};
}
|