1
0
mirror of https://github.com/kmein/niveum synced 2026-03-22 04:41:07 +01:00

1 Commits

Author SHA1 Message Date
github-actions[bot]
359d77364c flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4e96537f163fad24ed9eb317798a79afc85b51b7?narHash=sha256-GFzPxJzTd1rPIVD4IW%2BGwJlyGwBDV1Tj5FLYwDQQ9sM%3D' (2025-01-26)
  → 'github:NixOS/nixpkgs/666e1b3f09c267afd66addebe80fb05a5ef2b554?narHash=sha256-6L%2BWXKCw5mqnUIExvqkD99pJQ41xgyCk6z/H9snClwk%3D' (2025-01-30)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/eb12bf57742db460e2f6b12918911deacc103812?narHash=sha256-hc4cRhHPrCVaMHqVCT%2BCcJX0BZdYRwFP99UHyiR948g%3D' (2025-01-27)
  → 'github:NixOS/nixpkgs/2ba6948605b411bba634c448342ad1fc77adfe25?narHash=sha256-HLclHMfsBAcnmizlAblhQLVkX0OjP61tsCerFkb5SvU%3D' (2025-02-02)
• Updated input 'nur':
    'github:nix-community/NUR/5d8189fe2c0655a93b081f4b7b892236b2500507?narHash=sha256-MsqFDA4e0PnYuxlCn1gpIl6C1fWyPLY2ND1/Jr8yrCY%3D' (2025-01-27)
  → 'github:nix-community/NUR/95ddad0ff0e67c90314c6ca46324dce5f9a910d2?narHash=sha256-EO2dVkMVLThWqv4hobEZEZGWBEuH2Z9SYqQDrbLSclU%3D' (2025-01-31)
• Updated input 'nur/nixpkgs':
    'github:nixos/nixpkgs/852ff1d9e153d8875a83602e03fdef8a63f0ecf8?narHash=sha256-Zf0hSrtzaM1DEz8//%2BXs51k/wdSajticVrATqDrfQjg%3D' (2025-01-26)
  → 'github:nixos/nixpkgs/9d3ae807ebd2981d593cddd0080856873139aa40?narHash=sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9%2BWC4%3D' (2025-01-29)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/27bb917a41480b6ceee8e42d32dfcc9ecc6fa6c6?narHash=sha256-ZSXR/po/slqpsk3JLVjXbE04Vqrb4k7yCGHjyMj3tOk%3D' (2025-01-27)
  → 'github:oxalica/rust-overlay/83284068670d5ae4a43641c4afb150f3446be70d?narHash=sha256-S6ErHxkSm0iA7ZMsjjDaASWxbELYcdfv8BhOkkj1rHw%3D' (2025-02-01)
• Updated input 'stockholm':
    'github:krebs/stockholm/c45109b564345a9aedb3577b3a3150a4fabb5403?narHash=sha256-OrLWVsigZljnHNA5HRty6D/8IF4ge4WzHjmimYzxD%2BQ%3D' (2025-01-27)
  → 'github:krebs/stockholm/0ae99893e47cbbe0ad027c661e918551cdeb5459?narHash=sha256-gHLvjH9Kw%2B8LFHPtVDzhAjVJNcwexka9Gf26DXnIso0%3D' (2025-01-30)
• Updated input 'stylix':
    'github:danth/stylix/bcbd472edc8ed15624a378ce513b1e001d77594a?narHash=sha256-Jt0F1wY2AcgQdSfOE1%2BB0YnBYDgFYXJKDyEIa6/2VFk%3D' (2025-01-26)
  → 'github:danth/stylix/70505ba00ff09390b84cf50d52d48ee828727976?narHash=sha256-O0iFoytYpSxQdWeggIvrHjU5kmX/SRC9mcah9GbwlHk%3D' (2025-01-28)
2025-02-02 00:57:55 +00:00
59 changed files with 434 additions and 1988 deletions

View File

@@ -11,9 +11,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install QEMU (ARM) - name: Install QEMU (ARM)
run: | run: sudo apt-get install -y qemu-user-static
sudo apt-get update
sudo apt-get install -y qemu-user-static
if: ${{ matrix.system == 'ful' }} if: ${{ matrix.system == 'ful' }}
- name: Install Nix (ARM) - name: Install Nix (ARM)
uses: cachix/install-nix-action@v16 uses: cachix/install-nix-action@v16

View File

@@ -15,7 +15,6 @@ in {
pkgs.unzip pkgs.unzip
pkgs.unrar pkgs.unrar
pkgs.p7zip pkgs.p7zip
pkgs.sshuttle
pkgs.zip pkgs.zip
# MONITORS # MONITORS
pkgs.iftop # interface bandwidth monitor pkgs.iftop # interface bandwidth monitor
@@ -53,22 +52,6 @@ in {
pkgs.psmisc # for killall, pstree pkgs.psmisc # for killall, pstree
]; ];
security.wrappers = {
pmount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pmount";
};
pumount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pumount";
};
};
environment.shellAliases = let environment.shellAliases = let
take = pkgs.writers.writeDash "take" '' take = pkgs.writers.writeDash "take" ''
mkdir "$1" && cd "$1" mkdir "$1" && cd "$1"

View File

@@ -14,12 +14,6 @@ in {
group = config.users.users.me.group; group = config.users.users.me.group;
mode = "400"; mode = "400";
}; };
email-password-letos = {
file = ../secrets/email-password-letos.age;
owner = config.users.users.me.name;
group = config.users.users.me.group;
mode = "400";
};
email-password-posteo = { email-password-posteo = {
file = ../secrets/email-password-posteo.age; file = ../secrets/email-password-posteo.age;
owner = config.users.users.me.name; owner = config.users.users.me.name;
@@ -85,24 +79,9 @@ in {
address = "2210@cock.li"; address = "2210@cock.li";
userName = address; userName = address;
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}"; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
realName = "2210"; realName = "";
imap.host = "mail.cock.li"; imap.host = "mail.cock.li";
imap.port = 993;
smtp.host = imap.host; smtp.host = imap.host;
smtp.port = 25;
smtp.tls.useStartTls = true;
};
letos =
lib.recursiveUpdate defaults
{
userName = "slfletos";
address = "letos.sprachlit@hu-berlin.de";
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}";
imap.host = "mailbox.cms.hu-berlin.de";
imap.port = 993;
smtp.host = "mailhost.cms.hu-berlin.de";
smtp.port = 25;
smtp.tls.useStartTls = true;
}; };
posteo = posteo =
lib.recursiveUpdate defaults lib.recursiveUpdate defaults

View File

@@ -1,8 +1,58 @@
{ {
pkgs, pkgs,
lib, lib,
config,
... ...
}: let }: let
alacritty-cfg = theme:
(pkgs.formats.yaml {}).generate "alacritty.yml" {
bell = {
animation = "EaseOut";
duration = 100;
color = "#ffffff";
};
font = {
normal.family = "Monospace";
size = 6;
};
live_config_reload = true;
key_bindings = [
{
key = "Plus";
mods = "Control";
action = "IncreaseFontSize";
}
{
key = "Minus";
mods = "Control";
action = "DecreaseFontSize";
}
{
key = "Key0";
mods = "Control";
action = "ResetFontSize";
}
];
colors = let
colourNames = ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"];
colourPairs = lib.getAttrs colourNames theme;
in {
primary = {inherit (theme) background foreground;};
cursor = {inherit (theme) cursor;};
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
};
};
alacritty-pkg = pkgs.symlinkJoin {
name = "alacritty";
paths = [
(pkgs.writers.writeDashBin "alacritty" ''
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml msg create-window "$@" ||
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml "$@"
'')
pkgs.alacritty
];
};
in { in {
environment.variables.TERMINAL = "alacritty"; environment.variables.TERMINAL = "alacritty";

View File

@@ -7,4 +7,10 @@
}; };
environment.systemPackages = [ pkgs.bluetuith ]; environment.systemPackages = [ pkgs.bluetuith ];
# services.blueman.enable = true;
# environment.systemPackages = [pkgs.blueman];
# home-manager.users.me = {services.blueman-applet.enable = true;};
} }

