-
-
Save kalbasit/5146cc76a92677702f451edfc4aba4df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, stdenv, pkgs, lib, ... }: | |
stdenv.mkDerivation rec { | |
name = "i3-config"; | |
phases = lib.mkMerge [ | |
"installPhase" | |
"fixupPhase" | |
(lib.mkIf (config.networking.hostname == "hades") "hadesFixes") | |
]; | |
src = ./.; | |
installPhase = '' | |
install -d -m755 $out/userHome/.config/i3 | |
cp -dr $src/bin $out/bin | |
substitute $src/config $out/userHome/.config/i3/config \ | |
--subst-var-by brightnessctl_bin ${pkgs.brightnessctl}/bin/brightnessctl \ | |
--subst-var-by charles_bin ${pkgs.charles}/bin/charles \ | |
--subst-var-by i3lock_bin ${pkgs.i3lock}/bin/i3lock \ | |
--subst-var-by i3status_bin ${pkgs.i3status}/bin/i3status \ | |
--subst-var-by notify-send_bin ${pkgs.libnotify}/bin/notify-send \ | |
--subst-var-by pactl_bin ${pkgs.pulseaudio}/bin/pactl \ | |
--subst-var-by rbrowser_bin ${pkgs.rbrowser}/bin/rbrowser \ | |
--subst-var-by rofi_bin ${pkgs.rofi}/bin/rofi \ | |
--subst-var-by slack_bin ${pkgs.slack}/bin/slack \ | |
--subst-var-by alacritty_bin ${pkgs.alacritty}/bin/alacritty | |
''; | |
hadesFixes = '' | |
substituteInPlace $out/userHome/.config/i3/config \ | |
--subst-var-by int_monitor eDP1 \ | |
--subst-var-by int_mode 1920x1080 \ | |
--subst-var-by int_scale 1x1 \ | |
--subst-var-by ext_monitor DP-1-2 | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment