2021-02-10 05:54:41 +03:00
{ config , lib , pkgs , util , . . . }:
2020-11-21 23:54:07 +03:00
let
inherit ( lib ) mapAttrs' nameValuePair ;
inherit ( builtins ) readDir ;
inherit ( util ) pkgBin ;
nixosConfig = config ;
name = " Y u s u f B e r a E r t a n " ;
email = " y . b e r a 0 0 3 . 0 6 @ p r o t o n m a i l . c o m " ;
font = " I o s e v k a " ;
fontSize = 10 ;
fontComb = " ${ font } ${ toString fontSize } " ;
fontPackage = pkgs . iosevka ;
kideSrc = pkgs . fetchgit {
url = " h t t p s : / / g i t l a b . c o m / y u s d a c r a / k i d e . g i t " ;
2021-01-02 16:21:55 +03:00
rev = " 2 d 7 6 f 8 b 6 6 8 e 7 f f 1 2 f d 6 8 6 a 1 0 1 f 0 d 2 6 d 5 0 b 6 c 0 e c e " ;
sha256 = " s h a 2 5 6 - O N Q m r J v N n m Q 9 W 3 5 0 o d 4 6 V E C W 6 I r 3 K O M U J R n E M e V I s g g = " ;
2020-11-21 23:54:07 +03:00
fetchSubmodules = true ;
} ;
kideFiles =
mapAttrs' ( n : _ : nameValuePair " k a k / ${ n } " { source = " ${ kideSrc } / ${ n } " ; } )
2020-12-23 19:54:51 +03:00
( readDir kideSrc ) ;
2020-11-21 23:54:07 +03:00
kideDeps = with pkgs ; [
fzf
bat
ripgrep
universal-ctags
kak-lsp
wl-clipboard
xclip
] ;
2021-01-17 17:25:54 +03:00
chromiumWayland = pkgs . writeScriptBin " c h r o m i u m - w a y l a n d " ''
#!${pkgs.stdenv.shell}
chromium - - enable-features = UseOzonePlatform - - ozone-platform = wayland
'' ;
chromiumWaylandPkg = with pkgs ; stdenv . mkDerivation {
name = " c h r o m i u m - w a y l a n d " ;
version = chromium . version ;
nativeBuildInputs = [ copyDesktopItems ] ;
desktopItems = [
( makeDesktopItem rec {
name = " c h r o m i u m - w a y l a n d " ;
exec = name ;
desktopName = " C h r o m i u m W a y l a n d " ;
genericName = " W e b B r o w s e r " ;
} )
] ;
phases = [ " i n s t a l l P h a s e " ] ;
installPhase = ''
mkdir - p $ out/bin
ln - s $ { chromiumWayland } /bin/chromium-wayland $ out/bin/chromium-wayland
'' ;
} ;
2020-11-21 23:54:07 +03:00
colorSchemeLight = {
primary = {
normal = {
background = " f b f 3 d b " ;
foreground = " 5 3 6 7 6 d " ;
} ;
bright = {
background = " d 5 c d b 6 " ;
foreground = " 3 a 4 d 5 3 " ;
} ;
} ;
normal = {
black = " e c e 3 c c " ;
2020-12-23 19:54:51 +03:00
gray = " 5 b 5 b 5 b " ;
2020-11-21 23:54:07 +03:00
red = " d 2 2 1 2 d " ;
green = " 4 8 9 1 0 0 " ;
yellow = " a d 8 9 0 0 " ;
blue = " 0 0 7 2 d 4 " ;
magenta = " c a 4 8 9 8 " ;
cyan = " 0 0 9 c 8 f " ;
white = " 9 0 9 9 9 5 " ;
} ;
bright = {
black = " d 5 c d b 6 " ;
2020-12-23 19:54:51 +03:00
gray = " 7 b 7 b 7 b " ;
2020-11-21 23:54:07 +03:00
red = " c c 1 7 2 9 " ;
green = " 4 2 8 b 0 0 " ;
yellow = " a 7 8 3 0 0 " ;
blue = " 0 0 6 d c e " ;
magenta = " c 4 4 3 9 2 " ;
cyan = " 0 0 9 7 8 a " ;
white = " 3 a 4 d 5 3 " ;
} ;
} ;
2020-12-23 19:54:51 +03:00
colorSchemeDark = rec {
2020-11-21 23:54:07 +03:00
primary = {
normal = {
background = " 1 8 1 8 1 8 " ;
foreground = " b 9 b 9 b 9 " ;
} ;
bright = {
2020-12-23 19:54:51 +03:00
background = bright . black ;
foreground = bright . white ;
2020-11-21 23:54:07 +03:00
} ;
} ;
normal = {
black = " 2 5 2 5 2 5 " ;
2020-12-23 19:54:51 +03:00
gray = " 5 b 5 b 5 b " ;
2020-11-21 23:54:07 +03:00
red = " e d 4 a 4 6 " ;
green = " 7 0 b 4 3 3 " ;
yellow = " d b b 3 2 d " ;
blue = " 3 6 8 a e b " ;
magenta = " e b 6 e b 7 " ;
cyan = " 3 f c 5 b 7 " ;
white = " 7 7 7 7 7 7 " ;
} ;
bright = {
black = " 3 b 3 b 3 b " ;
2020-12-23 19:54:51 +03:00
gray = " 7 b 7 b 7 b " ;
2020-11-21 23:54:07 +03:00
red = " f f 5 e 5 6 " ;
green = " 8 3 c 7 4 6 " ;
yellow = " e f c 5 4 1 " ;
blue = " 4 f 9 c f e " ;
magenta = " f f 8 1 c a " ;
cyan = " 5 6 d 8 c 9 " ;
white = " d e d e d e " ;
} ;
} ;
colorScheme =
2020-12-23 19:54:51 +03:00
# if builtins.pathExists ./light then colorSchemeLight else colorSchemeDark;
colorSchemeDark ;
2020-11-21 23:54:07 +03:00
bgColor = colorScheme . primary . normal . background ;
fgColor = colorScheme . primary . bright . foreground ;
acColor = colorScheme . normal . red ;
acColor2 = colorScheme . normal . yellow ;
alacrittyColors = {
primary = {
background = " 0 x ${ bgColor } " ;
foreground = " 0 x ${ fgColor } " ;
} ;
normal = lib . mapAttrs ( _ : v : " 0 x ${ v } " ) colorScheme . normal ;
bright = lib . mapAttrs ( _ : v : " 0 x ${ v } " ) colorScheme . bright ;
} ;
# sway attrs reused
focusedWorkspace = {
background = " # ${ bgColor } " ;
border = " # ${ acColor } " ;
text = " # ${ acColor } " ;
} ;
activeWorkspace = {
background = " # ${ bgColor } " ;
border = " # ${ colorScheme . primary . bright . background } " ;
text = " # ${ fgColor } " ;
} ;
inactiveWorkspace = {
background = " # ${ bgColor } " ;
border = " # ${ bgColor } " ;
text = " # ${ fgColor } " ;
} ;
urgentWorkspace = {
background = " # ${ bgColor } " ;
border = " # ${ acColor2 } " ;
text = " # ${ acColor2 } " ;
} ;
addIndSway = x : {
background = x . background ;
border = x . border ;
childBorder = x . border ;
text = x . text ;
indicator = " # 1 1 1 1 1 1 " ; # don't care
} ;
fonts = [ fontComb ] ;
2020-12-23 19:54:51 +03:00
in
{
2020-11-21 23:54:07 +03:00
home-manager . users . patriot = { config , pkgs , . . . }: {
imports = [ ../profiles/hikari.nix ] ;
2021-01-17 17:25:54 +03:00
# gtk = {
# # enable = true;
# font = {
# package = pkgs.dejavu_fonts;
# name = "DejaVu Sans 12";
# };
# iconTheme = {
# package = pkgs.papirus-icon-theme;
# name = "Papirus Dark";
# };
# theme = {
# package = pkgs.numix-gtk-theme;
# name = "Numix Dark";
# };
# };
# qt = {
# # enable = true;
# platformTheme = "gtk";
# };
2020-12-23 19:54:51 +03:00
2020-11-21 23:54:07 +03:00
fonts . fontconfig . enable = true ;
home = {
homeDirectory = nixosConfig . users . users . patriot . home ;
2020-11-22 18:34:10 +03:00
packages = with pkgs ;
2020-11-21 23:54:07 +03:00
[
2020-12-23 19:54:51 +03:00
# Font stuff
2020-11-22 18:34:10 +03:00
fontPackage
noto-fonts-cjk
2020-12-23 19:54:51 +03:00
noto-fonts-emoji-blob-bin
2020-11-22 18:34:10 +03:00
font-awesome
2020-12-23 19:54:51 +03:00
( nerdfonts . override { fonts = [ " I o s e v k a " ] ; } )
# Programs
2021-02-10 05:54:41 +03:00
audacity
kdenlive
2021-01-17 18:34:34 +03:00
gnome3 . seahorse
2021-01-17 17:25:54 +03:00
wine-staging
cachix
chromiumWaylandPkg
2020-12-23 19:54:51 +03:00
appimage-run
2020-11-22 18:34:10 +03:00
bitwarden
pfetch
neofetch
gnupg
imv
mpv
youtube-dl
ffmpeg
mupdf
2021-01-26 21:09:02 +03:00
transmission-qt
2020-12-23 19:54:51 +03:00
gitAndTools . gh
2020-11-22 18:34:10 +03:00
steam-run
lutris
xdg_utils
2021-01-17 17:25:54 +03:00
discord
2020-12-23 19:54:51 +03:00
tagref
2021-01-29 18:19:38 +03:00
pcsx2
2020-11-21 23:54:07 +03:00
] ++ kideDeps ;
} ;
wayland . windowManager = {
hikari = {
2021-01-17 17:25:54 +03:00
enable = false ;
2020-11-21 23:54:07 +03:00
inherit font ;
} ;
sway = {
2021-01-17 18:34:34 +03:00
enable = false ;
2020-11-21 23:54:07 +03:00
extraSessionCommands = ''
export SDL_VIDEODRIVER = wayland
# needs qt5.qtwayland in systemPackages
export QT_QPA_PLATFORM = wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION = " 1 "
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
export _JAVA_AWT_WM_NONREPARENTING = 1
'' ;
2020-12-23 19:54:51 +03:00
wrapperFeatures . gtk = true ;
2020-11-21 23:54:07 +03:00
config = {
inherit fonts ;
2020-12-23 19:54:51 +03:00
bars = [ {
command = " ${ pkgBin " w a y b a r " } " ;
} ] ;
2020-11-21 23:54:07 +03:00
colors = {
background = " # ${ bgColor } " ;
focused = addIndSway focusedWorkspace ;
focusedInactive = addIndSway inactiveWorkspace ;
unfocused = addIndSway activeWorkspace ;
urgent = addIndSway urgentWorkspace ;
} ;
gaps . smartBorders = " o n " ;
menu = " ${ pkgBin " r o f i " } - s h o w d r u n | ${ pkgs . sway } / b i n / s w a y m s g - - " ;
modifier = " M o d 4 " ;
terminal = pkgBin " a l a c r i t t y " ;
2020-12-23 19:54:51 +03:00
keybindings =
let
mod = config . wayland . windowManager . sway . config . modifier ;
cat = pkgs . coreutils + " / b i n / c a t " ;
grim = pkgBin " g r i m " ;
slurp = pkgBin " s l u r p " ;
pactl = pkgs . pulseaudio + " / b i n / p a c t l " ;
playerctl = pkgBin " p l a y e r c t l " ;
wf-recorder = pkgBin " w f - r e c o r d e r " ;
wl-copy = pkgs . wl-clipboard + " / b i n / w l - c o p y " ;
wl-paste = pkgs . wl-clipboard + " / b i n / w l - p a s t e " ;
shotFile = config . home . homeDirectory
+ " / s h o t s / s h o t _ $ ( d a t e ' + % Y _ % m _ % d _ % H _ % M ' ) " ;
in
lib . mkOptionDefault {
" ${ mod } + q " = " k i l l " ;
" ${ mod } + S h i f t + e " = " e x i t " ;
" ${ mod } + S h i f t + r " = " r e l o a d " ;
# Screenshot and copy it to clipboard
" M o d 1 + s " = ''
exec export SFILE = " ${ shotFile } . p n g " && $ { grim } " $ S F I L E " && $ { cat } " $ S F I L E " | $ { wl-copy } - t image/png
'' ;
# Save selected area as a picture and copy it to clipboard
" M o d 1 + S h i f t + s " = ''
exec export SFILE = " ${ shotFile } . p n g " && $ { grim } - g " $ ( ${ slurp } ) " " $ S F I L E " && $ { cat } " $ S F I L E " | $ { wl-copy } - t image/png
'' ;
# Record screen
" M o d 1 + r " = '' e x e c ${ wf-recorder } - f " ${ shotFile } . m p 4 " '' ;
# Record an area
" M o d 1 + S h i f t + r " =
'' e x e c ${ wf-recorder } - g " $( ${ slurp } ) " - f " ${ shotFile } . m p 4 " '' ;
# Stop recording
" M o d 1 + c " = " e x e c p k i l l - I N T w f - r e c o r d e r " ;
" X F 8 6 A u d i o R a i s e V o l u m e " = " e x e c ${ pactl } s e t - s i n k - v o l u m e 0 + 5 % " ;
" X F 8 6 A u d i o L o w e r V o l u m e " = " e x e c ${ pactl } s e t - s i n k - v o l u m e 0 - 5 % " ;
" X F 8 6 A u d i o M u t e " = " e x e c ${ pactl } s e t - s i n k - m u t e 0 t o g g l e " ;
" X F 8 6 A u d i o P l a y " = " e x e c ${ playerctl } p l a y - p a u s e " ;
" X F 8 6 A u d i o P r e v " = " e x e c ${ playerctl } p r e v i o u s " ;
" X F 8 6 A u d i o N e x t " = " e x e c ${ playerctl } n e x t " ;
" X F 8 6 A u d i o S t o p " = " e x e c ${ playerctl } s t o p " ;
} ;
2020-11-21 23:54:07 +03:00
input = {
" * " = {
xkb_layout = nixosConfig . services . xserver . layout ;
accel_profile = " f l a t " ;
} ;
} ;
2021-01-20 18:28:49 +03:00
output = {
" * " = {
bg = config . home . homeDirectory + " / w a l l p a p e r . p n g " + " f i l l " ;
} ;
} ;
2020-11-21 23:54:07 +03:00
} ;
} ;
} ;
programs = {
alacritty = {
2021-01-17 18:34:34 +03:00
enable = false ;
2020-11-21 23:54:07 +03:00
settings = {
font = {
normal = { family = font ; } ;
size = fontSize ;
} ;
colors = alacrittyColors ;
} ;
} ;
tmux = {
2021-01-17 17:25:54 +03:00
enable = false ;
2020-11-21 23:54:07 +03:00
newSession = true ;
secureSocket = true ;
baseIndex = 1 ;
escapeTime = 0 ;
keyMode = " v i " ;
terminal = " t m u x - 2 5 6 c o l o r " ;
shortcut = " a " ;
extraConfig = ''
set - ga terminal-overrides ' , * 2 5 6 col * : Tc'
set - g status off
'' ;
} ;
2020-12-23 19:54:51 +03:00
chromium = {
2020-11-21 23:54:07 +03:00
enable = true ;
2020-12-23 19:54:51 +03:00
extensions = [
" g c b o m m k c l m c l p c h l l f j e k c d o n p m e j b d p " # https everywhere
" c j p a l h d l n b p a f i a m e j d n h c p h j b k e i a g m " # ublock
" n n g c e c k b a p e b f i m n l n i i i a h k a n d c l b l b " # bitwarden
" l d p o c h f c c m k k m h d b c l f h p a g a p c f d l j k j " # decentraleyes
" a n n f b n b i e a a m h a i m c l a j l a j p i j g k d b l o " # dark theme
" e i m a d p b c b f n m b k o p o o j f e k h n k h d b i e e h " # dark reader
" h l e p f o o h e g k h h m j i e o e c h a d d a e j a o k h f " # github refined
] ;
} ;
qutebrowser = {
2021-01-17 17:25:54 +03:00
enable = false ;
2020-11-21 23:54:07 +03:00
settings = {
content . javascript . enabled = false ;
colors . webpage . darkmode . enabled = true ;
2020-11-22 18:34:10 +03:00
tabs = { show = " m u l t i p l e " ; } ;
2020-11-21 23:54:07 +03:00
} ;
2020-12-23 19:54:51 +03:00
extraConfig =
let
domains = [
" g i t h u b . c o m "
" g i t l a b . c o m "
" n i x o s . o r g "
" p r o t o n m a i l . c o m "
" b i t w a r d e n . c o m "
" d u c k d u c k g o . c o m "
" y o u t u b e . c o m "
" d o c k e r . c o m "
] ;
enableJsForDomain = d : ''
config . set ( ' content . javascript . enabled' , True , ' https://*.$ { d } ' )
'' ;
in
lib . concatStrings ( map enableJsForDomain domains ) ;
2020-11-21 23:54:07 +03:00
} ;
git = {
enable = true ;
aliases = {
a = " a d d " ;
b = " b r a n c h " ;
c = " c o m m i t " ;
d = " d i f f " ;
l = " l o g " ;
s = " s t a t u s " ;
co = " c h e c k o u t " ;
dc = " d i f f - - c a c h e d " ;
qc = " c o m m i t - a m " ;
pl = " p u l l " ;
ps = " p u s h " ;
rb = " r e b a s e " ;
rs = " r e s t o r e " ;
rv = " r e v e r t " ;
ss = " s t a s h " ;
rst = " r e s e t " ;
rss = " r e s t o r e - - s t a g e d " ;
ssp = " s t a s h p o p " ;
ssl = " s t a s h l i s t " ;
ssd = " s t a s h d r o p " ;
} ;
extraConfig = { pull . rebase = true ; } ;
lfs . enable = true ;
signing = {
key = " E 1 C 1 1 9 F 9 1 F 4 C A E 5 3 E 8 4 4 5 C A F B B 5 7 F C E 7 E 3 5 9 8 4 F 6 " ;
signByDefault = true ;
} ;
userName = name ;
userEmail = email ;
} ;
ssh = {
enable = true ;
compression = true ;
hashKnownHosts = true ;
userKnownHostsFile = " ~ / . l o c a l / s h a r e / s s h / k n o w n - h o s t s " ;
2021-01-17 17:25:54 +03:00
# Only needed for darcs hub
2020-12-23 19:54:51 +03:00
# extraConfig = ''
# Host hub.darcs.net
# ControlMaster no
# ForwardAgent no
# ForwardX11 no
# Ciphers +aes256-cbc
# MACs +hmac-sha1
# '';
2020-11-21 23:54:07 +03:00
} ;
zsh = {
enable = true ;
autocd = true ;
enableVteIntegration = true ;
enableAutosuggestions = true ;
enableCompletion = true ;
2020-12-23 19:54:51 +03:00
plugins =
let
fast-syntax-highlighting = rec {
name = " f a s t - s y n t a x - h i g h l i g h t i n g " ;
src = pkgs . " z s h - ${ name } " . out ;
2020-11-21 23:54:07 +03:00
} ;
2020-12-23 19:54:51 +03:00
per-directory-history = {
name = " p e r - d i r e c t o r y - h i s t o r y " ;
src = pkgs . fetchFromGitHub {
owner = " j i m h e s t e r " ;
repo = " p e r - d i r e c t o r y - h i s t o r y " ;
rev = " d 2 e 2 9 1 d d 6 4 3 4 e 3 4 0 d 9 b e 0 e 1 5 e 1 f 5 b 9 4 f 3 2 7 7 1 c 0 6 " ;
hash = " s h a 2 5 6 - V H R g r V C q z I L q O e s 8 V X G j S g L e k 3 8 B F s 9 e i j m p 0 J H t D 5 Q = " ;
} ;
} ;
in
[ fast-syntax-highlighting per-directory-history ] ;
2020-11-21 23:54:07 +03:00
# xdg compliant
dotDir = " . c o n f i g / z s h " ;
history . path = " . l o c a l / s h a r e / z s h / h i s t o r y " ;
2020-11-24 23:04:53 +03:00
envExtra = ''
2021-01-26 21:09:02 +03:00
#export SDL_VIDEODRIVER=wayland
2020-11-22 18:34:10 +03:00
# needs qt5.qtwayland in systemPackages
2021-01-26 21:09:02 +03:00
#export QT_QPA_PLATFORM=wayland
#export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
2020-11-22 18:34:10 +03:00
# Fix for some Java AWT applications (e.g. Android Studio),
# use this if they aren't displayed properly:
2021-01-26 21:09:02 +03:00
#export _JAVA_AWT_WM_NONREPARENTING=1
2020-11-24 23:04:53 +03:00
'' ;
2021-01-26 21:09:02 +03:00
/* l o g i n E x t r a =
let
#deCmd = if config.wayland.windowManager.sway.enable then "sway" else (if config.wayland.windowManager.hikari.enable then "hikari" else throw "Need a window manager to start!");
in
''
if [ " $ ( ${ pkgs . coreutils } / b i n / t t y ) " = " / d e v / t t y 1 " ] ; then
exec startplasma-x11
fi
'' ; * /
2020-11-24 23:04:53 +03:00
initExtra = ''
bindkey " $ t e r m i n f o [ k R I T 5 ] " forward-word
bindkey " $ t e r m i n f o [ k L F T 5 ] " backward-word
zstyle ' : completion:*' menu select
2021-01-17 17:25:54 +03:00
function project ( ) {
cd " $ H O M E / B e l g e l e r / p r o j e c t s / $ 1 "
}
2020-11-24 23:04:53 +03:00
'' ;
2020-11-21 23:54:07 +03:00
shellAliases = nixosConfig . environment . shellAliases // {
rember = ''
2020-11-22 18:34:10 +03:00
$ { pkgs . kakoune-unwrapped } /bin/kak - e " t r y % ( g t d - j u m p - t o d a y ) " " ${ config . home . homeDirectory } / r e m b e r / s t u f f $ ( d a t e ' + _ % m _ % Y ' ) . g t d "
2020-11-21 23:54:07 +03:00
'' ;
} ;
} ;
starship = {
enable = true ;
settings = {
add_newline = false ;
character . symbol = " > " ;
directory = {
truncation_length = 2 ;
truncate_to_repo = false ;
} ;
} ;
} ;
direnv = {
enable = true ;
enableNixDirenvIntegration = true ;
} ;
fzf . enable = true ;
2020-12-23 19:54:51 +03:00
rofi =
let
bgc = " # ${ bgColor } " ;
fgc = " # ${ fgColor } " ;
acc = " # ${ acColor } " ;
in
{
2021-01-17 18:34:34 +03:00
enable = false ;
2020-12-23 19:54:51 +03:00
colors = {
window = {
2020-11-21 23:54:07 +03:00
background = bgc ;
2020-12-23 19:54:51 +03:00
border = bgc ;
separator = bgc ;
} ;
rows = {
normal = {
2020-11-21 23:54:07 +03:00
background = bgc ;
2020-12-23 19:54:51 +03:00
foreground = fgc ;
backgroundAlt = bgc ;
highlight = {
background = bgc ;
foreground = acc ;
} ;
2020-11-21 23:54:07 +03:00
} ;
} ;
} ;
2020-12-23 19:54:51 +03:00
font = fontComb ;
separator = " n o n e " ;
terminal = pkgBin " a l a c r i t t y " ;
2020-11-21 23:54:07 +03:00
} ;
2020-12-23 19:54:51 +03:00
waybar =
let
swayEnabled = config . wayland . windowManager . sway . enable ;
in
{
2021-01-17 17:25:54 +03:00
enable = config . wayland . windowManager . sway . enable || config . wayland . windowManager . hikari . enable ;
2020-12-23 19:54:51 +03:00
settings = [ {
layer = " t o p " ;
position = " t o p " ;
modules-left = if swayEnabled then [ " s w a y / w o r k s p a c e s " ] else [ ] ;
modules-center = if swayEnabled then [ " s w a y / w i n d o w " ] else [ ] ;
modules-right =
[ " p u l s e a u d i o " " c p u " " m e m o r y " " t e m p e r a t u r e " " c l o c k " " t r a y " ] ;
modules = {
" t r a y " = { spacing = 8 ; } ;
" c p u " = { format = " / c p u { u s a g e } / " ; } ;
" m e m o r y " = { format = " / m e m { } / " ; } ;
" t e m p e r a t u r e " = {
hwmon-path = " / s y s / c l a s s / h w m o n / h w m o n 1 / t e m p 2 _ i n p u t " ;
format = " / t m p { t e m p e r a t u r e C } C / " ;
} ;
" p u l s e a u d i o " = {
format = " / v o l { v o l u m e } / { f o r m a t _ s o u r c e } " ;
format-bluetooth = " / v o l b { v o l u m e } / { f o r m a t _ s o u r c e } " ;
format-bluetooth-muted = " / v o l b / { f o r m a t _ s o u r c e } " ;
format-muted = " / v o l / { f o r m a t _ s o u r c e } " ;
format-source = " / m i c { v o l u m e } / " ;
format-source-muted = " / m i c / " ;
} ;
2020-11-22 18:34:10 +03:00
} ;
2020-12-23 19:54:51 +03:00
} ] ;
style =
let
makeBorder = color : " b o r d e r - b o t t o m : 3 p x s o l i d # ${ color } ; " ;
makeInfo = color : ''
color : #${color};
$ { makeBorder color }
'' ;
clockColor = colorScheme . bright . magenta ;
cpuColor = colorScheme . bright . green ;
memColor = colorScheme . bright . blue ;
pulseColor = {
normal = colorScheme . bright . cyan ;
muted = colorScheme . bright . gray ;
} ;
tmpColor = {
normal = colorScheme . bright . yellow ;
critical = colorScheme . bright . red ;
} ;
in
''
* {
border : none ;
border-radius : 0 ;
/* ` o t f - f o n t - a w e s o m e ` i s r e q u i r e d t o b e i n s t a l l e d f o r i c o n s */
font-family : $ { font } ;
font-size : 1 3 px ;
min-height : 0 ;
}
window #waybar {
background-color : #${bgColor};
/* b o r d e r - b o t t o m : 0 p x s o l i d r g b a ( 1 0 0 , 1 1 4 , 1 2 5 , 0 . 5 ) ; */
color : #${fgColor};
transition-property : background-color ;
transition-duration : . 5 s ;
}
#workspaces button {
padding : 0 5 px ;
background-color : transparent ;
color : #${fgColor};
border-bottom : 3 px solid transparent ;
}
/* h t t p s : / / g i t h u b . c o m / A l e x a y s / W a y b a r / w i k i / F A Q # t h e - w o r k s p a c e - b u t t o n s - h a v e - a - s t r a n g e - h o v e r - e f f e c t */
#workspaces button:hover {
background : rgba ( 0 , 0 , 0 , 0 .2 ) ;
box-shadow : inherit ;
border-bottom : 3 px solid #ffffff;
}
#workspaces button.focused {
border-bottom : 3 px solid #${acColor};
}
#workspaces button.urgent {
background-color : #${acColor};
color : #${bgColor};
}
#mode {
background-color : #64727D;
border-bottom : 3 px solid #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#mpd {
padding : 0 1 0 px ;
margin : 0 4 px ;
background-color : transparent ;
$ { makeInfo fgColor }
}
label:focus {
color : #000000;
}
#clock {
$ { makeInfo clockColor }
}
#cpu {
$ { makeInfo cpuColor }
}
#memory {
$ { makeInfo memColor }
}
#pulseaudio {
$ { makeInfo pulseColor . normal }
}
#pulseaudio.muted {
$ { makeInfo pulseColor . muted }
}
#temperature {
$ { makeInfo tmpColor . normal }
}
#temperature.critical {
$ { makeInfo tmpColor . critical }
}
'' ;
} ;
2021-01-02 16:21:55 +03:00
vscode = {
enable = true ;
package = pkgs . vscodium ;
extensions =
let
mkExt = n : v : p : s : { name = n ; version = v ; publisher = p ; sha256 = s ; } ;
in
2021-01-22 05:07:01 +03:00
( pkgs . vscode-utils . extensionsFromVscodeMarketplace [
2021-01-02 16:21:55 +03:00
# Rust
2021-01-17 17:25:54 +03:00
( mkExt " r u s t - a n a l y z e r " " 0 . 2 . 4 4 1 " " m a t k l a d " " s h a 2 5 6 - a U X 2 H M M h S 9 b g T O m G g q Z I g s 0 G B x m b J d r 7 J 6 l o q w Q T Z e M = " )
2021-01-02 16:21:55 +03:00
( mkExt " e v e n - b e t t e r - t o m l " " 0 . 1 0 . 0 " " t a m a s f e " " s h a 2 5 6 - m i J 7 g X Y a v L y J n e K O S s + 4 G a F G 4 v 6 o c e m 2 Y O W y A U r O f s 8 = " )
( mkExt " v s c o d e - r o n " " 0 . 9 . 0 " " a 5 h u y n h " " s h a 2 5 6 - J 3 0 h x E Y C k r 4 x h a J + D f f f j w R J Z x 9 N G C O r A 6 V c D C s o d z Q = " )
( mkExt " c r a t e s " " 0 . 5 . 3 " " s e r a y u z g u r " " s h a 2 5 6 - T p z e E P B E 7 5 O v 2 q D P a 2 2 k 7 e 0 p T D L Q X 8 z 0 q B q C V L Z X Z / Y = " )
# Nix
( mkExt " n i x - e n v - s e l e c t o r " " 0 . 1 . 2 " " a r r t e r i a n " " s h a 2 5 6 - a T N x r 1 s a U a N 9 I 8 2 U Y C D s Q v H 9 U B W j u e / B S n U m M Q O n s d g = " )
( mkExt " n i x - i d e " " 0 . 1 . 7 " " j n o o r t h e e n " " s h a 2 5 6 - N X M w d 1 Y i 6 k V x X L h W g z F O X Q m 5 8 0 M v 4 U P h 6 j U u l b D n h K 8 = " )
# Go
( mkExt " G o " " 0 . 2 0 . 1 " " g o l a n g " " s h a 2 5 6 - U j G a e P j Y c e L d k f 2 y r x k V y 6 h t 2 a S t J 5 w k l g u K e / Z 8 H U I = " )
# Flutter and dart
( mkExt " f l u t t e r " " 3 . 1 8 . 0 " " D a r t - C o d e " " s h a 2 5 6 - n v K B P S e 0 + W Q 8 m 8 8 W r Q q h z V r q Y B j c B h i z 6 E u J 3 8 g T F h Q = " )
( mkExt " d a r t - c o d e " " 3 . 1 8 . 0 " " D a r t - C o d e " " s h a 2 5 6 - E + q r Y 7 w O v e n g O s 2 y K q h h + 5 d R L u 3 d U u 6 y W x G c w D 7 Q H u I = " )
2021-01-17 17:25:54 +03:00
# protobuf
( mkExt " v s c o d e - p r o t o 3 " " 0 . 5 . 3 " " z x h 4 0 4 " " s h a 2 5 6 - o U S i h + Y d A X Y k T N e j Z B J j c X e w Q e w g Q F M G h A F d J / C B M d 4 = " )
# git
( mkExt " g i t l e n s " " 1 1 . 1 . 3 " " e a m o d i o " " s h a 2 5 6 - h q J g 3 j P 4 b b X U 4 q S J O j e K f j k P x 6 1 y P D M s Q d S U V Z O b K / U = " )
( mkExt " v s c o d e - c o m m i t i z e n " " 0 . 9 . 3 " " K n i s t e r P e t e r " " s h a 2 5 6 - q 9 u 3 o S w F j D H w L s I U w M Z 8 h u v 9 u X c 1 G W F f E O E M X W x 3 w / o = " )
2021-01-02 16:21:55 +03:00
# Customization
2021-01-17 17:25:54 +03:00
# (mkExt "dance" "0.3.2" "gregoire" "sha256-+g8EXeCkPOPvZ60JoXkGTeSXYWrXmKrcbUaEfDppdgA=")
2021-01-02 16:21:55 +03:00
( mkExt " m a t e r i a l - i c o n - t h e m e " " 4 . 4 . 0 " " P K i e f " " s h a 2 5 6 - y i M + j t c 7 U W 8 P Q T w m H m X H S S m v Y C 7 3 G L h / c L Y n m Y q O N d U = " )
2021-01-17 17:25:54 +03:00
( mkExt " g i t h u b - v s c o d e - t h e m e " " 1 . 1 . 5 " " g i t h u b " " s h a 2 5 6 - E P A J j M 4 C b R 8 M h V + 3 p m 6 m C 1 2 K z S t 2 E m 6 p T + c 2 H k n N n t I = " )
2021-02-10 05:54:41 +03:00
] ) ++ [ pkgs . vscode-extensions . vadimcn . vscode-lldb ] ;
2021-01-17 17:31:37 +03:00
userSettings = {
" w o r k b e n c h . i c o n T h e m e " = " m a t e r i a l - i c o n - t h e m e " ;
" w o r k b e n c h . c o l o r T h e m e " = " G i t H u b D a r k " ;
" r u s t - a n a l y z e r . c a r g o . a l l F e a t u r e s " = true ;
" r u s t - a n a l y z e r . c a r g o . l o a d O u t D i r s F r o m C h e c k " = true ;
" r u s t - a n a l y z e r . p r o c M a c r o . e n a b l e " = true ;
" e d i t o r . f o n t F a m i l y " = " ' I o s e v k a ' " ;
" d e b u g . c o n s o l e . f o n t F a m i l y " = " I o s e v k a " ;
" d e b u g . c o n s o l e . f o n t S i z e " = 12 ;
" t e r m i n a l . i n t e g r a t e d . f o n t S i z e " = 12 ;
" g o . u s e L a n g u a g e S e r v e r " = true ;
" r u s t - a n a l y z e r . c h e c k O n S a v e . c o m m a n d " = " c l i p p y " ;
} ;
2021-01-02 16:21:55 +03:00
} ;
2020-11-21 23:54:07 +03:00
} ;
services = {
2020-12-23 19:54:51 +03:00
gpg-agent = rec {
2020-11-21 23:54:07 +03:00
enable = true ;
enableSshSupport = true ;
sshKeys = [ " 8 3 6 9 D 9 C A 2 6 C 3 E A A A B 8 3 0 2 A 8 8 C E E 6 F D 1 4 B 5 8 A A 9 6 5 " ] ;
defaultCacheTtl = 3600 * 6 ;
2020-12-23 19:54:51 +03:00
defaultCacheTtlSsh = defaultCacheTtl ;
2020-11-21 23:54:07 +03:00
maxCacheTtl = 3600 * 24 ;
2020-12-23 19:54:51 +03:00
maxCacheTtlSsh = maxCacheTtl ;
2020-11-21 23:54:07 +03:00
grabKeyboardAndMouse = false ;
2021-01-26 21:09:02 +03:00
pinentryFlavor = " q t " ;
2020-11-21 23:54:07 +03:00
} ;
} ;
xdg = {
enable = true ;
configFile = {
2021-01-17 17:25:54 +03:00
# "oguri/config".text = ''
# [output *]
# image=/home/patriot/wallpaper.gif
# filter=nearest
# scaling-mode=fill
# anchor=center
# '';
2020-11-21 23:54:07 +03:00
" k a k / u s e r / k a k r c " . text = ''
source " % v a l { c o n f i g } / u s e r / c o l o r / c o l o r s c h e m e . k a k "
'' ;
" k a k / u s e r / c o l o r / c o l o r s c h e m e . k a k " . text = ''
evaluate-commands % sh {
fg = " r g b : ${ colorScheme . primary . normal . foreground } "
bg = " r g b : ${ colorScheme . primary . normal . background } "
br_fg = " r g b : ${ colorScheme . primary . bright . foreground } "
br_bg = " r g b : ${ colorScheme . primary . bright . background } "
red = " r g b : ${ colorScheme . normal . red } "
green = " r g b : ${ colorScheme . normal . green } "
yellow = " r g b : ${ colorScheme . normal . yellow } "
blue = " r g b : ${ colorScheme . normal . blue } "
magenta = " r g b : ${ colorScheme . normal . magenta } "
cyan = " r g b : ${ colorScheme . normal . cyan } "
br_red = " r g b : ${ colorScheme . bright . red } "
br_green = " r g b : ${ colorScheme . bright . green } "
br_yellow = " r g b : ${ colorScheme . bright . yellow } "
br_blue = " r g b : ${ colorScheme . bright . blue } "
br_magenta = " r g b : ${ colorScheme . bright . magenta } "
br_cyan = " r g b : ${ colorScheme . bright . cyan } "
echo "
set-face global value $ yellow + b
set-face global type $ br_yellow
set-face global variable $ magenta
set-face global module $ blue
set-face global function $ br_cyan
set-face global string $ br_green
set-face global keyword $ br_red + b
set-face global operator $ br_cyan
set-face global attribute $ yellow
set-face global comment $ fg
set-face global meta $ br_yellow
set-face global builtin $ br_fg + b
set-face global title $ blue + u
set-face global header $ br_cyan + u
set-face global bold $ br_fg + b
set-face global italic $ br_fg + i
set-face global mono $ br_green
set-face global block $ yellow
set-face global link $ blue
set-face global bullet $ br_magenta
set-face global list $ magenta
set-face global Default $ br_fg , $ bg
set-face global PrimarySelection $ bg , $ br_fg
set-face global SecondarySelection $ br_fg , $ br_bg + i
set-face global PrimaryCursor $ bg , $ red + b
set-face global SecondaryCursor $ bg , $ br_cyan + i
set-face global MatchingChar $ bg , $ blue
set-face global Search $ br_fg , $ green
set-face global CurrentWord $ br_fg , $ blue
set-face global MenuForeground $ cyan , $ br_bg + b
set-face global MenuBackground $ br_fg , $ bg
set-face global Information $ br_yellow , $ bg
set-face global Error $ br_bg , $ br_red
set-face global BufferPadding $ bg , $ bg
set-face global Whitespace $ bg
set-face global StatusLine $ br_fg , $ bg
set-face global StatusLineInfo $ yellow , $ bg
set-face global LineNumbers default
set-face global LineNumberCursor default , default + r
"
}
'' ;
" k a k - l s p / k a k - l s p . t o m l " . text = ''
snippet_support = true
verbosity = 2
[ semantic_scopes ]
variable = " v a r i a b l e "
entity_name_function = " f u n c t i o n "
entity_name_type = " t y p e "
variable_other_enummember = " v a r i a b l e "
entity_name_namespace = " m o d u l e "
[ semantic_tokens ]
type = " t y p e "
variable = " v a r i a b l e "
namespace = " m o d u l e "
function = " f u n c t i o n "
string = " s t r i n g "
keyword = " k e y w o r d "
operator = " o p e r a t o r "
comment = " c o m m e n t "
[ semantic_modifiers ]
documentation = " d o c u m e n t a t i o n "
readonly = " d e f a u l t + d "
[ server ]
timeout = 1800
[ language . rust ]
filetypes = [ " r u s t " ]
roots = [ " C a r g o . t o m l " ]
command = " ${ pkgBin " r u s t - a n a l y z e r " } "
[ language . nix ]
filetypes = [ " n i x " ]
roots = [ " f l a k e . n i x " , " s h e l l . n i x " , " . g i t " ]
command = " ${ pkgBin " r n i x - l s p " } "
'' ;
" n i x / n i x . c o n f " . text = nixosConfig . nix . extraOptions ;
" n i x p k g s / c o n f i g . n i x " . text = ''
{
android_sdk . accept_license = true ;
allowUnfree = true ;
}
'' ;
} // kideFiles ;
} ;
} ;
}