summaryrefslogtreecommitdiff
path: root/profiles/beryllium.nix
blob: 170dee2c7332a2b68bae5d0d5d1407da2edfb2e3 (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
# beryllium server
{ pkgs, lib, ... }:

let
  inherit (import ../lib/const.nix) fontSize homedir gpgid;
  inherit (import ../lib/theme.nix { inherit pkgs lib; })
    theme colors base16-scheme base16-scheme-filename
    xresourcesFile;
in {
  imports = [
    ../lib/linux.nix
    ../lib/urxvt.nix
    ../lib/polybar.nix
    ../lib/ssh.nix
    ../lib/packages.nix
    ../lib/emacs.nix
    ../lib/email.nix
  ];

  home = {
    packages = with pkgs; [
      zulip
      reaper
     obs-studio
    ];
  };

  programs.git.signing.signByDefault = lib.mkForce true;


  programs.autorandr.enable = true;
  programs.autorandr.hooks.postswitch.restart-polybar =
    "systemctl --user restart polybar.service";
  programs.autorandr.hooks.postswitch.notify =
    ''notify-send -i display "Display profile" "$AUTORANDR_CURRENT_PROFILE"'';

  programs.autorandr.profiles = let
    # these fingerprints are almost the same because they are alsmost the same
    # monitors, so be careful when changing these
    fingerprint = {
      DP-2 = # asus-left
        "00ffffffffffff0006b3ca28305f010025200104b53e22783bad65ad50459f250e50542308008140818081c081009500b300d1c001014dd000a0f0703e80302035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283ca0a03c010a202020202020000000fc0041535553205647323839513141017102033ef154010304121305141f9007026061060e0f15161d1e2309070783010000e200d565030c001000681a00000101283c00e305e301e606070159521c023a801871382d40582c45006d552100001e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014";
      DP-0 = # asus-right
        "00ffffffffffff0006b3ba28c0f40300151f0104b53e22783bb4a5ad4f449e250f50542308008140818081c081009500b300d1c001014dd000a0f0703e80302035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283ca0a03c010a202020202020000000fc00415355532056473238390a2020019f02033af159010304121305141f9007025d5e5f6061060e0f15161d1e20482309070783010000e200d565030c001000e305e300e6060701565500023a801871382d40582c45006d552100001e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096";
    };
    DP-2 = {
      enable = true;
      primary = true;
      position = "0x0";
      mode = "3840x2160";
      dpi = 331;
      rate = "60.00";
    };
    DP-0 = {
      enable = true;
      primary = false;
      position = "3840x0";
      mode = "3840x2160";
      dpi = 331;
      rate = "60.00";
    };
  in {
    default = {
      inherit fingerprint;
      config = {
        inherit DP-2 DP-0;
      };
    };
  };

  services.random-background.enable = lib.mkForce true;

  services.polybar.enable = true;
  services.polybar.config."bar/top".monitor = "DP-0";
  services.polybar.script = ''
    polybar top &
    polybar second &
  '';
  services.polybar.config."bar/second" = {
    background = colors."${theme}".background;
    font-0 = "FiraSans:size=${toString fontSize}";
    font-1 = "Font Awesome 5:pixelsize=11;1";
    font-2 = "MaterialIcons:size=10:antialias=false;2";
    foreground = colors."${theme}".foreground;
    height = "30";
    module-margin = 1;
    modules-center = "date";
    modules-left = ["ewmh" "volume-bar"];
    modules-right = [ "battery" "cpu" "mem" "temp" ];
    monitor = "DP-2";
    radius = 0;
    separator = "|";
    tray-background = colors."${theme}".background;
    tray-detached = false;
    tray-maxsize = 16;
    tray-offset-x = 0;
    tray-offset-y = 0;
    tray-padding = 0;
    tray-position = "right";
    tray-scale = 1;
    width = "100%";
  };
}