zaphyra's git: nixfiles

zaphyra's nixfiles

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 
{
  systemConfig,
  config,
  lib,
  pkgs,
  homeManagerModules,
  ...
}:

let
  colors = import ../colors.nix;

in
{

  imports = with homeManagerModules.zaphyra; [
    configure.fonts

    services.dssd
    services.batsignal
    services.wpaperd
    services.shaderbg
    services.waybar
    services.wob
    services.swaync
    services.swayidle
    services.wlsunset
    services.playerctl
    services.gomuks-web
    services.wvkbd

    homeManagerModules.common.programs.app2unit
  ];

  home.persistence."/nix/persist/home/${config.home.username}".directories = [
    "dconf/.config/dconf"
  ];

  zaphyra.programs = {
    niri.enable = true;
    ghostty.enable = true;
    anyrun-launcher.enable = true;
    fuzzel.enable = true;
    overskride.enable = systemConfig.modules.hardware.bluetooth.enable;
    airpodsctl.enable = systemConfig.modules.hardware.bluetooth.enable;
  };

  tgc.programs.nirius.enable = true;

  xdg.portal = {
    config.common.default = [
      "gtk"
      "gnome"
    ];
    config.preferred.default = [
      "gtk"
      "gnome"
    ];
    extraPortals = with pkgs; [
      xdg-desktop-portal-gtk
      xdg-desktop-portal-gnome
    ];
  };

  gtk =
    let
      extraCss = ''
        @define-color background-color rgba(${toString colors.background.r}, ${toString colors.background.g}, ${toString colors.background.b}, ${toString colors.background.a});
        @define-color button-color rgba(${toString colors.button.r}, ${toString colors.button.g}, ${toString colors.button.b}, ${toString colors.button.a});
        @define-color button-hover-color rgba(${toString colors.buttonHover.r}, ${toString colors.buttonHover.g}, ${toString colors.buttonHover.b}, ${toString colors.buttonHover.a});
        @define-color border-color rgba(${toString colors.border.r}, ${toString colors.border.g}, ${toString colors.border.b}, ${toString colors.border.a});
        @define-color accent-border-color rgba(${toString colors.accentBorder.r}, ${toString colors.accentBorder.g}, ${toString colors.accentBorder.b}, ${toString colors.accentBorder.a});
        @define-color accent-color rgba(${toString colors.accent.r}, ${toString colors.accent.g}, ${toString colors.accent.b}, ${toString colors.accent.a});
      '';
    in
    {
      enable = true;

      gtk3.extraConfig = {
        gtk-theme-name = "adw-gtk3-dark";
        gtk-application-prefer-dark-theme = 1;
      };

      gtk4.extraConfig = {
        gtk-application-prefer-dark-theme = 1;
      };

      gtk3.extraCss = extraCss;
      gtk4.extraCss = extraCss;

      font = {
        name = "Adwaita Sans";
        size = 11;
        package = pkgs.adwaita-fonts;
      };

      iconTheme = {
        name = "Adwaita-green";
        package = pkgs.tgc.adwaita-colors-icon-theme;
      };

      cursorTheme = {
        name = "Adwaita";
        package = pkgs.adwaita-icon-theme;
      };
    };

  qt = {
    enable = true;
    platformTheme.name = "Adwaita-dark";
    style = {
      name = "Adwaita-dark";
      package = pkgs.adwaita-qt6;
    };
  };

  home.packages = with pkgs; [
    xdg-utils
    wl-clipboard-rs
    adw-gtk3
  ];

  # Use `dconf watch /` to track stateful changes you are doing and store them here.
  dconf.settings = {
    "org/gnome/desktop/interface" = {
      color-scheme = "prefer-dark";
      accent-color = "green";
      theme-name = "";
    };
    "org/gnome/desktop/wm/preferences" = {
      button-layout = "";
    };
    "org/gtk/Settings/Debug" = {
      enable-inspector-keybinding = true;
    };
  };

}