summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-28 10:50:45 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-28 10:50:45 +0100
commit9a29d2e4f1b4683d15072134b8bfc7504d1b6f42 (patch)
tree52a8afd7ebf1f3f66e1691abcd7dfc0ca0ff881c
parent607a000a866f79d90cc0b8557f478603f61fe2a8 (diff)
downloadnixos-9a29d2e4f1b4683d15072134b8bfc7504d1b6f42.tar
nixos-9a29d2e4f1b4683d15072134b8bfc7504d1b6f42.tar.gz
nixos-9a29d2e4f1b4683d15072134b8bfc7504d1b6f42.tar.bz2
nixos-9a29d2e4f1b4683d15072134b8bfc7504d1b6f42.tar.xz
nixos-9a29d2e4f1b4683d15072134b8bfc7504d1b6f42.zip
gkleen@sif: ...
-rw-r--r--accounts/gkleen@sif/default.nix23
-rw-r--r--accounts/gkleen@sif/xmonad/xmonad.hs1
2 files changed, 9 insertions, 15 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix
index 231c42ee..118d11d5 100644
--- a/accounts/gkleen@sif/default.nix
+++ b/accounts/gkleen@sif/default.nix
@@ -47,24 +47,16 @@ let
47 --prefix PATH : ${pkgs.pulseaudio}/bin 47 --prefix PATH : ${pkgs.pulseaudio}/bin
48 ''; 48 '';
49 }; 49 };
50 wrappedChrome = pkgs.runCommand "${pkgs.google-chrome.name}-wrapped" { buildInputs = with pkgs; [ makeWrapper ]; } '' 50 wrapElectron = { package, bin ? package.meta.mainProgram or package.pname or pkgs.lib.strings.nameFromURL package.name "-", outBin ? bin }: pkgs.runCommand "${package.name}-wrapped" { buildInputs = with pkgs; [ makeWrapper ]; } ''
51 mkdir -p "$out/bin" 51 mkdir -p "$out/bin"
52 install -m 0755 ${pkgs.google-chrome}/bin/google-chrome-stable $out/bin/google-chrome 52 makeWrapper ${package}/bin/${bin} $out/bin/${outBin} \
53 wrapProgram $out/bin/google-chrome \
54 --add-flags '--force-device-scale-factor=1.6'
55 '';
56 wrappedZulip = pkgs.runCommand "${pkgs.zulip.name}-wrapped" { buildInputs = with pkgs; [ makeWrapper ]; } ''
57 mkdir -p "$out/bin"
58 install -m 0755 ${pkgs.zulip}/bin/zulip $out/bin/zulip
59 wrapProgram $out/bin/zulip \
60 --add-flags '--force-device-scale-factor=1.6'
61 '';
62 wrappedElementDesktop = pkgs.runCommand "${pkgs.element-desktop.name}-wrapped" { buildInputs = with pkgs; [ makeWrapper ]; } ''
63 mkdir -p "$out/bin"
64 install -m 0755 ${pkgs.element-desktop}/bin/element-desktop $out/bin/element-desktop
65 wrapProgram $out/bin/element-desktop \
66 --add-flags '--force-device-scale-factor=1.6' 53 --add-flags '--force-device-scale-factor=1.6'
67 ''; 54 '';
55
56 wrappedChrome = wrapElectron { package = pkgs.google-chrome; outBin = "google-chrome"; };
57 wrappedZulip = wrapElectron { package = pkgs.zulip; bin = "zulip"; outBin = "zulip"; };
58 wrappedElementDesktop = wrapElectron { package = pkgs.element-desktop; bin = "element-desktop"; outBin = "element"; };
59 wrappedRocketChatDesktop = wrapElectron { package = pkgs.rocketchat-desktop; bin = "rocketchat-desktop"; outBin = "rocketchat"; };
68in { 60in {
69 imports = with flake.nixosModules.userProfiles.${userName}; [ 61 imports = with flake.nixosModules.userProfiles.${userName}; [
70 mpv yt-dlp 62 mpv yt-dlp
@@ -298,6 +290,7 @@ in {
298 wrappedChrome nixos-shell virt-viewer freerdp gnome-icon-theme 290 wrappedChrome nixos-shell virt-viewer freerdp gnome-icon-theme
299 paper-icon-theme sshpassSecret weechat helvum 291 paper-icon-theme sshpassSecret weechat helvum
300 wrappedElementDesktop matrix-synapse-tools.synadm 292 wrappedElementDesktop matrix-synapse-tools.synadm
293 wrappedRocketChatDesktop
301 ]; 294 ];
302 295
303 file = { 296 file = {
diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs
index 688cd238..dfcd3083 100644
--- a/accounts/gkleen@sif/xmonad/xmonad.hs
+++ b/accounts/gkleen@sif/xmonad/xmonad.hs
@@ -192,6 +192,7 @@ hostFromName h
192 , assign "comm" $ (className =? "Emacs" <&&> title =? "Mail") 192 , assign "comm" $ (className =? "Emacs" <&&> title =? "Mail")
193 , assign "comm" $ className =? "Zulip" 193 , assign "comm" $ className =? "Zulip"
194 , assign "comm" $ className =? "Element" 194 , assign "comm" $ className =? "Element"
195 , assign "comm" $ className =? "Rocket.Chat"
195 , assign "comm" $ className =? "Discord" 196 , assign "comm" $ className =? "Discord"
196 , assign "media" $ (className =? "Alacritty" <&&> resource =? "media") 197 , assign "media" $ (className =? "Alacritty" <&&> resource =? "media")
197 , assign "monitor" $ className =? "Grafana" 198 , assign "monitor" $ className =? "Grafana"