mirror of
https://github.com/kmein/niveum
synced 2026-03-22 04:41:07 +01:00
Compare commits
10 Commits
2688d3d9ad
...
1c7c7b71a1
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c7c7b71a1 | |||
| 5d0639953c | |||
| b7217b9e95 | |||
| dad20851c9 | |||
| 0752f23082 | |||
| 54b545bf75 | |||
| a30c356012 | |||
| 3cf2615bd4 | |||
| 213d2da55b | |||
| 3a6428982f |
@@ -12,6 +12,3 @@
|
||||
> das ist ja pure poesie —[riotbib](https://github.com/riotbib/)
|
||||
|
||||
> Deine Configs sind wunderschön <3 —[flxai](https://github.com/flxai/)
|
||||
|
||||
## To do
|
||||
- [ ] get rid of `nixinate`
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
@@ -36,12 +37,12 @@ in {
|
||||
pkgs.bc # calculator
|
||||
pkgs.pari # gp -- better calculator
|
||||
pkgs.ts
|
||||
pkgs.vimv
|
||||
pkgs.vg
|
||||
pkgs.fkill
|
||||
pkgs.cyberlocker-tools
|
||||
pkgs.untilport
|
||||
pkgs.kpaste
|
||||
niveumPackages.vimv
|
||||
niveumPackages.vg
|
||||
niveumPackages.fkill
|
||||
niveumPackages.cyberlocker-tools
|
||||
niveumPackages.untilport
|
||||
niveumPackages.kpaste
|
||||
# HARDWARE
|
||||
pkgs.pciutils # for lspci
|
||||
]
|
||||
|
||||
@@ -2,8 +2,12 @@
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (import ../lib/email.nix) defaults thunderbirdProfile;
|
||||
in
|
||||
{
|
||||
age.secrets = {
|
||||
email-password-ical-ephemeris = {
|
||||
@@ -41,7 +45,7 @@
|
||||
extraConfig = {
|
||||
database.path = config.home-manager.users.me.accounts.email.maildirBasePath;
|
||||
new.tags = "";
|
||||
user.name = pkgs.lib.niveum.email.defaults.realName;
|
||||
user.name = defaults.realName;
|
||||
user.primary_email = config.home-manager.users.me.accounts.email.accounts.posteo.address;
|
||||
};
|
||||
};
|
||||
@@ -83,7 +87,7 @@
|
||||
mailhost = "mail.cock.li";
|
||||
address = "2210@cock.li";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
lib.recursiveUpdate defaults {
|
||||
address = address;
|
||||
userName = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
|
||||
@@ -98,7 +102,7 @@
|
||||
let
|
||||
address = "ical.ephemeris@web.de";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
lib.recursiveUpdate defaults {
|
||||
userName = address;
|
||||
realName = "Kieran from iCal Ephemeris";
|
||||
address = address;
|
||||
@@ -114,7 +118,7 @@
|
||||
mailhost = "posteo.de";
|
||||
address = "kieran.meinhardt@posteo.net";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
lib.recursiveUpdate defaults {
|
||||
address = address;
|
||||
aliases = [ "kmein@posteo.de" ];
|
||||
userName = address;
|
||||
@@ -140,7 +144,7 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
};
|
||||
profiles.${pkgs.lib.niveum.email.thunderbirdProfile} = {
|
||||
profiles.${thunderbirdProfile} = {
|
||||
isDefault = true;
|
||||
settings = {
|
||||
"mail.default_send_format" = 1;
|
||||
@@ -211,7 +215,7 @@
|
||||
"*" = ":filter -x Flagged<Enter>";
|
||||
};
|
||||
view = {
|
||||
tr = ":pipe ${pkgs.trans}/bin/trans -show-original n -b -no-autocorrect<Enter>"; # https://man.sr.ht/~rjarry/aerc/integrations/translator.md
|
||||
tr = ":pipe ${niveumPackages.trans}/bin/trans -show-original n -b -no-autocorrect<Enter>"; # https://man.sr.ht/~rjarry/aerc/integrations/translator.md
|
||||
"/" = ":toggle-key-passthrough <Enter> /";
|
||||
q = ":close<Enter>";
|
||||
O = ":open<Enter>";
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: let
|
||||
inherit (import ../lib) restic;
|
||||
in {
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
inherit (restic) repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "8:00";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "restic-niveum" ''
|
||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "restic-mount" ''
|
||||
mountdir=$(mktemp -d)
|
||||
@@ -46,7 +46,7 @@
|
||||
clean() {
|
||||
rm -r "$mountdir"
|
||||
}
|
||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
telebots = inputs.telebots.defaultPackage.x86_64-linux;
|
||||
reverseDirectory = "/run/telegram-reverse";
|
||||
proverbDirectory = "/run/telegram-proverb";
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
in {
|
||||
imports = [
|
||||
./logotheca.nix
|
||||
@@ -26,7 +27,7 @@ in {
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = map (path:
|
||||
pkgs.lib.niveum.tmpfilesConfig {
|
||||
tmpfilesConfig {
|
||||
type = "d";
|
||||
mode = "0750";
|
||||
age = "1h";
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
niveum.bots.logotheca = {
|
||||
@@ -20,7 +22,7 @@
|
||||
"!zlwCuPiCNMSxDviFzA:4d2.org"
|
||||
];
|
||||
};
|
||||
command = "${pkgs.literature-quote}/bin/literature-quote";
|
||||
command = "${niveumPackages.literature-quote}/bin/literature-quote";
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
niveum.bots.nietzsche = {
|
||||
@@ -15,9 +16,9 @@
|
||||
set -efu
|
||||
random_number=$(( ($RANDOM % 10) + 1 ))
|
||||
if [ "$random_number" -eq 1 ]; then
|
||||
${pkgs.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
||||
${niveumPackages.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
||||
else
|
||||
${pkgs.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
||||
${niveumPackages.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
||||
fi
|
||||
'');
|
||||
};
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
unstablePackages,
|
||||
...
|
||||
}: let
|
||||
mastodonEndpoint = "https://social.krebsco.de";
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
pkgs.cro
|
||||
niveumPackages.cro
|
||||
pkgs.tor-browser
|
||||
pkgs.firefox
|
||||
pkgs.brave
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (import ../lib) tmpfilesConfig;
|
||||
in {
|
||||
systemd.user.services.systemd-tmpfiles-clean = {
|
||||
enable = true;
|
||||
wantedBy = [ "default.target" ];
|
||||
@@ -14,7 +16,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.users.me.rules = map pkgs.lib.niveum.tmpfilesConfig [
|
||||
systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [
|
||||
{
|
||||
type = "d";
|
||||
mode = "0755";
|
||||
@@ -27,7 +29,7 @@
|
||||
age = "7d";
|
||||
path = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
||||
}
|
||||
] ++ map (path: pkgs.lib.niveum.tmpfilesConfig {
|
||||
] ++ map (path: tmpfilesConfig {
|
||||
type = "L+";
|
||||
user = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
@@ -119,7 +121,7 @@
|
||||
cert = config.age.secrets.syncthing-cert.path;
|
||||
key = config.age.secrets.syncthing-key.path;
|
||||
settings = {
|
||||
devices = pkgs.lib.niveum.syncthingIds;
|
||||
inherit ((import ../lib).syncthing) devices;
|
||||
folders = {
|
||||
"${config.users.users.me.home}/sync" = {
|
||||
devices = ["kabsa" "manakish" "fatteh"];
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import ../lib) localAddresses kieran remoteDir;
|
||||
defaultApplications = (import ../lib).defaultApplications { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@@ -65,7 +68,7 @@ in
|
||||
|
||||
users.users.me = {
|
||||
name = "kfm";
|
||||
description = pkgs.lib.niveum.kieran.name;
|
||||
description = kieran.name;
|
||||
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
@@ -87,7 +90,7 @@ in
|
||||
environment.interactiveShellInit = "export PATH=$PATH";
|
||||
environment.shellAliases =
|
||||
let
|
||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
in
|
||||
{
|
||||
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
@@ -166,7 +169,7 @@ in
|
||||
networking.hosts = lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = [ "${name}.local" ];
|
||||
}) pkgs.lib.niveum.localAddresses;
|
||||
}) localAddresses;
|
||||
}
|
||||
{
|
||||
home-manager.users.me.home.stateVersion = "22.05";
|
||||
@@ -187,7 +190,7 @@ in
|
||||
dconf.enable = true;
|
||||
dconf.settings = {
|
||||
# Change the default terminal for Nemo
|
||||
"org/cinnamon/desktop/applications/terminal".exec = pkgs.lib.niveum.defaultApplications.terminal;
|
||||
"org/cinnamon/desktop/applications/terminal".exec = defaultApplications.terminal;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -215,9 +218,10 @@ in
|
||||
./uni.nix
|
||||
./i3.nix
|
||||
./i3status-rust.nix
|
||||
./keyboard
|
||||
./keyboard.nix
|
||||
./mycelium.nix
|
||||
./kdeconnect.nix
|
||||
{ home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose; }
|
||||
{ services.upower.enable = true; }
|
||||
./lb.nix
|
||||
./mpv.nix
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) defaultApplications theme;
|
||||
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
@@ -17,7 +18,7 @@ in {
|
||||
|
||||
home-manager.users.me.services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = pkgs.lib.niveum.theme.icon;
|
||||
iconTheme = (theme pkgs).icon;
|
||||
settings = {
|
||||
global = {
|
||||
transparency = 10;
|
||||
@@ -43,7 +44,7 @@ in {
|
||||
sticky_history = true;
|
||||
history_length = 20;
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||
browser = pkgs.lib.niveum.defaultApplications.browser;
|
||||
browser = (defaultApplications pkgs).browser;
|
||||
verbosity = "mesg";
|
||||
corner_radius = 0;
|
||||
mouse_left_click = "do_action";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
zip-font = name: arguments: let
|
||||
@@ -92,6 +93,7 @@ in {
|
||||
font-awesome
|
||||
galatia-sil
|
||||
gentium
|
||||
# niveumPackages.gfs-fonts
|
||||
gyre-fonts
|
||||
ibm-plex
|
||||
jetbrains-mono
|
||||
@@ -112,7 +114,7 @@ in {
|
||||
source-sans-pro
|
||||
source-serif-pro
|
||||
theano
|
||||
tocharian-font
|
||||
niveumPackages.tocharian-font
|
||||
vista-fonts
|
||||
vollkorn
|
||||
zilla-slab
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: let
|
||||
inherit (import ../lib) kieran ignorePaths;
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
pkgs.mr
|
||||
pkgs.gitFull
|
||||
@@ -40,9 +41,9 @@
|
||||
logs = "log --pretty=oneline";
|
||||
graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
};
|
||||
ignores = pkgs.lib.niveum.ignorePaths;
|
||||
settings.user.name = pkgs.lib.niveum.kieran.name;
|
||||
settings.user.email = pkgs.lib.niveum.kieran.email;
|
||||
ignores = ignorePaths;
|
||||
settings.user.name = kieran.name;
|
||||
settings.user.email = kieran.email;
|
||||
settings.pull.ff = "only";
|
||||
settings.rebase.autoStash = true;
|
||||
settings.merge.autoStash = true;
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
klem = pkgs.klem.override {
|
||||
options.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
options.scripts = {
|
||||
inherit (import ../lib) defaultApplications;
|
||||
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 \
|
||||
@@ -35,10 +37,10 @@
|
||||
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
||||
'';
|
||||
"ipa" = pkgs.writers.writeDash "ipa" ''
|
||||
${pkgs.ipa}/bin/ipa
|
||||
${niveumPackages.ipa}/bin/ipa
|
||||
'';
|
||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||
${pkgs.betacode}/bin/betacode
|
||||
${niveumPackages.betacode}/bin/betacode
|
||||
'';
|
||||
"curl" = pkgs.writers.writeDash "curl" ''
|
||||
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||
@@ -49,6 +51,12 @@
|
||||
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 {
|
||||
@@ -216,15 +224,15 @@ in {
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+q" = "exec ${config.services.clipmenu.package}/bin/clipmenu";
|
||||
|
||||
"${modifier}+Return" = "exec ${pkgs.lib.niveum.defaultApplications.terminal}";
|
||||
"${modifier}+t" = "exec ${pkgs.lib.niveum.defaultApplications.fileManager}";
|
||||
"${modifier}+y" = "exec ${pkgs.lib.niveum.defaultApplications.browser}";
|
||||
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
||||
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
|
||||
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
|
||||
|
||||
"${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec rofi -modi run,ssh,window -show run''}";
|
||||
"${modifier}+Shift+d" = "exec ${pkgs.notemenu}/bin/notemenu";
|
||||
"${modifier}+Shift+d" = "exec ${niveumPackages.notemenu}/bin/notemenu";
|
||||
"${modifier}+p" = "exec rofi-pass";
|
||||
"${modifier}+Shift+p" = "exec rofi-pass --insert";
|
||||
"${modifier}+u" = "exec ${pkgs.unicodmenu}/bin/unicodmenu";
|
||||
"${modifier}+u" = "exec ${niveumPackages.unicodmenu}/bin/unicodmenu";
|
||||
"${modifier}+Shift+u" = "exec ${pkgs.writers.writeDash "last-unicode" ''${pkgs.xdotool}/bin/xdotool type --delay 1000 "$(${pkgs.gawk}/bin/awk 'END{print $1}' ~/.cache/unicodmenu)"''}";
|
||||
|
||||
"${modifier}+F7" = "exec ${pkgs.writers.writeDash "showkeys-toggle" ''
|
||||
@@ -244,6 +252,7 @@ in {
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
|
||||
"XF86ScreenSaver" = "exec ${niveumPackages.k-lock}/bin/k-lock";
|
||||
|
||||
# key names detected with xorg.xev:
|
||||
# XF86WakeUp (fn twice)
|
||||
@@ -279,6 +288,7 @@ in {
|
||||
config = {
|
||||
inherit modifier gaps modes bars floating window colors;
|
||||
keybindings = keybindings // {
|
||||
"${modifier}+ß" = "exec ${niveumPackages.menu-calc}/bin/=";
|
||||
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
|
||||
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
|
||||
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
||||
@@ -286,7 +296,7 @@ in {
|
||||
"Print" = "exec flameshot gui";
|
||||
# "${modifier}+Shift+x" = "exec ${move-to-new-workspace}";
|
||||
# "${modifier}+x" = "exec ${new-workspace}";
|
||||
"XF86Display" = "exec ${pkgs.dmenu-randr}/bin/dmenu-randr";
|
||||
"XF86Display" = "exec ${niveumPackages.dmenu-randr}/bin/dmenu-randr";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
@@ -28,10 +27,10 @@ let
|
||||
arabic = {
|
||||
code = "ara";
|
||||
variant = "buckwalter";
|
||||
};
|
||||
coptic = ./coptic;
|
||||
avestan = ./avestan;
|
||||
gothic = ./gothic;
|
||||
}; # ../lib/keyboards/arabic;
|
||||
coptic = ../lib/keyboards/coptic;
|
||||
avestan = ../lib/keyboards/avestan;
|
||||
gothic = ../lib/keyboards/gothic;
|
||||
farsi = {
|
||||
code = "ir";
|
||||
variant = "qwerty";
|
||||
@@ -64,42 +63,40 @@ in
|
||||
|
||||
# man 7 xkeyboard-config
|
||||
services.xserver = {
|
||||
exportConfiguration = lib.mkForce 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.extraLayouts = {
|
||||
coptic = {
|
||||
languages = [ "cop" ];
|
||||
description = "Coptic is the latest stage of the Egyptian language and was used by Egyptian Christians. The Coptic script is based on the Greek alphabet with some letters borrowed from Demotic Egyptian.";
|
||||
symbolsFile = ./coptic;
|
||||
};
|
||||
avestan = {
|
||||
languages = [ "ave" ];
|
||||
description = "Avestan is an ancient Iranian language known primarily from its use in the sacred texts of Zoroastrianism, the Avesta. It is an Indo-Iranian language that was spoken in ancient Persia.";
|
||||
symbolsFile = ./avestan;
|
||||
};
|
||||
gothic = {
|
||||
languages = [ "got" ];
|
||||
description = "Gothic is an extinct East Germanic language that was spoken by the Goths. It is known primarily from the Codex Argenteus, a 6th-century manuscript containing a translation of the Bible into Gothic.";
|
||||
symbolsFile = ./gothic;
|
||||
};
|
||||
farsi = {
|
||||
languages = [ "fas" ];
|
||||
description = "Farsi, also known as Persian, is an Indo-Iranian language spoken primarily in Iran, Afghanistan (where it is known as Dari), and Tajikistan (where it is called Tajik). It has a rich literary tradition and is written in a modified Arabic script.";
|
||||
symbolsFile = ./farsi;
|
||||
};
|
||||
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;
|
||||
}
|
||||
]
|
||||
))
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."x11-locale".source = toString pkgs.xorg.libX11 + "share/X11/locale";
|
||||
|
||||
home-manager.users.me = {
|
||||
home.file = {
|
||||
".XCompose".source = ./XCompose;
|
||||
};
|
||||
home.file =
|
||||
lib.mapAttrs' (name: path: lib.nameValuePair ".xkb/symbols/${name}" { source = path; })
|
||||
(lib.recursiveUpdate (lib.filterAttrs (_: value: !(value ? "code")) languages) {
|
||||
".xkb/symbols/ir".source = ../lib/keyboards/farsi;
|
||||
});
|
||||
};
|
||||
|
||||
console.keyMap = "de";
|
||||
@@ -121,7 +118,7 @@ in
|
||||
swaymsg -s $SWAYSOCK 'input * xkb_options "${lib.concatStringsSep "," xkbOptions}"'
|
||||
fi
|
||||
''
|
||||
) (languages // config.services.xserver.xkb.extraLayouts);
|
||||
) languages;
|
||||
|
||||
# improve held key rate
|
||||
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
||||
@@ -2,9 +2,10 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
environment.shellAliases.smpv = swallow "mpv";
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
let
|
||||
myceliumAddresses = import ../lib/mycelium-network.nix;
|
||||
in
|
||||
{
|
||||
services.mycelium = {
|
||||
enable = true;
|
||||
@@ -8,5 +11,5 @@
|
||||
networking.hosts = lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = [ "${name}.m" ];
|
||||
}) pkgs.lib.niveum.myceliumAddresses;
|
||||
}) myceliumAddresses;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
@@ -35,7 +36,7 @@
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
||||
(pkgs.vim-kmein.override {
|
||||
(niveumPackages.vim.override {
|
||||
# stylixColors = config.lib.stylix.colors;
|
||||
colorscheme = "base16-gruvbox-dark-medium";
|
||||
})
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
worldradio = pkgs.callPackage ../packages/worldradio.nix {};
|
||||
|
||||
externalNetwork = import ../lib/external-network.nix;
|
||||
|
||||
zoteroStyle = {
|
||||
name,
|
||||
sha256,
|
||||
@@ -106,7 +109,7 @@ in {
|
||||
calibre
|
||||
electrum
|
||||
inkscape
|
||||
gimp
|
||||
niveumPackages.gimp
|
||||
gthumb
|
||||
astrolog
|
||||
obsidian
|
||||
@@ -117,7 +120,7 @@ in {
|
||||
zoom-us # video conferencing
|
||||
(pkgs.writers.writeDashBin "im" ''
|
||||
weechat_password=$(${pkgs.pass}/bin/pass weechat)
|
||||
exec ${weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${pkgs.lib.niveum.systems.makanek.externalIp}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
||||
exec ${weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${externalNetwork.makanek}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
||||
'')
|
||||
alejandra # nix formatter
|
||||
pdfgrep # search in pdf
|
||||
@@ -127,59 +130,60 @@ in {
|
||||
kdePackages.okular # the word is nucular
|
||||
xournalpp # for annotating pdfs
|
||||
pdfpc # presenter console for pdf slides
|
||||
hc # print files as qr codes
|
||||
niveumPackages.hc # print files as qr codes
|
||||
yt-dlp
|
||||
espeak
|
||||
rink # unit converter
|
||||
auc
|
||||
noise-waves
|
||||
stag
|
||||
cheat-sh
|
||||
polyglot
|
||||
qrpaste
|
||||
ttspaste
|
||||
new-mac # get a new mac address
|
||||
scanned
|
||||
default-gateway
|
||||
kirciuoklis
|
||||
image-convert-favicon
|
||||
heuretes
|
||||
ipa # XSAMPA to IPA converter
|
||||
pls
|
||||
mpv-tv
|
||||
mpv-iptv
|
||||
devanagari
|
||||
betacode # ancient greek betacode to unicode converter
|
||||
jq-lsp
|
||||
swallow # window swallowing
|
||||
literature-quote
|
||||
booksplit
|
||||
dmenu-randr
|
||||
manual-sort
|
||||
wttr
|
||||
unicodmenu
|
||||
emailmenu
|
||||
closest
|
||||
trans
|
||||
(mpv-radio.override {
|
||||
niveumPackages.auc
|
||||
niveumPackages.noise-waves
|
||||
niveumPackages.stag
|
||||
niveumPackages.cheat-sh
|
||||
niveumPackages.polyglot
|
||||
niveumPackages.qrpaste
|
||||
niveumPackages.ttspaste
|
||||
niveumPackages.new-mac # get a new mac address
|
||||
niveumPackages.scanned
|
||||
niveumPackages.default-gateway
|
||||
niveumPackages.kirciuoklis
|
||||
niveumPackages.image-convert-favicon
|
||||
niveumPackages.heuretes
|
||||
niveumPackages.ipa # XSAMPA to IPA converter
|
||||
niveumPackages.pls
|
||||
niveumPackages.mpv-tv
|
||||
niveumPackages.mpv-iptv
|
||||
niveumPackages.devanagari
|
||||
niveumPackages.betacode # ancient greek betacode to unicode converter
|
||||
pkgs.jq-lsp
|
||||
niveumPackages.swallow # window swallowing
|
||||
niveumPackages.literature-quote
|
||||
niveumPackages.booksplit
|
||||
niveumPackages.dmenu-randr
|
||||
niveumPackages.manual-sort
|
||||
niveumPackages.wttr
|
||||
niveumPackages.unicodmenu
|
||||
niveumPackages.emailmenu
|
||||
niveumPackages.closest
|
||||
niveumPackages.trans
|
||||
(niveumPackages.mpv-radio.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
})
|
||||
(mpv-radio.override {
|
||||
(niveumPackages.mpv-radio.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
executableName = "cro-radio";
|
||||
mpvCommand = "${cro}/bin/cro";
|
||||
mpvCommand = "${niveumPackages.cro}/bin/cro";
|
||||
})
|
||||
(mpv-tuner.override {
|
||||
(niveumPackages.mpv-tuner.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
})
|
||||
# kmein.slide
|
||||
termdown
|
||||
image-convert-tolino
|
||||
rfc
|
||||
tag
|
||||
timer
|
||||
niveumPackages.image-convert-tolino
|
||||
niveumPackages.rfc
|
||||
niveumPackages.tag
|
||||
niveumPackages.timer
|
||||
niveumPackages.menu-calc
|
||||
nix-prefetch-git
|
||||
nix-git
|
||||
niveumPackages.nix-git
|
||||
nixfmt-rfc-style
|
||||
par
|
||||
qrencode
|
||||
@@ -235,7 +239,7 @@ in {
|
||||
latexrun
|
||||
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
|
||||
# haskellPackages.pandoc-citeproc
|
||||
text2pdf
|
||||
niveumPackages.text2pdf
|
||||
lowdown
|
||||
glow # markdown to term
|
||||
libreoffice
|
||||
@@ -243,7 +247,7 @@ in {
|
||||
dia
|
||||
pandoc
|
||||
librsvg # pandoc depends on this to include SVG in documents
|
||||
# man-pandoc
|
||||
# niveumPackages.man-pandoc
|
||||
typst
|
||||
# proselint
|
||||
asciidoctor
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{pkgs, lib, ...}: let
|
||||
{pkgs, ...}: let
|
||||
inherit (import ../lib) localAddresses;
|
||||
hp-driver = pkgs.hplip;
|
||||
in {
|
||||
services.printing = {
|
||||
@@ -17,7 +18,7 @@ in {
|
||||
{
|
||||
name = "OfficeJet";
|
||||
location = "Zimmer";
|
||||
deviceUri = "https://${pkgs.lib.niveum.localAddresses.officejet}";
|
||||
deviceUri = "https://${localAddresses.officejet}";
|
||||
model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd";
|
||||
ppdOptions = {
|
||||
Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
users.users.me.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys;
|
||||
{pkgs, ...}: let
|
||||
inherit (import ../lib) sshPort kieran;
|
||||
externalNetwork = import ../lib/external-network.nix;
|
||||
in {
|
||||
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
|
||||
programs.ssh.startAgent = true;
|
||||
services.gnome.gcr-ssh-agent.enable = false;
|
||||
|
||||
@@ -23,42 +25,42 @@
|
||||
zaatar = {
|
||||
hostname = "zaatar.r";
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
makanek = {
|
||||
hostname = pkgs.lib.niveum.externalNetwork.makanek;
|
||||
hostname = externalNetwork.makanek;
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
ful = {
|
||||
hostname = pkgs.lib.niveum.externalNetwork.ful;
|
||||
hostname = externalNetwork.ful;
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
tahina = {
|
||||
hostname = "tahina.r";
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
tabula = {
|
||||
hostname = "tabula.r";
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
manakish = {
|
||||
hostname = "manakish.r";
|
||||
user = "kfm";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
kabsa = {
|
||||
hostname = "kabsa.r";
|
||||
user = "kfm";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
fatteh = {
|
||||
hostname = "fatteh.r";
|
||||
user = "kfm";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: let
|
||||
inherit (import ../lib) sshPort kieran;
|
||||
in {
|
||||
users.motd = "Welcome to ${config.networking.hostName}!";
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ pkgs.lib.niveum.sshPort ];
|
||||
ports = [sshPort];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
X11Forwarding = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys ++ [
|
||||
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys ++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoiRIn1dBUtpApcUyGbZKN+m5KBSgKIDQjdnQ8vU0xU kfm@kibbeh" # travel laptop
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
...
|
||||
}: let
|
||||
username = "meinhak99";
|
||||
inherit (import ../lib/email.nix) defaults pronouns;
|
||||
inherit (import ../lib) remoteDir;
|
||||
fu-defaults = let mailhost = "mail.zedat.fu-berlin.de"; in {
|
||||
imap.host = mailhost;
|
||||
imap.port = 993;
|
||||
@@ -29,7 +31,7 @@ in {
|
||||
};
|
||||
accounts.email.accounts = {
|
||||
letos =
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
||||
lib.recursiveUpdate defaults
|
||||
{
|
||||
userName = "slfletos";
|
||||
address = "letos.sprachlit@hu-berlin.de";
|
||||
@@ -41,7 +43,7 @@ in {
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
fu =
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
||||
lib.recursiveUpdate defaults
|
||||
(lib.recursiveUpdate fu-defaults
|
||||
(let userName = "meinhak99"; in {
|
||||
userName = userName;
|
||||
@@ -98,7 +100,7 @@ in {
|
||||
firstCharacter = lib.strings.substring 0 1;
|
||||
|
||||
home-directory-mount = user: {
|
||||
"${pkgs.lib.niveum.remoteDir}/fu/${user}/home" = {
|
||||
"${remoteDir}/fu/${user}/home" = {
|
||||
device = "${user}@login.zedat.fu-berlin.de:/home/${firstCharacter user}/${user}";
|
||||
fsType = "sshfs";
|
||||
options = [
|
||||
|
||||
292
flake.nix
292
flake.nix
@@ -53,7 +53,6 @@
|
||||
agenix,
|
||||
retiolum,
|
||||
nixinate,
|
||||
coptic-dictionary,
|
||||
menstruation-backend,
|
||||
menstruation-telegram,
|
||||
scripts,
|
||||
@@ -80,7 +79,8 @@
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
lib.mergeAttrsList [
|
||||
(nixinate.nixinate.x86_64-linux self)
|
||||
nixinate.nixinate.x86_64-linux
|
||||
self
|
||||
{
|
||||
mock-secrets = {
|
||||
type = "app";
|
||||
@@ -152,145 +152,9 @@
|
||||
};
|
||||
|
||||
lib = {
|
||||
panoptikon = import lib/panoptikon.nix;
|
||||
};
|
||||
|
||||
overlays.default = final: prev: {
|
||||
# wrapped from upstream
|
||||
wrapScript =
|
||||
{
|
||||
packages ? [ ],
|
||||
name,
|
||||
script,
|
||||
}:
|
||||
prev.writers.writeDashBin name ''PATH=$PATH:${
|
||||
nixpkgs.lib.makeBinPath (
|
||||
packages
|
||||
++ [
|
||||
final.findutils
|
||||
final.coreutils
|
||||
final.gnused
|
||||
final.gnugrep
|
||||
]
|
||||
)
|
||||
} ${script} "$@"'';
|
||||
tag = final.wrapScript {
|
||||
script = voidrice.outPath + "/.local/bin/tag";
|
||||
name = "tag";
|
||||
packages = [ final.ffmpeg ];
|
||||
};
|
||||
booksplit = final.wrapScript {
|
||||
script = voidrice.outPath + "/.local/bin/booksplit";
|
||||
name = "booksplit";
|
||||
packages = [
|
||||
final.ffmpeg
|
||||
final.glibc.bin
|
||||
];
|
||||
};
|
||||
auc = prev.callPackage packages/auc.nix { };
|
||||
cheat-sh = prev.callPackage packages/cheat-sh.nix { };
|
||||
brassica = prev.callPackage packages/brassica.nix { }; # TODO upstream
|
||||
text2pdf = prev.callPackage packages/text2pdf.nix { }; # TODO upstream
|
||||
wttr = prev.callPackage packages/wttr.nix { }; # TODO upstream
|
||||
jsesh = prev.callPackage packages/jsesh.nix { }; # TODO upstream
|
||||
opustags = prev.callPackage packages/opustags.nix { }; # TODO upstream
|
||||
trans = prev.callPackage packages/trans.nix { }; # TODO upstream
|
||||
go-webring = prev.callPackage packages/go-webring.nix { }; # TODO upstream
|
||||
stag = prev.callPackage packages/stag.nix { }; # TODO upstream
|
||||
mpv = prev.mpv.override {
|
||||
scripts = [
|
||||
final.mpvScripts.visualizer
|
||||
final.mpvScripts.mpris
|
||||
];
|
||||
};
|
||||
cro = prev.callPackage packages/cro.nix { };
|
||||
dmenu = prev.writers.writeDashBin "dmenu" ''exec ${final.rofi}/bin/rofi -dmenu "$@"'';
|
||||
weechatScripts = prev.weechatScripts // {
|
||||
hotlist2extern = prev.callPackage packages/weechatScripts/hotlist2extern.nix { }; # TODO upstream
|
||||
};
|
||||
vimPlugins = prev.vimPlugins // {
|
||||
cheat-sh = prev.callPackage packages/vimPlugins/cheat-sh.nix { };
|
||||
icalendar-vim = prev.callPackage packages/vimPlugins/icalendar-vim.nix { }; # TODO upstream
|
||||
jq-vim = prev.callPackage packages/vimPlugins/jq-vim.nix { }; # TODO upstream
|
||||
typst-vim = prev.callPackage packages/vimPlugins/typst-vim.nix { }; # TODO upstream
|
||||
mdwa-nvim = prev.callPackage packages/vimPlugins/mdwa-nvim.nix { }; # TODO upstream
|
||||
vim-ernest = prev.callPackage packages/vimPlugins/vim-ernest.nix { }; # TODO upstream
|
||||
vim-256noir = prev.callPackage packages/vimPlugins/vim-256noir.nix { }; # TODO upstream
|
||||
vim-colors-paramount =
|
||||
prev.callPackage packages/vimPlugins/vim-colors-paramount.nix { }; # TODO upstream
|
||||
vim-fetch = prev.callPackage packages/vimPlugins/vim-fetch.nix { }; # TODO upstream
|
||||
vim-fsharp = prev.callPackage packages/vimPlugins/vim-fsharp.nix { }; # TODO upstream
|
||||
vim-mail = prev.callPackage packages/vimPlugins/vim-mail.nix { }; # TODO upstream
|
||||
vim-reason-plus = prev.callPackage packages/vimPlugins/vim-reason-plus.nix { }; # TODO upstream
|
||||
};
|
||||
|
||||
# krebs
|
||||
brainmelter = prev.callPackage packages/brainmelter.nix { };
|
||||
cyberlocker-tools = prev.callPackage packages/cyberlocker-tools.nix { };
|
||||
hc = prev.callPackage packages/hc.nix { };
|
||||
pls = prev.callPackage packages/pls.nix { };
|
||||
radio-news = prev.callPackage packages/radio-news { };
|
||||
untilport = prev.callPackage packages/untilport.nix { };
|
||||
weechat-declarative = prev.callPackage packages/weechat-declarative.nix {};
|
||||
|
||||
# my packages
|
||||
betacode = prev.callPackage packages/betacode.nix { };
|
||||
closest = prev.callPackage packages/closest { };
|
||||
default-gateway = prev.callPackage packages/default-gateway.nix { };
|
||||
depp = prev.callPackage packages/depp.nix { };
|
||||
devanagari = prev.callPackage packages/devanagari { };
|
||||
radioStreams = prev.callPackage packages/streams {};
|
||||
devour = prev.callPackage packages/devour.nix { };
|
||||
dmenu-randr = prev.callPackage packages/dmenu-randr.nix { };
|
||||
emailmenu = prev.callPackage packages/emailmenu.nix { };
|
||||
fkill = prev.callPackage packages/fkill.nix { };
|
||||
fzfmenu = prev.callPackage packages/fzfmenu.nix { };
|
||||
gfs-fonts = prev.callPackage packages/gfs-fonts.nix { };
|
||||
heuretes = prev.callPackage packages/heuretes.nix { };
|
||||
image-convert-favicon = prev.callPackage packages/image-convert-favicon.nix { };
|
||||
image-convert-tolino = prev.callPackage packages/image-convert-tolino.nix { };
|
||||
ipa = prev.writers.writePython3Bin "ipa" { flakeIgnore = [ "E501" ]; } packages/ipa.py;
|
||||
kirciuoklis = prev.callPackage packages/kirciuoklis.nix { };
|
||||
kpaste = prev.callPackage packages/kpaste.nix { };
|
||||
literature-quote = prev.callPackage packages/literature-quote.nix { };
|
||||
man-pdf = prev.callPackage packages/man-pdf.nix { };
|
||||
mansplain = prev.callPackage packages/mansplain.nix { };
|
||||
manual-sort = prev.callPackage packages/manual-sort.nix { };
|
||||
mpv-iptv = prev.callPackage packages/mpv-iptv.nix { };
|
||||
mpv-radio = prev.callPackage packages/mpv-radio.nix { di-fm-key-file = "/dev/null"; };
|
||||
mpv-tuner = prev.callPackage packages/mpv-tuner.nix { di-fm-key-file = "/dev/null"; };
|
||||
mpv-tv = prev.callPackage packages/mpv-tv.nix { };
|
||||
new-mac = prev.callPackage packages/new-mac.nix { };
|
||||
nix-git = prev.callPackage packages/nix-git.nix { };
|
||||
noise-waves = prev.callPackage packages/noise-waves.nix { };
|
||||
notemenu = prev.callPackage packages/notemenu.nix { };
|
||||
obsidian-vim = prev.callPackage packages/obsidian-vim.nix { };
|
||||
polyglot = prev.callPackage packages/polyglot.nix { };
|
||||
q = prev.callPackage packages/q.nix { };
|
||||
qrpaste = prev.callPackage packages/qrpaste.nix { };
|
||||
random-zeno = prev.callPackage packages/random-zeno.nix { };
|
||||
scanned = prev.callPackage packages/scanned.nix { };
|
||||
stardict-tools = prev.callPackage packages/stardict-tools.nix { };
|
||||
swallow = prev.callPackage packages/swallow.nix { };
|
||||
tocharian-font = prev.callPackage packages/tocharian-font.nix { };
|
||||
ttspaste = prev.callPackage packages/ttspaste.nix { };
|
||||
unicodmenu = prev.callPackage packages/unicodmenu.nix { };
|
||||
vg = prev.callPackage packages/vg.nix { };
|
||||
vim-kmein = prev.callPackage packages/vim-kmein {};
|
||||
vimv = prev.callPackage packages/vimv.nix { };
|
||||
klem = prev.callPackage packages/klem.nix { };
|
||||
|
||||
lib = lib // {
|
||||
niveum = import lib/default.nix {
|
||||
inherit lib;
|
||||
pkgs = final;
|
||||
};
|
||||
panoptikon = import lib/panoptikon.nix {
|
||||
inherit lib;
|
||||
pkgs = final;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations =
|
||||
let
|
||||
niveumSpecialArgs = system: {
|
||||
@@ -304,6 +168,9 @@
|
||||
"zoom"
|
||||
];
|
||||
};
|
||||
|
||||
niveumPackages = self.packages.${system};
|
||||
niveumLib = self.lib;
|
||||
inputs = {
|
||||
inherit
|
||||
tinc-graph
|
||||
@@ -312,7 +179,6 @@
|
||||
menstruation-telegram
|
||||
menstruation-backend
|
||||
scripts
|
||||
coptic-dictionary
|
||||
agenix
|
||||
recht
|
||||
autorenkalender
|
||||
@@ -327,7 +193,6 @@
|
||||
system = "aarch64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/ful/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
self.nixosModules.passport
|
||||
@@ -352,7 +217,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/zaatar/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
@@ -362,7 +226,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/kibbeh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
@@ -374,7 +237,6 @@
|
||||
# for using inputs in other config files
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/makanek/configuration.nix
|
||||
self.nixosModules.telegram-bot
|
||||
self.nixosModules.passport
|
||||
@@ -387,7 +249,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/tahina/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
@@ -397,7 +258,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/tabula/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
@@ -407,7 +267,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/manakish/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
@@ -421,7 +280,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/kabsa/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
@@ -435,7 +293,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/fatteh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
@@ -455,12 +312,145 @@
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
nur.overlays.default
|
||||
self.overlays.default
|
||||
(self: super: {
|
||||
mpv = super.mpv.override {
|
||||
scripts = [
|
||||
super.mpvScripts.visualizer
|
||||
super.mpvScripts.mpris
|
||||
];
|
||||
};
|
||||
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
||||
})
|
||||
];
|
||||
};
|
||||
wrapScript =
|
||||
{
|
||||
packages ? [ ],
|
||||
name,
|
||||
script,
|
||||
}:
|
||||
pkgs.writers.writeDashBin name ''PATH=$PATH:${
|
||||
nixpkgs.lib.makeBinPath (
|
||||
packages
|
||||
++ [
|
||||
pkgs.findutils
|
||||
pkgs.coreutils
|
||||
pkgs.gnused
|
||||
pkgs.gnugrep
|
||||
]
|
||||
)
|
||||
} ${script} "$@"'';
|
||||
in
|
||||
{
|
||||
inherit (pkgs) auc swallow cheat-sh hc kpaste noise-waves trans stag qrpaste new-mac scanned default-gateway kirciuoklis tocharian-font image-convert-favicon image-convert-tolino heuretes mpv-tv mpv-iptv devanagari literature-quote booksplit manual-sort wttr emailmenu closest mpv-radio mpv-tuner cro nix-git text2pdf betacode brassica ipa polyglot jsesh gfs-fonts vim-kmein vimv brainmelter cyberlocker-tools pls untilport radio-news vg ttspaste depp fkill fzfmenu unicodmenu dmenu-randr notemenu man-pdf mansplain opustags q timer rfc gimp obsidian-vim devour go-webring random-zeno stardict-tools weechat-declarative klem radioStreams;
|
||||
# linguistics and ancient world
|
||||
auc = pkgs.callPackage packages/auc.nix { };
|
||||
betacode = pkgs.callPackage packages/betacode.nix { };
|
||||
brassica = pkgs.callPackage packages/brassica.nix { }; # TODO upstream
|
||||
devanagari = pkgs.callPackage packages/devanagari { };
|
||||
stardict-tools = pkgs.callPackage packages/stardict-tools.nix { };
|
||||
heuretes = pkgs.callPackage packages/heuretes.nix { };
|
||||
ipa = pkgs.writers.writePython3Bin "ipa" { flakeIgnore = [ "E501" ]; } (
|
||||
builtins.readFile packages/ipa.py
|
||||
);
|
||||
jsesh = pkgs.callPackage packages/jsesh.nix { }; # TODO upstream
|
||||
kirciuoklis = pkgs.callPackage packages/kirciuoklis.nix { };
|
||||
polyglot = pkgs.callPackage packages/polyglot.nix { };
|
||||
tocharian-font = pkgs.callPackage packages/tocharian-font.nix { };
|
||||
gfs-fonts = pkgs.callPackage packages/gfs-fonts.nix { };
|
||||
closest = pkgs.callPackage packages/closest { };
|
||||
|
||||
# lit
|
||||
random-zeno = pkgs.callPackage packages/random-zeno.nix { };
|
||||
literature-quote = pkgs.callPackage packages/literature-quote.nix { };
|
||||
|
||||
# krebs
|
||||
brainmelter = pkgs.callPackage packages/brainmelter.nix { };
|
||||
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix { };
|
||||
hc = pkgs.callPackage packages/hc.nix { };
|
||||
kpaste = pkgs.callPackage packages/kpaste.nix { };
|
||||
pls = pkgs.callPackage packages/pls.nix { };
|
||||
untilport = pkgs.callPackage packages/untilport.nix { };
|
||||
radio-news = pkgs.callPackage packages/radio-news.nix { };
|
||||
|
||||
# window manager
|
||||
swallow = pkgs.callPackage packages/swallow.nix { };
|
||||
devour = pkgs.callPackage packages/devour.nix { };
|
||||
|
||||
cheat-sh = pkgs.callPackage packages/cheat-sh.nix { };
|
||||
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix { }; # TODO upstream
|
||||
cro = pkgs.callPackage packages/cro.nix { };
|
||||
default-gateway = pkgs.callPackage packages/default-gateway.nix { };
|
||||
depp = pkgs.callPackage packages/depp.nix { };
|
||||
fkill = pkgs.callPackage packages/fkill.nix { };
|
||||
fzfmenu = pkgs.callPackage packages/fzfmenu.nix { };
|
||||
gpt35 = pkgs.callPackage packages/gpt.nix { model = "gpt-3.5-turbo"; };
|
||||
gpt4 = pkgs.callPackage packages/gpt.nix { model = "gpt-4"; };
|
||||
image-convert-favicon = pkgs.callPackage packages/image-convert-favicon.nix { };
|
||||
image-convert-tolino = pkgs.callPackage packages/image-convert-tolino.nix { };
|
||||
k-lock = pkgs.callPackage packages/k-lock.nix { };
|
||||
klem = pkgs.callPackage packages/klem.nix { };
|
||||
man-pandoc = pkgs.callPackage packages/man/pandoc.nix { }; # TODO upstream
|
||||
man-pdf = pkgs.callPackage packages/man-pdf.nix { };
|
||||
mansplain = pkgs.callPackage packages/mansplain.nix { };
|
||||
manual-sort = pkgs.callPackage packages/manual-sort.nix { };
|
||||
menu-calc = pkgs.callPackage packages/menu-calc.nix { };
|
||||
noise-waves = pkgs.callPackage packages/noise-waves.nix { };
|
||||
mpv-radio = pkgs.callPackage packages/mpv-radio.nix { di-fm-key-file = "/dev/null"; };
|
||||
mpv-tuner = pkgs.callPackage packages/mpv-tuner.nix { di-fm-key-file = "/dev/null"; };
|
||||
mpv-tv = pkgs.callPackage packages/mpv-tv.nix { };
|
||||
mpv-iptv = pkgs.callPackage packages/mpv-iptv.nix { };
|
||||
new-mac = pkgs.callPackage packages/new-mac.nix { };
|
||||
nix-git = pkgs.callPackage packages/nix-git.nix { };
|
||||
notemenu = pkgs.callPackage packages/notemenu.nix { niveumPackages = self.packages.${system}; };
|
||||
opustags = pkgs.callPackage packages/opustags.nix { }; # TODO upstream
|
||||
q = pkgs.callPackage packages/q.nix { };
|
||||
qrpaste = pkgs.callPackage packages/qrpaste.nix { };
|
||||
go-webring = pkgs.callPackage packages/go-webring.nix { }; # TODO upstream
|
||||
rfc = pkgs.callPackage packages/rfc.nix { };
|
||||
gimp = pkgs.callPackage packages/gimp.nix { };
|
||||
scanned = pkgs.callPackage packages/scanned.nix { };
|
||||
text2pdf = pkgs.callPackage packages/text2pdf.nix { }; # TODO upstream
|
||||
timer = pkgs.callPackage packages/timer.nix { };
|
||||
trans = pkgs.callPackage packages/trans.nix { }; # TODO upstream
|
||||
ttspaste = pkgs.callPackage packages/ttspaste.nix { };
|
||||
unicodmenu = pkgs.callPackage packages/unicodmenu.nix { };
|
||||
emailmenu = pkgs.callPackage packages/emailmenu.nix { };
|
||||
stag = pkgs.callPackage packages/stag.nix { }; # TODO upstream
|
||||
vg = pkgs.callPackage packages/vg.nix { };
|
||||
vim = pkgs.callPackage packages/vim.nix { niveumPackages = self.packages.${system}; };
|
||||
obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix { };
|
||||
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix { }; # TODO upstream
|
||||
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix { }; # TODO upstream
|
||||
vimPlugins-typst-vim = pkgs.callPackage packages/vimPlugins/typst-vim.nix { }; # TODO upstream
|
||||
vimPlugins-mdwa-nvim = pkgs.callPackage packages/vimPlugins/mdwa-nvim.nix { }; # TODO upstream
|
||||
vimPlugins-vim-ernest = pkgs.callPackage packages/vimPlugins/vim-ernest.nix { }; # TODO upstream
|
||||
vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix { }; # TODO upstream
|
||||
vimPlugins-vim-colors-paramount =
|
||||
pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix
|
||||
{ }; # TODO upstream
|
||||
vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix { }; # TODO upstream
|
||||
vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix { }; # TODO upstream
|
||||
vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix { }; # TODO upstream
|
||||
vimPlugins-vim-reason-plus = pkgs.callPackage packages/vimPlugins/vim-reason-plus.nix { }; # TODO upstream
|
||||
vimv = pkgs.callPackage packages/vimv.nix { };
|
||||
weechat-declarative = pkgs.callPackage packages/weechat-declarative.nix { }; # TODO upstream
|
||||
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix { }; # TODO upstream
|
||||
dmenu-randr = pkgs.callPackage packages/dmenu-randr.nix { };
|
||||
wttr = pkgs.callPackage packages/wttr.nix { }; # TODO upstream
|
||||
|
||||
booksplit = wrapScript {
|
||||
script = voidrice.outPath + "/.local/bin/booksplit";
|
||||
name = "booksplit";
|
||||
packages = [
|
||||
pkgs.ffmpeg
|
||||
pkgs.glibc.bin
|
||||
];
|
||||
};
|
||||
tag = wrapScript {
|
||||
script = voidrice.outPath + "/.local/bin/tag";
|
||||
name = "tag";
|
||||
packages = [ pkgs.ffmpeg ];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
5
lib/default-applications.nix
Normal file
5
lib/default-applications.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
pkgs: {
|
||||
terminal = "alacritty";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
fileManager = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
}
|
||||
118
lib/default.nix
118
lib/default.nix
@@ -1,40 +1,27 @@
|
||||
{ lib, pkgs }:
|
||||
let
|
||||
systems = import ./systems.nix;
|
||||
in
|
||||
{
|
||||
tmpfilesConfig =
|
||||
{
|
||||
type,
|
||||
path,
|
||||
mode ? "-",
|
||||
user ? "-",
|
||||
group ? "-",
|
||||
age ? "-",
|
||||
argument ? "-",
|
||||
}:
|
||||
"${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
|
||||
tmpfilesConfig = {
|
||||
type,
|
||||
path,
|
||||
mode ? "-",
|
||||
user ? "-",
|
||||
group ? "-",
|
||||
age ? "-",
|
||||
argument ? "-",
|
||||
}: "${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
|
||||
|
||||
restic =
|
||||
let
|
||||
host = "zaatar.r";
|
||||
port = 3571;
|
||||
in
|
||||
{
|
||||
inherit host port;
|
||||
repository = "rest:http://${host}:${toString port}/";
|
||||
};
|
||||
restic = let host = "zaatar.r"; port = 3571; in {
|
||||
inherit host port;
|
||||
repository = "rest:http://${host}:${toString port}/";
|
||||
};
|
||||
|
||||
remoteDir = "/home/kfm/remote";
|
||||
|
||||
firewall = {
|
||||
accept =
|
||||
{
|
||||
source,
|
||||
protocol,
|
||||
dport,
|
||||
}:
|
||||
"nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
|
||||
firewall = lib: {
|
||||
accept = {
|
||||
source,
|
||||
protocol,
|
||||
dport,
|
||||
}: "nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
|
||||
addRules = lib.concatMapStringsSep "\n" (rule: "iptables -A ${rule}");
|
||||
removeRules = lib.concatMapStringsSep "\n" (rule: "iptables -D ${rule} || true");
|
||||
};
|
||||
@@ -54,7 +41,7 @@ in
|
||||
|
||||
sshPort = 22022;
|
||||
|
||||
theme = {
|
||||
theme = pkgs: {
|
||||
gtk = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
@@ -69,69 +56,32 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
defaultApplications = {
|
||||
terminal = "alacritty";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
fileManager = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
};
|
||||
defaultApplications = import ./default-applications.nix;
|
||||
|
||||
retiolumAddresses = lib.mapAttrs (_: v: { inherit (v.retiolum) ipv4 ipv6; }) (
|
||||
lib.filterAttrs (_: v: v ? "retiolum") systems
|
||||
);
|
||||
externalNetwork = lib.mapAttrs (_: v: v.externalIp) (
|
||||
lib.filterAttrs (_: v: v ? "externalIp") systems
|
||||
);
|
||||
localAddresses = lib.mapAttrs (_: v: v.internalIp) (
|
||||
lib.filterAttrs (_: v: v ? "internalIp") systems
|
||||
);
|
||||
myceliumAddresses = lib.mapAttrs (_: v: v.mycelium.ipv6) (
|
||||
lib.filterAttrs (_: v: v ? "mycelium") systems
|
||||
);
|
||||
syncthingIds = lib.mapAttrs (_: v: { id = v.syncthingId; }) (
|
||||
lib.filterAttrs (_: v: v ? "syncthingId") systems
|
||||
);
|
||||
retiolumAddresses = import ./retiolum-network.nix;
|
||||
|
||||
email =
|
||||
let
|
||||
thunderbirdProfile = "donnervogel";
|
||||
in
|
||||
{
|
||||
inherit thunderbirdProfile;
|
||||
defaults = {
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles = [ thunderbirdProfile ];
|
||||
};
|
||||
aerc.enable = true;
|
||||
realName = "Kierán Meinhardt";
|
||||
folders.inbox = "INBOX";
|
||||
};
|
||||
};
|
||||
localAddresses = import ./local-network.nix;
|
||||
|
||||
systems = systems;
|
||||
email-sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKz33wHtPuIfgXEb0+hybxFGV9ZuPsDTLUZo/+hlcdA";
|
||||
|
||||
kieran = {
|
||||
github = "kmein";
|
||||
email = "kmein@posteo.de";
|
||||
name = "Kierán Meinhardt";
|
||||
pronouns = builtins.concatStringsSep "/" [
|
||||
"er"
|
||||
"he"
|
||||
"is"
|
||||
"οὗτος"
|
||||
"هو"
|
||||
"ⲛ̄ⲧⲟϥ"
|
||||
"он"
|
||||
"han"
|
||||
"सः"
|
||||
];
|
||||
sshKeys = [
|
||||
systems.fatteh.sshKey
|
||||
systems.manakish.sshKey
|
||||
systems.kabsa.sshKey
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk" # kabsa
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB" # manakish
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y" # fatteh
|
||||
];
|
||||
};
|
||||
|
||||
syncthing.devices = {
|
||||
kabsa.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||
kibbeh.id = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
||||
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||
fatteh.id = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC";
|
||||
};
|
||||
|
||||
ignorePaths = [
|
||||
"*~"
|
||||
".stack-work/"
|
||||
|
||||
26
lib/email.nix
Normal file
26
lib/email.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
let
|
||||
thunderbirdProfile = "donnervogel";
|
||||
in
|
||||
{
|
||||
inherit thunderbirdProfile;
|
||||
pronouns = builtins.concatStringsSep "/" [
|
||||
"er"
|
||||
"he"
|
||||
"is"
|
||||
"οὗτος"
|
||||
"هو"
|
||||
"ⲛ̄ⲧⲟϥ"
|
||||
"он"
|
||||
"han"
|
||||
"सः"
|
||||
];
|
||||
defaults = {
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles = [ thunderbirdProfile ];
|
||||
};
|
||||
aerc.enable = true;
|
||||
realName = "Kierán Meinhardt";
|
||||
folders.inbox = "INBOX";
|
||||
};
|
||||
}
|
||||
4
lib/external-network.nix
Normal file
4
lib/external-network.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
ful = "130.61.217.114";
|
||||
makanek = "88.99.83.173";
|
||||
}
|
||||
182
lib/goldendict-config.nix
Normal file
182
lib/goldendict-config.nix
Normal file
@@ -0,0 +1,182 @@
|
||||
{
|
||||
pkgs,
|
||||
path,
|
||||
}: ''
|
||||
<config>
|
||||
<paths>
|
||||
<path recursive="1">${path}</path>
|
||||
</paths>
|
||||
<sounddirs/>
|
||||
<dictionaryOrder name="" id="0">
|
||||
<mutedDictionaries/>
|
||||
</dictionaryOrder>
|
||||
<inactiveDictionaries name="" id="0">
|
||||
<mutedDictionaries/>
|
||||
</inactiveDictionaries>
|
||||
<groups nextId="1"/>
|
||||
<hunspell dictionariesPath=""/>
|
||||
<transliteration>
|
||||
<enableRussianTransliteration>0</enableRussianTransliteration>
|
||||
<enableGermanTransliteration>0</enableGermanTransliteration>
|
||||
<enableGreekTransliteration>0</enableGreekTransliteration>
|
||||
<enableBelarusianTransliteration>0</enableBelarusianTransliteration>
|
||||
<chinese>
|
||||
<enable>0</enable>
|
||||
<enableSCToTWConversion>1</enableSCToTWConversion>
|
||||
<enableSCToHKConversion>1</enableSCToHKConversion>
|
||||
<enableTCToSCConversion>1</enableTCToSCConversion>
|
||||
</chinese>
|
||||
<romaji>
|
||||
<enable>0</enable>
|
||||
<enableHepburn>1</enableHepburn>
|
||||
<enableNihonShiki>0</enableNihonShiki>
|
||||
<enableKunreiShiki>0</enableKunreiShiki>
|
||||
<enableHiragana>1</enableHiragana>
|
||||
<enableKatakana>1</enableKatakana>
|
||||
</romaji>
|
||||
</transliteration>
|
||||
<forvo>
|
||||
<enable>0</enable>
|
||||
<apiKey></apiKey>
|
||||
<languageCodes></languageCodes>
|
||||
</forvo>
|
||||
<mediawikis>
|
||||
<mediawiki enabled="0" name="English Wikipedia" icon="" id="ae6f89aac7151829681b85f035d54e48" url="https://en.wikipedia.org/w"/>
|
||||
<mediawiki enabled="0" name="English Wiktionary" icon="" id="affcf9678e7bfe701c9b071f97eccba3" url="https://en.wiktionary.org/w"/>
|
||||
<mediawiki enabled="0" name="German Wikipedia" icon="" id="a8a66331a1242ca2aeb0b4aed361c41d" url="https://de.wikipedia.org/w"/>
|
||||
<mediawiki enabled="0" name="German Wiktionary" icon="" id="21c64bca5ec10ba17ff19f3066bc962a" url="https://de.wiktionary.org/w"/>
|
||||
</mediawikis>
|
||||
<websites>
|
||||
<website enabled="0" name="Google En-En (Oxford)" icon="" id="b88cb2898e634c6638df618528284c2d" url="https://www.google.com/search?q=define:%GDWORD%&hl=en" inside_iframe="1"/>
|
||||
<website enabled="0" name="Urban Dictionary" icon="" id="f376365a0de651fd7505e7e5e683aa45" url="https://www.urbandictionary.com/define.php?term=%GDWORD%" inside_iframe="1"/>
|
||||
<website enabled="0" name="Multitran (En)" icon="" id="324ca0306187df7511b26d3847f4b07c" url="https://multitran.ru/c/m.exe?CL=1&l1=1&s=%GD1251%" inside_iframe="1"/>
|
||||
<website enabled="0" name="Lingvo (En-Ru)" icon="" id="924db471b105299c82892067c0f10787" url="http://lingvopro.abbyyonline.com/en/Search/en-ru/%GDWORD%" inside_iframe="1"/>
|
||||
<website enabled="0" name="Michaelis (Pt-En)" icon="" id="087a6d65615fb047f4c80eef0a9465db" url="http://michaelis.uol.com.br/moderno/ingles/index.php?lingua=portugues-ingles&palavra=%GDISO1%" inside_iframe="1"/>
|
||||
</websites>
|
||||
<dictservers/>
|
||||
<programs>
|
||||
<program enabled="0" name="Espeak" icon="" id="2cf8b3a60f27e1ac812de0b57c148340" commandLine="${pkgs.espeak}/bin/espeak %GDWORD%" type="0"/>
|
||||
<program enabled="0" name="Manpages" icon="" id="4f898f7582596cea518c6b0bfdceb8b3" commandLine="${pkgs.man_db}/bin/man -a --html=/bin/cat %GDWORD%" type="2"/>
|
||||
</programs>
|
||||
<voiceEngines/>
|
||||
<mutedDictionaries/>
|
||||
<popupMutedDictionaries>
|
||||
<mutedDictionary>ae6f89aac7151829681b85f035d54e48</mutedDictionary>
|
||||
</popupMutedDictionaries>
|
||||
<preferences>
|
||||
<interfaceLanguage></interfaceLanguage>
|
||||
<helpLanguage></helpLanguage>
|
||||
<displayStyle>modern</displayStyle>
|
||||
<newTabsOpenAfterCurrentOne>0</newTabsOpenAfterCurrentOne>
|
||||
<newTabsOpenInBackground>1</newTabsOpenInBackground>
|
||||
<hideSingleTab>0</hideSingleTab>
|
||||
<mruTabOrder>0</mruTabOrder>
|
||||
<hideMenubar>0</hideMenubar>
|
||||
<enableTrayIcon>1</enableTrayIcon>
|
||||
<startToTray>1</startToTray>
|
||||
<closeToTray>1</closeToTray>
|
||||
<autoStart>0</autoStart>
|
||||
<doubleClickTranslates>1</doubleClickTranslates>
|
||||
<selectWordBySingleClick>0</selectWordBySingleClick>
|
||||
<escKeyHidesMainWindow>0</escKeyHidesMainWindow>
|
||||
<zoomFactor>1</zoomFactor>
|
||||
<helpZoomFactor>1</helpZoomFactor>
|
||||
<wordsZoomLevel>0</wordsZoomLevel>
|
||||
<enableMainWindowHotkey>1</enableMainWindowHotkey>
|
||||
<mainWindowHotkey>Ctrl+F11, Ctrl+F11</mainWindowHotkey>
|
||||
<enableClipboardHotkey>1</enableClipboardHotkey>
|
||||
<clipboardHotkey>Ctrl+C, Ctrl+C</clipboardHotkey>
|
||||
<enableScanPopup>1</enableScanPopup>
|
||||
<startWithScanPopupOn>0</startWithScanPopupOn>
|
||||
<enableScanPopupModifiers>0</enableScanPopupModifiers>
|
||||
<scanPopupModifiers>0</scanPopupModifiers>
|
||||
<scanPopupAltMode>0</scanPopupAltMode>
|
||||
<scanPopupAltModeSecs>3</scanPopupAltModeSecs>
|
||||
<ignoreOwnClipboardChanges>0</ignoreOwnClipboardChanges>
|
||||
<scanToMainWindow>0</scanToMainWindow>
|
||||
<ignoreDiacritics>0</ignoreDiacritics>
|
||||
<showScanFlag>0</showScanFlag>
|
||||
<scanPopupUseUIAutomation>1</scanPopupUseUIAutomation>
|
||||
<scanPopupUseIAccessibleEx>1</scanPopupUseIAccessibleEx>
|
||||
<scanPopupUseGDMessage>1</scanPopupUseGDMessage>
|
||||
<scanPopupUnpinnedWindowFlags>0</scanPopupUnpinnedWindowFlags>
|
||||
<scanPopupUnpinnedBypassWMHint>0</scanPopupUnpinnedBypassWMHint>
|
||||
<pronounceOnLoadMain>0</pronounceOnLoadMain>
|
||||
<pronounceOnLoadPopup>0</pronounceOnLoadPopup>
|
||||
<useInternalPlayer>1</useInternalPlayer>
|
||||
<internalPlayerBackend>FFmpeg+libao</internalPlayerBackend>
|
||||
<audioPlaybackProgram>mplayer</audioPlaybackProgram>
|
||||
<alwaysOnTop>1</alwaysOnTop>
|
||||
<searchInDock>1</searchInDock>
|
||||
<historyStoreInterval>0</historyStoreInterval>
|
||||
<favoritesStoreInterval>0</favoritesStoreInterval>
|
||||
<confirmFavoritesDeletion>1</confirmFavoritesDeletion>
|
||||
<proxyserver enabled="0" useSystemProxy="0">
|
||||
<type>0</type>
|
||||
<host></host>
|
||||
<port>3128</port>
|
||||
<user></user>
|
||||
<password></password>
|
||||
<systemProxyUser></systemProxyUser>
|
||||
<systemProxyPassword></systemProxyPassword>
|
||||
</proxyserver>
|
||||
<disallowContentFromOtherSites>0</disallowContentFromOtherSites>
|
||||
<enableWebPlugins>0</enableWebPlugins>
|
||||
<hideGoldenDictHeader>0</hideGoldenDictHeader>
|
||||
<maxNetworkCacheSize>50</maxNetworkCacheSize>
|
||||
<clearNetworkCacheOnExit>1</clearNetworkCacheOnExit>
|
||||
<maxStringsInHistory>500</maxStringsInHistory>
|
||||
<storeHistory>1</storeHistory>
|
||||
<alwaysExpandOptionalParts>0</alwaysExpandOptionalParts>
|
||||
<addonStyle></addonStyle>
|
||||
<collapseBigArticles>0</collapseBigArticles>
|
||||
<articleSizeLimit>2000</articleSizeLimit>
|
||||
<limitInputPhraseLength>0</limitInputPhraseLength>
|
||||
<inputPhraseLengthLimit>1000</inputPhraseLengthLimit>
|
||||
<maxDictionaryRefsInContextMenu>20</maxDictionaryRefsInContextMenu>
|
||||
<trackClipboardChanges>0</trackClipboardChanges>
|
||||
<synonymSearchEnabled>1</synonymSearchEnabled>
|
||||
<fullTextSearch>
|
||||
<searchMode>0</searchMode>
|
||||
<matchCase>0</matchCase>
|
||||
<maxArticlesPerDictionary>100</maxArticlesPerDictionary>
|
||||
<maxDistanceBetweenWords>2</maxDistanceBetweenWords>
|
||||
<useMaxArticlesPerDictionary>0</useMaxArticlesPerDictionary>
|
||||
<useMaxDistanceBetweenWords>1</useMaxDistanceBetweenWords>
|
||||
<dialogGeometry></dialogGeometry>
|
||||
<disabledTypes></disabledTypes>
|
||||
<enabled>1</enabled>
|
||||
<ignoreWordsOrder>0</ignoreWordsOrder>
|
||||
<ignoreDiacritics>0</ignoreDiacritics>
|
||||
<maxDictionarySize>0</maxDictionarySize>
|
||||
</fullTextSearch>
|
||||
</preferences>
|
||||
<lastMainGroupId>0</lastMainGroupId>
|
||||
<lastPopupGroupId>0</lastPopupGroupId>
|
||||
<popupWindowState>AAAA/wAAAAH9AAAAAAAAAg0AAAGTAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAQAAAAEAAAAaAGQAaQBjAHQAaQBvAG4AYQByAHkAQgBhAHIDAAAAAP////8AAAAAAAAAAA==</popupWindowState>
|
||||
<popupWindowGeometry>AdnQywADAAAAAAC6AAABEgAAAuYAAAKkAAAAugAAARIAAALmAAACpAAAAAAAAAAABVYAAAC6AAABEgAAAuYAAAKk</popupWindowGeometry>
|
||||
<pinPopupWindow>0</pinPopupWindow>
|
||||
<popupWindowAlwaysOnTop>0</popupWindowAlwaysOnTop>
|
||||
<mainWindowState>AAAA/wAAAAH9AAAAAgAAAAAAAADMAAAC0PwCAAAAAfsAAAAUAHMAZQBhAHIAYwBoAFAAYQBuAGUBAAAAFAAAAtAAAAB9AP///wAAAAEAAADMAAAC0PwCAAAAA/sAAAASAGQAaQBjAHQAcwBQAGEAbgBlAQAAABQAAAFvAAAAYQD////7AAAAGgBmAGEAdgBvAHIAaQB0AGUAcwBQAGEAbgBlAAAAABQAAALQAAAAYQD////7AAAAFgBoAGkAcwB0AG8AcgB5AFAAYQBuAGUBAAABhAAAAWAAAABhAP///wAAA7QAAALQAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAUAG4AYQB2AFQAbwBvAGwAYgBhAHIAAAAAAP////8AAAAAAAAAAAAAABoAZABpAGMAdABpAG8AbgBhAHIAeQBCAGEAcgAAAAAA/////wAAAAAAAAAA</mainWindowState>
|
||||
<mainWindowGeometry>AdnQywADAAAAAAAEAAAAGAAABVEAAAL7AAAABAAAABgAAAVRAAAC+wAAAAAAAAAABVYAAAAEAAAAGAAABVEAAAL7</mainWindowGeometry>
|
||||
<helpWindowGeometry>AdnQywADAAAAAAF3AAAAgwAAA9AAAAJGAAABeAAAAIQAAAPPAAACRQAAAAAAAAAABVYAAAF4AAAAhAAAA88AAAJF</helpWindowGeometry>
|
||||
<helpSplitterState>AAAA/wAAAAEAAAACAAABBAAABAAB/////wEAAAABAA==</helpSplitterState>
|
||||
<dictInfoGeometry>AdnQywADAAAAAAF1AAAAmgAAA84AAAIrAAABdgAAAJsAAAPNAAACKgAAAAAAAAAABVYAAAF2AAAAmwAAA80AAAIq</dictInfoGeometry>
|
||||
<inspectorGeometry></inspectorGeometry>
|
||||
<timeForNewReleaseCheck></timeForNewReleaseCheck>
|
||||
<skippedRelease></skippedRelease>
|
||||
<showingDictBarNames>1</showingDictBarNames>
|
||||
<usingSmallIconsInToolbars>1</usingSmallIconsInToolbars>
|
||||
<editDictionaryCommandLine></editDictionaryCommandLine>
|
||||
<maxPictureWidth>0</maxPictureWidth>
|
||||
<maxHeadwordSize>256</maxHeadwordSize>
|
||||
<maxHeadwordsToExpand>0</maxHeadwordsToExpand>
|
||||
<headwordsDialog>
|
||||
<searchMode>0</searchMode>
|
||||
<matchCase>0</matchCase>
|
||||
<autoApply>0</autoApply>
|
||||
<headwordsExportPath></headwordsExportPath>
|
||||
<headwordsDialogGeometry></headwordsDialogGeometry>
|
||||
</headwordsDialog>
|
||||
</config>
|
||||
''
|
||||
2
lib/home.nix
Normal file
2
lib/home.nix
Normal file
@@ -0,0 +1,2 @@
|
||||
# https://github.com/hercules-ci/gitignore.nix/pull/58/files
|
||||
path: ~/. + path
|
||||
1913
lib/hot-rotation/lyrik.nix
Normal file
1913
lib/hot-rotation/lyrik.nix
Normal file
File diff suppressed because it is too large
Load Diff
23
lib/keyboards/arabic
Normal file
23
lib/keyboards/arabic
Normal file
@@ -0,0 +1,23 @@
|
||||
// Arabic keyboard using Buckwalter transliteration
|
||||
// http://www.qamus.org/transliteration.htm
|
||||
// Martin Vidner
|
||||
// stolen from https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/2505a3ec2605ea7303bc6de68acf96578f0fd424/symbols/ara#L179
|
||||
|
||||
// TODO 06CC ARABIC LETTER FARSI YEH
|
||||
|
||||
default partial alphanumeric_keys
|
||||
xkb_symbols "buckwalter" {
|
||||
include "ara(buckwalter)"
|
||||
name[Group1] = "Arabic (Buckwalter + Persian)";
|
||||
|
||||
key <AE09> {[ 0x1000669, parenleft ] };
|
||||
key <AE10> {[ 0x1000660, parenright ] };
|
||||
key <AD10> {[ Arabic_tehmarbuta, 0x100067E ] }; // پ
|
||||
key <AD11> {[ 0x100200C, 0x1000671 ] }; // alif wasla, ZWNJ
|
||||
key <AD12> {[ 0x10006C0, Arabic_hamzaonyeh ] }; // ۀ
|
||||
key <AC05> {[ Arabic_ghain, 0x10006AF ] }; // گ
|
||||
key <AC07> {[ Arabic_jeem, 0x1000686 ] }; // چ
|
||||
key <AB03> {[ 0x10006A9, 0x1000698 ] }; // ک ژ
|
||||
key <AB04> {[ Arabic_theh, 0x10006A4 ] }; // ڤ
|
||||
key <AB09> {[ period, Arabic_hamzaonalef ] };
|
||||
};
|
||||
4
lib/local-network.nix
Normal file
4
lib/local-network.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
officejet = "192.168.0.251";
|
||||
router = "192.168.0.1";
|
||||
}
|
||||
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";
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
# watcher scripts
|
||||
@@ -29,7 +30,7 @@
|
||||
nick ? ''"$PANOPTIKON_WATCHER"-watcher'',
|
||||
}:
|
||||
pkgs.writers.writeDash "kpaste-irc-reporter" ''
|
||||
KPASTE_CONTENT_TYPE=text/plain ${pkgs.kpaste}/bin/kpaste \
|
||||
KPASTE_CONTENT_TYPE=text/plain ${niveumPackages.kpaste}/bin/kpaste \
|
||||
| ${pkgs.gnused}/bin/sed -n "${
|
||||
if retiolumLink
|
||||
then "2"
|
||||
|
||||
39
lib/retiolum-network.nix
Normal file
39
lib/retiolum-network.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
kabsa = {
|
||||
ipv4 = "10.243.2.4";
|
||||
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
||||
};
|
||||
|
||||
ful = {
|
||||
ipv4 = "10.243.2.107";
|
||||
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
|
||||
};
|
||||
|
||||
zaatar = {
|
||||
ipv4 = "10.243.2.34";
|
||||
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
||||
};
|
||||
|
||||
makanek = {
|
||||
ipv4 = "10.243.2.84";
|
||||
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
|
||||
};
|
||||
|
||||
fatteh = {
|
||||
ipv6 = "42:0:3c46:aa73:82b0:14d7:7bf8:bf2";
|
||||
ipv4 = "10.243.2.77";
|
||||
};
|
||||
|
||||
manakish = {
|
||||
ipv4 = "10.243.2.85";
|
||||
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
|
||||
};
|
||||
tabula = {
|
||||
ipv4 = "10.243.2.78";
|
||||
ipv6 = "";
|
||||
};
|
||||
tahina = {
|
||||
ipv4 = "10.243.2.74";
|
||||
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,73 +0,0 @@
|
||||
{
|
||||
kabsa = {
|
||||
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk";
|
||||
syncthingId = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.4";
|
||||
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
||||
};
|
||||
mycelium.ipv6 = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
|
||||
};
|
||||
manakish = {
|
||||
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB";
|
||||
syncthingId = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.85";
|
||||
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
|
||||
};
|
||||
mycelium.ipv6 = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
|
||||
};
|
||||
fatteh = {
|
||||
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y";
|
||||
syncthingId = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC";
|
||||
retiolum = {
|
||||
ipv6 = "42:0:3c46:aa73:82b0:14d7:7bf8:bf2";
|
||||
ipv4 = "10.243.2.77";
|
||||
};
|
||||
mycelium.ipv6 = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
|
||||
};
|
||||
kibbeh = {
|
||||
syncthingId = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
||||
};
|
||||
ful = {
|
||||
externalIp = "130.61.217.114";
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.107";
|
||||
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
|
||||
};
|
||||
mycelium.ipv6 = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
|
||||
};
|
||||
zaatar = {
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.34";
|
||||
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
||||
};
|
||||
mycelium.ipv6 = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
|
||||
};
|
||||
makanek = {
|
||||
externalIp = "88.99.83.173";
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.84";
|
||||
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
|
||||
};
|
||||
mycelium.ipv6 = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
|
||||
};
|
||||
officejet = {
|
||||
internalIp = "192.168.0.251";
|
||||
};
|
||||
router = {
|
||||
internalIp = "192.168.0.1";
|
||||
};
|
||||
tabula = {
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.78";
|
||||
ipv6 = "";
|
||||
};
|
||||
};
|
||||
tahina = {
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.74";
|
||||
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,36 +1,32 @@
|
||||
# klem < klemm < klemmbrett ~ clipboard
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
dmenu,
|
||||
curl,
|
||||
gnused,
|
||||
coreutils,
|
||||
xclip,
|
||||
libnotify,
|
||||
writers,
|
||||
options ? { },
|
||||
...
|
||||
}: let
|
||||
} @ args: let
|
||||
cfg = eval.config;
|
||||
|
||||
eval = lib.evalModules {
|
||||
modules = [
|
||||
{
|
||||
imports = [options];
|
||||
_file = toString ./klem.nix;
|
||||
imports = [(args.config or {})];
|
||||
options = {
|
||||
selection = lib.mkOption {
|
||||
default = "clipboard";
|
||||
type = lib.types.enum ["primary" "secondary" "clipboard"];
|
||||
};
|
||||
dmenu = lib.mkOption {
|
||||
default = "${dmenu}/bin/dmenu -i -p klem";
|
||||
default = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
type = lib.types.path;
|
||||
};
|
||||
scripts = lib.mkOption {
|
||||
default = {
|
||||
pastebin = "${curl}/bin/curl -fSs -F 'f:1=<-' ix.io";
|
||||
pastebin = "${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io";
|
||||
shorten = ''
|
||||
${curl}/bin/curl -fSs -F "shorten=$(${coreutils}/bin/cat)" https://0x0.st
|
||||
${pkgs.curl}/bin/curl -fSs -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://0x0.st
|
||||
'';
|
||||
"replace p.r" = "${gnused}/bin/sed 's/\\<r\\>/krebsco.de/'";
|
||||
"replace p.r" = "${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'";
|
||||
};
|
||||
type = lib.types.attrs;
|
||||
};
|
||||
@@ -39,21 +35,21 @@
|
||||
];
|
||||
};
|
||||
|
||||
cfg = eval.config;
|
||||
scriptCase = option: script: ''
|
||||
'${option}') ${toString script} ;;
|
||||
'';
|
||||
in
|
||||
writers.writeDashBin "klem" ''
|
||||
pkgs.writers.writeDashBin "klem" ''
|
||||
set -efu
|
||||
|
||||
${xclip}/bin/xclip -selection ${cfg.selection} -out \
|
||||
${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \
|
||||
| case $(echo "${
|
||||
lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)
|
||||
}" | ${cfg.dmenu}) in
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList (option: script: ''
|
||||
'${option}') ${toString script} ;;
|
||||
'') cfg.scripts)}
|
||||
*) ${coreutils}/bin/cat ;;
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)}
|
||||
*) ${pkgs.coreutils}/bin/cat ;;
|
||||
esac \
|
||||
| ${xclip}/bin/xclip -selection ${cfg.selection} -in
|
||||
| ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in
|
||||
|
||||
${libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
|
||||
${pkgs.libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
|
||||
''
|
||||
|
||||
19
packages/man/pandoc.nix
Normal file
19
packages/man/pandoc.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
stdenv,
|
||||
pandoc,
|
||||
lib,
|
||||
fetchgit,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "pandoc-doc";
|
||||
version = pandoc.version;
|
||||
src = fetchgit {
|
||||
url = "https://github.com/jgm/pandoc";
|
||||
rev = pandoc.version;
|
||||
hash = "sha256-4VDfRUr6TyF4oZsCve9t6FlEN0AqzYdlYXRny+SAcsY=";
|
||||
};
|
||||
buildPhase = ''
|
||||
mkdir -p $out/man/man1
|
||||
${pandoc}/bin/pandoc -V section=1 --standalone --write=man $src/MANUAL.txt -o $out/man/man1/pandoc.1
|
||||
'';
|
||||
}
|
||||
21
packages/menu-calc.nix
Normal file
21
packages/menu-calc.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
writers,
|
||||
gnused,
|
||||
pari,
|
||||
dmenu,
|
||||
xclip,
|
||||
}:
|
||||
writers.writeDashBin "=" ''
|
||||
# https://github.com/onespaceman/menu-calc
|
||||
|
||||
answer=$(echo "$@" | ${pari}/bin/gp -q | ${gnused}/bin/sed '/\./ s/\.\{0,1\}0\{1,\}$//')
|
||||
|
||||
action=$(printf "copy\nclear" | ${dmenu}/bin/dmenu -p "= $answer")
|
||||
|
||||
case $action in
|
||||
"clear") $0 ;;
|
||||
"copy") printf %s "$answer" | ${xclip}/bin/xclip -selection clipboard;;
|
||||
"") ;;
|
||||
*) $0 "$answer $action" ;;
|
||||
esac
|
||||
''
|
||||
@@ -1,28 +1,35 @@
|
||||
{
|
||||
writeText,
|
||||
lib,
|
||||
writers,
|
||||
mpv,
|
||||
dmenu,
|
||||
coreutils,
|
||||
gnused,
|
||||
di-fm-key-file,
|
||||
radioStreams,
|
||||
executableName ? "mpv-radio",
|
||||
mpvCommand ? "${mpv}/bin/mpv --force-window=yes",
|
||||
}:
|
||||
let
|
||||
streams = radioStreams.override {
|
||||
mpvCommand ? "${mpv}/bin/mpv --force-window=yes"
|
||||
}: let
|
||||
streams = import ../lib/streams.nix {
|
||||
di-fm-key = "%DI_FM_KEY%";
|
||||
};
|
||||
streams-tsv = writeText "streams.tsv" (lib.concatMapStringsSep "\n" ({
|
||||
desc ? "",
|
||||
stream,
|
||||
station,
|
||||
...
|
||||
}: "${station}\t${desc}\t${stream}")
|
||||
streams);
|
||||
in
|
||||
writers.writeDashBin executableName ''
|
||||
set -x
|
||||
writers.writeDashBin executableName ''
|
||||
set -x
|
||||
|
||||
if [ -z ''${DI_FM_KEY} ]; then
|
||||
DI_FM_KEY=$(cat "${di-fm-key-file}")
|
||||
fi
|
||||
exec ${mpvCommand} "$(
|
||||
${dmenu}/bin/dmenu -i -l 5 < ${streams.tsv} \
|
||||
| ${coreutils}/bin/cut -f3 \
|
||||
| ${gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/
|
||||
)"
|
||||
''
|
||||
if [ -z ''${DI_FM_KEY} ]; then
|
||||
DI_FM_KEY=$(cat "${di-fm-key-file}")
|
||||
fi
|
||||
exec ${mpvCommand} "$(
|
||||
${dmenu}/bin/dmenu -i -l 5 < ${streams-tsv} \
|
||||
| ${coreutils}/bin/cut -f3 \
|
||||
| ${gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/
|
||||
)"
|
||||
''
|
||||
|
||||
@@ -5,19 +5,18 @@
|
||||
mpv,
|
||||
gnused,
|
||||
di-fm-key-file,
|
||||
radioStreams,
|
||||
findutils,
|
||||
}:
|
||||
let
|
||||
streams = radioStreams.override {
|
||||
}: let
|
||||
streams = import ../lib/streams.nix {
|
||||
di-fm-key = "%DI_FM_KEY%";
|
||||
};
|
||||
streams-list = writeText "streams.txt" (lib.concatMapStringsSep "\n" (station: station.stream) streams);
|
||||
in
|
||||
writers.writeDashBin "mpv-tuner" ''
|
||||
if [ -z ''${DI_FM_KEY} ]; then
|
||||
DI_FM_KEY=$(cat "${di-fm-key-file}")
|
||||
fi
|
||||
shuf ${streams.playlist} \
|
||||
| ${gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/ \
|
||||
| ${findutils}/bin/xargs ${mpv}/bin/mpv
|
||||
''
|
||||
writers.writeDashBin "mpv-tuner" ''
|
||||
if [ -z ''${DI_FM_KEY} ]; then
|
||||
DI_FM_KEY=$(cat "${di-fm-key-file}")
|
||||
fi
|
||||
shuf ${streams-list} \
|
||||
| ${gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/ \
|
||||
| ${findutils}/bin/xargs ${mpv}/bin/mpv
|
||||
''
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
coreutils,
|
||||
noteDirectory ? "~/state/obsidian",
|
||||
currentDates ? false,
|
||||
obsidian-vim
|
||||
niveumPackages,
|
||||
}:
|
||||
writers.writeDashBin "notemenu" ''
|
||||
set -efu
|
||||
@@ -24,6 +24,6 @@ writers.writeDashBin "notemenu" ''
|
||||
} | rofi -dmenu -i -p 'notes')
|
||||
if test "$note_file"
|
||||
then
|
||||
alacritty --working-directory ${noteDirectory} -e ${obsidian-vim}/bin/nvim "$note_file"
|
||||
alacritty --working-directory ${noteDirectory} -e ${niveumPackages.obsidian-vim}/bin/nvim "$note_file"
|
||||
fi
|
||||
''
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
neovim.override {
|
||||
configure = {
|
||||
customRC = ''
|
||||
source ${./vim-kmein/shared.vim}
|
||||
source ${../lib/vim/shared.vim}
|
||||
|
||||
cd ${obsidiantVaultDirectory}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
vimPlugins,
|
||||
fetchFromGitHub,
|
||||
vimUtils,
|
||||
niveumPackages,
|
||||
writeText,
|
||||
stylixColors ? null,
|
||||
colorscheme ? null,
|
||||
@@ -11,10 +12,10 @@
|
||||
}: (neovim.override {
|
||||
configure = {
|
||||
customRC = ''
|
||||
source ${./shared.vim}
|
||||
source ${./init.vim}
|
||||
source ${../lib/vim/shared.vim}
|
||||
source ${../lib/vim/init.vim}
|
||||
let g:snippet_directory = '${vimPlugins.friendly-snippets}'
|
||||
luafile ${./init.lua}
|
||||
luafile ${../lib/vim/init.lua}
|
||||
'' + lib.optionalString (stylixColors != null) (with stylixColors.withHashtag; ''
|
||||
luafile ${writeText "colors.lua" ''
|
||||
require('base16-colorscheme').setup({
|
||||
@@ -43,8 +44,8 @@
|
||||
|
||||
goyo
|
||||
limelight-vim
|
||||
vimPlugins.mdwa-nvim
|
||||
vimPlugins.vim-ernest
|
||||
niveumPackages.vimPlugins-mdwa-nvim
|
||||
niveumPackages.vimPlugins-vim-ernest
|
||||
|
||||
fzf-vim
|
||||
fzfWrapper
|
||||
@@ -52,20 +53,20 @@
|
||||
undotree
|
||||
tabular
|
||||
# vimwiki
|
||||
vimPlugins.vim-colors-paramount
|
||||
niveumPackages.vimPlugins-vim-colors-paramount
|
||||
nvim-lspconfig
|
||||
vim-commentary
|
||||
vim-css-color
|
||||
vim-eunuch
|
||||
vimPlugins.vim-fetch
|
||||
niveumPackages.vimPlugins-vim-fetch
|
||||
vim-fugitive
|
||||
vim-gitgutter
|
||||
vim-repeat
|
||||
vim-sensible
|
||||
vim-surround
|
||||
(let version = "1.1.0"; pname = "vim-dim"; in vimUtils.buildVimPlugin {
|
||||
(vimUtils.buildVimPlugin {
|
||||
pname = "vim-dim";
|
||||
version = version;
|
||||
version = "1.1.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jeffkreeftmeijer";
|
||||
repo = pname;
|
||||
@@ -81,8 +82,8 @@
|
||||
emmet-vim
|
||||
vim-elixir
|
||||
haskell-vim
|
||||
vimPlugins.icalendar-vim
|
||||
vimPlugins.jq-vim
|
||||
niveumPackages.vimPlugins-icalendar-vim
|
||||
niveumPackages.vimPlugins-jq-vim
|
||||
rust-vim
|
||||
typescript-vim
|
||||
vim-javascript
|
||||
@@ -91,8 +92,8 @@
|
||||
vimtex
|
||||
vim-pandoc
|
||||
vim-pandoc-syntax
|
||||
vimPlugins.vim-256noir
|
||||
vimPlugins.typst-vim
|
||||
niveumPackages.vimPlugins-vim-256noir
|
||||
niveumPackages.vimPlugins-typst-vim
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -9,7 +9,7 @@
|
||||
config = args.config or {};
|
||||
|
||||
lib =
|
||||
args.lib //
|
||||
lib.recursiveUpdate args.lib
|
||||
(let
|
||||
attrPaths = let
|
||||
recurse = path: value:
|
||||
@@ -18,6 +18,11 @@
|
||||
else [(lib.nameValuePair path value)];
|
||||
in
|
||||
attrs: lib.flatten (recurse [] attrs);
|
||||
in {
|
||||
inherit attrPaths;
|
||||
|
||||
attrPathsSep = sep: attrs: lib.listToAttrs (map (x: x // {name = lib.concatStringsSep sep x.name;}) (attrPaths attrs));
|
||||
|
||||
toWeechatValue = x:
|
||||
{
|
||||
bool = builtins.toJSON x;
|
||||
@@ -26,10 +31,6 @@
|
||||
int = toString x;
|
||||
}
|
||||
.${builtins.typeOf x};
|
||||
in {
|
||||
inherit attrPaths toWeechatValue;
|
||||
|
||||
attrPathsSep = sep: attrs: lib.listToAttrs (map (x: x // {name = lib.concatStringsSep sep x.name;}) (attrPaths attrs));
|
||||
|
||||
setCommand = name: value: "/set ${name} \"${toWeechatValue value}\"";
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../configs/networkmanager.nix
|
||||
@@ -40,7 +42,7 @@
|
||||
};
|
||||
|
||||
networking.hostName = "fatteh";
|
||||
networking.retiolum = pkgs.lib.niveum.retiolumAddresses.fatteh;
|
||||
networking.retiolum = retiolumAddresses.fatteh;
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (import ../../lib) kieran retiolumAddresses restic;
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./matomo.nix
|
||||
@@ -58,7 +60,7 @@
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
inherit (restic) repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -73,7 +75,7 @@
|
||||
firewall.allowedTCPPorts = [80 443];
|
||||
hostName = "ful";
|
||||
interfaces.enp0s3.useDHCP = true;
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.ful;
|
||||
retiolum = retiolumAddresses.ful;
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
@@ -90,7 +92,7 @@
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = pkgs.lib.niveum.kieran.email;
|
||||
defaults.email = kieran.email;
|
||||
};
|
||||
|
||||
users.users.root.hashedPasswordFile = config.age.secrets.root.path;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, niveumPackages ,... }:
|
||||
let
|
||||
port = 2857;
|
||||
in
|
||||
@@ -7,7 +7,7 @@ in
|
||||
enable = true;
|
||||
host = "dichtungsring.kmein.de";
|
||||
listenAddress = "127.0.0.1:${toString port}";
|
||||
package = pkgs.go-webring;
|
||||
package = niveumPackages.go-webring;
|
||||
members = [
|
||||
{ username = "meteora"; site = "meteora.xn--kiern-0qa.de"; }
|
||||
{ username = "huldra"; site = "huldras-halbtraum.com"; }
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{pkgs, lib, ...}: {
|
||||
{pkgs, ...}: let
|
||||
inherit (import ../../lib) kieran;
|
||||
in {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
@@ -10,7 +12,7 @@
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = pkgs.lib.niveum.kieran.email;
|
||||
defaults.email = kieran.email;
|
||||
};
|
||||
|
||||
services.matomo = {
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
niveumLib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
irc-xxx = pkgs.lib.panoptikon.kpaste-irc {
|
||||
panoptikon = niveumLib.panoptikon {inherit pkgs lib niveumPackages config;};
|
||||
|
||||
irc-xxx = panoptikon.kpaste-irc {
|
||||
target = lib.escapeShellArg "#xxx";
|
||||
retiolumLink = true;
|
||||
};
|
||||
@@ -37,7 +41,7 @@
|
||||
| ${pkgs.jq}/bin/jq -e .ok
|
||||
'';
|
||||
|
||||
irc-kmein = pkgs.lib.panoptikon.kpaste-irc {
|
||||
irc-kmein = panoptikon.kpaste-irc {
|
||||
messagePrefix = "$PANOPTIKON_WATCHER: ";
|
||||
target = "kmein";
|
||||
nick = "panoptikon-kmein";
|
||||
@@ -56,7 +60,7 @@ in {
|
||||
enable = true;
|
||||
watchers = {
|
||||
"github-meta" = {
|
||||
script = pkgs.lib.panoptikon.urlJSON {
|
||||
script = panoptikon.urlJSON {
|
||||
jqScript = ''
|
||||
{
|
||||
ssh_key_fingerprints: .ssh_key_fingerprints,
|
||||
@@ -67,79 +71,79 @@ in {
|
||||
reporters = [irc-xxx];
|
||||
};
|
||||
lammla = {
|
||||
script = pkgs.lib.panoptikon.url "http://lammla.info/index.php?reihe=30";
|
||||
script = panoptikon.url "http://lammla.info/index.php?reihe=30";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
kratylos = {
|
||||
script = pkgs.lib.panoptikon.url "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
|
||||
script = panoptikon.url "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
kobudo-tesshinkan = {
|
||||
script = pkgs.lib.panoptikon.url "https://kobudo-tesshinkan.eu/index.php/de/termine-berichte/lehrgaenge/";
|
||||
script = panoptikon.url "https://kobudo-tesshinkan.eu/index.php/de/termine-berichte/lehrgaenge/";
|
||||
reporters = [telegram-kmein matrix-kmein];
|
||||
};
|
||||
zeno-free = {
|
||||
script = pkgs.lib.panoptikon.urlSelector ".zenoCOMain" "http://www.zeno.org/Lesesaal/M/E-Books";
|
||||
script = panoptikon.urlSelector ".zenoCOMain" "http://www.zeno.org/Lesesaal/M/E-Books";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
carolinawelslau = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#main" "https://carolinawelslau.de/";
|
||||
script = panoptikon.urlSelector "#main" "https://carolinawelslau.de/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
humboldt-preis = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#content-core" "https://www.hu-berlin.de/de/ueberblick/menschen/ehrungen/humboldtpreis";
|
||||
script = panoptikon.urlSelector "#content-core" "https://www.hu-berlin.de/de/ueberblick/menschen/ehrungen/humboldtpreis";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
lisalittmann = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://lisalittmann.de/";
|
||||
script = panoptikon.urlSelector "#site-content" "https://lisalittmann.de/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
lisalittmann-archive = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://lisalittmann.de/archive/";
|
||||
script = panoptikon.urlSelector "#site-content" "https://lisalittmann.de/archive/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
lisalittmann-projects = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://lisalittmann.de/projects/";
|
||||
script = panoptikon.urlSelector "#site-content" "https://lisalittmann.de/projects/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
tatort = {
|
||||
script = pkgs.lib.panoptikon.urlSelector ".linklist" "https://www.daserste.de/unterhaltung/krimi/tatort/sendung/index.html";
|
||||
script = panoptikon.urlSelector ".linklist" "https://www.daserste.de/unterhaltung/krimi/tatort/sendung/index.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
warpgrid-idiomarium = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/idiomarium/";
|
||||
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/idiomarium/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
warpgrid-futurism = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/futurism/";
|
||||
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/futurism/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
warpgrid-imagiary = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/imagiary/";
|
||||
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/imagiary/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
warpgrid-alchemy = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/alchemy/";
|
||||
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/alchemy/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
indogermanische-forschungen = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#latestIssue" "https://www.degruyter.com/journal/key/INDO/html";
|
||||
script = panoptikon.urlSelector "#latestIssue" "https://www.degruyter.com/journal/key/INDO/html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
ig-neuigkeiten = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/aktuelles/neuigkeiten.html";
|
||||
script = panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/aktuelles/neuigkeiten.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
ig-tagungen = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/tagungen/tagungen-der-ig.html";
|
||||
script = panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/tagungen/tagungen-der-ig.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
fu-distant = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/en/e/ma-distant/Termine/index.html";
|
||||
script = panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/en/e/ma-distant/Termine/index.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
fu-aegyptologie = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/e/aegyptologie/termine/index.html";
|
||||
script = panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/e/aegyptologie/termine/index.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
liquidsoapDirectory = "/var/cache/liquidsoap";
|
||||
icecastPassword = "hackme";
|
||||
refresh-qasaid = pkgs.writers.writeDashBin "refresh-qasaid" ''
|
||||
@@ -21,7 +23,7 @@
|
||||
poem: .[0].["#text"],
|
||||
author: .[1].["#text"]
|
||||
})
|
||||
' | ${pkgs.cyberlocker-tools}/bin/cput qasaid.json
|
||||
' | ${niveumPackages.cyberlocker-tools}/bin/cput qasaid.json
|
||||
'';
|
||||
qasida-poem = pkgs.writers.writeDash "qasida.sh" ''
|
||||
set -efu
|
||||
@@ -134,7 +136,7 @@ in {
|
||||
environment.systemPackages = [refresh-qasaid];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(pkgs.lib.niveum.tmpfilesConfig {
|
||||
(tmpfilesConfig {
|
||||
type = "d";
|
||||
path = liquidsoapDirectory;
|
||||
mode = "0750";
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
imports = [
|
||||
../kibbeh/hardware-configuration.nix
|
||||
../../configs/tlp.nix
|
||||
@@ -48,7 +50,7 @@
|
||||
networking = {
|
||||
hostName = "kabsa";
|
||||
wireless.interfaces = ["wlp3s0"];
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.kabsa;
|
||||
retiolum = retiolumAddresses.kabsa;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -9,7 +10,7 @@
|
||||
./hardware-configuration.nix
|
||||
../../configs/spacetime.nix
|
||||
../../configs/admin-essentials.nix
|
||||
../../configs/keyboard
|
||||
../../configs/keyboard.nix
|
||||
../../configs/sound.nix
|
||||
../../configs/printing.nix
|
||||
../../configs/nix.nix
|
||||
@@ -75,9 +76,9 @@
|
||||
libreoffice
|
||||
xournalpp
|
||||
jellyfin-media-player
|
||||
mpv-tv
|
||||
niveumPackages.mpv-tv
|
||||
telegram-desktop
|
||||
(mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; })
|
||||
(niveumPackages.mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; })
|
||||
spotify
|
||||
];
|
||||
};
|
||||
@@ -87,7 +88,7 @@
|
||||
git
|
||||
vim
|
||||
tmux
|
||||
(vim-kmein.override { colorscheme = "base16-gruvbox-dark-medium"; })
|
||||
(niveumPackages.vim.override { colorscheme = "base16-gruvbox-dark-medium"; })
|
||||
];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (import ../../lib) kieran retiolumAddresses restic;
|
||||
in {
|
||||
imports = [
|
||||
./gitea.nix
|
||||
./hardware-configuration.nix
|
||||
@@ -34,7 +36,7 @@
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
inherit (restic) repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -80,7 +82,7 @@
|
||||
firewall.allowedTCPPorts = [80 443];
|
||||
hostName = "makanek";
|
||||
interfaces.ens3.useDHCP = true;
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.makanek;
|
||||
retiolum = retiolumAddresses.makanek;
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
@@ -113,7 +115,7 @@
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = pkgs.lib.niveum.kieran.email;
|
||||
defaults.email = kieran.email;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."www.kmein.de" = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (import ../../lib) sshPort;
|
||||
domain = "code.kmein.de";
|
||||
in {
|
||||
services.anubis = {
|
||||
@@ -26,7 +27,7 @@ in {
|
||||
settings = {
|
||||
server.ROOT_URL = "https://${domain}";
|
||||
server.DOMAIN = domain;
|
||||
server.SSH_PORT = pkgs.lib.niveum.sshPort;
|
||||
server.SSH_PORT = sshPort;
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
backupLocation = "/var/lib/codimd-backup";
|
||||
stateLocation = "/var/lib/codimd/state.sqlite";
|
||||
domain = "pad.kmein.de";
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
in {
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
enableACME = true;
|
||||
@@ -56,7 +56,7 @@ in {
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(pkgs.lib.niveum.tmpfilesConfig {
|
||||
(tmpfilesConfig {
|
||||
user = "codimd";
|
||||
group = "codimd";
|
||||
mode = "0755";
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
let
|
||||
lokiConfig = import ./loki.nix;
|
||||
blackboxConfig = import ./blackbox.nix;
|
||||
inherit (import ../../../lib) restic;
|
||||
in
|
||||
{
|
||||
services.grafana = {
|
||||
@@ -425,7 +426,7 @@ in
|
||||
{
|
||||
targets = [
|
||||
"zaatar.r:${toString config.services.prometheus.exporters.node.port}"
|
||||
"zaatar.r:${toString pkgs.lib.niveum.restic.port}"
|
||||
"zaatar.r:${toString restic.port}"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig =
|
||||
pkgs.lib.niveum.serveHtml ../../packages/radio-news/index.html pkgs;
|
||||
}: let
|
||||
inherit (import ../../lib) serveHtml;
|
||||
remote = "https://cgit.lassul.us/stockholm";
|
||||
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;
|
||||
@@ -14,22 +16,16 @@
|
||||
|
||||
systemd.services.news-digest = {
|
||||
enable = true;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
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
|
||||
]
|
||||
}
|
||||
PATH=$PATH:${lib.makeBinPath [pkgs.gnused pkgs.curl pkgs.jq]}
|
||||
|
||||
GEMINI_API_KEY="$(cat "$CREDENTIALS_DIRECTORY/gemini-api-key")" ${pkgs.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/')" '
|
||||
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,
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) kieran;
|
||||
weechatHome = "/var/lib/weechat";
|
||||
weechat-declarative = pkgs.callPackage ../../packages/weechat-declarative.nix {};
|
||||
in {
|
||||
systemd.services.weechat = let
|
||||
tmux = pkgs.writers.writeDash "tmux" ''
|
||||
@@ -24,13 +26,13 @@ in {
|
||||
''
|
||||
} "$@"
|
||||
'';
|
||||
weechat = pkgs.weechat-declarative.override {
|
||||
weechat = weechat-declarative.override {
|
||||
config = {
|
||||
scripts = [
|
||||
pkgs.weechatScripts.weechat-autosort
|
||||
pkgs.weechatScripts.colorize_nicks
|
||||
pkgs.weechatScripts.hotlist2extern
|
||||
# pkgs.weechatScripts.weechat-matrix
|
||||
(pkgs.callPackage ../../packages/weechatScripts/hotlist2extern.nix {})
|
||||
];
|
||||
settings = let
|
||||
nick = "kmein";
|
||||
@@ -50,7 +52,7 @@ in {
|
||||
msg_part = "tschö mit ö";
|
||||
msg_quit = "ciao kakao";
|
||||
msg_kick = "warum machst du diese?";
|
||||
realname = lib.head (lib.strings.split " " pkgs.lib.niveum.kieran.name);
|
||||
realname = lib.head (lib.strings.split " " kieran.name);
|
||||
};
|
||||
server = {
|
||||
hackint = {
|
||||
@@ -180,7 +182,7 @@ in {
|
||||
users.extraUsers.weechat = {
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys =
|
||||
pkgs.lib.niveum.kieran.sshKeys
|
||||
kieran.sshKeys
|
||||
++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@kibbeh"
|
||||
];
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lib, pkgs, config, unstablePackages, ... }:
|
||||
let
|
||||
inherit (import ../../lib) kieran;
|
||||
weechatHome = "/var/lib/weechat";
|
||||
weechat-declarative =
|
||||
pkgs.callPackage ../../packages/weechat-declarative.nix {
|
||||
@@ -53,7 +54,7 @@ in {
|
||||
msg_part = "tschö mit ö";
|
||||
msg_quit = "ciao kakao";
|
||||
msg_kick = "warum machst du diese?";
|
||||
realname = lib.head (lib.strings.split " " pkgs.lib.niveum.kieran.name);
|
||||
realname = lib.head (lib.strings.split " " kieran.name);
|
||||
};
|
||||
server = {
|
||||
hackint = {
|
||||
@@ -184,7 +185,7 @@ in {
|
||||
users.groups.weechat = { };
|
||||
users.extraUsers.weechat = {
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys ++ [
|
||||
openssh.authorizedKeys.keys = kieran.sshKeys ++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@kibbeh"
|
||||
];
|
||||
createHome = true;
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
@@ -48,7 +50,7 @@
|
||||
wwp0s20u4i6.useDHCP = true;
|
||||
};
|
||||
wireless.interfaces = ["wlp3s0"];
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.manakish;
|
||||
retiolum = retiolumAddresses.manakish;
|
||||
hostName = "manakish";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../configs/spacetime.nix
|
||||
@@ -66,7 +67,7 @@
|
||||
enp0s4.useDHCP = true;
|
||||
wlp2s0.useDHCP = true;
|
||||
};
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.tabula;
|
||||
retiolum = retiolumAddresses.tabula;
|
||||
hostName = "tabula";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../configs/spacetime.nix
|
||||
@@ -74,7 +75,7 @@
|
||||
enp0s25.useDHCP = true;
|
||||
wlo1.useDHCP = true;
|
||||
};
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.tahina;
|
||||
retiolum = retiolumAddresses.tahina;
|
||||
hostName = "tahina";
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
niveumLib = import ../../lib;
|
||||
inherit (niveumLib) retiolumAddresses restic;
|
||||
firewall = niveumLib.firewall lib;
|
||||
dataDir = "/backup/restic";
|
||||
in {
|
||||
services.restic.server = {
|
||||
@@ -12,7 +15,7 @@ in {
|
||||
inherit dataDir;
|
||||
prometheus = true;
|
||||
extraFlags = ["--no-auth"]; # auth is done via firewall
|
||||
listenAddress = toString pkgs.lib.niveum.restic.port;
|
||||
listenAddress = toString restic.port;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
@@ -27,32 +30,32 @@ in {
|
||||
};
|
||||
|
||||
networking.firewall = let
|
||||
dport = pkgs.lib.niveum.restic.port;
|
||||
dport = restic.port;
|
||||
protocol = "tcp";
|
||||
rules = [
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
(firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.kabsa.ipv4;
|
||||
source = retiolumAddresses.kabsa.ipv4;
|
||||
})
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
(firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.manakish.ipv4;
|
||||
source = retiolumAddresses.manakish.ipv4;
|
||||
})
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
(firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.makanek.ipv4;
|
||||
source = retiolumAddresses.makanek.ipv4;
|
||||
})
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
(firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.fatteh.ipv4;
|
||||
source = retiolumAddresses.fatteh.ipv4;
|
||||
})
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
(firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.ful.ipv4;
|
||||
source = retiolumAddresses.ful.ipv4;
|
||||
})
|
||||
];
|
||||
in {
|
||||
extraCommands = pkgs.lib.niveum.firewall.addRules rules;
|
||||
extraStopCommands = pkgs.lib.niveum.firewall.removeRules rules;
|
||||
extraCommands = firewall.addRules rules;
|
||||
extraStopCommands = firewall.removeRules rules;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses restic;
|
||||
in {
|
||||
imports = [
|
||||
./backup.nix
|
||||
./gaslight.nix
|
||||
@@ -50,7 +51,7 @@
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
inherit (restic) repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -69,26 +70,24 @@
|
||||
|
||||
services.illum.enable = true;
|
||||
|
||||
environment.systemPackages =
|
||||
let
|
||||
worldradio = pkgs.callPackage ../../packages/worldradio.nix { };
|
||||
in
|
||||
[
|
||||
(pkgs.writers.writeDashBin "mpv" ''${pkgs.mpv}/bin/mpv --no-video "$@"'')
|
||||
(pkgs.writers.writeDashBin "worldradio" ''
|
||||
shuf ${worldradio} | ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv --no-video
|
||||
'')
|
||||
pkgs.git
|
||||
pkgs.vim
|
||||
pkgs.htop
|
||||
pkgs.ncmpcpp
|
||||
pkgs.python3 # for sshuttle
|
||||
];
|
||||
environment.systemPackages = let
|
||||
worldradio = pkgs.callPackage ../../packages/worldradio.nix {};
|
||||
in [
|
||||
(pkgs.writers.writeDashBin "mpv" ''${pkgs.mpv}/bin/mpv --no-video "$@"'')
|
||||
(pkgs.writers.writeDashBin "worldradio" ''
|
||||
shuf ${worldradio} | ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv --no-video
|
||||
'')
|
||||
pkgs.git
|
||||
pkgs.vim
|
||||
pkgs.htop
|
||||
pkgs.ncmpcpp
|
||||
pkgs.python3 # for sshuttle
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "zaatar";
|
||||
wireless.interfaces = [ "wlp2s0" ];
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.zaatar;
|
||||
wireless.interfaces = ["wlp2s0"];
|
||||
retiolum = retiolumAddresses.zaatar;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
{config, pkgs, lib, ...}: let
|
||||
port = 8123;
|
||||
inherit (import ../../lib) restic;
|
||||
volumeName = "home-assistant";
|
||||
streams = import ../../lib/streams.nix {
|
||||
di-fm-key = "%DI_FM_KEY%"; # TODO lib.strings.fileContents <secrets/di.fm/key>;
|
||||
};
|
||||
playlistDirectoryPath = "/var/lib/mpd/playlists";
|
||||
in {
|
||||
networking.firewall.allowedTCPPorts = [port];
|
||||
|
||||
@@ -12,7 +17,7 @@ in {
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
inherit (restic) repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -27,6 +32,46 @@ in {
|
||||
di-fm-key.file = ../../secrets/di-fm-key.age;
|
||||
};
|
||||
|
||||
systemd.services.mpd-playlists = {
|
||||
before = ["podman-homeassistant.service"];
|
||||
wantedBy = ["podman-homeassistant.service"];
|
||||
script = let
|
||||
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
||||
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
||||
makePlaylist = name: streams: pkgs.writeText "${name}.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
||||
playlistDirectory = pkgs.linkFarm "playlists" (
|
||||
[
|
||||
{
|
||||
name = "all.m3u";
|
||||
path = makePlaylist "all" streams;
|
||||
}
|
||||
]
|
||||
++ map (tag: {
|
||||
name = "${tag}.m3u";
|
||||
path = makePlaylist tag (tagStreams tag);
|
||||
})
|
||||
tags
|
||||
);
|
||||
in ''
|
||||
mkdir -p ${playlistDirectoryPath}
|
||||
|
||||
export DI_FM_KEY="$(cat "$CREDENTIALS_DIRECTORY/di-fm-key")"
|
||||
|
||||
rm -rf ${playlistDirectoryPath}
|
||||
mkdir ${playlistDirectoryPath}
|
||||
|
||||
for m3u in $(ls ${playlistDirectory})
|
||||
do
|
||||
${pkgs.gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/g ${playlistDirectory}/"$m3u" > ${playlistDirectoryPath}/"$(basename "$m3u")"
|
||||
done
|
||||
'';
|
||||
serviceConfig = {
|
||||
LoadCredential = [
|
||||
"di-fm-key:${config.age.secrets.di-fm-key.path}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
systemd.services.update-containers = {
|
||||
@@ -68,6 +113,7 @@ in {
|
||||
containers.homeassistant = {
|
||||
volumes = [
|
||||
"${volumeName}:/config"
|
||||
"${playlistDirectoryPath}:/media"
|
||||
"/run/dbus:/run/dbus:ro"
|
||||
];
|
||||
# needed for bluetooth
|
||||
|
||||
@@ -141,7 +141,7 @@ in {
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
exports = let
|
||||
machines = with pkgs.lib.niveum.retiolumAddresses; [kabsa manakish];
|
||||
machines = with (import ../../lib).retiolumAddresses; [kabsa manakish];
|
||||
in ''
|
||||
/export ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(fsid=0)") machines}
|
||||
/export/moodle ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(insecure,rw)") machines}
|
||||
|
||||
167
systems/zaatar/mpd.nix
Normal file
167
systems/zaatar/mpd.nix
Normal file
@@ -0,0 +1,167 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
firewall = (import ../../lib).firewall lib;
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
|
||||
mukkeMountPoint = "/mnt/mukke";
|
||||
fritzboxMountPoint = "/mnt/fritz";
|
||||
|
||||
streams = import ../../lib/streams.nix {
|
||||
di-fm-key = "%DI_FM_KEY%"; # TODO lib.strings.fileContents <secrets/di.fm/key>;
|
||||
};
|
||||
in {
|
||||
users.users.${config.services.mpd.user}.extraGroups = ["pipewire" "audio"];
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.listenAddress = "0.0.0.0";
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
auto_update "yes"
|
||||
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "zaatar single room audio system"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
fileSystems.${mukkeMountPoint} = {
|
||||
device = "//mukke.r/public";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"guest"
|
||||
"nofail"
|
||||
"noauto"
|
||||
"ro"
|
||||
"rsize=16777216"
|
||||
"cache=loose"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."${fritzboxMountPoint}" = {
|
||||
device = "//192.168.178.1/FRITZ.NAS/Backup";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"username=ftpuser"
|
||||
"password=ftppassword"
|
||||
"noauto"
|
||||
"nounix"
|
||||
"ro"
|
||||
"noserverino" # ref https://askubuntu.com/a/1265165
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(tmpfilesConfig {
|
||||
type = "L+";
|
||||
mode = "0644";
|
||||
user = "mpd";
|
||||
group = "mpd";
|
||||
path = "${config.services.mpd.musicDirectory}/mukke";
|
||||
argument = mukkeMountPoint;
|
||||
})
|
||||
(tmpfilesConfig {
|
||||
type = "L+";
|
||||
mode = "0644";
|
||||
user = "mpd";
|
||||
group = "mpd";
|
||||
path = "${config.services.mpd.musicDirectory}/fritz";
|
||||
argument = "${fritzboxMountPoint}";
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = [pkgs.mpc_cli];
|
||||
|
||||
networking.firewall = let
|
||||
dport = config.services.mpd.network.port;
|
||||
protocol = "tcp";
|
||||
rules = [
|
||||
(firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = "192.168.0.0/16";
|
||||
})
|
||||
(firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = "127.0.0.0/8";
|
||||
})
|
||||
];
|
||||
in {
|
||||
allowedTCPPorts = [80];
|
||||
extraCommands = firewall.addRules rules;
|
||||
extraStopCommands = firewall.removeRules rules;
|
||||
};
|
||||
|
||||
systemd.services.mpd-playlists = {
|
||||
before = ["mpd.service"];
|
||||
wantedBy = ["mpd.service"];
|
||||
script = let
|
||||
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
||||
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
||||
makePlaylist = name: streams: pkgs.writeText "${name}.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
||||
playlistDirectory = pkgs.linkFarm "playlists" (
|
||||
[
|
||||
{
|
||||
name = "all.m3u";
|
||||
path = makePlaylist "all" streams;
|
||||
}
|
||||
]
|
||||
++ map (tag: {
|
||||
name = "${tag}.m3u";
|
||||
path = makePlaylist tag (tagStreams tag);
|
||||
})
|
||||
tags
|
||||
);
|
||||
playlistDirectoryPath = "/var/lib/mpd/playlists";
|
||||
in ''
|
||||
export DI_FM_KEY="$(cat "$CREDENTIALS_DIRECTORY/di-fm-key")"
|
||||
|
||||
rm -rf ${playlistDirectoryPath}
|
||||
mkdir ${playlistDirectoryPath}
|
||||
|
||||
for m3u in $(ls ${playlistDirectory})
|
||||
do
|
||||
${pkgs.gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/g ${playlistDirectory}/"$m3u" > ${playlistDirectoryPath}/"$(basename "$m3u")"
|
||||
done
|
||||
'';
|
||||
serviceConfig = {
|
||||
LoadCredential = [
|
||||
"di-fm-key:${config.age.secrets.di-fm-key.path}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.ympd = {
|
||||
enable = true;
|
||||
mpd.port = config.services.mpd.network.port;
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
ympd-basicAuth = {
|
||||
file = ../../secrets/zaatar-ympd-basicAuth.age;
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
mode = "400";
|
||||
};
|
||||
di-fm-key.file = ../../secrets/di-fm-key.age;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts."radio.kmein.r" = {
|
||||
basicAuthFile = config.age.secrets.ympd-basicAuth.path;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${config.services.ympd.webPort}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user