summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'profiles')
-rw-r--r--profiles/beryllium.nix85
-rw-r--r--profiles/laptop.nix6
-rw-r--r--profiles/workshop.nix6
3 files changed, 95 insertions, 2 deletions
diff --git a/profiles/beryllium.nix b/profiles/beryllium.nix
index 91cfe05..170dee2 100644
--- a/profiles/beryllium.nix
+++ b/profiles/beryllium.nix
@@ -1,9 +1,16 @@
# 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
@@ -19,4 +26,80 @@
};
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%";
+ };
}
+
+
diff --git a/profiles/laptop.nix b/profiles/laptop.nix
index 77bc792..8f80cc2 100644
--- a/profiles/laptop.nix
+++ b/profiles/laptop.nix
@@ -4,6 +4,7 @@
{
imports = [
../lib/common.nix
+ ../lib/urxvt.nix
../lib/linux.nix
../lib/emacs.nix
../lib/ssh.nix
@@ -19,6 +20,11 @@
];
};
+ services.polybar.enable = true;
+ services.polybar.script = "polybar top &";
+ srvices.polybar.config."bar/top".monitor = "\${env:MONITOR:HDMI-2}";
+ srvices.polybar.config."bar/top".monitor-fallback = "\${env:MONITOR:eDP-1}";
+
programs.autorandr.enable = true;
programs.autorandr.hooks.postswitch = {
diff --git a/profiles/workshop.nix b/profiles/workshop.nix
index 003630d..84b8104 100644
--- a/profiles/workshop.nix
+++ b/profiles/workshop.nix
@@ -4,6 +4,8 @@
{
imports = [
../lib/linux.nix
+ ../lib/urxvt.nix
+ ../lib/polybar.nix
../lib/ssh.nix
../lib/packages.nix
../lib/emacs.nix
@@ -18,7 +20,9 @@
];
};
- services.polybar.config."bar/top".monitor = lib.mkForce "HDMI-1";
+ services.polybar.config."bar/top".monitor = "HDMI-1";
+ services.polybar.enable = true;
+ services.polybar.script = "polybar top &";
services.random-background.enable = lib.mkForce true;