View File

@@ -44,7 +44,7 @@ in {
transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" { transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" {
# revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged # revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged
libraries = [ pkgs.python3Packages.cltk ]; libraries = [ pkgs.python311Packages.cltk ];
} '' } ''
import sys import sys
from cltk.phonology.grc.transcription import Transcriber from cltk.phonology.grc.transcription import Transcriber

View File

@@ -8,7 +8,6 @@
niveumPackages.cro niveumPackages.cro
pkgs.tor-browser-bundle-bin pkgs.tor-browser-bundle-bin
pkgs.firefox pkgs.firefox
pkgs.brave
]; ];
home-manager.users.me = { home-manager.users.me = {

View File

@@ -6,16 +6,6 @@
}: let }: let
inherit (import ../lib) tmpfilesConfig; inherit (import ../lib) tmpfilesConfig;
in { in {
systemd.user.services.systemd-tmpfiles-clean = {
enable = true;
wantedBy = [ "default.target" ];
startAt = "daily";
script = "systemd-tmpfiles --user --clean";
serviceConfig = {
Type = "oneshot";
};
};
systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [ systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [
{ {
type = "d"; type = "d";

View File

@@ -6,25 +6,23 @@
unstablePackages, unstablePackages,
inputs, inputs,
... ...
}: }: let
let
inherit (lib.strings) makeBinPath; inherit (lib.strings) makeBinPath;
inherit (import ../lib) localAddresses kieran remoteDir; inherit (import ../lib) localAddresses kieran remoteDir;
defaultApplications = (import ../lib).defaultApplications { inherit pkgs; }; defaultApplications = (import ../lib).defaultApplications {inherit pkgs;};
in in {
{
imports = [ imports = [
inputs.self.nixosModules.system-dependent inputs.self.nixosModules.system-dependent
inputs.self.nixosModules.power-action inputs.self.nixosModules.power-action
{ {
boot.supportedFilesystems = [ "ntfs" ]; boot.supportedFilesystems = ["ntfs"];
} }
{ {
nixpkgs = { nixpkgs = {
config = { config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.wofi}/bin/wofi -dmenu "$@"''; dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
}; };
permittedInsecurePackages = [ permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4" "qtwebkit-5.212.0-alpha4"
@@ -76,10 +74,7 @@ in
hashedPasswordFile = config.age.secrets.kfm-password.path; hashedPasswordFile = config.age.secrets.kfm-password.path;
isNormalUser = true; isNormalUser = true;
uid = 1000; uid = 1000;
extraGroups = [ extraGroups = ["pipewire" "audio"];
"pipewire"
"audio"
];
}; };
nix.settings.trusted-users = [ config.users.users.me.name ]; nix.settings.trusted-users = [ config.users.users.me.name ];
@@ -92,27 +87,25 @@ in
} }
{ {
environment.interactiveShellInit = "export PATH=$PATH"; environment.interactiveShellInit = "export PATH=$PATH";
environment.shellAliases = environment.shellAliases = let
let swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}"; in {
in o = "${pkgs.xdg-utils}/bin/xdg-open";
{ ns = "nix-shell --run zsh";
o = "${pkgs.xdg-utils}/bin/xdg-open"; pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
ns = "nix-shell --run zsh"; pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy"; tmux = "${pkgs.tmux}/bin/tmux -2";
pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste"; sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
tmux = "${pkgs.tmux}/bin/tmux -2"; zathura = swallow "${pkgs.zathura}/bin/zathura";
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv"; im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
zathura = swallow "${pkgs.zathura}/bin/zathura"; yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM"; yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link };
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format opus --audio-quality 0 -xic"; # Download with audio
};
} }
{ {
i18n = { i18n = {
defaultLocale = "en_DK.UTF-8"; defaultLocale = "en_DK.UTF-8";
supportedLocales = [ "all" ]; supportedLocales = ["all"];
}; };
} }
{ {
@@ -128,18 +121,28 @@ in
enable = true; enable = true;
greeters.gtk = { greeters.gtk = {
enable = true; enable = true;
indicators = [ indicators = ["~spacer" "~host" "~spacer" "~session" "~power"];
"~spacer"
"~host"
"~spacer"
"~session"
"~power"
];
}; };
}; };
}; };
} }
{ programs.command-not-found.enable = true; } {
security.wrappers = {
pmount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pmount";
};
pumount = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.pmount}/bin/pumount";
};
};
}
{programs.command-not-found.enable = true;}
{ {
programs.gnupg = { programs.gnupg = {
agent = { agent = {
@@ -154,11 +157,7 @@ in
environment.systemPackages = [ environment.systemPackages = [
pkgs.gnupg pkgs.gnupg
(pkgs.pass.withExtensions (e: [ (pkgs.pass.withExtensions (e: [e.pass-otp e.pass-import e.pass-genphrase]))
e.pass-otp
e.pass-import
e.pass-genphrase
]))
]; ];
} }
{ {
@@ -171,10 +170,12 @@ in
}; };
} }
{ {
networking.hosts = lib.mapAttrs' (name: address: { networking.hosts =
name = address; lib.mapAttrs' (name: address: {
value = [ "${name}.local" ]; name = address;
}) localAddresses; value = ["${name}.local"];
})
localAddresses;
} }
{ {
home-manager.users.me.home.stateVersion = "22.05"; home-manager.users.me.home.stateVersion = "22.05";
@@ -182,9 +183,9 @@ in
} }
{ {
systemd.user.services.udiskie = { systemd.user.services.udiskie = {
after = [ "udisks2.service" ]; after = ["udisks2.service"];
wants = [ "udisks2.service" ]; wants = ["udisks2.service"];
wantedBy = [ "graphical-session.target" ]; wantedBy = ["graphical-session.target"];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify"; ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify";
}; };
@@ -222,14 +223,12 @@ in
./hledger.nix ./hledger.nix
./htop.nix ./htop.nix
./fu-berlin.nix ./fu-berlin.nix
./fysi.nix
./i3.nix ./i3.nix
./niri.nix
./i3status-rust.nix ./i3status-rust.nix
./keyboard.nix ./keyboard.nix
./mycelium.nix
./kdeconnect.nix ./kdeconnect.nix
{ home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose; } {home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose;}
{ services.upower.enable = true; }
./lb.nix ./lb.nix
./mpv.nix ./mpv.nix
./mime.nix ./mime.nix
@@ -257,11 +256,6 @@ in
./watson.nix ./watson.nix
./wallpaper.nix ./wallpaper.nix
./zsh.nix ./zsh.nix
{
home-manager.users.me.home.file.".zshrc".text = ''
# nothing to see here
'';
}
./tor.nix ./tor.nix
./stw-berlin.nix ./stw-berlin.nix
./mastodon-bot.nix ./mastodon-bot.nix
@@ -293,7 +287,7 @@ in
download = "${config.users.users.me.home}/sync/Downloads"; download = "${config.users.users.me.home}/sync/Downloads";
music = "${config.users.users.me.home}/mobile/audio"; music = "${config.users.users.me.home}/mobile/audio";
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder"; pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder";
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp"; publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
videos = pictures; videos = pictures;
}; };
}; };

View File

