mirror of
https://github.com/kmein/niveum
synced 2026-03-16 18:21: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
|
||||
|
||||
> I must Create a System, or be enslav'd by another Man's. —William Blake
|
||||
|
||||
> [nĭvĕus](https://logeion.uchicago.edu/niveus), a, um, adj. [nix], _of_ or _from snow, snowy, snow-_ (poet.)
|
||||
>
|
||||
> 1. Lit.: aggeribus niveis informis, Verg. G. 3, 354: aqua, _cooled with snow_, Mart. 12, 17, 6; cf. id. 14, 104 and 117: mons, _covered with snow_, Cat. 64, 240.—
|
||||
@@ -12,6 +10,3 @@
|
||||
> das ist ja pure poesie —[riotbib](https://github.com/riotbib/)
|
||||
|
||||
> Deine Configs sind wunderschön <3 —[flxai](https://github.com/flxai/)
|
||||
|
||||
## To do
|
||||
- [ ] get rid of `nixinate`
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
darwin = lib.strings.hasSuffix "-darwin" pkgs.stdenv.hostPlatform.system;
|
||||
darwin = lib.strings.hasSuffix "-darwin" pkgs.system;
|
||||
in {
|
||||
environment.systemPackages =
|
||||
[
|
||||
@@ -36,12 +37,12 @@ in {
|
||||
pkgs.bc # calculator
|
||||
pkgs.pari # gp -- better calculator
|
||||
pkgs.ts
|
||||
pkgs.vimv
|
||||
pkgs.vg
|
||||
pkgs.fkill
|
||||
pkgs.cyberlocker-tools
|
||||
pkgs.untilport
|
||||
pkgs.kpaste
|
||||
niveumPackages.vimv
|
||||
niveumPackages.vg
|
||||
niveumPackages.fkill
|
||||
niveumPackages.cyberlocker-tools
|
||||
niveumPackages.untilport
|
||||
niveumPackages.kpaste
|
||||
# HARDWARE
|
||||
pkgs.pciutils # for lspci
|
||||
]
|
||||
@@ -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
|
||||
take = pkgs.writers.writeDash "take" ''
|
||||
mkdir "$1" && cd "$1"
|
||||
'';
|
||||
cdt = pkgs.writers.writeDash "cdt" ''
|
||||
cd $(mktemp -p "$XDG_RUNTIME_DIR" -d "cdt-XXXXXX")
|
||||
cd "$(mktemp -d)"
|
||||
pwd
|
||||
'';
|
||||
wcd = pkgs.writers.writeDash "wcd" ''
|
||||
@@ -91,7 +85,7 @@ in {
|
||||
'';
|
||||
in
|
||||
{
|
||||
nixi = "nix repl nixpkgs";
|
||||
nixi = "nix repl '<nixpkgs>'";
|
||||
take = "source ${take}";
|
||||
wcd = "source ${wcd}";
|
||||
where = "source ${where}";
|
||||
|
||||
120
configs/aerc.nix
120
configs/aerc.nix
@@ -2,18 +2,20 @@
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: let
|
||||
inherit (import ../lib/email.nix) defaults thunderbirdProfile;
|
||||
in {
|
||||
age.secrets = {
|
||||
email-password-ical-ephemeris = {
|
||||
file = ../secrets/email-password-ical-ephemeris.age;
|
||||
email-password-cock = {
|
||||
file = ../secrets/email-password-cock.age;
|
||||
owner = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
};
|
||||
email-password-cock = {
|
||||
file = ../secrets/email-password-cock.age;
|
||||
email-password-letos = {
|
||||
file = ../secrets/email-password-letos.age;
|
||||
owner = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
@@ -41,15 +43,14 @@
|
||||
extraConfig = {
|
||||
database.path = config.home-manager.users.me.accounts.email.maildirBasePath;
|
||||
new.tags = "";
|
||||
user.name = pkgs.lib.niveum.email.defaults.realName;
|
||||
user.name = defaults.realName;
|
||||
user.primary_email = config.home-manager.users.me.accounts.email.accounts.posteo.address;
|
||||
};
|
||||
};
|
||||
|
||||
programs.mbsync = {
|
||||
enable = true;
|
||||
extraConfig = lib.concatStringsSep "\n\n" (
|
||||
lib.mapAttrsToList (name: account: ''
|
||||
extraConfig = lib.concatStringsSep "\n\n" (lib.mapAttrsToList (name: account: ''
|
||||
IMAPAccount ${name}
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
Host ${account.imap.host}
|
||||
@@ -73,55 +74,46 @@
|
||||
Patterns *
|
||||
Remove None
|
||||
SyncState *
|
||||
'') config.home-manager.users.me.accounts.email.accounts
|
||||
);
|
||||
'')
|
||||
config.home-manager.users.me.accounts.email.accounts);
|
||||
};
|
||||
|
||||
accounts.email.accounts = {
|
||||
cock =
|
||||
let
|
||||
mailhost = "mail.cock.li";
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
address = "2210@cock.li";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
address = address;
|
||||
userName = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
|
||||
realName = "2210";
|
||||
imap.host = mailhost;
|
||||
imap.host = "mail.cock.li";
|
||||
imap.port = 993;
|
||||
smtp.host = mailhost;
|
||||
smtp.host = imap.host;
|
||||
smtp.port = 25;
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
ical-ephemeris =
|
||||
let
|
||||
address = "ical.ephemeris@web.de";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
userName = address;
|
||||
realName = "Kieran from iCal Ephemeris";
|
||||
address = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-ical-ephemeris.path}";
|
||||
imap.host = "imap.web.de";
|
||||
letos =
|
||||
lib.recursiveUpdate defaults
|
||||
{
|
||||
userName = "slfletos";
|
||||
address = "letos.sprachlit@hu-berlin.de";
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}";
|
||||
imap.host = "mailbox.cms.hu-berlin.de";
|
||||
imap.port = 993;
|
||||
smtp.host = "smtp.web.de";
|
||||
smtp.port = 587;
|
||||
smtp.host = "mailhost.cms.hu-berlin.de";
|
||||
smtp.port = 25;
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
posteo =
|
||||
let
|
||||
mailhost = "posteo.de";
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
address = "kieran.meinhardt@posteo.net";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
address = address;
|
||||
aliases = [ "kmein@posteo.de" ];
|
||||
aliases = ["kmein@posteo.de"];
|
||||
userName = address;
|
||||
imap.host = mailhost;
|
||||
imap.host = "posteo.de";
|
||||
imap.port = 993;
|
||||
imap.tls.enable = true;
|
||||
smtp.host = mailhost;
|
||||
smtp.host = imap.host;
|
||||
smtp.port = 465;
|
||||
smtp.tls.enable = true;
|
||||
primary = true;
|
||||
@@ -140,7 +132,7 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
};
|
||||
profiles.${pkgs.lib.niveum.email.thunderbirdProfile} = {
|
||||
profiles.${thunderbirdProfile} = {
|
||||
isDefault = true;
|
||||
settings = {
|
||||
"mail.default_send_format" = 1;
|
||||
@@ -148,8 +140,10 @@
|
||||
"msgcompose.text_color" = config.lib.stylix.colors.withHashtag.base00;
|
||||
"msgcompose.background_color" = config.lib.stylix.colors.withHashtag.base05;
|
||||
};
|
||||
userChrome = '''';
|
||||
userContent = '''';
|
||||
userChrome = ''
|
||||
'';
|
||||
userContent = ''
|
||||
'';
|
||||
withExternalGnupg = false;
|
||||
};
|
||||
};
|
||||
@@ -211,7 +205,7 @@
|
||||
"*" = ":filter -x Flagged<Enter>";
|
||||
};
|
||||
view = {
|
||||
tr = ":pipe ${pkgs.trans}/bin/trans -show-original n -b -no-autocorrect<Enter>"; # https://man.sr.ht/~rjarry/aerc/integrations/translator.md
|
||||
tr = ":pipe ${niveumPackages.trans}/bin/trans -show-original n -b -no-autocorrect<Enter>"; # https://man.sr.ht/~rjarry/aerc/integrations/translator.md
|
||||
"/" = ":toggle-key-passthrough <Enter> /";
|
||||
q = ":close<Enter>";
|
||||
O = ":open<Enter>";
|
||||
@@ -284,9 +278,7 @@
|
||||
ui.spinner = ". , .";
|
||||
general.unsafe-accounts-conf = true;
|
||||
general.pgp-provider = "gpg";
|
||||
viewer = {
|
||||
pager = "${pkgs.less}/bin/less -R";
|
||||
};
|
||||
viewer = {pager = "${pkgs.less}/bin/less -R";};
|
||||
compose = {
|
||||
# address-book-cmd = "khard email --remove-first-line --parsable '%s'";
|
||||
no-attachment-warning = "(attach|attached|attachments?|anbei|Anhang|angehängt|beigefügt)";
|
||||
@@ -303,26 +295,24 @@
|
||||
"message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
||||
};
|
||||
openers =
|
||||
let
|
||||
as-pdf = pkgs.writers.writeDash "as-pdf" ''
|
||||
d=$(mktemp -p "$XDG_RUNTIME_DIR" -d)
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$d"
|
||||
}
|
||||
${pkgs.libreoffice}/bin/libreoffice --headless --convert-to pdf "$1" --outdir "$d"
|
||||
${pkgs.zathura}/bin/zathura "$d"/*.pdf
|
||||
'';
|
||||
in
|
||||
{
|
||||
"image/*" = "${pkgs.nsxiv}/bin/nsxiv";
|
||||
"application/pdf" = "${pkgs.zathura}/bin/zathura";
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = toString as-pdf;
|
||||
"application/vnd.oasis.opendocument.text" = toString as-pdf;
|
||||
"video/*" = "${pkgs.mpv}/bin/mpv";
|
||||
"audio/*" = "${pkgs.mpv}/bin/mpv";
|
||||
};
|
||||
openers = let
|
||||
as-pdf = pkgs.writers.writeDash "as-pdf" ''
|
||||
d=$(mktemp -d)
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$d"
|
||||
}
|
||||
${pkgs.libreoffice}/bin/libreoffice --headless --convert-to pdf "$1" --outdir "$d"
|
||||
${pkgs.zathura}/bin/zathura "$d"/*.pdf
|
||||
'';
|
||||
in {
|
||||
"image/*" = "${pkgs.nsxiv}/bin/nsxiv";
|
||||
"application/pdf" = "${pkgs.zathura}/bin/zathura";
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = toString as-pdf;
|
||||
"application/vnd.oasis.opendocument.text" = toString as-pdf;
|
||||
"video/*" = "${pkgs.mpv}/bin/mpv";
|
||||
"audio/*" = "${pkgs.mpv}/bin/mpv";
|
||||
};
|
||||
};
|
||||
|
||||
templates = {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: let
|
||||
inherit (import ../lib) restic;
|
||||
in {
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
inherit (restic) repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "8:00";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -38,15 +38,15 @@
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "restic-niveum" ''
|
||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "restic-mount" ''
|
||||
mountdir=$(mktemp -p "$XDG_RUNTIME_DIR" -d "restic-mount-XXXXXXX")
|
||||
mountdir=$(mktemp -d)
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -r "$mountdir"
|
||||
}
|
||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
interactiveShellInit = ''
|
||||
set -o vi
|
||||
'';
|
||||
completion.enable = true;
|
||||
enableCompletion = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: 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 {
|
||||
niveum.bots.autorenkalender = {
|
||||
enable = true;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
telebots = inputs.telebots.defaultPackage.x86_64-linux;
|
||||
reverseDirectory = "/run/telegram-reverse";
|
||||
proverbDirectory = "/run/telegram-proverb";
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
in {
|
||||
imports = [
|
||||
./logotheca.nix
|
||||
@@ -16,17 +17,13 @@ in {
|
||||
./hesychius.nix
|
||||
./smyth.nix
|
||||
./nachtischsatan.nix
|
||||
# ./tlg-wotd.nix TODO reenable
|
||||
./tlg-wotd.nix
|
||||
./celan.nix
|
||||
./nietzsche.nix
|
||||
];
|
||||
|
||||
age.secrets = {
|
||||
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = map (path:
|
||||
pkgs.lib.niveum.tmpfilesConfig {
|
||||
tmpfilesConfig {
|
||||
type = "d";
|
||||
mode = "0750";
|
||||
age = "1h";
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
niveum.bots.logotheca = {
|
||||
@@ -20,7 +22,7 @@
|
||||
"!zlwCuPiCNMSxDviFzA:4d2.org"
|
||||
];
|
||||
};
|
||||
command = "${pkgs.literature-quote}/bin/literature-quote";
|
||||
command = "${niveumPackages.literature-quote}/bin/literature-quote";
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
niveum.bots.nietzsche = {
|
||||
@@ -15,9 +16,9 @@
|
||||
set -efu
|
||||
random_number=$(( ($RANDOM % 10) + 1 ))
|
||||
if [ "$random_number" -eq 1 ]; then
|
||||
${pkgs.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
||||
${niveumPackages.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
||||
else
|
||||
${pkgs.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
||||
${niveumPackages.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
||||
fi
|
||||
'');
|
||||
};
|
||||
|
||||
@@ -20,31 +20,15 @@
|
||||
command = toString (pkgs.writers.writeDash "random-smyth" ''
|
||||
set -efu
|
||||
|
||||
good_curl() {
|
||||
${pkgs.curl}/bin/curl "$@" \
|
||||
--compressed \
|
||||
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
|
||||
-H 'Accept-Language: en-US,en;q=0.5' \
|
||||
-H 'DNT: 1' \
|
||||
-H 'Connection: keep-alive' \
|
||||
-H 'Upgrade-Insecure-Requests: 1' \
|
||||
-H 'Sec-Fetch-Dest: document' \
|
||||
-H 'Sec-Fetch-Mode: navigate' \
|
||||
-H 'Sec-Fetch-Site: cross-site' \
|
||||
-H 'Priority: u=0, i' \
|
||||
-H 'Pragma: no-cache' \
|
||||
-H 'Cache-Control: no-cache'
|
||||
}
|
||||
|
||||
RANDOM_SECTION=$(
|
||||
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.coreutils}/bin/shuf -n1 \
|
||||
| ${pkgs.gnused}/bin/sed 's/^ref="//;s/"$//'
|
||||
)
|
||||
|
||||
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.gnused}/bin/sed 's/<\/\?hr>//g' \
|
||||
| ${pkgs.pandoc}/bin/pandoc -f html -t plain --wrap=none
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
mastodonEndpoint = "https://social.krebsco.de";
|
||||
in {
|
||||
systemd.services.bot-tlg-wotd = {
|
||||
# TODO reenable
|
||||
# once https://github.com/NixOS/nixpkgs/pull/462893 is in stable NixOS
|
||||
enable = true;
|
||||
wants = ["network-online.target"];
|
||||
startAt = "9:30";
|
||||
@@ -42,8 +42,9 @@ in {
|
||||
|
||||
#ancientgreek #classics #wotd #wordoftheday
|
||||
|
||||
transliteration=$(${pkgs.writers.writePython3 "translit.py" {
|
||||
libraries = py: [ py.cltk ];
|
||||
transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" {
|
||||
# revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged
|
||||
libraries = [ pkgs.python3Packages.cltk ];
|
||||
} ''
|
||||
import sys
|
||||
from cltk.phonology.grc.transcription import Transcriber
|
||||
@@ -148,6 +149,7 @@ in {
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
|
||||
mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
pkgs.cro
|
||||
pkgs.tor-browser
|
||||
niveumPackages.cro
|
||||
pkgs.tor-browser-bundle-bin
|
||||
pkgs.firefox
|
||||
pkgs.brave
|
||||
];
|
||||
@@ -81,9 +82,5 @@
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.me = {
|
||||
stylix.targets.firefox.profileNames = ["default"];
|
||||
};
|
||||
|
||||
environment.variables.BROWSER = "firefox";
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{pkgs, ...}:
|
||||
# https://paste.sr.ht/~erictapen/11716989e489b600f237041b6d657fdf0ee17b34
|
||||
let
|
||||
name = "dst-root-ca-x3.pem";
|
||||
certificate = pkgs.stdenv.mkDerivation {
|
||||
inherit name;
|
||||
certificate = pkgs.stdenv.mkDerivation rec {
|
||||
name = "dst-root-ca-x3.pem";
|
||||
src = builtins.toFile "${name}.sed" ''
|
||||
1,/DST Root CA X3/d
|
||||
1,/-----END CERTIFICATE-----/p
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (import ../lib) tmpfilesConfig;
|
||||
in {
|
||||
systemd.user.services.systemd-tmpfiles-clean = {
|
||||
enable = true;
|
||||
wantedBy = [ "default.target" ];
|
||||
@@ -14,7 +16,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.users.me.rules = map pkgs.lib.niveum.tmpfilesConfig [
|
||||
systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [
|
||||
{
|
||||
type = "d";
|
||||
mode = "0755";
|
||||
@@ -27,7 +29,7 @@
|
||||
age = "7d";
|
||||
path = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
||||
}
|
||||
] ++ map (path: pkgs.lib.niveum.tmpfilesConfig {
|
||||
] ++ map (path: tmpfilesConfig {
|
||||
type = "L+";
|
||||
user = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
@@ -89,7 +91,7 @@
|
||||
selection="$(${megatools "ls"} | ${pkgs.fzf}/bin/fzf)"
|
||||
test -n "$selection" || exit 1
|
||||
|
||||
tmpdir="$(mktemp -p "$XDG_RUNTIME_DIR" -d)"
|
||||
tmpdir="$(mktemp -d)"
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$tmpdir"
|
||||
@@ -119,7 +121,7 @@
|
||||
cert = config.age.secrets.syncthing-cert.path;
|
||||
key = config.age.secrets.syncthing-key.path;
|
||||
settings = {
|
||||
devices = pkgs.lib.niveum.syncthingIds;
|
||||
inherit ((import ../lib).syncthing) devices;
|
||||
folders = {
|
||||
"${config.users.users.me.home}/sync" = {
|
||||
devices = ["kabsa" "manakish" "fatteh"];
|
||||
|
||||
@@ -2,11 +2,15 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
unstablePackages,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import ../lib) localAddresses kieran remoteDir;
|
||||
defaultApplications = (import ../lib).defaultApplications { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@@ -20,9 +24,12 @@ in
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
||||
dmenu = pkgs.writers.writeDashBin "dmenu" ''exec ${pkgs.wofi}/bin/wofi -dmenu "$@"'';
|
||||
};
|
||||
permittedInsecurePackages = [
|
||||
"qtwebkit-5.212.0-alpha4"
|
||||
"zotero-6.0.26"
|
||||
"electron-25.9.0"
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -65,7 +72,7 @@ in
|
||||
|
||||
users.users.me = {
|
||||
name = "kfm";
|
||||
description = pkgs.lib.niveum.kieran.name;
|
||||
description = kieran.name;
|
||||
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
@@ -87,19 +94,19 @@ in
|
||||
environment.interactiveShellInit = "export PATH=$PATH";
|
||||
environment.shellAliases =
|
||||
let
|
||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
in
|
||||
{
|
||||
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
ns = "nix-shell --run zsh";
|
||||
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
|
||||
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
|
||||
pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||
pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
||||
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
|
||||
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata --audio-format 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 = {
|
||||
agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
settings = let defaultCacheTtl = 2 * 60 * 60; in {
|
||||
default-cache-ttl = defaultCacheTtl;
|
||||
max-cache-ttl = 4 * defaultCacheTtl;
|
||||
settings = rec {
|
||||
default-cache-ttl = 2 * 60 * 60;
|
||||
max-cache-ttl = 4 * default-cache-ttl;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -158,7 +166,7 @@ in
|
||||
}
|
||||
{
|
||||
services.getty = {
|
||||
greetingLine = lib.mkForce "As-salamu alaykum wa rahmatullahi wa barakatuh!";
|
||||
greetingLine = lib.mkForce "";
|
||||
helpLine = lib.mkForce "";
|
||||
};
|
||||
}
|
||||
@@ -166,7 +174,7 @@ in
|
||||
networking.hosts = lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = [ "${name}.local" ];
|
||||
}) pkgs.lib.niveum.localAddresses;
|
||||
}) localAddresses;
|
||||
}
|
||||
{
|
||||
home-manager.users.me.home.stateVersion = "22.05";
|
||||
@@ -187,7 +195,7 @@ in
|
||||
dconf.enable = true;
|
||||
dconf.settings = {
|
||||
# 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
|
||||
./docker.nix
|
||||
./dunst.nix
|
||||
./flix.nix
|
||||
./fonts.nix
|
||||
./fzf.nix
|
||||
./git.nix
|
||||
./hledger.nix
|
||||
./htop.nix
|
||||
./uni.nix
|
||||
./fu-berlin.nix
|
||||
./i3.nix
|
||||
./niri.nix
|
||||
./i3status-rust.nix
|
||||
./keyboard
|
||||
./keyboard.nix
|
||||
./mycelium.nix
|
||||
./kdeconnect.nix
|
||||
{ home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose; }
|
||||
{ services.upower.enable = true; }
|
||||
./lb.nix
|
||||
./mpv.nix
|
||||
@@ -226,8 +237,9 @@ in
|
||||
./nix.nix
|
||||
./newsboat.nix
|
||||
./flameshot.nix
|
||||
./fritzbox.nix
|
||||
./packages.nix
|
||||
./virtualization.nix
|
||||
./picom.nix
|
||||
./stardict.nix
|
||||
./polkit.nix
|
||||
./printing.nix
|
||||
@@ -251,18 +263,38 @@ in
|
||||
'';
|
||||
}
|
||||
./tor.nix
|
||||
./stw-berlin.nix
|
||||
./mastodon-bot.nix
|
||||
{
|
||||
fileSystems."${remoteDir}/fritz" = {
|
||||
device = "//192.168.178.1/FRITZ.NAS/Backup";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"username=ftpuser"
|
||||
"password=ftppassword"
|
||||
"noauto"
|
||||
"nounix"
|
||||
"rw"
|
||||
# "noserverino" # ref https://askubuntu.com/a/1265165
|
||||
"uid=${toString config.users.users.me.uid}"
|
||||
"gid=${toString config.users.groups.users.gid}"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=1"
|
||||
"x-systemd.idle-timeout=1min"
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
home-manager.users.me = {
|
||||
xdg.userDirs = let pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder"; in {
|
||||
xdg.userDirs = rec {
|
||||
enable = true;
|
||||
documents = "${config.users.users.me.home}/cloud/nextcloud/Documents";
|
||||
desktop = "/tmp";
|
||||
download = "${config.users.users.me.home}/sync/Downloads";
|
||||
music = "${config.users.users.me.home}/mobile/audio";
|
||||
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder";
|
||||
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
||||
videos = pictures;
|
||||
pictures = pictures;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
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,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) defaultApplications theme;
|
||||
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
@@ -17,7 +18,7 @@ in {
|
||||
|
||||
home-manager.users.me.services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = pkgs.lib.niveum.theme.icon;
|
||||
iconTheme = (theme pkgs).icon;
|
||||
settings = {
|
||||
global = {
|
||||
transparency = 10;
|
||||
@@ -43,7 +44,7 @@ in {
|
||||
sticky_history = true;
|
||||
history_length = 20;
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||
browser = lib.getExe pkgs.niveum-browser;
|
||||
browser = (defaultApplications pkgs).browser;
|
||||
verbosity = "mesg";
|
||||
corner_radius = 0;
|
||||
mouse_left_click = "do_action";
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
}: {
|
||||
home-manager.users.me = {
|
||||
services.flameshot = {
|
||||
package = pkgs.flameshot.override { enableWlrSupport = true; };
|
||||
enable = true;
|
||||
settings.General = {
|
||||
autoCloseIdleDaemon = true;
|
||||
@@ -15,7 +16,7 @@
|
||||
showHelp = false;
|
||||
squareMagnifier = true;
|
||||
uploadWithoutConfirmation = true;
|
||||
# buttons = ''@Variant(\0\0\0\x7f\0\0\0\vQList<int>\0\0\0\0\x10\0\0\0\x2\0\0\0\x5\0\0\0\x13\0\0\0\xa\0\0\0\x1\0\0\0\xc\0\0\0\xd\0\0\0\x6\0\0\0\x8\0\0\0\0\0\0\0\xf\0\0\0\x4\0\0\0\xb\0\0\0\x3\0\0\0\x12\0\0\0\x9)'';
|
||||
buttons = ''@Variant(\0\0\0\x7f\0\0\0\vQList<int>\0\0\0\0\x10\0\0\0\x2\0\0\0\x5\0\0\0\x13\0\0\0\xa\0\0\0\x1\0\0\0\xc\0\0\0\xd\0\0\0\x6\0\0\0\x8\0\0\0\0\0\0\0\xf\0\0\0\x4\0\0\0\xb\0\0\0\x3\0\0\0\x12\0\0\0\x9)'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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,
|
||||
config,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
zip-font = name: arguments: let
|
||||
@@ -92,6 +94,7 @@ in {
|
||||
font-awesome
|
||||
galatia-sil
|
||||
gentium
|
||||
# niveumPackages.gfs-fonts
|
||||
gyre-fonts
|
||||
ibm-plex
|
||||
jetbrains-mono
|
||||
@@ -100,28 +103,28 @@ in {
|
||||
lmodern
|
||||
merriweather
|
||||
ocr-a
|
||||
montserrat
|
||||
roboto
|
||||
roboto-mono
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
noto-fonts-emoji
|
||||
nerd-fonts.blex-mono
|
||||
roboto-slab
|
||||
scheherazade-new
|
||||
source-code-pro
|
||||
source-sans-pro
|
||||
source-serif-pro
|
||||
theano
|
||||
tocharian-font
|
||||
vista-fonts
|
||||
niveumPackages.tocharian-font
|
||||
vistafonts
|
||||
vollkorn
|
||||
zilla-slab
|
||||
]; # google-fonts league-of-moveable-type
|
||||
fontconfig.defaultFonts = let emoji = ["Noto Color Emoji"]; in {
|
||||
monospace = ["Noto Sans Mono"] ++ emoji;
|
||||
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
|
||||
sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"];
|
||||
inherit emoji;
|
||||
fontconfig.defaultFonts = rec {
|
||||
monospace = [config.stylix.fonts.monospace.name] ++ emoji;
|
||||
serif = [config.stylix.fonts.serif.name "Scheherazade New" "Ezra SIL" "Antinoou" "Noto Serif Devanagari"];
|
||||
sansSerif = [config.stylix.fonts.sansSerif.name "Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"];
|
||||
emoji = [config.stylix.fonts.emoji.name];
|
||||
};
|
||||
# xelatex fails with woff files
|
||||
# ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other
|
||||
|
||||
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
|
||||
username = "meinhak99";
|
||||
fu-defaults = let mailhost = "mail.zedat.fu-berlin.de"; in {
|
||||
imap.host = mailhost;
|
||||
inherit (import ../lib/email.nix) defaults pronouns;
|
||||
inherit (import ../lib) remoteDir;
|
||||
fu-defaults = rec {
|
||||
imap.host = "mail.zedat.fu-berlin.de";
|
||||
imap.port = 993;
|
||||
imap.tls.enable = true;
|
||||
smtp.host = mailhost;
|
||||
smtp.host = imap.host;
|
||||
smtp.port = 465;
|
||||
smtp.tls.enable = true;
|
||||
folders.drafts = "Entwürfe";
|
||||
@@ -28,31 +30,34 @@ in {
|
||||
};
|
||||
};
|
||||
accounts.email.accounts = {
|
||||
letos =
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
||||
{
|
||||
userName = "slfletos";
|
||||
address = "letos.sprachlit@hu-berlin.de";
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-letos.path}";
|
||||
imap.host = "mailbox.cms.hu-berlin.de";
|
||||
imap.port = 993;
|
||||
smtp.host = "mailhost.cms.hu-berlin.de";
|
||||
smtp.port = 25;
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
fu =
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
||||
fu-student =
|
||||
lib.recursiveUpdate defaults
|
||||
(lib.recursiveUpdate fu-defaults
|
||||
(let userName = "meinhak99"; in {
|
||||
userName = userName;
|
||||
rec {
|
||||
userName = "meinhak99";
|
||||
address = "kieran.meinhardt@fu-berlin.de";
|
||||
aliases = ["${userName}@fu-berlin.de"];
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhak99.path}";
|
||||
aerc.extraAccounts.signature-file = toString (pkgs.writeText "signature" signature.text);
|
||||
signature = {
|
||||
showSignature = "append";
|
||||
text = ''
|
||||
${defaults.realName}
|
||||
${pronouns}
|
||||
|
||||
---
|
||||
Studentische Hilfskraft / ZODIAC
|
||||
Freie Universität Berlin
|
||||
|
||||
Telefon: +49 30 838 58118
|
||||
Arnimallee 10, Raum 106, 14195 Berlin
|
||||
'';
|
||||
};
|
||||
himalaya = {
|
||||
enable = true;
|
||||
settings.backend = "imap";
|
||||
};
|
||||
}));
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
@@ -63,12 +68,6 @@ in {
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
};
|
||||
email-password-letos = {
|
||||
file = ../secrets/email-password-letos.age;
|
||||
owner = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
};
|
||||
fu-sftp-key = {
|
||||
file = ../secrets/fu-sftp-key.age;
|
||||
owner = "root";
|
||||
@@ -98,7 +97,7 @@ in {
|
||||
firstCharacter = lib.strings.substring 0 1;
|
||||
|
||||
home-directory-mount = user: {
|
||||
"${pkgs.lib.niveum.remoteDir}/fu/${user}/home" = {
|
||||
"${remoteDir}/fu/${user}/home" = {
|
||||
device = "${user}@login.zedat.fu-berlin.de:/home/${firstCharacter user}/${user}";
|
||||
fsType = "sshfs";
|
||||
options = [
|
||||
@@ -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 = [
|
||||
(pkgs.writers.writeDashBin "hu-vpn-split" ''
|
||||
${pkgs.openfortivpn}/bin/openfortivpn \
|
||||
--password="$(cat "${config.age.secrets.email-password-letos.path}")" \
|
||||
--config=${
|
||||
pkgs.writeText "hu-berlin-split.config" ''
|
||||
host = forti-ssl.vpn.hu-berlin.de
|
||||
port = 443
|
||||
username = slfletos@split_tunnel
|
||||
''
|
||||
}
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "hu-vpn-full" ''
|
||||
${pkgs.openfortivpn}/bin/openfortivpn \
|
||||
--password="$(cat "${config.age.secrets.email-password-letos.path}")" \
|
||||
--config=${
|
||||
pkgs.writeText "hu-berlin-full.config" ''
|
||||
host = forti-ssl.vpn.hu-berlin.de
|
||||
port = 443
|
||||
username = slfletos@tunnel_all
|
||||
''
|
||||
}
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "fu-vpn" ''
|
||||
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
|
||||
then
|
||||
@@ -146,4 +138,16 @@ in {
|
||||
fi
|
||||
'')
|
||||
];
|
||||
|
||||
systemd.services.fu-vpn = {
|
||||
enable = false;
|
||||
wants = ["network-online.target"];
|
||||
serviceConfig.LoadCredential = "password:${config.age.secrets.email-password-meinhak99.path}";
|
||||
script = ''
|
||||
if ${pkgs.wirelesstools}/bin/iwgetid | ${pkgs.gnugrep}/bin/grep --invert-match eduroam
|
||||
then
|
||||
cat "$CREDENTIALS_DIRECTORY/password" | ${pkgs.openconnect}/bin/openconnect vpn.fu-berlin.de --user ${username} --passwd-on-stdin
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
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 = {
|
||||
programs.fzf = let
|
||||
defaultCommand = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
|
||||
in {
|
||||
programs.fzf = rec {
|
||||
enable = true;
|
||||
defaultCommand = defaultCommand;
|
||||
defaultCommand = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
|
||||
defaultOptions = ["--height=40%"];
|
||||
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||
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,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: let
|
||||
inherit (import ../lib) kieran ignorePaths;
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
pkgs.mr
|
||||
pkgs.gitFull
|
||||
@@ -16,6 +17,7 @@
|
||||
pkgs.gitstats
|
||||
pkgs.patch
|
||||
pkgs.patchutils
|
||||
inputs.self.packages.${pkgs.system}.git-preview
|
||||
];
|
||||
|
||||
environment.shellAliases = {
|
||||
@@ -27,7 +29,9 @@
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
settings.alias = {
|
||||
userName = kieran.name;
|
||||
userEmail = kieran.email;
|
||||
aliases = {
|
||||
br = "branch";
|
||||
co = "checkout";
|
||||
ci = "commit";
|
||||
@@ -40,13 +44,20 @@
|
||||
logs = "log --pretty=oneline";
|
||||
graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
};
|
||||
ignores = pkgs.lib.niveum.ignorePaths;
|
||||
settings.user.name = pkgs.lib.niveum.kieran.name;
|
||||
settings.user.email = pkgs.lib.niveum.kieran.email;
|
||||
settings.pull.ff = "only";
|
||||
settings.rebase.autoStash = true;
|
||||
settings.merge.autoStash = true;
|
||||
settings.push.autoSetupRemove = true;
|
||||
ignores = ignorePaths;
|
||||
extraConfig = {
|
||||
pull.ff = "only";
|
||||
rebase.autoStash = true;
|
||||
merge.autoStash = true;
|
||||
push.autoSetupRemote = true;
|
||||
|
||||
# # ref https://github.com/dandavison/delta
|
||||
# core.pager = "${pkgs.delta}/bin/delta";
|
||||
# interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
||||
# delta.navigate = true;
|
||||
# merge.conflictStyle = "diff3";
|
||||
# diff.colorMoved = "default";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
109
configs/i3.nix
109
configs/i3.nix
@@ -2,11 +2,18 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
klem = pkgs.klem.override {
|
||||
options.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
options.scripts = {
|
||||
dashboard = pkgs.writers.writeDashBin "dashboard" ''
|
||||
${pkgs.alacritty}/bin/alacritty --option font.size=4 --class dashboard --command ${pkgs.writers.writeDash "dashboard-inner" ''
|
||||
exec ${pkgs.procps}/bin/watch -c -n 10 ${niveumPackages.q}/bin/q
|
||||
''}
|
||||
'';
|
||||
inherit (import ../lib) defaultApplications;
|
||||
klem = niveumPackages.klem.override {
|
||||
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
config.scripts = {
|
||||
"p.r paste" = pkgs.writers.writeDash "p.r" ''
|
||||
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
|
||||
| ${pkgs.coreutils}/bin/tail --lines=1 \
|
||||
@@ -35,10 +42,10 @@
|
||||
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
||||
'';
|
||||
"ipa" = pkgs.writers.writeDash "ipa" ''
|
||||
${pkgs.ipa}/bin/ipa
|
||||
${niveumPackages.ipa}/bin/ipa
|
||||
'';
|
||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||
${pkgs.betacode}/bin/betacode
|
||||
${niveumPackages.betacode}/bin/betacode
|
||||
'';
|
||||
"curl" = pkgs.writers.writeDash "curl" ''
|
||||
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||
@@ -49,6 +56,12 @@
|
||||
emojai = pkgs.writers.writeDash "emojai" ''
|
||||
${pkgs.curl}/bin/curl https://www.emojai.app/api/generate -X POST -H 'Content-Type: application/json' --data-raw "$(${pkgs.jq}/bin/jq -sR '{emoji:.}')" | ${pkgs.jq}/bin/jq -r .result
|
||||
'';
|
||||
"gpt-3.5" = pkgs.writers.writeDash "gpt" ''
|
||||
${niveumPackages.gpt35}/bin/gpt
|
||||
'';
|
||||
gpt-4 = pkgs.writers.writeDash "gpt" ''
|
||||
${niveumPackages.gpt4}/bin/gpt
|
||||
'';
|
||||
};
|
||||
};
|
||||
in {
|
||||
@@ -73,20 +86,15 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.xsecurelock
|
||||
];
|
||||
environment.sessionVariables = {
|
||||
XSECURELOCK_NO_COMPOSITE = "1";
|
||||
XSECURELOCK_BACKGROUND_COLOR = "navy";
|
||||
XSECURELOCK_PASSWORD_PROMPT = "time_hex";
|
||||
};
|
||||
programs.slock.enable = true;
|
||||
|
||||
environment.systemPackages = [dashboard];
|
||||
|
||||
services.displayManager.defaultSession = "none+i3";
|
||||
services.xserver = {
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3;
|
||||
package = pkgs.i3-gaps;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -122,12 +130,12 @@ in {
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
};
|
||||
bars = let position = "bottom"; in [
|
||||
(lib.recursiveUpdate config.home-manager.users.me.stylix.targets.i3.exportedBarConfig
|
||||
{
|
||||
bars = [
|
||||
(config.home-manager.users.me.lib.stylix.i3.bar
|
||||
// rec {
|
||||
workspaceButtons = true;
|
||||
mode = "hide"; # "dock";
|
||||
inherit position;
|
||||
position = "bottom";
|
||||
statusCommand = toString (pkgs.writers.writeDash "i3status-rust" ''
|
||||
export I3RS_GITHUB_TOKEN="$(cat ${config.age.secrets.github-token-i3status-rust.path})"
|
||||
export OPENWEATHERMAP_API_KEY="$(cat ${config.age.secrets.openweathermap-api-key.path})"
|
||||
@@ -216,15 +224,15 @@ in {
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+q" = "exec ${config.services.clipmenu.package}/bin/clipmenu";
|
||||
|
||||
"${modifier}+Return" = "exec ${lib.getExe pkgs.niveum-terminal}";
|
||||
"${modifier}+t" = "exec ${lib.getExe pkgs.niveum-filemanager}";
|
||||
"${modifier}+y" = "exec ${lib.getExe pkgs.niveum-browser}";
|
||||
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
||||
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
|
||||
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
|
||||
|
||||
"${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec rofi -modi run,ssh,window -show run''}";
|
||||
"${modifier}+Shift+d" = "exec ${pkgs.notemenu}/bin/notemenu";
|
||||
"${modifier}+Shift+d" = "exec ${niveumPackages.notemenu}/bin/notemenu";
|
||||
"${modifier}+p" = "exec rofi-pass";
|
||||
"${modifier}+Shift+p" = "exec rofi-pass --insert";
|
||||
"${modifier}+u" = "exec ${pkgs.unicodmenu}/bin/unicodmenu";
|
||||
"${modifier}+u" = "exec ${niveumPackages.unicodmenu}/bin/unicodmenu";
|
||||
"${modifier}+Shift+u" = "exec ${pkgs.writers.writeDash "last-unicode" ''${pkgs.xdotool}/bin/xdotool type --delay 1000 "$(${pkgs.gawk}/bin/awk 'END{print $1}' ~/.cache/unicodmenu)"''}";
|
||||
|
||||
"${modifier}+F7" = "exec ${pkgs.writers.writeDash "showkeys-toggle" ''
|
||||
@@ -244,6 +252,7 @@ in {
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
|
||||
"XF86ScreenSaver" = "exec ${niveumPackages.k-lock}/bin/k-lock";
|
||||
|
||||
# key names detected with xorg.xev:
|
||||
# XF86WakeUp (fn twice)
|
||||
@@ -260,12 +269,37 @@ in {
|
||||
# XF86Launch1 (thinkvantage)
|
||||
};
|
||||
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 = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
bindsym --release ${modifier}+Shift+w exec xsecurelock
|
||||
bindsym --release ${modifier}+Shift+w exec /run/wrappers/bin/slock
|
||||
|
||||
exec "${pkgs.obsidian}/bin/obsidian"
|
||||
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 "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 = {
|
||||
inherit modifier gaps modes bars floating window colors;
|
||||
keybindings = keybindings // {
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
inherit modifier gaps modes bars floating window colors keybindings;
|
||||
}
|
||||
{
|
||||
keybindings = let
|
||||
new-workspace = pkgs.writers.writeDash "new-workspace" ''
|
||||
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||
'';
|
||||
move-to-new-workspace = pkgs.writers.writeDash "new-workspace" ''
|
||||
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
|
||||
'';
|
||||
in {
|
||||
"${modifier}+ß" = "exec ${niveumPackages.menu-calc}/bin/=";
|
||||
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
|
||||
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
|
||||
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
||||
@@ -286,9 +332,10 @@ in {
|
||||
"Print" = "exec flameshot gui";
|
||||
# "${modifier}+Shift+x" = "exec ${move-to-new-workspace}";
|
||||
# "${modifier}+x" = "exec ${new-workspace}";
|
||||
"XF86Display" = "exec ${pkgs.dmenu-randr}/bin/dmenu-randr";
|
||||
"XF86Display" = "exec ${niveumPackages.dmenu-randr}/bin/dmenu-randr";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
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";
|
||||
passwordFile = config.age.secrets.nextcloud-password-kieran.path;
|
||||
};
|
||||
fysiCloud = {
|
||||
davEndpoint = "https://nextcloud.fysi.dev/remote.php/dav";
|
||||
username = "kmein";
|
||||
passwordFile = config.age.secrets.nextcloud-password-fysi.path;
|
||||
};
|
||||
in {
|
||||
age.secrets = {
|
||||
nextcloud-password-kieran = {
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
environment.shellAliases.smpv = swallow "mpv";
|
||||
|
||||
@@ -35,8 +36,8 @@ in {
|
||||
"Alt+j" = "add video-pan-y -0.05";
|
||||
};
|
||||
scripts = [
|
||||
pkgs.mpvScripts.quality-menu
|
||||
pkgs.mpvScripts.visualizer
|
||||
# pkgs.mpvScripts.quality-menu
|
||||
niveumPackages.mpv-visualizer
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
let
|
||||
myceliumAddresses = import ../lib/mycelium-network.nix;
|
||||
in
|
||||
{
|
||||
services.mycelium = {
|
||||
enable = true;
|
||||
@@ -8,5 +11,5 @@
|
||||
networking.hosts = lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = [ "${name}.m" ];
|
||||
}) pkgs.lib.niveum.myceliumAddresses;
|
||||
}) myceliumAddresses;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
vim-kmein = (pkgs.vim-kmein.override {
|
||||
# stylixColors = config.lib.stylix.colors;
|
||||
colorscheme = "base16-gruvbox-dark-medium";
|
||||
});
|
||||
in {
|
||||
environment.variables.EDITOR = lib.getExe vim-kmein;
|
||||
}: {
|
||||
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
|
||||
environment.shellAliases.vi = "nvim";
|
||||
environment.shellAliases.vim = "nvim";
|
||||
environment.shellAliases.view = "nvim -R";
|
||||
|
||||
home-manager.users.me = {
|
||||
@@ -38,22 +35,24 @@ in {
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.vim-typewriter
|
||||
vim-kmein
|
||||
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
||||
(niveumPackages.vim.override {
|
||||
stylixColors = config.lib.stylix.colors;
|
||||
# colorscheme = "base16-gruvbox-light-medium";
|
||||
})
|
||||
|
||||
# language servers
|
||||
pkgs.pyright
|
||||
pkgs.haskellPackages.haskell-language-server
|
||||
pkgs.texlab
|
||||
pkgs.nil
|
||||
pkgs.gopls
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.rust-analyzer
|
||||
pkgs.nodePackages.typescript-language-server
|
||||
pkgs.lua-language-server
|
||||
pkgs.nodePackages.vscode-langservers-extracted
|
||||
pkgs.lemminx # XML LSP
|
||||
pkgs.jq-lsp
|
||||
pkgs.lemminx
|
||||
niveumPackages.jq-lsp
|
||||
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,
|
||||
lib,
|
||||
inputs,
|
||||
niveumPackages,
|
||||
unstablePackages,
|
||||
...
|
||||
}: let
|
||||
worldradio = pkgs.callPackage ../packages/worldradio.nix {};
|
||||
|
||||
externalNetwork = import ../lib/external-network.nix;
|
||||
|
||||
zoteroStyle = {
|
||||
name,
|
||||
sha256,
|
||||
@@ -59,15 +63,9 @@ in {
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
(pkgs.writers.writeDashBin "amfora" ''
|
||||
${pkgs.st}/bin/st -e ${pkgs.amfora}/bin/amfora
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "gpodder" ''
|
||||
GPODDER_DOWNLOAD_DIR=${config.users.users.me.home}/mobile/audio/Text/podcasts exec ${pkgs.gpodder}/bin/gpodder "$@"
|
||||
'')
|
||||
# INTERNET
|
||||
aria2
|
||||
telegram-desktop
|
||||
tdesktop
|
||||
whois
|
||||
dnsutils
|
||||
# FILE MANAGERS
|
||||
@@ -96,17 +94,16 @@ in {
|
||||
# HARDWARE TOOLS
|
||||
gnome-disk-utility
|
||||
arandr # xrandr for noobs
|
||||
wdisplays
|
||||
libnotify # for notify-send
|
||||
xclip # clipboard CLI
|
||||
dragon-drop # drag and drop
|
||||
wl-clipboard # clipboard CLI
|
||||
xdragon # drag and drop
|
||||
xorg.xkill # kill by clicking
|
||||
portfolio # personal finance overview
|
||||
audacity
|
||||
calibre
|
||||
electrum
|
||||
inkscape
|
||||
gimp
|
||||
niveumPackages.gimp
|
||||
gthumb
|
||||
astrolog
|
||||
obsidian
|
||||
@@ -117,69 +114,73 @@ in {
|
||||
zoom-us # video conferencing
|
||||
(pkgs.writers.writeDashBin "im" ''
|
||||
weechat_password=$(${pkgs.pass}/bin/pass weechat)
|
||||
exec ${weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${pkgs.lib.niveum.systems.makanek.externalIp}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
||||
exec ${unstablePackages.weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${externalNetwork.makanek}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
||||
'')
|
||||
alejandra # nix formatter
|
||||
pdfgrep # search in pdf
|
||||
pdftk # pdf toolkit
|
||||
mupdf
|
||||
poppler-utils # pdf toolkit
|
||||
poppler_utils # pdf toolkit
|
||||
kdePackages.okular # the word is nucular
|
||||
xournalpp # for annotating pdfs
|
||||
pdfpc # presenter console for pdf slides
|
||||
hc # print files as qr codes
|
||||
# niveumPackages.hc # print files as qr codes
|
||||
yt-dlp
|
||||
espeak
|
||||
rink # unit converter
|
||||
auc
|
||||
noise-waves
|
||||
stag
|
||||
cheat-sh
|
||||
polyglot
|
||||
qrpaste
|
||||
ttspaste
|
||||
new-mac # get a new mac address
|
||||
scanned
|
||||
default-gateway
|
||||
kirciuoklis
|
||||
image-convert-favicon
|
||||
heuretes
|
||||
ipa # XSAMPA to IPA converter
|
||||
pls
|
||||
mpv-tv
|
||||
mpv-iptv
|
||||
devanagari
|
||||
betacode # ancient greek betacode to unicode converter
|
||||
jq-lsp
|
||||
swallow # window swallowing
|
||||
literature-quote
|
||||
booksplit
|
||||
dmenu-randr
|
||||
manual-sort
|
||||
wttr
|
||||
unicodmenu
|
||||
emailmenu
|
||||
closest
|
||||
trans
|
||||
(mpv-radio.override {
|
||||
niveumPackages.auc
|
||||
niveumPackages.noise-waves
|
||||
niveumPackages.cheat-sh
|
||||
niveumPackages.polyglot
|
||||
niveumPackages.qrpaste
|
||||
niveumPackages.ttspaste
|
||||
niveumPackages.new-mac # get a new mac address
|
||||
niveumPackages.scanned
|
||||
niveumPackages.default-gateway
|
||||
niveumPackages.kirciuoklis
|
||||
niveumPackages.image-convert-favicon
|
||||
niveumPackages.heuretes
|
||||
niveumPackages.ipa # XSAMPA to IPA converter
|
||||
niveumPackages.pls
|
||||
niveumPackages.mpv-tv
|
||||
niveumPackages.mpv-iptv
|
||||
# jellyfin-media-player
|
||||
niveumPackages.devanagari
|
||||
niveumPackages.betacode # ancient greek betacode to unicode converter
|
||||
niveumPackages.meteo
|
||||
niveumPackages.jq-lsp
|
||||
niveumPackages.swallow # window swallowing
|
||||
niveumPackages.literature-quote
|
||||
niveumPackages.booksplit
|
||||
niveumPackages.dmenu-randr
|
||||
niveumPackages.dmenu-bluetooth
|
||||
niveumPackages.manual-sort
|
||||
niveumPackages.dns-sledgehammer
|
||||
niveumPackages.wttr
|
||||
niveumPackages.unicodmenu
|
||||
niveumPackages.emailmenu
|
||||
niveumPackages.closest
|
||||
niveumPackages.trans
|
||||
(niveumPackages.mpv-radio.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
})
|
||||
(mpv-radio.override {
|
||||
(niveumPackages.mpv-radio.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
executableName = "cro-radio";
|
||||
mpvCommand = "${cro}/bin/cro";
|
||||
mpvCommand = "${niveumPackages.cro}/bin/cro";
|
||||
})
|
||||
(mpv-tuner.override {
|
||||
(niveumPackages.mpv-tuner.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
})
|
||||
# kmein.slide
|
||||
termdown
|
||||
image-convert-tolino
|
||||
rfc
|
||||
tag
|
||||
timer
|
||||
niveumPackages.image-convert-tolino
|
||||
niveumPackages.rfc
|
||||
niveumPackages.tag
|
||||
niveumPackages.timer
|
||||
niveumPackages.menu-calc
|
||||
nix-prefetch-git
|
||||
nix-git
|
||||
niveumPackages.nix-git
|
||||
nixfmt-rfc-style
|
||||
par
|
||||
qrencode
|
||||
@@ -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.writers.writeDashBin "ncmpcpp-zaatar" ''MPD_HOST=${(import ../lib/local-network.nix).zaatar} exec ${pkgs.ncmpcpp}/bin/ncmpcpp "$@"'')
|
||||
(pkgs.writers.writeDashBin "mpc-zaatar" ''MPD_HOST=${(import ../lib/local-network.nix).zaatar} exec ${pkgs.mpc_cli}/bin/mpc "$@"'')
|
||||
|
||||
inputs.scripts.packages.x86_64-linux.alarm
|
||||
|
||||
spotify
|
||||
ncspot
|
||||
playerctl
|
||||
|
||||
nix-index
|
||||
niveumPackages.nix-index-update
|
||||
|
||||
#krebs
|
||||
niveumPackages.dic
|
||||
pkgs.nur.repos.mic92.ircsink
|
||||
|
||||
(haskellPackages.ghcWithHoogle (hs: [
|
||||
@@ -229,13 +237,14 @@ in {
|
||||
dhall
|
||||
|
||||
html-tidy
|
||||
nodePackages.csslint
|
||||
nodePackages.jsonlint
|
||||
deno # better node.js
|
||||
go
|
||||
texlive.combined.scheme-full
|
||||
# texlive.combined.scheme-full
|
||||
latexrun
|
||||
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
|
||||
# haskellPackages.pandoc-citeproc
|
||||
text2pdf
|
||||
niveumPackages.text2pdf
|
||||
lowdown
|
||||
glow # markdown to term
|
||||
libreoffice
|
||||
@@ -243,7 +252,7 @@ in {
|
||||
dia
|
||||
pandoc
|
||||
librsvg # pandoc depends on this to include SVG in documents
|
||||
# man-pandoc
|
||||
# niveumPackages.man-pandoc
|
||||
typst
|
||||
# proselint
|
||||
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;
|
||||
in {
|
||||
services.printing = {
|
||||
@@ -17,7 +18,7 @@ in {
|
||||
{
|
||||
name = "OfficeJet";
|
||||
location = "Zimmer";
|
||||
deviceUri = "https://${pkgs.lib.niveum.localAddresses.officejet}";
|
||||
deviceUri = "https://${localAddresses.officejet}";
|
||||
model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd";
|
||||
ppdOptions = {
|
||||
Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None
|
||||
|
||||
@@ -1 +1 @@
|
||||
{ services.redshift.enable = true; }
|
||||
{services.redshift.enable = false;}
|
||||
|
||||
@@ -3,6 +3,5 @@
|
||||
location = {
|
||||
latitude = 52.517;
|
||||
longitude = 13.3872;
|
||||
provider = "geoclue2";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
users.users.me.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys;
|
||||
{pkgs, ...}: let
|
||||
inherit (import ../lib) sshPort kieran;
|
||||
externalNetwork = import ../lib/external-network.nix;
|
||||
in {
|
||||
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
|
||||
programs.ssh.startAgent = true;
|
||||
services.gnome.gcr-ssh-agent.enable = false;
|
||||
|
||||
home-manager.users.me = {
|
||||
# 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)
|
||||
export SSH_AUTH_SOCK
|
||||
'';
|
||||
# services.gpg-agent = rec {
|
||||
# enable = false;
|
||||
# enableSshSupport = true;
|
||||
# defaultCacheTtlSsh = 2 * 60 * 60;
|
||||
# maxCacheTtlSsh = 4 * defaultCacheTtlSsh;
|
||||
# sshKeys = [
|
||||
# "568047C91DE03A23883E340F15A9C24D313E847C"
|
||||
# "BB3EE102DB8CD45540A78A6B18B511B67061F6B4" # kfm@manakish ed25519
|
||||
# "3F8986755818B5762A096BE212777EAAC441DD9D" # fysiweb rsa
|
||||
# "0E4ABD229432486CC432639BB0986B2CDE365105" # agenix ed25519
|
||||
# "A1E8D32CBFCDBD2DE798E2298D795CCFD785AE06" # kfm@kabsa ed25519
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
# environment.extraInit = ''
|
||||
# if [[ -z "$SSH_AUTH_SOCK" ]]; then
|
||||
# export SSH_AUTH_SOCK="$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)"
|
||||
# fi
|
||||
# '';
|
||||
|
||||
# environment.interactiveShellInit = ''
|
||||
# GPG_TTY="$(tty)"
|
||||
# export GPG_TTY
|
||||
# ${pkgs.gnupg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||
# '';
|
||||
|
||||
home-manager.users.me.programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "ssh.github.com";
|
||||
@@ -23,42 +48,42 @@
|
||||
zaatar = {
|
||||
hostname = "zaatar.r";
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
makanek = {
|
||||
hostname = pkgs.lib.niveum.externalNetwork.makanek;
|
||||
hostname = externalNetwork.makanek;
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
ful = {
|
||||
hostname = pkgs.lib.niveum.externalNetwork.ful;
|
||||
hostname = externalNetwork.ful;
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
tahina = {
|
||||
hostname = "tahina.r";
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
tabula = {
|
||||
hostname = "tabula.r";
|
||||
user = "root";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
manakish = {
|
||||
hostname = "manakish.r";
|
||||
user = "kfm";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
kabsa = {
|
||||
hostname = "kabsa.r";
|
||||
user = "kfm";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
fatteh = {
|
||||
hostname = "fatteh.r";
|
||||
user = "kfm";
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
port = sshPort;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: let
|
||||
inherit (import ../lib) sshPort kieran;
|
||||
in {
|
||||
users.motd = "Welcome to ${config.networking.hostName}!";
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ pkgs.lib.niveum.sshPort ];
|
||||
ports = [sshPort];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
X11Forwarding = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys ++ [
|
||||
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys ++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoiRIn1dBUtpApcUyGbZKN+m5KBSgKIDQjdnQ8vU0xU kfm@kibbeh" # travel laptop
|
||||
];
|
||||
}
|
||||
|
||||
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.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 = {
|
||||
name = "capitaine-cursors-white";
|
||||
@@ -26,9 +26,6 @@ in {
|
||||
size = 12;
|
||||
};
|
||||
|
||||
home-manager.users.me = {
|
||||
stylix.autoEnable = true;
|
||||
};
|
||||
|
||||
# environment.etc."stylix/wallpaper.png".source = generatedWallpaper;
|
||||
|
||||
@@ -55,22 +52,22 @@ in {
|
||||
|
||||
stylix.fonts = {
|
||||
serif = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Serif";
|
||||
package = pkgs.gentium;
|
||||
name = "Gentium Plus";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Sans";
|
||||
package = pkgs.gentium;
|
||||
name = "Gentium Plus";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Sans Mono";
|
||||
package = pkgs.nerd-fonts.blex-mono;
|
||||
name = "BlexMono Nerd Font";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
aggressiveResize = true;
|
||||
escapeTime = 50;
|
||||
historyLimit = 7000;
|
||||
shortcut = "b";
|
||||
shortcut = "a";
|
||||
extraConfig = ''
|
||||
set -g mouse on
|
||||
|
||||
@@ -37,6 +37,15 @@
|
||||
set -g status-left-length 32
|
||||
set -g status-right-length 150
|
||||
|
||||
set -g status-bg colour242
|
||||
|
||||
setw -g window-status-format "#[fg=colour12,bg=colour233] #I #[fg=white,bg=colour237] #W "
|
||||
setw -g window-status-current-format "#[fg=colour12,bg=colour233] * #[fg=white,bg=colour237,bold] #W "
|
||||
|
||||
set -g status-left ""
|
||||
set -g status-right "#[fg=colour255,bg=colour237,bold] #(hostname -I) #[default]#[fg=colour12,bg=colour233] %FT%R "
|
||||
set -g status-justify left
|
||||
|
||||
set -g status-position bottom
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -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 = {
|
||||
enable = true;
|
||||
secretsFile = config.age.secrets.wifi.path;
|
||||
# networks.Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||
networks.Schilfpalast.pskRaw = "ext:schilfpalast";
|
||||
networks.Aether.pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,6 +6,15 @@
|
||||
promptColours.success = "cyan";
|
||||
promptColours.failure = "red";
|
||||
in {
|
||||
environment.systemPackages = [pkgs.atuin];
|
||||
environment.variables.ATUIN_CONFIG_DIR = toString (pkgs.writeTextDir "/config.toml" ''
|
||||
auto_sync = true
|
||||
update_check = false
|
||||
sync_address = "http://zaatar.r:8888"
|
||||
sync_frequency = 0
|
||||
style = "compact"
|
||||
'');
|
||||
|
||||
programs.zsh = let
|
||||
zsh-completions = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
@@ -58,6 +67,13 @@ in {
|
||||
zstyle ':vcs_info:*' formats "%c%u%F{cyan}%b%f"
|
||||
zstyle ':vcs_info:*' actionformats "(%a) %c%u%F{cyan}%b%f"
|
||||
|
||||
# atuin distributed shell history
|
||||
export ATUIN_NOBIND="true" # disable all keybdinings of atuin
|
||||
eval "$(atuin init zsh)"
|
||||
bindkey '^r' _atuin_search_widget # bind ctrl+r to atuin
|
||||
# use zsh only session history
|
||||
fc -p
|
||||
|
||||
precmd () {
|
||||
vcs_info
|
||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] || [ -n "$SSH_CONNECTION" ]; then
|
||||
|
||||
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";
|
||||
|
||||
inputs = {
|
||||
self.submodules = true;
|
||||
|
||||
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";
|
||||
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-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";
|
||||
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
|
||||
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";
|
||||
recht.url = "github:kmein/recht";
|
||||
retiolum.url = "github:krebs/retiolum";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
scripts.url = "github:kmein/scripts";
|
||||
stockholm.url = "github:krebs/stockholm";
|
||||
stylix.url = "github:danth/stylix/release-25.11";
|
||||
stylix.url = "github:danth/stylix/release-25.05";
|
||||
telebots.url = "github:kmein/telebots";
|
||||
tinc-graph.url = "github:kmein/tinc-graph";
|
||||
voidrice.url = "github:Lukesmithxyz/voidrice";
|
||||
@@ -29,444 +30,422 @@
|
||||
|
||||
agenix.inputs.home-manager.follows = "home-manager";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
autorenkalender.inputs.nixpkgs.follows = "nixpkgs";
|
||||
coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# menstruation-backend.inputs.flake-utils.follows = "flake-utils";
|
||||
# menstruation-backend.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# menstruation-backend.inputs.rust-overlay.follows = "rust-overlay";
|
||||
menstruation-telegram.inputs.flake-utils.follows = "flake-utils";
|
||||
menstruation-telegram.inputs.menstruation-backend.follows = "menstruation-backend";
|
||||
menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old";
|
||||
nix-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";
|
||||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||
scripts.inputs.flake-utils.follows = "flake-utils";
|
||||
scripts.inputs.nixpkgs.follows = "nixpkgs";
|
||||
scripts.inputs.rust-overlay.follows = "rust-overlay";
|
||||
stylix.inputs.home-manager.follows = "home-manager";
|
||||
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
tinc-graph.inputs.flake-utils.follows = "flake-utils";
|
||||
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
|
||||
tinc-graph.inputs.rust-overlay.follows = "rust-overlay";
|
||||
voidrice.flake = false;
|
||||
wallpaper-generator.inputs.flake-utils.follows = "flake-utils";
|
||||
wallpapers.flake = false;
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
nur,
|
||||
home-manager,
|
||||
agenix,
|
||||
retiolum,
|
||||
nixinate,
|
||||
coptic-dictionary,
|
||||
menstruation-backend,
|
||||
menstruation-telegram,
|
||||
scripts,
|
||||
tinc-graph,
|
||||
recht,
|
||||
autorenkalender,
|
||||
wallpaper-generator,
|
||||
telebots,
|
||||
stockholm,
|
||||
nix-index-database,
|
||||
stylix,
|
||||
voidrice,
|
||||
...
|
||||
}:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
eachSupportedSystem = lib.genAttrs lib.systems.flakeExposed;
|
||||
in
|
||||
nixConfig = {
|
||||
extra-substituters = [ "https://kmein.cachix.org" ];
|
||||
extra-trusted-public-keys = [ "kmein.cachix.org-1:rsJ2b6++VQHJ1W6rGuDUYsK/qUkFA3bNpO6PyEyJ9Ls=" ];
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
nur,
|
||||
home-manager,
|
||||
agenix,
|
||||
retiolum,
|
||||
nixinate,
|
||||
flake-utils,
|
||||
nix-on-droid,
|
||||
centerpiece,
|
||||
stylix,
|
||||
...
|
||||
}:
|
||||
{
|
||||
apps = {
|
||||
x86_64-linux =
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
lib = nixpkgs.lib;
|
||||
x86_64-darwin = let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-darwin;
|
||||
in {
|
||||
deploy-maakaron = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "deploy-maakaron" ''
|
||||
exec $(nix build .#homeConfigurations.maakaron.activationPackage --no-link --print-out-paths)/activate
|
||||
'');
|
||||
};
|
||||
};
|
||||
x86_64-linux = let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
nixinate.nixinate.x86_64-linux self
|
||||
// {
|
||||
mock-secrets = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "mock-secrets" ''
|
||||
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
|
||||
'');
|
||||
};
|
||||
}
|
||||
# the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
|
||||
// builtins.listToAttrs (map (hostname: let
|
||||
externalNetwork = import ./lib/external-network.nix;
|
||||
targets = {
|
||||
ful = "root@ful";
|
||||
zaatar = "root@zaatar";
|
||||
makanek = "root@makanek";
|
||||
manakish = "root@manakish";
|
||||
tahina = "root@tahina";
|
||||
tabula = "root@tabula";
|
||||
kabsa = "root@kabsa";
|
||||
fatteh = "root@fatteh";
|
||||
kibbeh = "root@kibbeh";
|
||||
};
|
||||
in
|
||||
lib.mergeAttrsList [
|
||||
(nixinate.nixinate.x86_64-linux self)
|
||||
{
|
||||
mock-secrets = {
|
||||
type = "app";
|
||||
program = toString (
|
||||
pkgs.writers.writeDash "mock-secrets" ''
|
||||
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
|
||||
''
|
||||
);
|
||||
};
|
||||
}
|
||||
# the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
|
||||
(builtins.listToAttrs (
|
||||
map (
|
||||
hostname:
|
||||
let
|
||||
targets = {
|
||||
ful = "root@ful";
|
||||
zaatar = "root@zaatar";
|
||||
makanek = "root@makanek";
|
||||
manakish = "root@manakish";
|
||||
tahina = "root@tahina";
|
||||
tabula = "root@tabula";
|
||||
kabsa = "root@kabsa";
|
||||
fatteh = "root@fatteh";
|
||||
kibbeh = "root@kibbeh";
|
||||
};
|
||||
in
|
||||
lib.attrsets.nameValuePair "deploy-${hostname}" {
|
||||
type = "app";
|
||||
program = toString (
|
||||
pkgs.writers.writeDash "deploy-${hostname}" ''
|
||||
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \
|
||||
--max-jobs 2 \
|
||||
--log-format internal-json \
|
||||
--flake .#${hostname} \
|
||||
--target-host ${targets.${hostname}} 2>&1 \
|
||||
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
''
|
||||
);
|
||||
}
|
||||
) (builtins.attrNames self.nixosConfigurations)
|
||||
))
|
||||
{
|
||||
deploy-ful = {
|
||||
type = "app";
|
||||
program = toString (
|
||||
pkgs.writers.writeDash "deploy-ful" ''
|
||||
exec ${pkgs.nix}/bin/nix run .#nixinate.ful \
|
||||
--log-format internal-json 2>&1 \
|
||||
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
''
|
||||
);
|
||||
};
|
||||
}
|
||||
];
|
||||
lib.attrsets.nameValuePair "deploy-${hostname}" {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "deploy-${hostname}" ''
|
||||
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \
|
||||
--max-jobs 2 \
|
||||
--log-format internal-json \
|
||||
--flake .?submodules=1#${hostname} \
|
||||
--target-host ${targets.${hostname}} 2>&1 \
|
||||
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
'');
|
||||
}) (builtins.attrNames self.nixosConfigurations))
|
||||
// {
|
||||
deploy-ful = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "deploy-ful" ''
|
||||
exec ${pkgs.nix}/bin/nix run .?submodules=1#nixinate.ful \
|
||||
--log-format internal-json 2>&1 \
|
||||
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
'');
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# TODO overlay for packages
|
||||
# TODO remove flake-utils dependency from my own repos
|
||||
|
||||
nixosModules = {
|
||||
htgen = import modules/htgen.nix;
|
||||
moodle-dl = import modules/moodle-dl.nix;
|
||||
networkmanager-declarative = import modules/networkmanager-declarative.nix;
|
||||
passport = import modules/passport.nix;
|
||||
panoptikon = import modules/panoptikon.nix;
|
||||
power-action = import modules/power-action.nix;
|
||||
system-dependent = import modules/system-dependent.nix;
|
||||
telegram-bot = import modules/telegram-bot.nix;
|
||||
go-webring = import modules/go-webring.nix;
|
||||
};
|
||||
|
||||
lib = {
|
||||
panoptikon = import lib/panoptikon.nix;
|
||||
};
|
||||
|
||||
overlays.default = final: prev: {
|
||||
niveum-terminal = prev.alacritty;
|
||||
niveum-browser = prev.firefox;
|
||||
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
|
||||
nixOnDroidConfigurations = {
|
||||
moto = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
modules = [systems/moto/configuration.nix];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
nur.overlays.default
|
||||
self.overlays.default
|
||||
];
|
||||
system = "aarch64-linux";
|
||||
overlays = [nix-on-droid.overlays.default];
|
||||
};
|
||||
extraSpecialArgs = {
|
||||
niveumPackages = inputs.self.packages.aarch64-linux;
|
||||
niveumLib = inputs.self.lib;
|
||||
inherit inputs;
|
||||
};
|
||||
home-manager-path = home-manager.outPath;
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
maakaron = let
|
||||
system = "x86_64-darwin";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
inherit (pkgs) auc swallow cheat-sh hc kpaste noise-waves trans stag qrpaste new-mac scanned default-gateway kirciuoklis tocharian-font image-convert-favicon image-convert-tolino heuretes mpv-tv mpv-iptv devanagari literature-quote booksplit manual-sort wttr emailmenu closest mpv-radio mpv-tuner cro nix-git text2pdf betacode brassica ipa polyglot jsesh gfs-fonts vim-kmein vimv brainmelter cyberlocker-tools pls untilport radio-news vg ttspaste depp fkill fzfmenu unicodmenu dmenu-randr notemenu man-pdf mansplain opustags q timer rfc gimp obsidian-vim devour go-webring random-zeno stardict-tools weechat-declarative klem radioStreams vim-typewriter ;
|
||||
}
|
||||
);
|
||||
};
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
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 =
|
||||
{
|
||||
type,
|
||||
path,
|
||||
mode ? "-",
|
||||
user ? "-",
|
||||
group ? "-",
|
||||
age ? "-",
|
||||
argument ? "-",
|
||||
}:
|
||||
"${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
|
||||
tmpfilesConfig = {
|
||||
type,
|
||||
path,
|
||||
mode ? "-",
|
||||
user ? "-",
|
||||
group ? "-",
|
||||
age ? "-",
|
||||
argument ? "-",
|
||||
}: "${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
|
||||
|
||||
restic =
|
||||
let
|
||||
host = "zaatar.r";
|
||||
port = 3571;
|
||||
in
|
||||
{
|
||||
inherit host port;
|
||||
repository = "rest:http://${host}:${toString port}/";
|
||||
};
|
||||
restic = rec {
|
||||
port = 3571;
|
||||
host = "zaatar.r";
|
||||
repository = "rest:http://${host}:${toString port}/";
|
||||
};
|
||||
|
||||
remoteDir = "/home/kfm/remote";
|
||||
|
||||
firewall = {
|
||||
accept =
|
||||
{
|
||||
source,
|
||||
protocol,
|
||||
dport,
|
||||
}:
|
||||
"nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
|
||||
firewall = lib: {
|
||||
accept = {
|
||||
source,
|
||||
protocol,
|
||||
dport,
|
||||
}: "nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
|
||||
addRules = lib.concatMapStringsSep "\n" (rule: "iptables -A ${rule}");
|
||||
removeRules = lib.concatMapStringsSep "\n" (rule: "iptables -D ${rule} || true");
|
||||
};
|
||||
@@ -54,7 +42,7 @@ in
|
||||
|
||||
sshPort = 22022;
|
||||
|
||||
theme = {
|
||||
theme = pkgs: {
|
||||
gtk = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
@@ -69,63 +57,32 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
retiolumAddresses = lib.mapAttrs (_: v: { inherit (v.retiolum) ipv4 ipv6; }) (
|
||||
lib.filterAttrs (_: v: v ? "retiolum") systems
|
||||
);
|
||||
externalNetwork = lib.mapAttrs (_: v: v.externalIp) (
|
||||
lib.filterAttrs (_: v: v ? "externalIp") systems
|
||||
);
|
||||
localAddresses = lib.mapAttrs (_: v: v.internalIp) (
|
||||
lib.filterAttrs (_: v: v ? "internalIp") systems
|
||||
);
|
||||
myceliumAddresses = lib.mapAttrs (_: v: v.mycelium.ipv6) (
|
||||
lib.filterAttrs (_: v: v ? "mycelium") systems
|
||||
);
|
||||
syncthingIds = lib.mapAttrs (_: v: { id = v.syncthingId; }) (
|
||||
lib.filterAttrs (_: v: v ? "syncthingId") systems
|
||||
);
|
||||
defaultApplications = import ./default-applications.nix;
|
||||
|
||||
email =
|
||||
let
|
||||
thunderbirdProfile = "donnervogel";
|
||||
in
|
||||
{
|
||||
inherit thunderbirdProfile;
|
||||
defaults = {
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles = [ thunderbirdProfile ];
|
||||
};
|
||||
aerc.enable = true;
|
||||
realName = "Kierán Meinhardt";
|
||||
folders.inbox = "INBOX";
|
||||
};
|
||||
};
|
||||
retiolumAddresses = import ./retiolum-network.nix;
|
||||
|
||||
systems = systems;
|
||||
localAddresses = import ./local-network.nix;
|
||||
|
||||
email-sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKz33wHtPuIfgXEb0+hybxFGV9ZuPsDTLUZo/+hlcdA";
|
||||
|
||||
kieran = {
|
||||
github = "kmein";
|
||||
email = "kmein@posteo.de";
|
||||
name = "Kierán Meinhardt";
|
||||
pronouns = builtins.concatStringsSep "/" [
|
||||
"er"
|
||||
"he"
|
||||
"is"
|
||||
"οὗτος"
|
||||
"هو"
|
||||
"ⲛ̄ⲧⲟϥ"
|
||||
"он"
|
||||
"han"
|
||||
"सः"
|
||||
];
|
||||
sshKeys = [
|
||||
systems.fatteh.sshKey
|
||||
systems.manakish.sshKey
|
||||
systems.kabsa.sshKey
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk" # kabsa
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB" # manakish
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y" # fatteh
|
||||
];
|
||||
};
|
||||
|
||||
syncthing.devices = {
|
||||
kabsa.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||
kibbeh.id = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
||||
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||
fatteh.id = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC";
|
||||
};
|
||||
|
||||
ignorePaths = [
|
||||
"*~"
|
||||
".stack-work/"
|
||||
|
||||
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,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
# watcher scripts
|
||||
@@ -29,7 +30,7 @@
|
||||
nick ? ''"$PANOPTIKON_WATCHER"-watcher'',
|
||||
}:
|
||||
pkgs.writers.writeDash "kpaste-irc-reporter" ''
|
||||
KPASTE_CONTENT_TYPE=text/plain ${pkgs.kpaste}/bin/kpaste \
|
||||
KPASTE_CONTENT_TYPE=text/plain ${niveumPackages.kpaste}/bin/kpaste \
|
||||
| ${pkgs.gnused}/bin/sed -n "${
|
||||
if retiolumLink
|
||||
then "2"
|
||||
|
||||
39
lib/retiolum-network.nix
Normal file
39
lib/retiolum-network.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
kabsa = {
|
||||
ipv4 = "10.243.2.4";
|
||||
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
||||
};
|
||||
|
||||
ful = {
|
||||
ipv4 = "10.243.2.107";
|
||||
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
|
||||
};
|
||||
|
||||
zaatar = {
|
||||
ipv4 = "10.243.2.34";
|
||||
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
||||
};
|
||||
|
||||
makanek = {
|
||||
ipv4 = "10.243.2.84";
|
||||
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
|
||||
};
|
||||
|
||||
fatteh = {
|
||||
ipv6 = "42:0:3c46:aa73:82b0:14d7:7bf8:bf2";
|
||||
ipv4 = "10.243.2.77";
|
||||
};
|
||||
|
||||
manakish = {
|
||||
ipv4 = "10.243.2.85";
|
||||
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
|
||||
};
|
||||
tabula = {
|
||||
ipv4 = "10.243.2.78";
|
||||
ipv6 = "";
|
||||
};
|
||||
tahina = {
|
||||
ipv4 = "10.243.2.74";
|
||||
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
|
||||
};
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
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
|
||||
cssls = {},
|
||||
elmls = {}, -- elm-language-server
|
||||
gopls = {}, -- gopls
|
||||
denols = {}, -- deno built in
|
||||
bashls = {}, -- bash-language-server
|
||||
lua_ls = {
|
||||
@@ -155,11 +154,10 @@ local language_servers = {
|
||||
}
|
||||
|
||||
for server, settings in pairs(language_servers) do
|
||||
vim.lsp.config(server, {
|
||||
require('lspconfig')[server].setup{
|
||||
on_attach = on_attach,
|
||||
flags = lsp_flags,
|
||||
settings = settings,
|
||||
capabilities = capabilities
|
||||
})
|
||||
vim.lsp.enable(server)
|
||||
}
|
||||
end
|
||||
@@ -102,7 +102,6 @@ augroup filetypes
|
||||
autocmd bufnewfile,bufread urls,config set filetype=conf
|
||||
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 *.ex,*.exs packadd vim-elixir | set filetype=elixir
|
||||
autocmd filetype haskell packadd haskell-vim | set keywordprg=hoogle\ -i
|
||||
autocmd filetype javascript packadd vim-javascript
|
||||
autocmd filetype make setlocal noexpandtab
|
||||
@@ -125,12 +124,3 @@ set complete+=kspell
|
||||
let g:pandoc#syntax#conceal#use = 0
|
||||
let g:pandoc#modules#disabled = []
|
||||
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";
|
||||
};
|
||||
loadCredential = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
type = lib.types.listOf lib.types.string;
|
||||
description = ''
|
||||
This can be used to pass secrets to the systemd service without adding them to the nix store.
|
||||
'';
|
||||
|
||||
@@ -56,7 +56,7 @@ with lib; let
|
||||
|
||||
imp = {
|
||||
systemd.services.power-action = {
|
||||
serviceConfig = {
|
||||
serviceConfig = rec {
|
||||
ExecStart = startScript;
|
||||
User = cfg.user;
|
||||
};
|
||||
|
||||
@@ -3,33 +3,33 @@
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
pandoc,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "auc";
|
||||
version = "2019-04-02";
|
||||
}: let
|
||||
owner = "kamalist";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "auc";
|
||||
version = "2019-04-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kamalist";
|
||||
repo = "AUC";
|
||||
rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3";
|
||||
sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la";
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
inherit owner;
|
||||
repo = "AUC";
|
||||
rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3";
|
||||
sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,man/man1}
|
||||
install auc $out/bin
|
||||
${pandoc}/bin/pandoc -V title=${lib.escapeShellArg finalAttrs.pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line Roman calendar";
|
||||
longDescription = ''
|
||||
AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans.
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,man/man1}
|
||||
install auc $out/bin
|
||||
${pandoc}/bin/pandoc -V title=${lib.escapeShellArg pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.kmein ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line Roman calendar";
|
||||
longDescription = ''
|
||||
AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = [maintainers.kmein];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
writers,
|
||||
curl,
|
||||
}:
|
||||
writers.writeDashBin "cht.sh" ''
|
||||
writers.writeDashBin "so" ''
|
||||
IFS=+
|
||||
${curl}/bin/curl -sSL http://cht.sh/"$*"
|
||||
''
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{ coreutils, chromium }:
|
||||
chromium.override {
|
||||
commandLineArgs = [
|
||||
"--disable-sync"
|
||||
"--no-default-browser-check"
|
||||
"--no-first-run"
|
||||
"--user-data-dir=$(${coreutils}/bin/mktemp -p $XDG_RUNTIME_DIR -d chromium-XXXXXX)"
|
||||
"--incognito"
|
||||
];
|
||||
}
|
||||
{ writers, chromium }:
|
||||
writers.writeDashBin "cro" ''
|
||||
${chromium}/bin/chromium \
|
||||
--disable-sync \
|
||||
--no-default-browser-check \
|
||||
--no-first-run \
|
||||
--user-data-dir="$(mktemp -d)" \
|
||||
--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 {
|
||||
name = "devanagari";
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./devanagari.js
|
||||
./package.json
|
||||
];
|
||||
};
|
||||
src = ./.;
|
||||
packageJson = ./package.json;
|
||||
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]}
|
||||
|
||||
input=$(mktemp -p "$XDG_RUNTIME_DIR" -u --suffix .fzfmenu.input)
|
||||
output=$(mktemp -p "$XDG_RUNTIME_DIR" -u --suffix .fzfmenu.output)
|
||||
input=$(mktemp -u --suffix .fzfmenu.input)
|
||||
output=$(mktemp -u --suffix .fzfmenu.output)
|
||||
mkfifo "$input"
|
||||
mkfifo "$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,
|
||||
qrencode,
|
||||
texlive,
|
||||
util-linux,
|
||||
utillinux,
|
||||
zbar,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "hc-${finalAttrs.version}";
|
||||
version = "1.0.0";
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hc-${meta.version}";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://cgit.krebsco.de/hc";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
rev = "refs/tags/v${meta.version}";
|
||||
sha256 = "09349gja22p0j3xs082kp0fnaaada14bafszn4r3q7rg1id2slfb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [makeWrapper];
|
||||
|
||||
buildPhase = null;
|
||||
|
||||
@@ -32,21 +31,19 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
cp $src/bin/hc $out/bin/hc
|
||||
|
||||
wrapProgram $out/bin/hc \
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
coreutils
|
||||
findutils
|
||||
gawk
|
||||
gnugrep
|
||||
qrencode
|
||||
texlive.combined.scheme-full
|
||||
util-linux
|
||||
zbar
|
||||
]
|
||||
}
|
||||
--prefix PATH : ${lib.makeBinPath [
|
||||
coreutils
|
||||
findutils
|
||||
gawk
|
||||
gnugrep
|
||||
qrencode
|
||||
texlive.combined.scheme-full
|
||||
utillinux
|
||||
zbar
|
||||
]}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
version = finalAttrs.version;
|
||||
version = "1.0.0";
|
||||
};
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
writers,
|
||||
fetchurl,
|
||||
xan,
|
||||
util-linux,
|
||||
}: let
|
||||
database = fetchurl {
|
||||
url = "http://c.krebsco.de/greek.csv";
|
||||
@@ -10,5 +9,5 @@
|
||||
};
|
||||
in
|
||||
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