blob: aa7c01095cf6a9a092520702a383b3b2bcc38b78 (
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
|
{
lib,
pkgs,
inputs,
config,
hostconfig,
...
}:
with lib;
let
cfg = config.homeapps.presets;
in
{
imports = [
./nvim
./desktop
./zsh.nix
];
options.homeapps.presets = {
base.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable basics for home-config";
};
full.enable = lib.mkEnableOption "Enable everything";
email.enable = lib.mkEnableOption "Enable email-related config";
browser.enable = lib.mkEnableOption "Enable the browser (librewolf)";
comms.enable = lib.mkEnableOption "Enable communication-related config";
utils.enable = lib.mkEnableOption "Enable utilities";
note-taking.enable = lib.mkEnableOption "Enable note taking apps";
art.enable = lib.mkEnableOption "Enable art apps config";
work.enable = lib.mkEnableOption "Enable research-related config";
dev.enable = lib.mkEnableOption "Enable development apps";
connectivity.enable = lib.mkEnableOption "Enable connectivity";
multimedia.enable = lib.mkEnableOption "Enable multimedia apps";
games.enable = lib.mkEnableOption "Enable games";
};
config = lib.mkMerge [
(lib.mkIf cfg.full.enable {
homeapps.presets = {
base.enable = true;
email.enable = true;
browser.enable = true;
comms.enable = true;
utils.enable = true;
note-taking.enable = true;
art.enable = true;
work.enable = true;
dev.enable = true;
connectivity.enable = true;
multimedia.enable = true;
games.enable = true;
};
})
(lib.mkIf cfg.base.enable {
home.packages = with pkgs; [
lm_sensors
nix-output-monitor
ripgrep
unzip
iputils
inetutils
htop
git
tree
];
homeapps.zsh.enable = true;
homeapps.nvim.enable = true;
})
(lib.mkIf cfg.email.enable {
home.packages = with pkgs; [
];
})
(lib.mkIf cfg.comms.enable {
home.packages = with pkgs; [
iamb
];
})
(lib.mkIf cfg.utils.enable {
homesv.direnv.enable = true;
home.packages = with pkgs; [
btop
nmap
dig
unrar
sshfs
xdg-user-dirs
zsh
file
bat
jq
];
})
(lib.mkIf cfg.browser.enable {
home.packages = with pkgs; [
lynx
];
})
(lib.mkIf cfg.note-taking.enable {
home.packages = [ ];
# Todo force synthing to be on here
})
(lib.mkIf cfg.work.enable {
home.packages = with pkgs; [
inputs.tatuin.packages.${pkgs.system}.default
todoman
];
})
(lib.mkIf cfg.dev.enable {
homeapps.nvim = {
enable = true;
lsp = true;
};
home.packages = with pkgs; [
man-pages
];
homesv.direnv.enable = true;
})
(lib.mkIf cfg.connectivity.enable {
home.packages = with pkgs; [
eduvpn-client
];
# services.syncthing = {
# enable = true;
# };
})
(lib.mkIf cfg.multimedia.enable {
home.packages = with pkgs; [
ani-cli
playerctl
];
services.playerctld.enable = true;
services.spotifyd = {
enable = true;
settings = {
global = {
use-mpris = true;
device_name = "${hostconfig.networking.hostName} spotifyd";
};
discovery = {
zeroconf_port = 5352;
};
audio = {
backend = "pulse";
};
## Fixes spotifyd for some reason
# FIXME: Add a hook for notifications
};
};
})
(lib.mkIf cfg.games.enable {
home.packages = with pkgs; [
];
})
];
}
|