@@ -5,7 +5,6 @@
}: { }: {
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,6 +1,5 @@
{ {
pkgs, pkgs,
config,
niveumPackages, niveumPackages,
... ...
}: let }: let
@@ -25,6 +24,11 @@
url = "https://github.com/MKilani/Djehuty/archive/master.zip"; url = "https://github.com/MKilani/Djehuty/archive/master.zip";
sha256 = "sha256-S3vZxdeBj57KJsF+zaZw7sQw8T+z1aVC2CnpnZ0/x2c="; sha256 = "sha256-S3vZxdeBj57KJsF+zaZw7sQw8T+z1aVC2CnpnZ0/x2c=";
}; };
brill = zip-font "Brill" {
url = "https://brill.com/fileasset/The_Brill_Typeface_Package_v_4_0.zip";
stripRoot = false;
hash = "sha256-ugmEIkeBzD/4C9wkVfbctEtnzI8Kw+YD6KGcbk4BAf4=";
};
antinoou = zip-font "Antinoou" { antinoou = zip-font "Antinoou" {
url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip"; url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip";
sha256 = "0jwihj08n4yrshcx07dnaml2x9yws6dgyjkvg19jqbz17drbp3sw"; sha256 = "0jwihj08n4yrshcx07dnaml2x9yws6dgyjkvg19jqbz17drbp3sw";
@@ -88,7 +92,7 @@ in {
newGardiner newGardiner
junicode junicode
koineGreek koineGreek
# brill brill
ezra-sil ezra-sil
fira fira
font-awesome font-awesome
@@ -108,7 +112,6 @@ 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
@@ -121,10 +124,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 = [config.stylix.fonts.monospace.name] ++ emoji; monospace = ["Noto Sans Mono"] ++ emoji;
serif = [config.stylix.fonts.serif.name "Scheherazade New" "Ezra SIL" "Antinoou" "Noto Serif Devanagari"]; serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
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"]; sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic"];
emoji = [config.stylix.fonts.emoji.name]; emoji = ["Noto Color Emoji"];
}; };
# 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

@@ -131,10 +131,7 @@ in {
(pkgs.writers.writeDashBin "fu-vpn" '' (pkgs.writers.writeDashBin "fu-vpn" ''
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
then then
# root firefox will not open login window unless root owns Xauthority ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --useragent=AnyConnect
sudo cp $XAUTHORITY /root/.Xauthority
sudo chown root: /root/.Xauthority
XAUTHORITY=/root/.Xauthority sudo ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --useragent=AnyConnect
fi fi
'') '')
]; ];

View File

@@ -6,8 +6,10 @@
... ...
}: let }: let
dashboard = pkgs.writers.writeDashBin "dashboard" '' dashboard = pkgs.writers.writeDashBin "dashboard" ''
${pkgs.alacritty}/bin/alacritty --option font.size=4 --class dashboard --command ${pkgs.writers.writeDash "dashboard-inner" '' ${pkgs.alacritty}/bin/alacritty --class wtf --command ${pkgs.writers.writeDash "dashboard-inner" ''
exec ${pkgs.procps}/bin/watch -c -n 10 ${niveumPackages.q}/bin/q export WTF_OWM_API_KEY="$(cat ${config.age.secrets.openweathermap-api-key.path})"
export WTF_MINIFLUX_API_KEY="$(cat ${config.age.secrets.miniflux-api-token.path})"
exec ${niveumPackages.dashboard}/bin/dashboard
''} ''}
''; '';
inherit (import ../lib) defaultApplications; inherit (import ../lib) defaultApplications;
@@ -308,7 +310,7 @@ in {
exec "${pkgs.writers.writeDash "irc" "exec ${pkgs.alacritty}/bin/alacritty --class message -e ssh weechat@makanek -t tmux attach-session -t IM"}" exec "${pkgs.writers.writeDash "irc" "exec ${pkgs.alacritty}/bin/alacritty --class message -e ssh weechat@makanek -t tmux attach-session -t IM"}"
exec "${pkgs.writers.writeDash "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}" exec "${pkgs.writers.writeDash "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}"
assign [class="dashboard"] ${infoWorkspace} assign [class="wtf"] ${infoWorkspace}
exec ${dashboard}/bin/dashboard exec ${dashboard}/bin/dashboard
''; '';
config = lib.mkMerge [ config = lib.mkMerge [

View File

@@ -55,9 +55,7 @@
} }
{ {
block = "battery"; block = "battery";
format = "$icon $percentage $time"; device = config.niveum.batteryName;
device = "DisplayDevice";
driver = "upower";
} }
{ {
block = "sound"; block = "sound";

View File

@@ -7,19 +7,18 @@
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 = {
arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic;
avestan = ../lib/keyboards/avestan;
coptic = ../lib/keyboards/coptic;
deutsch = { code = "de"; variant = "T3"; }; deutsch = { code = "de"; variant = "T3"; };
farsi = { code = "ir"; variant = "qwerty"; };
gothic = ../lib/keyboards/gothic;
greek = { code = "gr"; variant = "polytonic"; }; greek = { code = "gr"; variant = "polytonic"; };
gujarati = {code = "in"; variant = "guj-kagapa"; };
hebrew = {code = "il"; variant = "phonetic";};
russian = { code = "ru"; variant = "phonetic"; }; russian = { code = "ru"; variant = "phonetic"; };
arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic;
coptic = ../lib/keyboards/coptic;
avestan = ../lib/keyboards/avestan;
gothic = ../lib/keyboards/gothic;
farsi = { code = "ir"; variant = "qwerty"; };
sanskrit = { code = "in"; variant = "san-kagapa"; }; sanskrit = { code = "in"; variant = "san-kagapa"; };
syriac = { code = "sy"; variant = "syc_phonetic"; }; gujarati = {code = "in"; variant = "guj-kagapa"; };
urdu = {code = "in"; variant = "urd-phonetic"; }; urdu = {code = "in"; variant = "urd-phonetic"; };
hebrew = {code = "il"; variant = "phonetic";};
}; };
defaultLanguage = languages.deutsch; defaultLanguage = languages.deutsch;
in { in {
@@ -27,33 +26,28 @@ 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.extraLayouts = { xkb.dir = pkgs.symlinkJoin {
"coptic" = { name = "x-keyboard-directory";
languages = ["cop"]; paths = [
description = "Coptic"; "${pkgs.xkeyboard_config}/etc/X11/xkb"
symbolsFile = ../lib/keyboards/coptic; (pkgs.linkFarm "custom-x-keyboards" (
}; lib.mapAttrsToList (name: value: {
"gothic" = { name = "symbols/${name}";
languages = ["got"]; path = value;
description = "Gothic"; }) (lib.filterAttrs (_: value: !(value ? "code")) languages) ++ [
symbolsFile = ../lib/keyboards/gothic; {
}; name = "symbols/ir";
"avestan" = { path = ../lib/keyboards/farsi;
languages = ["ave"]; }
description = "Avestan"; ]
symbolsFile = ../lib/keyboards/avestan; ))
}; ];
"farsi-good" = {
languages = ["fas"];
description = "Farsi, but good";
symbolsFile = ../lib/keyboards/farsi;
};
}; };
}; };
@@ -71,16 +65,7 @@ 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

@@ -1,15 +0,0 @@
{ lib, ... }:
let
myceliumAddresses = import ../lib/mycelium-network.nix;
in
{
services.mycelium = {
enable = true;
openFirewall = true;
};
networking.hosts = lib.mapAttrs' (name: address: {
name = address;
value = [ "${name}.m" ];
}) myceliumAddresses;
}

View File

@@ -38,7 +38,7 @@
(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-dark-medium";
}) })
# language servers # language servers
@@ -46,7 +46,6 @@
pkgs.haskellPackages.haskell-language-server pkgs.haskellPackages.haskell-language-server
pkgs.texlab pkgs.texlab
pkgs.nil pkgs.nil
pkgs.nixfmt-rfc-style
pkgs.rust-analyzer pkgs.rust-analyzer
pkgs.nodePackages.typescript-language-server pkgs.nodePackages.typescript-language-server
pkgs.lua-language-server pkgs.lua-language-server

View File

@@ -1,46 +0,0 @@
{ pkgs, niveumPackages, config, ... }: {
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
environment.shellAliases.vi = "nvim";
environment.shellAliases.vim = "nvim";
environment.shellAliases.view = "nvim -R";
home-manager.users.me = {
editorconfig = {
enable = true;
settings = {
"*" = {
charset = "utf-8";
end_of_line = "lf";
trim_trailing_whitespace = true;
insert_final_newline = true;
indent_style = "space";
indent_size = 2;
};
"*.py" = { indent_size = 4; };
Makefile = { indent_style = "tab"; };
"*.md" = { trim_trailing_whitespace = false; };
};
};
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
(niveumPackages.vim.override {
stylixColors = config.lib.stylix.colors;
# colorscheme = "base16-gruvbox-dark-medium";
})
# language servers
pkgs.pyright
pkgs.haskellPackages.haskell-language-server
pkgs.texlab
pkgs.nil
pkgs.rust-analyzer
pkgs.nodePackages.typescript-language-server
pkgs.lua-language-server
pkgs.nodePackages.vscode-langservers-extracted
pkgs.lemminx
niveumPackages.jq-lsp
pkgs.dhall-lsp-server
];
}

