1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

10 Commits

Author SHA1 Message Date
b274a59a50 niri: add shortcut to float windows 2025-08-26 08:29:09 +02:00
b4de03bb3c replace more instances of rofi by wofi 2025-08-26 08:28:56 +02:00
b0062abbfe passmenu: fix 2025-08-26 07:50:31 +02:00
0e9a046c5f obsidian-vim: add fugitive 2025-08-26 07:50:24 +02:00
72ab319e65 niri: set window rules 2025-08-26 07:50:06 +02:00
f08e43067b configure niri 2025-08-26 07:19:54 +02:00
d0ac0af7c3 use wl-clipboard 2025-08-26 07:19:17 +02:00
5febabb7fa use wofi 2025-07-11 11:37:23 +02:00
44d29f90e9 working niri config 2025-07-10 06:51:51 +02:00
1aaf0fe5ae configure wayland for kabsa 2025-07-09 09:23:41 +02:00
20 changed files with 982 additions and 196 deletions

View File

@@ -24,7 +24,7 @@ in
config = { config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"''; dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.wofi}/bin/wofi -dmenu "$@"'';
}; };
permittedInsecurePackages = [ permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4" "qtwebkit-5.212.0-alpha4"
@@ -99,8 +99,8 @@ in
{ {
o = "${pkgs.xdg-utils}/bin/xdg-open"; o = "${pkgs.xdg-utils}/bin/xdg-open";
ns = "nix-shell --run zsh"; ns = "nix-shell --run zsh";
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in"; pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out"; pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
tmux = "${pkgs.tmux}/bin/tmux -2"; tmux = "${pkgs.tmux}/bin/tmux -2";
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv"; sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
zathura = swallow "${pkgs.zathura}/bin/zathura"; zathura = swallow "${pkgs.zathura}/bin/zathura";
@@ -223,6 +223,7 @@ in
./htop.nix ./htop.nix
./fu-berlin.nix ./fu-berlin.nix
./i3.nix ./i3.nix
./niri.nix
./i3status-rust.nix ./i3status-rust.nix
./keyboard.nix ./keyboard.nix
./mycelium.nix ./mycelium.nix

View File

@@ -5,6 +5,7 @@
}: { }: {
home-manager.users.me = { home-manager.users.me = {
services.flameshot = { services.flameshot = {
package = pkgs.flameshot.override { enableWlrSupport = true; };
enable = true; enable = true;
settings.General = { settings.General = {
autoCloseIdleDaemon = true; autoCloseIdleDaemon = true;

View File

@@ -1,5 +1,6 @@
{ {
pkgs, pkgs,
config,
niveumPackages, niveumPackages,
... ...
}: let }: let
@@ -107,6 +108,7 @@ in {
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-emoji noto-fonts-emoji
nerd-fonts.blex-mono
roboto-slab roboto-slab
scheherazade-new scheherazade-new
source-code-pro source-code-pro
@@ -119,10 +121,10 @@ in {
zilla-slab zilla-slab
]; # google-fonts league-of-moveable-type ]; # google-fonts league-of-moveable-type
fontconfig.defaultFonts = rec { fontconfig.defaultFonts = rec {
monospace = ["Noto Sans Mono"] ++ emoji; monospace = [config.stylix.fonts.monospace.name] ++ emoji;
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"]; serif = [config.stylix.fonts.serif.name "Scheherazade New" "Ezra SIL" "Antinoou" "Noto Serif Devanagari"];
sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"]; sansSerif = [config.stylix.fonts.sansSerif.name "Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"];
emoji = ["Noto Color Emoji"]; emoji = [config.stylix.fonts.emoji.name];
}; };
# xelatex fails with woff files # xelatex fails with woff files
# ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other # ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other

View File

@@ -7,19 +7,19 @@
commaSep = builtins.concatStringsSep ","; commaSep = builtins.concatStringsSep ",";
xkbOptions = ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"]; xkbOptions = ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
languages = { languages = {
deutsch = { code = "de"; variant = "T3"; };
greek = { code = "gr"; variant = "polytonic"; };
russian = { code = "ru"; variant = "phonetic"; };
arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic; arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic;
coptic = ../lib/keyboards/coptic;
avestan = ../lib/keyboards/avestan; avestan = ../lib/keyboards/avestan;
gothic = ../lib/keyboards/gothic; coptic = ../lib/keyboards/coptic;
deutsch = { code = "de"; variant = "T3"; };
farsi = { code = "ir"; variant = "qwerty"; }; farsi = { code = "ir"; variant = "qwerty"; };
syriac = { code = "sy"; variant = "syc_phonetic"; }; gothic = ../lib/keyboards/gothic;
sanskrit = { code = "in"; variant = "san-kagapa"; }; greek = { code = "gr"; variant = "polytonic"; };
gujarati = {code = "in"; variant = "guj-kagapa"; }; gujarati = {code = "in"; variant = "guj-kagapa"; };
urdu = {code = "in"; variant = "urd-phonetic"; };
hebrew = {code = "il"; variant = "phonetic";}; hebrew = {code = "il"; variant = "phonetic";};
russian = { code = "ru"; variant = "phonetic"; };
sanskrit = { code = "in"; variant = "san-kagapa"; };
syriac = { code = "sy"; variant = "syc_phonetic"; };
urdu = {code = "in"; variant = "urd-phonetic"; };
}; };
defaultLanguage = languages.deutsch; defaultLanguage = languages.deutsch;
in { in {
@@ -27,28 +27,33 @@ in {
# man 7 xkeyboard-config # man 7 xkeyboard-config
services.xserver = { services.xserver = {
exportConfiguration = true; # link /usr/share/X11 properly # exportConfiguration = true; # link /usr/share/X11 properly
xkb.layout = defaultLanguage.code; xkb.layout = defaultLanguage.code;
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png # T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
# buckwalter: http://www.qamus.org/transliteration.htm # buckwalter: http://www.qamus.org/transliteration.htm
xkb.variant = defaultLanguage.variant; xkb.variant = defaultLanguage.variant;
xkb.options = commaSep xkbOptions; xkb.options = commaSep xkbOptions;
xkb.dir = pkgs.symlinkJoin { xkb.extraLayouts = {
name = "x-keyboard-directory"; "coptic" = {
paths = [ languages = ["cop"];
"${pkgs.xkeyboard_config}/etc/X11/xkb" description = "Coptic";
(pkgs.linkFarm "custom-x-keyboards" ( symbolsFile = ../lib/keyboards/coptic;
lib.mapAttrsToList (name: value: { };
name = "symbols/${name}"; "gothic" = {
path = value; languages = ["got"];
}) (lib.filterAttrs (_: value: !(value ? "code")) languages) ++ [ description = "Gothic";
{ symbolsFile = ../lib/keyboards/gothic;
name = "symbols/ir"; };
path = ../lib/keyboards/farsi; "avestan" = {
} languages = ["ave"];
] description = "Avestan";
)) symbolsFile = ../lib/keyboards/avestan;
]; };
"farsi-good" = {
languages = ["fas"];
description = "Farsi, but good";
symbolsFile = ../lib/keyboards/farsi;
};
}; };
}; };
@@ -66,7 +71,16 @@ in {
pkgs.writers.writeDashBin "kb-${language}" '' pkgs.writers.writeDashBin "kb-${language}" ''
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage.code},${code} ${defaultLanguage.variant},${variant} ${toString (map (option: "-option ${option}") xkbOptions)} ${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage.code},${code} ${defaultLanguage.variant},${variant} ${toString (map (option: "-option ${option}") xkbOptions)}
'') '')
languages; languages ++
lib.mapAttrsToList
(language: settings:
let
code = if settings ? "code" then settings.code else language;
variant = if settings ? "variant" then settings.variant else "";
in
pkgs.writers.writeDashBin "kb-niri-${language}" ''
${pkgs.gnused}/bin/sed -i 's/^\(\s*layout\) ".*"$/\1 "${defaultLanguage.code},${code}"/;s/^\(\s*variant\) ".*"$/\1 "${defaultLanguage.variant},${variant}"/' ~/.config/niri/config.kdl
'') languages;
# improve held key rate # improve held key rate
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50"; services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";

View File

@@ -36,7 +36,7 @@ in {
"Alt+j" = "add video-pan-y -0.05"; "Alt+j" = "add video-pan-y -0.05";
}; };
scripts = [ scripts = [
pkgs.mpvScripts.quality-menu # pkgs.mpvScripts.quality-menu
niveumPackages.mpv-visualizer niveumPackages.mpv-visualizer
]; ];
}; };

View File

@@ -37,8 +37,8 @@
environment.systemPackages = [ environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'') (pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
(niveumPackages.vim.override { (niveumPackages.vim.override {
# stylixColors = config.lib.stylix.colors; stylixColors = config.lib.stylix.colors;
colorscheme = "base16-gruvbox-light-medium"; # colorscheme = "base16-gruvbox-light-medium";
}) })
# language servers # language servers

445
configs/niri.nix Normal file
View File

@@ -0,0 +1,445 @@
{
pkgs,
config,
niveumPackages,
lib,
...
}:
let
inherit (import ../lib) defaultApplications;
niriConfig =
let
klem = niveumPackages.klem.override {
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
config.scripts = {
"p.r paste" = pkgs.writers.writeDash "p.r" ''
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
| ${pkgs.coreutils}/bin/tail --lines=1 \
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
'';
"envs.sh paste" = pkgs.writers.writeDash "envs-host" ''
${pkgs.curl}/bin/curl -F "file=@-" https://envs.sh
'';
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
'';
"go.r shorten" = pkgs.writers.writeDash "go.r" ''
${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)"
'';
"4d2.org paste" = pkgs.writers.writeDash "4d2-paste" ''
${pkgs.curl}/bin/curl -F "file=@-" https://depot.4d2.org/
'';
"0x0.st shorten" = pkgs.writers.writeDash "0x0.st" ''
${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)"
'';
"rot13" = pkgs.writers.writeDash "rot13" ''
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
'';
"ipa" = pkgs.writers.writeDash "ipa" ''
${niveumPackages.ipa}/bin/ipa
'';
"betacode" = pkgs.writers.writeDash "betacode" ''
${niveumPackages.betacode}/bin/betacode
'';
"curl" = pkgs.writers.writeDash "curl" ''
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
'';
ocr = pkgs.writers.writeDash "ocr" ''
${pkgs.tesseract4}/bin/tesseract -l eng+deu - stdout
'';
emojai = pkgs.writers.writeDash "emojai" ''
${pkgs.curl}/bin/curl https://www.emojai.app/api/generate -X POST -H 'Content-Type: application/json' --data-raw "$(${pkgs.jq}/bin/jq -sR '{emoji:.}')" | ${pkgs.jq}/bin/jq -r .result
'';
"gpt-3.5" = pkgs.writers.writeDash "gpt" ''
${niveumPackages.gpt35}/bin/gpt
'';
gpt-4 = pkgs.writers.writeDash "gpt" ''
${niveumPackages.gpt4}/bin/gpt
'';
};
};
in
''
spawn-at-startup "${pkgs.ironbar}/bin/ironbar"
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
environment {
DISPLAY ":0"
ANKI_WAYLAND "1"
}
input {
warp-mouse-to-focus
focus-follows-mouse max-scroll-amount="0%"
keyboard {
repeat-rate 35
repeat-delay 350
track-layout "global"
xkb {
layout "de"
variant "T3"
options "ctrl:nocaps,compose:caps,grp:ctrls_toggle"
}
}
touchpad {
click-method "clickfinger"
tap
dwt
dwtp
}
}
prefer-no-csd
hotkey-overlay {
skip-at-startup
}
layout {
gaps 5
default-column-width {
proportion 0.5
}
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
focus-ring {
width 2
}
shadow {
// on
softness 30
spread 5
offset x=0 y=5
draw-behind-window true
color "#00000070"
// inactive-color "#00000054"
}
tab-indicator {
// off
hide-when-single-tab
place-within-column
gap 5
width 4
length total-proportion=1.0
position "right"
gaps-between-tabs 2
corner-radius 8
active-color "red"
inactive-color "gray"
urgent-color "blue"
// active-gradient from="#80c8ff" to="#bbddff" angle=45
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
// urgent-gradient from="#800" to="#a33" angle=45
}
border {
off
}
}
animations {
// off
workspace-switch {
spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
}
window-open {
duration-ms 150
curve "ease-out-expo"
}
window-close {
duration-ms 150
curve "ease-out-quad"
}
horizontal-view-movement {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
window-movement {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
window-resize {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
config-notification-open-close {
spring damping-ratio=0.6 stiffness=1000 epsilon=0.001
}
screenshot-ui-open {
duration-ms 200
curve "ease-out-quad"
}
overview-open-close {
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
}
}
window-rule {
geometry-corner-radius 0
clip-to-geometry true
}
window-rule {
match app-id="mpv"
open-floating true
}
window-rule {
match app-id="rofi"
open-floating true
}
window-rule {
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
default-floating-position x=32 y=32 relative-to="bottom-left"
}
window-rule {
match is-window-cast-target=true
border {
on
width 3
active-color "#f38ba8"
inactive-color "#7d0d2d"
}
}
binds {
Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Return { spawn "${(defaultApplications pkgs).terminal}"; }
Mod+D { spawn "${pkgs.wofi}/bin/wofi" "--show" "run"; }
Mod+Shift+D { spawn "${niveumPackages.notemenu}/bin/notemenu"; }
Mod+T { spawn "${(defaultApplications pkgs).fileManager}"; }
Mod+Y { spawn "${(defaultApplications pkgs).browser}"; }
Mod+P { spawn "${niveumPackages.passmenu}/bin/passmenu"; }
Mod+U { spawn "${niveumPackages.unicodmenu}/bin/unicodmenu"; }
Mod+Shift+Z { toggle-window-floating; }
Mod+B { spawn "${pkgs.ironbar}/bin/ironbar" "bar" "bar-1337" "toggle-visible"; }
Mod+F12 { spawn "${klem}/bin/klem"; }
Mod+Shift+Q { close-window; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -i 5"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -d 5"; }
XF86AudioMute allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -t"; }
XF86AudioPause allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl play-pause"; }
XF86AudioPlay allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl play-pause"; }
XF86AudioNext allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl next"; }
XF86AudioPrev allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl previous"; }
XF86AudioStop allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl stop"; }
Print { spawn "flameshot gui"; }
Mod+Shift+W { spawn "swaylock"; }
Mod+Comma { consume-or-expel-window-left; }
Mod+Period { consume-or-expel-window-right; }
Mod+W { toggle-column-tabbed-display; }
Mod+A repeat=false { toggle-overview; }
Mod+F { maximize-column; }
Mod+C { center-column; }
Mod+Minus { set-column-width "-25%"; }
Mod+Plus { set-column-width "+25%"; }
Mod+Ctrl+0 { spawn "niri" "msg" "action" "switch-layout" "0"; }
Mod+Ctrl+1 { spawn "niri" "msg" "action" "switch-layout" "1"; }
Mod+Ctrl+2 { spawn "niri" "msg" "action" "switch-layout" "2"; }
Mod+Ctrl+3 { spawn "niri" "msg" "action" "switch-layout" "3"; }
Mod+Ctrl+4 { spawn "niri" "msg" "action" "switch-layout" "4"; }
Mod+Ctrl+5 { spawn "niri" "msg" "action" "switch-layout" "5"; }
Mod+Ctrl+6 { spawn "niri" "msg" "action" "switch-layout" "6"; }
Mod+Ctrl+7 { spawn "niri" "msg" "action" "switch-layout" "7"; }
Mod+Ctrl+8 { spawn "niri" "msg" "action" "switch-layout" "8"; }
Mod+Ctrl+9 { spawn "niri" "msg" "action" "switch-layout" "9"; }
Mod+H { focus-column-or-monitor-left; }
Mod+J { focus-window-or-workspace-down; }
Mod+K { focus-window-or-workspace-up; }
Mod+L { focus-column-or-monitor-right; }
Mod+Shift+H { move-column-left-or-to-monitor-left; }
Mod+Shift+J { move-window-down-or-to-workspace-down; }
Mod+Shift+K { move-window-up-or-to-workspace-up; }
Mod+Shift+L { move-column-right-or-to-monitor-right; }
Mod+Ctrl+H { focus-monitor-left; }
Mod+Ctrl+J { focus-monitor-down; }
Mod+Ctrl+K { focus-monitor-up; }
Mod+Ctrl+L { focus-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-workspace-down; }
Mod+Shift+Ctrl+K { move-column-to-workspace-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
Mod+Shift+Alt+Ctrl+H { move-workspace-to-monitor-left; }
Mod+Shift+Alt+Ctrl+J { move-workspace-down; }
Mod+Shift+Alt+Ctrl+K { move-workspace-up; }
Mod+Shift+Alt+Ctrl+L { move-workspace-to-monitor-right; }
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+0 { focus-workspace 10; }
Mod+Shift+1 { move-window-to-workspace "1"; }
Mod+Shift+2 { move-window-to-workspace "2"; }
Mod+Shift+3 { move-window-to-workspace "3"; }
Mod+Shift+4 { move-window-to-workspace "4"; }
Mod+Shift+5 { move-window-to-workspace "5"; }
Mod+Shift+6 { move-window-to-workspace "6"; }
Mod+Shift+7 { move-window-to-workspace "7"; }
Mod+Shift+8 { move-window-to-workspace "8"; }
Mod+Shift+9 { move-window-to-workspace "9"; }
Mod+Shift+0 { move-window-to-workspace "0"; }
}
'';
in
{
system.activationScripts.niriConfig = {
text = ''
cp ${pkgs.writeText "config.kdl" niriConfig} ${config.users.users.me.home}/.config/niri/config.kdl
chown ${config.users.users.me.name}:${config.users.users.me.group} ${config.users.users.me.home}/.config/niri/config.kdl
'';
};
programs.niri.enable = true;
services.displayManager.defaultSession = lib.mkForce "niri";
home-manager.users.me = {
xdg.configFile."ironbar/style.css".text = ''
* {
font-size: 8pt;
font-family: "Gentium Plus", "BlexMono Nerd Font";
}
box, menubar, button {
background-color: unset;
box-shadow: none;
background-image: none;
}
.clock, .upower, .volume {
font-weight: unset;
}
tooltip * {
font-family: "BlexMono Nerd Font";
font-size: 7pt;
}
'';
xdg.configFile."ironbar/config.json".source = (pkgs.formats.json { }).generate "ironbar.json" {
name = "bar-1337";
height = 12;
layer = "top";
position = "bottom";
start = [ ];
center = [
{
type = "tray";
icon_size = 8;
}
{ type = "clipboard"; }
{ type = "notifications"; }
];
end = [
{
type = "upower";
icon_size = 8;
format = "{percentage}%";
}
{
type = "label";
tooltip = "{{df -h --output=size,used,avail,pcent,target}}";
label = "\t{{5000:df -h / --output=avail | tail +2}}";
}
{
type = "label";
tooltip = "{{free -Lh --si | awk '{for(i=1;i<=NF;i++){printf \"%s%s\", $i, (i%2? OFS: ORS)} if(NF%2) printf ORS}'}}";
label = "󰍛\t{{500:free -h --si | awk 'NR==2{printf $3 \"\\n\"}'}}";
}
{
type = "label";
tooltip = "{{}}";
on_click_left = "pamixer -t";
on_scroll_up = "pamixer -i 1";
on_scroll_down = "pamixer -d 1";
label = "{{500:if $(pamixer --get-mute) = true; then echo ; else echo ; fi}}\t{{500:pamixer --get-volume}}%";
}
{
type = "label";
tooltip = "{{uptime}}";
label = "\t{{500:uptime | sed 's/.*load average: \\([^ ]*\\);.*/\\1/' | tr ' ' '\n'}}";
}
{
type = "label";
tooltip = "{{khal list today today -d astro-test-3 }}";
label = "";
}
{
type = "label";
tooltip = "{{curl wttr.in/?0 | ${pkgs.ansifilter}/bin/ansifilter}}";
label = "󰔏";
}
{
type = "label";
name = "cal";
tooltip = "{{cal}}";
label = "{{500:date +'<U+F017>\t%Y-%m-%d (%W %a) %H:%M'}}";
}
];
};
programs.alacritty.enable = true; # Super+T in the default setting (terminal)
programs.swaylock.enable = true; # Super+Alt+L in the default setting (screen locker)
services.swaync = {
enable = true;
settings = {
notification-window-width = 300;
control-center-width = 300;
widgets = [
"volume"
"mpris"
"title"
"dnd"
"notifications"
];
widget-config = {
title = {
text = "ϥ̄";
"clear-all-button" = true;
"button-text" = "";
};
dnd.text = "̄̄ϣ̄̄";
label.text = "";
};
};
};
services.swayidle.enable = true; # idle management daemon
home.packages = with pkgs; [
xdg-desktop-portal-gnome
swaybg
];
};
services.gnome.gnome-keyring.enable = true; # secret service
security.pam.services.swaylock = { };
}

View File

@@ -95,7 +95,7 @@ in {
gnome-disk-utility gnome-disk-utility
arandr # xrandr for noobs arandr # xrandr for noobs
libnotify # for notify-send libnotify # for notify-send
xclip # clipboard CLI wl-clipboard # clipboard CLI
xdragon # drag and drop xdragon # drag and drop
xorg.xkill # kill by clicking xorg.xkill # kill by clicking
portfolio # personal finance overview portfolio # personal finance overview
@@ -124,7 +124,7 @@ in {
kdePackages.okular # the word is nucular kdePackages.okular # the word is nucular
xournalpp # for annotating pdfs xournalpp # for annotating pdfs
pdfpc # presenter console for pdf slides pdfpc # presenter console for pdf slides
niveumPackages.hc # print files as qr codes # niveumPackages.hc # print files as qr codes
yt-dlp yt-dlp
espeak espeak
rink # unit converter rink # unit converter
@@ -144,7 +144,7 @@ in {
niveumPackages.pls niveumPackages.pls
niveumPackages.mpv-tv niveumPackages.mpv-tv
niveumPackages.mpv-iptv niveumPackages.mpv-iptv
jellyfin-media-player # jellyfin-media-player
niveumPackages.devanagari niveumPackages.devanagari
niveumPackages.betacode # ancient greek betacode to unicode converter niveumPackages.betacode # ancient greek betacode to unicode converter
niveumPackages.meteo niveumPackages.meteo
@@ -240,7 +240,7 @@ in {
nodePackages.csslint nodePackages.csslint
nodePackages.jsonlint nodePackages.jsonlint
deno # better node.js deno # better node.js
texlive.combined.scheme-full # texlive.combined.scheme-full
latexrun latexrun
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers])) (aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
# haskellPackages.pandoc-citeproc # haskellPackages.pandoc-citeproc

View File

@@ -18,7 +18,7 @@ in {
stylix.enable = true; stylix.enable = true;
stylix.image = generatedWallpaper; stylix.image = generatedWallpaper;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-light-medium.yaml"; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-light.yaml";
stylix.cursor = { stylix.cursor = {
name = "capitaine-cursors-white"; name = "capitaine-cursors-white";
@@ -52,18 +52,18 @@ in {
stylix.fonts = { stylix.fonts = {
serif = { serif = {
package = pkgs.noto-fonts; package = pkgs.gentium;
name = "Noto Serif"; name = "Gentium Plus";
}; };
sansSerif = { sansSerif = {
package = pkgs.noto-fonts; package = pkgs.gentium;
name = "Noto Sans"; name = "Gentium Plus";
}; };
monospace = { monospace = {
package = pkgs.noto-fonts; package = pkgs.nerd-fonts.blex-mono;
name = "Noto Sans Mono"; name = "BlexMono Nerd Font";
}; };
emoji = { emoji = {

383
flake.lock generated
View File

@@ -178,7 +178,7 @@
"stockholm", "stockholm",
"nixpkgs" "nixpkgs"
], ],
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_3"
}, },
"locked": { "locked": {
"lastModified": 1746626503, "lastModified": 1746626503,
@@ -194,6 +194,27 @@
"type": "github" "type": "github"
} }
}, },
"centerpiece": {
"inputs": {
"crane": "crane",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1745697341,
"narHash": "sha256-KDYRly/9IKDBmH3D6Jv4BkVer3u/uwkQIXR0vhAuqro=",
"owner": "friedow",
"repo": "centerpiece",
"rev": "2a610e8e0a6b65b733ea98f2ca602235f695b4f3",
"type": "github"
},
"original": {
"owner": "friedow",
"repo": "centerpiece",
"type": "github"
}
},
"coptic-dictionary": { "coptic-dictionary": {
"inputs": { "inputs": {
"kellia-dictionary": "kellia-dictionary", "kellia-dictionary": "kellia-dictionary",
@@ -239,6 +260,21 @@
"type": "github" "type": "github"
} }
}, },
"crane": {
"locked": {
"lastModified": 1742394900,
"narHash": "sha256-vVOAp9ahvnU+fQoKd4SEXB2JG2wbENkpqcwlkIXgUC0=",
"owner": "ipetkov",
"repo": "crane",
"rev": "70947c1908108c0c551ddfd73d4f750ff2ea67cd",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -287,7 +323,7 @@
}, },
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_7",
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
@@ -624,6 +660,24 @@
} }
}, },
"home-manager": { "home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1743259333,
"narHash": "sha256-2Fi3K++co4IGbeOLGXdRA6VEfbzQzMgcuBaPTyjfj0s=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "1f679ed2a2ebe3894bad9f89fb0bd9f141c28a68",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"coptic-dictionary", "coptic-dictionary",
@@ -646,7 +700,7 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": { "home-manager_3": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@@ -735,7 +789,7 @@
"inputs": { "inputs": {
"fenix": "fenix", "fenix": "fenix",
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1702906210, "lastModified": 1702906210,
@@ -814,12 +868,12 @@
"agenix": "agenix_2", "agenix": "agenix_2",
"coptic-dictionary": "coptic-dictionary_2", "coptic-dictionary": "coptic-dictionary_2",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager_2",
"menstruation-backend": "menstruation-backend", "menstruation-backend": "menstruation-backend",
"menstruation-telegram": "menstruation-telegram", "menstruation-telegram": "menstruation-telegram",
"nix-on-droid": "nix-on-droid", "nix-on-droid": "nix-on-droid",
"nixinate": "nixinate", "nixinate": "nixinate",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_4",
"nixpkgs-old": "nixpkgs-old", "nixpkgs-old": "nixpkgs-old",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur", "nur": "nur",
@@ -994,7 +1048,7 @@
}, },
"nixinate_2": { "nixinate_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_9"
}, },
"locked": { "locked": {
"lastModified": 1742737607, "lastModified": 1742737607,
@@ -1012,16 +1066,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1693636127, "lastModified": 1742669843,
"narHash": "sha256-ZlS/lFGzK7BJXX2YVGnP3yZi3T9OLOEtBCyMJsb91U8=", "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9075cba53e86dc318d159aee55dc9a7c9a4829c1", "rev": "1e5b653dff12029333a6546c11e108ede13052eb",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.05", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -1123,112 +1177,6 @@
} }
}, },
"nixpkgs_10": { "nixpkgs_10": {
"locked": {
"lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_11": {
"locked": {
"lastModified": 1615532953,
"narHash": "sha256-SWpaGjrp/INzorEqMz3HLi6Uuk9I0KAn4YS8B4n3q5g=",
"path": "/nix/store/vw365chp87kvfczxm26qiq7z2pq3jk5z-source",
"rev": "916ee862e87ac5ee2439f2fb7856386b4dc906ae",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1615532953,
"narHash": "sha256-SWpaGjrp/INzorEqMz3HLi6Uuk9I0KAn4YS8B4n3q5g=",
"path": "/nix/store/vw365chp87kvfczxm26qiq7z2pq3jk5z-source",
"rev": "916ee862e87ac5ee2439f2fb7856386b4dc906ae",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1653060744,
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dfd82985c273aac6eced03625f454b334daae2e8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1750400657, "lastModified": 1750400657,
"narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=", "narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=",
@@ -1244,7 +1192,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": { "nixpkgs_11": {
"locked": { "locked": {
"lastModified": 1750365781, "lastModified": 1750365781,
"narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
@@ -1260,7 +1208,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": { "nixpkgs_12": {
"locked": { "locked": {
"lastModified": 1746904237, "lastModified": 1746904237,
"narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=",
@@ -1276,6 +1224,160 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_13": {
"locked": {
"lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_14": {
"locked": {
"lastModified": 1615532953,
"narHash": "sha256-SWpaGjrp/INzorEqMz3HLi6Uuk9I0KAn4YS8B4n3q5g=",
"path": "/nix/store/vw365chp87kvfczxm26qiq7z2pq3jk5z-source",
"rev": "916ee862e87ac5ee2439f2fb7856386b4dc906ae",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1743076231,
"narHash": "sha256-yQugdVfi316qUfqzN8JMaA2vixl+45GxNm4oUfXlbgw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6c5963357f3c1c840201eda129a99d455074db04",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1735554305,
"narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1693636127,
"narHash": "sha256-ZlS/lFGzK7BJXX2YVGnP3yZi3T9OLOEtBCyMJsb91U8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9075cba53e86dc318d159aee55dc9a7c9a4829c1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eabc38219184cc3e04a974fe31857d8e0eac098d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1615532953,
"narHash": "sha256-SWpaGjrp/INzorEqMz3HLi6Uuk9I0KAn4YS8B4n3q5g=",
"path": "/nix/store/vw365chp87kvfczxm26qiq7z2pq3jk5z-source",
"rev": "916ee862e87ac5ee2439f2fb7856386b4dc906ae",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1653060744,
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dfd82985c273aac6eced03625f454b334daae2e8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": { "nmd": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -1390,8 +1492,8 @@
"nur_2": { "nur_2": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_11",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1750553086, "lastModified": 1750553086,
@@ -1417,7 +1519,7 @@
"stylix", "stylix",
"nixpkgs" "nixpkgs"
], ],
"treefmt-nix": "treefmt-nix_3" "treefmt-nix": "treefmt-nix_4"
}, },
"locked": { "locked": {
"lastModified": 1746056780, "lastModified": 1746056780,
@@ -1518,14 +1620,15 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"centerpiece": "centerpiece",
"coptic-dictionary": "coptic-dictionary", "coptic-dictionary": "coptic-dictionary",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"home-manager": "home-manager_2", "home-manager": "home-manager_3",
"menstruation-backend": "menstruation-backend_2", "menstruation-backend": "menstruation-backend_2",
"menstruation-telegram": "menstruation-telegram_2", "menstruation-telegram": "menstruation-telegram_2",
"nix-on-droid": "nix-on-droid_2", "nix-on-droid": "nix-on-droid_2",
"nixinate": "nixinate_2", "nixinate": "nixinate_2",
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_10",
"nixpkgs-old": "nixpkgs-old_2", "nixpkgs-old": "nixpkgs-old_2",
"nixpkgs-unstable": "nixpkgs-unstable_2", "nixpkgs-unstable": "nixpkgs-unstable_2",
"nur": "nur_2", "nur": "nur_2",
@@ -1668,7 +1771,7 @@
"inputs": { "inputs": {
"buildbot-nix": "buildbot-nix", "buildbot-nix": "buildbot-nix",
"nix-writers": "nix-writers", "nix-writers": "nix-writers",
"nixpkgs": "nixpkgs_9" "nixpkgs": "nixpkgs_12"
}, },
"locked": { "locked": {
"lastModified": 1747157099, "lastModified": 1747157099,
@@ -1832,7 +1935,7 @@
"telebots": { "telebots": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1677156381, "lastModified": 1677156381,
@@ -1851,7 +1954,7 @@
"telebots_2": { "telebots_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_10" "nixpkgs": "nixpkgs_13"
}, },
"locked": { "locked": {
"lastModified": 1703313352, "lastModified": 1703313352,
@@ -2007,6 +2110,24 @@
} }
}, },
"treefmt-nix": { "treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1743081648,
"narHash": "sha256-WRAylyYptt6OX5eCEBWyTwOEqEtD6zt33rlUkr6u3cE=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "29a3d7b768c70addce17af0869f6e2bd8f5be4b7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nur", "nur",
@@ -2027,7 +2148,7 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix_2": { "treefmt-nix_3": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"stockholm", "stockholm",
@@ -2049,7 +2170,7 @@
"type": "github" "type": "github"
} }
}, },
"treefmt-nix_3": { "treefmt-nix_4": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"stylix", "stylix",
@@ -2110,7 +2231,7 @@
"niveum", "niveum",
"flake-utils" "flake-utils"
], ],
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1615819231, "lastModified": 1615819231,
@@ -2132,7 +2253,7 @@
"flake-utils": [ "flake-utils": [
"flake-utils" "flake-utils"
], ],
"nixpkgs": "nixpkgs_11" "nixpkgs": "nixpkgs_14"
}, },
"locked": { "locked": {
"lastModified": 1615819231, "lastModified": 1615819231,

View File

@@ -9,6 +9,7 @@
home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.url = "github:nix-community/home-manager/release-25.05";
menstruation-backend.url = "github:kmein/menstruation.rs"; menstruation-backend.url = "github:kmein/menstruation.rs";
menstruation-telegram.url = "github:kmein/menstruation-telegram"; menstruation-telegram.url = "github:kmein/menstruation-telegram";
centerpiece.url = "github:friedow/centerpiece";
nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05"; nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05";
nixinate.url = "github:matthewcroughan/nixinate"; nixinate.url = "github:matthewcroughan/nixinate";
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0"; nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
@@ -71,6 +72,7 @@
nixinate, nixinate,
flake-utils, flake-utils,
nix-on-droid, nix-on-droid,
centerpiece,
stylix, stylix,
... ...
}: }:
@@ -318,7 +320,7 @@
nur.overlays.default nur.overlays.default
(self: super: { (self: super: {
mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];}; mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];};
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"''; dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.wofi}/bin/wofi --dmenu "$@"'';
}) })
]; ];
}; };
@@ -405,6 +407,7 @@
text2pdf = pkgs.callPackage packages/text2pdf.nix {}; text2pdf = pkgs.callPackage packages/text2pdf.nix {};
timer = pkgs.callPackage packages/timer.nix {}; timer = pkgs.callPackage packages/timer.nix {};
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {}; tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
passmenu = pkgs.callPackage packages/passmenu.nix {};
trans = pkgs.callPackage packages/trans.nix {}; trans = pkgs.callPackage packages/trans.nix {};
ttspaste = pkgs.callPackage packages/ttspaste.nix {}; ttspaste = pkgs.callPackage packages/ttspaste.nix {};
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {}; unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};

175
lib/style.css Normal file
View File

@@ -0,0 +1,175 @@
* {
font-size: 14px;
border-radius: 5px;
}
window#waybar {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, monospace;
background-color: transparent;
border-bottom: 0px;
color: #ebdbb2;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
window#waybar.empty #window {
background-color: transparent;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
.modules-right {
margin: 10px 10px 0 0;
}
.modules-center {
margin: 10px 0 0 0;
}
.modules-left {
margin: 10px 0 0 10px;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
/* box-shadow: inset 0 -3px transparent; */
border: none;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
/*
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ebdbb2;
} */
#workspaces {
background-color: #282828;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ebdbb2;
border-radius: 0;
}
#workspaces button:first-child {
border-radius: 5px 0 0 5px;
}
#workspaces button:last-child {
border-radius: 0 5px 5px 0;
}
#workspaces button:hover {
color: #d79921;
}
#workspaces button.focused {
background-color: #665c54;
/* box-shadow: inset 0 -3px #ffffff; */
}
#workspaces button.urgent {
background-color: #b16286;
}
#idle_inhibitor,
#cava,
#scratchpad,
#mode,
#window,
#clock,
#battery,
#backlight,
#wireplumber,
#tray,
#mpris,
#load {
padding: 0 10px;
background-color: #282828;
color: #ebdbb2;
}
#mode {
background-color: #689d6a;
color: #282828;
/* box-shadow: inset 0 -3px #ffffff; */
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#cava {
padding: 0 5px;
}
#battery.charging, #battery.plugged {
background-color: #98971a;
color: #282828;
}
@keyframes blink {
to {
background-color: #282828;
color: #ebdbb2;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #cc241d;
color: #ebdbb2;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#wireplumber.muted {
background-color: #458588;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
}
#mpris.playing {
background-color: #d79921;
color: #282828;
}
#tray menu {
font-family: sans-serif;
}
#scratchpad.empty {
background: transparent;
}

