about summary refs log tree commit diff stats
path: root/modules/home.legacy/pkgs/default.nix
blob: 1d77c7de61b02edb252b7ed54010ee84caf0fb9b (plain) (blame)
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
{
  pkgs,
  lib,
  config,
  nixosConfig,
  ...
}:
# TODO: Remove this whole file, and move each package to a separate module. <2024-11-16>
with pkgs; let
  neorgFinal =
    neorg.override
    {
      defaultNeorgProjectDir = config.programs.nixvim.plugins.neorg.settings.load."core.dirman".config.workspaces.projects;
      allProjectsNewline = config.soispha.taskwarrior.projects.projects_newline;
      allProjectsComma = config.soispha.taskwarrior.projects.projects_comma;
      allProjectsPipe = config.soispha.taskwarrior.projects.projects_pipe;
      allWorkspaces = config.programs.nixvim.plugins.neorg.settings.load."core.dirman".config.workspaces;
      xdgConfigHome = config.xdg.configHome;
      xdgDataHome = config.xdg.dataHome;
    };

  Gui = {
    Terminals = [
      alacritty # default terminal
    ];

    Social = [
      signal-desktop # to avoid encryption problems with signal-bridge
    ];

    Misc = [
      keepassxc # password manager
      anki-bin # spaced repetition
    ];
  };

  TuiCli = {
    EyeCandy = [
      hyfetch # Neofetch with LGBTQ pride flags.
    ];

    Social = [
      iamb # best tui matrix client (as of today)
    ];

    Pdfs = [
      con2pdf # Scanner implementation
    ];

    Misc = [
      android-file-transfer # Android MTP client with minimalistic UI
      #xdg-ninja # A shell script which checks your $HOME for unwanted files and directories.
      xdg-utils # open urls and such things
      killall # kill a application by name
      snap-sync-forked # A btrfs based backup solution
      bc # Smart calculator
      aumo # Automatic mount
      nato # Encodes a string in the standardized spelling alphabet
      virsh-del # Delete a libvirt virtual machine (not really used anymore).
      jq # Json parser
    ];

    Task = {
      StartStop = [
        hibernate # Hibernate wrapper that automatically stops all active task
        lock # Same as `hibernate`, but for locking
      ];

      Firefox = [
        # `neorg` handles the integration between Firefox profiles and task
        # contexts
        neorgFinal
      ];
    };

    WM = {
      CLITools = [
        lswt # List Wayland toplevels.
        wl-clipboard # Command-line copy/paste utilities.
      ];

      Media = [
        libnotify # a command to send a notification.
      ];
    };

    Media = {
      View = [
        imv # Image viewer
        zathura # PDF viewer
      ];

      YouTube = [
        yti # Wrapper around `yt-dlp`.
        yt # A command line YouTube client
      ];

      Listen = [
        spodi # Wrapper around `spotdl`.
      ];
    };

    Hardware = {
      Storage = [
        # TODO: smartmontools # Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives
      ];

      Battery = [
        battery # Check the battery level
      ];

      # TODO: Also support setting the brightness with multiple backlights <2024-05-24>
      Backlight =
        lib.optional nixosConfig.soispha.laptop.enable
        (
          # Set the brightness level
          brightness.override
          {
            backlightName = nixosConfig.soispha.laptop.backlight;
          }
        );
    };

    SystemUpdate = [
      fupdate # Generic update tool.
      update-sys # System update tool (meant to slot into `fupdate`).
    ];

    FileListers = [
      tree # A directory listing program displaying a depth indented list of files
      fd # Simple, fast and user-friendly alternative to find
      ripgrep # A search tool that combines the usability of ag with the raw speed of grep
      fzf # used to quickly move around with its keybindings
      file # Show information about a file
      ll # Wrapper around `lf` to automatically change the path
      lm # Wrapper around `ll` to automatically cd to the last accessed path
    ];

    Editors = [
      ed # A POSIX-compliant line-oriented text editor
      #sed # GNU stream editor
      vim # The original ex/vi text editor (this is `vim` and not `vi`, as `vi` is unfree)
      #neovim # Fork of Vim aiming to improve user experience, plugins, and GUIs
    ];

    Programming = {
      GeneralTools = [
        stamp # Add a license header to a file
        git # the fast distributed version control system
        git-edit-index # Allows you to edit the indexed version of a file
        git-cm # A wrapper that re-adds the last commit's subject
        git-cleanup # An automatic merged branch deleter
        glow # Command-line markdown renderer
      ];
    };
  };
  # TODO: unmaintained, find sth else:
  # handlr # Powerful alternative to xdg-utils written in Rust
  mapFun = x:
    if builtins.isAttrs x
    then
      if lib.isDerivation x
      then [x]
      else builtins.attrValues x
    else [x];
in {
  options.soispha.programs.neorg = {
    package = lib.mkOption {
      type = lib.types.package;
      default = neorgFinal;
      description = ''
        The neorg package to use.
      '';
    };
  };
  config.home.packages =
    []
    ++ (with builtins;
      concatLists
      (concatLists [
        (concatMap mapFun
          (concatMap mapFun
            (concatMap mapFun
              (concatMap mapFun
                (concatMap mapFun
                  (concatMap mapFun
                    (attrValues Gui)))))))

        (concatMap mapFun
          (concatMap mapFun
            (concatMap mapFun
              (concatMap mapFun
                (concatMap mapFun
                  (concatMap mapFun
                    (attrValues TuiCli)))))))
      ]));
}