View File

@@ -1,445 +0,0 @@
{
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

@@ -73,7 +73,6 @@ in {
pcmanfm pcmanfm
# MEDIA # MEDIA
ffmpeg ffmpeg
simplescreenrecorder
imagemagick imagemagick
exiftool exiftool
nsxiv nsxiv
@@ -86,7 +85,7 @@ in {
gcc gcc
python3Packages.jsonschema # json validation python3Packages.jsonschema # json validation
pup # html toolkit pup # html toolkit
xan # csv toolkit xsv # csv toolkit
magic-wormhole-rs # file transfer magic-wormhole-rs # file transfer
man-pages man-pages
man-pages-posix man-pages-posix
@@ -95,10 +94,9 @@ in {
gnome-disk-utility gnome-disk-utility
arandr # xrandr for noobs arandr # xrandr for noobs
libnotify # for notify-send libnotify # for notify-send
wl-clipboard # clipboard CLI xclip # clipboard CLI
xdragon # drag and drop xdragon # drag and drop
xorg.xkill # kill by clicking xorg.xkill # kill by clicking
portfolio # personal finance overview
audacity audacity
calibre calibre
electrum electrum
@@ -121,10 +119,10 @@ in {
pdftk # pdf toolkit pdftk # pdf toolkit
mupdf mupdf
poppler_utils # pdf toolkit poppler_utils # pdf toolkit
kdePackages.okular # the word is nucular 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,10 +142,11 @@ 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
niveumPackages.mahlzeit
niveumPackages.jq-lsp niveumPackages.jq-lsp
niveumPackages.swallow # window swallowing niveumPackages.swallow # window swallowing
niveumPackages.literature-quote niveumPackages.literature-quote
@@ -239,8 +238,8 @@ in {
html-tidy html-tidy
nodePackages.csslint nodePackages.csslint
nodePackages.jsonlint nodePackages.jsonlint
deno # better node.js unstablePackages.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
@@ -251,7 +250,6 @@ in {
# gnumeric # gnumeric
dia dia
pandoc pandoc
librsvg # pandoc depends on this to include SVG in documents
# niveumPackages.man-pandoc # niveumPackages.man-pandoc
typst typst
# proselint # proselint
@@ -263,10 +261,6 @@ in {
# nightly.rust # nightly.rust
shellcheck shellcheck
# photography
gphoto2
darktable
(pkgs.writers.writeDashBin "hass-cli" '' (pkgs.writers.writeDashBin "hass-cli" ''
HASS_SERVER=http://zaatar.r:8123 HASS_TOKEN="$(cat ${config.age.secrets.home-assistant-token.path})" exec ${pkgs.home-assistant-cli}/bin/hass-cli "$@" HASS_SERVER=http://zaatar.r:8123 HASS_TOKEN="$(cat ${config.age.secrets.home-assistant-token.path})" exec ${pkgs.home-assistant-cli}/bin/hass-cli "$@"
'') '')

View File

@@ -3,6 +3,7 @@
externalNetwork = import ../lib/external-network.nix; externalNetwork = import ../lib/external-network.nix;
in { in {
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys; users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
home-manager.users.me = { home-manager.users.me = {

View File

@@ -17,7 +17,5 @@ in {
}; };
}; };
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys ++ [ users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys;
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoiRIn1dBUtpApcUyGbZKN+m5KBSgKIDQjdnQ8vU0xU kfm@kibbeh" # travel laptop
];
} }

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/ayu-light.yaml"; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.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.gentium; package = pkgs.noto-fonts;
name = "Gentium Plus"; name = "Noto Serif";
}; };
sansSerif = { sansSerif = {
package = pkgs.gentium; package = pkgs.noto-fonts;
name = "Gentium Plus"; name = "Noto Sans";
}; };
monospace = { monospace = {
package = pkgs.nerd-fonts.blex-mono; package = pkgs.noto-fonts;
name = "BlexMono Nerd Font"; name = "Noto Sans Mono";
}; };
emoji = { emoji = {

View File

@@ -2,10 +2,11 @@
config, config,
pkgs, pkgs,
... ...
}: let }: {
promptColours.success = "cyan"; home-manager.users.me.home.file.".zshrc".text = ''
promptColours.failure = "red"; # nothing to see here
in { '';
environment.systemPackages = [pkgs.atuin]; environment.systemPackages = [pkgs.atuin];
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" '' environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
auto_sync = true auto_sync = true
@@ -57,7 +58,7 @@ in {
fpath=(${zsh-completions}/src $fpath) fpath=(${zsh-completions}/src $fpath)
''; '';
promptInit = '' promptInit = with config.niveum; ''
autoload -Uz vcs_info autoload -Uz vcs_info
zstyle ':vcs_info:*' enable git zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' check-for-changes true

602
flake.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,22 +6,21 @@
# alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master"; # alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master";
coptic-dictionary.url = "github:kmein/coptic-dictionary"; coptic-dictionary.url = "github:kmein/coptic-dictionary";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.url = "github:nix-community/home-manager/release-24.11";
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";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
recht.url = "github:kmein/recht"; recht.url = "github:kmein/recht";
retiolum.url = "github:krebs/retiolum"; retiolum.url = "git+https://git.thalheim.io/Mic92/retiolum";
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
scripts.url = "github:kmein/scripts"; scripts.url = "github:kmein/scripts";
stockholm.url = "github:krebs/stockholm"; stockholm.url = "github:krebs/stockholm";
stylix.url = "github:danth/stylix/release-25.05"; stylix.url = "github:danth/stylix/release-24.11";
telebots.url = "github:kmein/telebots"; telebots.url = "github:kmein/telebots";
tinc-graph.url = "github:kmein/tinc-graph"; tinc-graph.url = "github:kmein/tinc-graph";
voidrice.url = "github:Lukesmithxyz/voidrice"; voidrice.url = "github:Lukesmithxyz/voidrice";
@@ -72,7 +71,6 @@
nixinate, nixinate,
flake-utils, flake-utils,
nix-on-droid, nix-on-droid,
centerpiece,
stylix, stylix,
... ...
}: }:
@@ -113,7 +111,6 @@
tabula = "root@tabula"; tabula = "root@tabula";
kabsa = "root@kabsa"; kabsa = "root@kabsa";
fatteh = "root@fatteh"; fatteh = "root@fatteh";
kibbeh = "root@kibbeh";
}; };
in in
lib.attrsets.nameValuePair "deploy-${hostname}" { lib.attrsets.nameValuePair "deploy-${hostname}" {
@@ -230,15 +227,7 @@
specialArgs = niveumSpecialArgs system; specialArgs = niveumSpecialArgs system;
modules = [ modules = [
systems/zaatar/configuration.nix systems/zaatar/configuration.nix
agenix.nixosModules.default inputs.self.nixosModules.moodle-dl
retiolum.nixosModules.retiolum
];
};
kibbeh = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = niveumSpecialArgs system;
modules = [
systems/kibbeh/configuration.nix
agenix.nixosModules.default agenix.nixosModules.default
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
]; ];
@@ -320,7 +309,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.wofi}/bin/wofi --dmenu "$@"''; dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
}) })
]; ];
}; };
@@ -337,7 +326,6 @@
packages = rec { packages = rec {
auc = pkgs.callPackage packages/auc.nix {}; auc = pkgs.callPackage packages/auc.nix {};
betacode = pkgs.callPackage packages/betacode.nix {}; betacode = pkgs.callPackage packages/betacode.nix {};
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
brassica = pkgs.callPackage packages/brassica.nix {}; brassica = pkgs.callPackage packages/brassica.nix {};
cheat-sh = pkgs.callPackage packages/cheat-sh.nix {}; cheat-sh = pkgs.callPackage packages/cheat-sh.nix {};
closest = pkgs.callPackage packages/closest {}; closest = pkgs.callPackage packages/closest {};
@@ -397,7 +385,6 @@
opustags = pkgs.callPackage packages/opustags.nix {}; opustags = pkgs.callPackage packages/opustags.nix {};
pls = pkgs.callPackage packages/pls.nix {}; pls = pkgs.callPackage packages/pls.nix {};
polyglot = pkgs.callPackage packages/polyglot.nix {}; polyglot = pkgs.callPackage packages/polyglot.nix {};
q = pkgs.callPackage packages/q.nix {};
qrpaste = pkgs.callPackage packages/qrpaste.nix {}; qrpaste = pkgs.callPackage packages/qrpaste.nix {};
random-zeno = pkgs.callPackage packages/random-zeno.nix {}; random-zeno = pkgs.callPackage packages/random-zeno.nix {};
rfc = pkgs.callPackage packages/rfc.nix {}; rfc = pkgs.callPackage packages/rfc.nix {};
@@ -407,7 +394,6 @@
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 {};
@@ -416,7 +402,6 @@
vg = pkgs.callPackage packages/vg.nix {}; vg = pkgs.callPackage packages/vg.nix {};
vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};}; vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};};
obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {}; obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {};
radio-news = pkgs.callPackage packages/radio-news.nix {};
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {}; vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {};
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {}; vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {};
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {}; vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {};

