summaryrefslogtreecommitdiff
path: root/profiles/beryllium.nix
blob: cf180aaec2f125e4e68d6299deff4a82abf3ea0f (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
# 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-right
        "00ffffffffffff0006b3ca28305f010025200104b53e22783bad65ad50459f250e50542308008140818081c081009500b300d1c001014dd000a0f0703e80302035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283ca0a03c010a202020202020000000fc0041535553205647323839513141017102033ef154010304121305141f9007026061060e0f15161d1e2309070783010000e200d565030c001000681a00000101283c00e305e301e606070159521c023a801871382d40582c45006d552100001e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014";
      DP-0 = # asus-left
        "00ffffffffffff0006b3ba28c0f40300151f0104b53e22783bb4a5ad4f449e250f50542308008140818081c081009500b300d1c001014dd000a0f0703e80302035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283ca0a03c010a202020202020000000fc00415355532056473238390a2020019f02033af159010304121305141f9007025d5e5f6061060e0f15161d1e20482309070783010000e200d565030c001000e305e300e6060701565500023a801871382d40582c45006d552100001e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096";
    };
    DP-0 = {
      enable = true;
      primary = true;
      position = "0x0";
      mode = "3840x2160";
      dpi = 156;
      rate = "60.00";
    };
    DP-2 = {
      enable = false; # macbook is currently using this monitor
      primary = false;
      position = "3840x0";
      mode = "3840x2160";
      dpi = 156;
      rate = "60.00";
    };
  in {
    default = {
      inherit fingerprint;
      config = {
        inherit DP-2 DP-0;
      };
    };
    portrait = {
      inherit fingerprint;
      config = {
        DP-0 = DP-0 // { rotate = "left"; };
        DP-2 = DP-2 // { rotate = "left"; position = "2160x0"; };
      };
    };
  };

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

  services.polybar.enable = true;

  services.polybar.config."bar/perf".monitor = "DP-0";
  services.polybar.config."bar/cpu".monitor = "DP-0";
  services.polybar.config."bar/cpu".bottom = true;
  services.polybar.config."bar/org".monitor = "DP-2";

  services.polybar.script = ''
    polybar perf &
    polybar cpu &
    polybar org &
  '';
}