dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/apps/office.nix (1853B)
1## Office Environment Configuration ##
2{config, ...}: let
3 inherit (config) util;
4 inherit (config.flake) files;
5in {
6 flake.modules = {
7 nixos.office = {pkgs, ...}: {
8 # Dictionaries
9 environment = {
10 systemPackages = with pkgs; [
11 hunspell
12 hunspellDicts.en_US-large
13 hyphen
14 ];
15 variables."DICPATH" = "/run/current-system/sw/share/hunspell:/run/current-system/sw/share/hyphen";
16 pathsToLink = [
17 "/share/hunspell"
18 "/share/myspell"
19 "/share/hyphen"
20 ];
21 };
22 };
23
24 homeManager.office = {pkgs, ...}: {
25 home.packages = with pkgs; [
26 calibre
27 gscan2pdf
28 libreoffice
29 onlyoffice-desktopeditors
30 pdfarranger
31 simple-scan
32 gimp3
33 handbrake
34 inkscape
35 xournalpp
36 ];
37
38 xdg.mimeApps.defaultApplications = util.build.mime {
39 office = ["onlyoffice-desktopeditors.desktop"];
40 };
41
42 home = {
43 persist = {
44 files = [".config/gscan2pdfrc"];
45 directories = [
46 ".calibre"
47 ".config/calibre"
48 ".config/GIMP"
49 ".cache/gimp"
50 ".config/inkscape"
51 ".config/libreoffice"
52 ".config/onlyoffice"
53 ".local/share/onlyoffice"
54 ".local/share/data"
55 ];
56 };
57
58 file = {
59 "Templates" = rec {
60 source = files.templates;
61 target = ".init-templates";
62 onChange = ''
63 rm -rf ~/Templates
64 cp -rL ~/${target} ~/Templates
65 chmod -R 0777 ~/Templates
66 '';
67 };
68 ".local/share/fonts" = {
69 source = "${pkgs.custom.fonts}/share/fonts";
70 recursive = true;
71 };
72 };
73 };
74 };
75 };
76}