View File

@@ -1,8 +0,0 @@
{
zaatar = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
fatteh = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
ful = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
kabsa = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
makanek = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
manakish = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
}

View File

@@ -1,175 +0,0 @@
* {
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

@@ -113,13 +113,7 @@ local language_servers = {
html = {}, -- vscode-langservers-extracted html = {}, -- vscode-langservers-extracted
jsonls = {}, -- vscode-langservers-extracted jsonls = {}, -- vscode-langservers-extracted
lemminx = {}, -- lemminx (for xml) lemminx = {}, -- lemminx (for xml)
nil_ls = { nil_ls = {}, -- github:oxalica/nil
['nil'] = {
formatting = {
command = { "nixfmt" },
},
},
}, -- github:oxalica/nil
dhall_lsp_server = {}, -- dhall-lsp-server dhall_lsp_server = {}, -- dhall-lsp-server
-- rnix = {}, -- rnix-lsp -- rnix = {}, -- rnix-lsp
jqls = {}, -- jq-lsp jqls = {}, -- jq-lsp

View File

@@ -40,6 +40,8 @@ let g:netrw_banner=0
let g:netrw_browse_split=4 let g:netrw_browse_split=4
let g:netrw_altv=1 " open splits to the right let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view let g:netrw_liststyle=3 " tree view
let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
let g:netrw_winsize = 25 let g:netrw_winsize = 25
call matchadd('colorcolumn', '\%101v', 100) call matchadd('colorcolumn', '\%101v', 100)

View File

@@ -1,39 +0,0 @@
{ writers, flite, netcat, gnused, ... }:
writers.writeDashBin "brainmelter" ''
SERVER="brockman.news"
PORT=6667
NICK="irccat"
USER="irccat"
CHANNEL="#all"
# Open connection to IRC server using a FIFO and netcat
FIFO=$(mktemp -u)
mkfifo "$FIFO"
trap "rm -f $FIFO" EXIT
# Send IRC commands
{
echo "NICK $NICK"
echo "USER $USER 0 * :$USER"
sleep 5
echo "JOIN $CHANNEL"
while true; do
sleep 30
echo "PING :keepalive"
done
} > "$FIFO" &
# Read from server and write to stdout
${netcat}/bin/nc "$SERVER" "$PORT" < "$FIFO" | while IFS= read -r line; do
voice="$(echo -e "awb\nkal\nrms\nslt" | shuf -n1)"
echo "$line" \
| ${gnused}/bin/sed -n 's/.*go.brockman.news\/\S\+ //p' \
| tee /dev/stderr \
| ${flite}/bin/flite -voice "$voice"
# Respond to PINGs to avoid timeout
if [ "$line" = PING* ]; then
server_ping=$(echo "$line" | cut -d':' -f2)
echo "PONG :$server_ping" > "$FIFO"
fi
done
''

View File

@@ -1,7 +1,7 @@
{ {
writers, writers,
fetchurl, fetchurl,
xan, xsv,
}: let }: let
database = fetchurl { database = fetchurl {
url = "http://c.krebsco.de/greek.csv"; url = "http://c.krebsco.de/greek.csv";
@@ -9,5 +9,5 @@
}; };
in in
writers.writeDashBin "heuretes" '' writers.writeDashBin "heuretes" ''
${xan}/bin/xan search -s simple "^$*$" ${database} | ${xan}/bin/xan table ${xsv}/bin/xsv search -s simple "^$*$" ${database} | ${xsv}/bin/xsv table
'' ''

View File

@@ -42,14 +42,14 @@ in
pkgs.writers.writeDashBin "klem" '' pkgs.writers.writeDashBin "klem" ''
set -efu set -efu
${pkgs.wl-clipboard}/bin/wl-paste \ ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \
| 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.wl-clipboard}/bin/wl-copy | ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in
${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,31 +1,31 @@
{ {
writers, writers,
lib, lib,
xan, xsv,
curl, curl,
gnused, gnused,
}: }:
writers.writeDashBin "literature-quote" '' writers.writeDashBin "literature-quote" ''
PATH=$PATH:${lib.makeBinPath [xan curl gnused]} PATH=$PATH:${lib.makeBinPath [xsv curl gnused]}
ROW=$(curl -Ls http://kmein.github.io/logotheca/quotes.csv | shuf -n1) ROW=$(curl -Ls http://kmein.github.io/logotheca/quotes.csv | shuf -n1)
( (
QUOTE="$(echo "$ROW" | xan select 3)" QUOTE="$(echo "$ROW" | xsv select 4)"
echo "$QUOTE" | sed 's/^"//;s/"$//;s/\s*||\s*/\n\n/g;s/\s*|\s*/\n/g' echo "$QUOTE" | sed 's/^"//;s/"$//;s/\s*||\s*/\n\n/g;s/\s*|\s*/\n/g'
echo echo
AUTHOR="$(echo "$ROW" | xan select 0)" AUTHOR="$(echo "$ROW" | xsv select 1)"
# Prepare the output # Prepare the output
ATTRIBUTION="($AUTHOR" ATTRIBUTION="($AUTHOR"
SOURCE="$(echo "$ROW" | xan select 1)" SOURCE="$(echo "$ROW" | xsv select 2)"
# Add SOURCE if it's not empty # Add SOURCE if it's not empty
if [ -n "$SOURCE" ]; then if [ -n "$SOURCE" ]; then
ATTRIBUTION="$ATTRIBUTION: $SOURCE" ATTRIBUTION="$ATTRIBUTION: $SOURCE"
fi fi
LOC="$(echo "$ROW" | xan select 2 | sed 's/""//;s/-//g')" LOC="$(echo "$ROW" | xsv select 3 | sed 's/""//;s/-//g')"
# Add LOC if it's not empty # Add LOC if it's not empty
if [ -n "$LOC" ]; then if [ -n "$LOC" ]; then
ATTRIBUTION="$ATTRIBUTION, $LOC" ATTRIBUTION="$ATTRIBUTION, $LOC"

View File

@@ -1,7 +1,7 @@
{ {
writers, writers,
lib, lib,
wofi, rofi,
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 [wofi findutils coreutils] lib.makeBinPath [rofi 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-
} | wofi -dmenu -i -p 'notes') } | rofi -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,7 +35,6 @@ neovim.override {
vimPlugins.nerdtree vimPlugins.nerdtree
vimPlugins.fzf-vim vimPlugins.fzf-vim
vimPlugins.fzfWrapper vimPlugins.fzfWrapper
vimPlugins.vim-fugitive
]; ];
}; };
} }

View File

