Personal Nix setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add initial eww config setup

+192 -1
+1
home/desktop/default.nix
··· 9 9 ./mako.nix 10 10 ./wofi.nix 11 11 ./lock.nix 12 + ./eww 12 13 ]; 13 14 14 15 fonts.fontconfig.enable = true;
+41
home/desktop/eww/default.nix
··· 1 + { lib, pkgs, ... } @ inputs: 2 + 3 + let 4 + inherit (import ../../../lib/colors.nix inputs) colors mkScssSyntax; 5 + in { 6 + home.packages = [ pkgs.eww-wayland ]; 7 + 8 + xdg.configFile."eww/_colors.scss".text = mkScssSyntax colors; 9 + 10 + xdg.configFile."eww/_variables.yuck".text = ""; 11 + 12 + xdg.configFile.eww = { 13 + recursive = true; 14 + source = lib.cleanSourceWith { 15 + filter = name: _type: !(lib.hasSuffix ".nix" (baseNameOf (toString name))); 16 + src = lib.cleanSource ./.; 17 + }; 18 + }; 19 + 20 + systemd.user.services.eww = let 21 + dependencies = with pkgs; [ eww-wayland bash ]; 22 + in { 23 + Unit = { 24 + Description = "ElKowars wacky widgets"; 25 + PartOf = [ "graphical-session.target" ]; 26 + After = [ "graphical-session.target" ]; 27 + }; 28 + 29 + Install = { 30 + WantedBy = [ "hyprland-session.target" ]; 31 + }; 32 + 33 + Service = { 34 + Environment = "PATH=${lib.makeBinPath dependencies}"; 35 + ExecStart = "${pkgs.eww-wayland}/bin/eww daemon --no-daemonize"; 36 + ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID"; 37 + Restart = "on-failure"; 38 + KillMode = "mixed"; 39 + }; 40 + }; 41 + }
+57
home/desktop/eww/eww.scss
··· 1 + @import 'colors'; 2 + 3 + * { 4 + all: unset; //Unsets everything so you can style everything from scratch 5 + } 6 + 7 + //Global Styles 8 + .bar { 9 + background-color: #3a3a3a; 10 + color: #b0b4bc; 11 + padding: 10px; 12 + } 13 + 14 + // Styles on classes (see eww.yuck for more information) 15 + 16 + .sidestuff slider { 17 + all: unset; 18 + color: #ffd5cd; 19 + } 20 + 21 + .metric scale trough highlight { 22 + all: unset; 23 + background-color: #D35D6E; 24 + color: #000000; 25 + border-radius: 10px; 26 + } 27 + .metric scale trough { 28 + all: unset; 29 + background-color: #4e4e4e; 30 + border-radius: 50px; 31 + min-height: 3px; 32 + min-width: 50px; 33 + margin-left: 10px; 34 + margin-right: 20px; 35 + } 36 + .metric scale trough highlight { 37 + all: unset; 38 + background-color: #D35D6E; 39 + color: #000000; 40 + border-radius: 10px; 41 + } 42 + .metric scale trough { 43 + all: unset; 44 + background-color: #4e4e4e; 45 + border-radius: 50px; 46 + min-height: 3px; 47 + min-width: 50px; 48 + margin-left: 10px; 49 + margin-right: 20px; 50 + } 51 + .label-ram { 52 + font-size: large; 53 + } 54 + .workspaces button:hover { 55 + color: #D35D6E; 56 + } 57 +
+77
home/desktop/eww/eww.yuck
··· 1 + (include "./_variables.yuck"); 2 + 3 + (defwidget bar [] 4 + (centerbox :orientation "h" 5 + (workspaces) 6 + (music) 7 + (sidestuff))) 8 + 9 + (defwidget sidestuff [] 10 + (box :class "sidestuff" :orientation "h" :space-evenly false :halign "end" 11 + (metric :label "🔊" 12 + :value volume 13 + :onchange "amixer -D pulse sset Master {}%") 14 + (metric :label "" 15 + :value {EWW_RAM.used_mem_perc} 16 + :onchange "") 17 + (metric :label "💾" 18 + :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} 19 + :onchange "") 20 + time)) 21 + 22 + (defwidget workspaces [] 23 + (box :class "workspaces" 24 + :orientation "h" 25 + :space-evenly true 26 + :halign "start" 27 + :spacing 10 28 + (button :onclick "wmctrl -s 0" 1) 29 + (button :onclick "wmctrl -s 1" 2) 30 + (button :onclick "wmctrl -s 2" 3) 31 + (button :onclick "wmctrl -s 3" 4) 32 + (button :onclick "wmctrl -s 4" 5) 33 + (button :onclick "wmctrl -s 5" 6) 34 + (button :onclick "wmctrl -s 6" 7) 35 + (button :onclick "wmctrl -s 7" 8) 36 + (button :onclick "wmctrl -s 8" 9))) 37 + 38 + (defwidget music [] 39 + (box :class "music" 40 + :orientation "h" 41 + :space-evenly false 42 + :halign "center" 43 + {music != "" ? "🎵${music}" : ""})) 44 + 45 + 46 + (defwidget metric [label value onchange] 47 + (box :orientation "h" 48 + :class "metric" 49 + :space-evenly false 50 + (box :class "label" label) 51 + (scale :min 0 52 + :max 101 53 + :active {onchange != ""} 54 + :value value 55 + :onchange onchange))) 56 + 57 + 58 + 59 + (deflisten music :initial "" 60 + "playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true") 61 + 62 + (defpoll volume :interval "1s" 63 + "scripts/getvol") 64 + 65 + (defpoll time :interval "10s" 66 + "date '+%H:%M %b %d, %Y'") 67 + 68 + (defwindow bar 69 + :monitor 0 70 + :windowtype "dock" 71 + :geometry (geometry :x "0%" 72 + :y "0%" 73 + :width "90%" 74 + :height "10px" 75 + :anchor "top center") 76 + :reserve (struts :side "top" :distance "4%") 77 + (bar))
+15
lib/colors.nix
··· 72 72 mkVimHighlight = group: { fg ? transparent, bg ? transparent, style ? "NONE" }: 73 73 "highlight ${group} guifg=${fg.gui} guibg=${bg.gui} gui=${style} ctermfg=${fg.cterm} ctermbg=${bg.cterm} cterm=${style}"; 74 74 mkLuaVariable = name: { gui, ... }: "${name} = \"${gui}\","; 75 + mkScssVariable = name: { gui, ... }: "\$${name}: ${gui};"; 75 76 76 77 mkVimTerminalSyntax = attrs: 77 78 (if hasAttr "terminal" attrs then '' ··· 129 130 '' 130 131 { ${concatStringsSep "\n" (mapAttrsToList mkLuaVariable (toFlatAttrs colors))} } 131 132 ''; 133 + 134 + mkScssSyntax = let 135 + recurse = path: value: 136 + if isAttrs value && !(hasAttr "gui" value) then 137 + mapAttrsToList 138 + (name: value: recurse (path ++ (if name != "base" then [name] else [])) value) 139 + value 140 + else { 141 + ${concatStrings path} = value; 142 + }; 143 + toFlatAttrs = attrs: 144 + lib.foldl lib.recursiveUpdate {} (lib.flatten (recurse [] attrs)); 145 + in colors: 146 + (concatStringsSep "\n" (mapAttrsToList mkScssVariable (toFlatAttrs colors))); 132 147 133 148 mkVimSyntax = let 134 149 recurse = path: value:
+1 -1
modules/nvim/default.nix
··· 70 70 p.gitattributes p.graphql p.regex p.json p.json5 p.javascript 71 71 p.markdown p.markdown_inline p.terraform p.svelte p.prisma 72 72 p.yaml p.vue p.vim p.lua p.make p.jsdoc p.comment p.css 73 - p.sql p.rust p.html p.bash p.c p.nix p.zig 73 + p.sql p.rust p.html p.bash p.c p.nix p.zig p.yuck 74 74 ])) 75 75 ]; 76 76 };