View File

@@ -42,14 +42,14 @@ in
pkgs.writers.writeDashBin "klem" '' pkgs.writers.writeDashBin "klem" ''
set -efu set -efu
${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \ ${pkgs.wl-clipboard}/bin/wl-paste \
| case $(echo "${ | case $(echo "${
lib.concatStringsSep "\n" (lib.attrNames cfg.scripts) lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)
}" | ${cfg.dmenu}) in }" | ${cfg.dmenu}) in
${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)} ${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)}
*) ${pkgs.coreutils}/bin/cat ;; *) ${pkgs.coreutils}/bin/cat ;;
esac \ esac \
| ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in | ${pkgs.wl-clipboard}/bin/wl-copy
${pkgs.libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard." ${pkgs.libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
'' ''

View File

@@ -1,7 +1,7 @@
{ {
writers, writers,
lib, lib,
rofi, wofi,
findutils, findutils,
coreutils, coreutils,
noteDirectory ? "~/state/obsidian", noteDirectory ? "~/state/obsidian",
@@ -11,7 +11,7 @@
writers.writeDashBin "notemenu" '' writers.writeDashBin "notemenu" ''
set -efu set -efu
PATH=$PATH:${ PATH=$PATH:${
lib.makeBinPath [rofi findutils coreutils] lib.makeBinPath [wofi findutils coreutils]
} }
cd ${noteDirectory} cd ${noteDirectory}
@@ -21,7 +21,7 @@ writers.writeDashBin "notemenu" ''
echo $(date -I -d yesterday).md echo $(date -I -d yesterday).md
''} ''}
find . -not -path '*/.*' -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2- find . -not -path '*/.*' -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2-
} | rofi -dmenu -i -p 'notes') } | wofi -dmenu -i -p 'notes')
if test "$note_file" if test "$note_file"
then then
alacritty --working-directory ${noteDirectory} -e ${niveumPackages.obsidian-vim}/bin/nvim "$note_file" alacritty --working-directory ${noteDirectory} -e ${niveumPackages.obsidian-vim}/bin/nvim "$note_file"