@@ -1,18 +0,0 @@
{ 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

@@ -30,27 +30,10 @@
"that's a good song!" "that's a good song!"
"👍" "👍"
"vibin'" "vibin'"
"this is a jam!"
"absolutely love it!"
"such a vibe!"
"this track is fire!"
"feeling this one!"
"pure gold!"
"this is my jam!"
"so catchy!"
"on repeat!"
"this is a masterpiece!"
"let's dance!"
"I'm all in!"
"so gut!"
"mega!"
"ich fühl's!"
"das ist Musik für die Seele!"
]; ];
messages.bad = [ messages.bad = [
"how can anyone listen to this?" "how can anyone listen to this?"
"(°° " "(°° "
"skip this!" "skip this!"
"next, please! i'm suffering!" "next, please! i'm suffering!"
"that's just bad music" "that's just bad music"
@@ -60,40 +43,12 @@
"turn that down" "turn that down"
"make it stooop" "make it stooop"
"noooo" "noooo"
"this is painful to listen to"
"what is this noise?"
"not my cup of tea"
"this is a hard pass"
"yikes!"
"please no more"
"this is a disaster"
"I can't handle this"
"this is just wrong"
"let's skip this one"
"ugh, why?"
"definitely not a fan"
"wie kann man das hören?"
"das ist schrecklich!"
"bitte nicht!"
"das ist einfach schlecht"
"oh nein, nicht das!"
]; ];
messages.neutral = [ messages.neutral = [
"meh" "meh"
"i have no opinion about this song" "i have no opinion about this song"
"idk man" "idk man"
"it's okay"
"not bad, not great"
"just average"
"it's fine"
"i can take it or leave it"
"kann man hören"
"ist in ordnung"
"naja"
"nicht schlecht, nicht gut"
"ich kann damit leben"
"es ist was es ist"
]; ];
in in
writers.writeDashBin "pls" '' writers.writeDashBin "pls" ''

View File

@@ -1,9 +0,0 @@
{ writers, lib, todoman, khal, util-linux, wego, pass }:
writers.writeDashBin "q" ''
export PATH=$PATH:${lib.makeBinPath [todoman khal util-linux wego pass]}
(todo list --due 240; echo) &
(khal list today today; echo) &
(cal -3; echo) &
(wego -location Berlin -owm-api-key "$(pass api-keys/openweathermap)" -frontend emoji -days 2; echo) &
wait
''

View File

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

View File

@@ -1,47 +0,0 @@
{ writers, lib, gnused, curl, jq, yq }:
writers.writeBashBin "radio-news" ''
set -efu
PATH=$PATH:${lib.makeBinPath [gnused curl jq yq]}
EVENTS=$(
curl https://www.goodnewsnetwork.org/feed/ \
| xq '
.rss.channel.item
| map(select((.pubDate|strptime("%a, %d %b %Y %H:%M:%S %z")) as $date | ($date | mktime) > (now - (60 * 60 * 24))) | {title, description})
'
)
SYSTEM_PROMPT=$(cat <<EOF
You are a news anchor writing a short news digest for a radio broadcast.
Summarize the following news headlines into a cohesive, engaging script under 400 words.
Keep it professional, concise as possible, and easy to follow.
Please no unnecessary explanations why the news is good.
Begin the digest with: "Here's your good news update."
EOF
)
REQUEST=$(cat <<EOF
{
"system_instruction": {
"parts": [
{
"text": $(jq -Rs <<< "$SYSTEM_PROMPT")
}
]
},
"contents": [
{
"parts": [
{
"text": $(jq -Rs <<< "$EVENTS")
}
]
}
]
}
EOF
)
echo "$REQUEST" | curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b:generateContent?key=$GEMINI_API_KEY" -s -H "Content-Type: application/json" -d @-
''

View File

@@ -1,10 +1,10 @@
{ {
writers, writers,
wl-clipboard, xclip,
espeak, espeak,
}: }:
writers.writeDashBin "ttspaste" '' writers.writeDashBin "ttspaste" ''
${wl-clipboard}/bin/paste | ${espeak}/bin/espeak ${xclip}/bin/xclip -selection clipboard -out | ${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,
wl-clipboard, xclip,
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 wl-clipboard xdotool]} PATH=${lib.makeBinPath [coreutils dmenu gawk gnused libnotify xclip 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' | wl-copy echo "$chosen" | tr -d '\n' | xclip -selection clipboard
if [ -n "$1" ]; then if [ -n "$1" ]; then
xdotool key Shift+Insert xdotool key Shift+Insert

Submodule secrets updated: e14a3170cc...ae632b083f

View File

@@ -1,10 +1,13 @@
secrets/alertmanager-token-reporters.age secrets/alertmanager-token-reporters.age
secrets/cifs-credentials-hu-berlin.age
secrets/cifs-credentials-zodiac.age secrets/cifs-credentials-zodiac.age
secrets/di-fm-key.age secrets/di-fm-key.age
secrets/email-password-cock.age secrets/email-password-cock.age
secrets/email-password-dslalewa.age
secrets/email-password-fsklassp.age
secrets/email-password-fysi.age secrets/email-password-fysi.age
secrets/email-password-letos.age
secrets/email-password-meinhak99.age secrets/email-password-meinhak99.age
secrets/email-password-meinhaki.age
secrets/email-password-posteo.age secrets/email-password-posteo.age
secrets/fatteh-retiolum-privateKey-ed25519.age secrets/fatteh-retiolum-privateKey-ed25519.age
secrets/fatteh-retiolum-privateKey-rsa.age secrets/fatteh-retiolum-privateKey-rsa.age
@@ -16,7 +19,6 @@ secrets/ful-retiolum-privateKey-ed25519.age
secrets/ful-retiolum-privateKey-rsa.age secrets/ful-retiolum-privateKey-rsa.age
secrets/ful-root.age secrets/ful-root.age
secrets/fu-sftp-key.age secrets/fu-sftp-key.age
secrets/gemini-api-key.age
secrets/github-token-i3status-rust.age secrets/github-token-i3status-rust.age
secrets/grafana-password-admin.age secrets/grafana-password-admin.age
secrets/hetzner-storagebox-credentials.age secrets/hetzner-storagebox-credentials.age
@@ -28,10 +30,6 @@ secrets/kabsa-syncthing-key.age
secrets/kabsa-wireguard-aether-key.age secrets/kabsa-wireguard-aether-key.age
secrets/kabsa-wireguard-aether-psk.age secrets/kabsa-wireguard-aether-psk.age
secrets/kfm-password.age secrets/kfm-password.age
secrets/kibbeh-retiolum-privateKey-ed25519.age
secrets/kibbeh-retiolum-privateKey-rsa.age
secrets/kibbeh-syncthing-cert.age
secrets/kibbeh-syncthing-key.age
secrets/ledger-basicAuth.age secrets/ledger-basicAuth.age
secrets/makanek-retiolum-privateKey-ed25519.age secrets/makanek-retiolum-privateKey-ed25519.age
secrets/makanek-retiolum-privateKey-rsa.age secrets/makanek-retiolum-privateKey-rsa.age
@@ -41,8 +39,10 @@ secrets/manakish-syncthing-cert.age
secrets/manakish-syncthing-key.age secrets/manakish-syncthing-key.age
secrets/manakish-wireguard-aether-key.age secrets/manakish-wireguard-aether-key.age
secrets/manakish-wireguard-aether-psk.age secrets/manakish-wireguard-aether-psk.age
secrets/mastodon-token-autorenkalender.age
secrets/mastodon-token-celan.age secrets/mastodon-token-celan.age
secrets/mastodon-token-hesychius.age secrets/mastodon-token-hesychius.age
secrets/mastodon-token-logotheca.age
secrets/mastodon-token-nietzsche.age secrets/mastodon-token-nietzsche.age
secrets/mastodon-token-smyth.age secrets/mastodon-token-smyth.age
secrets/mastodon-token-tlgwotd.age secrets/mastodon-token-tlgwotd.age

View File

@@ -12,10 +12,8 @@ in {
./radio.nix ./radio.nix
./panoptikon.nix ./panoptikon.nix
./hledger.nix ./hledger.nix
./wallabag.nix
./alew.nix ./alew.nix
../../configs/monitoring.nix ../../configs/monitoring.nix
../../configs/mycelium.nix
../../configs/tor.nix ../../configs/tor.nix
../../configs/save-space.nix ../../configs/save-space.nix
../../configs/spacetime.nix ../../configs/spacetime.nix

View File

@@ -14,7 +14,7 @@
}; };
systemd.services.hledger-backup = { systemd.services.hledger-backup = {
enable = false; enable = true;
startAt = "hourly"; startAt = "hourly";
wants = ["network-online.target"]; wants = ["network-online.target"];
wantedBy = ["multi-user.target"]; wantedBy = ["multi-user.target"];

View File

@@ -1,44 +0,0 @@
{ pkgs, config, ... }:
let
domain = "pocket.kmein.de";
port = "8088";
dataPath = "/var/lib/wallabag";
in
{
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${port}";
proxyWebsockets = true;
};
extraConfig = ''
client_body_timeout 3000s;
client_header_timeout 3000s;
keepalive_timeout 3000s;
proxy_read_timeout 3000s;
proxy_connect_timeout 3000s;
proxy_send_timeout 3000s;
'';
};
services.restic.backups.niveum.paths = [ dataPath ];
virtualisation.oci-containers.containers."${domain}" = {
autoStart = true;
image = "wallabag/wallabag:2.6.12";
ports = [ "${port}:80" ];
volumes = [
"${dataPath}/data:/var/www/wallabag/data"
"${dataPath}/images:/var/www/wallabag/web/assets/images"
];
environment = {
SYMFONY__ENV__DOMAIN_NAME = "https://${domain}";
SYMFONY__ENV__FOSUSER_CONFIRMATION = "false";
PHP_MEMORY_LIMIT = "512M";
SYMFONY__ENV__SERVER_NAME = "Wallabag";
};
extraOptions = [ "--pull=always" ];
};
}

View File

@@ -1,18 +1,13 @@
{ {
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 ./hardware-configuration.nix
../../configs/tlp.nix ../../configs/tlp.nix
../../configs/default.nix ../../configs/default.nix
../../configs/networkmanager.nix ../../configs/networkmanager.nix
@@ -25,6 +20,8 @@ in
promptColours.success = "cyan"; promptColours.success = "cyan";
}; };
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml";
nix.settings = { nix.settings = {
cores = 1; cores = 1;
max-jobs = 2; max-jobs = 2;
@@ -50,15 +47,15 @@ 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;
}; };
system.stateVersion = "23.11"; system.stateVersion = "19.03";
} }

