my over complex system configurations
dotfiles.isabelroses.com/
nixos
nix
flake
dotfiles
linux
1{
2 lib,
3 osClass,
4 ...
5}:
6let
7 inherit (lib) mkOption mapAttrs;
8 inherit (lib.types) enum nullOr str;
9
10 mkDefault = name: args: mkOption ({ description = "default ${name} for the system"; } // args);
11in
12{
13 options.garden.programs.defaults = mapAttrs mkDefault {
14 shell = {
15 type = enum [
16 "bash"
17 "zsh"
18 "fish"
19 "nushell"
20 ];
21 default = if (osClass == "nixos") then "bash" else "zsh";
22 };
23
24 terminal = {
25 type = enum [
26 "ghostty"
27 "wezterm"
28 ];
29 default = "ghostty";
30 };
31
32 editor = {
33 type = enum [
34 "nvim"
35 "codium"
36 ];
37 default = "nvim";
38 };
39
40 pager = {
41 type = str;
42 default = "less -FR";
43 };
44
45 manpager = {
46 type = str;
47 default = "nvim +Man!";
48 };
49
50 screenLocker = {
51 type = nullOr (enum [
52 "swaylock"
53 "gtklock"
54 "cosmic-greeter"
55 ]);
56 default = "gtklock";
57 description = ''
58 The lockscreen module to be loaded by home-manager.
59 '';
60 };
61 };
62}