-
-
Save Jomik/71786acd25322b2156e00c48349c49b9 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
{ pkgs, lib, config, ... }: | |
with lib; | |
let | |
unstable = import <unstable> {}; | |
taffybarPatch = pkgs.fetchpatch { | |
url = "https://raw.githubusercontent.com/spencerjanssen/dotfiles/master/nixos/taffybar-gi-gdkpixbuf-2.0.18.patch"; | |
sha256 = "00fczqii26z005dmzmn6zjbi4l7r0p0vsrs5v170sw556aic4vbh"; | |
}; | |
deps = with pkgs; { | |
inherit rofi slock; | |
rofiPass = rofi-pass; | |
}; | |
slock = let | |
path = makeBinPath (with pkgs; [ | |
coreutils | |
i3lock-color | |
scrot | |
imagemagick | |
]); | |
in pkgs.writeShellScriptBin "slock" '' | |
export PATH=${path} | |
screen=/run/user/$UID/screen.png | |
convert x:root -scale 5% -sample 2000% -quality 30 $screen | |
i3lock-color -n -i $screen \ | |
--insidecolor=373445ff --ringcolor=ffffffff --line-uses-inside \ | |
--keyhlcolor=d23c3dff --bshlcolor=d23c3dff --separatorcolor=00000000 \ | |
--insidevercolor=fecf4dff --insidewrongcolor=d23c3dff \ | |
--ringvercolor=ffffffff --ringwrongcolor=ffffffff --indpos="x+86:y+1003" \ | |
--radius=15 --veriftext="" --wrongtext="" | |
pid=$! | |
wait $pid | |
[ -f "$screen" ] && rm $screen | |
''; | |
in mkIf config.xsession.windowManager.xmonad.enable { | |
require = [ ./taffybar.nix ]; | |
home.packages = with pkgs; [ | |
slock | |
nmcli-rofi | |
networkmanagerapplet | |
]; | |
services.screen-locker.enable = true; | |
services.screen-locker.lockCmd = ""; | |
xsession = { | |
windowManager.xmonad = { | |
enableContribAndExtras = true; | |
}; | |
pointerCursor = { | |
defaultCursor = "left_ptr"; | |
package = pkgs.gnome3.adwaita-icon-theme; | |
name = "Adwaita"; | |
size = 24; | |
}; | |
}; | |
programs.rofi = { | |
enable = true; | |
terminal = "${pkgs.alacritty}"; | |
}; | |
xdg.configFile."xmonad/lib/Packages.hs".text = '' | |
module Packages where | |
'' + concatStringsSep "\n" (map | |
(n: ''${n} = (++) "${getAttr n deps}"'') | |
(attrNames deps)); | |
} |
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
{ pkgs, lib, config, ... }: | |
with lib; | |
let | |
unstable = import <unstable> {}; | |
taffybarPatch = pkgs.fetchpatch { | |
url = "https://raw.githubusercontent.com/spencerjanssen/dotfiles/master/nixos/taffybar-gi-gdkpixbuf-2.0.18.patch"; | |
sha256 = "00fczqii26z005dmzmn6zjbi4l7r0p0vsrs5v170sw556aic4vbh"; | |
}; | |
in { | |
home.packages = with pkgs; [ | |
at-spi2-core | |
] | |
nixpkgs.overlays = [ | |
(self: super: { | |
taffybar = (unstable.taffybar.override { | |
ghcWithPackages = (unstable.haskellPackages.override { | |
overrides = _: super: { | |
taffybar = unstable.haskell.lib.appendPatch super.taffybar taffybarPatch; | |
}; | |
}).ghcWithPackages; | |
}); | |
}) | |
]; | |
services.taffybar.enable = true; | |
services.taffybar.package = pkgs.taffybar.override { | |
packages = haskellPackages: with haskellPackages; [ | |
linear | |
]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment