tangled
alpha
login
or
join now
thevoid.cafe
/
puzzlevision
0
fork
atom
Non stop entertainment! The wackiest NixOS configuration to-date.
thevoid.cafe/projects/puzzlevision
nixos
flake
flake-parts
dotfiles
home-manager
nix
0
fork
atom
overview
issues
pulls
pipelines
🔧 Add new profile home utility module
thevoid.cafe
1 month ago
61e11829
e21be976
verified
This commit was signed with the committer's
known signature
.
thevoid.cafe
SSH Key Fingerprint:
SHA256:6LamuiiF+oLDOqy13Locb95HiqZGy8CIaFHI8miR6hE=
+54
2 changed files
expand all
collapse all
unified
split
homes
x86_64-linux
jo
default.nix
modules
home
profile
default.nix
+12
homes/x86_64-linux/jo/default.nix
···
15
15
./desktop/gnome
16
16
];
17
17
18
18
+
# Flake module configurations
18
19
puzzlevision = {
20
20
+
## User profile information
21
21
+
profile = {
22
22
+
fullName = "Jo";
23
23
+
email = "me@thevoid.cafe";
24
24
+
sshKeyFile = "${config.home.homeDirectory}/.ssh/id_ed25519";
25
25
+
};
26
26
+
27
27
+
## Active system themes
19
28
themes.catppuccin.enable = true;
29
29
+
30
30
+
## CLI tools and apps
20
31
cli.direnv.enable = true;
21
32
cli.git = {
22
33
enable = true;
···
24
35
};
25
36
};
26
37
38
38
+
# Configuration of wakatime secret file
27
39
sops.secrets.wakatime-cfg = {
28
40
format = "binary";
29
41
sopsFile = ./secrets/wakatime.cfg;
+42
modules/home/profile/default.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
self,
4
4
+
config,
5
5
+
...
6
6
+
}:
7
7
+
let
8
8
+
inherit (self) namespace mkOpt;
9
9
+
inherit (lib) types;
10
10
+
11
11
+
cfg = config.${namespace}.profile;
12
12
+
username = config.home.username;
13
13
+
in
14
14
+
{
15
15
+
options.${namespace}.profile = {
16
16
+
username =
17
17
+
mkOpt types.str username
18
18
+
"The user's username, to be consumed by other modules. Defaults to the home-manager username.";
19
19
+
fullName =
20
20
+
mkOpt types.str username
21
21
+
"The user's full name, to be consumed by other modules. Defaults to the home-manager username.";
22
22
+
email =
23
23
+
mkOpt (types.nullOr types.str) null
24
24
+
"The user's primary E-Mail address, to be consumed by other modules.";
25
25
+
sshKeyFile =
26
26
+
mkOpt (types.nullOr types.str) null
27
27
+
"The user's primary SSH key location, to be consumed by other modules.";
28
28
+
};
29
29
+
30
30
+
config = {
31
31
+
assertions = [
32
32
+
{
33
33
+
assertion = cfg.email != null;
34
34
+
message = "${namespace}.profile.email must be set!";
35
35
+
}
36
36
+
{
37
37
+
assertion = cfg.sshKeyFile != null;
38
38
+
message = "${namespace}.profile.sshKey must be set!";
39
39
+
}
40
40
+
];
41
41
+
};
42
42
+
}