View File

@@ -1,97 +0,0 @@
{
config,
pkgs,
niveumPackages,
...
}:
{
imports = [
./hardware-configuration.nix
../../configs/spacetime.nix
../../configs/admin-essentials.nix
../../configs/keyboard.nix
../../configs/sound.nix
../../configs/printing.nix
../../configs/nix.nix
../../configs/flix.nix
../../configs/fonts.nix
../../configs/mycelium.nix
../../configs/retiolum.nix
../../configs/sshd.nix
../../configs/sudo.nix
../../configs/zsh.nix
../../configs/tor.nix
];
age.secrets = {
retiolum-rsa = {
file = ../../secrets/kibbeh-retiolum-privateKey-rsa.age;
mode = "400";
owner = "tinc-retiolum";
group = "tinc-retiolum";
};
retiolum-ed25519 = {
file = ../../secrets/kibbeh-retiolum-privateKey-ed25519.age;
mode = "400";
owner = "tinc-retiolum";
group = "tinc-retiolum";
};
};
services.gnome.gnome-keyring.enable = true;
security.pam.services.lightdm.enableGnomeKeyring = true;
services.openssh.enable = true;
networking.hostName = "kibbeh";
networking.networkmanager.enable = true;
i18n.defaultLocale = "en_DK.UTF-8";
services.xserver.enable = true;
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
# services.displayManager.autoLogin.enable = true;
# services.displayManager.autoLogin.user = config.users.users.me.name;
age.secrets = {
di-fm-key.file = ../../secrets/di-fm-key.age;
};
users.users.me = {
name = "kfm";
isNormalUser = true;
description = "ि";
extraGroups = [ "networkmanager" ];
password = "hackme";
packages = with pkgs; [
# packages TODO
firefox
thunderbird
alacritty
tor-browser-bundle-bin
zathura
okular
anki-bin
libreoffice
xournalpp
jellyfin-media-player
niveumPackages.mpv-tv
telegram-desktop
(niveumPackages.mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; })
niveumPackages.meteo
spotify
];
};
environment.systemPackages = with pkgs; [
htop
git
vim
tmux
(niveumPackages.vim.override { colorscheme = "base16-gruvbox-dark-medium"; })
];
system.stateVersion = "23.11";
}

View File

