diff options
Diffstat (limited to 'accounts/gkleen@sif/default.nix')
-rw-r--r-- | accounts/gkleen@sif/default.nix | 23 |
1 files changed, 8 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"; }; | ||
68 | in { | 60 | in { |
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 = { |