mirror of
https://github.com/kmein/niveum
synced 2026-03-21 20:31:07 +01:00
Compare commits
10 Commits
111d9aa8de
...
wayland
| Author | SHA1 | Date | |
|---|---|---|---|
| b274a59a50 | |||
| b4de03bb3c | |||
| b0062abbfe | |||
| 0e9a046c5f | |||
| 72ab319e65 | |||
| f08e43067b | |||
| d0ac0af7c3 | |||
| 5febabb7fa | |||
| 44d29f90e9 | |||
| 1aaf0fe5ae |
@@ -1,114 +0,0 @@
|
|||||||
#!/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,7 +1,5 @@
|
|||||||
# niveum
|
# 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.)
|
> [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.—
|
> 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.—
|
||||||
@@ -12,6 +10,3 @@
|
|||||||
> das ist ja pure poesie —[riotbib](https://github.com/riotbib/)
|
> das ist ja pure poesie —[riotbib](https://github.com/riotbib/)
|
||||||
|
|
||||||
> Deine Configs sind wunderschön <3 —[flxai](https://github.com/flxai/)
|
> Deine Configs sind wunderschön <3 —[flxai](https://github.com/flxai/)
|
||||||
|
|
||||||
## To do
|
|
||||||
- [ ] get rid of `nixinate`
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
niveumPackages,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
darwin = lib.strings.hasSuffix "-darwin" pkgs.stdenv.hostPlatform.system;
|
darwin = lib.strings.hasSuffix "-darwin" pkgs.system;
|
||||||
in {
|
in {
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
[
|
[
|
||||||
@@ -36,12 +37,12 @@ in {
|
|||||||
pkgs.bc # calculator
|
pkgs.bc # calculator
|
||||||
pkgs.pari # gp -- better calculator
|
pkgs.pari # gp -- better calculator
|
||||||
pkgs.ts
|
pkgs.ts
|
||||||
pkgs.vimv
|
niveumPackages.vimv
|
||||||
pkgs.vg
|
niveumPackages.vg
|
||||||
pkgs.fkill
|
niveumPackages.fkill
|
||||||
pkgs.cyberlocker-tools
|
niveumPackages.cyberlocker-tools
|
||||||
pkgs.untilport
|
niveumPackages.untilport
|
||||||
pkgs.kpaste
|
niveumPackages.kpaste
|
||||||
# HARDWARE
|
# HARDWARE
|
||||||
pkgs.pciutils # for lspci
|
pkgs.pciutils # for lspci
|
||||||
]
|
]
|
||||||
@@ -68,19 +69,12 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.interactiveShellInit = ''
|
|
||||||
# Use XDG_RUNTIME_DIR for temporary files if available
|
|
||||||
if [ -d "$XDG_RUNTIME_DIR" ]; then
|
|
||||||
export TMPDIR="$XDG_RUNTIME_DIR"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
environment.shellAliases = let
|
environment.shellAliases = let
|
||||||
take = pkgs.writers.writeDash "take" ''
|
take = pkgs.writers.writeDash "take" ''
|
||||||
mkdir "$1" && cd "$1"
|
mkdir "$1" && cd "$1"
|
||||||
'';
|
'';
|
||||||
cdt = pkgs.writers.writeDash "cdt" ''
|
cdt = pkgs.writers.writeDash "cdt" ''
|
||||||
cd $(mktemp -p "$XDG_RUNTIME_DIR" -d "cdt-XXXXXX")
|
cd "$(mktemp -d)"
|
||||||
pwd
|
pwd
|
||||||
'';
|
'';
|
||||||
wcd = pkgs.writers.writeDash "wcd" ''
|
wcd = pkgs.writers.writeDash "wcd" ''
|
||||||
@@ -91,7 +85,7 @@ in {
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixi = "nix repl nixpkgs";
|
nixi = "nix repl '<nixpkgs>'";
|
||||||
take = "source ${take}";
|
take = "source ${take}";
|
||||||
wcd = "source ${wcd}";
|
wcd = "source ${wcd}";
|
||||||
where = "source ${where}";
|
where = "source ${where}";
|
||||||
|
|||||||
120
configs/aerc.nix
120
configs/aerc.nix
@@ -2,18 +2,20 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
niveumPackages,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
{
|
inherit (import ../lib/email.nix) defaults thunderbirdProfile;
|
||||||
|
in {
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
email-password-ical-ephemeris = {
|
email-password-cock = {
|
||||||
file = ../secrets/email-password-ical-ephemeris.age;
|
file = ../secrets/email-password-cock.age;
|
||||||
owner = config.users.users.me.name;
|
owner = config.users.users.me.name;
|
||||||
group = config.users.users.me.group;
|
group = config.users.users.me.group;
|
||||||
mode = "400";
|
mode = "400";
|
||||||
};
|
};
|
||||||
email-password-cock = {
|
email-password-letos = {
|
||||||
file = ../secrets/email-password-cock.age;
|
file = ../secrets/email-password-letos.age;
|
||||||
owner = config.users.users.me.name;
|
owner = config.users.users.me.name;
|
||||||
group = config.users.users.me.group;
|
group = config.users.users.me.group;
|
||||||
mode = "400";
|
mode = "400";
|
||||||
@@ -41,15 +43,14 @@
|
|||||||
extraConfig = {
|
extraConfig = {
|
||||||
database.path = config.home-manager.users.me.accounts.email.maildirBasePath;
|
database.path = config.home-manager.users.me.accounts.email.maildirBasePath;
|
||||||
new.tags = "";
|
new.tags = "";
|
||||||
user.name = pkgs.lib.niveum.email.defaults.realName;
|
user.name = defaults.realName;
|
||||||
user.primary_email = config.home-manager.users.me.accounts.email.accounts.posteo.address;
|
user.primary_email = config.home-manager.users.me.accounts.email.accounts.posteo.address;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.mbsync = {
|
programs.mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = lib.concatStringsSep "\n\n" (
|
extraConfig = lib.concatStringsSep "\n\n" (lib.mapAttrsToList (name: account: ''
|
||||||
lib.mapAttrsToList (name: account: ''
|
|
||||||
IMAPAccount ${name}
|
IMAPAccount ${name}
|
||||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||||
Host ${account.imap.host}
|
Host ${account.imap.host}
|
||||||
@@ -73,55 +74,46 @@
|
|||||||
Patterns *
|
Patterns *
|
||||||
Remove None
|
Remove None
|
||||||
SyncState *
|
SyncState *
|
||||||
'') config.home-manager.users.me.accounts.email.accounts
|
'')
|
||||||
);
|
config.home-manager.users.me.accounts.email.accounts);
|
||||||
};
|
};
|
||||||
|
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
cock =
|
cock =
|
||||||
let
|
lib.recursiveUpdate defaults
|
||||||
mailhost = "mail.cock.li";
|
rec {
|
||||||
address = "2210@cock.li";
|
address = "2210@cock.li";
|
||||||
in
|
|
||||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
|
||||||
address = address;
|
|
||||||
userName = address;
|
userName = address;
|
||||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
|
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
|
||||||
realName = "2210";
|
realName = "2210";
|
||||||
imap.host = mailhost;
|
imap.host = "mail.cock.li";
|
||||||
imap.port = 993;
|
imap.port = 993;
|
||||||
smtp.host = mailhost;
|
smtp.host = imap.host;
|
||||||
smtp.port = 25;
|
smtp.port = 25;
|
||||||
smtp.tls.useStartTls = true;
|
smtp.tls.useStartTls = true;
|
||||||
};
|
};
|
||||||
ical-ephemeris =
|
letos =
|
||||||
let
|
lib.recursiveUpdate defaults
|
||||||
address = "ical.ephemeris@web.de";
|
{
|
||||||
in
|
userName = "slfletos";
|
||||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
address = "letos.sprachlit@hu-berlin.de";
|
||||||
userName = address;
|
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}";
|
||||||
realName = "Kieran from iCal Ephemeris";
|
imap.host = "mailbox.cms.hu-berlin.de";
|
||||||
address = address;
|
|
||||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-ical-ephemeris.path}";
|
|
||||||
imap.host = "imap.web.de";
|
|
||||||
imap.port = 993;
|
imap.port = 993;
|
||||||
smtp.host = "smtp.web.de";
|
smtp.host = "mailhost.cms.hu-berlin.de";
|
||||||
smtp.port = 587;
|
smtp.port = 25;
|
||||||
smtp.tls.useStartTls = true;
|
smtp.tls.useStartTls = true;
|
||||||
};
|
};
|
||||||
posteo =
|
posteo =
|
||||||
let
|
lib.recursiveUpdate defaults
|
||||||
mailhost = "posteo.de";
|
rec {
|
||||||
address = "kieran.meinhardt@posteo.net";
|
address = "kieran.meinhardt@posteo.net";
|
||||||
in
|
aliases = ["kmein@posteo.de"];
|
||||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
|
||||||
address = address;
|
|
||||||
aliases = [ "kmein@posteo.de" ];
|
|
||||||
userName = address;
|
userName = address;
|
||||||
imap.host = mailhost;
|
imap.host = "posteo.de";
|
||||||
imap.port = 993;
|
imap.port = 993;
|
||||||
imap.tls.enable = true;
|
imap.tls.enable = true;
|
||||||
smtp.host = mailhost;
|
smtp.host = imap.host;
|
||||||
smtp.port = 465;
|
smtp.port = 465;
|
||||||
smtp.tls.enable = true;
|
smtp.tls.enable = true;
|
||||||
primary = true;
|
primary = true;
|
||||||
@@ -140,7 +132,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
};
|
};
|
||||||
profiles.${pkgs.lib.niveum.email.thunderbirdProfile} = {
|
profiles.${thunderbirdProfile} = {
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
settings = {
|
settings = {
|
||||||
"mail.default_send_format" = 1;
|
"mail.default_send_format" = 1;
|
||||||
@@ -148,8 +140,10 @@
|
|||||||
"msgcompose.text_color" = config.lib.stylix.colors.withHashtag.base00;
|
"msgcompose.text_color" = config.lib.stylix.colors.withHashtag.base00;
|
||||||
"msgcompose.background_color" = config.lib.stylix.colors.withHashtag.base05;
|
"msgcompose.background_color" = config.lib.stylix.colors.withHashtag.base05;
|
||||||
};
|
};
|
||||||
userChrome = '''';
|
userChrome = ''
|
||||||
userContent = '''';
|
'';
|
||||||
|
userContent = ''
|
||||||
|
'';
|
||||||
withExternalGnupg = false;
|
withExternalGnupg = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -211,7 +205,7 @@
|
|||||||
"*" = ":filter -x Flagged<Enter>";
|
"*" = ":filter -x Flagged<Enter>";
|
||||||
};
|
};
|
||||||
view = {
|
view = {
|
||||||
tr = ":pipe ${pkgs.trans}/bin/trans -show-original n -b -no-autocorrect<Enter>"; # https://man.sr.ht/~rjarry/aerc/integrations/translator.md
|
tr = ":pipe ${niveumPackages.trans}/bin/trans -show-original n -b -no-autocorrect<Enter>"; # https://man.sr.ht/~rjarry/aerc/integrations/translator.md
|
||||||
"/" = ":toggle-key-passthrough <Enter> /";
|
"/" = ":toggle-key-passthrough <Enter> /";
|
||||||
q = ":close<Enter>";
|
q = ":close<Enter>";
|
||||||
O = ":open<Enter>";
|
O = ":open<Enter>";
|
||||||
@@ -284,9 +278,7 @@
|
|||||||
ui.spinner = ". , .";
|
ui.spinner = ". , .";
|
||||||
general.unsafe-accounts-conf = true;
|
general.unsafe-accounts-conf = true;
|
||||||
general.pgp-provider = "gpg";
|
general.pgp-provider = "gpg";
|
||||||
viewer = {
|
viewer = {pager = "${pkgs.less}/bin/less -R";};
|
||||||
pager = "${pkgs.less}/bin/less -R";
|
|
||||||
};
|
|
||||||
compose = {
|
compose = {
|
||||||
# address-book-cmd = "khard email --remove-first-line --parsable '%s'";
|
# address-book-cmd = "khard email --remove-first-line --parsable '%s'";
|
||||||
no-attachment-warning = "(attach|attached|attachments?|anbei|Anhang|angehängt|beigefügt)";
|
no-attachment-warning = "(attach|attached|attachments?|anbei|Anhang|angehängt|beigefügt)";
|
||||||
@@ -303,26 +295,24 @@
|
|||||||
"message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
"message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
||||||
};
|
};
|
||||||
openers =
|
openers = let
|
||||||
let
|
as-pdf = pkgs.writers.writeDash "as-pdf" ''
|
||||||
as-pdf = pkgs.writers.writeDash "as-pdf" ''
|
d=$(mktemp -d)
|
||||||
d=$(mktemp -p "$XDG_RUNTIME_DIR" -d)
|
trap clean EXIT
|
||||||
trap clean EXIT
|
clean() {
|
||||||
clean() {
|
rm -rf "$d"
|
||||||
rm -rf "$d"
|
}
|
||||||
}
|
${pkgs.libreoffice}/bin/libreoffice --headless --convert-to pdf "$1" --outdir "$d"
|
||||||
${pkgs.libreoffice}/bin/libreoffice --headless --convert-to pdf "$1" --outdir "$d"
|
${pkgs.zathura}/bin/zathura "$d"/*.pdf
|
||||||
${pkgs.zathura}/bin/zathura "$d"/*.pdf
|
'';
|
||||||
'';
|
in {
|
||||||
in
|
"image/*" = "${pkgs.nsxiv}/bin/nsxiv";
|
||||||
{
|
"application/pdf" = "${pkgs.zathura}/bin/zathura";
|
||||||
"image/*" = "${pkgs.nsxiv}/bin/nsxiv";
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = toString as-pdf;
|
||||||
"application/pdf" = "${pkgs.zathura}/bin/zathura";
|
"application/vnd.oasis.opendocument.text" = toString as-pdf;
|
||||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = toString as-pdf;
|
"video/*" = "${pkgs.mpv}/bin/mpv";
|
||||||
"application/vnd.oasis.opendocument.text" = toString as-pdf;
|
"audio/*" = "${pkgs.mpv}/bin/mpv";
|
||||||
"video/*" = "${pkgs.mpv}/bin/mpv";
|
};
|
||||||
"audio/*" = "${pkgs.mpv}/bin/mpv";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
templates = {
|
templates = {
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
{
|
inherit (import ../lib) restic;
|
||||||
|
in {
|
||||||
services.restic.backups.niveum = {
|
services.restic.backups.niveum = {
|
||||||
initialize = true;
|
initialize = true;
|
||||||
repository = pkgs.lib.niveum.restic.repository;
|
inherit (restic) repository;
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "8:00";
|
OnCalendar = "8:00";
|
||||||
RandomizedDelaySec = "1h";
|
RandomizedDelaySec = "1h";
|
||||||
@@ -38,15 +38,15 @@
|
|||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writers.writeDashBin "restic-niveum" ''
|
(pkgs.writers.writeDashBin "restic-niveum" ''
|
||||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
||||||
'')
|
'')
|
||||||
(pkgs.writers.writeDashBin "restic-mount" ''
|
(pkgs.writers.writeDashBin "restic-mount" ''
|
||||||
mountdir=$(mktemp -p "$XDG_RUNTIME_DIR" -d "restic-mount-XXXXXXX")
|
mountdir=$(mktemp -d)
|
||||||
trap clean EXIT
|
trap clean EXIT
|
||||||
clean() {
|
clean() {
|
||||||
rm -r "$mountdir"
|
rm -r "$mountdir"
|
||||||
}
|
}
|
||||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,6 @@
|
|||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
set -o vi
|
set -o vi
|
||||||
'';
|
'';
|
||||||
completion.enable = true;
|
enableCompletion = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,17 @@
|
|||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
config,
|
config,
|
||||||
inputs,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
autorenkalender = inputs.autorenkalender.packages.x86_64-linux.default;
|
autorenkalender-package = pkgs.fetchFromGitHub {
|
||||||
|
owner = "kmein";
|
||||||
|
repo = "autorenkalender";
|
||||||
|
rev = "cf49a7b057301332d980eb47042a626add93db66";
|
||||||
|
sha256 = "1pa7sjg33vdnjianrqldv445jdzzv3mn231ljk1j58hs0cd505gs";
|
||||||
|
};
|
||||||
|
autorenkalender =
|
||||||
|
pkgs.python3Packages.callPackage autorenkalender-package {};
|
||||||
in {
|
in {
|
||||||
niveum.bots.autorenkalender = {
|
niveum.bots.autorenkalender = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
telebots = inputs.telebots.defaultPackage.x86_64-linux;
|
telebots = inputs.telebots.defaultPackage.x86_64-linux;
|
||||||
reverseDirectory = "/run/telegram-reverse";
|
reverseDirectory = "/run/telegram-reverse";
|
||||||
proverbDirectory = "/run/telegram-proverb";
|
proverbDirectory = "/run/telegram-proverb";
|
||||||
|
inherit (import ../../lib) tmpfilesConfig;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./logotheca.nix
|
./logotheca.nix
|
||||||
@@ -16,17 +17,13 @@ in {
|
|||||||
./hesychius.nix
|
./hesychius.nix
|
||||||
./smyth.nix
|
./smyth.nix
|
||||||
./nachtischsatan.nix
|
./nachtischsatan.nix
|
||||||
# ./tlg-wotd.nix TODO reenable
|
./tlg-wotd.nix
|
||||||
./celan.nix
|
./celan.nix
|
||||||
./nietzsche.nix
|
./nietzsche.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
age.secrets = {
|
|
||||||
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = map (path:
|
systemd.tmpfiles.rules = map (path:
|
||||||
pkgs.lib.niveum.tmpfilesConfig {
|
tmpfilesConfig {
|
||||||
type = "d";
|
type = "d";
|
||||||
mode = "0750";
|
mode = "0750";
|
||||||
age = "1h";
|
age = "1h";
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
|
niveumPackages,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
niveum.bots.logotheca = {
|
niveum.bots.logotheca = {
|
||||||
@@ -20,7 +22,7 @@
|
|||||||
"!zlwCuPiCNMSxDviFzA:4d2.org"
|
"!zlwCuPiCNMSxDviFzA:4d2.org"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
command = "${pkgs.literature-quote}/bin/literature-quote";
|
command = "${niveumPackages.literature-quote}/bin/literature-quote";
|
||||||
};
|
};
|
||||||
|
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
niveumPackages,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
niveum.bots.nietzsche = {
|
niveum.bots.nietzsche = {
|
||||||
@@ -15,9 +16,9 @@
|
|||||||
set -efu
|
set -efu
|
||||||
random_number=$(( ($RANDOM % 10) + 1 ))
|
random_number=$(( ($RANDOM % 10) + 1 ))
|
||||||
if [ "$random_number" -eq 1 ]; then
|
if [ "$random_number" -eq 1 ]; then
|
||||||
${pkgs.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
${niveumPackages.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
||||||
else
|
else
|
||||||
${pkgs.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
${niveumPackages.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
||||||
fi
|
fi
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,31 +20,15 @@
|
|||||||
command = toString (pkgs.writers.writeDash "random-smyth" ''
|
command = toString (pkgs.writers.writeDash "random-smyth" ''
|
||||||
set -efu
|
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=$(
|
RANDOM_SECTION=$(
|
||||||
good_curl -sSL http://www.perseus.tufts.edu/hopper/xmltoc?doc=Perseus%3Atext%3A1999.04.0007%3Asmythp%3D1 \
|
${pkgs.curl}/bin/curl -sSL http://www.perseus.tufts.edu/hopper/xmltoc?doc=Perseus%3Atext%3A1999.04.0007%3Asmythp%3D1 \
|
||||||
| ${pkgs.gnugrep}/bin/grep -o 'ref="[^"]*"' \
|
| ${pkgs.gnugrep}/bin/grep -o 'ref="[^"]*"' \
|
||||||
| ${pkgs.coreutils}/bin/shuf -n1 \
|
| ${pkgs.coreutils}/bin/shuf -n1 \
|
||||||
| ${pkgs.gnused}/bin/sed 's/^ref="//;s/"$//'
|
| ${pkgs.gnused}/bin/sed 's/^ref="//;s/"$//'
|
||||||
)
|
)
|
||||||
|
|
||||||
url="http://www.perseus.tufts.edu/hopper/text?doc=$RANDOM_SECTION"
|
url="http://www.perseus.tufts.edu/hopper/text?doc=$RANDOM_SECTION"
|
||||||
good_curl -sSL "$url"\
|
${pkgs.curl}/bin/curl -sSL "$url"\
|
||||||
| ${pkgs.htmlq}/bin/htmlq '#text_main' \
|
| ${pkgs.htmlq}/bin/htmlq '#text_main' \
|
||||||
| ${pkgs.gnused}/bin/sed 's/<\/\?hr>//g' \
|
| ${pkgs.gnused}/bin/sed 's/<\/\?hr>//g' \
|
||||||
| ${pkgs.pandoc}/bin/pandoc -f html -t plain --wrap=none
|
| ${pkgs.pandoc}/bin/pandoc -f html -t plain --wrap=none
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
config,
|
config,
|
||||||
|
niveumPackages,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
mastodonEndpoint = "https://social.krebsco.de";
|
mastodonEndpoint = "https://social.krebsco.de";
|
||||||
in {
|
in {
|
||||||
systemd.services.bot-tlg-wotd = {
|
systemd.services.bot-tlg-wotd = {
|
||||||
# TODO reenable
|
|
||||||
# once https://github.com/NixOS/nixpkgs/pull/462893 is in stable NixOS
|
|
||||||
enable = true;
|
enable = true;
|
||||||
wants = ["network-online.target"];
|
wants = ["network-online.target"];
|
||||||
startAt = "9:30";
|
startAt = "9:30";
|
||||||
@@ -42,8 +42,9 @@ in {
|
|||||||
|
|
||||||
#ancientgreek #classics #wotd #wordoftheday
|
#ancientgreek #classics #wotd #wordoftheday
|
||||||
|
|
||||||
transliteration=$(${pkgs.writers.writePython3 "translit.py" {
|
transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" {
|
||||||
libraries = py: [ py.cltk ];
|
# revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged
|
||||||
|
libraries = [ pkgs.python3Packages.cltk ];
|
||||||
} ''
|
} ''
|
||||||
import sys
|
import sys
|
||||||
from cltk.phonology.grc.transcription import Transcriber
|
from cltk.phonology.grc.transcription import Transcriber
|
||||||
@@ -148,6 +149,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
|
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
|
||||||
mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age;
|
mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
niveumPackages,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.cro
|
niveumPackages.cro
|
||||||
pkgs.tor-browser
|
pkgs.tor-browser-bundle-bin
|
||||||
pkgs.firefox
|
pkgs.firefox
|
||||||
pkgs.brave
|
pkgs.brave
|
||||||
];
|
];
|
||||||
@@ -81,9 +82,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.me = {
|
|
||||||
stylix.targets.firefox.profileNames = ["default"];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.variables.BROWSER = "firefox";
|
environment.variables.BROWSER = "firefox";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
{pkgs, ...}:
|
{pkgs, ...}:
|
||||||
# https://paste.sr.ht/~erictapen/11716989e489b600f237041b6d657fdf0ee17b34
|
# https://paste.sr.ht/~erictapen/11716989e489b600f237041b6d657fdf0ee17b34
|
||||||
let
|
let
|
||||||
name = "dst-root-ca-x3.pem";
|
certificate = pkgs.stdenv.mkDerivation rec {
|
||||||
certificate = pkgs.stdenv.mkDerivation {
|
name = "dst-root-ca-x3.pem";
|
||||||
inherit name;
|
|
||||||
src = builtins.toFile "${name}.sed" ''
|
src = builtins.toFile "${name}.sed" ''
|
||||||
1,/DST Root CA X3/d
|
1,/DST Root CA X3/d
|
||||||
1,/-----END CERTIFICATE-----/p
|
1,/-----END CERTIFICATE-----/p
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
inherit (import ../lib) tmpfilesConfig;
|
||||||
|
in {
|
||||||
systemd.user.services.systemd-tmpfiles-clean = {
|
systemd.user.services.systemd-tmpfiles-clean = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
@@ -14,7 +16,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.tmpfiles.users.me.rules = map pkgs.lib.niveum.tmpfilesConfig [
|
systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [
|
||||||
{
|
{
|
||||||
type = "d";
|
type = "d";
|
||||||
mode = "0755";
|
mode = "0755";
|
||||||
@@ -27,7 +29,7 @@
|
|||||||
age = "7d";
|
age = "7d";
|
||||||
path = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
path = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
||||||
}
|
}
|
||||||
] ++ map (path: pkgs.lib.niveum.tmpfilesConfig {
|
] ++ map (path: tmpfilesConfig {
|
||||||
type = "L+";
|
type = "L+";
|
||||||
user = config.users.users.me.name;
|
user = config.users.users.me.name;
|
||||||
group = config.users.users.me.group;
|
group = config.users.users.me.group;
|
||||||
@@ -89,7 +91,7 @@
|
|||||||
selection="$(${megatools "ls"} | ${pkgs.fzf}/bin/fzf)"
|
selection="$(${megatools "ls"} | ${pkgs.fzf}/bin/fzf)"
|
||||||
test -n "$selection" || exit 1
|
test -n "$selection" || exit 1
|
||||||
|
|
||||||
tmpdir="$(mktemp -p "$XDG_RUNTIME_DIR" -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
trap clean EXIT
|
trap clean EXIT
|
||||||
clean() {
|
clean() {
|
||||||
rm -rf "$tmpdir"
|
rm -rf "$tmpdir"
|
||||||
@@ -119,7 +121,7 @@
|
|||||||
cert = config.age.secrets.syncthing-cert.path;
|
cert = config.age.secrets.syncthing-cert.path;
|
||||||
key = config.age.secrets.syncthing-key.path;
|
key = config.age.secrets.syncthing-key.path;
|
||||||
settings = {
|
settings = {
|
||||||
devices = pkgs.lib.niveum.syncthingIds;
|
inherit ((import ../lib).syncthing) devices;
|
||||||
folders = {
|
folders = {
|
||||||
"${config.users.users.me.home}/sync" = {
|
"${config.users.users.me.home}/sync" = {
|
||||||
devices = ["kabsa" "manakish" "fatteh"];
|
devices = ["kabsa" "manakish" "fatteh"];
|
||||||
|
|||||||
@@ -2,11 +2,15 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
niveumPackages,
|
||||||
|
unstablePackages,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib.strings) makeBinPath;
|
inherit (lib.strings) makeBinPath;
|
||||||
|
inherit (import ../lib) localAddresses kieran remoteDir;
|
||||||
|
defaultApplications = (import ../lib).defaultApplications { inherit pkgs; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -20,9 +24,12 @@ in
|
|||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
packageOverrides = pkgs: {
|
packageOverrides = pkgs: {
|
||||||
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.wofi}/bin/wofi -dmenu "$@"'';
|
||||||
};
|
};
|
||||||
permittedInsecurePackages = [
|
permittedInsecurePackages = [
|
||||||
|
"qtwebkit-5.212.0-alpha4"
|
||||||
|
"zotero-6.0.26"
|
||||||
|
"electron-25.9.0"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -65,7 +72,7 @@ in
|
|||||||
|
|
||||||
users.users.me = {
|
users.users.me = {
|
||||||
name = "kfm";
|
name = "kfm";
|
||||||
description = pkgs.lib.niveum.kieran.name;
|
description = kieran.name;
|
||||||
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
@@ -87,19 +94,19 @@ in
|
|||||||
environment.interactiveShellInit = "export PATH=$PATH";
|
environment.interactiveShellInit = "export PATH=$PATH";
|
||||||
environment.shellAliases =
|
environment.shellAliases =
|
||||||
let
|
let
|
||||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||||
ns = "nix-shell --run zsh";
|
ns = "nix-shell --run zsh";
|
||||||
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
|
pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||||
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
|
pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||||
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
||||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
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
|
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
|
||||||
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format mp3 --audio-quality 0 -xic"; # Download with audio
|
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format opus --audio-quality 0 -xic"; # Download with audio
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -132,14 +139,15 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{ programs.command-not-found.enable = true; }
|
||||||
{
|
{
|
||||||
programs.gnupg = {
|
programs.gnupg = {
|
||||||
agent = {
|
agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pinentryPackage = pkgs.pinentry-qt;
|
pinentryPackage = pkgs.pinentry-qt;
|
||||||
settings = let defaultCacheTtl = 2 * 60 * 60; in {
|
settings = rec {
|
||||||
default-cache-ttl = defaultCacheTtl;
|
default-cache-ttl = 2 * 60 * 60;
|
||||||
max-cache-ttl = 4 * defaultCacheTtl;
|
max-cache-ttl = 4 * default-cache-ttl;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -158,7 +166,7 @@ in
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
services.getty = {
|
services.getty = {
|
||||||
greetingLine = lib.mkForce "As-salamu alaykum wa rahmatullahi wa barakatuh!";
|
greetingLine = lib.mkForce "";
|
||||||
helpLine = lib.mkForce "";
|
helpLine = lib.mkForce "";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -166,7 +174,7 @@ in
|
|||||||
networking.hosts = lib.mapAttrs' (name: address: {
|
networking.hosts = lib.mapAttrs' (name: address: {
|
||||||
name = address;
|
name = address;
|
||||||
value = [ "${name}.local" ];
|
value = [ "${name}.local" ];
|
||||||
}) pkgs.lib.niveum.localAddresses;
|
}) localAddresses;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
home-manager.users.me.home.stateVersion = "22.05";
|
home-manager.users.me.home.stateVersion = "22.05";
|
||||||
@@ -187,7 +195,7 @@ in
|
|||||||
dconf.enable = true;
|
dconf.enable = true;
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
# Change the default terminal for Nemo
|
# Change the default terminal for Nemo
|
||||||
"org/cinnamon/desktop/applications/terminal".exec = lib.getExe pkgs.niveum-terminal;
|
"org/cinnamon/desktop/applications/terminal".exec = defaultApplications.terminal;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -207,17 +215,20 @@ in
|
|||||||
./direnv.nix
|
./direnv.nix
|
||||||
./docker.nix
|
./docker.nix
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
|
./flix.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
./fzf.nix
|
./fzf.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./hledger.nix
|
./hledger.nix
|
||||||
./htop.nix
|
./htop.nix
|
||||||
./uni.nix
|
./fu-berlin.nix
|
||||||
./i3.nix
|
./i3.nix
|
||||||
|
./niri.nix
|
||||||
./i3status-rust.nix
|
./i3status-rust.nix
|
||||||
./keyboard
|
./keyboard.nix
|
||||||
./mycelium.nix
|
./mycelium.nix
|
||||||
./kdeconnect.nix
|
./kdeconnect.nix
|
||||||
|
{ home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose; }
|
||||||
{ services.upower.enable = true; }
|
{ services.upower.enable = true; }
|
||||||
./lb.nix
|
./lb.nix
|
||||||
./mpv.nix
|
./mpv.nix
|
||||||
@@ -226,8 +237,9 @@ in
|
|||||||
./nix.nix
|
./nix.nix
|
||||||
./newsboat.nix
|
./newsboat.nix
|
||||||
./flameshot.nix
|
./flameshot.nix
|
||||||
|
./fritzbox.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./virtualization.nix
|
./picom.nix
|
||||||
./stardict.nix
|
./stardict.nix
|
||||||
./polkit.nix
|
./polkit.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
@@ -251,18 +263,38 @@ in
|
|||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
./tor.nix
|
./tor.nix
|
||||||
|
./stw-berlin.nix
|
||||||
./mastodon-bot.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 = {
|
home-manager.users.me = {
|
||||||
xdg.userDirs = let pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder"; in {
|
xdg.userDirs = rec {
|
||||||
enable = true;
|
enable = true;
|
||||||
documents = "${config.users.users.me.home}/cloud/nextcloud/Documents";
|
documents = "${config.users.users.me.home}/cloud/nextcloud/Documents";
|
||||||
desktop = "/tmp";
|
desktop = "/tmp";
|
||||||
download = "${config.users.users.me.home}/sync/Downloads";
|
download = "${config.users.users.me.home}/sync/Downloads";
|
||||||
music = "${config.users.users.me.home}/mobile/audio";
|
music = "${config.users.users.me.home}/mobile/audio";
|
||||||
|
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder";
|
||||||
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
||||||
videos = pictures;
|
videos = pictures;
|
||||||
pictures = pictures;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
15
configs/distrobump.nix
Normal file
15
configs/distrobump.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
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,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
lib,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (import ../lib) defaultApplications theme;
|
||||||
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
|
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
@@ -17,7 +18,7 @@ in {
|
|||||||
|
|
||||||
home-manager.users.me.services.dunst = {
|
home-manager.users.me.services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = pkgs.lib.niveum.theme.icon;
|
iconTheme = (theme pkgs).icon;
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
global = {
|
||||||
transparency = 10;
|
transparency = 10;
|
||||||
@@ -43,7 +44,7 @@ in {
|
|||||||
sticky_history = true;
|
sticky_history = true;
|
||||||
history_length = 20;
|
history_length = 20;
|
||||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||||
browser = lib.getExe pkgs.niveum-browser;
|
browser = (defaultApplications pkgs).browser;
|
||||||
verbosity = "mesg";
|
verbosity = "mesg";
|
||||||
corner_radius = 0;
|
corner_radius = 0;
|
||||||
mouse_left_click = "do_action";
|
mouse_left_click = "do_action";
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
}: {
|
}: {
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
services.flameshot = {
|
services.flameshot = {
|
||||||
|
package = pkgs.flameshot.override { enableWlrSupport = true; };
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.General = {
|
settings.General = {
|
||||||
autoCloseIdleDaemon = true;
|
autoCloseIdleDaemon = true;
|
||||||
@@ -15,7 +16,7 @@
|
|||||||
showHelp = false;
|
showHelp = false;
|
||||||
squareMagnifier = true;
|
squareMagnifier = true;
|
||||||
uploadWithoutConfirmation = 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)'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
98
configs/flix.nix
Normal file
98
configs/flix.nix
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
{
|
||||||
|
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,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
|
niveumPackages,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
zip-font = name: arguments: let
|
zip-font = name: arguments: let
|
||||||
@@ -92,6 +94,7 @@ in {
|
|||||||
font-awesome
|
font-awesome
|
||||||
galatia-sil
|
galatia-sil
|
||||||
gentium
|
gentium
|
||||||
|
# niveumPackages.gfs-fonts
|
||||||
gyre-fonts
|
gyre-fonts
|
||||||
ibm-plex
|
ibm-plex
|
||||||
jetbrains-mono
|
jetbrains-mono
|
||||||
@@ -100,28 +103,28 @@ in {
|
|||||||
lmodern
|
lmodern
|
||||||
merriweather
|
merriweather
|
||||||
ocr-a
|
ocr-a
|
||||||
montserrat
|
|
||||||
roboto
|
roboto
|
||||||
roboto-mono
|
roboto-mono
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
noto-fonts-color-emoji
|
noto-fonts-emoji
|
||||||
|
nerd-fonts.blex-mono
|
||||||
roboto-slab
|
roboto-slab
|
||||||
scheherazade-new
|
scheherazade-new
|
||||||
source-code-pro
|
source-code-pro
|
||||||
source-sans-pro
|
source-sans-pro
|
||||||
source-serif-pro
|
source-serif-pro
|
||||||
theano
|
theano
|
||||||
tocharian-font
|
niveumPackages.tocharian-font
|
||||||
vista-fonts
|
vistafonts
|
||||||
vollkorn
|
vollkorn
|
||||||
zilla-slab
|
zilla-slab
|
||||||
]; # google-fonts league-of-moveable-type
|
]; # google-fonts league-of-moveable-type
|
||||||
fontconfig.defaultFonts = let emoji = ["Noto Color Emoji"]; in {
|
fontconfig.defaultFonts = rec {
|
||||||
monospace = ["Noto Sans Mono"] ++ emoji;
|
monospace = [config.stylix.fonts.monospace.name] ++ emoji;
|
||||||
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
|
serif = [config.stylix.fonts.serif.name "Scheherazade New" "Ezra SIL" "Antinoou" "Noto Serif Devanagari"];
|
||||||
sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"];
|
sansSerif = [config.stylix.fonts.sansSerif.name "Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"];
|
||||||
inherit emoji;
|
emoji = [config.stylix.fonts.emoji.name];
|
||||||
};
|
};
|
||||||
# xelatex fails with woff files
|
# xelatex fails with woff files
|
||||||
# ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other
|
# ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other
|
||||||
|
|||||||
19
configs/fritzbox.nix
Normal file
19
configs/fritzbox.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ 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=";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -5,11 +5,13 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
username = "meinhak99";
|
username = "meinhak99";
|
||||||
fu-defaults = let mailhost = "mail.zedat.fu-berlin.de"; in {
|
inherit (import ../lib/email.nix) defaults pronouns;
|
||||||
imap.host = mailhost;
|
inherit (import ../lib) remoteDir;
|
||||||
|
fu-defaults = rec {
|
||||||
|
imap.host = "mail.zedat.fu-berlin.de";
|
||||||
imap.port = 993;
|
imap.port = 993;
|
||||||
imap.tls.enable = true;
|
imap.tls.enable = true;
|
||||||
smtp.host = mailhost;
|
smtp.host = imap.host;
|
||||||
smtp.port = 465;
|
smtp.port = 465;
|
||||||
smtp.tls.enable = true;
|
smtp.tls.enable = true;
|
||||||
folders.drafts = "Entwürfe";
|
folders.drafts = "Entwürfe";
|
||||||
@@ -28,31 +30,34 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
letos =
|
fu-student =
|
||||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
lib.recursiveUpdate defaults
|
||||||
{
|
|
||||||
userName = "slfletos";
|
|
||||||
address = "letos.sprachlit@hu-berlin.de";
|
|
||||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}";
|
|
||||||
imap.host = "mailbox.cms.hu-berlin.de";
|
|
||||||
imap.port = 993;
|
|
||||||
smtp.host = "mailhost.cms.hu-berlin.de";
|
|
||||||
smtp.port = 25;
|
|
||||||
smtp.tls.useStartTls = true;
|
|
||||||
};
|
|
||||||
fu =
|
|
||||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
|
||||||
(lib.recursiveUpdate fu-defaults
|
(lib.recursiveUpdate fu-defaults
|
||||||
(let userName = "meinhak99"; in {
|
rec {
|
||||||
userName = userName;
|
userName = "meinhak99";
|
||||||
address = "kieran.meinhardt@fu-berlin.de";
|
address = "kieran.meinhardt@fu-berlin.de";
|
||||||
aliases = ["${userName}@fu-berlin.de"];
|
aliases = ["${userName}@fu-berlin.de"];
|
||||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhak99.path}";
|
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 = {
|
himalaya = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.backend = "imap";
|
settings.backend = "imap";
|
||||||
};
|
};
|
||||||
}));
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -63,12 +68,6 @@ in {
|
|||||||
group = config.users.users.me.group;
|
group = config.users.users.me.group;
|
||||||
mode = "400";
|
mode = "400";
|
||||||
};
|
};
|
||||||
email-password-letos = {
|
|
||||||
file = ../secrets/email-password-letos.age;
|
|
||||||
owner = config.users.users.me.name;
|
|
||||||
group = config.users.users.me.group;
|
|
||||||
mode = "400";
|
|
||||||
};
|
|
||||||
fu-sftp-key = {
|
fu-sftp-key = {
|
||||||
file = ../secrets/fu-sftp-key.age;
|
file = ../secrets/fu-sftp-key.age;
|
||||||
owner = "root";
|
owner = "root";
|
||||||
@@ -98,7 +97,7 @@ in {
|
|||||||
firstCharacter = lib.strings.substring 0 1;
|
firstCharacter = lib.strings.substring 0 1;
|
||||||
|
|
||||||
home-directory-mount = user: {
|
home-directory-mount = user: {
|
||||||
"${pkgs.lib.niveum.remoteDir}/fu/${user}/home" = {
|
"${remoteDir}/fu/${user}/home" = {
|
||||||
device = "${user}@login.zedat.fu-berlin.de:/home/${firstCharacter user}/${user}";
|
device = "${user}@login.zedat.fu-berlin.de:/home/${firstCharacter user}/${user}";
|
||||||
fsType = "sshfs";
|
fsType = "sshfs";
|
||||||
options = [
|
options = [
|
||||||
@@ -111,31 +110,24 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in home-directory-mount "meinhak99";
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
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" ''
|
(pkgs.writers.writeDashBin "fu-vpn" ''
|
||||||
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
|
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
|
||||||
then
|
then
|
||||||
@@ -146,4 +138,16 @@ in {
|
|||||||
fi
|
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
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
55
configs/fysi.nix
Normal file
55
configs/fysi.nix
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
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,11 +5,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
programs.fzf = let
|
programs.fzf = rec {
|
||||||
defaultCommand = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
|
|
||||||
in {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultCommand = defaultCommand;
|
defaultCommand = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
|
||||||
defaultOptions = ["--height=40%"];
|
defaultOptions = ["--height=40%"];
|
||||||
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||||
changeDirWidgetOptions = [
|
changeDirWidgetOptions = [
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
{ 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,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
{
|
inherit (import ../lib) kieran ignorePaths;
|
||||||
|
in {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.mr
|
pkgs.mr
|
||||||
pkgs.gitFull
|
pkgs.gitFull
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
pkgs.gitstats
|
pkgs.gitstats
|
||||||
pkgs.patch
|
pkgs.patch
|
||||||
pkgs.patchutils
|
pkgs.patchutils
|
||||||
|
inputs.self.packages.${pkgs.system}.git-preview
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.shellAliases = {
|
environment.shellAliases = {
|
||||||
@@ -27,7 +29,9 @@
|
|||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitFull;
|
package = pkgs.gitFull;
|
||||||
settings.alias = {
|
userName = kieran.name;
|
||||||
|
userEmail = kieran.email;
|
||||||
|
aliases = {
|
||||||
br = "branch";
|
br = "branch";
|
||||||
co = "checkout";
|
co = "checkout";
|
||||||
ci = "commit";
|
ci = "commit";
|
||||||
@@ -40,13 +44,20 @@
|
|||||||
logs = "log --pretty=oneline";
|
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";
|
graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||||
};
|
};
|
||||||
ignores = pkgs.lib.niveum.ignorePaths;
|
ignores = ignorePaths;
|
||||||
settings.user.name = pkgs.lib.niveum.kieran.name;
|
extraConfig = {
|
||||||
settings.user.email = pkgs.lib.niveum.kieran.email;
|
pull.ff = "only";
|
||||||
settings.pull.ff = "only";
|
rebase.autoStash = true;
|
||||||
settings.rebase.autoStash = true;
|
merge.autoStash = true;
|
||||||
settings.merge.autoStash = true;
|
push.autoSetupRemote = true;
|
||||||
settings.push.autoSetupRemove = 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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
109
configs/i3.nix
109
configs/i3.nix
@@ -2,11 +2,18 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
niveumPackages,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
klem = pkgs.klem.override {
|
dashboard = pkgs.writers.writeDashBin "dashboard" ''
|
||||||
options.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
${pkgs.alacritty}/bin/alacritty --option font.size=4 --class dashboard --command ${pkgs.writers.writeDash "dashboard-inner" ''
|
||||||
options.scripts = {
|
exec ${pkgs.procps}/bin/watch -c -n 10 ${niveumPackages.q}/bin/q
|
||||||
|
''}
|
||||||
|
'';
|
||||||
|
inherit (import ../lib) defaultApplications;
|
||||||
|
klem = niveumPackages.klem.override {
|
||||||
|
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||||
|
config.scripts = {
|
||||||
"p.r paste" = pkgs.writers.writeDash "p.r" ''
|
"p.r paste" = pkgs.writers.writeDash "p.r" ''
|
||||||
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
|
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
|
||||||
| ${pkgs.coreutils}/bin/tail --lines=1 \
|
| ${pkgs.coreutils}/bin/tail --lines=1 \
|
||||||
@@ -35,10 +42,10 @@
|
|||||||
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
||||||
'';
|
'';
|
||||||
"ipa" = pkgs.writers.writeDash "ipa" ''
|
"ipa" = pkgs.writers.writeDash "ipa" ''
|
||||||
${pkgs.ipa}/bin/ipa
|
${niveumPackages.ipa}/bin/ipa
|
||||||
'';
|
'';
|
||||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||||
${pkgs.betacode}/bin/betacode
|
${niveumPackages.betacode}/bin/betacode
|
||||||
'';
|
'';
|
||||||
"curl" = pkgs.writers.writeDash "curl" ''
|
"curl" = pkgs.writers.writeDash "curl" ''
|
||||||
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||||
@@ -49,6 +56,12 @@
|
|||||||
emojai = pkgs.writers.writeDash "emojai" ''
|
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
|
${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 {
|
in {
|
||||||
@@ -73,20 +86,15 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
programs.slock.enable = true;
|
||||||
pkgs.xsecurelock
|
|
||||||
];
|
environment.systemPackages = [dashboard];
|
||||||
environment.sessionVariables = {
|
|
||||||
XSECURELOCK_NO_COMPOSITE = "1";
|
|
||||||
XSECURELOCK_BACKGROUND_COLOR = "navy";
|
|
||||||
XSECURELOCK_PASSWORD_PROMPT = "time_hex";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.displayManager.defaultSession = "none+i3";
|
services.displayManager.defaultSession = "none+i3";
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
windowManager.i3 = {
|
windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.i3;
|
package = pkgs.i3-gaps;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -122,12 +130,12 @@ in {
|
|||||||
titlebar = false;
|
titlebar = false;
|
||||||
border = 1;
|
border = 1;
|
||||||
};
|
};
|
||||||
bars = let position = "bottom"; in [
|
bars = [
|
||||||
(lib.recursiveUpdate config.home-manager.users.me.stylix.targets.i3.exportedBarConfig
|
(config.home-manager.users.me.lib.stylix.i3.bar
|
||||||
{
|
// rec {
|
||||||
workspaceButtons = true;
|
workspaceButtons = true;
|
||||||
mode = "hide"; # "dock";
|
mode = "hide"; # "dock";
|
||||||
inherit position;
|
position = "bottom";
|
||||||
statusCommand = toString (pkgs.writers.writeDash "i3status-rust" ''
|
statusCommand = toString (pkgs.writers.writeDash "i3status-rust" ''
|
||||||
export I3RS_GITHUB_TOKEN="$(cat ${config.age.secrets.github-token-i3status-rust.path})"
|
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})"
|
export OPENWEATHERMAP_API_KEY="$(cat ${config.age.secrets.openweathermap-api-key.path})"
|
||||||
@@ -216,15 +224,15 @@ in {
|
|||||||
"${modifier}+w" = "layout tabbed";
|
"${modifier}+w" = "layout tabbed";
|
||||||
"${modifier}+q" = "exec ${config.services.clipmenu.package}/bin/clipmenu";
|
"${modifier}+q" = "exec ${config.services.clipmenu.package}/bin/clipmenu";
|
||||||
|
|
||||||
"${modifier}+Return" = "exec ${lib.getExe pkgs.niveum-terminal}";
|
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
||||||
"${modifier}+t" = "exec ${lib.getExe pkgs.niveum-filemanager}";
|
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
|
||||||
"${modifier}+y" = "exec ${lib.getExe pkgs.niveum-browser}";
|
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
|
||||||
|
|
||||||
"${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec rofi -modi run,ssh,window -show run''}";
|
"${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec rofi -modi run,ssh,window -show run''}";
|
||||||
"${modifier}+Shift+d" = "exec ${pkgs.notemenu}/bin/notemenu";
|
"${modifier}+Shift+d" = "exec ${niveumPackages.notemenu}/bin/notemenu";
|
||||||
"${modifier}+p" = "exec rofi-pass";
|
"${modifier}+p" = "exec rofi-pass";
|
||||||
"${modifier}+Shift+p" = "exec rofi-pass --insert";
|
"${modifier}+Shift+p" = "exec rofi-pass --insert";
|
||||||
"${modifier}+u" = "exec ${pkgs.unicodmenu}/bin/unicodmenu";
|
"${modifier}+u" = "exec ${niveumPackages.unicodmenu}/bin/unicodmenu";
|
||||||
"${modifier}+Shift+u" = "exec ${pkgs.writers.writeDash "last-unicode" ''${pkgs.xdotool}/bin/xdotool type --delay 1000 "$(${pkgs.gawk}/bin/awk 'END{print $1}' ~/.cache/unicodmenu)"''}";
|
"${modifier}+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" ''
|
"${modifier}+F7" = "exec ${pkgs.writers.writeDash "showkeys-toggle" ''
|
||||||
@@ -244,6 +252,7 @@ in {
|
|||||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||||
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
|
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
|
||||||
|
"XF86ScreenSaver" = "exec ${niveumPackages.k-lock}/bin/k-lock";
|
||||||
|
|
||||||
# key names detected with xorg.xev:
|
# key names detected with xorg.xev:
|
||||||
# XF86WakeUp (fn twice)
|
# XF86WakeUp (fn twice)
|
||||||
@@ -260,12 +269,37 @@ in {
|
|||||||
# XF86Launch1 (thinkvantage)
|
# XF86Launch1 (thinkvantage)
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
stylix.targets.i3.enable = true;
|
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";}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
bindsym --release ${modifier}+Shift+w exec xsecurelock
|
bindsym --release ${modifier}+Shift+w exec /run/wrappers/bin/slock
|
||||||
|
|
||||||
exec "${pkgs.obsidian}/bin/obsidian"
|
exec "${pkgs.obsidian}/bin/obsidian"
|
||||||
for_window [class="obsidian"] , move scratchpad
|
for_window [class="obsidian"] , move scratchpad
|
||||||
@@ -274,11 +308,23 @@ in {
|
|||||||
exec "${pkgs.writers.writeDash "irc" "exec ${pkgs.alacritty}/bin/alacritty --class message -e ssh weechat@makanek -t tmux attach-session -t IM"}"
|
exec "${pkgs.writers.writeDash "irc" "exec ${pkgs.alacritty}/bin/alacritty --class message -e ssh weechat@makanek -t tmux attach-session -t IM"}"
|
||||||
exec "${pkgs.writers.writeDash "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}"
|
exec "${pkgs.writers.writeDash "email" "exec ${pkgs.alacritty}/bin/alacritty --class message -e aerc"}"
|
||||||
|
|
||||||
exec --no-startup-id ${pkgs.xss-lock}/bin/xss-lock -- xsecurelock
|
assign [class="dashboard"] ${infoWorkspace}
|
||||||
|
exec ${dashboard}/bin/dashboard
|
||||||
'';
|
'';
|
||||||
config = {
|
config = lib.mkMerge [
|
||||||
inherit modifier gaps modes bars floating window colors;
|
{
|
||||||
keybindings = keybindings // {
|
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/=";
|
||||||
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
|
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
|
||||||
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
|
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
|
||||||
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
||||||
@@ -286,9 +332,10 @@ in {
|
|||||||
"Print" = "exec flameshot gui";
|
"Print" = "exec flameshot gui";
|
||||||
# "${modifier}+Shift+x" = "exec ${move-to-new-workspace}";
|
# "${modifier}+Shift+x" = "exec ${move-to-new-workspace}";
|
||||||
# "${modifier}+x" = "exec ${new-workspace}";
|
# "${modifier}+x" = "exec ${new-workspace}";
|
||||||
"XF86Display" = "exec ${pkgs.dmenu-randr}/bin/dmenu-randr";
|
"XF86Display" = "exec ${niveumPackages.dmenu-randr}/bin/dmenu-randr";
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
98
configs/keyboard.nix
Normal file
98
configs/keyboard.nix
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
|
||||||
|
commaSep = builtins.concatStringsSep ",";
|
||||||
|
xkbOptions = ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
|
||||||
|
languages = {
|
||||||
|
arabic = { code = "ara"; variant = "buckwalter"; }; # ../lib/keyboards/arabic;
|
||||||
|
avestan = ../lib/keyboards/avestan;
|
||||||
|
coptic = ../lib/keyboards/coptic;
|
||||||
|
deutsch = { code = "de"; variant = "T3"; };
|
||||||
|
farsi = { code = "ir"; variant = "qwerty"; };
|
||||||
|
gothic = ../lib/keyboards/gothic;
|
||||||
|
greek = { code = "gr"; variant = "polytonic"; };
|
||||||
|
gujarati = {code = "in"; variant = "guj-kagapa"; };
|
||||||
|
hebrew = {code = "il"; variant = "phonetic";};
|
||||||
|
russian = { code = "ru"; variant = "phonetic"; };
|
||||||
|
sanskrit = { code = "in"; variant = "san-kagapa"; };
|
||||||
|
syriac = { code = "sy"; variant = "syc_phonetic"; };
|
||||||
|
urdu = {code = "in"; variant = "urd-phonetic"; };
|
||||||
|
};
|
||||||
|
defaultLanguage = languages.deutsch;
|
||||||
|
in {
|
||||||
|
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.extraLayouts = {
|
||||||
|
"coptic" = {
|
||||||
|
languages = ["cop"];
|
||||||
|
description = "Coptic";
|
||||||
|
symbolsFile = ../lib/keyboards/coptic;
|
||||||
|
};
|
||||||
|
"gothic" = {
|
||||||
|
languages = ["got"];
|
||||||
|
description = "Gothic";
|
||||||
|
symbolsFile = ../lib/keyboards/gothic;
|
||||||
|
};
|
||||||
|
"avestan" = {
|
||||||
|
languages = ["ave"];
|
||||||
|
description = "Avestan";
|
||||||
|
symbolsFile = ../lib/keyboards/avestan;
|
||||||
|
};
|
||||||
|
"farsi-good" = {
|
||||||
|
languages = ["fas"];
|
||||||
|
description = "Farsi, but good";
|
||||||
|
symbolsFile = ../lib/keyboards/farsi;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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 ++
|
||||||
|
lib.mapAttrsToList
|
||||||
|
(language: settings:
|
||||||
|
let
|
||||||
|
code = if settings ? "code" then settings.code else language;
|
||||||
|
variant = if settings ? "variant" then settings.variant else "";
|
||||||
|
in
|
||||||
|
pkgs.writers.writeDashBin "kb-niri-${language}" ''
|
||||||
|
${pkgs.gnused}/bin/sed -i 's/^\(\s*layout\) ".*"$/\1 "${defaultLanguage.code},${code}"/;s/^\(\s*variant\) ".*"$/\1 "${defaultLanguage.variant},${variant}"/' ~/.config/niri/config.kdl
|
||||||
|
'') languages;
|
||||||
|
|
||||||
|
# improve held key rate
|
||||||
|
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
||||||
|
|
||||||
|
systemd.user.services.gxkb = {
|
||||||
|
wantedBy = ["graphical-session.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
SyslogIdentifier = "gxkb";
|
||||||
|
ExecStart = "${pkgs.gxkb}/bin/gxkb";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = "15s";
|
||||||
|
StartLimitBurst = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,139 +0,0 @@
|
|||||||
{
|
|
||||||
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,6 +10,11 @@
|
|||||||
username = "kieran";
|
username = "kieran";
|
||||||
passwordFile = config.age.secrets.nextcloud-password-kieran.path;
|
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 {
|
in {
|
||||||
age.secrets = {
|
age.secrets = {
|
||||||
nextcloud-password-kieran = {
|
nextcloud-password-kieran = {
|
||||||
|
|||||||
@@ -2,9 +2,10 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
niveumPackages,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||||
in {
|
in {
|
||||||
environment.shellAliases.smpv = swallow "mpv";
|
environment.shellAliases.smpv = swallow "mpv";
|
||||||
|
|
||||||
@@ -35,8 +36,8 @@ in {
|
|||||||
"Alt+j" = "add video-pan-y -0.05";
|
"Alt+j" = "add video-pan-y -0.05";
|
||||||
};
|
};
|
||||||
scripts = [
|
scripts = [
|
||||||
pkgs.mpvScripts.quality-menu
|
# pkgs.mpvScripts.quality-menu
|
||||||
pkgs.mpvScripts.visualizer
|
niveumPackages.mpv-visualizer
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
{ lib, pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
myceliumAddresses = import ../lib/mycelium-network.nix;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.mycelium = {
|
services.mycelium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -8,5 +11,5 @@
|
|||||||
networking.hosts = lib.mapAttrs' (name: address: {
|
networking.hosts = lib.mapAttrs' (name: address: {
|
||||||
name = address;
|
name = address;
|
||||||
value = [ "${name}.m" ];
|
value = [ "${name}.m" ];
|
||||||
}) pkgs.lib.niveum.myceliumAddresses;
|
}) myceliumAddresses;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
niveumPackages,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
vim-kmein = (pkgs.vim-kmein.override {
|
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
|
||||||
# stylixColors = config.lib.stylix.colors;
|
environment.shellAliases.vi = "nvim";
|
||||||
colorscheme = "base16-gruvbox-dark-medium";
|
environment.shellAliases.vim = "nvim";
|
||||||
});
|
|
||||||
in {
|
|
||||||
environment.variables.EDITOR = lib.getExe vim-kmein;
|
|
||||||
environment.shellAliases.view = "nvim -R";
|
environment.shellAliases.view = "nvim -R";
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
@@ -38,22 +35,24 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.vim-typewriter
|
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
||||||
vim-kmein
|
(niveumPackages.vim.override {
|
||||||
|
stylixColors = config.lib.stylix.colors;
|
||||||
|
# colorscheme = "base16-gruvbox-light-medium";
|
||||||
|
})
|
||||||
|
|
||||||
# language servers
|
# language servers
|
||||||
pkgs.pyright
|
pkgs.pyright
|
||||||
pkgs.haskellPackages.haskell-language-server
|
pkgs.haskellPackages.haskell-language-server
|
||||||
pkgs.texlab
|
pkgs.texlab
|
||||||
pkgs.nil
|
pkgs.nil
|
||||||
pkgs.gopls
|
|
||||||
pkgs.nixfmt-rfc-style
|
pkgs.nixfmt-rfc-style
|
||||||
pkgs.rust-analyzer
|
pkgs.rust-analyzer
|
||||||
pkgs.nodePackages.typescript-language-server
|
pkgs.nodePackages.typescript-language-server
|
||||||
pkgs.lua-language-server
|
pkgs.lua-language-server
|
||||||
pkgs.nodePackages.vscode-langservers-extracted
|
pkgs.nodePackages.vscode-langservers-extracted
|
||||||
pkgs.lemminx # XML LSP
|
pkgs.lemminx
|
||||||
pkgs.jq-lsp
|
niveumPackages.jq-lsp
|
||||||
pkgs.dhall-lsp-server
|
pkgs.dhall-lsp-server
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
46
configs/neovim.sync-conflict-20250130-092404-AJVBWR2.nix
Normal file
46
configs/neovim.sync-conflict-20250130-092404-AJVBWR2.nix
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
{ pkgs, niveumPackages, config, ... }: {
|
||||||
|
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
|
||||||
|
environment.shellAliases.vi = "nvim";
|
||||||
|
environment.shellAliases.vim = "nvim";
|
||||||
|
environment.shellAliases.view = "nvim -R";
|
||||||
|
|
||||||
|
home-manager.users.me = {
|
||||||
|
editorconfig = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
"*" = {
|
||||||
|
charset = "utf-8";
|
||||||
|
end_of_line = "lf";
|
||||||
|
trim_trailing_whitespace = true;
|
||||||
|
insert_final_newline = true;
|
||||||
|
indent_style = "space";
|
||||||
|
indent_size = 2;
|
||||||
|
};
|
||||||
|
"*.py" = { indent_size = 4; };
|
||||||
|
Makefile = { indent_style = "tab"; };
|
||||||
|
"*.md" = { trim_trailing_whitespace = false; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
||||||
|
(niveumPackages.vim.override {
|
||||||
|
stylixColors = config.lib.stylix.colors;
|
||||||
|
# colorscheme = "base16-gruvbox-dark-medium";
|
||||||
|
})
|
||||||
|
|
||||||
|
# language servers
|
||||||
|
pkgs.pyright
|
||||||
|
pkgs.haskellPackages.haskell-language-server
|
||||||
|
pkgs.texlab
|
||||||
|
pkgs.nil
|
||||||
|
pkgs.rust-analyzer
|
||||||
|
pkgs.nodePackages.typescript-language-server
|
||||||
|
pkgs.lua-language-server
|
||||||
|
pkgs.nodePackages.vscode-langservers-extracted
|
||||||
|
pkgs.lemminx
|
||||||
|
niveumPackages.jq-lsp
|
||||||
|
pkgs.dhall-lsp-server
|
||||||
|
];
|
||||||
|
}
|
||||||
445
configs/niri.nix
Normal file
445
configs/niri.nix
Normal file
@@ -0,0 +1,445 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
niveumPackages,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (import ../lib) defaultApplications;
|
||||||
|
niriConfig =
|
||||||
|
let
|
||||||
|
klem = niveumPackages.klem.override {
|
||||||
|
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||||
|
config.scripts = {
|
||||||
|
"p.r paste" = pkgs.writers.writeDash "p.r" ''
|
||||||
|
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
|
||||||
|
| ${pkgs.coreutils}/bin/tail --lines=1 \
|
||||||
|
| ${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'
|
||||||
|
'';
|
||||||
|
"envs.sh paste" = pkgs.writers.writeDash "envs-host" ''
|
||||||
|
${pkgs.curl}/bin/curl -F "file=@-" https://envs.sh
|
||||||
|
'';
|
||||||
|
"envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" ''
|
||||||
|
${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh
|
||||||
|
'';
|
||||||
|
"go.r shorten" = pkgs.writers.writeDash "go.r" ''
|
||||||
|
${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)"
|
||||||
|
'';
|
||||||
|
"4d2.org paste" = pkgs.writers.writeDash "4d2-paste" ''
|
||||||
|
${pkgs.curl}/bin/curl -F "file=@-" https://depot.4d2.org/
|
||||||
|
'';
|
||||||
|
"0x0.st shorten" = pkgs.writers.writeDash "0x0.st" ''
|
||||||
|
${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)"
|
||||||
|
'';
|
||||||
|
"rot13" = pkgs.writers.writeDash "rot13" ''
|
||||||
|
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
||||||
|
'';
|
||||||
|
"ipa" = pkgs.writers.writeDash "ipa" ''
|
||||||
|
${niveumPackages.ipa}/bin/ipa
|
||||||
|
'';
|
||||||
|
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||||
|
${niveumPackages.betacode}/bin/betacode
|
||||||
|
'';
|
||||||
|
"curl" = pkgs.writers.writeDash "curl" ''
|
||||||
|
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||||
|
'';
|
||||||
|
ocr = pkgs.writers.writeDash "ocr" ''
|
||||||
|
${pkgs.tesseract4}/bin/tesseract -l eng+deu - stdout
|
||||||
|
'';
|
||||||
|
emojai = pkgs.writers.writeDash "emojai" ''
|
||||||
|
${pkgs.curl}/bin/curl https://www.emojai.app/api/generate -X POST -H 'Content-Type: application/json' --data-raw "$(${pkgs.jq}/bin/jq -sR '{emoji:.}')" | ${pkgs.jq}/bin/jq -r .result
|
||||||
|
'';
|
||||||
|
"gpt-3.5" = pkgs.writers.writeDash "gpt" ''
|
||||||
|
${niveumPackages.gpt35}/bin/gpt
|
||||||
|
'';
|
||||||
|
gpt-4 = pkgs.writers.writeDash "gpt" ''
|
||||||
|
${niveumPackages.gpt4}/bin/gpt
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
''
|
||||||
|
spawn-at-startup "${pkgs.ironbar}/bin/ironbar"
|
||||||
|
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
|
||||||
|
|
||||||
|
environment {
|
||||||
|
DISPLAY ":0"
|
||||||
|
ANKI_WAYLAND "1"
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
warp-mouse-to-focus
|
||||||
|
focus-follows-mouse max-scroll-amount="0%"
|
||||||
|
|
||||||
|
keyboard {
|
||||||
|
repeat-rate 35
|
||||||
|
repeat-delay 350
|
||||||
|
track-layout "global"
|
||||||
|
|
||||||
|
xkb {
|
||||||
|
layout "de"
|
||||||
|
variant "T3"
|
||||||
|
options "ctrl:nocaps,compose:caps,grp:ctrls_toggle"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
touchpad {
|
||||||
|
click-method "clickfinger"
|
||||||
|
tap
|
||||||
|
dwt
|
||||||
|
dwtp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prefer-no-csd
|
||||||
|
|
||||||
|
hotkey-overlay {
|
||||||
|
skip-at-startup
|
||||||
|
}
|
||||||
|
|
||||||
|
layout {
|
||||||
|
gaps 5
|
||||||
|
|
||||||
|
default-column-width {
|
||||||
|
proportion 0.5
|
||||||
|
}
|
||||||
|
|
||||||
|
preset-column-widths {
|
||||||
|
proportion 0.33333
|
||||||
|
proportion 0.5
|
||||||
|
proportion 0.66667
|
||||||
|
}
|
||||||
|
|
||||||
|
focus-ring {
|
||||||
|
width 2
|
||||||
|
}
|
||||||
|
|
||||||
|
shadow {
|
||||||
|
// on
|
||||||
|
softness 30
|
||||||
|
spread 5
|
||||||
|
offset x=0 y=5
|
||||||
|
draw-behind-window true
|
||||||
|
color "#00000070"
|
||||||
|
// inactive-color "#00000054"
|
||||||
|
}
|
||||||
|
|
||||||
|
tab-indicator {
|
||||||
|
// off
|
||||||
|
hide-when-single-tab
|
||||||
|
place-within-column
|
||||||
|
gap 5
|
||||||
|
width 4
|
||||||
|
length total-proportion=1.0
|
||||||
|
position "right"
|
||||||
|
gaps-between-tabs 2
|
||||||
|
corner-radius 8
|
||||||
|
active-color "red"
|
||||||
|
inactive-color "gray"
|
||||||
|
urgent-color "blue"
|
||||||
|
// active-gradient from="#80c8ff" to="#bbddff" angle=45
|
||||||
|
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
|
||||||
|
// urgent-gradient from="#800" to="#a33" angle=45
|
||||||
|
}
|
||||||
|
|
||||||
|
border {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
animations {
|
||||||
|
// off
|
||||||
|
workspace-switch {
|
||||||
|
spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001
|
||||||
|
}
|
||||||
|
|
||||||
|
window-open {
|
||||||
|
duration-ms 150
|
||||||
|
curve "ease-out-expo"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-close {
|
||||||
|
duration-ms 150
|
||||||
|
curve "ease-out-quad"
|
||||||
|
}
|
||||||
|
|
||||||
|
horizontal-view-movement {
|
||||||
|
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
|
||||||
|
}
|
||||||
|
|
||||||
|
window-movement {
|
||||||
|
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
|
||||||
|
}
|
||||||
|
|
||||||
|
window-resize {
|
||||||
|
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
|
||||||
|
}
|
||||||
|
|
||||||
|
config-notification-open-close {
|
||||||
|
spring damping-ratio=0.6 stiffness=1000 epsilon=0.001
|
||||||
|
}
|
||||||
|
|
||||||
|
screenshot-ui-open {
|
||||||
|
duration-ms 200
|
||||||
|
curve "ease-out-quad"
|
||||||
|
}
|
||||||
|
|
||||||
|
overview-open-close {
|
||||||
|
spring damping-ratio=1.0 stiffness=800 epsilon=0.0001
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
geometry-corner-radius 0
|
||||||
|
clip-to-geometry true
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match app-id="mpv"
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id="rofi"
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
||||||
|
open-floating true
|
||||||
|
default-floating-position x=32 y=32 relative-to="bottom-left"
|
||||||
|
}
|
||||||
|
|
||||||
|
window-rule {
|
||||||
|
match is-window-cast-target=true
|
||||||
|
|
||||||
|
border {
|
||||||
|
on
|
||||||
|
width 3
|
||||||
|
active-color "#f38ba8"
|
||||||
|
inactive-color "#7d0d2d"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binds {
|
||||||
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||||
|
Mod+Return { spawn "${(defaultApplications pkgs).terminal}"; }
|
||||||
|
Mod+D { spawn "${pkgs.wofi}/bin/wofi" "--show" "run"; }
|
||||||
|
Mod+Shift+D { spawn "${niveumPackages.notemenu}/bin/notemenu"; }
|
||||||
|
Mod+T { spawn "${(defaultApplications pkgs).fileManager}"; }
|
||||||
|
Mod+Y { spawn "${(defaultApplications pkgs).browser}"; }
|
||||||
|
Mod+P { spawn "${niveumPackages.passmenu}/bin/passmenu"; }
|
||||||
|
Mod+U { spawn "${niveumPackages.unicodmenu}/bin/unicodmenu"; }
|
||||||
|
Mod+Shift+Z { toggle-window-floating; }
|
||||||
|
|
||||||
|
Mod+B { spawn "${pkgs.ironbar}/bin/ironbar" "bar" "bar-1337" "toggle-visible"; }
|
||||||
|
Mod+F12 { spawn "${klem}/bin/klem"; }
|
||||||
|
|
||||||
|
Mod+Shift+Q { close-window; }
|
||||||
|
|
||||||
|
XF86AudioRaiseVolume allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -i 5"; }
|
||||||
|
XF86AudioLowerVolume allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -d 5"; }
|
||||||
|
XF86AudioMute allow-when-locked=true { spawn "${pkgs.pamixer}/bin/pamixer -t"; }
|
||||||
|
|
||||||
|
XF86AudioPause allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl play-pause"; }
|
||||||
|
XF86AudioPlay allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl play-pause"; }
|
||||||
|
XF86AudioNext allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl next"; }
|
||||||
|
XF86AudioPrev allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl previous"; }
|
||||||
|
XF86AudioStop allow-when-locked=true { spawn "${pkgs.playerctl}/bin/playerctl stop"; }
|
||||||
|
Print { spawn "flameshot gui"; }
|
||||||
|
Mod+Shift+W { spawn "swaylock"; }
|
||||||
|
|
||||||
|
Mod+Comma { consume-or-expel-window-left; }
|
||||||
|
Mod+Period { consume-or-expel-window-right; }
|
||||||
|
Mod+W { toggle-column-tabbed-display; }
|
||||||
|
Mod+A repeat=false { toggle-overview; }
|
||||||
|
Mod+F { maximize-column; }
|
||||||
|
Mod+C { center-column; }
|
||||||
|
Mod+Minus { set-column-width "-25%"; }
|
||||||
|
Mod+Plus { set-column-width "+25%"; }
|
||||||
|
|
||||||
|
Mod+Ctrl+0 { spawn "niri" "msg" "action" "switch-layout" "0"; }
|
||||||
|
Mod+Ctrl+1 { spawn "niri" "msg" "action" "switch-layout" "1"; }
|
||||||
|
Mod+Ctrl+2 { spawn "niri" "msg" "action" "switch-layout" "2"; }
|
||||||
|
Mod+Ctrl+3 { spawn "niri" "msg" "action" "switch-layout" "3"; }
|
||||||
|
Mod+Ctrl+4 { spawn "niri" "msg" "action" "switch-layout" "4"; }
|
||||||
|
Mod+Ctrl+5 { spawn "niri" "msg" "action" "switch-layout" "5"; }
|
||||||
|
Mod+Ctrl+6 { spawn "niri" "msg" "action" "switch-layout" "6"; }
|
||||||
|
Mod+Ctrl+7 { spawn "niri" "msg" "action" "switch-layout" "7"; }
|
||||||
|
Mod+Ctrl+8 { spawn "niri" "msg" "action" "switch-layout" "8"; }
|
||||||
|
Mod+Ctrl+9 { spawn "niri" "msg" "action" "switch-layout" "9"; }
|
||||||
|
|
||||||
|
Mod+H { focus-column-or-monitor-left; }
|
||||||
|
Mod+J { focus-window-or-workspace-down; }
|
||||||
|
Mod+K { focus-window-or-workspace-up; }
|
||||||
|
Mod+L { focus-column-or-monitor-right; }
|
||||||
|
|
||||||
|
Mod+Shift+H { move-column-left-or-to-monitor-left; }
|
||||||
|
Mod+Shift+J { move-window-down-or-to-workspace-down; }
|
||||||
|
Mod+Shift+K { move-window-up-or-to-workspace-up; }
|
||||||
|
Mod+Shift+L { move-column-right-or-to-monitor-right; }
|
||||||
|
|
||||||
|
Mod+Ctrl+H { focus-monitor-left; }
|
||||||
|
Mod+Ctrl+J { focus-monitor-down; }
|
||||||
|
Mod+Ctrl+K { focus-monitor-up; }
|
||||||
|
Mod+Ctrl+L { focus-monitor-right; }
|
||||||
|
|
||||||
|
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||||
|
Mod+Shift+Ctrl+J { move-column-to-workspace-down; }
|
||||||
|
Mod+Shift+Ctrl+K { move-column-to-workspace-up; }
|
||||||
|
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||||
|
|
||||||
|
Mod+Shift+Alt+Ctrl+H { move-workspace-to-monitor-left; }
|
||||||
|
Mod+Shift+Alt+Ctrl+J { move-workspace-down; }
|
||||||
|
Mod+Shift+Alt+Ctrl+K { move-workspace-up; }
|
||||||
|
Mod+Shift+Alt+Ctrl+L { move-workspace-to-monitor-right; }
|
||||||
|
|
||||||
|
Mod+1 { focus-workspace 1; }
|
||||||
|
Mod+2 { focus-workspace 2; }
|
||||||
|
Mod+3 { focus-workspace 3; }
|
||||||
|
Mod+4 { focus-workspace 4; }
|
||||||
|
Mod+5 { focus-workspace 5; }
|
||||||
|
Mod+6 { focus-workspace 6; }
|
||||||
|
Mod+7 { focus-workspace 7; }
|
||||||
|
Mod+8 { focus-workspace 8; }
|
||||||
|
Mod+9 { focus-workspace 9; }
|
||||||
|
Mod+0 { focus-workspace 10; }
|
||||||
|
|
||||||
|
Mod+Shift+1 { move-window-to-workspace "1"; }
|
||||||
|
Mod+Shift+2 { move-window-to-workspace "2"; }
|
||||||
|
Mod+Shift+3 { move-window-to-workspace "3"; }
|
||||||
|
Mod+Shift+4 { move-window-to-workspace "4"; }
|
||||||
|
Mod+Shift+5 { move-window-to-workspace "5"; }
|
||||||
|
Mod+Shift+6 { move-window-to-workspace "6"; }
|
||||||
|
Mod+Shift+7 { move-window-to-workspace "7"; }
|
||||||
|
Mod+Shift+8 { move-window-to-workspace "8"; }
|
||||||
|
Mod+Shift+9 { move-window-to-workspace "9"; }
|
||||||
|
Mod+Shift+0 { move-window-to-workspace "0"; }
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
system.activationScripts.niriConfig = {
|
||||||
|
text = ''
|
||||||
|
cp ${pkgs.writeText "config.kdl" niriConfig} ${config.users.users.me.home}/.config/niri/config.kdl
|
||||||
|
chown ${config.users.users.me.name}:${config.users.users.me.group} ${config.users.users.me.home}/.config/niri/config.kdl
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.niri.enable = true;
|
||||||
|
services.displayManager.defaultSession = lib.mkForce "niri";
|
||||||
|
home-manager.users.me = {
|
||||||
|
xdg.configFile."ironbar/style.css".text = ''
|
||||||
|
* {
|
||||||
|
font-size: 8pt;
|
||||||
|
font-family: "Gentium Plus", "BlexMono Nerd Font";
|
||||||
|
}
|
||||||
|
|
||||||
|
box, menubar, button {
|
||||||
|
background-color: unset;
|
||||||
|
box-shadow: none;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clock, .upower, .volume {
|
||||||
|
font-weight: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip * {
|
||||||
|
font-family: "BlexMono Nerd Font";
|
||||||
|
font-size: 7pt;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
xdg.configFile."ironbar/config.json".source = (pkgs.formats.json { }).generate "ironbar.json" {
|
||||||
|
name = "bar-1337";
|
||||||
|
height = 12;
|
||||||
|
layer = "top";
|
||||||
|
position = "bottom";
|
||||||
|
start = [ ];
|
||||||
|
center = [
|
||||||
|
{
|
||||||
|
type = "tray";
|
||||||
|
icon_size = 8;
|
||||||
|
}
|
||||||
|
{ type = "clipboard"; }
|
||||||
|
{ type = "notifications"; }
|
||||||
|
];
|
||||||
|
end = [
|
||||||
|
{
|
||||||
|
type = "upower";
|
||||||
|
icon_size = 8;
|
||||||
|
format = "{percentage}%";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "label";
|
||||||
|
tooltip = "{{df -h --output=size,used,avail,pcent,target}}";
|
||||||
|
label = "\t{{5000:df -h / --output=avail | tail +2}}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "label";
|
||||||
|
tooltip = "{{free -Lh --si | awk '{for(i=1;i<=NF;i++){printf \"%s%s\", $i, (i%2? OFS: ORS)} if(NF%2) printf ORS}'}}";
|
||||||
|
label = "\t{{500:free -h --si | awk 'NR==2{printf $3 \"\\n\"}'}}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "label";
|
||||||
|
tooltip = "{{}}";
|
||||||
|
on_click_left = "pamixer -t";
|
||||||
|
on_scroll_up = "pamixer -i 1";
|
||||||
|
on_scroll_down = "pamixer -d 1";
|
||||||
|
label = "{{500:if $(pamixer --get-mute) = true; then echo ; else echo ; fi}}\t{{500:pamixer --get-volume}}%";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "label";
|
||||||
|
tooltip = "{{uptime}}";
|
||||||
|
label = "\t{{500:uptime | sed 's/.*load average: \\([^ ]*\\);.*/\\1/' | tr ' ' '\n'}}";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "label";
|
||||||
|
tooltip = "{{khal list today today -d astro-test-3 }}";
|
||||||
|
label = "";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "label";
|
||||||
|
tooltip = "{{curl wttr.in/?0 | ${pkgs.ansifilter}/bin/ansifilter}}";
|
||||||
|
label = "";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "label";
|
||||||
|
name = "cal";
|
||||||
|
tooltip = "{{cal}}";
|
||||||
|
label = "{{500:date +'<U+F017>\t%Y-%m-%d (%W %a) %H:%M'}}";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs.alacritty.enable = true; # Super+T in the default setting (terminal)
|
||||||
|
programs.swaylock.enable = true; # Super+Alt+L in the default setting (screen locker)
|
||||||
|
services.swaync = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
notification-window-width = 300;
|
||||||
|
control-center-width = 300;
|
||||||
|
widgets = [
|
||||||
|
"volume"
|
||||||
|
"mpris"
|
||||||
|
"title"
|
||||||
|
"dnd"
|
||||||
|
"notifications"
|
||||||
|
];
|
||||||
|
widget-config = {
|
||||||
|
title = {
|
||||||
|
text = "ⲡⲧⲏⲣϥ̄";
|
||||||
|
"clear-all-button" = true;
|
||||||
|
"button-text" = "ⲧⲁⲩⲟⲟⲩ";
|
||||||
|
};
|
||||||
|
dnd.text = "ⲙ̄ⲡⲣ̄ϣⲧⲣ̄ⲧⲱⲣⲧ̄";
|
||||||
|
label.text = "ⲧⲙⲏⲧⲉ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.swayidle.enable = true; # idle management daemon
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
xdg-desktop-portal-gnome
|
||||||
|
swaybg
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.gnome.gnome-keyring.enable = true; # secret service
|
||||||
|
security.pam.services.swaylock = { };
|
||||||
|
}
|
||||||
@@ -3,10 +3,14 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
|
niveumPackages,
|
||||||
|
unstablePackages,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
worldradio = pkgs.callPackage ../packages/worldradio.nix {};
|
worldradio = pkgs.callPackage ../packages/worldradio.nix {};
|
||||||
|
|
||||||
|
externalNetwork = import ../lib/external-network.nix;
|
||||||
|
|
||||||
zoteroStyle = {
|
zoteroStyle = {
|
||||||
name,
|
name,
|
||||||
sha256,
|
sha256,
|
||||||
@@ -59,15 +63,9 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
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
|
# INTERNET
|
||||||
aria2
|
aria2
|
||||||
telegram-desktop
|
tdesktop
|
||||||
whois
|
whois
|
||||||
dnsutils
|
dnsutils
|
||||||
# FILE MANAGERS
|
# FILE MANAGERS
|
||||||
@@ -96,17 +94,16 @@ in {
|
|||||||
# HARDWARE TOOLS
|
# HARDWARE TOOLS
|
||||||
gnome-disk-utility
|
gnome-disk-utility
|
||||||
arandr # xrandr for noobs
|
arandr # xrandr for noobs
|
||||||
wdisplays
|
|
||||||
libnotify # for notify-send
|
libnotify # for notify-send
|
||||||
xclip # clipboard CLI
|
wl-clipboard # clipboard CLI
|
||||||
dragon-drop # drag and drop
|
xdragon # drag and drop
|
||||||
xorg.xkill # kill by clicking
|
xorg.xkill # kill by clicking
|
||||||
portfolio # personal finance overview
|
portfolio # personal finance overview
|
||||||
audacity
|
audacity
|
||||||
calibre
|
calibre
|
||||||
electrum
|
electrum
|
||||||
inkscape
|
inkscape
|
||||||
gimp
|
niveumPackages.gimp
|
||||||
gthumb
|
gthumb
|
||||||
astrolog
|
astrolog
|
||||||
obsidian
|
obsidian
|
||||||
@@ -117,69 +114,73 @@ in {
|
|||||||
zoom-us # video conferencing
|
zoom-us # video conferencing
|
||||||
(pkgs.writers.writeDashBin "im" ''
|
(pkgs.writers.writeDashBin "im" ''
|
||||||
weechat_password=$(${pkgs.pass}/bin/pass weechat)
|
weechat_password=$(${pkgs.pass}/bin/pass weechat)
|
||||||
exec ${weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${pkgs.lib.niveum.systems.makanek.externalIp}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
exec ${unstablePackages.weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${externalNetwork.makanek}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
||||||
'')
|
'')
|
||||||
alejandra # nix formatter
|
alejandra # nix formatter
|
||||||
pdfgrep # search in pdf
|
pdfgrep # search in pdf
|
||||||
pdftk # pdf toolkit
|
pdftk # pdf toolkit
|
||||||
mupdf
|
mupdf
|
||||||
poppler-utils # pdf toolkit
|
poppler_utils # pdf toolkit
|
||||||
kdePackages.okular # the word is nucular
|
kdePackages.okular # the word is nucular
|
||||||
xournalpp # for annotating pdfs
|
xournalpp # for annotating pdfs
|
||||||
pdfpc # presenter console for pdf slides
|
pdfpc # presenter console for pdf slides
|
||||||
hc # print files as qr codes
|
# niveumPackages.hc # print files as qr codes
|
||||||
yt-dlp
|
yt-dlp
|
||||||
espeak
|
espeak
|
||||||
rink # unit converter
|
rink # unit converter
|
||||||
auc
|
niveumPackages.auc
|
||||||
noise-waves
|
niveumPackages.noise-waves
|
||||||
stag
|
niveumPackages.cheat-sh
|
||||||
cheat-sh
|
niveumPackages.polyglot
|
||||||
polyglot
|
niveumPackages.qrpaste
|
||||||
qrpaste
|
niveumPackages.ttspaste
|
||||||
ttspaste
|
niveumPackages.new-mac # get a new mac address
|
||||||
new-mac # get a new mac address
|
niveumPackages.scanned
|
||||||
scanned
|
niveumPackages.default-gateway
|
||||||
default-gateway
|
niveumPackages.kirciuoklis
|
||||||
kirciuoklis
|
niveumPackages.image-convert-favicon
|
||||||
image-convert-favicon
|
niveumPackages.heuretes
|
||||||
heuretes
|
niveumPackages.ipa # XSAMPA to IPA converter
|
||||||
ipa # XSAMPA to IPA converter
|
niveumPackages.pls
|
||||||
pls
|
niveumPackages.mpv-tv
|
||||||
mpv-tv
|
niveumPackages.mpv-iptv
|
||||||
mpv-iptv
|
# jellyfin-media-player
|
||||||
devanagari
|
niveumPackages.devanagari
|
||||||
betacode # ancient greek betacode to unicode converter
|
niveumPackages.betacode # ancient greek betacode to unicode converter
|
||||||
jq-lsp
|
niveumPackages.meteo
|
||||||
swallow # window swallowing
|
niveumPackages.jq-lsp
|
||||||
literature-quote
|
niveumPackages.swallow # window swallowing
|
||||||
booksplit
|
niveumPackages.literature-quote
|
||||||
dmenu-randr
|
niveumPackages.booksplit
|
||||||
manual-sort
|
niveumPackages.dmenu-randr
|
||||||
wttr
|
niveumPackages.dmenu-bluetooth
|
||||||
unicodmenu
|
niveumPackages.manual-sort
|
||||||
emailmenu
|
niveumPackages.dns-sledgehammer
|
||||||
closest
|
niveumPackages.wttr
|
||||||
trans
|
niveumPackages.unicodmenu
|
||||||
(mpv-radio.override {
|
niveumPackages.emailmenu
|
||||||
|
niveumPackages.closest
|
||||||
|
niveumPackages.trans
|
||||||
|
(niveumPackages.mpv-radio.override {
|
||||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||||
})
|
})
|
||||||
(mpv-radio.override {
|
(niveumPackages.mpv-radio.override {
|
||||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||||
executableName = "cro-radio";
|
executableName = "cro-radio";
|
||||||
mpvCommand = "${cro}/bin/cro";
|
mpvCommand = "${niveumPackages.cro}/bin/cro";
|
||||||
})
|
})
|
||||||
(mpv-tuner.override {
|
(niveumPackages.mpv-tuner.override {
|
||||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||||
})
|
})
|
||||||
# kmein.slide
|
# kmein.slide
|
||||||
termdown
|
termdown
|
||||||
image-convert-tolino
|
niveumPackages.image-convert-tolino
|
||||||
rfc
|
niveumPackages.rfc
|
||||||
tag
|
niveumPackages.tag
|
||||||
timer
|
niveumPackages.timer
|
||||||
|
niveumPackages.menu-calc
|
||||||
nix-prefetch-git
|
nix-prefetch-git
|
||||||
nix-git
|
niveumPackages.nix-git
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
par
|
par
|
||||||
qrencode
|
qrencode
|
||||||
@@ -196,13 +197,20 @@ 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.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
|
inputs.scripts.packages.x86_64-linux.alarm
|
||||||
|
|
||||||
spotify
|
spotify
|
||||||
ncspot
|
ncspot
|
||||||
playerctl
|
playerctl
|
||||||
|
|
||||||
|
nix-index
|
||||||
|
niveumPackages.nix-index-update
|
||||||
|
|
||||||
#krebs
|
#krebs
|
||||||
|
niveumPackages.dic
|
||||||
pkgs.nur.repos.mic92.ircsink
|
pkgs.nur.repos.mic92.ircsink
|
||||||
|
|
||||||
(haskellPackages.ghcWithHoogle (hs: [
|
(haskellPackages.ghcWithHoogle (hs: [
|
||||||
@@ -229,13 +237,14 @@ in {
|
|||||||
dhall
|
dhall
|
||||||
|
|
||||||
html-tidy
|
html-tidy
|
||||||
|
nodePackages.csslint
|
||||||
|
nodePackages.jsonlint
|
||||||
deno # better node.js
|
deno # better node.js
|
||||||
go
|
# texlive.combined.scheme-full
|
||||||
texlive.combined.scheme-full
|
|
||||||
latexrun
|
latexrun
|
||||||
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
|
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
|
||||||
# haskellPackages.pandoc-citeproc
|
# haskellPackages.pandoc-citeproc
|
||||||
text2pdf
|
niveumPackages.text2pdf
|
||||||
lowdown
|
lowdown
|
||||||
glow # markdown to term
|
glow # markdown to term
|
||||||
libreoffice
|
libreoffice
|
||||||
@@ -243,7 +252,7 @@ in {
|
|||||||
dia
|
dia
|
||||||
pandoc
|
pandoc
|
||||||
librsvg # pandoc depends on this to include SVG in documents
|
librsvg # pandoc depends on this to include SVG in documents
|
||||||
# man-pandoc
|
# niveumPackages.man-pandoc
|
||||||
typst
|
typst
|
||||||
# proselint
|
# proselint
|
||||||
asciidoctor
|
asciidoctor
|
||||||
|
|||||||
25
configs/picom.nix
Normal file
25
configs/picom.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
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,4 +1,5 @@
|
|||||||
{pkgs, lib, ...}: let
|
{pkgs, ...}: let
|
||||||
|
inherit (import ../lib) localAddresses;
|
||||||
hp-driver = pkgs.hplip;
|
hp-driver = pkgs.hplip;
|
||||||
in {
|
in {
|
||||||
services.printing = {
|
services.printing = {
|
||||||
@@ -17,7 +18,7 @@ in {
|
|||||||
{
|
{
|
||||||
name = "OfficeJet";
|
name = "OfficeJet";
|
||||||
location = "Zimmer";
|
location = "Zimmer";
|
||||||
deviceUri = "https://${pkgs.lib.niveum.localAddresses.officejet}";
|
deviceUri = "https://${localAddresses.officejet}";
|
||||||
model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd";
|
model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd";
|
||||||
ppdOptions = {
|
ppdOptions = {
|
||||||
Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None
|
Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{ services.redshift.enable = true; }
|
{services.redshift.enable = false;}
|
||||||
|
|||||||
@@ -3,6 +3,5 @@
|
|||||||
location = {
|
location = {
|
||||||
latitude = 52.517;
|
latitude = 52.517;
|
||||||
longitude = 13.3872;
|
longitude = 13.3872;
|
||||||
provider = "geoclue2";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
{ pkgs, lib, ... }:
|
{pkgs, ...}: let
|
||||||
{
|
inherit (import ../lib) sshPort kieran;
|
||||||
users.users.me.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys;
|
externalNetwork = import ../lib/external-network.nix;
|
||||||
|
in {
|
||||||
|
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
|
||||||
programs.ssh.startAgent = true;
|
programs.ssh.startAgent = true;
|
||||||
services.gnome.gcr-ssh-agent.enable = false;
|
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
# https://discourse.nixos.org/t/gnome-keyring-and-ssh-agent-without-gnome/11663
|
# https://discourse.nixos.org/t/gnome-keyring-and-ssh-agent-without-gnome/11663
|
||||||
@@ -10,11 +11,35 @@
|
|||||||
eval $(${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon --daemonize --components=ssh,secrets)
|
eval $(${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon --daemonize --components=ssh,secrets)
|
||||||
export SSH_AUTH_SOCK
|
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 = {
|
home-manager.users.me.programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableDefaultConfig = false;
|
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
"github.com" = {
|
"github.com" = {
|
||||||
hostname = "ssh.github.com";
|
hostname = "ssh.github.com";
|
||||||
@@ -23,42 +48,42 @@
|
|||||||
zaatar = {
|
zaatar = {
|
||||||
hostname = "zaatar.r";
|
hostname = "zaatar.r";
|
||||||
user = "root";
|
user = "root";
|
||||||
port = pkgs.lib.niveum.sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
makanek = {
|
makanek = {
|
||||||
hostname = pkgs.lib.niveum.externalNetwork.makanek;
|
hostname = externalNetwork.makanek;
|
||||||
user = "root";
|
user = "root";
|
||||||
port = pkgs.lib.niveum.sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
ful = {
|
ful = {
|
||||||
hostname = pkgs.lib.niveum.externalNetwork.ful;
|
hostname = externalNetwork.ful;
|
||||||
user = "root";
|
user = "root";
|
||||||
port = pkgs.lib.niveum.sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
tahina = {
|
tahina = {
|
||||||
hostname = "tahina.r";
|
hostname = "tahina.r";
|
||||||
user = "root";
|
user = "root";
|
||||||
port = pkgs.lib.niveum.sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
tabula = {
|
tabula = {
|
||||||
hostname = "tabula.r";
|
hostname = "tabula.r";
|
||||||
user = "root";
|
user = "root";
|
||||||
port = pkgs.lib.niveum.sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
manakish = {
|
manakish = {
|
||||||
hostname = "manakish.r";
|
hostname = "manakish.r";
|
||||||
user = "kfm";
|
user = "kfm";
|
||||||
port = pkgs.lib.niveum.sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
kabsa = {
|
kabsa = {
|
||||||
hostname = "kabsa.r";
|
hostname = "kabsa.r";
|
||||||
user = "kfm";
|
user = "kfm";
|
||||||
port = pkgs.lib.niveum.sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
fatteh = {
|
fatteh = {
|
||||||
hostname = "fatteh.r";
|
hostname = "fatteh.r";
|
||||||
user = "kfm";
|
user = "kfm";
|
||||||
port = pkgs.lib.niveum.sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
{
|
inherit (import ../lib) sshPort kieran;
|
||||||
|
in {
|
||||||
users.motd = "Welcome to ${config.networking.hostName}!";
|
users.motd = "Welcome to ${config.networking.hostName}!";
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ pkgs.lib.niveum.sshPort ];
|
ports = [sshPort];
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
X11Forwarding = true;
|
X11Forwarding = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys ++ [
|
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys ++ [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoiRIn1dBUtpApcUyGbZKN+m5KBSgKIDQjdnQ8vU0xU kfm@kibbeh" # travel laptop
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoiRIn1dBUtpApcUyGbZKN+m5KBSgKIDQjdnQ8vU0xU kfm@kibbeh" # travel laptop
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
52
configs/stw-berlin.nix
Normal file
52
configs/stw-berlin.nix
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
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.enable = true;
|
||||||
stylix.image = generatedWallpaper;
|
stylix.image = generatedWallpaper;
|
||||||
|
|
||||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
|
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/ayu-light.yaml";
|
||||||
|
|
||||||
stylix.cursor = {
|
stylix.cursor = {
|
||||||
name = "capitaine-cursors-white";
|
name = "capitaine-cursors-white";
|
||||||
@@ -26,9 +26,6 @@ in {
|
|||||||
size = 12;
|
size = 12;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.me = {
|
|
||||||
stylix.autoEnable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# environment.etc."stylix/wallpaper.png".source = generatedWallpaper;
|
# environment.etc."stylix/wallpaper.png".source = generatedWallpaper;
|
||||||
|
|
||||||
@@ -55,22 +52,22 @@ in {
|
|||||||
|
|
||||||
stylix.fonts = {
|
stylix.fonts = {
|
||||||
serif = {
|
serif = {
|
||||||
package = pkgs.noto-fonts;
|
package = pkgs.gentium;
|
||||||
name = "Noto Serif";
|
name = "Gentium Plus";
|
||||||
};
|
};
|
||||||
|
|
||||||
sansSerif = {
|
sansSerif = {
|
||||||
package = pkgs.noto-fonts;
|
package = pkgs.gentium;
|
||||||
name = "Noto Sans";
|
name = "Gentium Plus";
|
||||||
};
|
};
|
||||||
|
|
||||||
monospace = {
|
monospace = {
|
||||||
package = pkgs.noto-fonts;
|
package = pkgs.nerd-fonts.blex-mono;
|
||||||
name = "Noto Sans Mono";
|
name = "BlexMono Nerd Font";
|
||||||
};
|
};
|
||||||
|
|
||||||
emoji = {
|
emoji = {
|
||||||
package = pkgs.noto-fonts-color-emoji;
|
package = pkgs.noto-fonts-emoji;
|
||||||
name = "Noto Color Emoji";
|
name = "Noto Color Emoji";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
aggressiveResize = true;
|
aggressiveResize = true;
|
||||||
escapeTime = 50;
|
escapeTime = 50;
|
||||||
historyLimit = 7000;
|
historyLimit = 7000;
|
||||||
shortcut = "b";
|
shortcut = "a";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
|
|
||||||
@@ -37,6 +37,15 @@
|
|||||||
set -g status-left-length 32
|
set -g status-left-length 32
|
||||||
set -g status-right-length 150
|
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
|
set -g status-position bottom
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
{ 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,9 +1,6 @@
|
|||||||
{ config, ... }:
|
|
||||||
{
|
{
|
||||||
networking.wireless = {
|
networking.wireless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
secretsFile = config.age.secrets.wifi.path;
|
networks.Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||||
# networks.Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
|
||||||
networks.Schilfpalast.pskRaw = "ext:schilfpalast";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,15 @@
|
|||||||
promptColours.success = "cyan";
|
promptColours.success = "cyan";
|
||||||
promptColours.failure = "red";
|
promptColours.failure = "red";
|
||||||
in {
|
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
|
programs.zsh = let
|
||||||
zsh-completions = pkgs.fetchFromGitHub {
|
zsh-completions = pkgs.fetchFromGitHub {
|
||||||
owner = "zsh-users";
|
owner = "zsh-users";
|
||||||
@@ -58,6 +67,13 @@ in {
|
|||||||
zstyle ':vcs_info:*' formats "%c%u%F{cyan}%b%f"
|
zstyle ':vcs_info:*' formats "%c%u%F{cyan}%b%f"
|
||||||
zstyle ':vcs_info:*' actionformats "(%a) %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 () {
|
precmd () {
|
||||||
vcs_info
|
vcs_info
|
||||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] || [ -n "$SSH_CONNECTION" ]; then
|
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] || [ -n "$SSH_CONNECTION" ]; then
|
||||||
|
|||||||
836
flake.lock
generated
836
flake.lock
generated
File diff suppressed because it is too large
Load Diff
809
flake.nix
809
flake.nix
@@ -2,25 +2,26 @@
|
|||||||
description = "niveum: packages, modules, systems";
|
description = "niveum: packages, modules, systems";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
self.submodules = true;
|
|
||||||
|
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
autorenkalender.url = "github:kmein/autorenkalender";
|
# alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master";
|
||||||
coptic-dictionary.url = "github:kmein/coptic-dictionary";
|
coptic-dictionary.url = "github:kmein/coptic-dictionary";
|
||||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
home-manager.url = "github:nix-community/home-manager/release-25.05";
|
||||||
menstruation-backend.url = "github:kmein/menstruation.rs";
|
menstruation-backend.url = "github:kmein/menstruation.rs";
|
||||||
menstruation-telegram.url = "github:kmein/menstruation-telegram";
|
menstruation-telegram.url = "github:kmein/menstruation-telegram";
|
||||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
centerpiece.url = "github:friedow/centerpiece";
|
||||||
|
nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05";
|
||||||
nixinate.url = "github:matthewcroughan/nixinate";
|
nixinate.url = "github:matthewcroughan/nixinate";
|
||||||
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
|
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
recht.url = "github:kmein/recht";
|
recht.url = "github:kmein/recht";
|
||||||
retiolum.url = "github:krebs/retiolum";
|
retiolum.url = "github:krebs/retiolum";
|
||||||
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
scripts.url = "github:kmein/scripts";
|
scripts.url = "github:kmein/scripts";
|
||||||
stockholm.url = "github:krebs/stockholm";
|
stockholm.url = "github:krebs/stockholm";
|
||||||
stylix.url = "github:danth/stylix/release-25.11";
|
stylix.url = "github:danth/stylix/release-25.05";
|
||||||
telebots.url = "github:kmein/telebots";
|
telebots.url = "github:kmein/telebots";
|
||||||
tinc-graph.url = "github:kmein/tinc-graph";
|
tinc-graph.url = "github:kmein/tinc-graph";
|
||||||
voidrice.url = "github:Lukesmithxyz/voidrice";
|
voidrice.url = "github:Lukesmithxyz/voidrice";
|
||||||
@@ -29,444 +30,422 @@
|
|||||||
|
|
||||||
agenix.inputs.home-manager.follows = "home-manager";
|
agenix.inputs.home-manager.follows = "home-manager";
|
||||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
autorenkalender.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs";
|
coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
home-manager.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.menstruation-backend.follows = "menstruation-backend";
|
||||||
menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old";
|
menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old";
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
nix-on-droid.inputs.home-manager.follows = "home-manager";
|
||||||
|
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
recht.inputs.flake-utils.follows = "flake-utils";
|
||||||
recht.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.nixpkgs.follows = "nixpkgs";
|
||||||
|
scripts.inputs.rust-overlay.follows = "rust-overlay";
|
||||||
|
stylix.inputs.home-manager.follows = "home-manager";
|
||||||
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
tinc-graph.inputs.flake-utils.follows = "flake-utils";
|
||||||
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
|
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
tinc-graph.inputs.rust-overlay.follows = "rust-overlay";
|
||||||
voidrice.flake = false;
|
voidrice.flake = false;
|
||||||
|
wallpaper-generator.inputs.flake-utils.follows = "flake-utils";
|
||||||
wallpapers.flake = false;
|
wallpapers.flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
nixConfig = {
|
||||||
{
|
extra-substituters = [ "https://kmein.cachix.org" ];
|
||||||
self,
|
extra-trusted-public-keys = [ "kmein.cachix.org-1:rsJ2b6++VQHJ1W6rGuDUYsK/qUkFA3bNpO6PyEyJ9Ls=" ];
|
||||||
nixpkgs,
|
};
|
||||||
nixpkgs-unstable,
|
|
||||||
nur,
|
outputs = inputs @ {
|
||||||
home-manager,
|
self,
|
||||||
agenix,
|
nixpkgs,
|
||||||
retiolum,
|
nixpkgs-unstable,
|
||||||
nixinate,
|
nur,
|
||||||
coptic-dictionary,
|
home-manager,
|
||||||
menstruation-backend,
|
agenix,
|
||||||
menstruation-telegram,
|
retiolum,
|
||||||
scripts,
|
nixinate,
|
||||||
tinc-graph,
|
flake-utils,
|
||||||
recht,
|
nix-on-droid,
|
||||||
autorenkalender,
|
centerpiece,
|
||||||
wallpaper-generator,
|
stylix,
|
||||||
telebots,
|
...
|
||||||
stockholm,
|
}:
|
||||||
nix-index-database,
|
|
||||||
stylix,
|
|
||||||
voidrice,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
lib = nixpkgs.lib;
|
|
||||||
eachSupportedSystem = lib.genAttrs lib.systems.flakeExposed;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
apps = {
|
apps = {
|
||||||
x86_64-linux =
|
x86_64-darwin = let
|
||||||
let
|
pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
in {
|
||||||
lib = nixpkgs.lib;
|
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";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
lib.mergeAttrsList [
|
lib.attrsets.nameValuePair "deploy-${hostname}" {
|
||||||
(nixinate.nixinate.x86_64-linux self)
|
type = "app";
|
||||||
{
|
program = toString (pkgs.writers.writeDash "deploy-${hostname}" ''
|
||||||
mock-secrets = {
|
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \
|
||||||
type = "app";
|
--max-jobs 2 \
|
||||||
program = toString (
|
--log-format internal-json \
|
||||||
pkgs.writers.writeDash "mock-secrets" ''
|
--flake .?submodules=1#${hostname} \
|
||||||
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
|
--target-host ${targets.${hostname}} 2>&1 \
|
||||||
''
|
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||||
);
|
'');
|
||||||
};
|
}) (builtins.attrNames self.nixosConfigurations))
|
||||||
}
|
// {
|
||||||
# the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
|
deploy-ful = {
|
||||||
(builtins.listToAttrs (
|
type = "app";
|
||||||
map (
|
program = toString (pkgs.writers.writeDash "deploy-ful" ''
|
||||||
hostname:
|
exec ${pkgs.nix}/bin/nix run .?submodules=1#nixinate.ful \
|
||||||
let
|
--log-format internal-json 2>&1 \
|
||||||
targets = {
|
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||||
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 = {
|
nixosModules = {
|
||||||
|
htgen = import modules/htgen.nix;
|
||||||
moodle-dl = import modules/moodle-dl.nix;
|
moodle-dl = import modules/moodle-dl.nix;
|
||||||
|
networkmanager-declarative = import modules/networkmanager-declarative.nix;
|
||||||
passport = import modules/passport.nix;
|
passport = import modules/passport.nix;
|
||||||
panoptikon = import modules/panoptikon.nix;
|
panoptikon = import modules/panoptikon.nix;
|
||||||
power-action = import modules/power-action.nix;
|
power-action = import modules/power-action.nix;
|
||||||
system-dependent = import modules/system-dependent.nix;
|
system-dependent = import modules/system-dependent.nix;
|
||||||
telegram-bot = import modules/telegram-bot.nix;
|
telegram-bot = import modules/telegram-bot.nix;
|
||||||
go-webring = import modules/go-webring.nix;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
lib = {
|
lib = {
|
||||||
|
panoptikon = import lib/panoptikon.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
overlays.default = final: prev: {
|
nixOnDroidConfigurations = {
|
||||||
niveum-terminal = prev.alacritty;
|
moto = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||||
niveum-browser = prev.firefox;
|
modules = [systems/moto/configuration.nix];
|
||||||
niveum-filemanager = prev.pcmanfm;
|
|
||||||
|
|
||||||
# wrapped from upstream
|
|
||||||
wrapScript =
|
|
||||||
{
|
|
||||||
packages ? [ ],
|
|
||||||
name,
|
|
||||||
script,
|
|
||||||
}:
|
|
||||||
prev.writers.writeDashBin name ''PATH=$PATH:${
|
|
||||||
nixpkgs.lib.makeBinPath (
|
|
||||||
packages
|
|
||||||
++ [
|
|
||||||
final.findutils
|
|
||||||
final.coreutils
|
|
||||||
final.gnused
|
|
||||||
final.gnugrep
|
|
||||||
]
|
|
||||||
)
|
|
||||||
} ${script} "$@"'';
|
|
||||||
tag = final.wrapScript {
|
|
||||||
script = voidrice.outPath + "/.local/bin/tag";
|
|
||||||
name = "tag";
|
|
||||||
packages = [ final.ffmpeg ];
|
|
||||||
};
|
|
||||||
booksplit = final.wrapScript {
|
|
||||||
script = voidrice.outPath + "/.local/bin/booksplit";
|
|
||||||
name = "booksplit";
|
|
||||||
packages = [
|
|
||||||
final.ffmpeg
|
|
||||||
final.glibc.bin
|
|
||||||
];
|
|
||||||
};
|
|
||||||
auc = prev.callPackage packages/auc.nix { };
|
|
||||||
cheat-sh = prev.callPackage packages/cheat-sh.nix { };
|
|
||||||
brassica = prev.callPackage packages/brassica.nix { }; # TODO upstream
|
|
||||||
text2pdf = prev.callPackage packages/text2pdf.nix { }; # TODO upstream
|
|
||||||
wttr = prev.callPackage packages/wttr.nix { }; # TODO upstream
|
|
||||||
jsesh = prev.callPackage packages/jsesh.nix { }; # TODO upstream
|
|
||||||
opustags = prev.callPackage packages/opustags.nix { }; # TODO upstream
|
|
||||||
trans = prev.callPackage packages/trans.nix { }; # TODO upstream
|
|
||||||
go-webring = prev.callPackage packages/go-webring.nix { }; # TODO upstream
|
|
||||||
stag = prev.callPackage packages/stag.nix { }; # TODO upstream
|
|
||||||
mpv = prev.mpv.override {
|
|
||||||
scripts = [
|
|
||||||
final.mpvScripts.visualizer
|
|
||||||
final.mpvScripts.mpris
|
|
||||||
];
|
|
||||||
};
|
|
||||||
cro = prev.callPackage packages/cro.nix { };
|
|
||||||
dmenu = prev.writers.writeDashBin "dmenu" ''exec ${final.rofi}/bin/rofi -dmenu "$@"'';
|
|
||||||
weechatScripts = prev.weechatScripts // {
|
|
||||||
hotlist2extern = prev.callPackage packages/weechatScripts/hotlist2extern.nix { }; # TODO upstream
|
|
||||||
};
|
|
||||||
vimPlugins = prev.vimPlugins // {
|
|
||||||
cheat-sh = prev.callPackage packages/vimPlugins/cheat-sh.nix { };
|
|
||||||
icalendar-vim = prev.callPackage packages/vimPlugins/icalendar-vim.nix { }; # TODO upstream
|
|
||||||
jq-vim = prev.callPackage packages/vimPlugins/jq-vim.nix { }; # TODO upstream
|
|
||||||
typst-vim = prev.callPackage packages/vimPlugins/typst-vim.nix { }; # TODO upstream
|
|
||||||
mdwa-nvim = prev.callPackage packages/vimPlugins/mdwa-nvim.nix { }; # TODO upstream
|
|
||||||
vim-ernest = prev.callPackage packages/vimPlugins/vim-ernest.nix { }; # TODO upstream
|
|
||||||
vim-256noir = prev.callPackage packages/vimPlugins/vim-256noir.nix { }; # TODO upstream
|
|
||||||
vim-colors-paramount =
|
|
||||||
prev.callPackage packages/vimPlugins/vim-colors-paramount.nix { }; # TODO upstream
|
|
||||||
vim-fetch = prev.callPackage packages/vimPlugins/vim-fetch.nix { }; # TODO upstream
|
|
||||||
vim-fsharp = prev.callPackage packages/vimPlugins/vim-fsharp.nix { }; # TODO upstream
|
|
||||||
vim-mail = prev.callPackage packages/vimPlugins/vim-mail.nix { }; # TODO upstream
|
|
||||||
vim-reason-plus = prev.callPackage packages/vimPlugins/vim-reason-plus.nix { }; # TODO upstream
|
|
||||||
};
|
|
||||||
|
|
||||||
# krebs
|
|
||||||
brainmelter = prev.callPackage packages/brainmelter.nix { };
|
|
||||||
cyberlocker-tools = prev.callPackage packages/cyberlocker-tools.nix { };
|
|
||||||
hc = prev.callPackage packages/hc.nix { };
|
|
||||||
pls = prev.callPackage packages/pls.nix { };
|
|
||||||
radio-news = prev.callPackage packages/radio-news { };
|
|
||||||
untilport = prev.callPackage packages/untilport.nix { };
|
|
||||||
weechat-declarative = prev.callPackage packages/weechat-declarative.nix {};
|
|
||||||
|
|
||||||
# my packages
|
|
||||||
betacode = prev.callPackage packages/betacode.nix { };
|
|
||||||
closest = prev.callPackage packages/closest { };
|
|
||||||
default-gateway = prev.callPackage packages/default-gateway.nix { };
|
|
||||||
depp = prev.callPackage packages/depp.nix { };
|
|
||||||
devanagari = prev.callPackage packages/devanagari { };
|
|
||||||
radioStreams = prev.callPackage packages/streams {};
|
|
||||||
devour = prev.callPackage packages/devour.nix { };
|
|
||||||
dmenu-randr = prev.callPackage packages/dmenu-randr.nix { };
|
|
||||||
emailmenu = prev.callPackage packages/emailmenu.nix { };
|
|
||||||
fkill = prev.callPackage packages/fkill.nix { };
|
|
||||||
fzfmenu = prev.callPackage packages/fzfmenu.nix { };
|
|
||||||
gfs-fonts = prev.callPackage packages/gfs-fonts.nix { };
|
|
||||||
heuretes = prev.callPackage packages/heuretes.nix { };
|
|
||||||
image-convert-favicon = prev.callPackage packages/image-convert-favicon.nix { };
|
|
||||||
image-convert-tolino = prev.callPackage packages/image-convert-tolino.nix { };
|
|
||||||
ipa = prev.writers.writePython3Bin "ipa" { flakeIgnore = [ "E501" ]; } packages/ipa.py;
|
|
||||||
kirciuoklis = prev.callPackage packages/kirciuoklis.nix { };
|
|
||||||
kpaste = prev.callPackage packages/kpaste.nix { };
|
|
||||||
literature-quote = prev.callPackage packages/literature-quote.nix { };
|
|
||||||
man-pdf = prev.callPackage packages/man-pdf.nix { };
|
|
||||||
mansplain = prev.callPackage packages/mansplain.nix { };
|
|
||||||
manual-sort = prev.callPackage packages/manual-sort.nix { };
|
|
||||||
mpv-iptv = prev.callPackage packages/mpv-iptv.nix { };
|
|
||||||
mpv-radio = prev.callPackage packages/mpv-radio.nix { di-fm-key-file = "/dev/null"; };
|
|
||||||
mpv-tuner = prev.callPackage packages/mpv-tuner.nix { di-fm-key-file = "/dev/null"; };
|
|
||||||
mpv-tv = prev.callPackage packages/mpv-tv.nix { };
|
|
||||||
new-mac = prev.callPackage packages/new-mac.nix { };
|
|
||||||
nix-git = prev.callPackage packages/nix-git.nix { };
|
|
||||||
noise-waves = prev.callPackage packages/noise-waves.nix { };
|
|
||||||
notemenu = prev.callPackage packages/notemenu.nix { };
|
|
||||||
obsidian-vim = prev.callPackage packages/obsidian-vim.nix { };
|
|
||||||
vim-typewriter = prev.callPackage packages/vim-typewriter.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
|
|
||||||
;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
packages = eachSupportedSystem (
|
|
||||||
system:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
system = "aarch64-linux";
|
||||||
config.allowUnfree = true;
|
overlays = [nix-on-droid.overlays.default];
|
||||||
overlays = [
|
|
||||||
nur.overlays.default
|
|
||||||
self.overlays.default
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
extraSpecialArgs = {
|
||||||
|
niveumPackages = inputs.self.packages.aarch64-linux;
|
||||||
|
niveumLib = inputs.self.lib;
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
home-manager-path = home-manager.outPath;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
homeConfigurations = {
|
||||||
|
maakaron = let
|
||||||
|
system = "x86_64-darwin";
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
{
|
home-manager.lib.homeManagerConfiguration {
|
||||||
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 vim-typewriter ;
|
inherit pkgs;
|
||||||
}
|
modules = [./systems/maakaron/home.nix];
|
||||||
);
|
extraSpecialArgs = {
|
||||||
};
|
inherit inputs;
|
||||||
|
niveumPackages = inputs.self.packages.${system};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixosConfigurations = let
|
||||||
|
niveumSpecialArgs = system: {
|
||||||
|
unstablePackages = import nixpkgs-unstable {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfreePredicate = pkg:
|
||||||
|
builtins.elem (nixpkgs-unstable.lib.getName pkg) [
|
||||||
|
"obsidian"
|
||||||
|
"zoom"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
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.wofi}/bin/wofi --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 {};
|
||||||
|
passmenu = pkgs.callPackage packages/passmenu.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];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
5
lib/default-applications.nix
Normal file
5
lib/default-applications.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
pkgs: rec {
|
||||||
|
terminal = "alacritty";
|
||||||
|
browser = "${pkgs.firefox}/bin/firefox";
|
||||||
|
fileManager = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||||
|
}
|
||||||
115
lib/default.nix
115
lib/default.nix
@@ -1,40 +1,28 @@
|
|||||||
{ lib, pkgs }:
|
|
||||||
let
|
|
||||||
systems = import ./systems.nix;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
tmpfilesConfig =
|
tmpfilesConfig = {
|
||||||
{
|
type,
|
||||||
type,
|
path,
|
||||||
path,
|
mode ? "-",
|
||||||
mode ? "-",
|
user ? "-",
|
||||||
user ? "-",
|
group ? "-",
|
||||||
group ? "-",
|
age ? "-",
|
||||||
age ? "-",
|
argument ? "-",
|
||||||
argument ? "-",
|
}: "${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
|
||||||
}:
|
|
||||||
"${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
|
|
||||||
|
|
||||||
restic =
|
restic = rec {
|
||||||
let
|
port = 3571;
|
||||||
host = "zaatar.r";
|
host = "zaatar.r";
|
||||||
port = 3571;
|
repository = "rest:http://${host}:${toString port}/";
|
||||||
in
|
};
|
||||||
{
|
|
||||||
inherit host port;
|
|
||||||
repository = "rest:http://${host}:${toString port}/";
|
|
||||||
};
|
|
||||||
|
|
||||||
remoteDir = "/home/kfm/remote";
|
remoteDir = "/home/kfm/remote";
|
||||||
|
|
||||||
firewall = {
|
firewall = lib: {
|
||||||
accept =
|
accept = {
|
||||||
{
|
source,
|
||||||
source,
|
protocol,
|
||||||
protocol,
|
dport,
|
||||||
dport,
|
}: "nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
|
||||||
}:
|
|
||||||
"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}");
|
addRules = lib.concatMapStringsSep "\n" (rule: "iptables -A ${rule}");
|
||||||
removeRules = lib.concatMapStringsSep "\n" (rule: "iptables -D ${rule} || true");
|
removeRules = lib.concatMapStringsSep "\n" (rule: "iptables -D ${rule} || true");
|
||||||
};
|
};
|
||||||
@@ -54,7 +42,7 @@ in
|
|||||||
|
|
||||||
sshPort = 22022;
|
sshPort = 22022;
|
||||||
|
|
||||||
theme = {
|
theme = pkgs: {
|
||||||
gtk = {
|
gtk = {
|
||||||
name = "Adwaita-dark";
|
name = "Adwaita-dark";
|
||||||
package = pkgs.gnome-themes-extra;
|
package = pkgs.gnome-themes-extra;
|
||||||
@@ -69,63 +57,32 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
retiolumAddresses = lib.mapAttrs (_: v: { inherit (v.retiolum) ipv4 ipv6; }) (
|
defaultApplications = import ./default-applications.nix;
|
||||||
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
|
|
||||||
);
|
|
||||||
|
|
||||||
email =
|
retiolumAddresses = import ./retiolum-network.nix;
|
||||||
let
|
|
||||||
thunderbirdProfile = "donnervogel";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
inherit thunderbirdProfile;
|
|
||||||
defaults = {
|
|
||||||
thunderbird = {
|
|
||||||
enable = true;
|
|
||||||
profiles = [ thunderbirdProfile ];
|
|
||||||
};
|
|
||||||
aerc.enable = true;
|
|
||||||
realName = "Kierán Meinhardt";
|
|
||||||
folders.inbox = "INBOX";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systems = systems;
|
localAddresses = import ./local-network.nix;
|
||||||
|
|
||||||
|
email-sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKz33wHtPuIfgXEb0+hybxFGV9ZuPsDTLUZo/+hlcdA";
|
||||||
|
|
||||||
kieran = {
|
kieran = {
|
||||||
github = "kmein";
|
github = "kmein";
|
||||||
email = "kmein@posteo.de";
|
email = "kmein@posteo.de";
|
||||||
name = "Kierán Meinhardt";
|
name = "Kierán Meinhardt";
|
||||||
pronouns = builtins.concatStringsSep "/" [
|
|
||||||
"er"
|
|
||||||
"he"
|
|
||||||
"is"
|
|
||||||
"οὗτος"
|
|
||||||
"هو"
|
|
||||||
"ⲛ̄ⲧⲟϥ"
|
|
||||||
"он"
|
|
||||||
"han"
|
|
||||||
"सः"
|
|
||||||
];
|
|
||||||
sshKeys = [
|
sshKeys = [
|
||||||
systems.fatteh.sshKey
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk" # kabsa
|
||||||
systems.manakish.sshKey
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB" # manakish
|
||||||
systems.kabsa.sshKey
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y" # fatteh
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
syncthing.devices = {
|
||||||
|
kabsa.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||||
|
kibbeh.id = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
||||||
|
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||||
|
fatteh.id = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC";
|
||||||
|
};
|
||||||
|
|
||||||
ignorePaths = [
|
ignorePaths = [
|
||||||
"*~"
|
"*~"
|
||||||
".stack-work/"
|
".stack-work/"
|
||||||
|
|||||||
23
lib/email.nix
Normal file
23
lib/email.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
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";
|
||||||
|
};
|
||||||
|
}
|
||||||
4
lib/external-network.nix
Normal file
4
lib/external-network.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
ful = "130.61.217.114";
|
||||||
|
makanek = "88.99.83.173";
|
||||||
|
}
|
||||||
182
lib/goldendict-config.nix
Normal file
182
lib/goldendict-config.nix
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
path,
|
||||||
|
}: ''
|
||||||
|
<config>
|
||||||
|
<paths>
|
||||||
|
<path recursive="1">${path}</path>
|
||||||
|
</paths>
|
||||||
|
<sounddirs/>
|
||||||
|
<dictionaryOrder name="" id="0">
|
||||||
|
<mutedDictionaries/>
|
||||||
|
</dictionaryOrder>
|
||||||
|
<inactiveDictionaries name="" id="0">
|
||||||
|
<mutedDictionaries/>
|
||||||
|
</inactiveDictionaries>
|
||||||
|
<groups nextId="1"/>
|
||||||
|
<hunspell dictionariesPath=""/>
|
||||||
|
<transliteration>
|
||||||
|
<enableRussianTransliteration>0</enableRussianTransliteration>
|
||||||
|
<enableGermanTransliteration>0</enableGermanTransliteration>
|
||||||
|
<enableGreekTransliteration>0</enableGreekTransliteration>
|
||||||
|
<enableBelarusianTransliteration>0</enableBelarusianTransliteration>
|
||||||
|
<chinese>
|
||||||
|
<enable>0</enable>
|
||||||
|
<enableSCToTWConversion>1</enableSCToTWConversion>
|
||||||
|
<enableSCToHKConversion>1</enableSCToHKConversion>
|
||||||
|
<enableTCToSCConversion>1</enableTCToSCConversion>
|
||||||
|
</chinese>
|
||||||
|
<romaji>
|
||||||
|
<enable>0</enable>
|
||||||
|
<enableHepburn>1</enableHepburn>
|
||||||
|
<enableNihonShiki>0</enableNihonShiki>
|
||||||
|
<enableKunreiShiki>0</enableKunreiShiki>
|
||||||
|
<enableHiragana>1</enableHiragana>
|
||||||
|
<enableKatakana>1</enableKatakana>
|
||||||
|
</romaji>
|
||||||
|
</transliteration>
|
||||||
|
<forvo>
|
||||||
|
<enable>0</enable>
|
||||||
|
<apiKey></apiKey>
|
||||||
|
<languageCodes></languageCodes>
|
||||||
|
</forvo>
|
||||||
|
<mediawikis>
|
||||||
|
<mediawiki enabled="0" name="English Wikipedia" icon="" id="ae6f89aac7151829681b85f035d54e48" url="https://en.wikipedia.org/w"/>
|
||||||
|
<mediawiki enabled="0" name="English Wiktionary" icon="" id="affcf9678e7bfe701c9b071f97eccba3" url="https://en.wiktionary.org/w"/>
|
||||||
|
<mediawiki enabled="0" name="German Wikipedia" icon="" id="a8a66331a1242ca2aeb0b4aed361c41d" url="https://de.wikipedia.org/w"/>
|
||||||
|
<mediawiki enabled="0" name="German Wiktionary" icon="" id="21c64bca5ec10ba17ff19f3066bc962a" url="https://de.wiktionary.org/w"/>
|
||||||
|
</mediawikis>
|
||||||
|
<websites>
|
||||||
|
<website enabled="0" name="Google En-En (Oxford)" icon="" id="b88cb2898e634c6638df618528284c2d" url="https://www.google.com/search?q=define:%GDWORD%&hl=en" inside_iframe="1"/>
|
||||||
|
<website enabled="0" name="Urban Dictionary" icon="" id="f376365a0de651fd7505e7e5e683aa45" url="https://www.urbandictionary.com/define.php?term=%GDWORD%" inside_iframe="1"/>
|
||||||
|
<website enabled="0" name="Multitran (En)" icon="" id="324ca0306187df7511b26d3847f4b07c" url="https://multitran.ru/c/m.exe?CL=1&l1=1&s=%GD1251%" inside_iframe="1"/>
|
||||||
|
<website enabled="0" name="Lingvo (En-Ru)" icon="" id="924db471b105299c82892067c0f10787" url="http://lingvopro.abbyyonline.com/en/Search/en-ru/%GDWORD%" inside_iframe="1"/>
|
||||||
|
<website enabled="0" name="Michaelis (Pt-En)" icon="" id="087a6d65615fb047f4c80eef0a9465db" url="http://michaelis.uol.com.br/moderno/ingles/index.php?lingua=portugues-ingles&palavra=%GDISO1%" inside_iframe="1"/>
|
||||||
|
</websites>
|
||||||
|
<dictservers/>
|
||||||
|
<programs>
|
||||||
|
<program enabled="0" name="Espeak" icon="" id="2cf8b3a60f27e1ac812de0b57c148340" commandLine="${pkgs.espeak}/bin/espeak %GDWORD%" type="0"/>
|
||||||
|
<program enabled="0" name="Manpages" icon="" id="4f898f7582596cea518c6b0bfdceb8b3" commandLine="${pkgs.man_db}/bin/man -a --html=/bin/cat %GDWORD%" type="2"/>
|
||||||
|
</programs>
|
||||||
|
<voiceEngines/>
|
||||||
|
<mutedDictionaries/>
|
||||||
|
<popupMutedDictionaries>
|
||||||
|
<mutedDictionary>ae6f89aac7151829681b85f035d54e48</mutedDictionary>
|
||||||
|
</popupMutedDictionaries>
|
||||||
|
<preferences>
|
||||||
|
<interfaceLanguage></interfaceLanguage>
|
||||||
|
<helpLanguage></helpLanguage>
|
||||||
|
<displayStyle>modern</displayStyle>
|
||||||
|
<newTabsOpenAfterCurrentOne>0</newTabsOpenAfterCurrentOne>
|
||||||
|
<newTabsOpenInBackground>1</newTabsOpenInBackground>
|
||||||
|
<hideSingleTab>0</hideSingleTab>
|
||||||
|
<mruTabOrder>0</mruTabOrder>
|
||||||
|
<hideMenubar>0</hideMenubar>
|
||||||
|
<enableTrayIcon>1</enableTrayIcon>
|
||||||
|
<startToTray>1</startToTray>
|
||||||
|
<closeToTray>1</closeToTray>
|
||||||
|
<autoStart>0</autoStart>
|
||||||
|
<doubleClickTranslates>1</doubleClickTranslates>
|
||||||
|
<selectWordBySingleClick>0</selectWordBySingleClick>
|
||||||
|
<escKeyHidesMainWindow>0</escKeyHidesMainWindow>
|
||||||
|
<zoomFactor>1</zoomFactor>
|
||||||
|
<helpZoomFactor>1</helpZoomFactor>
|
||||||
|
<wordsZoomLevel>0</wordsZoomLevel>
|
||||||
|
<enableMainWindowHotkey>1</enableMainWindowHotkey>
|
||||||
|
<mainWindowHotkey>Ctrl+F11, Ctrl+F11</mainWindowHotkey>
|
||||||
|
<enableClipboardHotkey>1</enableClipboardHotkey>
|
||||||
|
<clipboardHotkey>Ctrl+C, Ctrl+C</clipboardHotkey>
|
||||||
|
<enableScanPopup>1</enableScanPopup>
|
||||||
|
<startWithScanPopupOn>0</startWithScanPopupOn>
|
||||||
|
<enableScanPopupModifiers>0</enableScanPopupModifiers>
|
||||||
|
<scanPopupModifiers>0</scanPopupModifiers>
|
||||||
|
<scanPopupAltMode>0</scanPopupAltMode>
|
||||||
|
<scanPopupAltModeSecs>3</scanPopupAltModeSecs>
|
||||||
|
<ignoreOwnClipboardChanges>0</ignoreOwnClipboardChanges>
|
||||||
|
<scanToMainWindow>0</scanToMainWindow>
|
||||||
|
<ignoreDiacritics>0</ignoreDiacritics>
|
||||||
|
<showScanFlag>0</showScanFlag>
|
||||||
|
<scanPopupUseUIAutomation>1</scanPopupUseUIAutomation>
|
||||||
|
<scanPopupUseIAccessibleEx>1</scanPopupUseIAccessibleEx>
|
||||||
|
<scanPopupUseGDMessage>1</scanPopupUseGDMessage>
|
||||||
|
<scanPopupUnpinnedWindowFlags>0</scanPopupUnpinnedWindowFlags>
|
||||||
|
<scanPopupUnpinnedBypassWMHint>0</scanPopupUnpinnedBypassWMHint>
|
||||||
|
<pronounceOnLoadMain>0</pronounceOnLoadMain>
|
||||||
|
<pronounceOnLoadPopup>0</pronounceOnLoadPopup>
|
||||||
|
<useInternalPlayer>1</useInternalPlayer>
|
||||||
|
<internalPlayerBackend>FFmpeg+libao</internalPlayerBackend>
|
||||||
|
<audioPlaybackProgram>mplayer</audioPlaybackProgram>
|
||||||
|
<alwaysOnTop>1</alwaysOnTop>
|
||||||
|
<searchInDock>1</searchInDock>
|
||||||
|
<historyStoreInterval>0</historyStoreInterval>
|
||||||
|
<favoritesStoreInterval>0</favoritesStoreInterval>
|
||||||
|
<confirmFavoritesDeletion>1</confirmFavoritesDeletion>
|
||||||
|
<proxyserver enabled="0" useSystemProxy="0">
|
||||||
|
<type>0</type>
|
||||||
|
<host></host>
|
||||||
|
<port>3128</port>
|
||||||
|
<user></user>
|
||||||
|
<password></password>
|
||||||
|
<systemProxyUser></systemProxyUser>
|
||||||
|
<systemProxyPassword></systemProxyPassword>
|
||||||
|
</proxyserver>
|
||||||
|
<disallowContentFromOtherSites>0</disallowContentFromOtherSites>
|
||||||
|
<enableWebPlugins>0</enableWebPlugins>
|
||||||
|
<hideGoldenDictHeader>0</hideGoldenDictHeader>
|
||||||
|
<maxNetworkCacheSize>50</maxNetworkCacheSize>
|
||||||
|
<clearNetworkCacheOnExit>1</clearNetworkCacheOnExit>
|
||||||
|
<maxStringsInHistory>500</maxStringsInHistory>
|
||||||
|
<storeHistory>1</storeHistory>
|
||||||
|
<alwaysExpandOptionalParts>0</alwaysExpandOptionalParts>
|
||||||
|
<addonStyle></addonStyle>
|
||||||
|
<collapseBigArticles>0</collapseBigArticles>
|
||||||
|
<articleSizeLimit>2000</articleSizeLimit>
|
||||||
|
<limitInputPhraseLength>0</limitInputPhraseLength>
|
||||||
|
<inputPhraseLengthLimit>1000</inputPhraseLengthLimit>
|
||||||
|
<maxDictionaryRefsInContextMenu>20</maxDictionaryRefsInContextMenu>
|
||||||
|
<trackClipboardChanges>0</trackClipboardChanges>
|
||||||
|
<synonymSearchEnabled>1</synonymSearchEnabled>
|
||||||
|
<fullTextSearch>
|
||||||
|
<searchMode>0</searchMode>
|
||||||
|
<matchCase>0</matchCase>
|
||||||
|
<maxArticlesPerDictionary>100</maxArticlesPerDictionary>
|
||||||
|
<maxDistanceBetweenWords>2</maxDistanceBetweenWords>
|
||||||
|
<useMaxArticlesPerDictionary>0</useMaxArticlesPerDictionary>
|
||||||
|
<useMaxDistanceBetweenWords>1</useMaxDistanceBetweenWords>
|
||||||
|
<dialogGeometry></dialogGeometry>
|
||||||
|
<disabledTypes></disabledTypes>
|
||||||
|
<enabled>1</enabled>
|
||||||
|
<ignoreWordsOrder>0</ignoreWordsOrder>
|
||||||
|
<ignoreDiacritics>0</ignoreDiacritics>
|
||||||
|
<maxDictionarySize>0</maxDictionarySize>
|
||||||
|
</fullTextSearch>
|
||||||
|
</preferences>
|
||||||
|
<lastMainGroupId>0</lastMainGroupId>
|
||||||
|
<lastPopupGroupId>0</lastPopupGroupId>
|
||||||
|
<popupWindowState>AAAA/wAAAAH9AAAAAAAAAg0AAAGTAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAQAAAAEAAAAaAGQAaQBjAHQAaQBvAG4AYQByAHkAQgBhAHIDAAAAAP////8AAAAAAAAAAA==</popupWindowState>
|
||||||
|
<popupWindowGeometry>AdnQywADAAAAAAC6AAABEgAAAuYAAAKkAAAAugAAARIAAALmAAACpAAAAAAAAAAABVYAAAC6AAABEgAAAuYAAAKk</popupWindowGeometry>
|
||||||
|
<pinPopupWindow>0</pinPopupWindow>
|
||||||
|
<popupWindowAlwaysOnTop>0</popupWindowAlwaysOnTop>
|
||||||
|
<mainWindowState>AAAA/wAAAAH9AAAAAgAAAAAAAADMAAAC0PwCAAAAAfsAAAAUAHMAZQBhAHIAYwBoAFAAYQBuAGUBAAAAFAAAAtAAAAB9AP///wAAAAEAAADMAAAC0PwCAAAAA/sAAAASAGQAaQBjAHQAcwBQAGEAbgBlAQAAABQAAAFvAAAAYQD////7AAAAGgBmAGEAdgBvAHIAaQB0AGUAcwBQAGEAbgBlAAAAABQAAALQAAAAYQD////7AAAAFgBoAGkAcwB0AG8AcgB5AFAAYQBuAGUBAAABhAAAAWAAAABhAP///wAAA7QAAALQAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAUAG4AYQB2AFQAbwBvAGwAYgBhAHIAAAAAAP////8AAAAAAAAAAAAAABoAZABpAGMAdABpAG8AbgBhAHIAeQBCAGEAcgAAAAAA/////wAAAAAAAAAA</mainWindowState>
|
||||||
|
<mainWindowGeometry>AdnQywADAAAAAAAEAAAAGAAABVEAAAL7AAAABAAAABgAAAVRAAAC+wAAAAAAAAAABVYAAAAEAAAAGAAABVEAAAL7</mainWindowGeometry>
|
||||||
|
<helpWindowGeometry>AdnQywADAAAAAAF3AAAAgwAAA9AAAAJGAAABeAAAAIQAAAPPAAACRQAAAAAAAAAABVYAAAF4AAAAhAAAA88AAAJF</helpWindowGeometry>
|
||||||
|
<helpSplitterState>AAAA/wAAAAEAAAACAAABBAAABAAB/////wEAAAABAA==</helpSplitterState>
|
||||||
|
<dictInfoGeometry>AdnQywADAAAAAAF1AAAAmgAAA84AAAIrAAABdgAAAJsAAAPNAAACKgAAAAAAAAAABVYAAAF2AAAAmwAAA80AAAIq</dictInfoGeometry>
|
||||||
|
<inspectorGeometry></inspectorGeometry>
|
||||||
|
<timeForNewReleaseCheck></timeForNewReleaseCheck>
|
||||||
|
<skippedRelease></skippedRelease>
|
||||||
|
<showingDictBarNames>1</showingDictBarNames>
|
||||||
|
<usingSmallIconsInToolbars>1</usingSmallIconsInToolbars>
|
||||||
|
<editDictionaryCommandLine></editDictionaryCommandLine>
|
||||||
|
<maxPictureWidth>0</maxPictureWidth>
|
||||||
|
<maxHeadwordSize>256</maxHeadwordSize>
|
||||||
|
<maxHeadwordsToExpand>0</maxHeadwordsToExpand>
|
||||||
|
<headwordsDialog>
|
||||||
|
<searchMode>0</searchMode>
|
||||||
|
<matchCase>0</matchCase>
|
||||||
|
<autoApply>0</autoApply>
|
||||||
|
<headwordsExportPath></headwordsExportPath>
|
||||||
|
<headwordsDialogGeometry></headwordsDialogGeometry>
|
||||||
|
</headwordsDialog>
|
||||||
|
</config>
|
||||||
|
''
|
||||||
2
lib/home.nix
Normal file
2
lib/home.nix
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# https://github.com/hercules-ci/gitignore.nix/pull/58/files
|
||||||
|
path: ~/. + path
|
||||||
1913
lib/hot-rotation/lyrik.nix
Normal file
1913
lib/hot-rotation/lyrik.nix
Normal file
File diff suppressed because it is too large
Load Diff
23
lib/keyboards/arabic
Normal file
23
lib/keyboards/arabic
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// Arabic keyboard using Buckwalter transliteration
|
||||||
|
// http://www.qamus.org/transliteration.htm
|
||||||
|
// Martin Vidner
|
||||||
|
// stolen from https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/2505a3ec2605ea7303bc6de68acf96578f0fd424/symbols/ara#L179
|
||||||
|
|
||||||
|
// TODO 06CC ARABIC LETTER FARSI YEH
|
||||||
|
|
||||||
|
default partial alphanumeric_keys
|
||||||
|
xkb_symbols "buckwalter" {
|
||||||
|
include "ara(buckwalter)"
|
||||||
|
name[Group1] = "Arabic (Buckwalter + Persian)";
|
||||||
|
|
||||||
|
key <AE09> {[ 0x1000669, parenleft ] };
|
||||||
|
key <AE10> {[ 0x1000660, parenright ] };
|
||||||
|
key <AD10> {[ Arabic_tehmarbuta, 0x100067E ] }; // پ
|
||||||
|
key <AD11> {[ 0x100200C, 0x1000671 ] }; // alif wasla, ZWNJ
|
||||||
|
key <AD12> {[ 0x10006C0, Arabic_hamzaonyeh ] }; // ۀ
|
||||||
|
key <AC05> {[ Arabic_ghain, 0x10006AF ] }; // گ
|
||||||
|
key <AC07> {[ Arabic_jeem, 0x1000686 ] }; // چ
|
||||||
|
key <AB03> {[ 0x10006A9, 0x1000698 ] }; // ک ژ
|
||||||
|
key <AB04> {[ Arabic_theh, 0x10006A4 ] }; // ڤ
|
||||||
|
key <AB09> {[ period, Arabic_hamzaonalef ] };
|
||||||
|
};
|
||||||
10
lib/local-network.nix
Normal file
10
lib/local-network.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
8
lib/mycelium-network.nix
Normal file
8
lib/mycelium-network.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
zaatar = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
|
||||||
|
fatteh = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
|
||||||
|
ful = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
|
||||||
|
kabsa = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
|
||||||
|
makanek = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
|
||||||
|
manakish = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
|
niveumPackages,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# watcher scripts
|
# watcher scripts
|
||||||
@@ -29,7 +30,7 @@
|
|||||||
nick ? ''"$PANOPTIKON_WATCHER"-watcher'',
|
nick ? ''"$PANOPTIKON_WATCHER"-watcher'',
|
||||||
}:
|
}:
|
||||||
pkgs.writers.writeDash "kpaste-irc-reporter" ''
|
pkgs.writers.writeDash "kpaste-irc-reporter" ''
|
||||||
KPASTE_CONTENT_TYPE=text/plain ${pkgs.kpaste}/bin/kpaste \
|
KPASTE_CONTENT_TYPE=text/plain ${niveumPackages.kpaste}/bin/kpaste \
|
||||||
| ${pkgs.gnused}/bin/sed -n "${
|
| ${pkgs.gnused}/bin/sed -n "${
|
||||||
if retiolumLink
|
if retiolumLink
|
||||||
then "2"
|
then "2"
|
||||||
|
|||||||
39
lib/retiolum-network.nix
Normal file
39
lib/retiolum-network.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
kabsa = {
|
||||||
|
ipv4 = "10.243.2.4";
|
||||||
|
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
||||||
|
};
|
||||||
|
|
||||||
|
ful = {
|
||||||
|
ipv4 = "10.243.2.107";
|
||||||
|
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
|
||||||
|
};
|
||||||
|
|
||||||
|
zaatar = {
|
||||||
|
ipv4 = "10.243.2.34";
|
||||||
|
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
||||||
|
};
|
||||||
|
|
||||||
|
makanek = {
|
||||||
|
ipv4 = "10.243.2.84";
|
||||||
|
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
|
||||||
|
};
|
||||||
|
|
||||||
|
fatteh = {
|
||||||
|
ipv6 = "42:0:3c46:aa73:82b0:14d7:7bf8:bf2";
|
||||||
|
ipv4 = "10.243.2.77";
|
||||||
|
};
|
||||||
|
|
||||||
|
manakish = {
|
||||||
|
ipv4 = "10.243.2.85";
|
||||||
|
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
|
||||||
|
};
|
||||||
|
tabula = {
|
||||||
|
ipv4 = "10.243.2.78";
|
||||||
|
ipv6 = "";
|
||||||
|
};
|
||||||
|
tahina = {
|
||||||
|
ipv4 = "10.243.2.74";
|
||||||
|
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
|
||||||
|
};
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
175
lib/style.css
Normal file
175
lib/style.css
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
* {
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
/* `otf-font-awesome` is required to be installed for icons */
|
||||||
|
font-family: FontAwesome, monospace;
|
||||||
|
background-color: transparent;
|
||||||
|
border-bottom: 0px;
|
||||||
|
color: #ebdbb2;
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar.empty #window {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
window#waybar.empty {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
window#waybar.solo {
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
.modules-right {
|
||||||
|
margin: 10px 10px 0 0;
|
||||||
|
}
|
||||||
|
.modules-center {
|
||||||
|
margin: 10px 0 0 0;
|
||||||
|
}
|
||||||
|
.modules-left {
|
||||||
|
margin: 10px 0 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
/* Use box-shadow instead of border so the text isn't offset */
|
||||||
|
/* box-shadow: inset 0 -3px transparent; */
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
/*
|
||||||
|
button:hover {
|
||||||
|
background: inherit;
|
||||||
|
box-shadow: inset 0 -3px #ebdbb2;
|
||||||
|
} */
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
background-color: #282828;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 5px;
|
||||||
|
background-color: transparent;
|
||||||
|
color: #ebdbb2;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:first-child {
|
||||||
|
border-radius: 5px 0 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:last-child {
|
||||||
|
border-radius: 0 5px 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: #d79921;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background-color: #665c54;
|
||||||
|
/* box-shadow: inset 0 -3px #ffffff; */
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: #b16286;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibitor,
|
||||||
|
#cava,
|
||||||
|
#scratchpad,
|
||||||
|
#mode,
|
||||||
|
#window,
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#backlight,
|
||||||
|
#wireplumber,
|
||||||
|
#tray,
|
||||||
|
#mpris,
|
||||||
|
#load {
|
||||||
|
padding: 0 10px;
|
||||||
|
background-color: #282828;
|
||||||
|
color: #ebdbb2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background-color: #689d6a;
|
||||||
|
color: #282828;
|
||||||
|
/* box-shadow: inset 0 -3px #ffffff; */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the leftmost module, omit left margin */
|
||||||
|
.modules-left > widget:first-child > #workspaces {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the rightmost module, omit right margin */
|
||||||
|
.modules-right > widget:last-child > #workspaces {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cava {
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
background-color: #98971a;
|
||||||
|
color: #282828;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: #282828;
|
||||||
|
color: #ebdbb2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Using steps() instead of linear as a timing function to limit cpu usage */
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: #cc241d;
|
||||||
|
color: #ebdbb2;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: steps(12);
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
label:focus {
|
||||||
|
background-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wireplumber.muted {
|
||||||
|
background-color: #458588;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .passive {
|
||||||
|
-gtk-icon-effect: dim;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .needs-attention {
|
||||||
|
-gtk-icon-effect: highlight;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpris.playing {
|
||||||
|
background-color: #d79921;
|
||||||
|
color: #282828;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray menu {
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scratchpad.empty {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
{
|
|
||||||
kabsa = {
|
|
||||||
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk";
|
|
||||||
syncthingId = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
|
||||||
retiolum = {
|
|
||||||
ipv4 = "10.243.2.4";
|
|
||||||
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
|
||||||
};
|
|
||||||
mycelium.ipv6 = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
|
|
||||||
};
|
|
||||||
manakish = {
|
|
||||||
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB";
|
|
||||||
syncthingId = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
|
||||||
retiolum = {
|
|
||||||
ipv4 = "10.243.2.85";
|
|
||||||
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
|
|
||||||
};
|
|
||||||
mycelium.ipv6 = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
|
|
||||||
};
|
|
||||||
fatteh = {
|
|
||||||
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y";
|
|
||||||
syncthingId = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC";
|
|
||||||
retiolum = {
|
|
||||||
ipv6 = "42:0:3c46:aa73:82b0:14d7:7bf8:bf2";
|
|
||||||
ipv4 = "10.243.2.77";
|
|
||||||
};
|
|
||||||
mycelium.ipv6 = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
|
|
||||||
};
|
|
||||||
kibbeh = {
|
|
||||||
syncthingId = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
|
||||||
};
|
|
||||||
ful = {
|
|
||||||
externalIp = "130.61.217.114";
|
|
||||||
retiolum = {
|
|
||||||
ipv4 = "10.243.2.107";
|
|
||||||
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
|
|
||||||
};
|
|
||||||
mycelium.ipv6 = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
|
|
||||||
};
|
|
||||||
zaatar = {
|
|
||||||
retiolum = {
|
|
||||||
ipv4 = "10.243.2.34";
|
|
||||||
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
|
||||||
};
|
|
||||||
mycelium.ipv6 = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
|
|
||||||
};
|
|
||||||
makanek = {
|
|
||||||
externalIp = "88.99.83.173";
|
|
||||||
retiolum = {
|
|
||||||
ipv4 = "10.243.2.84";
|
|
||||||
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
|
|
||||||
};
|
|
||||||
mycelium.ipv6 = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
|
|
||||||
};
|
|
||||||
officejet = {
|
|
||||||
internalIp = "192.168.0.251";
|
|
||||||
};
|
|
||||||
router = {
|
|
||||||
internalIp = "192.168.0.1";
|
|
||||||
};
|
|
||||||
tabula = {
|
|
||||||
retiolum = {
|
|
||||||
ipv4 = "10.243.2.78";
|
|
||||||
ipv6 = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
tahina = {
|
|
||||||
retiolum = {
|
|
||||||
ipv4 = "10.243.2.74";
|
|
||||||
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -91,7 +91,6 @@ local language_servers = {
|
|||||||
-- tsserver = {}, -- typescript-language-server
|
-- tsserver = {}, -- typescript-language-server
|
||||||
cssls = {},
|
cssls = {},
|
||||||
elmls = {}, -- elm-language-server
|
elmls = {}, -- elm-language-server
|
||||||
gopls = {}, -- gopls
|
|
||||||
denols = {}, -- deno built in
|
denols = {}, -- deno built in
|
||||||
bashls = {}, -- bash-language-server
|
bashls = {}, -- bash-language-server
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
@@ -155,11 +154,10 @@ local language_servers = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for server, settings in pairs(language_servers) do
|
for server, settings in pairs(language_servers) do
|
||||||
vim.lsp.config(server, {
|
require('lspconfig')[server].setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
settings = settings,
|
settings = settings,
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
}
|
||||||
vim.lsp.enable(server)
|
|
||||||
end
|
end
|
||||||
@@ -102,7 +102,6 @@ augroup filetypes
|
|||||||
autocmd bufnewfile,bufread urls,config set filetype=conf
|
autocmd bufnewfile,bufread urls,config set filetype=conf
|
||||||
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
|
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
|
||||||
autocmd bufnewfile,bufread *.md packadd vim-pandoc | packadd vim-pandoc-syntax | set filetype=pandoc
|
autocmd bufnewfile,bufread *.md packadd vim-pandoc | packadd vim-pandoc-syntax | set filetype=pandoc
|
||||||
autocmd bufnewfile,bufread *.ex,*.exs packadd vim-elixir | set filetype=elixir
|
|
||||||
autocmd filetype haskell packadd haskell-vim | set keywordprg=hoogle\ -i
|
autocmd filetype haskell packadd haskell-vim | set keywordprg=hoogle\ -i
|
||||||
autocmd filetype javascript packadd vim-javascript
|
autocmd filetype javascript packadd vim-javascript
|
||||||
autocmd filetype make setlocal noexpandtab
|
autocmd filetype make setlocal noexpandtab
|
||||||
@@ -125,12 +124,3 @@ set complete+=kspell
|
|||||||
let g:pandoc#syntax#conceal#use = 0
|
let g:pandoc#syntax#conceal#use = 0
|
||||||
let g:pandoc#modules#disabled = []
|
let g:pandoc#modules#disabled = []
|
||||||
let g:pandoc#spell#default_langs = ['en', 'de']
|
let g:pandoc#spell#default_langs = ['en', 'de']
|
||||||
|
|
||||||
autocmd! User GoyoEnter Limelight
|
|
||||||
autocmd! User GoyoLeave Limelight!
|
|
||||||
|
|
||||||
|
|
||||||
" Disable Copilot by default
|
|
||||||
let b:copilot_enabled = v:false
|
|
||||||
" keymap to toggle it enabled
|
|
||||||
nnoremap <leader>gc :let b:copilot_enabled = !b:copilot_enabled<CR>
|
|
||||||
@@ -1,140 +0,0 @@
|
|||||||
{
|
|
||||||
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 ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
47
modules/htgen.nix
Normal file
47
modules/htgen.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
||||||
69
modules/networkmanager-declarative.nix
Normal file
69
modules/networkmanager-declarative.nix
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# 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";
|
default = "daily";
|
||||||
};
|
};
|
||||||
loadCredential = lib.mkOption {
|
loadCredential = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.string;
|
||||||
description = ''
|
description = ''
|
||||||
This can be used to pass secrets to the systemd service without adding them to the nix store.
|
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 = {
|
imp = {
|
||||||
systemd.services.power-action = {
|
systemd.services.power-action = {
|
||||||
serviceConfig = {
|
serviceConfig = rec {
|
||||||
ExecStart = startScript;
|
ExecStart = startScript;
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,33 +3,33 @@
|
|||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
lib,
|
lib,
|
||||||
pandoc,
|
pandoc,
|
||||||
}:
|
}: let
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
owner = "kamalist";
|
||||||
pname = "auc";
|
in
|
||||||
version = "2019-04-02";
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "auc";
|
||||||
|
version = "2019-04-02";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "kamalist";
|
inherit owner;
|
||||||
repo = "AUC";
|
repo = "AUC";
|
||||||
rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3";
|
rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3";
|
||||||
sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la";
|
sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{bin,man/man1}
|
mkdir -p $out/{bin,man/man1}
|
||||||
install auc $out/bin
|
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
|
${pandoc}/bin/pandoc -V title=${lib.escapeShellArg 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.
|
|
||||||
'';
|
'';
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = [ maintainers.kmein ];
|
meta = with lib; {
|
||||||
platforms = platforms.all;
|
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;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
writers,
|
writers,
|
||||||
curl,
|
curl,
|
||||||
}:
|
}:
|
||||||
writers.writeDashBin "cht.sh" ''
|
writers.writeDashBin "so" ''
|
||||||
IFS=+
|
IFS=+
|
||||||
${curl}/bin/curl -sSL http://cht.sh/"$*"
|
${curl}/bin/curl -sSL http://cht.sh/"$*"
|
||||||
''
|
''
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{ coreutils, chromium }:
|
{ writers, chromium }:
|
||||||
chromium.override {
|
writers.writeDashBin "cro" ''
|
||||||
commandLineArgs = [
|
${chromium}/bin/chromium \
|
||||||
"--disable-sync"
|
--disable-sync \
|
||||||
"--no-default-browser-check"
|
--no-default-browser-check \
|
||||||
"--no-first-run"
|
--no-first-run \
|
||||||
"--user-data-dir=$(${coreutils}/bin/mktemp -p $XDG_RUNTIME_DIR -d chromium-XXXXXX)"
|
--user-data-dir="$(mktemp -d)" \
|
||||||
"--incognito"
|
--incognito \
|
||||||
];
|
"$@"
|
||||||
}
|
''
|
||||||
|
|||||||
247
packages/dashboard/default.nix
Normal file
247
packages/dashboard/default.nix
Normal file
@@ -0,0 +1,247 @@
|
|||||||
|
{
|
||||||
|
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,13 +1,7 @@
|
|||||||
{yarn2nix-moretea, lib}:
|
{yarn2nix-moretea}:
|
||||||
yarn2nix-moretea.mkYarnPackage {
|
yarn2nix-moretea.mkYarnPackage {
|
||||||
name = "devanagari";
|
name = "devanagari";
|
||||||
src = lib.fileset.toSource {
|
src = ./.;
|
||||||
root = ./.;
|
|
||||||
fileset = lib.fileset.unions [
|
|
||||||
./devanagari.js
|
|
||||||
./package.json
|
|
||||||
];
|
|
||||||
};
|
|
||||||
packageJson = ./package.json;
|
packageJson = ./package.json;
|
||||||
yarnLock = ./yarn.lock;
|
yarnLock = ./yarn.lock;
|
||||||
}
|
}
|
||||||
|
|||||||
43
packages/dic.nix
Normal file
43
packages/dic.nix
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
}
|
||||||
24
packages/dirmir.nix
Normal file
24
packages/dirmir.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{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
|
||||||
|
''
|
||||||
64
packages/dmenu-bluetooth.nix
Normal file
64
packages/dmenu-bluetooth.nix
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
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
|
||||||
|
''
|
||||||
42
packages/dmenu-scrot.nix
Normal file
42
packages/dmenu-scrot.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
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
|
||||||
|
''
|
||||||
7
packages/dns-sledgehammer.nix
Normal file
7
packages/dns-sledgehammer.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
writers,
|
||||||
|
coreutils,
|
||||||
|
}:
|
||||||
|
writers.writeDashBin "dns-sledgehammer" ''
|
||||||
|
${coreutils}/bin/printf '%s\n' 'nameserver 1.1.1.1' 'options edns0' > /etc/resolv.conf
|
||||||
|
''
|
||||||
@@ -12,8 +12,8 @@ writers.writeBashBin "fzfmenu" ''
|
|||||||
|
|
||||||
PATH=$PATH:${lib.makeBinPath [st fzf dash]}
|
PATH=$PATH:${lib.makeBinPath [st fzf dash]}
|
||||||
|
|
||||||
input=$(mktemp -p "$XDG_RUNTIME_DIR" -u --suffix .fzfmenu.input)
|
input=$(mktemp -u --suffix .fzfmenu.input)
|
||||||
output=$(mktemp -p "$XDG_RUNTIME_DIR" -u --suffix .fzfmenu.output)
|
output=$(mktemp -u --suffix .fzfmenu.output)
|
||||||
mkfifo "$input"
|
mkfifo "$input"
|
||||||
mkfifo "$output"
|
mkfifo "$output"
|
||||||
chmod 600 "$input" "$output"
|
chmod 600 "$input" "$output"
|
||||||
|
|||||||
28
packages/genius.nix
Normal file
28
packages/genius.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
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
|
||||||
|
''
|
||||||
23
packages/git-preview.nix
Normal file
23
packages/git-preview.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
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"
|
||||||
|
''
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
{ 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,20 +9,19 @@
|
|||||||
gnugrep,
|
gnugrep,
|
||||||
qrencode,
|
qrencode,
|
||||||
texlive,
|
texlive,
|
||||||
util-linux,
|
utillinux,
|
||||||
zbar,
|
zbar,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation rec {
|
||||||
name = "hc-${finalAttrs.version}";
|
name = "hc-${meta.version}";
|
||||||
version = "1.0.0";
|
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://cgit.krebsco.de/hc";
|
url = "https://cgit.krebsco.de/hc";
|
||||||
rev = "refs/tags/v${finalAttrs.version}";
|
rev = "refs/tags/v${meta.version}";
|
||||||
sha256 = "09349gja22p0j3xs082kp0fnaaada14bafszn4r3q7rg1id2slfb";
|
sha256 = "09349gja22p0j3xs082kp0fnaaada14bafszn4r3q7rg1id2slfb";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [makeWrapper];
|
||||||
|
|
||||||
buildPhase = null;
|
buildPhase = null;
|
||||||
|
|
||||||
@@ -32,21 +31,19 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
cp $src/bin/hc $out/bin/hc
|
cp $src/bin/hc $out/bin/hc
|
||||||
|
|
||||||
wrapProgram $out/bin/hc \
|
wrapProgram $out/bin/hc \
|
||||||
--prefix PATH : ${
|
--prefix PATH : ${lib.makeBinPath [
|
||||||
lib.makeBinPath [
|
coreutils
|
||||||
coreutils
|
findutils
|
||||||
findutils
|
gawk
|
||||||
gawk
|
gnugrep
|
||||||
gnugrep
|
qrencode
|
||||||
qrencode
|
texlive.combined.scheme-full
|
||||||
texlive.combined.scheme-full
|
utillinux
|
||||||
util-linux
|
zbar
|
||||||
zbar
|
]}
|
||||||
]
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
version = finalAttrs.version;
|
version = "1.0.0";
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
writers,
|
writers,
|
||||||
fetchurl,
|
fetchurl,
|
||||||
xan,
|
xan,
|
||||||
util-linux,
|
|
||||||
}: let
|
}: let
|
||||||
database = fetchurl {
|
database = fetchurl {
|
||||||
url = "http://c.krebsco.de/greek.csv";
|
url = "http://c.krebsco.de/greek.csv";
|
||||||
@@ -10,5 +9,5 @@
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
writers.writeDashBin "heuretes" ''
|
writers.writeDashBin "heuretes" ''
|
||||||
${xan}/bin/xan search -s simple "$*" ${database} | ${util-linux}/bin/column -s, -t
|
${xan}/bin/xan search -s simple "^$*$" ${database} | ${xan}/bin/xan table
|
||||||
''
|
''
|
||||||
|
|||||||
31
packages/htgen.nix
Normal file
31
packages/htgen.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
}
|
||||||
13
packages/infschmv.nix
Normal file
13
packages/infschmv.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
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 -
|
||||||
|
''
|
||||||
29
packages/iolanguage.nix
Normal file
29
packages/iolanguage.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user