Merge branch 'master' of github.com:IvanMalison/dotfiles
This commit is contained in:
commit
fe057ac3ff
11
dotfiles/config/autorandr/work/config
Normal file
11
dotfiles/config/autorandr/work/config
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
output DP-2
|
||||||
|
off
|
||||||
|
output DP-1
|
||||||
|
mode 3840x1600
|
||||||
|
pos 0x0
|
||||||
|
rate 59.99
|
||||||
|
output eDP-1
|
||||||
|
mode 1920x1080
|
||||||
|
pos 0x1600
|
||||||
|
primary
|
||||||
|
rate 144.00
|
2
dotfiles/config/autorandr/work/setup
Normal file
2
dotfiles/config/autorandr/work/setup
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DP-1 00ffffffffffff0010acf4a04c524430091c0104b55825783eee95a3544c99260f5054a54b00714f81008180a940d1c00101010101014c9a00a0f0402e6030203a00706f3100001a000000ff0039374638503833313044524c0a000000fc0044454c4c20553338313844570a000000fd001855197328000a20202020202001c702031af14d9005040302071601141f12135a2309070783010000023a801871382d40582c4500706f3100001e565e00a0a0a0295030203500706f3100001acd4600a0a0381f4030203a00706f3100001a2d5080a070402e6030203a00706f3100001a134c00a0f040176030203a00706f3100001a000000000000000000000053
|
||||||
|
eDP-1 00ffffffffffff0030e4c00500000000001b0104a54f0078eae085a3544e9b260e5054000000010101010101010101010101010101015e8780a070384d403020350058c21000001b683880a070384d403020350058c21000001b00000000000000000000000000000000000000000002000c30f20f3c962e12309e00000000a8
|
117
dotfiles/config/taffybar/ivanm-dfinity-razr.css
Normal file
117
dotfiles/config/taffybar/ivanm-dfinity-razr.css
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
@define-color transparent rgba(0.0, 0.0, 0.0, 0.0);
|
||||||
|
@define-color white #FFFFFF;
|
||||||
|
@define-color black #000000;
|
||||||
|
@define-color taffy-blue #0c7cd5;
|
||||||
|
|
||||||
|
@define-color active-window-color @white;
|
||||||
|
@define-color urgent-window-color @taffy-blue;
|
||||||
|
@define-color font-color @white;
|
||||||
|
@define-color menu-background-color @white;
|
||||||
|
@define-color menu-font-color @black;
|
||||||
|
|
||||||
|
/* Top level styling */
|
||||||
|
|
||||||
|
.taffy-window * {
|
||||||
|
font-family: "Noto Sans", sans-serif;
|
||||||
|
font-size: 10pt;
|
||||||
|
color: @font-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taffy-box {
|
||||||
|
border-color: @white;
|
||||||
|
border-style: solid;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inner-pad {
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contents {
|
||||||
|
padding: 3px;
|
||||||
|
transition: background-color .5s;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Workspaces styling */
|
||||||
|
|
||||||
|
.workspace-label {
|
||||||
|
padding-right: 3px;
|
||||||
|
padding-left: 2px;
|
||||||
|
font-size: 10pt;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active .contents {
|
||||||
|
background-color: rgba(0.0, 0.0, 0.0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.visible .contents {
|
||||||
|
background-color: rgba(0.0, 0.0, 0.0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-icon-container {
|
||||||
|
transition: opacity .5s, box-shadow .5s;
|
||||||
|
opacity: 1;
|
||||||
|
border-radius: 5px;
|
||||||
|
transition: background-color 1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This gives space for the box-shadow (they look like underlines) that follow.
|
||||||
|
This will actually affect all widgets, (not just the workspace icons), but
|
||||||
|
that is what we want since we want the icons to look the same. */
|
||||||
|
.auto-size-image, .sni-tray {
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-icon-container.active {
|
||||||
|
background-color: rgba(255.0, 255.0, 255.0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-icon-container.urgent {
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-icon-container.inactive .window-icon {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-icon-container.minimized .window-icon {
|
||||||
|
opacity: .3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-icon {
|
||||||
|
opacity: 1;
|
||||||
|
transition: opacity .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Button styling */
|
||||||
|
|
||||||
|
button {
|
||||||
|
all: initial;
|
||||||
|
background-color: @transparent;
|
||||||
|
border-width: 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:checked, button:hover .Contents:hover {
|
||||||
|
box-shadow: inset 0 -3px @taffy-blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Menu styling */
|
||||||
|
|
||||||
|
/* The ".taffy-window" prefixed selectors are needed because if they aren't present,
|
||||||
|
the top level .Taffybar selector takes precedence */
|
||||||
|
.taffy-window menuitem *, menuitem * {
|
||||||
|
color: @menu-font-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taffy-window menuitem, menuitem {
|
||||||
|
background-color: @menu-background-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taffy-window menuitem:hover, menuitem:hover {
|
||||||
|
background-color: @taffy-blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taffy-window menuitem:hover > label, menuitem:hover > label {
|
||||||
|
color: @white;
|
||||||
|
}
|
@ -44,7 +44,8 @@ extra-deps:
|
|||||||
- stm-2.5.0.0
|
- stm-2.5.0.0
|
||||||
- time-units-1.0.0
|
- time-units-1.0.0
|
||||||
- xml-helpers-1.0.0
|
- xml-helpers-1.0.0
|
||||||
resolver: lts-13.2
|
- broadcast-chan-0.2.0.2
|
||||||
|
resolver: lts-13.19
|
||||||
allow-newer: true
|
allow-newer: true
|
||||||
nix:
|
nix:
|
||||||
packages:
|
packages:
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 0393c3b01d057855bf927ac279dacc5550c27268
|
Subproject commit eb9f7b9f43898201237000b921d1224c47d7dac7
|
@ -24,11 +24,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.inner-pad {
|
.inner-pad {
|
||||||
padding: 3px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contents {
|
.contents {
|
||||||
padding: 3px;
|
padding: 2px;
|
||||||
transition: background-color .5s;
|
transition: background-color .5s;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
@ -93,6 +93,8 @@ enableLogger logger level = do
|
|||||||
saveGlobalLogger $ setLevel level logger
|
saveGlobalLogger $ setLevel level logger
|
||||||
|
|
||||||
logDebug = do
|
logDebug = do
|
||||||
|
logger3 <- getLogger "System.Taffybar"
|
||||||
|
saveGlobalLogger $ setLevel DEBUG logger3
|
||||||
logger <- getLogger "System.Taffybar.Widget.Generic.AutoSizeImage"
|
logger <- getLogger "System.Taffybar.Widget.Generic.AutoSizeImage"
|
||||||
saveGlobalLogger $ setLevel DEBUG logger
|
saveGlobalLogger $ setLevel DEBUG logger
|
||||||
logger2 <- getLogger "StatusNotifier.Tray"
|
logger2 <- getLogger "StatusNotifier.Tray"
|
||||||
@ -109,6 +111,7 @@ logDebug = do
|
|||||||
cssFileByHostname =
|
cssFileByHostname =
|
||||||
[ ("uber-loaner", "uber-loaner.css")
|
[ ("uber-loaner", "uber-loaner.css")
|
||||||
, ("imalison-home", "taffybar.css")
|
, ("imalison-home", "taffybar.css")
|
||||||
|
, ("ivanm-dfinity-razr", "ivanm-dfinity-razr.css")
|
||||||
]
|
]
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
@ -155,6 +158,17 @@ main = do
|
|||||||
, textClockNewWith defaultClockConfig
|
, textClockNewWith defaultClockConfig
|
||||||
, sniTrayNew
|
, sniTrayNew
|
||||||
]
|
]
|
||||||
|
longLaptopWidgets =
|
||||||
|
map (>>= buildContentsBox)
|
||||||
|
[ batteryIconNew
|
||||||
|
, textBatteryNew "$percentage$%"
|
||||||
|
, textClockNewWith defaultClockConfig
|
||||||
|
, sniTrayNew
|
||||||
|
, cpuGraph
|
||||||
|
, memoryGraph
|
||||||
|
, networkGraphNew netCfg Nothing
|
||||||
|
, mpris2New
|
||||||
|
]
|
||||||
baseConfig =
|
baseConfig =
|
||||||
defaultSimpleTaffyConfig
|
defaultSimpleTaffyConfig
|
||||||
{ startWidgets =
|
{ startWidgets =
|
||||||
@ -173,15 +187,18 @@ main = do
|
|||||||
, ( "imalison-home"
|
, ( "imalison-home"
|
||||||
, baseConfig { endWidgets = fullEndWidgets, barHeight = 42 }
|
, baseConfig { endWidgets = fullEndWidgets, barHeight = 42 }
|
||||||
)
|
)
|
||||||
|
, ( "ivanm-dfinity-razr"
|
||||||
|
, baseConfig { endWidgets = longLaptopWidgets, barHeight = 42 }
|
||||||
|
)
|
||||||
]
|
]
|
||||||
simpleTaffyConfig = selectedConfig
|
simpleTaffyConfig = selectedConfig
|
||||||
{ centerWidgets = map (>>= buildContentsBox) []
|
{ centerWidgets = map (>>= buildContentsBox) []
|
||||||
, endWidgets = []
|
-- , endWidgets = []
|
||||||
, startWidgets = []
|
-- , startWidgets = []
|
||||||
}
|
}
|
||||||
startTaffybar $
|
startTaffybar $
|
||||||
appendHook notifySystemD $
|
appendHook notifySystemD $
|
||||||
appendHook (getHost False) $
|
appendHook (void $ getHost False) $
|
||||||
withLogServer $
|
withLogServer $
|
||||||
withToggleServer $
|
withToggleServer $
|
||||||
toTaffyConfig simpleTaffyConfig
|
toTaffyConfig simpleTaffyConfig
|
||||||
|
@ -8,7 +8,7 @@ packages:
|
|||||||
extra-dep: true
|
extra-dep: true
|
||||||
extra-deps:
|
extra-deps:
|
||||||
- X11-xft-0.3.1
|
- X11-xft-0.3.1
|
||||||
resolver: lts-13.2
|
resolver: lts-13.19
|
||||||
nix:
|
nix:
|
||||||
packages:
|
packages:
|
||||||
- pkgconfig
|
- pkgconfig
|
||||||
|
4
dotfiles/lib/bin/rofi_dfinity_jira.sh
Executable file
4
dotfiles/lib/bin/rofi_dfinity_jira.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
xdg-open "https://dfinity.atlassian.net/browse/M1-$(rofi -dmenu)"
|
||||||
|
|
7
dotfiles/xkb/keymap/ivanm-dfinity-razr
Normal file
7
dotfiles/xkb/keymap/ivanm-dfinity-razr
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
xkb_keymap {
|
||||||
|
xkb_keycodes { include "evdev+aliases(qwerty)" };
|
||||||
|
xkb_types { include "complete" };
|
||||||
|
xkb_compat { include "complete" };
|
||||||
|
xkb_symbols { include "pc+us+inet(evdev)+altwin(swap_lalt_lwin)+imalison(ralt_as_hyper)+capslock(ctrl_modifier)" };
|
||||||
|
xkb_geometry { include "pc(pc105)" };
|
||||||
|
};
|
@ -9,3 +9,9 @@ xkb_symbols "home_as_hyper" {
|
|||||||
replace key <HOME> { [ Hyper_L ] };
|
replace key <HOME> { [ Hyper_L ] };
|
||||||
modifier_map Mod3 { <HOME>, Hyper_L, Hyper_R };
|
modifier_map Mod3 { <HOME>, Hyper_L, Hyper_R };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
partial modifier_keys
|
||||||
|
xkb_symbols "ralt_as_hyper" {
|
||||||
|
replace key <RALT> { [ Hyper_L, Hyper_L ] };
|
||||||
|
modifier_map Mod3 { <RALT>, Hyper_L };
|
||||||
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ config, pkgs, options, ... }:
|
{ config, pkgs, options, ... }:
|
||||||
let
|
let
|
||||||
|
all-hies = import (fetchTarball "https://github.com/infinisil/all-hies/tarball/master") {};
|
||||||
my-overlays = import ./overlays.nix;
|
my-overlays = import ./overlays.nix;
|
||||||
my-python-packages = python-packages: with python-packages; [
|
my-python-packages = python-packages: with python-packages; [
|
||||||
appdirs
|
appdirs
|
||||||
@ -20,11 +21,6 @@ in
|
|||||||
{
|
{
|
||||||
nixpkgs.overlays = [ my-overlays ];
|
nixpkgs.overlays = [ my-overlays ];
|
||||||
# XXX: This ensures that all nix tools pick up the overlays that are set here
|
# XXX: This ensures that all nix tools pick up the overlays that are set here
|
||||||
nix.nixPath =
|
|
||||||
# Prepend default nixPath values.
|
|
||||||
options.nix.nixPath.default ++
|
|
||||||
# Append our nixpkgs-overlays.
|
|
||||||
[ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ];
|
|
||||||
|
|
||||||
# Allow all the things
|
# Allow all the things
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
@ -92,6 +88,7 @@ in
|
|||||||
pulseeffects
|
pulseeffects
|
||||||
quassel
|
quassel
|
||||||
rxvt_unicode
|
rxvt_unicode
|
||||||
|
slack-appindicator
|
||||||
simplescreenrecorder
|
simplescreenrecorder
|
||||||
spotify
|
spotify
|
||||||
termite
|
termite
|
||||||
@ -150,7 +147,8 @@ in
|
|||||||
cabal2nix
|
cabal2nix
|
||||||
ghc
|
ghc
|
||||||
stack
|
stack
|
||||||
haskell.compiler.ghc863
|
haskellPackages.hasktags
|
||||||
|
# haskell.compiler.ghc863
|
||||||
|
|
||||||
# Scala
|
# Scala
|
||||||
sbt
|
sbt
|
||||||
@ -175,6 +173,7 @@ in
|
|||||||
bazaar
|
bazaar
|
||||||
binutils
|
binutils
|
||||||
dex
|
dex
|
||||||
|
direnv
|
||||||
dpkg
|
dpkg
|
||||||
emacs26Packages.cask
|
emacs26Packages.cask
|
||||||
fd
|
fd
|
||||||
@ -185,6 +184,7 @@ in
|
|||||||
gitAndTools.git-fame
|
gitAndTools.git-fame
|
||||||
gitAndTools.hub
|
gitAndTools.hub
|
||||||
gitFull
|
gitFull
|
||||||
|
glxinfo
|
||||||
gnumake
|
gnumake
|
||||||
gnupg
|
gnupg
|
||||||
htop
|
htop
|
||||||
@ -198,6 +198,7 @@ in
|
|||||||
openvpn
|
openvpn
|
||||||
pass
|
pass
|
||||||
patchelf
|
patchelf
|
||||||
|
pciutils
|
||||||
plasma-workspace
|
plasma-workspace
|
||||||
powertop
|
powertop
|
||||||
pscircle
|
pscircle
|
||||||
@ -241,6 +242,8 @@ in
|
|||||||
programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
|
programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
|
||||||
|
services.acpid.enable = true;
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
services.avahi = {
|
services.avahi = {
|
||||||
@ -291,7 +294,6 @@ in
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.extraUsers = let
|
users.extraUsers = let
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"audio"
|
"audio"
|
||||||
|
10
nixos/dfinity.nix
Normal file
10
nixos/dfinity.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
nix = {
|
||||||
|
trustedBinaryCaches = [ https://nix.oregon.dfinity.build ];
|
||||||
|
binaryCachePublicKeys = [ "hydra.oregon.dfinity.build-2:KMTixHrh9DpAjF/0xU/49VEtNuGzQ71YaVIUSOLUaCM=" ];
|
||||||
|
};
|
||||||
|
networking.extraHosts =
|
||||||
|
''
|
||||||
|
10.20.12.55 nix.oregon.dfinity.build
|
||||||
|
'';
|
||||||
|
}
|
@ -4,7 +4,6 @@
|
|||||||
gimp
|
gimp
|
||||||
android-studio
|
android-studio
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
slack
|
|
||||||
];
|
];
|
||||||
boot.extraModulePackages = with pkgs; [ xboxdrv ];
|
boot.extraModulePackages = with pkgs; [ xboxdrv ];
|
||||||
}
|
}
|
||||||
|
40
nixos/machines/dfinity-blade15.nix
Normal file
40
nixos/machines/dfinity-blade15.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||||
|
../configuration.nix
|
||||||
|
../dfinity.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/58218a04-3ba1-4295-86bb-ada59f75e3b6";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/8142784e-45c6-4a2b-91f1-09df741ac00f";
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/36E1-BE93";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
networking.hostName = "ivanm-dfinity-razr";
|
||||||
|
|
||||||
|
nix.maxJobs = lib.mkDefault 12;
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
}
|
@ -19,6 +19,7 @@ self: super:
|
|||||||
pasystray-appindicator = super.pasystray.overrideAttrs (oldAttrs: rec {
|
pasystray-appindicator = super.pasystray.overrideAttrs (oldAttrs: rec {
|
||||||
buildInputs = oldAttrs.buildInputs ++ [self.libappindicator-gtk3];
|
buildInputs = oldAttrs.buildInputs ++ [self.libappindicator-gtk3];
|
||||||
});
|
});
|
||||||
|
slack-appindicator = self.callPackage ./slack.nix { };
|
||||||
customizable-notify-osd = super.notify-osd.overrideAttrs (oldAttrs: rec {
|
customizable-notify-osd = super.notify-osd.overrideAttrs (oldAttrs: rec {
|
||||||
version = "0.9.35+16.04.20160415";
|
version = "0.9.35+16.04.20160415";
|
||||||
baseURI = "https://launchpad.net/~leolik/+archive/leolik";
|
baseURI = "https://launchpad.net/~leolik/+archive/leolik";
|
||||||
|
116
nixos/slack.nix
Normal file
116
nixos/slack.nix
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
{ darkMode ? false, stdenv, fetchurl, dpkg, makeWrapper , alsaLib, atk, cairo,
|
||||||
|
cups, curl, dbus, expat, fontconfig, freetype, glib , gnome2, gtk3, gdk_pixbuf,
|
||||||
|
libappindicator-gtk3, libnotify, libxcb, nspr, nss, pango , systemd, xorg,
|
||||||
|
at-spi2-atk }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
version = "3.4.0";
|
||||||
|
|
||||||
|
rpath = stdenv.lib.makeLibraryPath [
|
||||||
|
alsaLib
|
||||||
|
at-spi2-atk
|
||||||
|
atk
|
||||||
|
cairo
|
||||||
|
cups
|
||||||
|
curl
|
||||||
|
dbus
|
||||||
|
expat
|
||||||
|
fontconfig
|
||||||
|
freetype
|
||||||
|
glib
|
||||||
|
gnome2.GConf
|
||||||
|
gdk_pixbuf
|
||||||
|
gtk3
|
||||||
|
pango
|
||||||
|
libnotify
|
||||||
|
libxcb
|
||||||
|
libappindicator-gtk3
|
||||||
|
nspr
|
||||||
|
nss
|
||||||
|
stdenv.cc.cc
|
||||||
|
systemd
|
||||||
|
|
||||||
|
xorg.libxkbfile
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXcomposite
|
||||||
|
xorg.libXcursor
|
||||||
|
xorg.libXdamage
|
||||||
|
xorg.libXext
|
||||||
|
xorg.libXfixes
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXrandr
|
||||||
|
xorg.libXrender
|
||||||
|
xorg.libXtst
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
] + ":${stdenv.cc.cc.lib}/lib64";
|
||||||
|
|
||||||
|
src =
|
||||||
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||||
|
fetchurl {
|
||||||
|
url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb";
|
||||||
|
sha256 = "0ld53gg0dbfpi79lz2sx5br29mlhwkfcypzf3iya4cm75a33hyw5";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
throw "Slack is not supported on ${stdenv.hostPlatform.system}";
|
||||||
|
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
name = "slack-${version}";
|
||||||
|
|
||||||
|
inherit src;
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
dpkg
|
||||||
|
gtk3 # needed for GSETTINGS_SCHEMAS_PATH
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
unpackPhase = "true";
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir -p $out
|
||||||
|
dpkg -x $src $out
|
||||||
|
cp -av $out/usr/* $out
|
||||||
|
rm -rf $out/etc $out/usr $out/share/lintian
|
||||||
|
|
||||||
|
# Otherwise it looks "suspicious"
|
||||||
|
chmod -R g-w $out
|
||||||
|
|
||||||
|
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
|
||||||
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
|
||||||
|
patchelf --set-rpath ${rpath}:$out/lib/slack $file || true
|
||||||
|
done
|
||||||
|
|
||||||
|
# Replace the broken bin/slack symlink with a startup wrapper
|
||||||
|
rm $out/bin/slack
|
||||||
|
makeWrapper $out/lib/slack/slack $out/bin/slack \
|
||||||
|
--prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH
|
||||||
|
|
||||||
|
# Fix the desktop link
|
||||||
|
substituteInPlace $out/share/applications/slack.desktop \
|
||||||
|
--replace /usr/bin/ $out/bin/ \
|
||||||
|
--replace /usr/share/ $out/share/
|
||||||
|
'' + stdenv.lib.optionalString darkMode ''
|
||||||
|
cat <<EOF >> $out/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
let tt__customCss = ".menu ul li a:not(.inline_menu_link) {color: #fff !important;}"
|
||||||
|
$.ajax({
|
||||||
|
url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
|
||||||
|
success: function(css) {
|
||||||
|
\$("<style></style>").appendTo('head').html(css + tt__customCss);
|
||||||
|
\$("<style></style>").appendTo('head').html('#reply_container.upload_in_threads .inline_message_input_container {background: padding-box #545454}');
|
||||||
|
\$("<style></style>").appendTo('head').html('.p-channel_sidebar {background: #363636 !important}');
|
||||||
|
\$("<style></style>").appendTo('head').html('#client_body:not(.onboarding):not(.feature_global_nav_layout):before {background: inherit;}');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Desktop client for Slack";
|
||||||
|
homepage = https://slack.com;
|
||||||
|
license = licenses.unfree;
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
@ -5,4 +5,4 @@ export THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
export DOTFILES_DIR="$(readlink -f $THIS_DIR/dotfiles)"
|
export DOTFILES_DIR="$(readlink -f $THIS_DIR/dotfiles)"
|
||||||
|
|
||||||
echo $DOTFILES_DIR
|
echo $DOTFILES_DIR
|
||||||
rcup -d $DOTFILES_DIR -S "emacs.d" -S "config/*" -S "lib"
|
rcup -d $DOTFILES_DIR -S "emacs.d" -S "config/*" -S "lib" -S xkb
|
||||||
|
Loading…
Reference in New Issue
Block a user