View File

@@ -35,6 +35,7 @@ neovim.override {
vimPlugins.nerdtree vimPlugins.nerdtree
vimPlugins.fzf-vim vimPlugins.fzf-vim
vimPlugins.fzfWrapper vimPlugins.fzfWrapper
vimPlugins.vim-fugitive
]; ];
}; };
} }

18
packages/passmenu.nix Normal file
View File

@@ -0,0 +1,18 @@
{ writers, wofi, pass, fd, libnotify, ... }:
writers.writeBashBin "passmenu" ''
shopt -s nullglob globstar
IFS=$'\n'
prefix=$(readlink -f ''${PASSWORD_STORE_DIR-~/.password-store})
password_files=( $( ${fd}/bin/fd -L ".gpg\$" "$prefix" ) )
password_files=( "''${password_files[@]#"$prefix"/}" )
password_files=( "''${password_files[@]%.gpg}" )
password=$( printf '%s\n' "''${password_files[@]}" | ${wofi}/bin/wofi -i -k /dev/null -d menu -- "$@" )
[[ -n $password ]] || exit
OUT=$(${pass}/bin/pass show --clip "$password")
${libnotify}/bin/notify-send -t 5000 "$(echo "$OUT" | grep '^login:' | sed 's/^login: //')"
''

View File