@@ -1,55 +0,0 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd = {
availableKernelModules = [
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
luks.devices."luks-16a8b3b0-5e0a-4d36-920c-eb6322a3c181".device =
"/dev/disk/by-uuid/16a8b3b0-5e0a-4d36-920c-eb6322a3c181";
luks.devices."luks-b3988d35-72a9-4e7c-992d-f500bb388554".device =
"/dev/disk/by-uuid/b3988d35-72a9-4e7c-992d-f500bb388554";
};
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/ecab6acb-66f1-41c9-8281-59c76cf8f0c6";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/8066-63C2";
fsType = "vfat";
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/8cebdb17-4f2e-4750-8e91-71aa942bdfde"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -15,7 +15,6 @@ in {
./monitoring ./monitoring
./names.nix ./names.nix
./nextcloud.nix ./nextcloud.nix
../../configs/mycelium.nix
./radio-news.nix ./radio-news.nix
./scrabble.nix ./scrabble.nix
# ./onlyoffice.nix # ./onlyoffice.nix

View File

@@ -1,45 +1,20 @@
{ config, ... }:
let let
inherit (import ../../lib) sshPort; inherit (import ../../lib) sshPort;
domain = "code.kmein.de"; domain = "https://code.kmein.de";
in { in {
services.anubis = {
defaultOptions.settings = {
USER_DEFINED_DEFAULT = true;
};
instances = {
"gitea".settings = {
TARGET = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
USER_DEFINED_INSTANCE = true;
OG_PASSTHROUGH = true;
SERVE_ROBOTS_TXT = true;
};
};
};
users.users.nginx.extraGroups = [ config.services.anubis.instances."gitea".group ];
services.gitea = { services.gitea = {
enable = true; enable = true;
appName = domain; appName = "code.kmein.de";
settings = { settings = {
server.ROOT_URL = "https://${domain}"; server.ROOT_URL = domain;
server.DOMAIN = domain;
server.SSH_PORT = sshPort; server.SSH_PORT = sshPort;
service.DISABLE_REGISTRATION = true; service.DISABLE_REGISTRATION = true;
}; };
}; };
services.nginx.virtualHosts.${domain} = { services.nginx.virtualHosts."code.kmein.de" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
# locations."/".extraConfig = "proxy_pass http://localhost:3000;"; locations."/".extraConfig = "proxy_pass http://localhost:3000;";
locations = {
"/" = {
proxyPass = "http://unix:${config.services.anubis.instances."gitea".settings.BIND}";
proxyWebsockets = true;
};
"/metrics".proxyPass = "http://unix:${config.services.anubis.instances."gitea".settings.METRICS_BIND}";
};
}; };
niveum.passport.services = [ niveum.passport.services = [

View File

@@ -47,7 +47,7 @@ in {
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud31; package = pkgs.nextcloud30;
https = true; https = true;

View File

@@ -1,8 +1,6 @@
{ {
config,
pkgs, pkgs,
lib, lib,
niveumPackages,
... ...
}: let }: let
inherit (import ../../lib) serveHtml; inherit (import ../../lib) serveHtml;
@@ -10,30 +8,6 @@
in { in {
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml ../../lib/radio-news.html pkgs; services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml ../../lib/radio-news.html pkgs;
age.secrets = {
gemini-api-key.file = ../../secrets/gemini-api-key.age;
};
systemd.services.news-digest = {
enable = true;
wantedBy = ["multi-user.target"];
wants = ["network-online.target"];
serviceConfig.LoadCredential = [
"gemini-api-key:${config.age.secrets.gemini-api-key.path}"
];
startAt = "*:50";
script = ''
PATH=$PATH:${lib.makeBinPath [pkgs.gnused pkgs.curl pkgs.jq]}
GEMINI_API_KEY="$(cat "$CREDENTIALS_DIRECTORY/gemini-api-key")" ${niveumPackages.radio-news}/bin/radio-news | jq --arg from "$(date -u -Is | sed 's/+00:00/Z/')" --arg to "$(date -u -Is -d 'now + 30 minutes' | sed 's/+00:00/Z/')" '
{
from: $from,
to: $to,
text: .candidates[].content.parts[].text
}' | curl -s -X POST http://radio-news.r -H "Content-Type: application/json" -d @-
'';
};
niveum.passport.services = [ niveum.passport.services = [
{ {
title = "Retiolum Radio News"; title = "Retiolum Radio News";

View File

@@ -1,210 +0,0 @@
{ lib, pkgs, config, unstablePackages, ... }:
let
inherit (import ../../lib) kieran;
weechatHome = "/var/lib/weechat";
weechat-declarative =
pkgs.callPackage ../../packages/weechat-declarative.nix {
inherit unstablePackages;
};
in {
systemd.services.weechat = let
tmux = pkgs.writers.writeDash "tmux" ''
exec ${pkgs.tmux}/bin/tmux -f ${
pkgs.writeText "tmux.conf" ''
set-option -g prefix `
unbind-key C-b
bind ` send-prefix
set-option -g status off
set-option -g default-terminal screen-256color
#use session instead of windows
bind-key c new-session
bind-key p switch-client -p
bind-key n switch-client -n
bind-key C-s switch-client -l
''
} "$@"
'';
weechat = weechat-declarative.override {
config = {
scripts = [
pkgs.weechatScripts.weechat-autosort
pkgs.weechatScripts.colorize_nicks
# pkgs.weechatScripts.weechat-matrix
(pkgs.callPackage ../../packages/weechatScripts/hotlist2extern.nix
{ })
];
settings = let nick = "kmein";
in {
weechat = {
look.mouse = true;
look.prefix_align_max = 15;
color.chat_nick_colors =
lib.lists.subtractLists (lib.range 52 69 ++ lib.range 231 248)
(lib.range 31 254);
};
irc = {
look = {
server_buffer = "independent";
color_nicks_in_nicklist = true;
};
server_default = {
nicks = nick;
msg_part = "tschö mit ö";
msg_quit = "ciao kakao";
msg_kick = "warum machst du diese?";
realname = lib.head (lib.strings.split " " kieran.name);
};
server = {
hackint = {
autoconnect = true;
addresses = "irc.hackint.org/6697";
ipv6 = true;
tls = true;
autojoin = [ "#eloop" "#krebs" "#the_playlist" ];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = "\${sec.data.hackint_sasl}";
};
libera = {
autoconnect = true;
addresses = "irc.libera.chat/6697";
tls = true;
autojoin = [ "#haskell" "#fysi" "#binaergewitter" "#vim" ];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = "\${sec.data.libera_sasl}";
};
retiolum = {
autoconnect = true;
addresses = "irc.r";
tls = false;
autojoin = [ "#xxx" "#brockman" "#flix" ];
command = lib.concatStringsSep "\\;" [
"/oper admin aidsballs"
"/msg nickserv always-on true"
"/msg nickserv autoreplay-missed on"
"/msg nickserv auto-away"
];
sasl_mechanism = "plain";
sasl_username = nick;
sasl_password = "\${sec.data.retiolum_sasl}";
};
brockman = {
autoconnect = true;
addresses = "brockman.news/6667";
tls = false;
autojoin = [ "#cook" "#kmeinung" ];
sasl_username = nick;
sasl_password = "\${sec.data.brockman_sasl}";
sasl_mechanism = "plain";
};
};
};
logger.level.irc.news = 0;
plugins.var.perl.hotlist2extern = {
external_command_hotlist = "echo %X > ${weechatHome}/hotlist.txt";
external_command_hotlist_empty =
"echo -n %X > ${weechatHome}/hotlist.txt";
lowest_priority = "2";
use_title = "off";
delimiter = ",";
};
matrix.look.server_buffer = "merge_without_core";
matrix.server.nibbana = {
address = "nibbana.jp";
username = nick;
password = "\${sec.data.nibbana_account}";
autoconnect = true;
};
alias.cmd.mod = "/quote omode $channel +o $nick";
relay = {
port.weechat = 9000;
network.password = "\${sec.data.relay_password}";
};
filters = {
zerocovid = {
buffer = "irc.news.*";
tags = "*";
regex =
"[kc]orona|💉|🤒|😷|[kc]ovid|virus|lockdown|va[kc][sc]in|vaxx|mutante|mutation|impf|pandemi|κορ[ωο]ν[αο]ϊό|корона|expert|infe[ck]t|infizi|in[cz]iden[cz]|sars-cov|drosten|virolog|lauterbach|delta|omi[ck]ron|epidemi|booster|r-wert";
};
smart = {
buffer = "*";
tags = "irc_smart_filter";
regex = "*";
};
playlist_topic = {
buffer = "irc.*.#the_playlist";
tags = "irc_topic";
regex = "*";
};
brockman_notice = {
buffer = "irc.news.*";
tags = "irc_notice";
regex = "*";
};
bots = {
buffer = "irc.retiolum.*";
tags = [ "nick_gitlab" "nick_prometheus" ];
regex = "*";
};
people = {
buffer = "irc.*.*";
tags = map (name: "nick_${name}") [ "mod_p[matrix-fli" ];
regex = "*";
};
};
};
extraCommands = ''
/save
/connect -all
'';
# /matrix connect nibbana
};
};
in {
description = "Weechat bouncer";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartIfChanged = true;
path = [ pkgs.alacritty.terminfo ];
environment.WEECHAT_HOME = weechatHome;
# preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf";
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
preStop = "${tmux} kill-session -t IM";
serviceConfig = {
User = "weechat";
Group = "weechat";
RemainAfterExit = true;
Type = "oneshot";
};
};
users.groups.weechat = { };
users.extraUsers.weechat = {
useDefaultShell = true;
openssh.authorizedKeys.keys = kieran.sshKeys ++ [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@kibbeh"
];
createHome = true;
group = "weechat";
home = "/var/lib/weechat";
isSystemUser = true;
packages = [ pkgs.tmux ];
};
age.secrets.weechat-sec = {
file = ../../secrets/weechat-sec.conf.age;
path = "/var/lib/weechat/sec.conf";
owner = "weechat";
group = "weechat";
mode = "440";
};
niveum.passport.services = [{
title = "weechat bouncer";
description = "keeps me logged in on IRC.";
}];
}

View File

@@ -12,8 +12,8 @@ in {
./hdmi.nix ./hdmi.nix
../../configs/default.nix ../../configs/default.nix
../../configs/tlp.nix ../../configs/tlp.nix
../../configs/wpa_supplicant.nix
../../configs/admin-essentials.nix ../../configs/admin-essentials.nix
../../configs/networkmanager.nix
../../configs/power-action.nix ../../configs/power-action.nix
]; ];

View File

@@ -12,7 +12,6 @@ in {
./gaslight.nix ./gaslight.nix
./hardware-configuration.nix ./hardware-configuration.nix
./nas.nix ./nas.nix
../../configs/mycelium.nix
./home-assistant.nix ./home-assistant.nix
../../configs/monitoring.nix ../../configs/monitoring.nix
../../configs/retiolum.nix ../../configs/retiolum.nix
@@ -82,7 +81,6 @@ in {
pkgs.vim pkgs.vim
pkgs.htop pkgs.htop
pkgs.ncmpcpp pkgs.ncmpcpp
pkgs.python3 # for sshuttle
]; ];
# since 22.05 timeout fails? # since 22.05 timeout fails?