mirror of
https://github.com/kmein/niveum
synced 2026-03-16 18:21:07 +01:00
Compare commits
140 Commits
wayland
...
2688d3d9ad
| Author | SHA1 | Date | |
|---|---|---|---|
| 2688d3d9ad | |||
| 98efafb738 | |||
| 37ef9a1b05 | |||
| dd50715f43 | |||
| a5d4b082ee | |||
| c1ca5336c8 | |||
| 1c788bf103 | |||
| 82b7ffd39f | |||
| c490c81a32 | |||
| 6ac4d821b8 | |||
| 7c9db88672 | |||
| 35234846f5 | |||
| 36960bc547 | |||
| bde513cc2c | |||
| b4708cb31d | |||
| 936ae927b7 | |||
| 07756a0660 | |||
| 3bf70f8956 | |||
| 583bc83839 | |||
| ec7f5f5bb1 | |||
| 746a78ff8f | |||
| 8fd51be217 | |||
| 6ac0c0bae4 | |||
| 2eb69eb1fe | |||
| 0b7308e602 | |||
| f329f25992 | |||
| 11647db257 | |||
| 9f65360713 | |||
| 7c2e5533db | |||
| 32fa3e75ea | |||
| 435aa4a365 | |||
| 8d955bf640 | |||
| a44d15a166 | |||
| b33e1d3569 | |||
| cba0f92a7a | |||
| 1f163d65cd | |||
| e816145b13 | |||
| 4cb62b382b | |||
| ad2c922ab4 | |||
| a0f7867a25 | |||
| dd75268d60 | |||
| 0c6ec93443 | |||
| 15ef01268b | |||
| 682db94aae | |||
| 1bba38be77 | |||
| f7a7e80d97 | |||
| 7327b3149a | |||
| 9ab93d0e82 | |||
| 2f5ad473c6 | |||
| e478ae3e6e | |||
| 06d3d12afa | |||
| 1060339a93 | |||
| af1e852228 | |||
| 9ff500bb37 | |||
| 18603a5682 | |||
| 53578ac92b | |||
| 14118b6a63 | |||
| 0813d2e37c | |||
| 8d5743119f | |||
| 5105ef0b1e | |||
| d67c8a6298 | |||
| 64ac86b32b | |||
| ed5c8815ce | |||
| 5e41f04f72 | |||
| e8e5bb6211 | |||
| e910bf6f6a | |||
| bd47cef7e5 | |||
| ad3249077b | |||
| 367acd05e5 | |||
| bae1d0b0cc | |||
| f58e111ce1 | |||
| b647b9f901 | |||
| 883655dc58 | |||
| 21960a2c95 | |||
| 254195b331 | |||
| ce032525d2 | |||
| f9b992cce3 | |||
| 3f6e4755a6 | |||
| cc4c5b79c1 | |||
| 673edbb8b3 | |||
| 89f9e09c3d | |||
| f1a6b1f4f6 | |||
| 16398282ed | |||
| 315ccf102d | |||
| 7d8feb0876 | |||
| 44f7a9d4fa | |||
| b070207bd5 | |||
| 614f7e0f8c | |||
| a1af05ff48 | |||
| 83536372f0 | |||
| 3357121044 | |||
| 2a7e972256 | |||
| 0d75ab146e | |||
| 385ae53c7e | |||
| a08c41d3db | |||
| bd84c35138 | |||
| 04722684aa | |||
| 025b725551 | |||
| 6411d8a03d | |||
| edce4538d8 | |||
| d1dd41bc6b | |||
| 5d80f6ec0f | |||
| c8ad9d4433 | |||
| 0f05e0467a | |||
| 3c2abbb3b9 | |||
| 61b5e4bd6e | |||
| d4aca5b6f1 | |||
| 551462f1dd | |||
| 5d954684e1 | |||
| b12373eb1b | |||
| 31e6b28b72 | |||
| 4a77a20c9e | |||
| fe5bbbc647 | |||
| 8699f09307 | |||
| d458fb333f | |||
| e7264641a2 | |||
| 8afc04f266 | |||
| 427df80396 | |||
| ff3ba9047f | |||
| 1d14174ad5 | |||
| a307e2c186 | |||
| 1cc3a7c6e3 | |||
| db33374dc0 | |||
| 2c75c0d608 | |||
| f84cd44db5 | |||
| 84cec2eb24 | |||
| 031b934c99 | |||
|
|
7491396645 | ||
| 1c299cafef | |||
| cbce724ade | |||
| 00dfe27738 | |||
| 6e0026ed5c | |||
| d92f382b9a | |||
| 630ec3d052 | |||
| bfd7195543 | |||
| 0d2481bd78 | |||
| 28cd462bc6 | |||
| 67358560b8 | |||
| 675c453599 | |||
| e4543eeb0b |
114
.bin/mp3player-write
Executable file
114
.bin/mp3player-write
Executable file
@@ -0,0 +1,114 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Usage:
|
||||
# ./mp3_transfer.sh -s 1.3 /mnt/mp3player file1.m4a file2.m4a ...
|
||||
|
||||
set -e
|
||||
|
||||
# Default speed
|
||||
SPEED=1.0
|
||||
|
||||
# Parse options
|
||||
while getopts ":s:" opt; do
|
||||
case $opt in
|
||||
s)
|
||||
SPEED=$OPTARG
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires a value." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Shift past the options
|
||||
shift $((OPTIND -1))
|
||||
|
||||
# Check arguments
|
||||
if [ "$#" -lt 2 ]; then
|
||||
echo "Usage: $0 [-s speed] MOUNT_POINT FILE1 [FILE2 ...]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MOUNT_POINT=$1
|
||||
shift
|
||||
FILES=("$@")
|
||||
|
||||
# Check mount point exists
|
||||
if [ ! -d "$MOUNT_POINT" ]; then
|
||||
echo "Error: Mount point '$MOUNT_POINT' does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Estimate required space
|
||||
TOTAL_SIZE=0
|
||||
for f in "${FILES[@]}"; do
|
||||
if [ ! -f "$f" ]; then
|
||||
echo "Warning: File '$f' does not exist, skipping."
|
||||
continue
|
||||
fi
|
||||
# Get file size in bytes
|
||||
FILE_SIZE=$(stat --printf="%s" "$f")
|
||||
# Estimate mp3 output size: roughly 1/2 of original m4a (adjust if needed)
|
||||
TOTAL_SIZE=$((TOTAL_SIZE + FILE_SIZE / 2))
|
||||
done
|
||||
|
||||
# Get available space in bytes
|
||||
AVAILABLE=$(df --output=avail "$MOUNT_POINT" | tail -n 1)
|
||||
AVAILABLE=$((AVAILABLE * 1024)) # df reports in KB
|
||||
|
||||
if [ "$TOTAL_SIZE" -gt "$AVAILABLE" ]; then
|
||||
echo "Error: Not enough space on device. Required: $TOTAL_SIZE bytes, Available: $AVAILABLE bytes"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Enough space available. Starting conversion..."
|
||||
|
||||
sanitize_filename() {
|
||||
local name="$1"
|
||||
# Remove path, keep only base name
|
||||
name=$(basename "$name" .m4a)
|
||||
# Replace spaces and special chars with underscore
|
||||
name=$(echo "$name" | tr ' ' '_' | tr -cd '[:alnum:]_-')
|
||||
# Truncate to max 50 chars
|
||||
echo "${name:0:50}"
|
||||
}
|
||||
|
||||
# Convert and copy files
|
||||
for f in "${FILES[@]}"; do
|
||||
if [ ! -f "$f" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Determine the next prefix
|
||||
existing_prefixes=$(ls "$MOUNT_POINT" | grep -E '^[0-9].*\.mp3$' | sed -E 's/^([0-9]).*/\1/' | sort -n | uniq)
|
||||
for i in {0..9}; do
|
||||
if ! echo "$existing_prefixes" | grep -q "^$i$"; then
|
||||
PREFIX=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Using prefix: $PREFIX"
|
||||
|
||||
BASENAME=$(sanitize_filename "$f")
|
||||
OUT_PATTERN="$MOUNT_POINT/${PREFIX}%02d_${BASENAME}.mp3"
|
||||
|
||||
echo "Converting '$f' to '$OUT_PATTERN' at speed $SPEED..."
|
||||
|
||||
ffmpeg -i "$f" \
|
||||
-filter:a "atempo=$SPEED" -ar 44100 -ac 2 -c:a libmp3lame -b:a 128k \
|
||||
-f segment -segment_time 300 \
|
||||
"$OUT_PATTERN"
|
||||
|
||||
# Update prefix for next file
|
||||
# Count how many segments were created
|
||||
SEG_COUNT=$(ls "$MOUNT_POINT" | grep -E "^${PREFIX}[0-9]{2}_" | wc -l)
|
||||
PREFIX=$((PREFIX + SEG_COUNT))
|
||||
done
|
||||
|
||||
echo "All files processed successfully."
|
||||
@@ -1,5 +1,7 @@
|
||||
# niveum
|
||||
|
||||
> I must Create a System, or be enslav'd by another Man's. —William Blake
|
||||
|
||||
> [nĭvĕus](https://logeion.uchicago.edu/niveus), a, um, adj. [nix], _of_ or _from snow, snowy, snow-_ (poet.)
|
||||
>
|
||||
> 1. Lit.: aggeribus niveis informis, Verg. G. 3, 354: aqua, _cooled with snow_, Mart. 12, 17, 6; cf. id. 14, 104 and 117: mons, _covered with snow_, Cat. 64, 240.—
|
||||
@@ -10,3 +12,6 @@
|
||||
> 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,10 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
darwin = lib.strings.hasSuffix "-darwin" pkgs.system;
|
||||
darwin = lib.strings.hasSuffix "-darwin" pkgs.stdenv.hostPlatform.system;
|
||||
in {
|
||||
environment.systemPackages =
|
||||
[
|
||||
@@ -37,12 +36,12 @@ in {
|
||||
pkgs.bc # calculator
|
||||
pkgs.pari # gp -- better calculator
|
||||
pkgs.ts
|
||||
niveumPackages.vimv
|
||||
niveumPackages.vg
|
||||
niveumPackages.fkill
|
||||
niveumPackages.cyberlocker-tools
|
||||
niveumPackages.untilport
|
||||
niveumPackages.kpaste
|
||||
pkgs.vimv
|
||||
pkgs.vg
|
||||
pkgs.fkill
|
||||
pkgs.cyberlocker-tools
|
||||
pkgs.untilport
|
||||
pkgs.kpaste
|
||||
# HARDWARE
|
||||
pkgs.pciutils # for lspci
|
||||
]
|
||||
@@ -85,7 +84,7 @@ in {
|
||||
'';
|
||||
in
|
||||
{
|
||||
nixi = "nix repl '<nixpkgs>'";
|
||||
nixi = "nix repl nixpkgs";
|
||||
take = "source ${take}";
|
||||
wcd = "source ${wcd}";
|
||||
where = "source ${where}";
|
||||
|
||||
120
configs/aerc.nix
120
configs/aerc.nix
@@ -2,20 +2,18 @@
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib/email.nix) defaults thunderbirdProfile;
|
||||
in {
|
||||
}:
|
||||
{
|
||||
age.secrets = {
|
||||
email-password-cock = {
|
||||
file = ../secrets/email-password-cock.age;
|
||||
email-password-ical-ephemeris = {
|
||||
file = ../secrets/email-password-ical-ephemeris.age;
|
||||
owner = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
};
|
||||
email-password-letos = {
|
||||
file = ../secrets/email-password-letos.age;
|
||||
email-password-cock = {
|
||||
file = ../secrets/email-password-cock.age;
|
||||
owner = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
@@ -43,14 +41,15 @@ in {
|
||||
extraConfig = {
|
||||
database.path = config.home-manager.users.me.accounts.email.maildirBasePath;
|
||||
new.tags = "";
|
||||
user.name = defaults.realName;
|
||||
user.name = pkgs.lib.niveum.email.defaults.realName;
|
||||
user.primary_email = config.home-manager.users.me.accounts.email.accounts.posteo.address;
|
||||
};
|
||||
};
|
||||
|
||||
programs.mbsync = {
|
||||
enable = true;
|
||||
extraConfig = lib.concatStringsSep "\n\n" (lib.mapAttrsToList (name: account: ''
|
||||
extraConfig = lib.concatStringsSep "\n\n" (
|
||||
lib.mapAttrsToList (name: account: ''
|
||||
IMAPAccount ${name}
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
Host ${account.imap.host}
|
||||
@@ -74,46 +73,55 @@ in {
|
||||
Patterns *
|
||||
Remove None
|
||||
SyncState *
|
||||
'')
|
||||
config.home-manager.users.me.accounts.email.accounts);
|
||||
'') config.home-manager.users.me.accounts.email.accounts
|
||||
);
|
||||
};
|
||||
|
||||
accounts.email.accounts = {
|
||||
cock =
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
let
|
||||
mailhost = "mail.cock.li";
|
||||
address = "2210@cock.li";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
address = address;
|
||||
userName = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
|
||||
realName = "2210";
|
||||
imap.host = "mail.cock.li";
|
||||
imap.host = mailhost;
|
||||
imap.port = 993;
|
||||
smtp.host = imap.host;
|
||||
smtp.host = mailhost;
|
||||
smtp.port = 25;
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
letos =
|
||||
lib.recursiveUpdate defaults
|
||||
{
|
||||
userName = "slfletos";
|
||||
address = "letos.sprachlit@hu-berlin.de";
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}";
|
||||
imap.host = "mailbox.cms.hu-berlin.de";
|
||||
ical-ephemeris =
|
||||
let
|
||||
address = "ical.ephemeris@web.de";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
userName = address;
|
||||
realName = "Kieran from iCal Ephemeris";
|
||||
address = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-ical-ephemeris.path}";
|
||||
imap.host = "imap.web.de";
|
||||
imap.port = 993;
|
||||
smtp.host = "mailhost.cms.hu-berlin.de";
|
||||
smtp.port = 25;
|
||||
smtp.host = "smtp.web.de";
|
||||
smtp.port = 587;
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
posteo =
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
let
|
||||
mailhost = "posteo.de";
|
||||
address = "kieran.meinhardt@posteo.net";
|
||||
aliases = ["kmein@posteo.de"];
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
address = address;
|
||||
aliases = [ "kmein@posteo.de" ];
|
||||
userName = address;
|
||||
imap.host = "posteo.de";
|
||||
imap.host = mailhost;
|
||||
imap.port = 993;
|
||||
imap.tls.enable = true;
|
||||
smtp.host = imap.host;
|
||||
smtp.host = mailhost;
|
||||
smtp.port = 465;
|
||||
smtp.tls.enable = true;
|
||||
primary = true;
|
||||
@@ -132,7 +140,7 @@ in {
|
||||
enable = true;
|
||||
settings = {
|
||||
};
|
||||
profiles.${thunderbirdProfile} = {
|
||||
profiles.${pkgs.lib.niveum.email.thunderbirdProfile} = {
|
||||
isDefault = true;
|
||||
settings = {
|
||||
"mail.default_send_format" = 1;
|
||||
@@ -140,10 +148,8 @@ in {
|
||||
"msgcompose.text_color" = config.lib.stylix.colors.withHashtag.base00;
|
||||
"msgcompose.background_color" = config.lib.stylix.colors.withHashtag.base05;
|
||||
};
|
||||
userChrome = ''
|
||||
'';
|
||||
userContent = ''
|
||||
'';
|
||||
userChrome = '''';
|
||||
userContent = '''';
|
||||
withExternalGnupg = false;
|
||||
};
|
||||
};
|
||||
@@ -205,7 +211,7 @@ in {
|
||||
"*" = ":filter -x Flagged<Enter>";
|
||||
};
|
||||
view = {
|
||||
tr = ":pipe ${niveumPackages.trans}/bin/trans -show-original n -b -no-autocorrect<Enter>"; # https://man.sr.ht/~rjarry/aerc/integrations/translator.md
|
||||
tr = ":pipe ${pkgs.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>";
|
||||
@@ -278,7 +284,9 @@ in {
|
||||
ui.spinner = ". , .";
|
||||
general.unsafe-accounts-conf = true;
|
||||
general.pgp-provider = "gpg";
|
||||
viewer = {pager = "${pkgs.less}/bin/less -R";};
|
||||
viewer = {
|
||||
pager = "${pkgs.less}/bin/less -R";
|
||||
};
|
||||
compose = {
|
||||
# address-book-cmd = "khard email --remove-first-line --parsable '%s'";
|
||||
no-attachment-warning = "(attach|attached|attachments?|anbei|Anhang|angehängt|beigefügt)";
|
||||
@@ -295,24 +303,26 @@ in {
|
||||
"message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
||||
};
|
||||
openers = let
|
||||
as-pdf = pkgs.writers.writeDash "as-pdf" ''
|
||||
d=$(mktemp -d)
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$d"
|
||||
}
|
||||
${pkgs.libreoffice}/bin/libreoffice --headless --convert-to pdf "$1" --outdir "$d"
|
||||
${pkgs.zathura}/bin/zathura "$d"/*.pdf
|
||||
'';
|
||||
in {
|
||||
"image/*" = "${pkgs.nsxiv}/bin/nsxiv";
|
||||
"application/pdf" = "${pkgs.zathura}/bin/zathura";
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = toString as-pdf;
|
||||
"application/vnd.oasis.opendocument.text" = toString as-pdf;
|
||||
"video/*" = "${pkgs.mpv}/bin/mpv";
|
||||
"audio/*" = "${pkgs.mpv}/bin/mpv";
|
||||
};
|
||||
openers =
|
||||
let
|
||||
as-pdf = pkgs.writers.writeDash "as-pdf" ''
|
||||
d=$(mktemp -d)
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$d"
|
||||
}
|
||||
${pkgs.libreoffice}/bin/libreoffice --headless --convert-to pdf "$1" --outdir "$d"
|
||||
${pkgs.zathura}/bin/zathura "$d"/*.pdf
|
||||
'';
|
||||
in
|
||||
{
|
||||
"image/*" = "${pkgs.nsxiv}/bin/nsxiv";
|
||||
"application/pdf" = "${pkgs.zathura}/bin/zathura";
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = toString as-pdf;
|
||||
"application/vnd.oasis.opendocument.text" = toString as-pdf;
|
||||
"video/*" = "${pkgs.mpv}/bin/mpv";
|
||||
"audio/*" = "${pkgs.mpv}/bin/mpv";
|
||||
};
|
||||
};
|
||||
|
||||
templates = {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) restic;
|
||||
in {
|
||||
}:
|
||||
{
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
inherit (restic) repository;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "8:00";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -38,7 +38,7 @@ in {
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "restic-niveum" ''
|
||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "restic-mount" ''
|
||||
mountdir=$(mktemp -d)
|
||||
@@ -46,7 +46,7 @@ in {
|
||||
clean() {
|
||||
rm -r "$mountdir"
|
||||
}
|
||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
interactiveShellInit = ''
|
||||
set -o vi
|
||||
'';
|
||||
enableCompletion = true;
|
||||
completion.enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
autorenkalender-package = pkgs.fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "autorenkalender";
|
||||
rev = "cf49a7b057301332d980eb47042a626add93db66";
|
||||
sha256 = "1pa7sjg33vdnjianrqldv445jdzzv3mn231ljk1j58hs0cd505gs";
|
||||
};
|
||||
autorenkalender =
|
||||
pkgs.python3Packages.callPackage autorenkalender-package {};
|
||||
autorenkalender = inputs.autorenkalender.packages.x86_64-linux.default;
|
||||
in {
|
||||
niveum.bots.autorenkalender = {
|
||||
enable = true;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
telebots = inputs.telebots.defaultPackage.x86_64-linux;
|
||||
reverseDirectory = "/run/telegram-reverse";
|
||||
proverbDirectory = "/run/telegram-proverb";
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
in {
|
||||
imports = [
|
||||
./logotheca.nix
|
||||
@@ -17,13 +16,17 @@ in {
|
||||
./hesychius.nix
|
||||
./smyth.nix
|
||||
./nachtischsatan.nix
|
||||
./tlg-wotd.nix
|
||||
# ./tlg-wotd.nix TODO reenable
|
||||
./celan.nix
|
||||
./nietzsche.nix
|
||||
];
|
||||
|
||||
age.secrets = {
|
||||
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = map (path:
|
||||
tmpfilesConfig {
|
||||
pkgs.lib.niveum.tmpfilesConfig {
|
||||
type = "d";
|
||||
mode = "0750";
|
||||
age = "1h";
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
niveum.bots.logotheca = {
|
||||
@@ -22,7 +20,7 @@
|
||||
"!zlwCuPiCNMSxDviFzA:4d2.org"
|
||||
];
|
||||
};
|
||||
command = "${niveumPackages.literature-quote}/bin/literature-quote";
|
||||
command = "${pkgs.literature-quote}/bin/literature-quote";
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
niveum.bots.nietzsche = {
|
||||
@@ -16,9 +15,9 @@
|
||||
set -efu
|
||||
random_number=$(( ($RANDOM % 10) + 1 ))
|
||||
if [ "$random_number" -eq 1 ]; then
|
||||
${niveumPackages.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
||||
${pkgs.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
||||
else
|
||||
${niveumPackages.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
||||
${pkgs.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
||||
fi
|
||||
'');
|
||||
};
|
||||
|
||||
@@ -20,15 +20,31 @@
|
||||
command = toString (pkgs.writers.writeDash "random-smyth" ''
|
||||
set -efu
|
||||
|
||||
good_curl() {
|
||||
${pkgs.curl}/bin/curl "$@" \
|
||||
--compressed \
|
||||
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
|
||||
-H 'Accept-Language: en-US,en;q=0.5' \
|
||||
-H 'DNT: 1' \
|
||||
-H 'Connection: keep-alive' \
|
||||
-H 'Upgrade-Insecure-Requests: 1' \
|
||||
-H 'Sec-Fetch-Dest: document' \
|
||||
-H 'Sec-Fetch-Mode: navigate' \
|
||||
-H 'Sec-Fetch-Site: cross-site' \
|
||||
-H 'Priority: u=0, i' \
|
||||
-H 'Pragma: no-cache' \
|
||||
-H 'Cache-Control: no-cache'
|
||||
}
|
||||
|
||||
RANDOM_SECTION=$(
|
||||
${pkgs.curl}/bin/curl -sSL http://www.perseus.tufts.edu/hopper/xmltoc?doc=Perseus%3Atext%3A1999.04.0007%3Asmythp%3D1 \
|
||||
good_curl -sSL http://www.perseus.tufts.edu/hopper/xmltoc?doc=Perseus%3Atext%3A1999.04.0007%3Asmythp%3D1 \
|
||||
| ${pkgs.gnugrep}/bin/grep -o 'ref="[^"]*"' \
|
||||
| ${pkgs.coreutils}/bin/shuf -n1 \
|
||||
| ${pkgs.gnused}/bin/sed 's/^ref="//;s/"$//'
|
||||
)
|
||||
|
||||
url="http://www.perseus.tufts.edu/hopper/text?doc=$RANDOM_SECTION"
|
||||
${pkgs.curl}/bin/curl -sSL "$url"\
|
||||
good_curl -sSL "$url"\
|
||||
| ${pkgs.htmlq}/bin/htmlq '#text_main' \
|
||||
| ${pkgs.gnused}/bin/sed 's/<\/\?hr>//g' \
|
||||
| ${pkgs.pandoc}/bin/pandoc -f html -t plain --wrap=none
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
mastodonEndpoint = "https://social.krebsco.de";
|
||||
in {
|
||||
systemd.services.bot-tlg-wotd = {
|
||||
# TODO reenable
|
||||
# once https://github.com/NixOS/nixpkgs/pull/462893 is in stable NixOS
|
||||
enable = true;
|
||||
wants = ["network-online.target"];
|
||||
startAt = "9:30";
|
||||
@@ -42,9 +42,8 @@ in {
|
||||
|
||||
#ancientgreek #classics #wotd #wordoftheday
|
||||
|
||||
transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" {
|
||||
# revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged
|
||||
libraries = [ pkgs.python3Packages.cltk ];
|
||||
transliteration=$(${pkgs.writers.writePython3 "translit.py" {
|
||||
libraries = py: [ py.cltk ];
|
||||
} ''
|
||||
import sys
|
||||
from cltk.phonology.grc.transcription import Transcriber
|
||||
@@ -149,7 +148,6 @@ in {
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
|
||||
mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
niveumPackages.cro
|
||||
pkgs.tor-browser-bundle-bin
|
||||
pkgs.cro
|
||||
pkgs.tor-browser
|
||||
pkgs.firefox
|
||||
pkgs.brave
|
||||
];
|
||||
@@ -82,5 +81,9 @@
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.me = {
|
||||
stylix.targets.firefox.profileNames = ["default"];
|
||||
};
|
||||
|
||||
environment.variables.BROWSER = "firefox";
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{pkgs, ...}:
|
||||
# https://paste.sr.ht/~erictapen/11716989e489b600f237041b6d657fdf0ee17b34
|
||||
let
|
||||
certificate = pkgs.stdenv.mkDerivation rec {
|
||||
name = "dst-root-ca-x3.pem";
|
||||
name = "dst-root-ca-x3.pem";
|
||||
certificate = pkgs.stdenv.mkDerivation {
|
||||
inherit name;
|
||||
src = builtins.toFile "${name}.sed" ''
|
||||
1,/DST Root CA X3/d
|
||||
1,/-----END CERTIFICATE-----/p
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) tmpfilesConfig;
|
||||
in {
|
||||
}: {
|
||||
systemd.user.services.systemd-tmpfiles-clean = {
|
||||
enable = true;
|
||||
wantedBy = [ "default.target" ];
|
||||
@@ -16,7 +14,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [
|
||||
systemd.user.tmpfiles.users.me.rules = map pkgs.lib.niveum.tmpfilesConfig [
|
||||
{
|
||||
type = "d";
|
||||
mode = "0755";
|
||||
@@ -29,7 +27,7 @@ in {
|
||||
age = "7d";
|
||||
path = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
||||
}
|
||||
] ++ map (path: tmpfilesConfig {
|
||||
] ++ map (path: pkgs.lib.niveum.tmpfilesConfig {
|
||||
type = "L+";
|
||||
user = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
@@ -121,7 +119,7 @@ in {
|
||||
cert = config.age.secrets.syncthing-cert.path;
|
||||
key = config.age.secrets.syncthing-key.path;
|
||||
settings = {
|
||||
inherit ((import ../lib).syncthing) devices;
|
||||
devices = pkgs.lib.niveum.syncthingIds;
|
||||
folders = {
|
||||
"${config.users.users.me.home}/sync" = {
|
||||
devices = ["kabsa" "manakish" "fatteh"];
|
||||
|
||||
@@ -2,15 +2,11 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
unstablePackages,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import ../lib) localAddresses kieran remoteDir;
|
||||
defaultApplications = (import ../lib).defaultApplications { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@@ -27,9 +23,6 @@ in
|
||||
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
||||
};
|
||||
permittedInsecurePackages = [
|
||||
"qtwebkit-5.212.0-alpha4"
|
||||
"zotero-6.0.26"
|
||||
"electron-25.9.0"
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -72,7 +65,7 @@ in
|
||||
|
||||
users.users.me = {
|
||||
name = "kfm";
|
||||
description = kieran.name;
|
||||
description = pkgs.lib.niveum.kieran.name;
|
||||
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
@@ -94,7 +87,7 @@ in
|
||||
environment.interactiveShellInit = "export PATH=$PATH";
|
||||
environment.shellAliases =
|
||||
let
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
||||
in
|
||||
{
|
||||
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
@@ -106,7 +99,7 @@ in
|
||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
||||
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
|
||||
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format opus --audio-quality 0 -xic"; # Download with audio
|
||||
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format mp3 --audio-quality 0 -xic"; # Download with audio
|
||||
};
|
||||
}
|
||||
{
|
||||
@@ -139,15 +132,14 @@ in
|
||||
};
|
||||
};
|
||||
}
|
||||
{ programs.command-not-found.enable = true; }
|
||||
{
|
||||
programs.gnupg = {
|
||||
agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
settings = rec {
|
||||
default-cache-ttl = 2 * 60 * 60;
|
||||
max-cache-ttl = 4 * default-cache-ttl;
|
||||
settings = let defaultCacheTtl = 2 * 60 * 60; in {
|
||||
default-cache-ttl = defaultCacheTtl;
|
||||
max-cache-ttl = 4 * defaultCacheTtl;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -166,7 +158,7 @@ in
|
||||
}
|
||||
{
|
||||
services.getty = {
|
||||
greetingLine = lib.mkForce "";
|
||||
greetingLine = lib.mkForce "As-salamu alaykum wa rahmatullahi wa barakatuh!";
|
||||
helpLine = lib.mkForce "";
|
||||
};
|
||||
}
|
||||
@@ -174,7 +166,7 @@ in
|
||||
networking.hosts = lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = [ "${name}.local" ];
|
||||
}) localAddresses;
|
||||
}) pkgs.lib.niveum.localAddresses;
|
||||
}
|
||||
{
|
||||
home-manager.users.me.home.stateVersion = "22.05";
|
||||
@@ -195,7 +187,7 @@ in
|
||||
dconf.enable = true;
|
||||
dconf.settings = {
|
||||
# Change the default terminal for Nemo
|
||||
"org/cinnamon/desktop/applications/terminal".exec = defaultApplications.terminal;
|
||||
"org/cinnamon/desktop/applications/terminal".exec = pkgs.lib.niveum.defaultApplications.terminal;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -215,19 +207,17 @@ in
|
||||
./direnv.nix
|
||||
./docker.nix
|
||||
./dunst.nix
|
||||
./flix.nix
|
||||
./fonts.nix
|
||||
./fzf.nix
|
||||
./git.nix
|
||||
./hledger.nix
|
||||
./htop.nix
|
||||
./fu-berlin.nix
|
||||
./uni.nix
|
||||
./i3.nix
|
||||
./i3status-rust.nix
|
||||
./keyboard.nix
|
||||
./keyboard
|
||||
./mycelium.nix
|
||||
./kdeconnect.nix
|
||||
{ home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose; }
|
||||
{ services.upower.enable = true; }
|
||||
./lb.nix
|
||||
./mpv.nix
|
||||
@@ -236,9 +226,8 @@ in
|
||||
./nix.nix
|
||||
./newsboat.nix
|
||||
./flameshot.nix
|
||||
./fritzbox.nix
|
||||
./packages.nix
|
||||
./picom.nix
|
||||
./virtualization.nix
|
||||
./stardict.nix
|
||||
./polkit.nix
|
||||
./printing.nix
|
||||
@@ -262,38 +251,18 @@ in
|
||||
'';
|
||||
}
|
||||
./tor.nix
|
||||
./stw-berlin.nix
|
||||
./mastodon-bot.nix
|
||||
{
|
||||
fileSystems."${remoteDir}/fritz" = {
|
||||
device = "//192.168.178.1/FRITZ.NAS/Backup";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"username=ftpuser"
|
||||
"password=ftppassword"
|
||||
"noauto"
|
||||
"nounix"
|
||||
"rw"
|
||||
# "noserverino" # ref https://askubuntu.com/a/1265165
|
||||
"uid=${toString config.users.users.me.uid}"
|
||||
"gid=${toString config.users.groups.users.gid}"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=1"
|
||||
"x-systemd.idle-timeout=1min"
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
home-manager.users.me = {
|
||||
xdg.userDirs = rec {
|
||||
xdg.userDirs = let pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder"; in {
|
||||
enable = true;
|
||||
documents = "${config.users.users.me.home}/cloud/nextcloud/Documents";
|
||||
desktop = "/tmp";
|
||||
download = "${config.users.users.me.home}/sync/Downloads";
|
||||
music = "${config.users.users.me.home}/mobile/audio";
|
||||
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder";
|
||||
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
||||
videos = pictures;
|
||||
pictures = pictures;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(import <stockholm/makefu/3modules/bump-distrowatch.nix> {
|
||||
inherit lib config;
|
||||
pkgs = pkgs // {writeDash = pkgs.writers.writeDash;};
|
||||
})
|
||||
];
|
||||
|
||||
makefu.distrobump.enable = false;
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) defaultApplications theme;
|
||||
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
@@ -18,7 +17,7 @@ in {
|
||||
|
||||
home-manager.users.me.services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = (theme pkgs).icon;
|
||||
iconTheme = pkgs.lib.niveum.theme.icon;
|
||||
settings = {
|
||||
global = {
|
||||
transparency = 10;
|
||||
@@ -44,7 +43,7 @@ in {
|
||||
sticky_history = true;
|
||||
history_length = 20;
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||
browser = (defaultApplications pkgs).browser;
|
||||
browser = pkgs.lib.niveum.defaultApplications.browser;
|
||||
verbosity = "mesg";
|
||||
corner_radius = 0;
|
||||
mouse_left_click = "do_action";
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
showHelp = false;
|
||||
squareMagnifier = true;
|
||||
uploadWithoutConfirmation = true;
|
||||
buttons = ''@Variant(\0\0\0\x7f\0\0\0\vQList<int>\0\0\0\0\x10\0\0\0\x2\0\0\0\x5\0\0\0\x13\0\0\0\xa\0\0\0\x1\0\0\0\xc\0\0\0\xd\0\0\0\x6\0\0\0\x8\0\0\0\0\0\0\0\xf\0\0\0\x4\0\0\0\xb\0\0\0\x3\0\0\0\x12\0\0\0\x9)'';
|
||||
# buttons = ''@Variant(\0\0\0\x7f\0\0\0\vQList<int>\0\0\0\0\x10\0\0\0\x2\0\0\0\x5\0\0\0\x13\0\0\0\xa\0\0\0\x1\0\0\0\xc\0\0\0\xd\0\0\0\x6\0\0\0\x8\0\0\0\0\0\0\0\xf\0\0\0\x4\0\0\0\xb\0\0\0\x3\0\0\0\x12\0\0\0\x9)'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
flixLocation = "/media/flix";
|
||||
flixLocationNew = "/media/flix-new";
|
||||
cacheLocation = "/var/cache/flix";
|
||||
indexFilename = "index";
|
||||
indexFilenameNew = "index-new";
|
||||
flixUser = "flix";
|
||||
flixGroup = "users";
|
||||
inherit (import ../lib) tmpfilesConfig;
|
||||
in {
|
||||
fileSystems.${flixLocation} = {
|
||||
device = "prism.r:/export/download";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"noauto"
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=1"
|
||||
"x-systemd.idle-timeout=1min"
|
||||
"x-systemd.requires=tinc.retiolum.service"
|
||||
"user"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems.${flixLocationNew} = {
|
||||
device = "//yellow.r/public";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"guest"
|
||||
"nofail"
|
||||
"noauto"
|
||||
"ro"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=1"
|
||||
"x-systemd.idle-timeout=1min"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(tmpfilesConfig {
|
||||
type = "d";
|
||||
path = cacheLocation;
|
||||
mode = "0750";
|
||||
user = flixUser;
|
||||
group = flixGroup;
|
||||
})
|
||||
];
|
||||
|
||||
systemd.services.flix-index = {
|
||||
description = "Flix indexing service";
|
||||
wants = ["network-online.target"];
|
||||
script = ''
|
||||
cp ${flixLocation}/index ./${indexFilename}
|
||||
cp ${flixLocationNew}/index ./${indexFilenameNew}
|
||||
'';
|
||||
startAt = "hourly";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = flixUser;
|
||||
Group = flixGroup;
|
||||
WorkingDirectory = cacheLocation;
|
||||
};
|
||||
};
|
||||
|
||||
users.extraUsers.${flixUser} = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
home = cacheLocation;
|
||||
group = flixGroup;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "mpv-simpsons" ''
|
||||
set -efu
|
||||
cd "${flixLocation}/download"
|
||||
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
|
||||
|
||||
cat "${cacheLocation}/${indexFilename}" \
|
||||
| ${pkgs.gnugrep}/bin/grep -i 'simpsons.*mkv' \
|
||||
| shuf \
|
||||
| ${pkgs.findutils}/bin/xargs -d '\n' ${pkgs.mpv}/bin/mpv
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "flixmenu" ''
|
||||
set -efu
|
||||
(
|
||||
${pkgs.gnused}/bin/sed 's#^\.#${flixLocation}#' ${cacheLocation}/${indexFilename}
|
||||
${pkgs.gnused}/bin/sed 's#^\.#${flixLocationNew}#' ${cacheLocation}/${indexFilenameNew}
|
||||
) | ${pkgs.dmenu}/bin/dmenu -i -p flix -l 5 "$@" \
|
||||
| ${pkgs.findutils}/bin/xargs -I '{}' ${pkgs.util-linux}/bin/setsid ${pkgs.xdg-utils}/bin/xdg-open '{}'
|
||||
'')
|
||||
];
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
zip-font = name: arguments: let
|
||||
@@ -93,7 +92,6 @@ in {
|
||||
font-awesome
|
||||
galatia-sil
|
||||
gentium
|
||||
# niveumPackages.gfs-fonts
|
||||
gyre-fonts
|
||||
ibm-plex
|
||||
jetbrains-mono
|
||||
@@ -102,27 +100,28 @@ in {
|
||||
lmodern
|
||||
merriweather
|
||||
ocr-a
|
||||
montserrat
|
||||
roboto
|
||||
roboto-mono
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
noto-fonts-color-emoji
|
||||
roboto-slab
|
||||
scheherazade-new
|
||||
source-code-pro
|
||||
source-sans-pro
|
||||
source-serif-pro
|
||||
theano
|
||||
niveumPackages.tocharian-font
|
||||
vistafonts
|
||||
tocharian-font
|
||||
vista-fonts
|
||||
vollkorn
|
||||
zilla-slab
|
||||
]; # google-fonts league-of-moveable-type
|
||||
fontconfig.defaultFonts = rec {
|
||||
fontconfig.defaultFonts = let emoji = ["Noto Color Emoji"]; in {
|
||||
monospace = ["Noto Sans Mono"] ++ emoji;
|
||||
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
|
||||
sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"];
|
||||
emoji = ["Noto Color Emoji"];
|
||||
inherit emoji;
|
||||
};
|
||||
# xelatex fails with woff files
|
||||
# ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
networking.wg-quick.interfaces.aether = {
|
||||
autostart = false;
|
||||
dns = ["192.168.178.1" "fritz.box"];
|
||||
listenPort = 51820;
|
||||
privateKeyFile = config.age.secrets.wireguard-aether-key.path;
|
||||
peers = [
|
||||
{
|
||||
allowedIPs = ["192.168.178.0/24" "0.0.0.0/0"];
|
||||
endpoint = "lng5gx2rmssv8ge1.myfritz.net:58997";
|
||||
persistentKeepalive = 25;
|
||||
presharedKeyFile = config.age.secrets.wireguard-aether-psk.path;
|
||||
publicKey = "8Rr7BueC0CGmycBQFS7YM7VF7Adkdc1ZcLFy8YXyOQk=";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib/email.nix) defaults;
|
||||
sshIdentity = name: "${config.users.users.me.home}/.ssh/${name}";
|
||||
in {
|
||||
age.secrets = {
|
||||
email-password-fysi = {
|
||||
file = ../secrets/email-password-fysi.age;
|
||||
owner = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.me = {
|
||||
accounts.email.accounts = {
|
||||
fysi =
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
address = "kieran@fysi.tech";
|
||||
userName = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-fysi.path}";
|
||||
flavor = "fastmail.com";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.matchBlocks = rec {
|
||||
"nextcloud.fysi.dev" = {
|
||||
hostname = "116.203.82.203";
|
||||
user = "root";
|
||||
};
|
||||
"lingua.miaengiadina.ch" = {
|
||||
hostname = "135.181.85.233";
|
||||
user = "root";
|
||||
};
|
||||
"cms-dev.woc2023.app".identityFile = sshIdentity "fysiweb";
|
||||
"cms-master.woc2023.app".identityFile = sshIdentity "fysiweb";
|
||||
"fysi-dev1" = {
|
||||
hostname = "94.130.229.139";
|
||||
user = "root";
|
||||
identityFile = sshIdentity "fysiweb";
|
||||
};
|
||||
${fysi-dev1.hostname} = fysi-dev1;
|
||||
"fysi-shared0" = {
|
||||
hostname = "49.12.205.235";
|
||||
user = "root";
|
||||
identityFile = sshIdentity "fysiweb";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -5,9 +5,11 @@
|
||||
};
|
||||
|
||||
home-manager.users.me = {
|
||||
programs.fzf = rec {
|
||||
enable = true;
|
||||
programs.fzf = let
|
||||
defaultCommand = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
|
||||
in {
|
||||
enable = true;
|
||||
defaultCommand = defaultCommand;
|
||||
defaultOptions = ["--height=40%"];
|
||||
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||
changeDirWidgetOptions = [
|
||||
|
||||
19
configs/gaming.nix
Normal file
19
configs/gaming.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.zeroad
|
||||
pkgs.mari0
|
||||
pkgs.luanti # fka minetest
|
||||
# pkgs.openarena
|
||||
# pkgs.teeworlds
|
||||
pkgs.nethack
|
||||
# pkgs.freeciv
|
||||
# pkgs.lincity-ng
|
||||
# pkgs.superTuxKart
|
||||
];
|
||||
networking.firewall = {
|
||||
# for 0ad multiplayer
|
||||
allowedTCPPorts = [ 20595 ];
|
||||
allowedUDPPorts = [ 20595 ];
|
||||
};
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) kieran ignorePaths;
|
||||
in {
|
||||
}:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.mr
|
||||
pkgs.gitFull
|
||||
@@ -17,7 +16,6 @@ in {
|
||||
pkgs.gitstats
|
||||
pkgs.patch
|
||||
pkgs.patchutils
|
||||
inputs.self.packages.${pkgs.system}.git-preview
|
||||
];
|
||||
|
||||
environment.shellAliases = {
|
||||
@@ -29,9 +27,7 @@ in {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
userName = kieran.name;
|
||||
userEmail = kieran.email;
|
||||
aliases = {
|
||||
settings.alias = {
|
||||
br = "branch";
|
||||
co = "checkout";
|
||||
ci = "commit";
|
||||
@@ -44,20 +40,13 @@ in {
|
||||
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 = ignorePaths;
|
||||
extraConfig = {
|
||||
pull.ff = "only";
|
||||
rebase.autoStash = true;
|
||||
merge.autoStash = true;
|
||||
push.autoSetupRemote = true;
|
||||
|
||||
# # ref https://github.com/dandavison/delta
|
||||
# core.pager = "${pkgs.delta}/bin/delta";
|
||||
# interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
||||
# delta.navigate = true;
|
||||
# merge.conflictStyle = "diff3";
|
||||
# diff.colorMoved = "default";
|
||||
};
|
||||
ignores = pkgs.lib.niveum.ignorePaths;
|
||||
settings.user.name = pkgs.lib.niveum.kieran.name;
|
||||
settings.user.email = pkgs.lib.niveum.kieran.email;
|
||||
settings.pull.ff = "only";
|
||||
settings.rebase.autoStash = true;
|
||||
settings.merge.autoStash = true;
|
||||
settings.push.autoSetupRemove = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
109
configs/i3.nix
109
configs/i3.nix
@@ -2,18 +2,11 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
dashboard = pkgs.writers.writeDashBin "dashboard" ''
|
||||
${pkgs.alacritty}/bin/alacritty --option font.size=4 --class dashboard --command ${pkgs.writers.writeDash "dashboard-inner" ''
|
||||
exec ${pkgs.procps}/bin/watch -c -n 10 ${niveumPackages.q}/bin/q
|
||||
''}
|
||||
'';
|
||||
inherit (import ../lib) defaultApplications;
|
||||
klem = niveumPackages.klem.override {
|
||||
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
config.scripts = {
|
||||
klem = pkgs.klem.override {
|
||||
options.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
options.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 \
|
||||
@@ -42,10 +35,10 @@
|
||||
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
||||
'';
|
||||
"ipa" = pkgs.writers.writeDash "ipa" ''
|
||||
${niveumPackages.ipa}/bin/ipa
|
||||
${pkgs.ipa}/bin/ipa
|
||||
'';
|
||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||
${niveumPackages.betacode}/bin/betacode
|
||||
${pkgs.betacode}/bin/betacode
|
||||
'';
|
||||
"curl" = pkgs.writers.writeDash "curl" ''
|
||||
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||
@@ -56,12 +49,6 @@
|
||||
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 {
|
||||
@@ -86,15 +73,20 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
programs.slock.enable = true;
|
||||
|
||||
environment.systemPackages = [dashboard];
|
||||
environment.systemPackages = [
|
||||
pkgs.xsecurelock
|
||||
];
|
||||
environment.sessionVariables = {
|
||||
XSECURELOCK_NO_COMPOSITE = "1";
|
||||
XSECURELOCK_BACKGROUND_COLOR = "navy";
|
||||
XSECURELOCK_PASSWORD_PROMPT = "time_hex";
|
||||
};
|
||||
|
||||
services.displayManager.defaultSession = "none+i3";
|
||||
services.xserver = {
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
package = pkgs.i3;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -130,12 +122,12 @@ in {
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
};
|
||||
bars = [
|
||||
(config.home-manager.users.me.lib.stylix.i3.bar
|
||||
// rec {
|
||||
bars = let position = "bottom"; in [
|
||||
(lib.recursiveUpdate config.home-manager.users.me.stylix.targets.i3.exportedBarConfig
|
||||
{
|
||||
workspaceButtons = true;
|
||||
mode = "hide"; # "dock";
|
||||
position = "bottom";
|
||||
inherit position;
|
||||
statusCommand = toString (pkgs.writers.writeDash "i3status-rust" ''
|
||||
export I3RS_GITHUB_TOKEN="$(cat ${config.age.secrets.github-token-i3status-rust.path})"
|
||||
export OPENWEATHERMAP_API_KEY="$(cat ${config.age.secrets.openweathermap-api-key.path})"
|
||||
@@ -224,15 +216,15 @@ in {
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+q" = "exec ${config.services.clipmenu.package}/bin/clipmenu";
|
||||
|
||||
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
||||
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
|
||||
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
|
||||
"${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}+d" = "exec ${pkgs.writers.writeDash "run" ''exec rofi -modi run,ssh,window -show run''}";
|
||||
"${modifier}+Shift+d" = "exec ${niveumPackages.notemenu}/bin/notemenu";
|
||||
"${modifier}+Shift+d" = "exec ${pkgs.notemenu}/bin/notemenu";
|
||||
"${modifier}+p" = "exec rofi-pass";
|
||||
"${modifier}+Shift+p" = "exec rofi-pass --insert";
|
||||
"${modifier}+u" = "exec ${niveumPackages.unicodmenu}/bin/unicodmenu";
|
||||
"${modifier}+u" = "exec ${pkgs.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" ''
|
||||
@@ -252,7 +244,6 @@ 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)
|
||||
@@ -269,37 +260,12 @@ in {
|
||||
# XF86Launch1 (thinkvantage)
|
||||
};
|
||||
in {
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config = {
|
||||
menu = "rofi -modi run,ssh,window -show run";
|
||||
inherit modifier modes gaps bars floating window colors keybindings;
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "de";
|
||||
xkb_variant = "T3";
|
||||
};
|
||||
};
|
||||
terminal = (defaultApplications pkgs).terminal;
|
||||
up = "k";
|
||||
down = "j";
|
||||
left = "h";
|
||||
right = "l";
|
||||
seat = {
|
||||
"*" = {
|
||||
hide_cursor = "when-typing enable";
|
||||
};
|
||||
};
|
||||
startup = [
|
||||
{command = "echo hello";}
|
||||
];
|
||||
};
|
||||
};
|
||||
stylix.targets.i3.enable = true;
|
||||
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
bindsym --release ${modifier}+Shift+w exec /run/wrappers/bin/slock
|
||||
bindsym --release ${modifier}+Shift+w exec xsecurelock
|
||||
|
||||
exec "${pkgs.obsidian}/bin/obsidian"
|
||||
for_window [class="obsidian"] , move scratchpad
|
||||
@@ -308,23 +274,11 @@ in {
|
||||
exec "${pkgs.writers.writeDash "irc" "exec ${pkgs.alacritty}/bin/alacritty --class message -e ssh weechat@makanek -t tmux attach-session -t IM"}"
|
||||
exec "${pkgs.writers.writeDash "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}"
|
||||
|
||||
assign [class="dashboard"] ${infoWorkspace}
|
||||
exec ${dashboard}/bin/dashboard
|
||||
exec --no-startup-id ${pkgs.xss-lock}/bin/xss-lock -- xsecurelock
|
||||
'';
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
inherit modifier gaps modes bars floating window colors keybindings;
|
||||
}
|
||||
{
|
||||
keybindings = let
|
||||
new-workspace = pkgs.writers.writeDash "new-workspace" ''
|
||||
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||
'';
|
||||
move-to-new-workspace = pkgs.writers.writeDash "new-workspace" ''
|
||||
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||
'';
|
||||
in {
|
||||
"${modifier}+ß" = "exec ${niveumPackages.menu-calc}/bin/=";
|
||||
config = {
|
||||
inherit modifier gaps modes bars floating window colors;
|
||||
keybindings = keybindings // {
|
||||
"${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";
|
||||
@@ -332,10 +286,9 @@ in {
|
||||
"Print" = "exec flameshot gui";
|
||||
# "${modifier}+Shift+x" = "exec ${move-to-new-workspace}";
|
||||
# "${modifier}+x" = "exec ${new-workspace}";
|
||||
"XF86Display" = "exec ${niveumPackages.dmenu-randr}/bin/dmenu-randr";
|
||||
"XF86Display" = "exec ${pkgs.dmenu-randr}/bin/dmenu-randr";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
|
||||
commaSep = builtins.concatStringsSep ",";
|
||||
xkbOptions = ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
|
||||
languages = {
|
||||
deutsch = { code = "de"; variant = "T3"; };
|
||||
greek = { code = "gr"; variant = "polytonic"; };
|
||||
russian = { code = "ru"; variant = "phonetic"; };
|
||||
arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic;
|
||||
coptic = ../lib/keyboards/coptic;
|
||||
avestan = ../lib/keyboards/avestan;
|
||||
gothic = ../lib/keyboards/gothic;
|
||||
farsi = { code = "ir"; variant = "qwerty"; };
|
||||
syriac = { code = "sy"; variant = "syc_phonetic"; };
|
||||
sanskrit = { code = "in"; variant = "san-kagapa"; };
|
||||
gujarati = {code = "in"; variant = "guj-kagapa"; };
|
||||
urdu = {code = "in"; variant = "urd-phonetic"; };
|
||||
hebrew = {code = "il"; variant = "phonetic";};
|
||||
};
|
||||
defaultLanguage = languages.deutsch;
|
||||
in {
|
||||
services.libinput.enable = true;
|
||||
|
||||
# man 7 xkeyboard-config
|
||||
services.xserver = {
|
||||
exportConfiguration = true; # link /usr/share/X11 properly
|
||||
xkb.layout = defaultLanguage.code;
|
||||
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
|
||||
# buckwalter: http://www.qamus.org/transliteration.htm
|
||||
xkb.variant = defaultLanguage.variant;
|
||||
xkb.options = commaSep xkbOptions;
|
||||
xkb.dir = pkgs.symlinkJoin {
|
||||
name = "x-keyboard-directory";
|
||||
paths = [
|
||||
"${pkgs.xkeyboard_config}/etc/X11/xkb"
|
||||
(pkgs.linkFarm "custom-x-keyboards" (
|
||||
lib.mapAttrsToList (name: value: {
|
||||
name = "symbols/${name}";
|
||||
path = value;
|
||||
}) (lib.filterAttrs (_: value: !(value ? "code")) languages) ++ [
|
||||
{
|
||||
name = "symbols/ir";
|
||||
path = ../lib/keyboards/farsi;
|
||||
}
|
||||
]
|
||||
))
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."x11-locale".source = toString pkgs.xorg.libX11 + "share/X11/locale";
|
||||
|
||||
console.keyMap = "de";
|
||||
|
||||
environment.systemPackages =
|
||||
lib.mapAttrsToList
|
||||
(language: settings:
|
||||
let
|
||||
code = if settings ? "code" then settings.code else language;
|
||||
variant = if settings ? "variant" then settings.variant else "";
|
||||
in
|
||||
pkgs.writers.writeDashBin "kb-${language}" ''
|
||||
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage.code},${code} ${defaultLanguage.variant},${variant} ${toString (map (option: "-option ${option}") xkbOptions)}
|
||||
'')
|
||||
languages;
|
||||
|
||||
# improve held key rate
|
||||
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
||||
|
||||
systemd.user.services.gxkb = {
|
||||
wantedBy = ["graphical-session.target"];
|
||||
serviceConfig = {
|
||||
SyslogIdentifier = "gxkb";
|
||||
ExecStart = "${pkgs.gxkb}/bin/gxkb";
|
||||
Restart = "always";
|
||||
RestartSec = "15s";
|
||||
StartLimitBurst = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
139
configs/keyboard/default.nix
Normal file
139
configs/keyboard/default.nix
Normal file
@@ -0,0 +1,139 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
||||
commaSep = builtins.concatStringsSep ",";
|
||||
xkbOptions = [
|
||||
"compose:caps"
|
||||
"terminate:ctrl_alt_bksp"
|
||||
"grp:ctrls_toggle"
|
||||
];
|
||||
languages = {
|
||||
deutsch = {
|
||||
code = "de";
|
||||
variant = "T3";
|
||||
};
|
||||
greek = {
|
||||
code = "gr";
|
||||
variant = "polytonic";
|
||||
};
|
||||
russian = {
|
||||
code = "ru";
|
||||
variant = "phonetic";
|
||||
};
|
||||
arabic = {
|
||||
code = "ara";
|
||||
variant = "buckwalter";
|
||||
};
|
||||
coptic = ./coptic;
|
||||
avestan = ./avestan;
|
||||
gothic = ./gothic;
|
||||
farsi = {
|
||||
code = "ir";
|
||||
variant = "qwerty";
|
||||
};
|
||||
syriac = {
|
||||
code = "sy";
|
||||
variant = "syc_phonetic";
|
||||
};
|
||||
sanskrit = {
|
||||
code = "in";
|
||||
variant = "san-kagapa";
|
||||
};
|
||||
gujarati = {
|
||||
code = "in";
|
||||
variant = "guj-kagapa";
|
||||
};
|
||||
urdu = {
|
||||
code = "in";
|
||||
variant = "urd-phonetic";
|
||||
};
|
||||
hebrew = {
|
||||
code = "il";
|
||||
variant = "phonetic";
|
||||
};
|
||||
};
|
||||
defaultLanguage = languages.deutsch;
|
||||
in
|
||||
{
|
||||
services.libinput.enable = true;
|
||||
|
||||
# man 7 xkeyboard-config
|
||||
services.xserver = {
|
||||
exportConfiguration = lib.mkForce 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."x11-locale".source = toString pkgs.xorg.libX11 + "share/X11/locale";
|
||||
|
||||
home-manager.users.me = {
|
||||
home.file = {
|
||||
".XCompose".source = ./XCompose;
|
||||
};
|
||||
};
|
||||
|
||||
console.keyMap = "de";
|
||||
|
||||
environment.systemPackages = lib.mapAttrsToList (
|
||||
language: settings:
|
||||
let
|
||||
code = if settings ? "code" then settings.code else language;
|
||||
variant = if settings ? "variant" then settings.variant else "";
|
||||
in
|
||||
pkgs.writers.writeDashBin "kb-${language}" ''
|
||||
if [ -z $SWAYSOCK ]; then
|
||||
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage.code},${code} ${defaultLanguage.variant},${variant} ${
|
||||
toString (map (option: "-option ${option}") xkbOptions)
|
||||
}
|
||||
else
|
||||
swaymsg -s $SWAYSOCK 'input * xkb_layout "${defaultLanguage.code},${code}"'
|
||||
swaymsg -s $SWAYSOCK 'input * xkb_variant "${defaultLanguage.variant},${variant}"'
|
||||
swaymsg -s $SWAYSOCK 'input * xkb_options "${lib.concatStringsSep "," xkbOptions}"'
|
||||
fi
|
||||
''
|
||||
) (languages // config.services.xserver.xkb.extraLayouts);
|
||||
|
||||
# improve held key rate
|
||||
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
||||
|
||||
systemd.user.services.gxkb = {
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
SyslogIdentifier = "gxkb";
|
||||
ExecStart = "${pkgs.gxkb}/bin/gxkb";
|
||||
Restart = "always";
|
||||
RestartSec = "15s";
|
||||
StartLimitBurst = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -10,11 +10,6 @@
|
||||
username = "kieran";
|
||||
passwordFile = config.age.secrets.nextcloud-password-kieran.path;
|
||||
};
|
||||
fysiCloud = {
|
||||
davEndpoint = "https://nextcloud.fysi.dev/remote.php/dav";
|
||||
username = "kmein";
|
||||
passwordFile = config.age.secrets.nextcloud-password-fysi.path;
|
||||
};
|
||||
in {
|
||||
age.secrets = {
|
||||
nextcloud-password-kieran = {
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
environment.shellAliases.smpv = swallow "mpv";
|
||||
|
||||
@@ -37,7 +36,7 @@ in {
|
||||
};
|
||||
scripts = [
|
||||
pkgs.mpvScripts.quality-menu
|
||||
niveumPackages.mpv-visualizer
|
||||
pkgs.mpvScripts.visualizer
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
myceliumAddresses = import ../lib/mycelium-network.nix;
|
||||
in
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
services.mycelium = {
|
||||
enable = true;
|
||||
@@ -11,5 +8,5 @@ in
|
||||
networking.hosts = lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = [ "${name}.m" ];
|
||||
}) myceliumAddresses;
|
||||
}) pkgs.lib.niveum.myceliumAddresses;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
@@ -36,9 +35,9 @@
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
||||
(niveumPackages.vim.override {
|
||||
(pkgs.vim-kmein.override {
|
||||
# stylixColors = config.lib.stylix.colors;
|
||||
colorscheme = "base16-gruvbox-light-medium";
|
||||
colorscheme = "base16-gruvbox-dark-medium";
|
||||
})
|
||||
|
||||
# language servers
|
||||
@@ -46,13 +45,14 @@
|
||||
pkgs.haskellPackages.haskell-language-server
|
||||
pkgs.texlab
|
||||
pkgs.nil
|
||||
pkgs.gopls
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.rust-analyzer
|
||||
pkgs.nodePackages.typescript-language-server
|
||||
pkgs.lua-language-server
|
||||
pkgs.nodePackages.vscode-langservers-extracted
|
||||
pkgs.lemminx
|
||||
niveumPackages.jq-lsp
|
||||
pkgs.lemminx # XML LSP
|
||||
pkgs.jq-lsp
|
||||
pkgs.dhall-lsp-server
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
{ pkgs, niveumPackages, config, ... }: {
|
||||
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
|
||||
environment.shellAliases.vi = "nvim";
|
||||
environment.shellAliases.vim = "nvim";
|
||||
environment.shellAliases.view = "nvim -R";
|
||||
|
||||
home-manager.users.me = {
|
||||
editorconfig = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"*" = {
|
||||
charset = "utf-8";
|
||||
end_of_line = "lf";
|
||||
trim_trailing_whitespace = true;
|
||||
insert_final_newline = true;
|
||||
indent_style = "space";
|
||||
indent_size = 2;
|
||||
};
|
||||
"*.py" = { indent_size = 4; };
|
||||
Makefile = { indent_style = "tab"; };
|
||||
"*.md" = { trim_trailing_whitespace = false; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
||||
(niveumPackages.vim.override {
|
||||
stylixColors = config.lib.stylix.colors;
|
||||
# colorscheme = "base16-gruvbox-dark-medium";
|
||||
})
|
||||
|
||||
# language servers
|
||||
pkgs.pyright
|
||||
pkgs.haskellPackages.haskell-language-server
|
||||
pkgs.texlab
|
||||
pkgs.nil
|
||||
pkgs.rust-analyzer
|
||||
pkgs.nodePackages.typescript-language-server
|
||||
pkgs.lua-language-server
|
||||
pkgs.nodePackages.vscode-langservers-extracted
|
||||
pkgs.lemminx
|
||||
niveumPackages.jq-lsp
|
||||
pkgs.dhall-lsp-server
|
||||
];
|
||||
}
|
||||
@@ -3,14 +3,10 @@
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
niveumPackages,
|
||||
unstablePackages,
|
||||
...
|
||||
}: let
|
||||
worldradio = pkgs.callPackage ../packages/worldradio.nix {};
|
||||
|
||||
externalNetwork = import ../lib/external-network.nix;
|
||||
|
||||
zoteroStyle = {
|
||||
name,
|
||||
sha256,
|
||||
@@ -63,9 +59,15 @@ in {
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
(pkgs.writers.writeDashBin "amfora" ''
|
||||
${pkgs.st}/bin/st -e ${pkgs.amfora}/bin/amfora
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "gpodder" ''
|
||||
GPODDER_DOWNLOAD_DIR=${config.users.users.me.home}/mobile/audio/Text/podcasts exec ${pkgs.gpodder}/bin/gpodder "$@"
|
||||
'')
|
||||
# INTERNET
|
||||
aria2
|
||||
tdesktop
|
||||
telegram-desktop
|
||||
whois
|
||||
dnsutils
|
||||
# FILE MANAGERS
|
||||
@@ -94,16 +96,17 @@ in {
|
||||
# HARDWARE TOOLS
|
||||
gnome-disk-utility
|
||||
arandr # xrandr for noobs
|
||||
wdisplays
|
||||
libnotify # for notify-send
|
||||
xclip # clipboard CLI
|
||||
xdragon # drag and drop
|
||||
dragon-drop # drag and drop
|
||||
xorg.xkill # kill by clicking
|
||||
portfolio # personal finance overview
|
||||
audacity
|
||||
calibre
|
||||
electrum
|
||||
inkscape
|
||||
niveumPackages.gimp
|
||||
gimp
|
||||
gthumb
|
||||
astrolog
|
||||
obsidian
|
||||
@@ -114,73 +117,69 @@ in {
|
||||
zoom-us # video conferencing
|
||||
(pkgs.writers.writeDashBin "im" ''
|
||||
weechat_password=$(${pkgs.pass}/bin/pass weechat)
|
||||
exec ${unstablePackages.weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${externalNetwork.makanek}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
||||
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'
|
||||
'')
|
||||
alejandra # nix formatter
|
||||
pdfgrep # search in pdf
|
||||
pdftk # pdf toolkit
|
||||
mupdf
|
||||
poppler_utils # pdf toolkit
|
||||
poppler-utils # pdf toolkit
|
||||
kdePackages.okular # the word is nucular
|
||||
xournalpp # for annotating pdfs
|
||||
pdfpc # presenter console for pdf slides
|
||||
niveumPackages.hc # print files as qr codes
|
||||
hc # print files as qr codes
|
||||
yt-dlp
|
||||
espeak
|
||||
rink # unit converter
|
||||
niveumPackages.auc
|
||||
niveumPackages.noise-waves
|
||||
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
|
||||
jellyfin-media-player
|
||||
niveumPackages.devanagari
|
||||
niveumPackages.betacode # ancient greek betacode to unicode converter
|
||||
niveumPackages.meteo
|
||||
niveumPackages.jq-lsp
|
||||
niveumPackages.swallow # window swallowing
|
||||
niveumPackages.literature-quote
|
||||
niveumPackages.booksplit
|
||||
niveumPackages.dmenu-randr
|
||||
niveumPackages.dmenu-bluetooth
|
||||
niveumPackages.manual-sort
|
||||
niveumPackages.dns-sledgehammer
|
||||
niveumPackages.wttr
|
||||
niveumPackages.unicodmenu
|
||||
niveumPackages.emailmenu
|
||||
niveumPackages.closest
|
||||
niveumPackages.trans
|
||||
(niveumPackages.mpv-radio.override {
|
||||
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 {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
})
|
||||
(niveumPackages.mpv-radio.override {
|
||||
(mpv-radio.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
executableName = "cro-radio";
|
||||
mpvCommand = "${niveumPackages.cro}/bin/cro";
|
||||
mpvCommand = "${cro}/bin/cro";
|
||||
})
|
||||
(niveumPackages.mpv-tuner.override {
|
||||
(mpv-tuner.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
})
|
||||
# kmein.slide
|
||||
termdown
|
||||
niveumPackages.image-convert-tolino
|
||||
niveumPackages.rfc
|
||||
niveumPackages.tag
|
||||
niveumPackages.timer
|
||||
niveumPackages.menu-calc
|
||||
image-convert-tolino
|
||||
rfc
|
||||
tag
|
||||
timer
|
||||
nix-prefetch-git
|
||||
niveumPackages.nix-git
|
||||
nix-git
|
||||
nixfmt-rfc-style
|
||||
par
|
||||
qrencode
|
||||
@@ -197,20 +196,13 @@ in {
|
||||
${pkgs.openssh}/bin/ssh makanek "cd /var/lib/weechat/logs && grep --ignore-case --color=always --recursive $@" | ${pkgs.less}/bin/less --raw-control-chars
|
||||
'')
|
||||
|
||||
(pkgs.writers.writeDashBin "ncmpcpp-zaatar" ''MPD_HOST=${(import ../lib/local-network.nix).zaatar} exec ${pkgs.ncmpcpp}/bin/ncmpcpp "$@"'')
|
||||
(pkgs.writers.writeDashBin "mpc-zaatar" ''MPD_HOST=${(import ../lib/local-network.nix).zaatar} exec ${pkgs.mpc_cli}/bin/mpc "$@"'')
|
||||
|
||||
inputs.scripts.packages.x86_64-linux.alarm
|
||||
|
||||
spotify
|
||||
ncspot
|
||||
playerctl
|
||||
|
||||
nix-index
|
||||
niveumPackages.nix-index-update
|
||||
|
||||
#krebs
|
||||
niveumPackages.dic
|
||||
pkgs.nur.repos.mic92.ircsink
|
||||
|
||||
(haskellPackages.ghcWithHoogle (hs: [
|
||||
@@ -237,14 +229,13 @@ in {
|
||||
dhall
|
||||
|
||||
html-tidy
|
||||
nodePackages.csslint
|
||||
nodePackages.jsonlint
|
||||
deno # better node.js
|
||||
go
|
||||
texlive.combined.scheme-full
|
||||
latexrun
|
||||
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
|
||||
# haskellPackages.pandoc-citeproc
|
||||
niveumPackages.text2pdf
|
||||
text2pdf
|
||||
lowdown
|
||||
glow # markdown to term
|
||||
libreoffice
|
||||
@@ -252,7 +243,7 @@ in {
|
||||
dia
|
||||
pandoc
|
||||
librsvg # pandoc depends on this to include SVG in documents
|
||||
# niveumPackages.man-pandoc
|
||||
# man-pandoc
|
||||
typst
|
||||
# proselint
|
||||
asciidoctor
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
services.picom = {
|
||||
enable = true;
|
||||
# activeOpacity = 1;
|
||||
fade = true;
|
||||
fadeDelta = 1;
|
||||
# inactiveOpacity = 0.9;
|
||||
# shadow = true;
|
||||
# menuOpacity = 0.9;
|
||||
# shadowOpacity = 0.3;
|
||||
fadeExclude = [
|
||||
"class_g = 'slock'" # don't want a transparent lock screen!
|
||||
"name *?= 'slock'"
|
||||
"focused = 1"
|
||||
];
|
||||
opacityRules = [
|
||||
# opacity-rule overrides both inactive and active opacity
|
||||
|
||||
# video in browser tabs
|
||||
# substring /regex match of title bar text
|
||||
"99:name *?= 'Youtube'"
|
||||
"99:WM_CLASS@:s *= 'mpv$'"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
{pkgs, ...}: let
|
||||
inherit (import ../lib) localAddresses;
|
||||
{pkgs, lib, ...}: let
|
||||
hp-driver = pkgs.hplip;
|
||||
in {
|
||||
services.printing = {
|
||||
@@ -18,7 +17,7 @@ in {
|
||||
{
|
||||
name = "OfficeJet";
|
||||
location = "Zimmer";
|
||||
deviceUri = "https://${localAddresses.officejet}";
|
||||
deviceUri = "https://${pkgs.lib.niveum.localAddresses.officejet}";
|
||||
model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd";
|
||||
ppdOptions = {
|
||||
Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None
|
||||
|
||||
@@ -1 +1 @@
|
||||
{services.redshift.enable = false;}
|
||||
{ services.redshift.enable = true; }
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
location = {
|
||||
latitude = 52.517;
|
||||
longitude = 13.3872;
|
||||
provider = "geoclue2";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{pkgs, ...}: let
|
||||
inherit (import ../lib) sshPort kieran;
|
||||
externalNetwork = import ../lib/external-network.nix;
|
||||
in {
|
||||
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
users.users.me.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys;
|
||||
programs.ssh.startAgent = true;
|
||||
services.gnome.gcr-ssh-agent.enable = false;
|
||||
|
||||
home-manager.users.me = {
|
||||
# https://discourse.nixos.org/t/gnome-keyring-and-ssh-agent-without-gnome/11663
|
||||
@@ -11,35 +10,11 @@ in {
|
||||
eval $(${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon --daemonize --components=ssh,secrets)
|
||||
export SSH_AUTH_SOCK
|
||||
'';
|
||||
# services.gpg-agent = rec {
|
||||
# enable = false;
|
||||
# enableSshSupport = true;
|
||||
# defaultCacheTtlSsh = 2 * 60 * 60;
|
||||
# maxCacheTtlSsh = 4 * defaultCacheTtlSsh;
|
||||
# sshKeys = [
|
||||
# "568047C91DE03A23883E340F15A9C24D313E847C"
|
||||
# "BB3EE102DB8CD45540A78A6B18B511B67061F6B4" # kfm@manakish ed25519
|
||||
# "3F8986755818B5762A096BE212777EAAC441DD9D" # fysiweb rsa
|
||||
# "0E4ABD229432486CC432639BB0986B2CDE365105" # agenix ed25519
|
||||
# "A1E8D32CBFCDBD2DE798E2298D795CCFD785AE06" # kfm@kabsa ed25519
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
# environment.extraInit = ''
|
||||
# if [[ -z "$SSH_AUTH_SOCK" ]]; then
|
||||
# export SSH_AUTH_SOCK="$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)"
|
||||
# fi
|
||||
# '';
|
||||
|
||||
# environment.interactiveShellInit = ''
|
||||
# GPG_TTY="$(tty)"
|
||||
# export GPG_TTY
|
||||
# ${pkgs.gnupg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||
# '';
|
||||
|
||||
home-manager.users.me.programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "ssh.github.com";
|
||||
@@ -48,42 +23,42 @@ in {
|
||||
zaatar = {
|
||||
hostname = "zaatar.r";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
makanek = {
|
||||
hostname = externalNetwork.makanek;
|
||||
hostname = pkgs.lib.niveum.externalNetwork.makanek;
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
ful = {
|
||||
hostname = externalNetwork.ful;
|
||||
hostname = pkgs.lib.niveum.externalNetwork.ful;
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
tahina = {
|
||||
hostname = "tahina.r";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
tabula = {
|
||||
hostname = "tabula.r";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
manakish = {
|
||||
hostname = "manakish.r";
|
||||
user = "kfm";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
kabsa = {
|
||||
hostname = "kabsa.r";
|
||||
user = "kfm";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
fatteh = {
|
||||
hostname = "fatteh.r";
|
||||
user = "kfm";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) sshPort kieran;
|
||||
in {
|
||||
}:
|
||||
{
|
||||
users.motd = "Welcome to ${config.networking.hostName}!";
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [sshPort];
|
||||
ports = [ pkgs.lib.niveum.sshPort ];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
X11Forwarding = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys ++ [
|
||||
users.users.root.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys ++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoiRIn1dBUtpApcUyGbZKN+m5KBSgKIDQjdnQ8vU0xU kfm@kibbeh" # travel laptop
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
age.secrets.stw-berlin-card-code.file = ../secrets/stw-berlin-card-code.age;
|
||||
|
||||
systemd.services.stw-berlin = {
|
||||
enable = true;
|
||||
wants = ["network-online.target"];
|
||||
startAt = "weekly";
|
||||
serviceConfig = {
|
||||
User = config.users.users.me.name;
|
||||
Group = config.users.users.me.group;
|
||||
WorkingDirectory = "/home/kfm/cloud/nextcloud/Uni/Meta/Mensa";
|
||||
LoadCredential = [
|
||||
"password:${config.age.secrets.stw-berlin-card-code.path}"
|
||||
];
|
||||
};
|
||||
script = ''
|
||||
KARTEN_ID=8071859
|
||||
PASSWORT=$(cat "$CREDENTIALS_DIRECTORY"/password)
|
||||
|
||||
endpoint=https://ks.stw.berlin:4433/TL1/TLM/KASVC
|
||||
authorization_header='Authorization: Basic S0FTVkM6ekt2NXlFMUxaVW12VzI5SQ=='
|
||||
|
||||
get_auth_token() {
|
||||
${pkgs.curl}/bin/curl -sSL "$endpoint/LOGIN?karteNr=$KARTEN_ID&format=JSON&datenformat=JSON" \
|
||||
-X POST \
|
||||
-H "$authorization_header" \
|
||||
--data-raw '{"BenutzerID":"'$KARTEN_ID'","Passwort":"'$PASSWORT'"}' \
|
||||
| ${pkgs.jq}/bin/jq -r '.[0].authToken|@uri'
|
||||
}
|
||||
|
||||
|
||||
get_transactions() {
|
||||
${pkgs.curl}/bin/curl -sSL "$endpoint/TRANS?format=JSON&authToken=$(get_auth_token)&karteNr=$KARTEN_ID&datumVon=12.02.2018&datumBis=$(date -d tomorrow +%d.%m.%Y)" \
|
||||
-H "$authorization_header" \
|
||||
| ${pkgs.jq}/bin/jq
|
||||
}
|
||||
|
||||
get_items() {
|
||||
${pkgs.curl}/bin/curl -sSL "$endpoint/TRANSPOS?format=JSON&authToken=$(get_auth_token)&karteNr=$KARTEN_ID&datumVon=12.02.2018&datumBis=$(date -d tomorrow +%d.%m.%Y)" \
|
||||
-H "$authorization_header" \
|
||||
| ${pkgs.jq}/bin/jq
|
||||
}
|
||||
|
||||
get_transactions > transactions-$(date -I).json
|
||||
get_items > items-$(date -I).json
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -18,7 +18,7 @@ in {
|
||||
stylix.enable = true;
|
||||
stylix.image = generatedWallpaper;
|
||||
|
||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-light-medium.yaml";
|
||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
|
||||
|
||||
stylix.cursor = {
|
||||
name = "capitaine-cursors-white";
|
||||
@@ -26,6 +26,9 @@ in {
|
||||
size = 12;
|
||||
};
|
||||
|
||||
home-manager.users.me = {
|
||||
stylix.autoEnable = true;
|
||||
};
|
||||
|
||||
# environment.etc."stylix/wallpaper.png".source = generatedWallpaper;
|
||||
|
||||
@@ -67,7 +70,7 @@ in {
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
aggressiveResize = true;
|
||||
escapeTime = 50;
|
||||
historyLimit = 7000;
|
||||
shortcut = "a";
|
||||
shortcut = "b";
|
||||
extraConfig = ''
|
||||
set -g mouse on
|
||||
|
||||
@@ -37,15 +37,6 @@
|
||||
set -g status-left-length 32
|
||||
set -g status-right-length 150
|
||||
|
||||
set -g status-bg colour242
|
||||
|
||||
setw -g window-status-format "#[fg=colour12,bg=colour233] #I #[fg=white,bg=colour237] #W "
|
||||
setw -g window-status-current-format "#[fg=colour12,bg=colour233] * #[fg=white,bg=colour237,bold] #W "
|
||||
|
||||
set -g status-left ""
|
||||
set -g status-right "#[fg=colour255,bg=colour237,bold] #(hostname -I) #[default]#[fg=colour12,bg=colour233] %FT%R "
|
||||
set -g status-justify left
|
||||
|
||||
set -g status-position bottom
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -5,13 +5,11 @@
|
||||
...
|
||||
}: let
|
||||
username = "meinhak99";
|
||||
inherit (import ../lib/email.nix) defaults pronouns;
|
||||
inherit (import ../lib) remoteDir;
|
||||
fu-defaults = rec {
|
||||
imap.host = "mail.zedat.fu-berlin.de";
|
||||
fu-defaults = let mailhost = "mail.zedat.fu-berlin.de"; in {
|
||||
imap.host = mailhost;
|
||||
imap.port = 993;
|
||||
imap.tls.enable = true;
|
||||
smtp.host = imap.host;
|
||||
smtp.host = mailhost;
|
||||
smtp.port = 465;
|
||||
smtp.tls.enable = true;
|
||||
folders.drafts = "Entwürfe";
|
||||
@@ -30,34 +28,31 @@ in {
|
||||
};
|
||||
};
|
||||
accounts.email.accounts = {
|
||||
fu-student =
|
||||
lib.recursiveUpdate defaults
|
||||
letos =
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
||||
{
|
||||
userName = "slfletos";
|
||||
address = "letos.sprachlit@hu-berlin.de";
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}";
|
||||
imap.host = "mailbox.cms.hu-berlin.de";
|
||||
imap.port = 993;
|
||||
smtp.host = "mailhost.cms.hu-berlin.de";
|
||||
smtp.port = 25;
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
fu =
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
||||
(lib.recursiveUpdate fu-defaults
|
||||
rec {
|
||||
userName = "meinhak99";
|
||||
(let userName = "meinhak99"; in {
|
||||
userName = userName;
|
||||
address = "kieran.meinhardt@fu-berlin.de";
|
||||
aliases = ["${userName}@fu-berlin.de"];
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhak99.path}";
|
||||
aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text);
|
||||
signature = {
|
||||
showSignature = "append";
|
||||
text = ''
|
||||
${defaults.realName}
|
||||
${pronouns}
|
||||
|
||||
---
|
||||
Studentische Hilfskraft / ZODIAC
|
||||
Freie Universität Berlin
|
||||
|
||||
Telefon: +49 30 838 58118
|
||||
Arnimallee 10, Raum 106, 14195 Berlin
|
||||
'';
|
||||
};
|
||||
himalaya = {
|
||||
enable = true;
|
||||
settings.backend = "imap";
|
||||
};
|
||||
});
|
||||
}));
|
||||
};
|
||||
};
|
||||
|
||||
@@ -68,6 +63,12 @@ in {
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
};
|
||||
email-password-letos = {
|
||||
file = ../secrets/email-password-letos.age;
|
||||
owner = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
};
|
||||
fu-sftp-key = {
|
||||
file = ../secrets/fu-sftp-key.age;
|
||||
owner = "root";
|
||||
@@ -97,7 +98,7 @@ in {
|
||||
firstCharacter = lib.strings.substring 0 1;
|
||||
|
||||
home-directory-mount = user: {
|
||||
"${remoteDir}/fu/${user}/home" = {
|
||||
"${pkgs.lib.niveum.remoteDir}/fu/${user}/home" = {
|
||||
device = "${user}@login.zedat.fu-berlin.de:/home/${firstCharacter user}/${user}";
|
||||
fsType = "sshfs";
|
||||
options = [
|
||||
@@ -110,24 +111,31 @@ in {
|
||||
];
|
||||
};
|
||||
};
|
||||
in {
|
||||
"${remoteDir}/fu/zodiac" = {
|
||||
device = "//trove.storage.fu-berlin.de/GESCHKULT";
|
||||
fsType = "cifs";
|
||||
options =
|
||||
fu-berlin-cifs-options
|
||||
++ [
|
||||
"credentials=${config.age.secrets.cifs-credentials-zodiac.path}"
|
||||
];
|
||||
};
|
||||
} // home-directory-mount "meinhak99"
|
||||
// home-directory-mount "xm7234fu";
|
||||
|
||||
age.secrets = {
|
||||
cifs-credentials-zodiac.file = ../secrets/cifs-credentials-zodiac.age;
|
||||
};
|
||||
in home-directory-mount "meinhak99";
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "hu-vpn-split" ''
|
||||
${pkgs.openfortivpn}/bin/openfortivpn \
|
||||
--password="$(cat "${config.age.secrets.email-password-letos.path}")" \
|
||||
--config=${
|
||||
pkgs.writeText "hu-berlin-split.config" ''
|
||||
host = forti-ssl.vpn.hu-berlin.de
|
||||
port = 443
|
||||
username = slfletos@split_tunnel
|
||||
''
|
||||
}
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "hu-vpn-full" ''
|
||||
${pkgs.openfortivpn}/bin/openfortivpn \
|
||||
--password="$(cat "${config.age.secrets.email-password-letos.path}")" \
|
||||
--config=${
|
||||
pkgs.writeText "hu-berlin-full.config" ''
|
||||
host = forti-ssl.vpn.hu-berlin.de
|
||||
port = 443
|
||||
username = slfletos@tunnel_all
|
||||
''
|
||||
}
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "fu-vpn" ''
|
||||
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
|
||||
then
|
||||
@@ -138,16 +146,4 @@ in {
|
||||
fi
|
||||
'')
|
||||
];
|
||||
|
||||
systemd.services.fu-vpn = {
|
||||
enable = false;
|
||||
wants = ["network-online.target"];
|
||||
serviceConfig.LoadCredential = "password:${config.age.secrets.email-password-meinhak99.path}";
|
||||
script = ''
|
||||
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
|
||||
then
|
||||
cat "$CREDENTIALS_DIRECTORY/password" | ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --user ${username} --passwd-on-stdin
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
14
configs/virtualization.nix
Normal file
14
configs/virtualization.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.me.extraGroups = [ "libvirtd" ];
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
# Enable TPM support for VMs
|
||||
virtualisation.libvirtd.qemu = {
|
||||
# swtpm.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
];
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
networks.Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||
secretsFile = config.age.secrets.wifi.path;
|
||||
# networks.Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||
networks.Schilfpalast.pskRaw = "ext:schilfpalast";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,15 +6,6 @@
|
||||
promptColours.success = "cyan";
|
||||
promptColours.failure = "red";
|
||||
in {
|
||||
environment.systemPackages = [pkgs.atuin];
|
||||
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
|
||||
auto_sync = true
|
||||
update_check = false
|
||||
sync_address = "http://zaatar.r:8888"
|
||||
sync_frequency = 0
|
||||
style = "compact"
|
||||
'');
|
||||
|
||||
programs.zsh = let
|
||||
zsh-completions = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
@@ -67,13 +58,6 @@ in {
|
||||
zstyle ':vcs_info:*' formats "%c%u%F{cyan}%b%f"
|
||||
zstyle ':vcs_info:*' actionformats "(%a) %c%u%F{cyan}%b%f"
|
||||
|
||||
# atuin distributed shell history
|
||||
export ATUIN_NOBIND="true" # disable all keybdinings of atuin
|
||||
eval "$(atuin init zsh)"
|
||||
bindkey '^r' _atuin_search_widget # bind ctrl+r to atuin
|
||||
# use zsh only session history
|
||||
fc -p
|
||||
|
||||
precmd () {
|
||||
vcs_info
|
||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] || [ -n "$SSH_CONNECTION" ]; then
|
||||
|
||||
605
flake.lock
generated
605
flake.lock
generated
File diff suppressed because it is too large
Load Diff
795
flake.nix
795
flake.nix
@@ -2,25 +2,25 @@
|
||||
description = "niveum: packages, modules, systems";
|
||||
|
||||
inputs = {
|
||||
self.submodules = true;
|
||||
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
# alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master";
|
||||
autorenkalender.url = "github:kmein/autorenkalender";
|
||||
coptic-dictionary.url = "github:kmein/coptic-dictionary";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.05";
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
||||
menstruation-backend.url = "github:kmein/menstruation.rs";
|
||||
menstruation-telegram.url = "github:kmein/menstruation-telegram";
|
||||
nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05";
|
||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||
nixinate.url = "github:matthewcroughan/nixinate";
|
||||
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
recht.url = "github:kmein/recht";
|
||||
retiolum.url = "github:krebs/retiolum";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
scripts.url = "github:kmein/scripts";
|
||||
stockholm.url = "github:krebs/stockholm";
|
||||
stylix.url = "github:danth/stylix/release-25.05";
|
||||
stylix.url = "github:danth/stylix/release-25.11";
|
||||
telebots.url = "github:kmein/telebots";
|
||||
tinc-graph.url = "github:kmein/tinc-graph";
|
||||
voidrice.url = "github:Lukesmithxyz/voidrice";
|
||||
@@ -29,420 +29,439 @@
|
||||
|
||||
agenix.inputs.home-manager.follows = "home-manager";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
autorenkalender.inputs.nixpkgs.follows = "nixpkgs";
|
||||
coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# menstruation-backend.inputs.flake-utils.follows = "flake-utils";
|
||||
# menstruation-backend.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# menstruation-backend.inputs.rust-overlay.follows = "rust-overlay";
|
||||
menstruation-telegram.inputs.flake-utils.follows = "flake-utils";
|
||||
menstruation-telegram.inputs.menstruation-backend.follows = "menstruation-backend";
|
||||
menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old";
|
||||
nix-on-droid.inputs.home-manager.follows = "home-manager";
|
||||
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
|
||||
recht.inputs.flake-utils.follows = "flake-utils";
|
||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
recht.inputs.nixpkgs.follows = "nixpkgs";
|
||||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||
scripts.inputs.flake-utils.follows = "flake-utils";
|
||||
scripts.inputs.nixpkgs.follows = "nixpkgs";
|
||||
scripts.inputs.rust-overlay.follows = "rust-overlay";
|
||||
stylix.inputs.home-manager.follows = "home-manager";
|
||||
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
tinc-graph.inputs.flake-utils.follows = "flake-utils";
|
||||
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
|
||||
tinc-graph.inputs.rust-overlay.follows = "rust-overlay";
|
||||
voidrice.flake = false;
|
||||
wallpaper-generator.inputs.flake-utils.follows = "flake-utils";
|
||||
wallpapers.flake = false;
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [ "https://kmein.cachix.org" ];
|
||||
extra-trusted-public-keys = [ "kmein.cachix.org-1:rsJ2b6++VQHJ1W6rGuDUYsK/qUkFA3bNpO6PyEyJ9Ls=" ];
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
nur,
|
||||
home-manager,
|
||||
agenix,
|
||||
retiolum,
|
||||
nixinate,
|
||||
flake-utils,
|
||||
nix-on-droid,
|
||||
stylix,
|
||||
...
|
||||
}:
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
nur,
|
||||
home-manager,
|
||||
agenix,
|
||||
retiolum,
|
||||
nixinate,
|
||||
coptic-dictionary,
|
||||
menstruation-backend,
|
||||
menstruation-telegram,
|
||||
scripts,
|
||||
tinc-graph,
|
||||
recht,
|
||||
autorenkalender,
|
||||
wallpaper-generator,
|
||||
telebots,
|
||||
stockholm,
|
||||
nix-index-database,
|
||||
stylix,
|
||||
voidrice,
|
||||
...
|
||||
}:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
eachSupportedSystem = lib.genAttrs lib.systems.flakeExposed;
|
||||
in
|
||||
{
|
||||
apps = {
|
||||
x86_64-darwin = let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
||||
in {
|
||||
deploy-maakaron = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "deploy-maakaron" ''
|
||||
exec $(nix build .#homeConfigurations.maakaron.activationPackage --no-link --print-out-paths)/activate
|
||||
'');
|
||||
};
|
||||
};
|
||||
x86_64-linux = let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
nixinate.nixinate.x86_64-linux self
|
||||
// {
|
||||
mock-secrets = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "mock-secrets" ''
|
||||
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
|
||||
'');
|
||||
};
|
||||
}
|
||||
# the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
|
||||
// builtins.listToAttrs (map (hostname: let
|
||||
externalNetwork = import ./lib/external-network.nix;
|
||||
targets = {
|
||||
ful = "root@ful";
|
||||
zaatar = "root@zaatar";
|
||||
makanek = "root@makanek";
|
||||
manakish = "root@manakish";
|
||||
tahina = "root@tahina";
|
||||
tabula = "root@tabula";
|
||||
kabsa = "root@kabsa";
|
||||
fatteh = "root@fatteh";
|
||||
kibbeh = "root@kibbeh";
|
||||
};
|
||||
x86_64-linux =
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
lib.attrsets.nameValuePair "deploy-${hostname}" {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "deploy-${hostname}" ''
|
||||
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \
|
||||
--max-jobs 2 \
|
||||
--log-format internal-json \
|
||||
--flake .?submodules=1#${hostname} \
|
||||
--target-host ${targets.${hostname}} 2>&1 \
|
||||
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
'');
|
||||
}) (builtins.attrNames self.nixosConfigurations))
|
||||
// {
|
||||
deploy-ful = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "deploy-ful" ''
|
||||
exec ${pkgs.nix}/bin/nix run .?submodules=1#nixinate.ful \
|
||||
--log-format internal-json 2>&1 \
|
||||
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
'');
|
||||
};
|
||||
};
|
||||
lib.mergeAttrsList [
|
||||
(nixinate.nixinate.x86_64-linux self)
|
||||
{
|
||||
mock-secrets = {
|
||||
type = "app";
|
||||
program = toString (
|
||||
pkgs.writers.writeDash "mock-secrets" ''
|
||||
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
|
||||
''
|
||||
);
|
||||
};
|
||||
}
|
||||
# the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
|
||||
(builtins.listToAttrs (
|
||||
map (
|
||||
hostname:
|
||||
let
|
||||
targets = {
|
||||
ful = "root@ful";
|
||||
zaatar = "root@zaatar";
|
||||
makanek = "root@makanek";
|
||||
manakish = "root@manakish";
|
||||
tahina = "root@tahina";
|
||||
tabula = "root@tabula";
|
||||
kabsa = "root@kabsa";
|
||||
fatteh = "root@fatteh";
|
||||
kibbeh = "root@kibbeh";
|
||||
};
|
||||
in
|
||||
lib.attrsets.nameValuePair "deploy-${hostname}" {
|
||||
type = "app";
|
||||
program = toString (
|
||||
pkgs.writers.writeDash "deploy-${hostname}" ''
|
||||
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \
|
||||
--max-jobs 2 \
|
||||
--log-format internal-json \
|
||||
--flake .#${hostname} \
|
||||
--target-host ${targets.${hostname}} 2>&1 \
|
||||
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
''
|
||||
);
|
||||
}
|
||||
) (builtins.attrNames self.nixosConfigurations)
|
||||
))
|
||||
{
|
||||
deploy-ful = {
|
||||
type = "app";
|
||||
program = toString (
|
||||
pkgs.writers.writeDash "deploy-ful" ''
|
||||
exec ${pkgs.nix}/bin/nix run .#nixinate.ful \
|
||||
--log-format internal-json 2>&1 \
|
||||
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
''
|
||||
);
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# TODO overlay for packages
|
||||
# TODO remove flake-utils dependency from my own repos
|
||||
|
||||
nixosModules = {
|
||||
htgen = import modules/htgen.nix;
|
||||
moodle-dl = import modules/moodle-dl.nix;
|
||||
networkmanager-declarative = import modules/networkmanager-declarative.nix;
|
||||
passport = import modules/passport.nix;
|
||||
panoptikon = import modules/panoptikon.nix;
|
||||
power-action = import modules/power-action.nix;
|
||||
system-dependent = import modules/system-dependent.nix;
|
||||
telegram-bot = import modules/telegram-bot.nix;
|
||||
go-webring = import modules/go-webring.nix;
|
||||
};
|
||||
|
||||
lib = {
|
||||
panoptikon = import lib/panoptikon.nix;
|
||||
};
|
||||
|
||||
nixOnDroidConfigurations = {
|
||||
moto = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
modules = [systems/moto/configuration.nix];
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
overlays = [nix-on-droid.overlays.default];
|
||||
};
|
||||
extraSpecialArgs = {
|
||||
niveumPackages = inputs.self.packages.aarch64-linux;
|
||||
niveumLib = inputs.self.lib;
|
||||
inherit inputs;
|
||||
};
|
||||
home-manager-path = home-manager.outPath;
|
||||
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
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
maakaron = let
|
||||
system = "x86_64-darwin";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [./systems/maakaron/home.nix];
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
niveumPackages = inputs.self.packages.${system};
|
||||
# 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: {
|
||||
unstablePackages = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
overlays = [];
|
||||
config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (nixpkgs-unstable.lib.getName pkg) [
|
||||
"obsidian"
|
||||
"zoom"
|
||||
];
|
||||
};
|
||||
inputs = {
|
||||
inherit
|
||||
tinc-graph
|
||||
self
|
||||
telebots
|
||||
menstruation-telegram
|
||||
menstruation-backend
|
||||
scripts
|
||||
coptic-dictionary
|
||||
agenix
|
||||
recht
|
||||
autorenkalender
|
||||
nixpkgs
|
||||
wallpaper-generator
|
||||
;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = let
|
||||
niveumSpecialArgs = system: {
|
||||
unstablePackages = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (nixpkgs-unstable.lib.getName pkg) [
|
||||
"obsidian"
|
||||
"zoom"
|
||||
];
|
||||
in
|
||||
{
|
||||
ful = nixpkgs.lib.nixosSystem rec {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/ful/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
self.nixosModules.passport
|
||||
self.nixosModules.panoptikon
|
||||
self.nixosModules.go-webring
|
||||
stockholm.nixosModules.reaktor2
|
||||
retiolum.nixosModules.retiolum
|
||||
nur.modules.nixos.default
|
||||
{ nixpkgs.overlays = [ stockholm.overlays.default ]; }
|
||||
{
|
||||
_module.args.nixinate = {
|
||||
host = "ful";
|
||||
sshUser = "root";
|
||||
buildOn = "remote";
|
||||
substituteOnTarget = true;
|
||||
hermetic = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
zaatar = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/zaatar/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
kibbeh = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/kibbeh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
makanek = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
# 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
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
nur.modules.nixos.default
|
||||
];
|
||||
};
|
||||
tahina = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/tahina/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
tabula = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/tabula/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
manakish = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/manakish/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nix-index-database.nixosModules.default
|
||||
nur.modules.nixos.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
kabsa = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/kabsa/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nur.modules.nixos.default
|
||||
nix-index-database.nixosModules.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
fatteh = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/fatteh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nur.modules.nixos.default
|
||||
nix-index-database.nixosModules.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
niveumPackages = inputs.self.packages.${system};
|
||||
niveumLib = inputs.self.lib;
|
||||
inherit inputs;
|
||||
};
|
||||
in {
|
||||
ful = nixpkgs.lib.nixosSystem rec {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/ful/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
inputs.self.nixosModules.passport
|
||||
inputs.self.nixosModules.panoptikon
|
||||
inputs.self.nixosModules.htgen
|
||||
inputs.stockholm.nixosModules.reaktor2
|
||||
retiolum.nixosModules.retiolum
|
||||
nur.modules.nixos.default
|
||||
{ nixpkgs.overlays = [ inputs.stockholm.overlays.default ]; }
|
||||
{
|
||||
_module.args.nixinate = {
|
||||
host = "ful";
|
||||
sshUser = "root";
|
||||
buildOn = "remote";
|
||||
substituteOnTarget = true;
|
||||
hermetic = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
zaatar = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/zaatar/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
kibbeh = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/kibbeh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
makanek = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
# for using inputs in other config files
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/makanek/configuration.nix
|
||||
inputs.self.nixosModules.telegram-bot
|
||||
inputs.self.nixosModules.htgen
|
||||
inputs.self.nixosModules.passport
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
nur.modules.nixos.default
|
||||
];
|
||||
};
|
||||
tahina = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/tahina/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
tabula = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/tabula/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
manakish = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/manakish/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nur.modules.nixos.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
kabsa = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/kabsa/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nur.modules.nixos.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
fatteh = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
systems/fatteh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nur.modules.nixos.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
// flake-utils.lib.eachSystem [flake-utils.lib.system.x86_64-linux flake-utils.lib.system.x86_64-darwin flake-utils.lib.system.aarch64-linux] (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
nur.overlays.default
|
||||
(self: super: {
|
||||
mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];};
|
||||
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
||||
})
|
||||
];
|
||||
};
|
||||
unstablePackages = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
};
|
||||
wrapScript = {
|
||||
packages ? [],
|
||||
name,
|
||||
script,
|
||||
}:
|
||||
pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"'';
|
||||
in {
|
||||
packages = rec {
|
||||
auc = pkgs.callPackage packages/auc.nix {};
|
||||
betacode = pkgs.callPackage packages/betacode.nix {};
|
||||
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
|
||||
brassica = pkgs.callPackage packages/brassica.nix {};
|
||||
cheat-sh = pkgs.callPackage packages/cheat-sh.nix {};
|
||||
closest = pkgs.callPackage packages/closest {};
|
||||
cro = pkgs.callPackage packages/cro.nix {};
|
||||
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {};
|
||||
default-gateway = pkgs.callPackage packages/default-gateway.nix {};
|
||||
depp = pkgs.callPackage packages/depp.nix {};
|
||||
dashboard = pkgs.callPackage packages/dashboard {};
|
||||
devanagari = pkgs.callPackage packages/devanagari {};
|
||||
devour = pkgs.callPackage packages/devour.nix {};
|
||||
dic = pkgs.callPackage packages/dic.nix {};
|
||||
dirmir = pkgs.callPackage packages/dirmir.nix {};
|
||||
dmenu-bluetooth = pkgs.callPackage packages/dmenu-bluetooth.nix {};
|
||||
dmenu-scrot = pkgs.callPackage packages/dmenu-scrot.nix {};
|
||||
dns-sledgehammer = pkgs.callPackage packages/dns-sledgehammer.nix {};
|
||||
fkill = pkgs.callPackage packages/fkill.nix {};
|
||||
fzfmenu = pkgs.callPackage packages/fzfmenu.nix {};
|
||||
genius = pkgs.callPackage packages/genius.nix {};
|
||||
gfs-fonts = pkgs.callPackage packages/gfs-fonts.nix {};
|
||||
git-preview = pkgs.callPackage packages/git-preview.nix {};
|
||||
gpt35 = pkgs.callPackage packages/gpt.nix {model = "gpt-3.5-turbo";};
|
||||
gpt4 = pkgs.callPackage packages/gpt.nix {model = "gpt-4";};
|
||||
hc = pkgs.callPackage packages/hc.nix {};
|
||||
jq-lsp = pkgs.callPackage packages/jq-lsp.nix {};
|
||||
stardict-tools = pkgs.callPackage packages/stardict-tools.nix {};
|
||||
heuretes = pkgs.callPackage packages/heuretes.nix {};
|
||||
htgen = pkgs.callPackage packages/htgen.nix {};
|
||||
image-convert-favicon = pkgs.callPackage packages/image-convert-favicon.nix {};
|
||||
image-convert-tolino = pkgs.callPackage packages/image-convert-tolino.nix {};
|
||||
infschmv = pkgs.callPackage packages/infschmv.nix {};
|
||||
iolanguage = pkgs.callPackage packages/iolanguage.nix {};
|
||||
ipa = pkgs.writers.writePython3Bin "ipa" {flakeIgnore = ["E501"];} (builtins.readFile packages/ipa.py);
|
||||
ix = pkgs.callPackage packages/ix.nix {};
|
||||
jsesh = pkgs.callPackage packages/jsesh.nix {};
|
||||
k-lock = pkgs.callPackage packages/k-lock.nix {};
|
||||
kirciuoklis = pkgs.callPackage packages/kirciuoklis.nix {};
|
||||
klem = pkgs.callPackage packages/klem.nix {};
|
||||
kpaste = pkgs.callPackage packages/kpaste.nix {};
|
||||
literature-quote = pkgs.callPackage packages/literature-quote.nix {};
|
||||
mahlzeit = pkgs.haskellPackages.callPackage packages/mahlzeit.nix {};
|
||||
man-pandoc = pkgs.callPackage packages/man/pandoc.nix {};
|
||||
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 {};
|
||||
meteo = pkgs.callPackage packages/meteo.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 {};
|
||||
mpv-visualizer = unstablePackages.mpvScripts.visualizer;
|
||||
new-mac = pkgs.callPackage packages/new-mac.nix {};
|
||||
nix-git = pkgs.callPackage packages/nix-git.nix {};
|
||||
nix-index-update = pkgs.callPackage packages/nix-index-update.nix {inherit system;};
|
||||
notemenu = pkgs.callPackage packages/notemenu.nix {niveumPackages = self.packages.${system};};
|
||||
opustags = pkgs.callPackage packages/opustags.nix {};
|
||||
pls = pkgs.callPackage packages/pls.nix {};
|
||||
polyglot = pkgs.callPackage packages/polyglot.nix {};
|
||||
q = pkgs.callPackage packages/q.nix {};
|
||||
qrpaste = pkgs.callPackage packages/qrpaste.nix {};
|
||||
random-zeno = pkgs.callPackage packages/random-zeno.nix {};
|
||||
rfc = pkgs.callPackage packages/rfc.nix {};
|
||||
gimp = pkgs.callPackage packages/gimp.nix {};
|
||||
scanned = pkgs.callPackage packages/scanned.nix {};
|
||||
swallow = pkgs.callPackage packages/swallow.nix {};
|
||||
text2pdf = pkgs.callPackage packages/text2pdf.nix {};
|
||||
timer = pkgs.callPackage packages/timer.nix {};
|
||||
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
|
||||
trans = pkgs.callPackage packages/trans.nix {};
|
||||
ttspaste = pkgs.callPackage packages/ttspaste.nix {};
|
||||
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};
|
||||
emailmenu = pkgs.callPackage packages/emailmenu.nix {};
|
||||
untilport = pkgs.callPackage packages/untilport.nix {};
|
||||
vg = pkgs.callPackage packages/vg.nix {};
|
||||
vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};};
|
||||
obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {};
|
||||
radio-news = pkgs.callPackage packages/radio-news.nix {};
|
||||
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {};
|
||||
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {};
|
||||
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {};
|
||||
vimPlugins-typst-vim = pkgs.callPackage packages/vimPlugins/typst-vim.nix {};
|
||||
vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix {};
|
||||
vimPlugins-vim-colors-paramount = pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix {};
|
||||
vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix {};
|
||||
vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix {};
|
||||
vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix {};
|
||||
vimPlugins-vim-reason-plus = pkgs.callPackage packages/vimPlugins/vim-reason-plus.nix {};
|
||||
vimv = pkgs.callPackage packages/vimv.nix {};
|
||||
weechat-declarative = pkgs.callPackage packages/weechat-declarative.nix {};
|
||||
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {};
|
||||
wttr = pkgs.callPackage packages/wttr.nix {};
|
||||
|
||||
itl = pkgs.callPackage packages/itl.nix {};
|
||||
itools = pkgs.callPackage packages/itools.nix {itl = itl;};
|
||||
|
||||
booksplit = wrapScript {
|
||||
script = inputs.voidrice.outPath + "/.local/bin/booksplit";
|
||||
name = "booksplit";
|
||||
packages = [pkgs.ffmpeg pkgs.glibc.bin];
|
||||
};
|
||||
dmenu-randr = pkgs.callPackage packages/dmenu-randr.nix {};
|
||||
tag = wrapScript {
|
||||
script = inputs.voidrice.outPath + "/.local/bin/tag";
|
||||
name = "tag";
|
||||
packages = [pkgs.ffmpeg];
|
||||
};
|
||||
};
|
||||
});
|
||||
packages = eachSupportedSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
nur.overlays.default
|
||||
self.overlays.default
|
||||
];
|
||||
};
|
||||
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;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
pkgs: rec {
|
||||
terminal = "alacritty";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
fileManager = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
}
|
||||
121
lib/default.nix
121
lib/default.nix
@@ -1,28 +1,40 @@
|
||||
{ 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 = rec {
|
||||
port = 3571;
|
||||
host = "zaatar.r";
|
||||
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 = lib: {
|
||||
accept = {
|
||||
source,
|
||||
protocol,
|
||||
dport,
|
||||
}: "nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
|
||||
firewall = {
|
||||
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");
|
||||
};
|
||||
@@ -42,7 +54,7 @@
|
||||
|
||||
sshPort = 22022;
|
||||
|
||||
theme = pkgs: {
|
||||
theme = {
|
||||
gtk = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
@@ -57,30 +69,67 @@
|
||||
};
|
||||
};
|
||||
|
||||
defaultApplications = import ./default-applications.nix;
|
||||
defaultApplications = {
|
||||
terminal = "alacritty";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
fileManager = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
};
|
||||
|
||||
retiolumAddresses = import ./retiolum-network.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
|
||||
);
|
||||
|
||||
localAddresses = import ./local-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";
|
||||
};
|
||||
};
|
||||
|
||||
email-sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKz33wHtPuIfgXEb0+hybxFGV9ZuPsDTLUZo/+hlcdA";
|
||||
systems = systems;
|
||||
|
||||
kieran = {
|
||||
github = "kmein";
|
||||
email = "kmein@posteo.de";
|
||||
name = "Kierán Meinhardt";
|
||||
sshKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk" # kabsa
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB" # manakish
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y" # fatteh
|
||||
pronouns = builtins.concatStringsSep "/" [
|
||||
"er"
|
||||
"he"
|
||||
"is"
|
||||
"οὗτος"
|
||||
"هو"
|
||||
"ⲛ̄ⲧⲟϥ"
|
||||
"он"
|
||||
"han"
|
||||
"सः"
|
||||
];
|
||||
sshKeys = [
|
||||
systems.fatteh.sshKey
|
||||
systems.manakish.sshKey
|
||||
systems.kabsa.sshKey
|
||||
];
|
||||
};
|
||||
|
||||
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 = [
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
rec {
|
||||
thunderbirdProfile = "donnervogel";
|
||||
pronouns = builtins.concatStringsSep "/" [
|
||||
"er"
|
||||
"he"
|
||||
"is"
|
||||
"οὗτος"
|
||||
"هو"
|
||||
"ⲛ̄ⲧⲟϥ"
|
||||
"он"
|
||||
"han"
|
||||
"सः"
|
||||
];
|
||||
defaults = {
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles = [thunderbirdProfile];
|
||||
};
|
||||
aerc.enable = true;
|
||||
realName = "Kierán Meinhardt";
|
||||
folders.inbox = "INBOX";
|
||||
};
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
ful = "130.61.217.114";
|
||||
makanek = "88.99.83.173";
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
{
|
||||
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>
|
||||
''
|
||||
@@ -1,2 +0,0 @@
|
||||
# https://github.com/hercules-ci/gitignore.nix/pull/58/files
|
||||
path: ~/. + path
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,23 +0,0 @@
|
||||
// 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 ] };
|
||||
};
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
toum = "192.168.178.24";
|
||||
zaatar = "192.168.178.21";
|
||||
kabsa = "192.168.178.32";
|
||||
android = "192.168.178.35";
|
||||
manakish = "192.168.178.29";
|
||||
|
||||
officejet = "192.168.178.27";
|
||||
fritzbox = "192.168.178.1";
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
zaatar = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
|
||||
fatteh = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
|
||||
ful = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
|
||||
kabsa = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
|
||||
makanek = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
|
||||
manakish = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
# watcher scripts
|
||||
@@ -30,7 +29,7 @@
|
||||
nick ? ''"$PANOPTIKON_WATCHER"-watcher'',
|
||||
}:
|
||||
pkgs.writers.writeDash "kpaste-irc-reporter" ''
|
||||
KPASTE_CONTENT_TYPE=text/plain ${niveumPackages.kpaste}/bin/kpaste \
|
||||
KPASTE_CONTENT_TYPE=text/plain ${pkgs.kpaste}/bin/kpaste \
|
||||
| ${pkgs.gnused}/bin/sed -n "${
|
||||
if retiolumLink
|
||||
then "2"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
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";
|
||||
};
|
||||
}
|
||||
73
lib/systems.nix
Normal file
73
lib/systems.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
140
modules/go-webring.nix
Normal file
140
modules/go-webring.nix
Normal file
@@ -0,0 +1,140 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
mkOption
|
||||
types
|
||||
literalExpression
|
||||
mkIf
|
||||
;
|
||||
cfg = config.services.go-webring;
|
||||
|
||||
defaultAddress = "127.0.0.1:2857";
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
services.go-webring = {
|
||||
enable = mkEnableOption "go-webring";
|
||||
|
||||
package = mkPackageOption pkgs "go-webring" { };
|
||||
|
||||
contactInstructions = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Contact instructions for errors";
|
||||
example = "contact the admin and let them know what's up";
|
||||
};
|
||||
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
description = "Host this webring runs on, primarily used for validation";
|
||||
example = "my-webri.ng";
|
||||
};
|
||||
|
||||
homePageTemplate = mkOption {
|
||||
type = types.str;
|
||||
description = ''
|
||||
This should be any HTML file with the string "{{ . }}" placed
|
||||
wherever you want the table of members inserted. This table is
|
||||
plain HTML so you can style it with CSS.
|
||||
'';
|
||||
};
|
||||
|
||||
listenAddress = mkOption {
|
||||
type = types.str;
|
||||
default = defaultAddress;
|
||||
description = "Host and port go-webring will listen on";
|
||||
};
|
||||
|
||||
members = mkOption {
|
||||
type = types.listOf (
|
||||
types.submodule {
|
||||
options = {
|
||||
username = mkOption {
|
||||
type = types.str;
|
||||
description = "Member's name";
|
||||
};
|
||||
site = mkOption {
|
||||
type = types.str;
|
||||
description = "Member's site URL";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
description = "List of members in the webring";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.go-webring = {
|
||||
description = "go-webring service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
requires = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = ''
|
||||
${lib.getExe cfg.package} \
|
||||
${lib.optionalString (cfg.contactInstructions != null) ("--contact " + lib.escapeShellArg cfg.contactInstructions)} \
|
||||
--host ${cfg.host} \
|
||||
--index ${pkgs.writeText "index.html" cfg.homePageTemplate} \
|
||||
--listen ${cfg.listenAddress} \
|
||||
--members ${
|
||||
pkgs.writeText "list.txt" (
|
||||
lib.concatMapStrings (member: member.username + " " + member.site + "\n") cfg.members
|
||||
)
|
||||
}
|
||||
'';
|
||||
User = "go-webring";
|
||||
DynamicUser = true;
|
||||
RuntimeDirectory = "go-webring";
|
||||
WorkingDirectory = "/var/lib/go-webring";
|
||||
StateDirectory = "go-webring";
|
||||
RuntimeDirectoryMode = "0750";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
|
||||
# Hardening
|
||||
CapabilityBoundingSet = [ "" ];
|
||||
DeviceAllow = [ "" ];
|
||||
LockPersonality = true;
|
||||
MemoryDenyWriteExecute = true;
|
||||
PrivateDevices = true;
|
||||
PrivateUsers = true;
|
||||
ProcSubset = "pid";
|
||||
ProtectClock = true;
|
||||
ProtectControlGroups = true;
|
||||
ProtectHome = true;
|
||||
ProtectHostname = true;
|
||||
ProtectKernelLogs = true;
|
||||
ProtectKernelModules = true;
|
||||
ProtectKernelTunables = true;
|
||||
ProtectProc = "invisible";
|
||||
RestrictAddressFamilies = [
|
||||
"AF_INET"
|
||||
"AF_INET6"
|
||||
"AF_UNIX"
|
||||
];
|
||||
RestrictNamespaces = true;
|
||||
RestrictRealtime = true;
|
||||
RestrictSUIDSGID = true;
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = [
|
||||
"@system-service"
|
||||
"~@privileged"
|
||||
];
|
||||
UMask = "0077";
|
||||
};
|
||||
};
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
htgen = pkgs.callPackage ../packages/htgen.nix {};
|
||||
in {
|
||||
options.services.htgen = lib.mkOption {
|
||||
default = {};
|
||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
||||
options = {
|
||||
enable = lib.mkEnableOption "htgen-${config._module.args.name}";
|
||||
port = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
};
|
||||
script = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
config = {
|
||||
systemd.services =
|
||||
lib.mapAttrs' (
|
||||
name: cfg:
|
||||
lib.nameValuePair "htgen-${name}" {
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = ["network.target"];
|
||||
environment = {
|
||||
HOME = "/var/lib/htgen-${name}";
|
||||
HTGEN_PORT = toString cfg.port;
|
||||
HTGEN_SCRIPT = cfg.script;
|
||||
};
|
||||
serviceConfig = {
|
||||
SyslogIdentifier = "htgen-${name}";
|
||||
DynamicUser = true;
|
||||
StateDirectory = "htgen-${name}";
|
||||
PrivateTmp = true;
|
||||
Restart = "always";
|
||||
ExecStart = "${htgen}/bin/htgen --serve";
|
||||
};
|
||||
}
|
||||
)
|
||||
config.services.htgen;
|
||||
};
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
# https://github.com/jmackie/nixos-networkmanager-profiles/
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
nm = config.networking.networkmanager;
|
||||
|
||||
mkProfile = profileAttrs:
|
||||
if !(isAttrs profileAttrs)
|
||||
then throw "error 1"
|
||||
else {
|
||||
enable = true;
|
||||
mode = "0400"; # readonly (user)
|
||||
text =
|
||||
(foldlAttrs (accum: {
|
||||
name,
|
||||
value,
|
||||
}: ''
|
||||
${accum}
|
||||
|
||||
[${name}] ${mkProfileEntry value}'')
|
||||
"# Generated by nixos-networkmanager-profiles"
|
||||
profileAttrs)
|
||||
+ "\n";
|
||||
};
|
||||
|
||||
mkProfileEntry = entryAttrs:
|
||||
if !(isAttrs entryAttrs)
|
||||
then throw "error 2"
|
||||
else
|
||||
foldlAttrs (accum: {
|
||||
name,
|
||||
value,
|
||||
}: ''
|
||||
${accum}
|
||||
${name}=${toString value}'') ""
|
||||
entryAttrs;
|
||||
|
||||
foldlAttrs = op: nul: attrs:
|
||||
foldl (accum: {
|
||||
fst,
|
||||
snd,
|
||||
}:
|
||||
op accum (nameValuePair fst snd))
|
||||
nul
|
||||
(lists.zipLists (attrNames attrs) (attrValues attrs));
|
||||
|
||||
attrLength = attrs: length (attrValues attrs);
|
||||
in {
|
||||
options.networking.networkmanager.profiles = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config = mkIf (attrLength nm.profiles > 0) {
|
||||
environment.etc = foldlAttrs (accum: {
|
||||
name,
|
||||
value,
|
||||
}:
|
||||
accum
|
||||
// {
|
||||
"NetworkManager/system-connections/${name}.nmconnection" =
|
||||
mkProfile value;
|
||||
}) {}
|
||||
nm.profiles;
|
||||
};
|
||||
}
|
||||
@@ -29,7 +29,7 @@
|
||||
default = "daily";
|
||||
};
|
||||
loadCredential = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.string;
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
This can be used to pass secrets to the systemd service without adding them to the nix store.
|
||||
'';
|
||||
|
||||
@@ -56,7 +56,7 @@ with lib; let
|
||||
|
||||
imp = {
|
||||
systemd.services.power-action = {
|
||||
serviceConfig = rec {
|
||||
serviceConfig = {
|
||||
ExecStart = startScript;
|
||||
User = cfg.user;
|
||||
};
|
||||
|
||||
@@ -3,33 +3,33 @@
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
pandoc,
|
||||
}: let
|
||||
owner = "kamalist";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "auc";
|
||||
version = "2019-04-02";
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "auc";
|
||||
version = "2019-04-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit owner;
|
||||
repo = "AUC";
|
||||
rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3";
|
||||
sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la";
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
owner = "kamalist";
|
||||
repo = "AUC";
|
||||
rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3";
|
||||
sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,man/man1}
|
||||
install auc $out/bin
|
||||
${pandoc}/bin/pandoc -V title=${lib.escapeShellArg pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,man/man1}
|
||||
install auc $out/bin
|
||||
${pandoc}/bin/pandoc -V title=${lib.escapeShellArg finalAttrs.pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line Roman calendar";
|
||||
longDescription = ''
|
||||
AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans.
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line Roman calendar";
|
||||
longDescription = ''
|
||||
AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = [maintainers.kmein];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.kmein ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
writers,
|
||||
curl,
|
||||
}:
|
||||
writers.writeDashBin "so" ''
|
||||
writers.writeDashBin "cht.sh" ''
|
||||
IFS=+
|
||||
${curl}/bin/curl -sSL http://cht.sh/"$*"
|
||||
''
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{ writers, chromium }:
|
||||
writers.writeDashBin "cro" ''
|
||||
${chromium}/bin/chromium \
|
||||
--disable-sync \
|
||||
--no-default-browser-check \
|
||||
--no-first-run \
|
||||
--user-data-dir="$(mktemp -d)" \
|
||||
--incognito \
|
||||
"$@"
|
||||
''
|
||||
{ coreutils, chromium }:
|
||||
chromium.override {
|
||||
commandLineArgs = [
|
||||
"--disable-sync"
|
||||
"--no-default-browser-check"
|
||||
"--no-first-run"
|
||||
"--user-data-dir=$(${coreutils}/bin/mktemp -d)"
|
||||
"--incognito"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,247 +0,0 @@
|
||||
{
|
||||
writers,
|
||||
formats,
|
||||
acpi,
|
||||
wtf,
|
||||
himalaya,
|
||||
lib,
|
||||
jq,
|
||||
gh,
|
||||
curl,
|
||||
khal,
|
||||
todoman,
|
||||
gnused,
|
||||
coreutils,
|
||||
astrolog,
|
||||
weatherCityIds ? [2950159],
|
||||
}: let
|
||||
rowCount = 10;
|
||||
columnCount = 6;
|
||||
|
||||
yaml = formats.yaml {};
|
||||
command = args:
|
||||
{
|
||||
enabled = true;
|
||||
type = "cmdrunner";
|
||||
}
|
||||
// args;
|
||||
configuration.wtf = rec {
|
||||
grid = {
|
||||
columns = lib.replicate columnCount 32;
|
||||
rows = lib.replicate rowCount 5;
|
||||
};
|
||||
mods.vdir_khal = command {
|
||||
title = "Calendar";
|
||||
cmd = "${khal}/bin/khal";
|
||||
args = ["--color" "list" "--exclude-calendar" "calendarium-tridentinum"];
|
||||
refreshInterval = "1m";
|
||||
position = {
|
||||
top = 4;
|
||||
left = 0;
|
||||
height = 4;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
mods.vdir_todo = command {
|
||||
enabled = true;
|
||||
title = "Agenda";
|
||||
cmd = writers.writeDash "vdir_todo" "${todoman}/bin/todo --color=always -h | ${coreutils}/bin/tac";
|
||||
refreshInterval = "1m";
|
||||
position = {
|
||||
top = 4;
|
||||
left = 2;
|
||||
height = 4;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
mods.weather = {
|
||||
enabled = true;
|
||||
cityids = weatherCityIds;
|
||||
position = {
|
||||
top = 8;
|
||||
left = 2;
|
||||
height = 2;
|
||||
width = 2;
|
||||
};
|
||||
refreshInterval = "15m";
|
||||
language = "DE";
|
||||
tempUnit = "C";
|
||||
useEmoji = true;
|
||||
compact = true;
|
||||
};
|
||||
mods.top = command {
|
||||
title = "uptime";
|
||||
cmd = writers.writeDash "top" "top -b -n 1 -E g | ${gnused}/bin/sed -n '1,5p'";
|
||||
refreshInterval = "30s";
|
||||
position = {
|
||||
top = 4;
|
||||
left = 4;
|
||||
height = 2;
|
||||
width = 2;
|
||||
};
|
||||
enabled = true;
|
||||
};
|
||||
mods.resourceusage = {
|
||||
enabled = true;
|
||||
cpuCombined = false;
|
||||
position = {
|
||||
top = 6;
|
||||
left = 4;
|
||||
height = 2;
|
||||
width = 2;
|
||||
};
|
||||
refreshInterval = "1s";
|
||||
showCPU = true;
|
||||
showMem = true;
|
||||
showSwp = false;
|
||||
};
|
||||
mods.ipapi = {
|
||||
enabled = false;
|
||||
position = {
|
||||
top = 0;
|
||||
left = 1;
|
||||
height = 2;
|
||||
width = 2;
|
||||
};
|
||||
refreshInterval = "150s";
|
||||
};
|
||||
mods.battery-status = command {
|
||||
enabled = true;
|
||||
cmd = writers.writeDash "battery-status" ''
|
||||
${acpi}/bin/acpi --battery --details | sed 's/^Battery //'
|
||||
'';
|
||||
refreshInterval = "1m";
|
||||
position = {
|
||||
top = 8;
|
||||
left = 4;
|
||||
height = 2;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
mods.disk-usage = command {
|
||||
enabled = false;
|
||||
cmd = "df";
|
||||
args = ["-h"];
|
||||
refreshInterval = "1m";
|
||||
position = {
|
||||
top = 8;
|
||||
left = 4;
|
||||
height = 2;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
mods.email = command {
|
||||
title = "Email";
|
||||
cmd = writers.writeDash "email" ''
|
||||
${himalaya}/bin/himalaya accounts --output json \
|
||||
| ${jq}/bin/jq -r 'map(.name) | join("\n")' \
|
||||
| while read -r account
|
||||
do
|
||||
${himalaya}/bin/himalaya list --account "$account" -o json \
|
||||
| ${jq}/bin/jq -r '
|
||||
map(select(.flags == [])
|
||||
| "\u001b[33m\(.from.addr)\u001b[0m \(.subject)") | join("\n")
|
||||
'
|
||||
done
|
||||
'';
|
||||
refreshInterval = "5m";
|
||||
position = {
|
||||
top = 0;
|
||||
left = 0;
|
||||
height = 4;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
mods.gh-status = command {
|
||||
enabled = true;
|
||||
title = "GitHub";
|
||||
cmd = writers.writeDash "gh-status" ''
|
||||
${gh}/bin/gh api notifications \
|
||||
| ${jq}/bin/jq -r 'map("\u001b[35m\(.repository.full_name)\u001b[0m \(.subject.title)") | join("\n")'
|
||||
'';
|
||||
refreshInterval = "5m";
|
||||
position = {
|
||||
top = 0;
|
||||
left = 2;
|
||||
height = 2;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
mods.gh-issues = command {
|
||||
enabled = true;
|
||||
title = "GitHub";
|
||||
cmd = writers.writeDash "gh-issues" ''
|
||||
${gh}/bin/gh api issues \
|
||||
| ${jq}/bin/jq -r 'map(select(.repository.owner.login == "kmein") | "\u001b[35m\(.repository.name)\u001b[0m \(.title)") | join("\n")'
|
||||
'';
|
||||
refreshInterval = "5m";
|
||||
position = {
|
||||
top = 2;
|
||||
left = 2;
|
||||
height = 2;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
mods.calendar = command {
|
||||
title = "Calendar";
|
||||
cmd = "cal";
|
||||
args = ["-3" "-m" "-w"];
|
||||
pty = true;
|
||||
refreshInterval = "5m";
|
||||
position = {
|
||||
top = 8;
|
||||
left = 0;
|
||||
height = 2;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
mods.astro-aspects = command {
|
||||
title = "Aspects";
|
||||
enabled = false;
|
||||
cmd = writers.writeDash "astro-aspects" "${astrolog}/bin/astrolog -n -zN Berlin -d";
|
||||
refreshInterval = "1h";
|
||||
position = {
|
||||
top = 7;
|
||||
left = 3;
|
||||
height = 1;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
mods.feed = command {
|
||||
enabled = true;
|
||||
title = "Feed";
|
||||
cmd = writers.writeDash "feed" ''
|
||||
${curl}/bin/curl -u "$WTF_MINIFLUX_API_KEY" --basic -s 'https://feed.kmein.de/v1/entries?status=unread&direction=desc' \
|
||||
| ${jq}/bin/jq -r '
|
||||
.total as $total | (
|
||||
.entries
|
||||
| map(select(.feed | .hide_globally| not) | "\(.feed.category.title) \u001b[32m\(.author)\u001b[0m \(.title)")
|
||||
| join("\n")
|
||||
)'
|
||||
'';
|
||||
# position = { top = 0; left = 5; height = 5; width = 1; };
|
||||
position = {
|
||||
top = 0;
|
||||
left = 4;
|
||||
height = 4;
|
||||
width = 2;
|
||||
};
|
||||
refreshInterval = "15m";
|
||||
};
|
||||
mods.astro-positions = command {
|
||||
enabled = false;
|
||||
title = "Positions";
|
||||
cmd = writers.writeDash "astro-positions" "${astrolog}/bin/astrolog -q $(date +'%m %d %Y %H:%M') -zN Berlin | ${gnused}/bin/sed -n '4,16p' | ${coreutils}/bin/cut -c 1-33";
|
||||
refreshInterval = "1h";
|
||||
position = {
|
||||
top = 5;
|
||||
left = 5;
|
||||
height = 3;
|
||||
width = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
writers.writeDashBin "dashboard" ''
|
||||
exec ${wtf}/bin/wtfutil --config=${yaml.generate "config.yml" configuration}
|
||||
''
|
||||
@@ -1,7 +1,13 @@
|
||||
{yarn2nix-moretea}:
|
||||
{yarn2nix-moretea, lib}:
|
||||
yarn2nix-moretea.mkYarnPackage {
|
||||
name = "devanagari";
|
||||
src = ./.;
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./devanagari.js
|
||||
./package.json
|
||||
];
|
||||
};
|
||||
packageJson = ./package.json;
|
||||
yarnLock = ./yarn.lock;
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
{
|
||||
fetchgit,
|
||||
lib,
|
||||
stdenv,
|
||||
coreutils,
|
||||
curl,
|
||||
gnugrep,
|
||||
gnused,
|
||||
util-linux,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "dic";
|
||||
|
||||
src = fetchgit {
|
||||
url = https://cgit.ni.krebsco.de/dic;
|
||||
rev = "refs/tags/v1.1.1";
|
||||
sha256 = "1gbj967a5hj53fdkkxijqgwnl9hb8kskz0cmpjq7v65ffz3v6vag";
|
||||
};
|
||||
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
"installPhase"
|
||||
];
|
||||
|
||||
installPhase = let
|
||||
path = lib.makeBinPath [
|
||||
coreutils
|
||||
curl
|
||||
gnused
|
||||
gnugrep
|
||||
util-linux
|
||||
];
|
||||
in ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
sed \
|
||||
's,^main() {$,&\n PATH=${path}; export PATH,' \
|
||||
< ./dic \
|
||||
> $out/bin/dic
|
||||
|
||||
chmod +x $out/bin/dic
|
||||
'';
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{writers}:
|
||||
writers.writeDashBin "dirmir" ''
|
||||
SOURCE="$1"
|
||||
TARGET="$2"
|
||||
|
||||
if [ ! -d "$SOURCE" ] || [ $# -ne 2 ]; then
|
||||
echo >/dev/stderr "Usage: dirmir SOURCE TARGET"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -e "$TARGET" ]; then
|
||||
echo >/dev/stderr "$TARGET" already exists. Please use a different name.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
find "$SOURCE" | while read -r entry; do
|
||||
if [ -d "$entry" ]; then
|
||||
mkdir -p "$TARGET/$entry"
|
||||
else
|
||||
# create a file with the same permissions as $entry
|
||||
install -m "$(stat -c %a "$entry")" /dev/null "$TARGET/$entry"
|
||||
fi
|
||||
done
|
||||
''
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
writers,
|
||||
libnotify,
|
||||
dmenu,
|
||||
bluez5,
|
||||
lib,
|
||||
}:
|
||||
writers.writeDashBin "dmenu-bluetooth" ''
|
||||
# UI for connecting to bluetooth devices
|
||||
set -efu
|
||||
PATH=$PATH=${lib.makeBinPath [libnotify dmenu bluez5]}
|
||||
|
||||
bluetooth_notify() {
|
||||
notify-send --app-name=" Bluetooth" "$@"
|
||||
}
|
||||
|
||||
chose_device() {
|
||||
# the output from `bluetoothctl {paired-,}devices` has a first column which always contains `Device` followed by a MAC address and the device name
|
||||
cut -d ' ' -f2- | dmenu -i -l 5 -p "Bluetooth device"
|
||||
}
|
||||
|
||||
bluetoothctl scan on &
|
||||
|
||||
case "$(printf "pair\nconnect\ndisconnect" | dmenu -i)" in
|
||||
pair)
|
||||
chosen="$(bluetoothctl devices | chose_device)"
|
||||
chosen_name="$(echo "$chosen" | cut -d ' ' -f2-)"
|
||||
|
||||
bluetooth_notify "$chosen_name" "Pairing ..."
|
||||
|
||||
if bluetoothctl pair "$(echo "$chosen" | cut -d ' ' -f1)"; then
|
||||
bluetooth_notify "✔ $chosen_name" "Paired with device."
|
||||
else
|
||||
test "$chosen" && bluetooth_notify "❌ $chosen_name" "Failed to pair with device."
|
||||
fi
|
||||
;;
|
||||
|
||||
connect)
|
||||
chosen="$(bluetoothctl paired-devices | chose_device)"
|
||||
chosen_name="$(echo "$chosen" | cut -d ' ' -f2-)"
|
||||
|
||||
bluetooth_notify "$chosen_name" "Trying to connect ..."
|
||||
|
||||
if bluetoothctl connect "$(echo "$chosen" | cut -d ' ' -f1)"; then
|
||||
bluetooth_notify "✔ $chosen_name" "Connected to device."
|
||||
else # something was selected but it didn't work
|
||||
test "$chosen" && bluetooth_notify "❌ $chosen_name" "Failed to connect to device."
|
||||
fi
|
||||
;;
|
||||
|
||||
disconnect)
|
||||
chosen="$(bluetoothctl paired-devices | chose_device)"
|
||||
chosen_name="$(echo "$chosen" | cut -d ' ' -f2-)"
|
||||
|
||||
bluetooth_notify "$chosen_name" "Disconnecting ..."
|
||||
|
||||
if bluetoothctl disconnect "$(echo "$chosen" | cut -d ' ' -f1)"; then
|
||||
bluetooth_notify "✔ $chosen_name" "Disconnected from device."
|
||||
else # something was selected but it didn't work
|
||||
test "$chosen" && bluetooth_notify "❌ $chosen_name" "Failed to disconnect from device."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
''
|
||||
@@ -1,42 +0,0 @@
|
||||
{
|
||||
writers,
|
||||
lib,
|
||||
dmenu,
|
||||
scrot,
|
||||
libnotify,
|
||||
xclip,
|
||||
screenshotsDirectory ? "/tmp",
|
||||
}:
|
||||
writers.writeDashBin "dmenu-scrot" ''
|
||||
# ref https://gitlab.com/dwt1/dotfiles/-/blob/master/.dmenu/dmenu-scrot.sh
|
||||
PATH=$PATH:${lib.makeBinPath [dmenu scrot libnotify xclip]}
|
||||
|
||||
APP_NAME="📸 Scrot"
|
||||
IMG_PATH="${screenshotsDirectory}"
|
||||
TIME=3000 #Miliseconds notification should remain visible
|
||||
|
||||
cmd=$(printf "fullscreen\nsection\nupload_fullscreen\nupload_section\n" | dmenu -p 'Screenshot')
|
||||
|
||||
cd "$IMG_PATH" || exit
|
||||
case ''${cmd%% *} in
|
||||
fullscreen)
|
||||
scrot -d 1 \
|
||||
&& notify-send -u low -t $TIME -a "$APP_NAME" 'Screenshot (full screen) saved.'
|
||||
;;
|
||||
|
||||
section)
|
||||
scrot -s \
|
||||
&& notify-send -u low -t $TIME -a "$APP_NAME" 'Screenshot (section) saved.'
|
||||
;;
|
||||
|
||||
upload_fullscreen)
|
||||
scrot -d 1 -e "kpaste < \$f" | tail --lines=1 | xclip -selection clipboard -in \
|
||||
&& notify-send -u low -t $TIME -a "$APP_NAME" "Screenshot (full screen) uploaded: $(xclip -selection clipboard -out)"
|
||||
;;
|
||||
|
||||
upload_section)
|
||||
scrot -s -e "kpaste < \$f" | tail --lines=1 | xclip -selection clipboard -in \
|
||||
&& notify-send -u low -t $TIME -a "$APP_NAME" "Screenshot (section) uploaded: $(xclip -selection clipboard -out)"
|
||||
;;
|
||||
esac
|
||||
''
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
writers,
|
||||
coreutils,
|
||||
}:
|
||||
writers.writeDashBin "dns-sledgehammer" ''
|
||||
${coreutils}/bin/printf '%s\n' 'nameserver 1.1.1.1' 'options edns0' > /etc/resolv.conf
|
||||
''
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
writers,
|
||||
curl,
|
||||
coreutils,
|
||||
gnused,
|
||||
pandoc,
|
||||
}:
|
||||
writers.writeDashBin "genius" ''
|
||||
${coreutils}/bin/test "$#" -eq 2 || (
|
||||
echo "usage: $0 <artist> <song>"
|
||||
exit 1
|
||||
)
|
||||
|
||||
normalize() {
|
||||
${coreutils}/bin/tr -d -c '0-9A-Za-z ' | ${coreutils}/bin/tr ' ' - | ${coreutils}/bin/tr '[:upper:]' '[:lower:]'
|
||||
}
|
||||
|
||||
ARTIST=$(echo "$1" | normalize | ${gnused}/bin/sed 's/./\U&/')
|
||||
TITLE=$(echo "$2" | normalize)
|
||||
GENIUS_URL="https://genius.com/$ARTIST-$TITLE-lyrics"
|
||||
|
||||
${curl}/bin/curl -s "$GENIUS_URL" \
|
||||
| ${gnused}/bin/sed -ne '/class="lyrics"/,/<\/p>/p' \
|
||||
| ${pandoc}/bin/pandoc -f html -s -t plain \
|
||||
| ${gnused}/bin/sed 's/^_/\x1b[3m/g;s/_$/\x1b[0m/g;s/^\[/\n\x1b\[1m\[/g;s/\]$/\]\x1b[0m/g'
|
||||
|
||||
printf "\n%s\n" "$GENIUS_URL" >/dev/stderr
|
||||
''
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
coreutils,
|
||||
git,
|
||||
writers,
|
||||
}:
|
||||
writers.writeDashBin "git-preview" ''
|
||||
set -efu
|
||||
head_commit=$(${git}/bin/git log -1 --format=%H)
|
||||
merge_commit=$1; shift
|
||||
merge_message='Merge for git-preview'
|
||||
preview_dir=$(${coreutils}/bin/mktemp --tmpdir -d git-preview.XXXXXXXX)
|
||||
preview_name=$(${coreutils}/bin/basename "$preview_dir")
|
||||
${git}/bin/git worktree add --detach -f "$preview_dir" 2>/dev/null
|
||||
${git}/bin/git -C "$preview_dir" checkout -q "$head_commit"
|
||||
${git}/bin/git -C "$preview_dir" merge \
|
||||
''${GIT_PREVIEW_MERGE_STRATEGY+-s "$GIT_PREVIEW_MERGE_STRATEGY"} \
|
||||
-m "$merge_message" \
|
||||
-q \
|
||||
"$merge_commit"
|
||||
${git}/bin/git -C "$preview_dir" diff "$head_commit.." "$@"
|
||||
${coreutils}/bin/rm -fR "$preview_dir"
|
||||
${coreutils}/bin/rm -R .git/worktrees/"$preview_name"
|
||||
''
|
||||
21
packages/go-webring.nix
Normal file
21
packages/go-webring.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ buildGoModule, fetchgit, lib }:
|
||||
buildGoModule {
|
||||
pname = "go-webring";
|
||||
version = "2024-12-18";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.sr.ht/~amolith/go-webring";
|
||||
rev = "0b5b1bf21ff91119ea2dd042ee9fe94e9d1cd8d4";
|
||||
hash = "sha256-az6vBOGiZmzfsMjYUacXMHhDeRDmVI/arCKCpHeTcns=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-3PnXB8AfZtgmYEPJuh0fwvG38dtngoS/lxyx3H+rvFs=";
|
||||
|
||||
meta = {
|
||||
mainProgram = "go-webring";
|
||||
description = "Simple webring implementation";
|
||||
homepage = "https://git.sr.ht/~amolith/go-webring";
|
||||
license = lib.licenses.bsd2; # cc0 as well
|
||||
maintainers = [ lib.maintainers.kmein ];
|
||||
};
|
||||
}
|
||||
@@ -9,19 +9,20 @@
|
||||
gnugrep,
|
||||
qrencode,
|
||||
texlive,
|
||||
utillinux,
|
||||
util-linux,
|
||||
zbar,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hc-${meta.version}";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "hc-${finalAttrs.version}";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://cgit.krebsco.de/hc";
|
||||
rev = "refs/tags/v${meta.version}";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
sha256 = "09349gja22p0j3xs082kp0fnaaada14bafszn4r3q7rg1id2slfb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [makeWrapper];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildPhase = null;
|
||||
|
||||
@@ -31,19 +32,21 @@ stdenv.mkDerivation rec {
|
||||
cp $src/bin/hc $out/bin/hc
|
||||
|
||||
wrapProgram $out/bin/hc \
|
||||
--prefix PATH : ${lib.makeBinPath [
|
||||
coreutils
|
||||
findutils
|
||||
gawk
|
||||
gnugrep
|
||||
qrencode
|
||||
texlive.combined.scheme-full
|
||||
utillinux
|
||||
zbar
|
||||
]}
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
coreutils
|
||||
findutils
|
||||
gawk
|
||||
gnugrep
|
||||
qrencode
|
||||
texlive.combined.scheme-full
|
||||
util-linux
|
||||
zbar
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
version = "1.0.0";
|
||||
version = finalAttrs.version;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
writers,
|
||||
fetchurl,
|
||||
xan,
|
||||
util-linux,
|
||||
}: let
|
||||
database = fetchurl {
|
||||
url = "http://c.krebsco.de/greek.csv";
|
||||
@@ -9,5 +10,5 @@
|
||||
};
|
||||
in
|
||||
writers.writeDashBin "heuretes" ''
|
||||
${xan}/bin/xan search -s simple "^$*$" ${database} | ${xan}/bin/xan table
|
||||
${xan}/bin/xan search -s simple "$*" ${database} | ${util-linux}/bin/column -s, -t
|
||||
''
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
fetchgit,
|
||||
lib,
|
||||
pkgs,
|
||||
stdenv,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "htgen";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchgit {
|
||||
url = "http://cgit.krebsco.de/htgen";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "0ml8kp89bwkrwy6iqclzyhxgv2qn9dcpwaafbmsr4mgcl70zx22r";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
{
|
||||
echo '#! ${pkgs.dash}/bin/dash'
|
||||
echo 'export PATH=${lib.makeBinPath [
|
||||
pkgs.coreutils
|
||||
pkgs.jq
|
||||
pkgs.ucspi-tcp
|
||||
]}''${PATH+":$PATH"}'
|
||||
sed 's:^Server=htgen$:&/${version}:' htgen
|
||||
} > $out/bin/htgen
|
||||
chmod +x $out/bin/htgen
|
||||
cp -r examples $out
|
||||
'';
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
{
|
||||
writers,
|
||||
pup,
|
||||
curl,
|
||||
pandoc,
|
||||
man,
|
||||
}:
|
||||
writers.writeDashBin "InfSchMV" ''
|
||||
${curl}/bin/curl -sSL https://www.berlin.de/corona/massnahmen/verordnung/ \
|
||||
| ${pup}/bin/pup .textile \
|
||||
| ${pandoc}/bin/pandoc -f html -t man -s \
|
||||
| ${man}/bin/man -l -
|
||||
''
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
cmake,
|
||||
python3,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2017.09.06";
|
||||
name = "iolanguage-${version}";
|
||||
src = fetchFromGitHub {
|
||||
owner = "IoLanguage";
|
||||
repo = "io";
|
||||
rev = "${version}";
|
||||
sha256 = "07rg1zrz6i6ghp11cm14w7bbaaa1s8sb0y5i7gr2sds0ijlpq223";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
buildInputs = [cmake python3];
|
||||
preBuild = "mkdir -p build && cd build";
|
||||
buildPhase = ''
|
||||
cmake -DCMAKE_INSTALL_PREFIX=$out/ ..
|
||||
make all
|
||||
'';
|
||||
meta = with lib; {
|
||||
homepage = "https://iolanguage.org/";
|
||||
description = "Io programming language. Inspired by Self, Smalltalk and LISP.";
|
||||
license = licenses.bsd3;
|
||||
};
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchurl,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "ix";
|
||||
src = fetchurl {
|
||||
url = "https://ix.io/client";
|
||||
sha256 = "0xc2s4s1aq143zz8lgkq5k25dpf049dw253qxiav5k7d7qvzzy57";
|
||||
};
|
||||
phases = ["installPhase"];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install $src $out/bin/ix
|
||||
'';
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
}:
|
||||
buildGoModule {
|
||||
name = "jq-lsp";
|
||||
version = "unstable-2023-09-08";
|
||||
src = fetchFromGitHub {
|
||||
owner = "wader";
|
||||
repo = "jq-lsp";
|
||||
rev = "85edf1adbe5e6c91b37c67b6a4bf85eda1e49f2f";
|
||||
hash = "sha256-ItLKRSbGZ8UqFEHCoh96KwhSpuKZ3l+2ZXnBkHEZL0M=";
|
||||
};
|
||||
vendorHash = "sha256-ppQ81uERHBgOr/bm/CoDSWcK+IqHwvcL6RFi0DgoLuw=";
|
||||
}
|
||||
@@ -1,7 +1,13 @@
|
||||
{pkgs ? import <nixpkgs> {}}:
|
||||
pkgs.writers.writeDashBin "jsesh" ''
|
||||
${pkgs.jre}/bin/java -jar ${pkgs.fetchzip {
|
||||
url = "https://github.com/rosmord/jsesh/releases/download/release-7.5.5/JSesh-7.5.5.zip";
|
||||
sha256 = "1z7ln51cil9pypz855x9a8p9ip2aflvknh566wcaah1kmz3fp57r";
|
||||
}}/lib/jseshAppli-7.5.5.jar
|
||||
{
|
||||
writers,
|
||||
jre,
|
||||
fetchzip,
|
||||
}:
|
||||
writers.writeDashBin "jsesh" ''
|
||||
${jre}/bin/java -jar ${
|
||||
fetchzip {
|
||||
url = "https://github.com/rosmord/jsesh/releases/download/release-7.5.5/JSesh-7.5.5.zip";
|
||||
sha256 = "1z7ln51cil9pypz855x9a8p9ip2aflvknh566wcaah1kmz3fp57r";
|
||||
}
|
||||
}/lib/jseshAppli-7.5.5.jar
|
||||
''
|
||||
|
||||
@@ -1,32 +1,36 @@
|
||||
# klem < klemm < klemmbrett ~ clipboard
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
dmenu,
|
||||
curl,
|
||||
gnused,
|
||||
coreutils,
|
||||
xclip,
|
||||
libnotify,
|
||||
writers,
|
||||
options ? { },
|
||||
...
|
||||
} @ args: let
|
||||
cfg = eval.config;
|
||||
|
||||
}: let
|
||||
eval = lib.evalModules {
|
||||
modules = [
|
||||
{
|
||||
_file = toString ./klem.nix;
|
||||
imports = [(args.config or {})];
|
||||
imports = [options];
|
||||
options = {
|
||||
selection = lib.mkOption {
|
||||
default = "clipboard";
|
||||
type = lib.types.enum ["primary" "secondary" "clipboard"];
|
||||
};
|
||||
dmenu = lib.mkOption {
|
||||
default = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
default = "${dmenu}/bin/dmenu -i -p klem";
|
||||
type = lib.types.path;
|
||||
};
|
||||
scripts = lib.mkOption {
|
||||
default = {
|
||||
pastebin = "${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io";
|
||||
pastebin = "${curl}/bin/curl -fSs -F 'f:1=<-' ix.io";
|
||||
shorten = ''
|
||||
${pkgs.curl}/bin/curl -fSs -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://0x0.st
|
||||
${curl}/bin/curl -fSs -F "shorten=$(${coreutils}/bin/cat)" https://0x0.st
|
||||
'';
|
||||
"replace p.r" = "${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'";
|
||||
"replace p.r" = "${gnused}/bin/sed 's/\\<r\\>/krebsco.de/'";
|
||||
};
|
||||
type = lib.types.attrs;
|
||||
};
|
||||
@@ -35,21 +39,21 @@
|
||||
];
|
||||
};
|
||||
|
||||
scriptCase = option: script: ''
|
||||
'${option}') ${toString script} ;;
|
||||
'';
|
||||
cfg = eval.config;
|
||||
in
|
||||
pkgs.writers.writeDashBin "klem" ''
|
||||
writers.writeDashBin "klem" ''
|
||||
set -efu
|
||||
|
||||
${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \
|
||||
${xclip}/bin/xclip -selection ${cfg.selection} -out \
|
||||
| case $(echo "${
|
||||
lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)
|
||||
}" | ${cfg.dmenu}) in
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)}
|
||||
*) ${pkgs.coreutils}/bin/cat ;;
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList (option: script: ''
|
||||
'${option}') ${toString script} ;;
|
||||
'') cfg.scripts)}
|
||||
*) ${coreutils}/bin/cat ;;
|
||||
esac \
|
||||
| ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in
|
||||
| ${xclip}/bin/xclip -selection ${cfg.selection} -in
|
||||
|
||||
${pkgs.libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
|
||||
${libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
|
||||
''
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
mkDerivation,
|
||||
ansi-terminal,
|
||||
base,
|
||||
directory,
|
||||
doctest,
|
||||
filepath,
|
||||
megaparsec,
|
||||
optparse-applicative,
|
||||
prettyprinter,
|
||||
process,
|
||||
raw-strings-qq,
|
||||
stdenv,
|
||||
tasty,
|
||||
tasty-hunit,
|
||||
text,
|
||||
yaml,
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "mahlzeit";
|
||||
version = "0.1.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "mahlzeit";
|
||||
rev = "954c0fb3f45815999bc65d003794af6a850b069c";
|
||||
sha256 = "046yrr40hjmxkjmwzcvmwb39fxx2v2i6hgdxrjfiwilzvhikarrg";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
ansi-terminal
|
||||
base
|
||||
directory
|
||||
filepath
|
||||
megaparsec
|
||||
prettyprinter
|
||||
text
|
||||
yaml
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
ansi-terminal
|
||||
base
|
||||
directory
|
||||
filepath
|
||||
optparse-applicative
|
||||
process
|
||||
text
|
||||
yaml
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base
|
||||
doctest
|
||||
megaparsec
|
||||
raw-strings-qq
|
||||
tasty
|
||||
tasty-hunit
|
||||
];
|
||||
homepage = "https://github.com/kmein/mahlzeit";
|
||||
description = "Recipe toolkit";
|
||||
license = lib.licenses.mit;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
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
|
||||
'';
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
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,89 +0,0 @@
|
||||
{
|
||||
writers,
|
||||
lib,
|
||||
jq,
|
||||
curl,
|
||||
xdotool,
|
||||
nsxiv,
|
||||
gnused,
|
||||
defaultStation ? 103840,
|
||||
}:
|
||||
writers.writeDashBin "meteo" ''
|
||||
# usage: meteo --list
|
||||
# usage: meteo --update
|
||||
# usage: meteo STATION
|
||||
set -efu
|
||||
|
||||
PATH=$PATH:${lib.makeBinPath [jq curl xdotool nsxiv gnused]}
|
||||
|
||||
# TODO XDG
|
||||
CONFIG_DIR=$HOME/.config/wetter
|
||||
STATIONS_FILE=$CONFIG_DIR/stations.json
|
||||
|
||||
case ''${1-} in
|
||||
--list)
|
||||
sed -n 's/^\s*\(--[^)]\+\))$/\1/p' "$0"
|
||||
jq -r -n \
|
||||
--slurpfile stations_file "$STATIONS_FILE" \
|
||||
'
|
||||
$stations_file[0] as $known_stations |
|
||||
|
||||
$known_stations | keys[]
|
||||
'
|
||||
exit
|
||||
;;
|
||||
--update)
|
||||
mkdir -p "$(dirname "$STATIONS_FILE")"
|
||||
exec >"$STATIONS_FILE"
|
||||
|
||||
curl -fsSL http://wetterstationen.meteomedia.de/ |
|
||||
jq -Rrs '
|
||||
def decodeHTML:
|
||||
gsub("ä";"ä") |
|
||||
gsub("ö";"ö") |
|
||||
gsub("ü";"ü") |
|
||||
gsub("Ä";"Ä") |
|
||||
gsub("Ö";"Ö") |
|
||||
gsub("Ü";"Ü") |
|
||||
gsub("ß";"ß")
|
||||
;
|
||||
[
|
||||
match(".*<option value=\"/\\?map=Deutschland&station=(?<station>[0-9]+)\">(?<name>[^<]+)</option>";"g")
|
||||
.captures |
|
||||
map({"\(.name)":(.string)}) |
|
||||
add |
|
||||
{"\(.name|decodeHTML)":(.station|tonumber)}
|
||||
] |
|
||||
add
|
||||
'
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
# set -x
|
||||
|
||||
station=''${1-${toString defaultStation}}
|
||||
station=$(jq -e -n \
|
||||
--arg station "$station" \
|
||||
--slurpfile stations_file "$STATIONS_FILE" \
|
||||
'
|
||||
$stations_file[0] as $known_stations |
|
||||
|
||||
$station |
|
||||
if test("^[0-9]+$") then
|
||||
tonumber
|
||||
else
|
||||
$known_stations[.]
|
||||
end
|
||||
')
|
||||
cache="/tmp/''${LOGNAME}_wetter_$station.png"
|
||||
curl -sSL \
|
||||
"http://wetterstationen.meteomedia.de/messnetz/vorhersagegrafik/$station.png" \
|
||||
-o "$cache"
|
||||
|
||||
if window_id=$(xdotool search --name "^nsxiv - $cache$"); then
|
||||
xdotool key --window "$window_id" r
|
||||
else
|
||||
nsxiv "$cache" &
|
||||
fi
|
||||
''
|
||||
@@ -1,35 +1,28 @@
|
||||
{
|
||||
writeText,
|
||||
lib,
|
||||
writers,
|
||||
mpv,
|
||||
dmenu,
|
||||
coreutils,
|
||||
gnused,
|
||||
di-fm-key-file,
|
||||
radioStreams,
|
||||
executableName ? "mpv-radio",
|
||||
mpvCommand ? "${mpv}/bin/mpv --force-window=yes"
|
||||
}: let
|
||||
streams = import ../lib/streams.nix {
|
||||
mpvCommand ? "${mpv}/bin/mpv --force-window=yes",
|
||||
}:
|
||||
let
|
||||
streams = radioStreams.override {
|
||||
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"/
|
||||
)"
|
||||
''
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user