@@ -2,7 +2,7 @@
writers, writers,
mktemp, mktemp,
qrencode, qrencode,
xclip, wl-clipboard,
nsxiv, nsxiv,
}: }:
writers.writeDashBin "qrpaste" '' writers.writeDashBin "qrpaste" ''
@@ -11,6 +11,6 @@ writers.writeDashBin "qrpaste" ''
clean() { clean() {
rm "$file" rm "$file"
} }
${qrencode}/bin/qrencode "$(${xclip}/bin/xclip -selection clipboard -out)" -o "$file" ${qrencode}/bin/qrencode "$(${wl-clipboard}/bin/wl-paste)" -o "$file"
${nsxiv}/bin/nsxiv "$file" ${nsxiv}/bin/nsxiv "$file"
'' ''

View File

@@ -1,10 +1,10 @@
{ {
writers, writers,
xclip, wl-clipboard,
espeak, espeak,
}: }:
writers.writeDashBin "ttspaste" '' writers.writeDashBin "ttspaste" ''
${xclip}/bin/xclip -selection clipboard -out | ${espeak}/bin/espeak ${wl-clipboard}/bin/paste | ${espeak}/bin/espeak
'' ''
# curl, mpv, # curl, mpv,
# ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv - # ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv -

View File

@@ -8,7 +8,7 @@
dmenu, dmenu,
gnused, gnused,
libnotify, libnotify,
xclip, wl-clipboard,
xdotool, xdotool,
gawk, gawk,
fetchFromGitHub, fetchFromGitHub,
@@ -90,7 +90,7 @@ in
writers.writeDashBin "unicodmenu" '' writers.writeDashBin "unicodmenu" ''
history_file=$HOME/.cache/unicodmenu history_file=$HOME/.cache/unicodmenu
touch "$history_file" touch "$history_file"
PATH=${lib.makeBinPath [coreutils dmenu gawk gnused libnotify xclip xdotool]} PATH=${lib.makeBinPath [coreutils dmenu gawk gnused libnotify wl-clipboard xdotool]}
all_characters() { all_characters() {
tac "$history_file" tac "$history_file"
@@ -101,7 +101,7 @@ in
[ "$chosen" != "" ] || exit [ "$chosen" != "" ] || exit
echo "$chosen" | tr -d '\n' | xclip -selection clipboard echo "$chosen" | tr -d '\n' | wl-copy
if [ -n "$1" ]; then if [ -n "$1" ]; then
xdotool key Shift+Insert xdotool key Shift+Insert

View File

@@ -1,11 +1,16 @@
{ {
config, config,
niveumPackages,
pkgs, pkgs,
lib, lib,
inputs,
... ...
}: let }:
let
# TODO wrap obsidian: obsidian --no-sandbox --ozone-platform=wayland --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations %U
inherit (import ../../lib) retiolumAddresses; inherit (import ../../lib) retiolumAddresses;
in { in
{
imports = [ imports = [
../kibbeh/hardware-configuration.nix ../kibbeh/hardware-configuration.nix
../../configs/tlp.nix ../../configs/tlp.nix
@@ -45,13 +50,13 @@ in {
wireguard-aether-psk.file = ../../secrets/kabsa-wireguard-aether-psk.age; wireguard-aether-psk.file = ../../secrets/kabsa-wireguard-aether-psk.age;
}; };
networking.wg-quick.interfaces.aether.address = ["192.168.178.203/24"]; networking.wg-quick.interfaces.aether.address = [ "192.168.178.203/24" ];
environment.systemPackages = [pkgs.zeroad]; environment.systemPackages = [ pkgs.zeroad ];
networking = { networking = {
hostName = "kabsa"; hostName = "kabsa";
wireless.interfaces = ["wlp3s0"]; wireless.interfaces = [ "wlp3s0" ];
retiolum = retiolumAddresses.kabsa; retiolum = retiolumAddresses.kabsa;
}; };