mirror of
https://github.com/kmein/niveum
synced 2026-03-19 11:31:09 +01:00
Compare commits
85 Commits
ffe9f90b4e
...
wayland
| Author | SHA1 | Date | |
|---|---|---|---|
| b274a59a50 | |||
| b4de03bb3c | |||
| b0062abbfe | |||
| 0e9a046c5f | |||
| 72ab319e65 | |||
| f08e43067b | |||
| d0ac0af7c3 | |||
| 5febabb7fa | |||
| 44d29f90e9 | |||
| 1aaf0fe5ae | |||
| e8e165ff03 | |||
| 5175bd5f4a | |||
| 874c502094 | |||
| 4490c0a97c | |||
|
|
8e76899b40 | ||
| 8617c8e982 | |||
| 0025d82cd8 | |||
| 03c0e49572 | |||
| 7c3c13abb8 | |||
| f954e867dc | |||
| 67f682aa88 | |||
| 0ceecf4c14 | |||
| 6fdac40832 | |||
| 2ba3c05e4a | |||
| 6ab7e96894 | |||
| ddd759a838 | |||
| 5244ae3850 | |||
| b90aa5ef07 | |||
| d52c10bc84 | |||
| a6bc317141 | |||
| d4ee3cf692 | |||
| c96ac804df | |||
| 4af218f7ad | |||
| b08576c972 | |||
| 44cb0bf8a5 | |||
| 4c9305c89d | |||
| 8c838966f2 | |||
| 6ffb80322b | |||
| 6e1bbb878a | |||
| 4a1abf06f6 | |||
| e9a6a482ee | |||
| 3bdf539540 | |||
| f053f6292d | |||
| e350eac5c7 | |||
| 046f2ca75d | |||
| 6fcba6dc75 | |||
| 3750b6c131 | |||
| 4046339f5b | |||
| da224a0e4b | |||
| 60a73a81be | |||
| 889eb1d5c2 | |||
|
|
e34b3e02b3 | ||
| d7f01e0a5e | |||
| 6ea3629f77 | |||
| b010f7e7cc | |||
| 0b60f953b7 | |||
| d64ce2036a | |||
| ebe3997beb | |||
| 1b23814dc3 | |||
| df35d1d935 | |||
| b01c289a26 | |||
| dafa3229bb | |||
| dee784472f | |||
| 295f8257e3 | |||
| 5adc8309f2 | |||
| cd58ea209e | |||
| 0ae493a0f5 | |||
| c0f6fc1121 | |||
| dc519dc055 | |||
| 4d178f7bb8 | |||
| c0ba0e605a | |||
| 4620390411 | |||
| a18e295a9e | |||
| f3ae88c6d1 | |||
| d08ed06bc5 | |||
| b648661e60 | |||
| b26b48034c | |||
| 6acfa2927c | |||
| 914a464e4f | |||
| 505031d103 | |||
| b5927a5217 | |||
| 5c87fd6cd4 | |||
| dbb5fe131e | |||
| 89cd81b2f4 | |||
| 2c58405314 |
4
.github/workflows/niveum.yml
vendored
4
.github/workflows/niveum.yml
vendored
@@ -11,7 +11,9 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install QEMU (ARM)
|
||||
run: sudo apt-get install -y qemu-user-static
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y qemu-user-static
|
||||
if: ${{ matrix.system == 'ful' }}
|
||||
- name: Install Nix (ARM)
|
||||
uses: cachix/install-nix-action@v16
|
||||
|
||||
@@ -15,6 +15,7 @@ in {
|
||||
pkgs.unzip
|
||||
pkgs.unrar
|
||||
pkgs.p7zip
|
||||
pkgs.sshuttle
|
||||
pkgs.zip
|
||||
# MONITORS
|
||||
pkgs.iftop # interface bandwidth monitor
|
||||
@@ -52,6 +53,22 @@ in {
|
||||
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
|
||||
take = pkgs.writers.writeDash "take" ''
|
||||
mkdir "$1" && cd "$1"
|
||||
|
||||
@@ -14,6 +14,12 @@ in {
|
||||
group = config.users.users.me.group;
|
||||
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 = {
|
||||
file = ../secrets/email-password-posteo.age;
|
||||
owner = config.users.users.me.name;
|
||||
@@ -79,9 +85,24 @@ in {
|
||||
address = "2210@cock.li";
|
||||
userName = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
|
||||
realName = "";
|
||||
realName = "2210";
|
||||
imap.host = "mail.cock.li";
|
||||
imap.port = 993;
|
||||
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 =
|
||||
lib.recursiveUpdate defaults
|
||||
|
||||
@@ -1,58 +1,8 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: 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 {
|
||||
environment.variables.TERMINAL = "alacritty";
|
||||
|
||||
|
||||
@@ -6,9 +6,5 @@
|
||||
};
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
# environment.systemPackages = [pkgs.blueman];
|
||||
|
||||
home-manager.users.me = {services.blueman-applet.enable = true;};
|
||||
environment.systemPackages = [ pkgs.bluetuith ];
|
||||
}
|
||||
|
||||
@@ -3,12 +3,7 @@
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
celan = pkgs.fetchzip {
|
||||
url = "http://c.krebsco.de/celan.tar.gz";
|
||||
sha256 = "sha256-nA+EwAH2vkeolsy9AoPLEMt1uGKDZe/aPrS95CZvuus=";
|
||||
};
|
||||
in {
|
||||
}: {
|
||||
niveum.bots.celan = {
|
||||
enable = true;
|
||||
time = "08:00";
|
||||
@@ -22,28 +17,49 @@ in {
|
||||
tokenFile = config.age.secrets.mastodon-token-celan.path;
|
||||
language = "de";
|
||||
};
|
||||
command = toString (pkgs.writers.writeDash "random-celan" ''
|
||||
cd ${celan}
|
||||
poem="$(${pkgs.findutils}/bin/find . -type f | ${pkgs.coreutils}/bin/shuf -n1)"
|
||||
source="$(${pkgs.coreutils}/bin/dirname "$poem" \
|
||||
| ${pkgs.gnused}/bin/sed 's#^\./##;s/[-_]/ /g;s!/! › !g;s/0\([0-9]\+\)/\1/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Der Sand aus den Urnen/#Der_Sand_aus_den_Urnen (1948)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Mohn und Gedächtnis/#Mohn_und_Gedächtnis (1952)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Von Schwelle zu Schwelle/#Von_Schwelle_zu_Schwelle (1955)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Sprachgitter/#& (1959)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Niemandsrose/#& (1963)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Atemwende/#& (1967)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Fadensonnen/#& (1968)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Lichtzwang/#& (1970)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Schneepart/#& (1971)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Zeitgehöft/#& (1976)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Frühwerk/#& (1989)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Eingedunkelt/#& (1991)/g' \
|
||||
| ${pkgs.gnused}/bin/sed 's/Nachlaß/#& (1997)/g'
|
||||
)"
|
||||
cat "$poem"
|
||||
echo
|
||||
printf "Aus: %s\n\n#PaulCelan #Celan #Lyrik #poetry" "$source"
|
||||
command = toString (pkgs.writers.writePython3 "random-celan.py" { libraries = [pkgs.python3Packages.lxml]; } ''
|
||||
from lxml import etree
|
||||
import random
|
||||
|
||||
|
||||
def xml_text(elements):
|
||||
return "".join("".join(t.itertext()) for t in elements).strip()
|
||||
|
||||
|
||||
tree = etree.parse('${pkgs.fetchurl {
|
||||
url = "http://c.krebsco.de/celan.tei.xml";
|
||||
hash = "sha256-HgNmJYfhuwyfm+FcNtnnYWpJpIIU1ElHLeLiIFjF9mE=";
|
||||
}}')
|
||||
root = tree.getroot()
|
||||
|
||||
tei = {"tei": "http://www.tei-c.org/ns/1.0"}
|
||||
|
||||
poems = root.xpath(".//tei:lg[@type='poem']", namespaces=tei)
|
||||
|
||||
poem = random.choice(poems)
|
||||
|
||||
for stanza in poem.xpath("./tei:lg[@type='stanza']", namespaces=tei):
|
||||
for line in stanza.xpath('./tei:l', namespaces=tei):
|
||||
if line.text:
|
||||
print(line.text.strip())
|
||||
print()
|
||||
|
||||
current_element = poem
|
||||
while current_element is not None:
|
||||
if current_element.tag == "{http://www.tei-c.org/ns/1.0}text":
|
||||
text_element = current_element
|
||||
|
||||
title = xml_text(text_element.xpath("./tei:front/tei:docTitle",
|
||||
namespaces=tei))
|
||||
print(f"Aus: #{title.replace(" ", "_")}", end=" ")
|
||||
|
||||
if date := xml_text(text_element.xpath("./tei:front/tei:docDate",
|
||||
namespaces=tei)):
|
||||
print(f"({date})")
|
||||
break
|
||||
current_element = current_element.getparent()
|
||||
|
||||
print("\n\n#PaulCelan #Celan #Lyrik #poetry")
|
||||
'');
|
||||
};
|
||||
|
||||
|
||||
@@ -42,8 +42,9 @@ in {
|
||||
|
||||
#ancientgreek #classics #wotd #wordoftheday
|
||||
|
||||
transliteration=$(${pkgs.writers.writePython3 "translit.py" {
|
||||
libraries = [ niveumPackages.cltk ];
|
||||
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
|
||||
libraries = [ pkgs.python3Packages.cltk ];
|
||||
} ''
|
||||
import sys
|
||||
from cltk.phonology.grc.transcription import Transcriber
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) tmpfilesConfig;
|
||||
in {
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
niveumPackages.cro
|
||||
pkgs.tor-browser-bundle-bin
|
||||
pkgs.firefox
|
||||
pkgs.brave
|
||||
];
|
||||
|
||||
home-manager.users.me = {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
@@ -6,6 +6,16 @@
|
||||
}: let
|
||||
inherit (import ../lib) tmpfilesConfig;
|
||||
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 [
|
||||
{
|
||||
type = "d";
|
||||
|
||||
@@ -6,23 +6,25 @@
|
||||
unstablePackages,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import ../lib) localAddresses kieran remoteDir;
|
||||
defaultApplications = (import ../lib).defaultApplications {inherit pkgs;};
|
||||
in {
|
||||
defaultApplications = (import ../lib).defaultApplications { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.self.nixosModules.system-dependent
|
||||
inputs.self.nixosModules.power-action
|
||||
{
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
}
|
||||
{
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
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 = [
|
||||
"qtwebkit-5.212.0-alpha4"
|
||||
@@ -63,17 +65,6 @@ in {
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.capitaine-cursors
|
||||
];
|
||||
|
||||
stylix.cursor = {
|
||||
name = "capitaine-cursors-white";
|
||||
package = pkgs.capitaine-cursors;
|
||||
size = 12;
|
||||
};
|
||||
}
|
||||
{
|
||||
users.mutableUsers = false;
|
||||
|
||||
@@ -85,7 +76,10 @@ in {
|
||||
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
extraGroups = ["pipewire" "audio"];
|
||||
extraGroups = [
|
||||
"pipewire"
|
||||
"audio"
|
||||
];
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [ config.users.users.me.name ];
|
||||
@@ -98,25 +92,27 @@ in {
|
||||
}
|
||||
{
|
||||
environment.interactiveShellInit = "export PATH=$PATH";
|
||||
environment.shellAliases = let
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
ns = "nix-shell --run zsh";
|
||||
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
|
||||
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
|
||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
||||
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
|
||||
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
|
||||
};
|
||||
environment.shellAliases =
|
||||
let
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
in
|
||||
{
|
||||
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
ns = "nix-shell --run zsh";
|
||||
pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
||||
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 = {
|
||||
defaultLocale = "en_DK.UTF-8";
|
||||
supportedLocales = ["all"];
|
||||
supportedLocales = [ "all" ];
|
||||
};
|
||||
}
|
||||
{
|
||||
@@ -132,33 +128,23 @@ in {
|
||||
enable = true;
|
||||
greeters.gtk = {
|
||||
enable = true;
|
||||
indicators = ["~spacer" "~host" "~spacer" "~session" "~power"];
|
||||
indicators = [
|
||||
"~spacer"
|
||||
"~host"
|
||||
"~spacer"
|
||||
"~session"
|
||||
"~power"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
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.command-not-found.enable = true; }
|
||||
{
|
||||
programs.gnupg = {
|
||||
agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-rofi;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
settings = rec {
|
||||
default-cache-ttl = 2 * 60 * 60;
|
||||
max-cache-ttl = 4 * default-cache-ttl;
|
||||
@@ -168,7 +154,11 @@ in {
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.gnupg
|
||||
(pkgs.pass.withExtensions (e: [e.pass-otp e.pass-import e.pass-genphrase]))
|
||||
(pkgs.pass.withExtensions (e: [
|
||||
e.pass-otp
|
||||
e.pass-import
|
||||
e.pass-genphrase
|
||||
]))
|
||||
];
|
||||
}
|
||||
{
|
||||
@@ -181,12 +171,10 @@ in {
|
||||
};
|
||||
}
|
||||
{
|
||||
networking.hosts =
|
||||
lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = ["${name}.local"];
|
||||
})
|
||||
localAddresses;
|
||||
networking.hosts = lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = [ "${name}.local" ];
|
||||
}) localAddresses;
|
||||
}
|
||||
{
|
||||
home-manager.users.me.home.stateVersion = "22.05";
|
||||
@@ -194,9 +182,9 @@ in {
|
||||
}
|
||||
{
|
||||
systemd.user.services.udiskie = {
|
||||
after = ["udisks2.service"];
|
||||
wants = ["udisks2.service"];
|
||||
wantedBy = ["graphical-session.target"];
|
||||
after = [ "udisks2.service" ];
|
||||
wants = [ "udisks2.service" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.udiskie}/bin/udiskie --verbose --no-config --notify";
|
||||
};
|
||||
@@ -234,12 +222,14 @@ in {
|
||||
./hledger.nix
|
||||
./htop.nix
|
||||
./fu-berlin.nix
|
||||
./fysi.nix
|
||||
./i3.nix
|
||||
./niri.nix
|
||||
./i3status-rust.nix
|
||||
./keyboard.nix
|
||||
./mycelium.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
|
||||
./mpv.nix
|
||||
./mime.nix
|
||||
@@ -267,6 +257,11 @@ in {
|
||||
./watson.nix
|
||||
./wallpaper.nix
|
||||
./zsh.nix
|
||||
{
|
||||
home-manager.users.me.home.file.".zshrc".text = ''
|
||||
# nothing to see here
|
||||
'';
|
||||
}
|
||||
./tor.nix
|
||||
./stw-berlin.nix
|
||||
./mastodon-bot.nix
|
||||
@@ -298,7 +293,7 @@ in {
|
||||
download = "${config.users.users.me.home}/sync/Downloads";
|
||||
music = "${config.users.users.me.home}/mobile/audio";
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
}: {
|
||||
home-manager.users.me = {
|
||||
services.flameshot = {
|
||||
package = pkgs.flameshot.override { enableWlrSupport = true; };
|
||||
enable = true;
|
||||
settings.General = {
|
||||
autoCloseIdleDaemon = true;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
@@ -22,12 +23,7 @@
|
||||
|
||||
egyptianHiero = zip-font "EgyptianHiero" {
|
||||
url = "https://github.com/MKilani/Djehuty/archive/master.zip";
|
||||
sha256 = "sha256-KbY4vedm757NWfDlgmNhslbZd+2Vs+o5PjtMMGDt61Y=";
|
||||
};
|
||||
brill = zip-font "Brill" {
|
||||
url = "https://brill.com/fileasset/The_Brill_Typeface_Package_v_4_0.zip";
|
||||
stripRoot = false;
|
||||
hash = "sha256-ugmEIkeBzD/4C9wkVfbctEtnzI8Kw+YD6KGcbk4BAf4=";
|
||||
sha256 = "sha256-S3vZxdeBj57KJsF+zaZw7sQw8T+z1aVC2CnpnZ0/x2c=";
|
||||
};
|
||||
antinoou = zip-font "Antinoou" {
|
||||
url = "https://www.evertype.com/fonts/coptic/AntinoouFont.zip";
|
||||
@@ -92,7 +88,7 @@ in {
|
||||
newGardiner
|
||||
junicode
|
||||
koineGreek
|
||||
brill
|
||||
# brill
|
||||
ezra-sil
|
||||
fira
|
||||
font-awesome
|
||||
@@ -112,6 +108,7 @@ in {
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
nerd-fonts.blex-mono
|
||||
roboto-slab
|
||||
scheherazade-new
|
||||
source-code-pro
|
||||
@@ -124,10 +121,10 @@ in {
|
||||
zilla-slab
|
||||
]; # google-fonts league-of-moveable-type
|
||||
fontconfig.defaultFonts = rec {
|
||||
monospace = ["Noto Sans Mono"] ++ emoji;
|
||||
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
|
||||
sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic"];
|
||||
emoji = ["Noto Color Emoji"];
|
||||
monospace = [config.stylix.fonts.monospace.name] ++ emoji;
|
||||
serif = [config.stylix.fonts.serif.name "Scheherazade New" "Ezra SIL" "Antinoou" "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"];
|
||||
emoji = [config.stylix.fonts.emoji.name];
|
||||
};
|
||||
# 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
|
||||
|
||||
@@ -131,7 +131,10 @@ in {
|
||||
(pkgs.writers.writeDashBin "fu-vpn" ''
|
||||
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
|
||||
then
|
||||
${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --useragent=AnyConnect
|
||||
# root firefox will not open login window unless root owns Xauthority
|
||||
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
|
||||
'')
|
||||
];
|
||||
|
||||
@@ -6,37 +6,36 @@
|
||||
...
|
||||
}: let
|
||||
dashboard = pkgs.writers.writeDashBin "dashboard" ''
|
||||
${pkgs.alacritty}/bin/alacritty --class wtf --command ${pkgs.writers.writeDash "dashboard-inner" ''
|
||||
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
|
||||
${pkgs.alacritty}/bin/alacritty --option font.size=4 --class dashboard --command ${pkgs.writers.writeDash "dashboard-inner" ''
|
||||
exec ${pkgs.procps}/bin/watch -c -n 10 ${niveumPackages.q}/bin/q
|
||||
''}
|
||||
'';
|
||||
inherit (import ../lib) defaultApplications;
|
||||
klem = niveumPackages.klem.override {
|
||||
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
config.scripts = {
|
||||
"p.r" = pkgs.writers.writeDash "p.r" ''
|
||||
"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 host" = pkgs.writers.writeDash "envs-host" ''
|
||||
# ${pkgs.curl}/bin/curl -F "file=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||
# '';
|
||||
"envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" ''
|
||||
${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||
"envs.sh paste" = pkgs.writers.writeDash "envs-host" ''
|
||||
${pkgs.curl}/bin/curl -F "file=@-" https://envs.sh
|
||||
'';
|
||||
# this segfaults
|
||||
# "envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" ''
|
||||
# ${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||
# '';
|
||||
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
|
||||
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||
'';
|
||||
"ix.io" = pkgs.writers.writeDash "ix.io" ''
|
||||
${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io
|
||||
'';
|
||||
"go.r" = pkgs.writers.writeDash "go.r" ''
|
||||
"go.r shorten" = pkgs.writers.writeDash "go.r" ''
|
||||
${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)"
|
||||
'';
|
||||
"0x0.st" = pkgs.writers.writeDash "0x0.st" ''
|
||||
"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" ''
|
||||
@@ -309,7 +308,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 "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}"
|
||||
|
||||
assign [class="wtf"] ${infoWorkspace}
|
||||
assign [class="dashboard"] ${infoWorkspace}
|
||||
exec ${dashboard}/bin/dashboard
|
||||
'';
|
||||
config = lib.mkMerge [
|
||||
|
||||
@@ -55,7 +55,9 @@
|
||||
}
|
||||
{
|
||||
block = "battery";
|
||||
device = config.niveum.batteryName;
|
||||
format = "$icon $percentage $time";
|
||||
device = "DisplayDevice";
|
||||
driver = "upower";
|
||||
}
|
||||
{
|
||||
block = "sound";
|
||||
|
||||
@@ -7,18 +7,19 @@
|
||||
commaSep = builtins.concatStringsSep ",";
|
||||
xkbOptions = ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
|
||||
languages = {
|
||||
deutsch = { code = "de"; variant = "T3"; };
|
||||
greek = { code = "gr"; variant = "polytonic"; };
|
||||
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;
|
||||
coptic = ../lib/keyboards/coptic;
|
||||
deutsch = { code = "de"; variant = "T3"; };
|
||||
farsi = { code = "ir"; variant = "qwerty"; };
|
||||
sanskrit = { code = "in"; variant = "san-kagapa"; };
|
||||
gothic = ../lib/keyboards/gothic;
|
||||
greek = { code = "gr"; variant = "polytonic"; };
|
||||
gujarati = {code = "in"; variant = "guj-kagapa"; };
|
||||
urdu = {code = "in"; variant = "urd-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;
|
||||
in {
|
||||
@@ -26,28 +27,33 @@ in {
|
||||
|
||||
# man 7 xkeyboard-config
|
||||
services.xserver = {
|
||||
exportConfiguration = true; # link /usr/share/X11 properly
|
||||
# exportConfiguration = true; # link /usr/share/X11 properly
|
||||
xkb.layout = defaultLanguage.code;
|
||||
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
|
||||
# buckwalter: http://www.qamus.org/transliteration.htm
|
||||
xkb.variant = defaultLanguage.variant;
|
||||
xkb.options = commaSep xkbOptions;
|
||||
xkb.dir = pkgs.symlinkJoin {
|
||||
name = "x-keyboard-directory";
|
||||
paths = [
|
||||
"${pkgs.xkeyboard_config}/etc/X11/xkb"
|
||||
(pkgs.linkFarm "custom-x-keyboards" (
|
||||
lib.mapAttrsToList (name: value: {
|
||||
name = "symbols/${name}";
|
||||
path = value;
|
||||
}) (lib.filterAttrs (_: value: !(value ? "code")) languages) ++ [
|
||||
{
|
||||
name = "symbols/ir";
|
||||
path = ../lib/keyboards/farsi;
|
||||
}
|
||||
]
|
||||
))
|
||||
];
|
||||
xkb.extraLayouts = {
|
||||
"coptic" = {
|
||||
languages = ["cop"];
|
||||
description = "Coptic";
|
||||
symbolsFile = ../lib/keyboards/coptic;
|
||||
};
|
||||
"gothic" = {
|
||||
languages = ["got"];
|
||||
description = "Gothic";
|
||||
symbolsFile = ../lib/keyboards/gothic;
|
||||
};
|
||||
"avestan" = {
|
||||
languages = ["ave"];
|
||||
description = "Avestan";
|
||||
symbolsFile = ../lib/keyboards/avestan;
|
||||
};
|
||||
"farsi-good" = {
|
||||
languages = ["fas"];
|
||||
description = "Farsi, but good";
|
||||
symbolsFile = ../lib/keyboards/farsi;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -65,7 +71,16 @@ in {
|
||||
pkgs.writers.writeDashBin "kb-${language}" ''
|
||||
${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
|
||||
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
||||
|
||||
@@ -36,7 +36,7 @@ in {
|
||||
"Alt+j" = "add video-pan-y -0.05";
|
||||
};
|
||||
scripts = [
|
||||
pkgs.mpvScripts.quality-menu
|
||||
# pkgs.mpvScripts.quality-menu
|
||||
niveumPackages.mpv-visualizer
|
||||
];
|
||||
};
|
||||
|
||||
15
configs/mycelium.nix
Normal file
15
configs/mycelium.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ 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;
|
||||
}
|
||||
@@ -38,7 +38,7 @@
|
||||
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
||||
(niveumPackages.vim.override {
|
||||
stylixColors = config.lib.stylix.colors;
|
||||
colorscheme = if config.networking.hostName == "fatteh" then "base16-grayscale-light" else "base16-grayscale-dark";
|
||||
# colorscheme = "base16-gruvbox-light-medium";
|
||||
})
|
||||
|
||||
# language servers
|
||||
@@ -46,6 +46,7 @@
|
||||
pkgs.haskellPackages.haskell-language-server
|
||||
pkgs.texlab
|
||||
pkgs.nil
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.rust-analyzer
|
||||
pkgs.nodePackages.typescript-language-server
|
||||
pkgs.lua-language-server
|
||||
|
||||
46
configs/neovim.sync-conflict-20250130-092404-AJVBWR2.nix
Normal file
46
configs/neovim.sync-conflict-20250130-092404-AJVBWR2.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{ 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
|
||||
];
|
||||
}
|
||||
445
configs/niri.nix
Normal file
445
configs/niri.nix
Normal 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 = { };
|
||||
}
|
||||
@@ -65,7 +65,6 @@ in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# INTERNET
|
||||
aria2
|
||||
firefox
|
||||
tdesktop
|
||||
whois
|
||||
dnsutils
|
||||
@@ -74,6 +73,7 @@ in {
|
||||
pcmanfm
|
||||
# MEDIA
|
||||
ffmpeg
|
||||
simplescreenrecorder
|
||||
imagemagick
|
||||
exiftool
|
||||
nsxiv
|
||||
@@ -86,7 +86,7 @@ in {
|
||||
gcc
|
||||
python3Packages.jsonschema # json validation
|
||||
pup # html toolkit
|
||||
xsv # csv toolkit
|
||||
xan # csv toolkit
|
||||
magic-wormhole-rs # file transfer
|
||||
man-pages
|
||||
man-pages-posix
|
||||
@@ -95,9 +95,10 @@ in {
|
||||
gnome-disk-utility
|
||||
arandr # xrandr for noobs
|
||||
libnotify # for notify-send
|
||||
xclip # clipboard CLI
|
||||
wl-clipboard # clipboard CLI
|
||||
xdragon # drag and drop
|
||||
xorg.xkill # kill by clicking
|
||||
portfolio # personal finance overview
|
||||
audacity
|
||||
calibre
|
||||
electrum
|
||||
@@ -110,7 +111,7 @@ in {
|
||||
aichat # chat with llms
|
||||
anki-bin # flashcards
|
||||
jbofihe # lojbanic software
|
||||
# unstablePackages.zoom-us # video conferencing
|
||||
zoom-us # video conferencing
|
||||
(pkgs.writers.writeDashBin "im" ''
|
||||
weechat_password=$(${pkgs.pass}/bin/pass weechat)
|
||||
exec ${unstablePackages.weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${externalNetwork.makanek}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
||||
@@ -120,10 +121,10 @@ in {
|
||||
pdftk # pdf toolkit
|
||||
mupdf
|
||||
poppler_utils # pdf toolkit
|
||||
okular # the word is nucular
|
||||
kdePackages.okular # the word is nucular
|
||||
xournalpp # for annotating pdfs
|
||||
pdfpc # presenter console for pdf slides
|
||||
niveumPackages.hc # print files as qr codes
|
||||
# niveumPackages.hc # print files as qr codes
|
||||
yt-dlp
|
||||
espeak
|
||||
rink # unit converter
|
||||
@@ -143,11 +144,10 @@ in {
|
||||
niveumPackages.pls
|
||||
niveumPackages.mpv-tv
|
||||
niveumPackages.mpv-iptv
|
||||
jellyfin-media-player
|
||||
# jellyfin-media-player
|
||||
niveumPackages.devanagari
|
||||
niveumPackages.betacode # ancient greek betacode to unicode converter
|
||||
niveumPackages.meteo
|
||||
niveumPackages.mahlzeit
|
||||
niveumPackages.jq-lsp
|
||||
niveumPackages.swallow # window swallowing
|
||||
niveumPackages.literature-quote
|
||||
@@ -161,7 +161,6 @@ in {
|
||||
niveumPackages.emailmenu
|
||||
niveumPackages.closest
|
||||
niveumPackages.trans
|
||||
niveumPackages.cro
|
||||
(niveumPackages.mpv-radio.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
})
|
||||
@@ -240,8 +239,8 @@ in {
|
||||
html-tidy
|
||||
nodePackages.csslint
|
||||
nodePackages.jsonlint
|
||||
unstablePackages.deno # better node.js
|
||||
texlive.combined.scheme-full
|
||||
deno # better node.js
|
||||
# texlive.combined.scheme-full
|
||||
latexrun
|
||||
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
|
||||
# haskellPackages.pandoc-citeproc
|
||||
@@ -252,6 +251,7 @@ in {
|
||||
# gnumeric
|
||||
dia
|
||||
pandoc
|
||||
librsvg # pandoc depends on this to include SVG in documents
|
||||
# niveumPackages.man-pandoc
|
||||
typst
|
||||
# proselint
|
||||
@@ -263,6 +263,10 @@ in {
|
||||
# nightly.rust
|
||||
shellcheck
|
||||
|
||||
# photography
|
||||
gphoto2
|
||||
darktable
|
||||
|
||||
(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 "$@"
|
||||
'')
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
externalNetwork = import ../lib/external-network.nix;
|
||||
in {
|
||||
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
|
||||
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
home-manager.users.me = {
|
||||
|
||||
@@ -17,5 +17,7 @@ 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
|
||||
];
|
||||
}
|
||||
|
||||
@@ -18,6 +18,15 @@ in {
|
||||
stylix.enable = true;
|
||||
stylix.image = generatedWallpaper;
|
||||
|
||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-light.yaml";
|
||||
|
||||
stylix.cursor = {
|
||||
name = "capitaine-cursors-white";
|
||||
package = pkgs.capitaine-cursors;
|
||||
size = 12;
|
||||
};
|
||||
|
||||
|
||||
# environment.etc."stylix/wallpaper.png".source = generatedWallpaper;
|
||||
|
||||
# stylix.polarity = "either";
|
||||
@@ -43,18 +52,18 @@ in {
|
||||
|
||||
stylix.fonts = {
|
||||
serif = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Serif";
|
||||
package = pkgs.gentium;
|
||||
name = "Gentium Plus";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Sans";
|
||||
package = pkgs.gentium;
|
||||
name = "Gentium Plus";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Sans Mono";
|
||||
package = pkgs.nerd-fonts.blex-mono;
|
||||
name = "BlexMono Nerd Font";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home-manager.users.me.home.file.".zshrc".text = ''
|
||||
# nothing to see here
|
||||
'';
|
||||
|
||||
}: let
|
||||
promptColours.success = "cyan";
|
||||
promptColours.failure = "red";
|
||||
in {
|
||||
environment.systemPackages = [pkgs.atuin];
|
||||
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
|
||||
auto_sync = true
|
||||
@@ -58,7 +57,7 @@
|
||||
|
||||
fpath=(${zsh-completions}/src $fpath)
|
||||
'';
|
||||
promptInit = with config.niveum; ''
|
||||
promptInit = ''
|
||||
autoload -Uz vcs_info
|
||||
zstyle ':vcs_info:*' enable git
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
|
||||
673
flake.lock
generated
673
flake.lock
generated
File diff suppressed because it is too large
Load Diff
31
flake.nix
31
flake.nix
@@ -4,24 +4,24 @@
|
||||
inputs = {
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
# alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master";
|
||||
brockman.url = "github:kmein/brockman";
|
||||
coptic-dictionary.url = "github:kmein/coptic-dictionary";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.05";
|
||||
menstruation-backend.url = "github:kmein/menstruation.rs";
|
||||
menstruation-telegram.url = "github:kmein/menstruation-telegram";
|
||||
centerpiece.url = "github:friedow/centerpiece";
|
||||
nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05";
|
||||
nixinate.url = "github:matthewcroughan/nixinate";
|
||||
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
recht.url = "github:kmein/recht";
|
||||
retiolum.url = "git+https://git.thalheim.io/Mic92/retiolum";
|
||||
retiolum.url = "github:krebs/retiolum";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
scripts.url = "github:kmein/scripts";
|
||||
stockholm.url = "github:krebs/stockholm";
|
||||
stylix.url = "github:danth/stylix/release-24.11";
|
||||
stylix.url = "github:danth/stylix/release-25.05";
|
||||
telebots.url = "github:kmein/telebots";
|
||||
tinc-graph.url = "github:kmein/tinc-graph";
|
||||
voidrice.url = "github:Lukesmithxyz/voidrice";
|
||||
@@ -66,13 +66,13 @@
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
nur,
|
||||
brockman,
|
||||
home-manager,
|
||||
agenix,
|
||||
retiolum,
|
||||
nixinate,
|
||||
flake-utils,
|
||||
nix-on-droid,
|
||||
centerpiece,
|
||||
stylix,
|
||||
...
|
||||
}:
|
||||
@@ -113,6 +113,7 @@
|
||||
tabula = "root@tabula";
|
||||
kabsa = "root@kabsa";
|
||||
fatteh = "root@fatteh";
|
||||
kibbeh = "root@kibbeh";
|
||||
};
|
||||
in
|
||||
lib.attrsets.nameValuePair "deploy-${hostname}" {
|
||||
@@ -210,7 +211,6 @@
|
||||
inputs.self.nixosModules.panoptikon
|
||||
inputs.self.nixosModules.htgen
|
||||
inputs.stockholm.nixosModules.reaktor2
|
||||
brockman.nixosModule
|
||||
retiolum.nixosModules.retiolum
|
||||
nur.modules.nixos.default
|
||||
{ nixpkgs.overlays = [ inputs.stockholm.overlays.default ]; }
|
||||
@@ -230,7 +230,15 @@
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/zaatar/configuration.nix
|
||||
inputs.self.nixosModules.moodle-dl
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
kibbeh = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/kibbeh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
@@ -312,7 +320,7 @@
|
||||
nur.overlays.default
|
||||
(self: super: {
|
||||
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 "$@"'';
|
||||
})
|
||||
];
|
||||
};
|
||||
@@ -329,10 +337,10 @@
|
||||
packages = rec {
|
||||
auc = pkgs.callPackage packages/auc.nix {};
|
||||
betacode = pkgs.callPackage packages/betacode.nix {};
|
||||
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
|
||||
brassica = pkgs.callPackage packages/brassica.nix {};
|
||||
cheat-sh = pkgs.callPackage packages/cheat-sh.nix {};
|
||||
closest = pkgs.callPackage packages/closest {};
|
||||
cltk = pkgs.python310Packages.callPackage packages/cltk.nix {};
|
||||
cro = pkgs.callPackage packages/cro.nix {};
|
||||
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {};
|
||||
default-gateway = pkgs.callPackage packages/default-gateway.nix {};
|
||||
@@ -389,6 +397,7 @@
|
||||
opustags = pkgs.callPackage packages/opustags.nix {};
|
||||
pls = pkgs.callPackage packages/pls.nix {};
|
||||
polyglot = pkgs.callPackage packages/polyglot.nix {};
|
||||
q = pkgs.callPackage packages/q.nix {};
|
||||
qrpaste = pkgs.callPackage packages/qrpaste.nix {};
|
||||
random-zeno = pkgs.callPackage packages/random-zeno.nix {};
|
||||
rfc = pkgs.callPackage packages/rfc.nix {};
|
||||
@@ -398,6 +407,7 @@
|
||||
text2pdf = pkgs.callPackage packages/text2pdf.nix {};
|
||||
timer = pkgs.callPackage packages/timer.nix {};
|
||||
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
|
||||
passmenu = pkgs.callPackage packages/passmenu.nix {};
|
||||
trans = pkgs.callPackage packages/trans.nix {};
|
||||
ttspaste = pkgs.callPackage packages/ttspaste.nix {};
|
||||
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};
|
||||
@@ -406,6 +416,7 @@
|
||||
vg = pkgs.callPackage packages/vg.nix {};
|
||||
vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};};
|
||||
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-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {};
|
||||
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {};
|
||||
|
||||
8
lib/mycelium-network.nix
Normal file
8
lib/mycelium-network.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
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";
|
||||
}
|
||||
175
lib/style.css
Normal file
175
lib/style.css
Normal 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;
|
||||
}
|
||||
@@ -113,7 +113,13 @@ local language_servers = {
|
||||
html = {}, -- vscode-langservers-extracted
|
||||
jsonls = {}, -- vscode-langservers-extracted
|
||||
lemminx = {}, -- lemminx (for xml)
|
||||
nil_ls = {}, -- github:oxalica/nil
|
||||
nil_ls = {
|
||||
['nil'] = {
|
||||
formatting = {
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
},
|
||||
}, -- github:oxalica/nil
|
||||
dhall_lsp_server = {}, -- dhall-lsp-server
|
||||
-- rnix = {}, -- rnix-lsp
|
||||
jqls = {}, -- jq-lsp
|
||||
|
||||
@@ -40,8 +40,6 @@ let g:netrw_banner=0
|
||||
let g:netrw_browse_split=4
|
||||
let g:netrw_altv=1 " open splits to the right
|
||||
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
|
||||
|
||||
call matchadd('colorcolumn', '\%101v', 100)
|
||||
|
||||
39
packages/brainmelter.nix
Executable file
39
packages/brainmelter.nix
Executable file
@@ -0,0 +1,39 @@
|
||||
{ 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
|
||||
''
|
||||
@@ -1,61 +0,0 @@
|
||||
{ buildPythonPackage, lib, fetchPypi, gitpython, gensim, tqdm, torch, stringcase, stanza, spacy, scipy, scikit-learn, requests, rapidfuzz, pyyaml, nltk, boltons, poetry-core }:
|
||||
let
|
||||
greek-accentuation = buildPythonPackage rec {
|
||||
pname = "greek-accentuation";
|
||||
version = "1.2.0";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-l2HZXdqlLubvy2bWhhZVYGMpF0DXVKTDFehkcGF5xdk=";
|
||||
};
|
||||
meta = with lib; {
|
||||
description = "Python 3 library for accenting (and analyzing the accentuation of) Ancient Greek words";
|
||||
homepage = "https://github.com/jtauber/greek-accentuation";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kmein ];
|
||||
};
|
||||
};
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "cltk";
|
||||
format = "pyproject";
|
||||
version = "1.3.0";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-jAxvToUIo333HSVQDYVyUBY3YP+m1RnlNGelcvktp6s=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "poetry>=1.1.13" poetry-core \
|
||||
--replace "poetry.masonry.api" "poetry.core.masonry.api" \
|
||||
--replace 'scipy = "<1.13.0"' 'scipy = "^1"' \
|
||||
--replace 'boltons = "^21.0.0"' 'boltons = "^24.0.0"'
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
gitpython
|
||||
gensim
|
||||
boltons
|
||||
greek-accentuation
|
||||
pyyaml
|
||||
nltk
|
||||
rapidfuzz
|
||||
requests
|
||||
scikit-learn
|
||||
scipy
|
||||
spacy
|
||||
stanza
|
||||
stringcase
|
||||
torch
|
||||
tqdm
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Natural language processing (NLP) framework for pre-modern languages";
|
||||
homepage = "https://cltk.org";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ kmein ];
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
writers,
|
||||
fetchurl,
|
||||
xsv,
|
||||
xan,
|
||||
}: let
|
||||
database = fetchurl {
|
||||
url = "http://c.krebsco.de/greek.csv";
|
||||
@@ -9,5 +9,5 @@
|
||||
};
|
||||
in
|
||||
writers.writeDashBin "heuretes" ''
|
||||
${xsv}/bin/xsv search -s simple "^$*$" ${database} | ${xsv}/bin/xsv table
|
||||
${xan}/bin/xan search -s simple "^$*$" ${database} | ${xan}/bin/xan table
|
||||
''
|
||||
|
||||
@@ -42,14 +42,14 @@ in
|
||||
pkgs.writers.writeDashBin "klem" ''
|
||||
set -efu
|
||||
|
||||
${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \
|
||||
${pkgs.wl-clipboard}/bin/wl-paste \
|
||||
| case $(echo "${
|
||||
lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)
|
||||
}" | ${cfg.dmenu}) in
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)}
|
||||
*) ${pkgs.coreutils}/bin/cat ;;
|
||||
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."
|
||||
''
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
{
|
||||
writers,
|
||||
lib,
|
||||
xsv,
|
||||
xan,
|
||||
curl,
|
||||
gnused,
|
||||
}:
|
||||
writers.writeDashBin "literature-quote" ''
|
||||
PATH=$PATH:${lib.makeBinPath [xsv curl gnused]}
|
||||
PATH=$PATH:${lib.makeBinPath [xan curl gnused]}
|
||||
ROW=$(curl -Ls http://kmein.github.io/logotheca/quotes.csv | shuf -n1)
|
||||
(
|
||||
QUOTE="$(echo "$ROW" | xsv select 4)"
|
||||
QUOTE="$(echo "$ROW" | xan select 3)"
|
||||
|
||||
echo "$QUOTE" | sed 's/^"//;s/"$//;s/\s*||\s*/\n\n/g;s/\s*|\s*/\n/g'
|
||||
echo
|
||||
|
||||
AUTHOR="$(echo "$ROW" | xsv select 1)"
|
||||
AUTHOR="$(echo "$ROW" | xan select 0)"
|
||||
# Prepare the output
|
||||
ATTRIBUTION="($AUTHOR"
|
||||
|
||||
SOURCE="$(echo "$ROW" | xsv select 2)"
|
||||
SOURCE="$(echo "$ROW" | xan select 1)"
|
||||
|
||||
# Add SOURCE if it's not empty
|
||||
if [ -n "$SOURCE" ]; then
|
||||
ATTRIBUTION="$ATTRIBUTION: $SOURCE"
|
||||
fi
|
||||
|
||||
LOC="$(echo "$ROW" | xsv select 3 | sed 's/""//;s/-/–/g')"
|
||||
LOC="$(echo "$ROW" | xan select 2 | sed 's/""//;s/-/–/g')"
|
||||
# Add LOC if it's not empty
|
||||
if [ -n "$LOC" ]; then
|
||||
ATTRIBUTION="$ATTRIBUTION, $LOC"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
writers,
|
||||
lib,
|
||||
rofi,
|
||||
wofi,
|
||||
findutils,
|
||||
coreutils,
|
||||
noteDirectory ? "~/state/obsidian",
|
||||
@@ -11,7 +11,7 @@
|
||||
writers.writeDashBin "notemenu" ''
|
||||
set -efu
|
||||
PATH=$PATH:${
|
||||
lib.makeBinPath [rofi findutils coreutils]
|
||||
lib.makeBinPath [wofi findutils coreutils]
|
||||
}
|
||||
|
||||
cd ${noteDirectory}
|
||||
@@ -21,7 +21,7 @@ writers.writeDashBin "notemenu" ''
|
||||
echo $(date -I -d yesterday).md
|
||||
''}
|
||||
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"
|
||||
then
|
||||
alacritty --working-directory ${noteDirectory} -e ${niveumPackages.obsidian-vim}/bin/nvim "$note_file"
|
||||
|
||||
@@ -35,6 +35,7 @@ neovim.override {
|
||||
vimPlugins.nerdtree
|
||||
vimPlugins.fzf-vim
|
||||
vimPlugins.fzfWrapper
|
||||
vimPlugins.vim-fugitive
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
18
packages/passmenu.nix
Normal file
18
packages/passmenu.nix
Normal 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: //')"
|
||||
''
|
||||
@@ -30,10 +30,27 @@
|
||||
"that's a good song!"
|
||||
"👍"
|
||||
"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 = [
|
||||
"how can anyone listen to this?"
|
||||
"(╯°□°)╯ ┻━┻"
|
||||
"(╯°□°)╯ ┻━┻"
|
||||
"skip this!"
|
||||
"next, please! i'm suffering!"
|
||||
"that's just bad music"
|
||||
@@ -43,12 +60,40 @@
|
||||
"turn that down"
|
||||
"make it stooop"
|
||||
"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 = [
|
||||
"meh"
|
||||
"i have no opinion about this song"
|
||||
"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
|
||||
writers.writeDashBin "pls" ''
|
||||
|
||||
9
packages/q.nix
Normal file
9
packages/q.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ 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
|
||||
''
|
||||
@@ -2,7 +2,7 @@
|
||||
writers,
|
||||
mktemp,
|
||||
qrencode,
|
||||
xclip,
|
||||
wl-clipboard,
|
||||
nsxiv,
|
||||
}:
|
||||
writers.writeDashBin "qrpaste" ''
|
||||
@@ -11,6 +11,6 @@ writers.writeDashBin "qrpaste" ''
|
||||
clean() {
|
||||
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"
|
||||
''
|
||||
|
||||
47
packages/radio-news.nix
Normal file
47
packages/radio-news.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ 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 @-
|
||||
''
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
writers,
|
||||
xclip,
|
||||
wl-clipboard,
|
||||
espeak,
|
||||
}:
|
||||
writers.writeDashBin "ttspaste" ''
|
||||
${xclip}/bin/xclip -selection clipboard -out | ${espeak}/bin/espeak
|
||||
${wl-clipboard}/bin/paste | ${espeak}/bin/espeak
|
||||
''
|
||||
# curl, mpv,
|
||||
# ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv -
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
dmenu,
|
||||
gnused,
|
||||
libnotify,
|
||||
xclip,
|
||||
wl-clipboard,
|
||||
xdotool,
|
||||
gawk,
|
||||
fetchFromGitHub,
|
||||
@@ -90,7 +90,7 @@ in
|
||||
writers.writeDashBin "unicodmenu" ''
|
||||
history_file=$HOME/.cache/unicodmenu
|
||||
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() {
|
||||
tac "$history_file"
|
||||
@@ -101,7 +101,7 @@ in
|
||||
|
||||
[ "$chosen" != "" ] || exit
|
||||
|
||||
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
||||
echo "$chosen" | tr -d '\n' | wl-copy
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
xdotool key Shift+Insert
|
||||
|
||||
2
secrets
2
secrets
Submodule secrets updated: 5892b05a9c...e14a3170cc
12
secrets.txt
12
secrets.txt
@@ -1,13 +1,10 @@
|
||||
secrets/alertmanager-token-reporters.age
|
||||
secrets/cifs-credentials-hu-berlin.age
|
||||
secrets/cifs-credentials-zodiac.age
|
||||
secrets/di-fm-key.age
|
||||
secrets/email-password-cock.age
|
||||
secrets/email-password-dslalewa.age
|
||||
secrets/email-password-fsklassp.age
|
||||
secrets/email-password-fysi.age
|
||||
secrets/email-password-letos.age
|
||||
secrets/email-password-meinhak99.age
|
||||
secrets/email-password-meinhaki.age
|
||||
secrets/email-password-posteo.age
|
||||
secrets/fatteh-retiolum-privateKey-ed25519.age
|
||||
secrets/fatteh-retiolum-privateKey-rsa.age
|
||||
@@ -19,6 +16,7 @@ secrets/ful-retiolum-privateKey-ed25519.age
|
||||
secrets/ful-retiolum-privateKey-rsa.age
|
||||
secrets/ful-root.age
|
||||
secrets/fu-sftp-key.age
|
||||
secrets/gemini-api-key.age
|
||||
secrets/github-token-i3status-rust.age
|
||||
secrets/grafana-password-admin.age
|
||||
secrets/hetzner-storagebox-credentials.age
|
||||
@@ -30,6 +28,10 @@ secrets/kabsa-syncthing-key.age
|
||||
secrets/kabsa-wireguard-aether-key.age
|
||||
secrets/kabsa-wireguard-aether-psk.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/makanek-retiolum-privateKey-ed25519.age
|
||||
secrets/makanek-retiolum-privateKey-rsa.age
|
||||
@@ -39,10 +41,8 @@ secrets/manakish-syncthing-cert.age
|
||||
secrets/manakish-syncthing-key.age
|
||||
secrets/manakish-wireguard-aether-key.age
|
||||
secrets/manakish-wireguard-aether-psk.age
|
||||
secrets/mastodon-token-autorenkalender.age
|
||||
secrets/mastodon-token-celan.age
|
||||
secrets/mastodon-token-hesychius.age
|
||||
secrets/mastodon-token-logotheca.age
|
||||
secrets/mastodon-token-nietzsche.age
|
||||
secrets/mastodon-token-smyth.age
|
||||
secrets/mastodon-token-tlgwotd.age
|
||||
|
||||
@@ -20,8 +20,6 @@ in {
|
||||
|
||||
services.illum.enable = true;
|
||||
|
||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/grayscale-light.yaml";
|
||||
|
||||
age.secrets = {
|
||||
retiolum-rsa = {
|
||||
file = ../../secrets/fatteh-retiolum-privateKey-rsa.age;
|
||||
|
||||
@@ -1,178 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.rss-bridge = {
|
||||
enable = true;
|
||||
config.system.enabled_bridges = [ "*" ];
|
||||
};
|
||||
services.nginx.virtualHosts = {
|
||||
rss-bridge = {
|
||||
serverAliases = [
|
||||
"rss.r"
|
||||
];
|
||||
};
|
||||
"brockman.r" = {
|
||||
serverAliases = [
|
||||
"news.r"
|
||||
];
|
||||
locations."/api".extraConfig = ''
|
||||
proxy_pass http://127.0.0.1:7777/;
|
||||
proxy_pass_header Server;
|
||||
'';
|
||||
locations."/".extraConfig = ''
|
||||
root /var/lib/brockman;
|
||||
index brockman.json;
|
||||
'';
|
||||
extraConfig = ''
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||
'';
|
||||
};
|
||||
};
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/brockman 1750 brockman nginx -"
|
||||
"d /run/irc-api 1750 brockman nginx -"
|
||||
];
|
||||
|
||||
services.restic.backups.niveum.paths = [ "/var/lib/brockman" ];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [6667];
|
||||
|
||||
services.ergochat.enable = true;
|
||||
services.ergochat.openFilesLimit = 16384;
|
||||
services.ergochat.settings = {
|
||||
limits.nicklen = 100;
|
||||
limits.identlen = 100;
|
||||
history.enabled = false;
|
||||
};
|
||||
systemd.services.brockman.bindsTo = [ "ergochat.service" ];
|
||||
systemd.services.brockman.serviceConfig.LimitNOFILE = 16384;
|
||||
systemd.services.brockman.environment.BROCKMAN_LOG_LEVEL = "DEBUG";
|
||||
services.brockman = {
|
||||
enable = true;
|
||||
config = {
|
||||
irc.host = "localhost";
|
||||
channel = "#all";
|
||||
shortener = "http://go.r";
|
||||
controller = {
|
||||
nick = "brockman";
|
||||
extraChannels = [ "#all" ];
|
||||
};
|
||||
statePath = "/var/lib/brockman/brockman.json";
|
||||
bots = {};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
krebs.reaktor2.api = {
|
||||
hostname = "localhost";
|
||||
port = "6667";
|
||||
nick = "api";
|
||||
API.listen = "inet://127.0.0.1:7777";
|
||||
plugins = [
|
||||
{
|
||||
plugin = "register";
|
||||
config = {
|
||||
channels = [
|
||||
"#all"
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
krebs.reaktor2.news = let
|
||||
name = "candyman";
|
||||
in {
|
||||
hostname = "localhost";
|
||||
port = "6667";
|
||||
nick = name;
|
||||
plugins = [
|
||||
{
|
||||
plugin = "register";
|
||||
config = {
|
||||
channels = [
|
||||
"#all"
|
||||
"#aluhut"
|
||||
"#news"
|
||||
"#lasstube"
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
plugin = "system";
|
||||
config = {
|
||||
hooks.PRIVMSG = [
|
||||
{
|
||||
activate = "match";
|
||||
pattern = "^${name}:\\s*(\\S*)(?:\\s+(.*\\S))?\\s*$";
|
||||
command = 1;
|
||||
arguments = [2];
|
||||
commands = {
|
||||
add-reddit.filename = pkgs.writers.writeDash "add-reddit" ''
|
||||
set -euf
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo 'usage: ${name}: add-reddit $reddit_channel'
|
||||
exit 1
|
||||
fi
|
||||
reddit_channel=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]')
|
||||
echo "brockman: add r_$reddit_channel http://rss.r/?action=display&bridge=Reddit&context=single&r=$reddit_channel&format=Atom"
|
||||
'';
|
||||
add-telegram.filename = pkgs.writers.writeDash "add-telegram" ''
|
||||
set -euf
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo 'usage: ${name}: add-telegram $telegram_user'
|
||||
exit 1
|
||||
fi
|
||||
telegram_user=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]')
|
||||
echo "brockman: add t_$telegram_user http://rss.r/?action=display&bridge=Telegram&username=$telegram_user&format=Mrss"
|
||||
'';
|
||||
add-youtube.filename = pkgs.writers.writeDash "add-youtube" ''
|
||||
set -euf
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo 'usage: ${name}: add-youtube $nick $channel/video/stream/id'
|
||||
exit 1
|
||||
fi
|
||||
youtube_nick=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]')
|
||||
youtube_url=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][1]')
|
||||
if [ ''${#youtube_url} -eq 24 ]; then
|
||||
youtube_id=$youtube_url
|
||||
else
|
||||
youtube_id=$(${pkgs.yt-dlp}/bin/yt-dlp --max-downloads 1 -j "$youtube_url" | ${pkgs.jq}/bin/jq -r '.channel_id')
|
||||
fi
|
||||
echo "brockman: add yt_$youtube_nick http://rss.r/?action=display&bridge=Youtube&context=By+channel+id&c=$youtube_id&duration_min=&duration_max=&format=Mrss"
|
||||
'';
|
||||
add-twitch.filename = pkgs.writers.writeDash "add-twitch" ''
|
||||
set -euf
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo 'usage: ${name}: add-twitch $handle'
|
||||
exit 1
|
||||
fi
|
||||
twitch_nick=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]')
|
||||
echo "brockman: add twitch_$twitch_nick http://rss.r/?action=display&bridge=Twitch&channel=$twitch_nick&type=all&format=Atom"
|
||||
'';
|
||||
add-twitter.filename = pkgs.writers.writeDash "add-twitter" ''
|
||||
set -euf
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo 'usage: ${name}: add-twitter $handle'
|
||||
exit 1
|
||||
fi
|
||||
twitter_nick=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]')
|
||||
echo "brockman: add tw_$twitter_nick http://rss.r/?action=display&bridge=Twitter&context=By+username&u=$twitter_nick&norep=on&noretweet=on&nopinned=on&nopic=on&format=Atom"
|
||||
'';
|
||||
search.filename = pkgs.writers.writeDash "search" ''
|
||||
set -euf
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo 'usage: ${name}: search $searchterm'
|
||||
exit 1
|
||||
fi
|
||||
searchterm=$(echo "$1" | ${pkgs.jq}/bin/jq -Rr '[match("(\\S+)\\s*";"g").captures[].string][0]')
|
||||
${pkgs.curl}/bin/curl -Ss "https://feedsearch.dev/api/v1/search?url=$searchterm&info=true&favicon=false" |
|
||||
${pkgs.jq}/bin/jq '.[].url'
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -12,9 +12,10 @@ in {
|
||||
./radio.nix
|
||||
./panoptikon.nix
|
||||
./hledger.nix
|
||||
./brockman.nix
|
||||
./wallabag.nix
|
||||
./alew.nix
|
||||
../../configs/monitoring.nix
|
||||
../../configs/mycelium.nix
|
||||
../../configs/tor.nix
|
||||
../../configs/save-space.nix
|
||||
../../configs/spacetime.nix
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
};
|
||||
|
||||
systemd.services.hledger-backup = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
startAt = "hourly";
|
||||
wants = ["network-online.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
||||
@@ -21,6 +21,7 @@ in {
|
||||
nginx = {
|
||||
serverName = "matomo.kmein.de";
|
||||
};
|
||||
package = pkgs.matomo_5;
|
||||
};
|
||||
|
||||
services.mysql = {
|
||||
|
||||
44
systems/ful/wallabag.nix
Normal file
44
systems/ful/wallabag.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{ 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" ];
|
||||
};
|
||||
}
|
||||
@@ -1,13 +1,18 @@
|
||||
{
|
||||
config,
|
||||
niveumPackages,
|
||||
pkgs,
|
||||
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;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../kibbeh/hardware-configuration.nix
|
||||
../../configs/tlp.nix
|
||||
../../configs/default.nix
|
||||
../../configs/networkmanager.nix
|
||||
@@ -20,8 +25,6 @@ in {
|
||||
promptColours.success = "cyan";
|
||||
};
|
||||
|
||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/dracula.yaml";
|
||||
|
||||
nix.settings = {
|
||||
cores = 1;
|
||||
max-jobs = 2;
|
||||
@@ -47,15 +50,15 @@ in {
|
||||
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 = {
|
||||
hostName = "kabsa";
|
||||
wireless.interfaces = ["wlp3s0"];
|
||||
wireless.interfaces = [ "wlp3s0" ];
|
||||
retiolum = retiolumAddresses.kabsa;
|
||||
};
|
||||
|
||||
system.stateVersion = "19.03";
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
||||
97
systems/kibbeh/configuration.nix
Normal file
97
systems/kibbeh/configuration.nix
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
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";
|
||||
}
|
||||
55
systems/kibbeh/hardware-configuration.nix
Normal file
55
systems/kibbeh/hardware-configuration.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -15,6 +15,7 @@ in {
|
||||
./monitoring
|
||||
./names.nix
|
||||
./nextcloud.nix
|
||||
../../configs/mycelium.nix
|
||||
./radio-news.nix
|
||||
./scrabble.nix
|
||||
# ./onlyoffice.nix
|
||||
|
||||
@@ -1,20 +1,45 @@
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (import ../../lib) sshPort;
|
||||
domain = "https://code.kmein.de";
|
||||
domain = "code.kmein.de";
|
||||
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 = {
|
||||
enable = true;
|
||||
appName = "code.kmein.de";
|
||||
appName = domain;
|
||||
settings = {
|
||||
server.ROOT_URL = domain;
|
||||
server.ROOT_URL = "https://${domain}";
|
||||
server.DOMAIN = domain;
|
||||
server.SSH_PORT = sshPort;
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."code.kmein.de" = {
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
forceSSL = 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 = [
|
||||
|
||||
@@ -350,6 +350,7 @@ in {
|
||||
"https://beta.alew.hu-berlin.de"
|
||||
"https://alew.hu-berlin.de/api/search?substring=die&domain=lemma&derivations=true&addition=true&diacritics=false&position=infix"
|
||||
"https://beta.alew.hu-berlin.de/api/search?substring=die&domain=lemma&derivations=true&addition=true&diacritics=false&position=infix"
|
||||
"https://zodiac.fly.dev/api/lemma/get?lemmaId=2582"
|
||||
"https://pad.kmein.de"
|
||||
"https://code.kmein.de"
|
||||
"https://radio.kmein.de"
|
||||
@@ -375,6 +376,18 @@ in {
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "brockman";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"brockman.news:9002" # node
|
||||
"brockman.news:9121" # redis
|
||||
"brockman.news:9113" # nginx
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "home_assistant";
|
||||
scrape_interval = "60s";
|
||||
|
||||
@@ -47,7 +47,7 @@ in {
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud30;
|
||||
package = pkgs.nextcloud31;
|
||||
|
||||
https = true;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) serveHtml;
|
||||
@@ -8,6 +10,30 @@
|
||||
in {
|
||||
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 = [
|
||||
{
|
||||
title = "Retiolum Radio News";
|
||||
|
||||
@@ -93,11 +93,14 @@ in {
|
||||
sasl_username = nick;
|
||||
sasl_password = "\${sec.data.retiolum_sasl}";
|
||||
};
|
||||
news = {
|
||||
brockman = {
|
||||
autoconnect = true;
|
||||
addresses = "news.r";
|
||||
addresses = "brockman.news";
|
||||
tls = false;
|
||||
autojoin = ["#cook" "#drachengame" "#oepnv" "#kmeinung" "#memes"];
|
||||
autojoin = ["#cook" "#kmeinung"];
|
||||
sasl_username = nick;
|
||||
sasl_password = "\${sec.data.brockman_sasl}";
|
||||
sasl_mechanism = "plain";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
{ 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.";
|
||||
}];
|
||||
}
|
||||
@@ -12,8 +12,8 @@ in {
|
||||
./hdmi.nix
|
||||
../../configs/default.nix
|
||||
../../configs/tlp.nix
|
||||
../../configs/wpa_supplicant.nix
|
||||
../../configs/admin-essentials.nix
|
||||
../../configs/networkmanager.nix
|
||||
../../configs/power-action.nix
|
||||
];
|
||||
|
||||
@@ -38,8 +38,6 @@ in {
|
||||
|
||||
networking.wg-quick.interfaces.aether.address = ["192.168.178.204/24"];
|
||||
|
||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-light-medium.yaml";
|
||||
|
||||
niveum = {
|
||||
batteryName = "BAT0";
|
||||
wirelessInterface = "wlp3s0";
|
||||
|
||||
@@ -12,6 +12,7 @@ in {
|
||||
./gaslight.nix
|
||||
./hardware-configuration.nix
|
||||
./nas.nix
|
||||
../../configs/mycelium.nix
|
||||
./home-assistant.nix
|
||||
../../configs/monitoring.nix
|
||||
../../configs/retiolum.nix
|
||||
@@ -81,6 +82,7 @@ in {
|
||||
pkgs.vim
|
||||
pkgs.htop
|
||||
pkgs.ncmpcpp
|
||||
pkgs.python3 # for sshuttle
|
||||
];
|
||||
|
||||
# since 22.05 timeout fails?
|
||||
|
||||
Reference in New Issue
Block a user