mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
Compare commits
18 Commits
1c7c7b71a1
...
2688d3d9ad
| Author | SHA1 | Date | |
|---|---|---|---|
| 2688d3d9ad | |||
| 98efafb738 | |||
| 37ef9a1b05 | |||
| dd50715f43 | |||
| a5d4b082ee | |||
| c1ca5336c8 | |||
| 1c788bf103 | |||
| 82b7ffd39f | |||
| c490c81a32 | |||
| 6ac4d821b8 | |||
| 7c9db88672 | |||
| 35234846f5 | |||
| 36960bc547 | |||
| bde513cc2c | |||
| b4708cb31d | |||
| 936ae927b7 | |||
| 07756a0660 | |||
| 3bf70f8956 |
@@ -12,3 +12,6 @@
|
||||
> das ist ja pure poesie —[riotbib](https://github.com/riotbib/)
|
||||
|
||||
> Deine Configs sind wunderschön <3 —[flxai](https://github.com/flxai/)
|
||||
|
||||
## To do
|
||||
- [ ] get rid of `nixinate`
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
@@ -37,12 +36,12 @@ in {
|
||||
pkgs.bc # calculator
|
||||
pkgs.pari # gp -- better calculator
|
||||
pkgs.ts
|
||||
niveumPackages.vimv
|
||||
niveumPackages.vg
|
||||
niveumPackages.fkill
|
||||
niveumPackages.cyberlocker-tools
|
||||
niveumPackages.untilport
|
||||
niveumPackages.kpaste
|
||||
pkgs.vimv
|
||||
pkgs.vg
|
||||
pkgs.fkill
|
||||
pkgs.cyberlocker-tools
|
||||
pkgs.untilport
|
||||
pkgs.kpaste
|
||||
# HARDWARE
|
||||
pkgs.pciutils # for lspci
|
||||
]
|
||||
@@ -85,7 +84,7 @@ in {
|
||||
'';
|
||||
in
|
||||
{
|
||||
nixi = "nix repl '<nixpkgs>'";
|
||||
nixi = "nix repl nixpkgs";
|
||||
take = "source ${take}";
|
||||
wcd = "source ${wcd}";
|
||||
where = "source ${where}";
|
||||
|
||||
101
configs/aerc.nix
101
configs/aerc.nix
@@ -2,11 +2,9 @@
|
||||
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;
|
||||
@@ -43,14 +41,15 @@ in {
|
||||
extraConfig = {
|
||||
database.path = config.home-manager.users.me.accounts.email.maildirBasePath;
|
||||
new.tags = "";
|
||||
user.name = defaults.realName;
|
||||
user.name = pkgs.lib.niveum.email.defaults.realName;
|
||||
user.primary_email = config.home-manager.users.me.accounts.email.accounts.posteo.address;
|
||||
};
|
||||
};
|
||||
|
||||
programs.mbsync = {
|
||||
enable = true;
|
||||
extraConfig = lib.concatStringsSep "\n\n" (lib.mapAttrsToList (name: account: ''
|
||||
extraConfig = lib.concatStringsSep "\n\n" (
|
||||
lib.mapAttrsToList (name: account: ''
|
||||
IMAPAccount ${name}
|
||||
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||
Host ${account.imap.host}
|
||||
@@ -74,30 +73,35 @@ in {
|
||||
Patterns *
|
||||
Remove None
|
||||
SyncState *
|
||||
'')
|
||||
config.home-manager.users.me.accounts.email.accounts);
|
||||
'') config.home-manager.users.me.accounts.email.accounts
|
||||
);
|
||||
};
|
||||
|
||||
accounts.email.accounts = {
|
||||
cock =
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
let
|
||||
mailhost = "mail.cock.li";
|
||||
address = "2210@cock.li";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
address = address;
|
||||
userName = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-cock.path}";
|
||||
realName = "2210";
|
||||
imap.host = "mail.cock.li";
|
||||
imap.host = mailhost;
|
||||
imap.port = 993;
|
||||
smtp.host = imap.host;
|
||||
smtp.host = mailhost;
|
||||
smtp.port = 25;
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
ical-ephemeris =
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
userName = "ical.ephemeris@web.de";
|
||||
let
|
||||
address = "ical.ephemeris@web.de";
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
userName = address;
|
||||
realName = "Kieran from iCal Ephemeris";
|
||||
address = userName;
|
||||
address = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-ical-ephemeris.path}";
|
||||
imap.host = "imap.web.de";
|
||||
imap.port = 993;
|
||||
@@ -106,15 +110,18 @@ in {
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
posteo =
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
let
|
||||
mailhost = "posteo.de";
|
||||
address = "kieran.meinhardt@posteo.net";
|
||||
aliases = ["kmein@posteo.de"];
|
||||
in
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults {
|
||||
address = address;
|
||||
aliases = [ "kmein@posteo.de" ];
|
||||
userName = address;
|
||||
imap.host = "posteo.de";
|
||||
imap.host = mailhost;
|
||||
imap.port = 993;
|
||||
imap.tls.enable = true;
|
||||
smtp.host = imap.host;
|
||||
smtp.host = mailhost;
|
||||
smtp.port = 465;
|
||||
smtp.tls.enable = true;
|
||||
primary = true;
|
||||
@@ -133,7 +140,7 @@ in {
|
||||
enable = true;
|
||||
settings = {
|
||||
};
|
||||
profiles.${thunderbirdProfile} = {
|
||||
profiles.${pkgs.lib.niveum.email.thunderbirdProfile} = {
|
||||
isDefault = true;
|
||||
settings = {
|
||||
"mail.default_send_format" = 1;
|
||||
@@ -141,10 +148,8 @@ in {
|
||||
"msgcompose.text_color" = config.lib.stylix.colors.withHashtag.base00;
|
||||
"msgcompose.background_color" = config.lib.stylix.colors.withHashtag.base05;
|
||||
};
|
||||
userChrome = ''
|
||||
'';
|
||||
userContent = ''
|
||||
'';
|
||||
userChrome = '''';
|
||||
userContent = '''';
|
||||
withExternalGnupg = false;
|
||||
};
|
||||
};
|
||||
@@ -206,7 +211,7 @@ in {
|
||||
"*" = ":filter -x Flagged<Enter>";
|
||||
};
|
||||
view = {
|
||||
tr = ":pipe ${niveumPackages.trans}/bin/trans -show-original n -b -no-autocorrect<Enter>"; # https://man.sr.ht/~rjarry/aerc/integrations/translator.md
|
||||
tr = ":pipe ${pkgs.trans}/bin/trans -show-original n -b -no-autocorrect<Enter>"; # https://man.sr.ht/~rjarry/aerc/integrations/translator.md
|
||||
"/" = ":toggle-key-passthrough <Enter> /";
|
||||
q = ":close<Enter>";
|
||||
O = ":open<Enter>";
|
||||
@@ -279,7 +284,9 @@ in {
|
||||
ui.spinner = ". , .";
|
||||
general.unsafe-accounts-conf = true;
|
||||
general.pgp-provider = "gpg";
|
||||
viewer = {pager = "${pkgs.less}/bin/less -R";};
|
||||
viewer = {
|
||||
pager = "${pkgs.less}/bin/less -R";
|
||||
};
|
||||
compose = {
|
||||
# address-book-cmd = "khard email --remove-first-line --parsable '%s'";
|
||||
no-attachment-warning = "(attach|attached|attachments?|anbei|Anhang|angehängt|beigefügt)";
|
||||
@@ -296,24 +303,26 @@ in {
|
||||
"message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
||||
};
|
||||
openers = let
|
||||
as-pdf = pkgs.writers.writeDash "as-pdf" ''
|
||||
d=$(mktemp -d)
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$d"
|
||||
}
|
||||
${pkgs.libreoffice}/bin/libreoffice --headless --convert-to pdf "$1" --outdir "$d"
|
||||
${pkgs.zathura}/bin/zathura "$d"/*.pdf
|
||||
'';
|
||||
in {
|
||||
"image/*" = "${pkgs.nsxiv}/bin/nsxiv";
|
||||
"application/pdf" = "${pkgs.zathura}/bin/zathura";
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = toString as-pdf;
|
||||
"application/vnd.oasis.opendocument.text" = toString as-pdf;
|
||||
"video/*" = "${pkgs.mpv}/bin/mpv";
|
||||
"audio/*" = "${pkgs.mpv}/bin/mpv";
|
||||
};
|
||||
openers =
|
||||
let
|
||||
as-pdf = pkgs.writers.writeDash "as-pdf" ''
|
||||
d=$(mktemp -d)
|
||||
trap clean EXIT
|
||||
clean() {
|
||||
rm -rf "$d"
|
||||
}
|
||||
${pkgs.libreoffice}/bin/libreoffice --headless --convert-to pdf "$1" --outdir "$d"
|
||||
${pkgs.zathura}/bin/zathura "$d"/*.pdf
|
||||
'';
|
||||
in
|
||||
{
|
||||
"image/*" = "${pkgs.nsxiv}/bin/nsxiv";
|
||||
"application/pdf" = "${pkgs.zathura}/bin/zathura";
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = toString as-pdf;
|
||||
"application/vnd.oasis.opendocument.text" = toString as-pdf;
|
||||
"video/*" = "${pkgs.mpv}/bin/mpv";
|
||||
"audio/*" = "${pkgs.mpv}/bin/mpv";
|
||||
};
|
||||
};
|
||||
|
||||
templates = {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) restic;
|
||||
in {
|
||||
}:
|
||||
{
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
inherit (restic) repository;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "8:00";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -38,7 +38,7 @@ in {
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "restic-niveum" ''
|
||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} "$@"
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "restic-mount" ''
|
||||
mountdir=$(mktemp -d)
|
||||
@@ -46,7 +46,7 @@ in {
|
||||
clean() {
|
||||
rm -r "$mountdir"
|
||||
}
|
||||
${pkgs.restic}/bin/restic -r ${restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
||||
${pkgs.restic}/bin/restic -r ${pkgs.lib.niveum.restic.repository} -p ${config.age.secrets.restic.path} mount "$mountdir"
|
||||
'')
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
telebots = inputs.telebots.defaultPackage.x86_64-linux;
|
||||
reverseDirectory = "/run/telegram-reverse";
|
||||
proverbDirectory = "/run/telegram-proverb";
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
in {
|
||||
imports = [
|
||||
./logotheca.nix
|
||||
@@ -27,7 +26,7 @@ in {
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = map (path:
|
||||
tmpfilesConfig {
|
||||
pkgs.lib.niveum.tmpfilesConfig {
|
||||
type = "d";
|
||||
mode = "0750";
|
||||
age = "1h";
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
niveum.bots.logotheca = {
|
||||
@@ -22,7 +20,7 @@
|
||||
"!zlwCuPiCNMSxDviFzA:4d2.org"
|
||||
];
|
||||
};
|
||||
command = "${niveumPackages.literature-quote}/bin/literature-quote";
|
||||
command = "${pkgs.literature-quote}/bin/literature-quote";
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
niveum.bots.nietzsche = {
|
||||
@@ -16,9 +15,9 @@
|
||||
set -efu
|
||||
random_number=$(( ($RANDOM % 10) + 1 ))
|
||||
if [ "$random_number" -eq 1 ]; then
|
||||
${niveumPackages.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
||||
${pkgs.random-zeno}/bin/random-zeno "/Literatur/M/Nietzsche,+Friedrich"
|
||||
else
|
||||
${niveumPackages.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
||||
${pkgs.random-zeno}/bin/random-zeno "/Philosophie/M/Nietzsche,+Friedrich"
|
||||
fi
|
||||
'');
|
||||
};
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
unstablePackages,
|
||||
...
|
||||
}: let
|
||||
mastodonEndpoint = "https://social.krebsco.de";
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
niveumPackages.cro
|
||||
pkgs.cro
|
||||
pkgs.tor-browser
|
||||
pkgs.firefox
|
||||
pkgs.brave
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{pkgs, ...}:
|
||||
# https://paste.sr.ht/~erictapen/11716989e489b600f237041b6d657fdf0ee17b34
|
||||
let
|
||||
certificate = pkgs.stdenv.mkDerivation rec {
|
||||
name = "dst-root-ca-x3.pem";
|
||||
name = "dst-root-ca-x3.pem";
|
||||
certificate = pkgs.stdenv.mkDerivation {
|
||||
inherit name;
|
||||
src = builtins.toFile "${name}.sed" ''
|
||||
1,/DST Root CA X3/d
|
||||
1,/-----END CERTIFICATE-----/p
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) tmpfilesConfig;
|
||||
in {
|
||||
}: {
|
||||
systemd.user.services.systemd-tmpfiles-clean = {
|
||||
enable = true;
|
||||
wantedBy = [ "default.target" ];
|
||||
@@ -16,7 +14,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.users.me.rules = map tmpfilesConfig [
|
||||
systemd.user.tmpfiles.users.me.rules = map pkgs.lib.niveum.tmpfilesConfig [
|
||||
{
|
||||
type = "d";
|
||||
mode = "0755";
|
||||
@@ -29,7 +27,7 @@ in {
|
||||
age = "7d";
|
||||
path = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
||||
}
|
||||
] ++ map (path: tmpfilesConfig {
|
||||
] ++ map (path: pkgs.lib.niveum.tmpfilesConfig {
|
||||
type = "L+";
|
||||
user = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
@@ -121,7 +119,7 @@ in {
|
||||
cert = config.age.secrets.syncthing-cert.path;
|
||||
key = config.age.secrets.syncthing-key.path;
|
||||
settings = {
|
||||
inherit ((import ../lib).syncthing) devices;
|
||||
devices = pkgs.lib.niveum.syncthingIds;
|
||||
folders = {
|
||||
"${config.users.users.me.home}/sync" = {
|
||||
devices = ["kabsa" "manakish" "fatteh"];
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import ../lib) localAddresses kieran remoteDir;
|
||||
defaultApplications = (import ../lib).defaultApplications { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@@ -68,7 +65,7 @@ in
|
||||
|
||||
users.users.me = {
|
||||
name = "kfm";
|
||||
description = kieran.name;
|
||||
description = pkgs.lib.niveum.kieran.name;
|
||||
hashedPasswordFile = config.age.secrets.kfm-password.path;
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
@@ -90,7 +87,7 @@ in
|
||||
environment.interactiveShellInit = "export PATH=$PATH";
|
||||
environment.shellAliases =
|
||||
let
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
||||
in
|
||||
{
|
||||
o = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
@@ -140,9 +137,9 @@ in
|
||||
agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
settings = rec {
|
||||
default-cache-ttl = 2 * 60 * 60;
|
||||
max-cache-ttl = 4 * default-cache-ttl;
|
||||
settings = let defaultCacheTtl = 2 * 60 * 60; in {
|
||||
default-cache-ttl = defaultCacheTtl;
|
||||
max-cache-ttl = 4 * defaultCacheTtl;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -169,7 +166,7 @@ in
|
||||
networking.hosts = lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = [ "${name}.local" ];
|
||||
}) localAddresses;
|
||||
}) pkgs.lib.niveum.localAddresses;
|
||||
}
|
||||
{
|
||||
home-manager.users.me.home.stateVersion = "22.05";
|
||||
@@ -190,7 +187,7 @@ in
|
||||
dconf.enable = true;
|
||||
dconf.settings = {
|
||||
# Change the default terminal for Nemo
|
||||
"org/cinnamon/desktop/applications/terminal".exec = defaultApplications.terminal;
|
||||
"org/cinnamon/desktop/applications/terminal".exec = pkgs.lib.niveum.defaultApplications.terminal;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -218,10 +215,9 @@ in
|
||||
./uni.nix
|
||||
./i3.nix
|
||||
./i3status-rust.nix
|
||||
./keyboard.nix
|
||||
./keyboard
|
||||
./mycelium.nix
|
||||
./kdeconnect.nix
|
||||
{ home-manager.users.me.home.file.".XCompose".source = ../lib/keyboards/XCompose; }
|
||||
{ services.upower.enable = true; }
|
||||
./lb.nix
|
||||
./mpv.nix
|
||||
@@ -258,15 +254,15 @@ in
|
||||
./mastodon-bot.nix
|
||||
{
|
||||
home-manager.users.me = {
|
||||
xdg.userDirs = rec {
|
||||
xdg.userDirs = let pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder"; in {
|
||||
enable = true;
|
||||
documents = "${config.users.users.me.home}/cloud/nextcloud/Documents";
|
||||
desktop = "/tmp";
|
||||
download = "${config.users.users.me.home}/sync/Downloads";
|
||||
music = "${config.users.users.me.home}/mobile/audio";
|
||||
pictures = "${config.users.users.me.home}/cloud/nextcloud/Bilder";
|
||||
publicShare = "${config.users.users.me.home}/cloud/nextcloud/tmp";
|
||||
videos = pictures;
|
||||
pictures = pictures;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) defaultApplications theme;
|
||||
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
@@ -18,7 +17,7 @@ in {
|
||||
|
||||
home-manager.users.me.services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = (theme pkgs).icon;
|
||||
iconTheme = pkgs.lib.niveum.theme.icon;
|
||||
settings = {
|
||||
global = {
|
||||
transparency = 10;
|
||||
@@ -44,7 +43,7 @@ in {
|
||||
sticky_history = true;
|
||||
history_length = 20;
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||
browser = (defaultApplications pkgs).browser;
|
||||
browser = pkgs.lib.niveum.defaultApplications.browser;
|
||||
verbosity = "mesg";
|
||||
corner_radius = 0;
|
||||
mouse_left_click = "do_action";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
zip-font = name: arguments: let
|
||||
@@ -93,7 +92,6 @@ in {
|
||||
font-awesome
|
||||
galatia-sil
|
||||
gentium
|
||||
# niveumPackages.gfs-fonts
|
||||
gyre-fonts
|
||||
ibm-plex
|
||||
jetbrains-mono
|
||||
@@ -114,16 +112,16 @@ in {
|
||||
source-sans-pro
|
||||
source-serif-pro
|
||||
theano
|
||||
niveumPackages.tocharian-font
|
||||
tocharian-font
|
||||
vista-fonts
|
||||
vollkorn
|
||||
zilla-slab
|
||||
]; # google-fonts league-of-moveable-type
|
||||
fontconfig.defaultFonts = rec {
|
||||
fontconfig.defaultFonts = let emoji = ["Noto Color Emoji"]; in {
|
||||
monospace = ["Noto Sans Mono"] ++ emoji;
|
||||
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
|
||||
sansSerif = ["Noto Sans Display" "Noto Naskh Arabic" "Noto Sans Hebrew" "Noto Sans Devanagari" "Noto Sans CJK JP" "Noto Sans Coptic" "Noto Sans Syriac Western"];
|
||||
emoji = ["Noto Color Emoji"];
|
||||
inherit emoji;
|
||||
};
|
||||
# xelatex fails with woff files
|
||||
# ref https://tex.stackexchange.com/questions/392144/xelatex-and-fontspec-crash-trying-to-find-woff-file-for-some-fonts-but-not-other
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib/email.nix) defaults;
|
||||
sshIdentity = name: "${config.users.users.me.home}/.ssh/${name}";
|
||||
in {
|
||||
age.secrets = {
|
||||
email-password-fysi = {
|
||||
file = ../secrets/email-password-fysi.age;
|
||||
owner = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.me = {
|
||||
accounts.email.accounts = {
|
||||
fysi =
|
||||
lib.recursiveUpdate defaults
|
||||
rec {
|
||||
address = "kieran@fysi.tech";
|
||||
userName = address;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-fysi.path}";
|
||||
flavor = "fastmail.com";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.matchBlocks = rec {
|
||||
"nextcloud.fysi.dev" = {
|
||||
hostname = "116.203.82.203";
|
||||
user = "root";
|
||||
};
|
||||
"lingua.miaengiadina.ch" = {
|
||||
hostname = "135.181.85.233";
|
||||
user = "root";
|
||||
};
|
||||
"cms-dev.woc2023.app".identityFile = sshIdentity "fysiweb";
|
||||
"cms-master.woc2023.app".identityFile = sshIdentity "fysiweb";
|
||||
"fysi-dev1" = {
|
||||
hostname = "94.130.229.139";
|
||||
user = "root";
|
||||
identityFile = sshIdentity "fysiweb";
|
||||
};
|
||||
${fysi-dev1.hostname} = fysi-dev1;
|
||||
"fysi-shared0" = {
|
||||
hostname = "49.12.205.235";
|
||||
user = "root";
|
||||
identityFile = sshIdentity "fysiweb";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -5,9 +5,11 @@
|
||||
};
|
||||
|
||||
home-manager.users.me = {
|
||||
programs.fzf = rec {
|
||||
enable = true;
|
||||
programs.fzf = let
|
||||
defaultCommand = "${pkgs.fd}/bin/fd --type f --strip-cwd-prefix --follow --no-ignore-vcs --exclude .git";
|
||||
in {
|
||||
enable = true;
|
||||
defaultCommand = defaultCommand;
|
||||
defaultOptions = ["--height=40%"];
|
||||
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||
changeDirWidgetOptions = [
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) kieran ignorePaths;
|
||||
in {
|
||||
}:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.mr
|
||||
pkgs.gitFull
|
||||
@@ -41,9 +40,9 @@ in {
|
||||
logs = "log --pretty=oneline";
|
||||
graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
};
|
||||
ignores = ignorePaths;
|
||||
settings.user.name = kieran.name;
|
||||
settings.user.email = kieran.email;
|
||||
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;
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) defaultApplications;
|
||||
klem = niveumPackages.klem.override {
|
||||
config.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
config.scripts = {
|
||||
klem = pkgs.klem.override {
|
||||
options.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
options.scripts = {
|
||||
"p.r paste" = pkgs.writers.writeDash "p.r" ''
|
||||
${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \
|
||||
| ${pkgs.coreutils}/bin/tail --lines=1 \
|
||||
@@ -37,10 +35,10 @@
|
||||
${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
|
||||
'';
|
||||
"ipa" = pkgs.writers.writeDash "ipa" ''
|
||||
${niveumPackages.ipa}/bin/ipa
|
||||
${pkgs.ipa}/bin/ipa
|
||||
'';
|
||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||
${niveumPackages.betacode}/bin/betacode
|
||||
${pkgs.betacode}/bin/betacode
|
||||
'';
|
||||
"curl" = pkgs.writers.writeDash "curl" ''
|
||||
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||
@@ -51,12 +49,6 @@
|
||||
emojai = pkgs.writers.writeDash "emojai" ''
|
||||
${pkgs.curl}/bin/curl https://www.emojai.app/api/generate -X POST -H 'Content-Type: application/json' --data-raw "$(${pkgs.jq}/bin/jq -sR '{emoji:.}')" | ${pkgs.jq}/bin/jq -r .result
|
||||
'';
|
||||
"gpt-3.5" = pkgs.writers.writeDash "gpt" ''
|
||||
${niveumPackages.gpt35}/bin/gpt
|
||||
'';
|
||||
gpt-4 = pkgs.writers.writeDash "gpt" ''
|
||||
${niveumPackages.gpt4}/bin/gpt
|
||||
'';
|
||||
};
|
||||
};
|
||||
in {
|
||||
@@ -130,12 +122,12 @@ in {
|
||||
titlebar = false;
|
||||
border = 1;
|
||||
};
|
||||
bars = [
|
||||
(config.home-manager.users.me.stylix.targets.i3.exportedBarConfig
|
||||
// rec {
|
||||
bars = let position = "bottom"; in [
|
||||
(lib.recursiveUpdate config.home-manager.users.me.stylix.targets.i3.exportedBarConfig
|
||||
{
|
||||
workspaceButtons = true;
|
||||
mode = "hide"; # "dock";
|
||||
position = "bottom";
|
||||
inherit position;
|
||||
statusCommand = toString (pkgs.writers.writeDash "i3status-rust" ''
|
||||
export I3RS_GITHUB_TOKEN="$(cat ${config.age.secrets.github-token-i3status-rust.path})"
|
||||
export OPENWEATHERMAP_API_KEY="$(cat ${config.age.secrets.openweathermap-api-key.path})"
|
||||
@@ -224,15 +216,15 @@ in {
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+q" = "exec ${config.services.clipmenu.package}/bin/clipmenu";
|
||||
|
||||
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
||||
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
|
||||
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
|
||||
"${modifier}+Return" = "exec ${pkgs.lib.niveum.defaultApplications.terminal}";
|
||||
"${modifier}+t" = "exec ${pkgs.lib.niveum.defaultApplications.fileManager}";
|
||||
"${modifier}+y" = "exec ${pkgs.lib.niveum.defaultApplications.browser}";
|
||||
|
||||
"${modifier}+d" = "exec ${pkgs.writers.writeDash "run" ''exec rofi -modi run,ssh,window -show run''}";
|
||||
"${modifier}+Shift+d" = "exec ${niveumPackages.notemenu}/bin/notemenu";
|
||||
"${modifier}+Shift+d" = "exec ${pkgs.notemenu}/bin/notemenu";
|
||||
"${modifier}+p" = "exec rofi-pass";
|
||||
"${modifier}+Shift+p" = "exec rofi-pass --insert";
|
||||
"${modifier}+u" = "exec ${niveumPackages.unicodmenu}/bin/unicodmenu";
|
||||
"${modifier}+u" = "exec ${pkgs.unicodmenu}/bin/unicodmenu";
|
||||
"${modifier}+Shift+u" = "exec ${pkgs.writers.writeDash "last-unicode" ''${pkgs.xdotool}/bin/xdotool type --delay 1000 "$(${pkgs.gawk}/bin/awk 'END{print $1}' ~/.cache/unicodmenu)"''}";
|
||||
|
||||
"${modifier}+F7" = "exec ${pkgs.writers.writeDash "showkeys-toggle" ''
|
||||
@@ -252,7 +244,6 @@ in {
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
|
||||
"XF86ScreenSaver" = "exec ${niveumPackages.k-lock}/bin/k-lock";
|
||||
|
||||
# key names detected with xorg.xev:
|
||||
# XF86WakeUp (fn twice)
|
||||
@@ -288,7 +279,6 @@ in {
|
||||
config = {
|
||||
inherit modifier gaps modes bars floating window colors;
|
||||
keybindings = keybindings // {
|
||||
"${modifier}+ß" = "exec ${niveumPackages.menu-calc}/bin/=";
|
||||
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
|
||||
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
|
||||
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
||||
@@ -296,7 +286,7 @@ in {
|
||||
"Print" = "exec flameshot gui";
|
||||
# "${modifier}+Shift+x" = "exec ${move-to-new-workspace}";
|
||||
# "${modifier}+x" = "exec ${new-workspace}";
|
||||
"XF86Display" = "exec ${niveumPackages.dmenu-randr}/bin/dmenu-randr";
|
||||
"XF86Display" = "exec ${pkgs.dmenu-randr}/bin/dmenu-randr";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
@@ -27,10 +28,10 @@ let
|
||||
arabic = {
|
||||
code = "ara";
|
||||
variant = "buckwalter";
|
||||
}; # ../lib/keyboards/arabic;
|
||||
coptic = ../lib/keyboards/coptic;
|
||||
avestan = ../lib/keyboards/avestan;
|
||||
gothic = ../lib/keyboards/gothic;
|
||||
};
|
||||
coptic = ./coptic;
|
||||
avestan = ./avestan;
|
||||
gothic = ./gothic;
|
||||
farsi = {
|
||||
code = "ir";
|
||||
variant = "qwerty";
|
||||
@@ -63,40 +64,42 @@ in
|
||||
|
||||
# man 7 xkeyboard-config
|
||||
services.xserver = {
|
||||
exportConfiguration = true; # link /usr/share/X11 properly
|
||||
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.dir = pkgs.symlinkJoin {
|
||||
name = "x-keyboard-directory";
|
||||
paths = [
|
||||
"${pkgs.xkeyboard_config}/etc/X11/xkb"
|
||||
(pkgs.linkFarm "custom-x-keyboards" (
|
||||
lib.mapAttrsToList (name: value: {
|
||||
name = "symbols/${name}";
|
||||
path = value;
|
||||
}) (lib.filterAttrs (_: value: !(value ? "code")) languages)
|
||||
++ [
|
||||
{
|
||||
name = "symbols/ir";
|
||||
path = ../lib/keyboards/farsi;
|
||||
}
|
||||
]
|
||||
))
|
||||
];
|
||||
xkb.extraLayouts = {
|
||||
coptic = {
|
||||
languages = [ "cop" ];
|
||||
description = "Coptic 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 =
|
||||
lib.mapAttrs' (name: path: lib.nameValuePair ".xkb/symbols/${name}" { source = path; })
|
||||
(lib.filterAttrs (_: value: !(value ? "code")) languages) // {
|
||||
".xkb/symbols/ir".source = ../lib/keyboards/farsi;
|
||||
};
|
||||
home.file = {
|
||||
".XCompose".source = ./XCompose;
|
||||
};
|
||||
};
|
||||
|
||||
console.keyMap = "de";
|
||||
@@ -118,7 +121,7 @@ in
|
||||
swaymsg -s $SWAYSOCK 'input * xkb_options "${lib.concatStringsSep "," xkbOptions}"'
|
||||
fi
|
||||
''
|
||||
) languages;
|
||||
) (languages // config.services.xserver.xkb.extraLayouts);
|
||||
|
||||
# improve held key rate
|
||||
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
||||
@@ -10,11 +10,6 @@
|
||||
username = "kieran";
|
||||
passwordFile = config.age.secrets.nextcloud-password-kieran.path;
|
||||
};
|
||||
fysiCloud = {
|
||||
davEndpoint = "https://nextcloud.fysi.dev/remote.php/dav";
|
||||
username = "kmein";
|
||||
passwordFile = config.age.secrets.nextcloud-password-fysi.path;
|
||||
};
|
||||
in {
|
||||
age.secrets = {
|
||||
nextcloud-password-kieran = {
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
|
||||
swallow = command: "${pkgs.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
environment.shellAliases.smpv = swallow "mpv";
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
myceliumAddresses = import ../lib/mycelium-network.nix;
|
||||
in
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
services.mycelium = {
|
||||
enable = true;
|
||||
@@ -11,5 +8,5 @@ in
|
||||
networking.hosts = lib.mapAttrs' (name: address: {
|
||||
name = address;
|
||||
value = [ "${name}.m" ];
|
||||
}) myceliumAddresses;
|
||||
}) pkgs.lib.niveum.myceliumAddresses;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
@@ -36,7 +35,7 @@
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
||||
(niveumPackages.vim.override {
|
||||
(pkgs.vim-kmein.override {
|
||||
# stylixColors = config.lib.stylix.colors;
|
||||
colorscheme = "base16-gruvbox-dark-medium";
|
||||
})
|
||||
|
||||
@@ -3,13 +3,10 @@
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
worldradio = pkgs.callPackage ../packages/worldradio.nix {};
|
||||
|
||||
externalNetwork = import ../lib/external-network.nix;
|
||||
|
||||
zoteroStyle = {
|
||||
name,
|
||||
sha256,
|
||||
@@ -109,7 +106,7 @@ in {
|
||||
calibre
|
||||
electrum
|
||||
inkscape
|
||||
niveumPackages.gimp
|
||||
gimp
|
||||
gthumb
|
||||
astrolog
|
||||
obsidian
|
||||
@@ -120,7 +117,7 @@ in {
|
||||
zoom-us # video conferencing
|
||||
(pkgs.writers.writeDashBin "im" ''
|
||||
weechat_password=$(${pkgs.pass}/bin/pass weechat)
|
||||
exec ${weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${externalNetwork.makanek}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
||||
exec ${weechat}/bin/weechat -t -r '/mouse enable; /remote add makanek http://${pkgs.lib.niveum.systems.makanek.externalIp}:8002 -password='"$weechat_password"'; /remote connect makanek'
|
||||
'')
|
||||
alejandra # nix formatter
|
||||
pdfgrep # search in pdf
|
||||
@@ -130,60 +127,59 @@ in {
|
||||
kdePackages.okular # the word is nucular
|
||||
xournalpp # for annotating pdfs
|
||||
pdfpc # presenter console for pdf slides
|
||||
niveumPackages.hc # print files as qr codes
|
||||
hc # print files as qr codes
|
||||
yt-dlp
|
||||
espeak
|
||||
rink # unit converter
|
||||
niveumPackages.auc
|
||||
niveumPackages.noise-waves
|
||||
niveumPackages.stag
|
||||
niveumPackages.cheat-sh
|
||||
niveumPackages.polyglot
|
||||
niveumPackages.qrpaste
|
||||
niveumPackages.ttspaste
|
||||
niveumPackages.new-mac # get a new mac address
|
||||
niveumPackages.scanned
|
||||
niveumPackages.default-gateway
|
||||
niveumPackages.kirciuoklis
|
||||
niveumPackages.image-convert-favicon
|
||||
niveumPackages.heuretes
|
||||
niveumPackages.ipa # XSAMPA to IPA converter
|
||||
niveumPackages.pls
|
||||
niveumPackages.mpv-tv
|
||||
niveumPackages.mpv-iptv
|
||||
niveumPackages.devanagari
|
||||
niveumPackages.betacode # ancient greek betacode to unicode converter
|
||||
pkgs.jq-lsp
|
||||
niveumPackages.swallow # window swallowing
|
||||
niveumPackages.literature-quote
|
||||
niveumPackages.booksplit
|
||||
niveumPackages.dmenu-randr
|
||||
niveumPackages.manual-sort
|
||||
niveumPackages.wttr
|
||||
niveumPackages.unicodmenu
|
||||
niveumPackages.emailmenu
|
||||
niveumPackages.closest
|
||||
niveumPackages.trans
|
||||
(niveumPackages.mpv-radio.override {
|
||||
auc
|
||||
noise-waves
|
||||
stag
|
||||
cheat-sh
|
||||
polyglot
|
||||
qrpaste
|
||||
ttspaste
|
||||
new-mac # get a new mac address
|
||||
scanned
|
||||
default-gateway
|
||||
kirciuoklis
|
||||
image-convert-favicon
|
||||
heuretes
|
||||
ipa # XSAMPA to IPA converter
|
||||
pls
|
||||
mpv-tv
|
||||
mpv-iptv
|
||||
devanagari
|
||||
betacode # ancient greek betacode to unicode converter
|
||||
jq-lsp
|
||||
swallow # window swallowing
|
||||
literature-quote
|
||||
booksplit
|
||||
dmenu-randr
|
||||
manual-sort
|
||||
wttr
|
||||
unicodmenu
|
||||
emailmenu
|
||||
closest
|
||||
trans
|
||||
(mpv-radio.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
})
|
||||
(niveumPackages.mpv-radio.override {
|
||||
(mpv-radio.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
executableName = "cro-radio";
|
||||
mpvCommand = "${niveumPackages.cro}/bin/cro";
|
||||
mpvCommand = "${cro}/bin/cro";
|
||||
})
|
||||
(niveumPackages.mpv-tuner.override {
|
||||
(mpv-tuner.override {
|
||||
di-fm-key-file = config.age.secrets.di-fm-key.path;
|
||||
})
|
||||
# kmein.slide
|
||||
termdown
|
||||
niveumPackages.image-convert-tolino
|
||||
niveumPackages.rfc
|
||||
niveumPackages.tag
|
||||
niveumPackages.timer
|
||||
niveumPackages.menu-calc
|
||||
image-convert-tolino
|
||||
rfc
|
||||
tag
|
||||
timer
|
||||
nix-prefetch-git
|
||||
niveumPackages.nix-git
|
||||
nix-git
|
||||
nixfmt-rfc-style
|
||||
par
|
||||
qrencode
|
||||
@@ -239,7 +235,7 @@ in {
|
||||
latexrun
|
||||
(aspellWithDicts (dict: [dict.de dict.en dict.en-computers]))
|
||||
# haskellPackages.pandoc-citeproc
|
||||
niveumPackages.text2pdf
|
||||
text2pdf
|
||||
lowdown
|
||||
glow # markdown to term
|
||||
libreoffice
|
||||
@@ -247,7 +243,7 @@ in {
|
||||
dia
|
||||
pandoc
|
||||
librsvg # pandoc depends on this to include SVG in documents
|
||||
# niveumPackages.man-pandoc
|
||||
# man-pandoc
|
||||
typst
|
||||
# proselint
|
||||
asciidoctor
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{pkgs, ...}: let
|
||||
inherit (import ../lib) localAddresses;
|
||||
{pkgs, lib, ...}: let
|
||||
hp-driver = pkgs.hplip;
|
||||
in {
|
||||
services.printing = {
|
||||
@@ -18,7 +17,7 @@ in {
|
||||
{
|
||||
name = "OfficeJet";
|
||||
location = "Zimmer";
|
||||
deviceUri = "https://${localAddresses.officejet}";
|
||||
deviceUri = "https://${pkgs.lib.niveum.localAddresses.officejet}";
|
||||
model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd";
|
||||
ppdOptions = {
|
||||
Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{pkgs, ...}: let
|
||||
inherit (import ../lib) sshPort kieran;
|
||||
externalNetwork = import ../lib/external-network.nix;
|
||||
in {
|
||||
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys;
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
users.users.me.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys;
|
||||
programs.ssh.startAgent = true;
|
||||
services.gnome.gcr-ssh-agent.enable = false;
|
||||
|
||||
@@ -12,33 +10,8 @@ in {
|
||||
eval $(${pkgs.gnome3.gnome-keyring}/bin/gnome-keyring-daemon --daemonize --components=ssh,secrets)
|
||||
export SSH_AUTH_SOCK
|
||||
'';
|
||||
# services.gpg-agent = rec {
|
||||
# enable = false;
|
||||
# enableSshSupport = true;
|
||||
# defaultCacheTtlSsh = 2 * 60 * 60;
|
||||
# maxCacheTtlSsh = 4 * defaultCacheTtlSsh;
|
||||
# sshKeys = [
|
||||
# "568047C91DE03A23883E340F15A9C24D313E847C"
|
||||
# "BB3EE102DB8CD45540A78A6B18B511B67061F6B4" # kfm@manakish ed25519
|
||||
# "3F8986755818B5762A096BE212777EAAC441DD9D" # fysiweb rsa
|
||||
# "0E4ABD229432486CC432639BB0986B2CDE365105" # agenix ed25519
|
||||
# "A1E8D32CBFCDBD2DE798E2298D795CCFD785AE06" # kfm@kabsa ed25519
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
# environment.extraInit = ''
|
||||
# if [[ -z "$SSH_AUTH_SOCK" ]]; then
|
||||
# export SSH_AUTH_SOCK="$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)"
|
||||
# fi
|
||||
# '';
|
||||
|
||||
# environment.interactiveShellInit = ''
|
||||
# GPG_TTY="$(tty)"
|
||||
# export GPG_TTY
|
||||
# ${pkgs.gnupg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||
# '';
|
||||
|
||||
home-manager.users.me.programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
@@ -50,42 +23,42 @@ in {
|
||||
zaatar = {
|
||||
hostname = "zaatar.r";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
makanek = {
|
||||
hostname = externalNetwork.makanek;
|
||||
hostname = pkgs.lib.niveum.externalNetwork.makanek;
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
ful = {
|
||||
hostname = externalNetwork.ful;
|
||||
hostname = pkgs.lib.niveum.externalNetwork.ful;
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
tahina = {
|
||||
hostname = "tahina.r";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
tabula = {
|
||||
hostname = "tabula.r";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
manakish = {
|
||||
hostname = "manakish.r";
|
||||
user = "kfm";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
kabsa = {
|
||||
hostname = "kabsa.r";
|
||||
user = "kfm";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
fatteh = {
|
||||
hostname = "fatteh.r";
|
||||
user = "kfm";
|
||||
port = sshPort;
|
||||
port = pkgs.lib.niveum.sshPort;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) sshPort kieran;
|
||||
in {
|
||||
}:
|
||||
{
|
||||
users.motd = "Welcome to ${config.networking.hostName}!";
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [sshPort];
|
||||
ports = [ pkgs.lib.niveum.sshPort ];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
X11Forwarding = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys ++ [
|
||||
users.users.root.openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys ++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoiRIn1dBUtpApcUyGbZKN+m5KBSgKIDQjdnQ8vU0xU kfm@kibbeh" # travel laptop
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,13 +5,11 @@
|
||||
...
|
||||
}: let
|
||||
username = "meinhak99";
|
||||
inherit (import ../lib/email.nix) defaults pronouns;
|
||||
inherit (import ../lib) remoteDir;
|
||||
fu-defaults = rec {
|
||||
imap.host = "mail.zedat.fu-berlin.de";
|
||||
fu-defaults = let mailhost = "mail.zedat.fu-berlin.de"; in {
|
||||
imap.host = mailhost;
|
||||
imap.port = 993;
|
||||
imap.tls.enable = true;
|
||||
smtp.host = imap.host;
|
||||
smtp.host = mailhost;
|
||||
smtp.port = 465;
|
||||
smtp.tls.enable = true;
|
||||
folders.drafts = "Entwürfe";
|
||||
@@ -31,7 +29,7 @@ in {
|
||||
};
|
||||
accounts.email.accounts = {
|
||||
letos =
|
||||
lib.recursiveUpdate defaults
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
||||
{
|
||||
userName = "slfletos";
|
||||
address = "letos.sprachlit@hu-berlin.de";
|
||||
@@ -43,10 +41,10 @@ in {
|
||||
smtp.tls.useStartTls = true;
|
||||
};
|
||||
fu =
|
||||
lib.recursiveUpdate defaults
|
||||
lib.recursiveUpdate pkgs.lib.niveum.email.defaults
|
||||
(lib.recursiveUpdate fu-defaults
|
||||
rec {
|
||||
userName = "meinhak99";
|
||||
(let userName = "meinhak99"; in {
|
||||
userName = userName;
|
||||
address = "kieran.meinhardt@fu-berlin.de";
|
||||
aliases = ["${userName}@fu-berlin.de"];
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.email-password-meinhak99.path}";
|
||||
@@ -54,7 +52,7 @@ in {
|
||||
enable = true;
|
||||
settings.backend = "imap";
|
||||
};
|
||||
});
|
||||
}));
|
||||
};
|
||||
};
|
||||
|
||||
@@ -100,7 +98,7 @@ in {
|
||||
firstCharacter = lib.strings.substring 0 1;
|
||||
|
||||
home-directory-mount = user: {
|
||||
"${remoteDir}/fu/${user}/home" = {
|
||||
"${pkgs.lib.niveum.remoteDir}/fu/${user}/home" = {
|
||||
device = "${user}@login.zedat.fu-berlin.de:/home/${firstCharacter user}/${user}";
|
||||
fsType = "sshfs";
|
||||
options = [
|
||||
|
||||
39
flake.lock
generated
39
flake.lock
generated
@@ -456,24 +456,7 @@
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
@@ -1393,7 +1376,6 @@
|
||||
"agenix": "agenix",
|
||||
"autorenkalender": "autorenkalender",
|
||||
"coptic-dictionary": "coptic-dictionary",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"home-manager": "home-manager_2",
|
||||
"menstruation-backend": "menstruation-backend_2",
|
||||
"menstruation-telegram": "menstruation-telegram_2",
|
||||
@@ -1611,7 +1593,7 @@
|
||||
"nixpkgs"
|
||||
],
|
||||
"nur": "nur_3",
|
||||
"systems": "systems_4",
|
||||
"systems": "systems_3",
|
||||
"tinted-foot": "tinted-foot",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-schemes": "tinted-schemes",
|
||||
@@ -1693,21 +1675,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"telebots": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
@@ -1959,7 +1926,7 @@
|
||||
},
|
||||
"wallpaper-generator_2": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_4",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_13"
|
||||
},
|
||||
"locked": {
|
||||
|
||||
662
flake.nix
662
flake.nix
@@ -53,6 +53,7 @@
|
||||
agenix,
|
||||
retiolum,
|
||||
nixinate,
|
||||
coptic-dictionary,
|
||||
menstruation-backend,
|
||||
menstruation-telegram,
|
||||
scripts,
|
||||
@@ -78,61 +79,63 @@
|
||||
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
|
||||
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}" {
|
||||
lib.mergeAttrsList [
|
||||
(nixinate.nixinate.x86_64-linux self)
|
||||
{
|
||||
mock-secrets = {
|
||||
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.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
|
||||
''
|
||||
);
|
||||
}
|
||||
) (builtins.attrNames self.nixosConfigurations)
|
||||
)
|
||||
// {
|
||||
deploy-ful = {
|
||||
type = "app";
|
||||
program = toString (
|
||||
pkgs.writers.writeDash "deploy-ful" ''
|
||||
exec ${pkgs.nix}/bin/nix run .#nixinate.ful \
|
||||
--log-format internal-json 2>&1 \
|
||||
| ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
''
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# TODO overlay for packages
|
||||
@@ -149,263 +152,316 @@
|
||||
};
|
||||
|
||||
lib = {
|
||||
panoptikon = import lib/panoptikon.nix;
|
||||
};
|
||||
|
||||
nixosConfigurations = let
|
||||
niveumSpecialArgs = system: {
|
||||
unstablePackages = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (nixpkgs-unstable.lib.getName pkg) [
|
||||
"obsidian"
|
||||
"zoom"
|
||||
];
|
||||
};
|
||||
|
||||
niveumPackages = self.packages.${system};
|
||||
niveumLib = self.lib;
|
||||
inputs = {
|
||||
inherit tinc-graph self telebots menstruation-telegram menstruation-backend scripts agenix recht autorenkalender nixpkgs wallpaper-generator;
|
||||
};
|
||||
};
|
||||
in {
|
||||
ful = nixpkgs.lib.nixosSystem rec {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
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 = [
|
||||
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
|
||||
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 = [
|
||||
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 = [
|
||||
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
|
||||
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 = [
|
||||
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 = [
|
||||
systems/fatteh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nur.modules.nixos.default
|
||||
nix-index-database.nixosModules.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
packages = eachSupportedSystem (system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
nur.overlays.default
|
||||
(self: super: {
|
||||
mpv = super.mpv.override {scripts = [super.mpvScripts.visualizer super.mpvScripts.mpris];};
|
||||
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
|
||||
})
|
||||
];
|
||||
};
|
||||
wrapScript = {
|
||||
packages ? [],
|
||||
name,
|
||||
script,
|
||||
}:
|
||||
pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"'';
|
||||
in {
|
||||
# linguistics and ancient world
|
||||
auc = pkgs.callPackage packages/auc.nix {};
|
||||
betacode = pkgs.callPackage packages/betacode.nix {};
|
||||
brassica = pkgs.callPackage packages/brassica.nix {}; # TODO upstream
|
||||
devanagari = pkgs.callPackage packages/devanagari {};
|
||||
stardict-tools = pkgs.callPackage packages/stardict-tools.nix {};
|
||||
heuretes = pkgs.callPackage packages/heuretes.nix {};
|
||||
ipa = pkgs.writers.writePython3Bin "ipa" {flakeIgnore = ["E501"];} (builtins.readFile packages/ipa.py);
|
||||
jsesh = pkgs.callPackage packages/jsesh.nix {}; # TODO upstream
|
||||
kirciuoklis = pkgs.callPackage packages/kirciuoklis.nix {};
|
||||
polyglot = pkgs.callPackage packages/polyglot.nix {};
|
||||
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
|
||||
gfs-fonts = pkgs.callPackage packages/gfs-fonts.nix {};
|
||||
closest = pkgs.callPackage packages/closest {};
|
||||
|
||||
# lit
|
||||
random-zeno = pkgs.callPackage packages/random-zeno.nix {};
|
||||
literature-quote = pkgs.callPackage packages/literature-quote.nix {};
|
||||
|
||||
# krebs
|
||||
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
|
||||
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {};
|
||||
hc = pkgs.callPackage packages/hc.nix {};
|
||||
kpaste = pkgs.callPackage packages/kpaste.nix {};
|
||||
pls = pkgs.callPackage packages/pls.nix {};
|
||||
untilport = pkgs.callPackage packages/untilport.nix {};
|
||||
radio-news = pkgs.callPackage packages/radio-news.nix {};
|
||||
|
||||
# window manager
|
||||
swallow = pkgs.callPackage packages/swallow.nix {};
|
||||
devour = pkgs.callPackage packages/devour.nix {};
|
||||
|
||||
cheat-sh = pkgs.callPackage packages/cheat-sh.nix {};
|
||||
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {}; # TODO upstream
|
||||
cro = pkgs.callPackage packages/cro.nix {};
|
||||
default-gateway = pkgs.callPackage packages/default-gateway.nix {};
|
||||
depp = pkgs.callPackage packages/depp.nix {};
|
||||
fkill = pkgs.callPackage packages/fkill.nix {};
|
||||
fzfmenu = pkgs.callPackage packages/fzfmenu.nix {};
|
||||
gpt35 = pkgs.callPackage packages/gpt.nix {model = "gpt-3.5-turbo";};
|
||||
gpt4 = pkgs.callPackage packages/gpt.nix {model = "gpt-4";};
|
||||
image-convert-favicon = pkgs.callPackage packages/image-convert-favicon.nix {};
|
||||
image-convert-tolino = pkgs.callPackage packages/image-convert-tolino.nix {};
|
||||
k-lock = pkgs.callPackage packages/k-lock.nix {};
|
||||
klem = pkgs.callPackage packages/klem.nix {};
|
||||
man-pandoc = pkgs.callPackage packages/man/pandoc.nix {}; # TODO upstream
|
||||
man-pdf = pkgs.callPackage packages/man-pdf.nix {};
|
||||
mansplain = pkgs.callPackage packages/mansplain.nix {};
|
||||
manual-sort = pkgs.callPackage packages/manual-sort.nix {};
|
||||
menu-calc = pkgs.callPackage packages/menu-calc.nix {};
|
||||
noise-waves = pkgs.callPackage packages/noise-waves.nix {};
|
||||
mpv-radio = pkgs.callPackage packages/mpv-radio.nix {di-fm-key-file = "/dev/null";};
|
||||
mpv-tuner = pkgs.callPackage packages/mpv-tuner.nix {di-fm-key-file = "/dev/null";};
|
||||
mpv-tv = pkgs.callPackage packages/mpv-tv.nix {};
|
||||
mpv-iptv = pkgs.callPackage packages/mpv-iptv.nix {};
|
||||
new-mac = pkgs.callPackage packages/new-mac.nix {};
|
||||
nix-git = pkgs.callPackage packages/nix-git.nix {};
|
||||
notemenu = pkgs.callPackage packages/notemenu.nix {niveumPackages = self.packages.${system};};
|
||||
opustags = pkgs.callPackage packages/opustags.nix {}; # TODO upstream
|
||||
q = pkgs.callPackage packages/q.nix {};
|
||||
qrpaste = pkgs.callPackage packages/qrpaste.nix {};
|
||||
go-webring = pkgs.callPackage packages/go-webring.nix {}; # TODO upstream
|
||||
rfc = pkgs.callPackage packages/rfc.nix {};
|
||||
gimp = pkgs.callPackage packages/gimp.nix {};
|
||||
scanned = pkgs.callPackage packages/scanned.nix {};
|
||||
text2pdf = pkgs.callPackage packages/text2pdf.nix {}; # TODO upstream
|
||||
timer = pkgs.callPackage packages/timer.nix {};
|
||||
trans = pkgs.callPackage packages/trans.nix {}; # TODO upstream
|
||||
ttspaste = pkgs.callPackage packages/ttspaste.nix {};
|
||||
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};
|
||||
emailmenu = pkgs.callPackage packages/emailmenu.nix {};
|
||||
stag = pkgs.callPackage packages/stag.nix {}; # TODO upstream
|
||||
vg = pkgs.callPackage packages/vg.nix {};
|
||||
vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};};
|
||||
obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {};
|
||||
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {}; # TODO upstream
|
||||
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {}; # TODO upstream
|
||||
vimPlugins-typst-vim = pkgs.callPackage packages/vimPlugins/typst-vim.nix {}; # TODO upstream
|
||||
vimPlugins-mdwa-nvim = pkgs.callPackage packages/vimPlugins/mdwa-nvim.nix {}; # TODO upstream
|
||||
vimPlugins-vim-ernest = pkgs.callPackage packages/vimPlugins/vim-ernest.nix {}; # TODO upstream
|
||||
vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix {}; # TODO upstream
|
||||
vimPlugins-vim-colors-paramount = pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix {}; # TODO upstream
|
||||
vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix {}; # TODO upstream
|
||||
vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix {}; # TODO upstream
|
||||
vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix {}; # TODO upstream
|
||||
vimPlugins-vim-reason-plus = pkgs.callPackage packages/vimPlugins/vim-reason-plus.nix {}; # TODO upstream
|
||||
vimv = pkgs.callPackage packages/vimv.nix {};
|
||||
weechat-declarative = pkgs.callPackage packages/weechat-declarative.nix {}; # TODO upstream
|
||||
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {}; # TODO upstream
|
||||
dmenu-randr = pkgs.callPackage packages/dmenu-randr.nix {};
|
||||
wttr = pkgs.callPackage packages/wttr.nix {}; # TODO upstream
|
||||
|
||||
booksplit = wrapScript {
|
||||
script = voidrice.outPath + "/.local/bin/booksplit";
|
||||
name = "booksplit";
|
||||
packages = [pkgs.ffmpeg pkgs.glibc.bin];
|
||||
};
|
||||
tag = wrapScript {
|
||||
overlays.default = final: prev: {
|
||||
# wrapped from upstream
|
||||
wrapScript =
|
||||
{
|
||||
packages ? [ ],
|
||||
name,
|
||||
script,
|
||||
}:
|
||||
prev.writers.writeDashBin name ''PATH=$PATH:${
|
||||
nixpkgs.lib.makeBinPath (
|
||||
packages
|
||||
++ [
|
||||
final.findutils
|
||||
final.coreutils
|
||||
final.gnused
|
||||
final.gnugrep
|
||||
]
|
||||
)
|
||||
} ${script} "$@"'';
|
||||
tag = final.wrapScript {
|
||||
script = voidrice.outPath + "/.local/bin/tag";
|
||||
name = "tag";
|
||||
packages = [pkgs.ffmpeg];
|
||||
packages = [ final.ffmpeg ];
|
||||
};
|
||||
});
|
||||
booksplit = final.wrapScript {
|
||||
script = voidrice.outPath + "/.local/bin/booksplit";
|
||||
name = "booksplit";
|
||||
packages = [
|
||||
final.ffmpeg
|
||||
final.glibc.bin
|
||||
];
|
||||
};
|
||||
auc = prev.callPackage packages/auc.nix { };
|
||||
cheat-sh = prev.callPackage packages/cheat-sh.nix { };
|
||||
brassica = prev.callPackage packages/brassica.nix { }; # TODO upstream
|
||||
text2pdf = prev.callPackage packages/text2pdf.nix { }; # TODO upstream
|
||||
wttr = prev.callPackage packages/wttr.nix { }; # TODO upstream
|
||||
jsesh = prev.callPackage packages/jsesh.nix { }; # TODO upstream
|
||||
opustags = prev.callPackage packages/opustags.nix { }; # TODO upstream
|
||||
trans = prev.callPackage packages/trans.nix { }; # TODO upstream
|
||||
go-webring = prev.callPackage packages/go-webring.nix { }; # TODO upstream
|
||||
stag = prev.callPackage packages/stag.nix { }; # TODO upstream
|
||||
mpv = prev.mpv.override {
|
||||
scripts = [
|
||||
final.mpvScripts.visualizer
|
||||
final.mpvScripts.mpris
|
||||
];
|
||||
};
|
||||
cro = prev.callPackage packages/cro.nix { };
|
||||
dmenu = prev.writers.writeDashBin "dmenu" ''exec ${final.rofi}/bin/rofi -dmenu "$@"'';
|
||||
weechatScripts = prev.weechatScripts // {
|
||||
hotlist2extern = prev.callPackage packages/weechatScripts/hotlist2extern.nix { }; # TODO upstream
|
||||
};
|
||||
vimPlugins = prev.vimPlugins // {
|
||||
cheat-sh = prev.callPackage packages/vimPlugins/cheat-sh.nix { };
|
||||
icalendar-vim = prev.callPackage packages/vimPlugins/icalendar-vim.nix { }; # TODO upstream
|
||||
jq-vim = prev.callPackage packages/vimPlugins/jq-vim.nix { }; # TODO upstream
|
||||
typst-vim = prev.callPackage packages/vimPlugins/typst-vim.nix { }; # TODO upstream
|
||||
mdwa-nvim = prev.callPackage packages/vimPlugins/mdwa-nvim.nix { }; # TODO upstream
|
||||
vim-ernest = prev.callPackage packages/vimPlugins/vim-ernest.nix { }; # TODO upstream
|
||||
vim-256noir = prev.callPackage packages/vimPlugins/vim-256noir.nix { }; # TODO upstream
|
||||
vim-colors-paramount =
|
||||
prev.callPackage packages/vimPlugins/vim-colors-paramount.nix { }; # TODO upstream
|
||||
vim-fetch = prev.callPackage packages/vimPlugins/vim-fetch.nix { }; # TODO upstream
|
||||
vim-fsharp = prev.callPackage packages/vimPlugins/vim-fsharp.nix { }; # TODO upstream
|
||||
vim-mail = prev.callPackage packages/vimPlugins/vim-mail.nix { }; # TODO upstream
|
||||
vim-reason-plus = prev.callPackage packages/vimPlugins/vim-reason-plus.nix { }; # TODO upstream
|
||||
};
|
||||
|
||||
# krebs
|
||||
brainmelter = prev.callPackage packages/brainmelter.nix { };
|
||||
cyberlocker-tools = prev.callPackage packages/cyberlocker-tools.nix { };
|
||||
hc = prev.callPackage packages/hc.nix { };
|
||||
pls = prev.callPackage packages/pls.nix { };
|
||||
radio-news = prev.callPackage packages/radio-news { };
|
||||
untilport = prev.callPackage packages/untilport.nix { };
|
||||
weechat-declarative = prev.callPackage packages/weechat-declarative.nix {};
|
||||
|
||||
# my packages
|
||||
betacode = prev.callPackage packages/betacode.nix { };
|
||||
closest = prev.callPackage packages/closest { };
|
||||
default-gateway = prev.callPackage packages/default-gateway.nix { };
|
||||
depp = prev.callPackage packages/depp.nix { };
|
||||
devanagari = prev.callPackage packages/devanagari { };
|
||||
radioStreams = prev.callPackage packages/streams {};
|
||||
devour = prev.callPackage packages/devour.nix { };
|
||||
dmenu-randr = prev.callPackage packages/dmenu-randr.nix { };
|
||||
emailmenu = prev.callPackage packages/emailmenu.nix { };
|
||||
fkill = prev.callPackage packages/fkill.nix { };
|
||||
fzfmenu = prev.callPackage packages/fzfmenu.nix { };
|
||||
gfs-fonts = prev.callPackage packages/gfs-fonts.nix { };
|
||||
heuretes = prev.callPackage packages/heuretes.nix { };
|
||||
image-convert-favicon = prev.callPackage packages/image-convert-favicon.nix { };
|
||||
image-convert-tolino = prev.callPackage packages/image-convert-tolino.nix { };
|
||||
ipa = prev.writers.writePython3Bin "ipa" { flakeIgnore = [ "E501" ]; } packages/ipa.py;
|
||||
kirciuoklis = prev.callPackage packages/kirciuoklis.nix { };
|
||||
kpaste = prev.callPackage packages/kpaste.nix { };
|
||||
literature-quote = prev.callPackage packages/literature-quote.nix { };
|
||||
man-pdf = prev.callPackage packages/man-pdf.nix { };
|
||||
mansplain = prev.callPackage packages/mansplain.nix { };
|
||||
manual-sort = prev.callPackage packages/manual-sort.nix { };
|
||||
mpv-iptv = prev.callPackage packages/mpv-iptv.nix { };
|
||||
mpv-radio = prev.callPackage packages/mpv-radio.nix { di-fm-key-file = "/dev/null"; };
|
||||
mpv-tuner = prev.callPackage packages/mpv-tuner.nix { di-fm-key-file = "/dev/null"; };
|
||||
mpv-tv = prev.callPackage packages/mpv-tv.nix { };
|
||||
new-mac = prev.callPackage packages/new-mac.nix { };
|
||||
nix-git = prev.callPackage packages/nix-git.nix { };
|
||||
noise-waves = prev.callPackage packages/noise-waves.nix { };
|
||||
notemenu = prev.callPackage packages/notemenu.nix { };
|
||||
obsidian-vim = prev.callPackage packages/obsidian-vim.nix { };
|
||||
polyglot = prev.callPackage packages/polyglot.nix { };
|
||||
q = prev.callPackage packages/q.nix { };
|
||||
qrpaste = prev.callPackage packages/qrpaste.nix { };
|
||||
random-zeno = prev.callPackage packages/random-zeno.nix { };
|
||||
scanned = prev.callPackage packages/scanned.nix { };
|
||||
stardict-tools = prev.callPackage packages/stardict-tools.nix { };
|
||||
swallow = prev.callPackage packages/swallow.nix { };
|
||||
tocharian-font = prev.callPackage packages/tocharian-font.nix { };
|
||||
ttspaste = prev.callPackage packages/ttspaste.nix { };
|
||||
unicodmenu = prev.callPackage packages/unicodmenu.nix { };
|
||||
vg = prev.callPackage packages/vg.nix { };
|
||||
vim-kmein = prev.callPackage packages/vim-kmein {};
|
||||
vimv = prev.callPackage packages/vimv.nix { };
|
||||
klem = prev.callPackage packages/klem.nix { };
|
||||
|
||||
lib = lib // {
|
||||
niveum = import lib/default.nix {
|
||||
inherit lib;
|
||||
pkgs = final;
|
||||
};
|
||||
panoptikon = import lib/panoptikon.nix {
|
||||
inherit lib;
|
||||
pkgs = final;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations =
|
||||
let
|
||||
niveumSpecialArgs = system: {
|
||||
unstablePackages = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
overlays = [];
|
||||
config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (nixpkgs-unstable.lib.getName pkg) [
|
||||
"obsidian"
|
||||
"zoom"
|
||||
];
|
||||
};
|
||||
inputs = {
|
||||
inherit
|
||||
tinc-graph
|
||||
self
|
||||
telebots
|
||||
menstruation-telegram
|
||||
menstruation-backend
|
||||
scripts
|
||||
coptic-dictionary
|
||||
agenix
|
||||
recht
|
||||
autorenkalender
|
||||
nixpkgs
|
||||
wallpaper-generator
|
||||
;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
ful = nixpkgs.lib.nixosSystem rec {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/ful/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
self.nixosModules.passport
|
||||
self.nixosModules.panoptikon
|
||||
self.nixosModules.go-webring
|
||||
stockholm.nixosModules.reaktor2
|
||||
retiolum.nixosModules.retiolum
|
||||
nur.modules.nixos.default
|
||||
{ nixpkgs.overlays = [ stockholm.overlays.default ]; }
|
||||
{
|
||||
_module.args.nixinate = {
|
||||
host = "ful";
|
||||
sshUser = "root";
|
||||
buildOn = "remote";
|
||||
substituteOnTarget = true;
|
||||
hermetic = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
zaatar = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/zaatar/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
kibbeh = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/kibbeh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
];
|
||||
};
|
||||
makanek = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
# for using inputs in other config files
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/makanek/configuration.nix
|
||||
self.nixosModules.telegram-bot
|
||||
self.nixosModules.passport
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
nur.modules.nixos.default
|
||||
];
|
||||
};
|
||||
tahina = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/tahina/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
tabula = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/tabula/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
];
|
||||
};
|
||||
manakish = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/manakish/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nix-index-database.nixosModules.default
|
||||
nur.modules.nixos.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
kabsa = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/kabsa/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nur.modules.nixos.default
|
||||
nix-index-database.nixosModules.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
fatteh = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{ nixpkgs.overlays = [ self.overlays.default ]; }
|
||||
systems/fatteh/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
home-manager.nixosModules.home-manager
|
||||
nur.modules.nixos.default
|
||||
nix-index-database.nixosModules.default
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
packages = eachSupportedSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
nur.overlays.default
|
||||
self.overlays.default
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit (pkgs) auc swallow cheat-sh hc kpaste noise-waves trans stag qrpaste new-mac scanned default-gateway kirciuoklis tocharian-font image-convert-favicon image-convert-tolino heuretes mpv-tv mpv-iptv devanagari literature-quote booksplit manual-sort wttr emailmenu closest mpv-radio mpv-tuner cro nix-git text2pdf betacode brassica ipa polyglot jsesh gfs-fonts vim-kmein vimv brainmelter cyberlocker-tools pls untilport radio-news vg ttspaste depp fkill fzfmenu unicodmenu dmenu-randr notemenu man-pdf mansplain opustags q timer rfc gimp obsidian-vim devour go-webring random-zeno stardict-tools weechat-declarative klem radioStreams;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
pkgs: rec {
|
||||
terminal = "alacritty";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
fileManager = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
}
|
||||
121
lib/default.nix
121
lib/default.nix
@@ -1,28 +1,40 @@
|
||||
{ lib, pkgs }:
|
||||
let
|
||||
systems = import ./systems.nix;
|
||||
in
|
||||
{
|
||||
tmpfilesConfig = {
|
||||
type,
|
||||
path,
|
||||
mode ? "-",
|
||||
user ? "-",
|
||||
group ? "-",
|
||||
age ? "-",
|
||||
argument ? "-",
|
||||
}: "${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
|
||||
tmpfilesConfig =
|
||||
{
|
||||
type,
|
||||
path,
|
||||
mode ? "-",
|
||||
user ? "-",
|
||||
group ? "-",
|
||||
age ? "-",
|
||||
argument ? "-",
|
||||
}:
|
||||
"${type} '${path}' ${mode} ${user} ${group} ${age} ${argument}";
|
||||
|
||||
restic = rec {
|
||||
port = 3571;
|
||||
host = "zaatar.r";
|
||||
repository = "rest:http://${host}:${toString port}/";
|
||||
};
|
||||
restic =
|
||||
let
|
||||
host = "zaatar.r";
|
||||
port = 3571;
|
||||
in
|
||||
{
|
||||
inherit host port;
|
||||
repository = "rest:http://${host}:${toString port}/";
|
||||
};
|
||||
|
||||
remoteDir = "/home/kfm/remote";
|
||||
|
||||
firewall = lib: {
|
||||
accept = {
|
||||
source,
|
||||
protocol,
|
||||
dport,
|
||||
}: "nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
|
||||
firewall = {
|
||||
accept =
|
||||
{
|
||||
source,
|
||||
protocol,
|
||||
dport,
|
||||
}:
|
||||
"nixos-fw -s ${lib.escapeShellArg source} -p ${lib.escapeShellArg protocol} --dport ${lib.escapeShellArg (toString dport)} -j nixos-fw-accept";
|
||||
addRules = lib.concatMapStringsSep "\n" (rule: "iptables -A ${rule}");
|
||||
removeRules = lib.concatMapStringsSep "\n" (rule: "iptables -D ${rule} || true");
|
||||
};
|
||||
@@ -42,7 +54,7 @@
|
||||
|
||||
sshPort = 22022;
|
||||
|
||||
theme = pkgs: {
|
||||
theme = {
|
||||
gtk = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
@@ -57,30 +69,67 @@
|
||||
};
|
||||
};
|
||||
|
||||
defaultApplications = import ./default-applications.nix;
|
||||
defaultApplications = {
|
||||
terminal = "alacritty";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
fileManager = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
};
|
||||
|
||||
retiolumAddresses = import ./retiolum-network.nix;
|
||||
retiolumAddresses = lib.mapAttrs (_: v: { inherit (v.retiolum) ipv4 ipv6; }) (
|
||||
lib.filterAttrs (_: v: v ? "retiolum") systems
|
||||
);
|
||||
externalNetwork = lib.mapAttrs (_: v: v.externalIp) (
|
||||
lib.filterAttrs (_: v: v ? "externalIp") systems
|
||||
);
|
||||
localAddresses = lib.mapAttrs (_: v: v.internalIp) (
|
||||
lib.filterAttrs (_: v: v ? "internalIp") systems
|
||||
);
|
||||
myceliumAddresses = lib.mapAttrs (_: v: v.mycelium.ipv6) (
|
||||
lib.filterAttrs (_: v: v ? "mycelium") systems
|
||||
);
|
||||
syncthingIds = lib.mapAttrs (_: v: { id = v.syncthingId; }) (
|
||||
lib.filterAttrs (_: v: v ? "syncthingId") systems
|
||||
);
|
||||
|
||||
localAddresses = import ./local-network.nix;
|
||||
email =
|
||||
let
|
||||
thunderbirdProfile = "donnervogel";
|
||||
in
|
||||
{
|
||||
inherit thunderbirdProfile;
|
||||
defaults = {
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles = [ thunderbirdProfile ];
|
||||
};
|
||||
aerc.enable = true;
|
||||
realName = "Kierán Meinhardt";
|
||||
folders.inbox = "INBOX";
|
||||
};
|
||||
};
|
||||
|
||||
email-sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKz33wHtPuIfgXEb0+hybxFGV9ZuPsDTLUZo/+hlcdA";
|
||||
systems = systems;
|
||||
|
||||
kieran = {
|
||||
github = "kmein";
|
||||
email = "kmein@posteo.de";
|
||||
name = "Kierán Meinhardt";
|
||||
sshKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk" # kabsa
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB" # manakish
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y" # fatteh
|
||||
pronouns = builtins.concatStringsSep "/" [
|
||||
"er"
|
||||
"he"
|
||||
"is"
|
||||
"οὗτος"
|
||||
"هو"
|
||||
"ⲛ̄ⲧⲟϥ"
|
||||
"он"
|
||||
"han"
|
||||
"सः"
|
||||
];
|
||||
sshKeys = [
|
||||
systems.fatteh.sshKey
|
||||
systems.manakish.sshKey
|
||||
systems.kabsa.sshKey
|
||||
];
|
||||
};
|
||||
|
||||
syncthing.devices = {
|
||||
kabsa.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||
kibbeh.id = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
||||
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||
fatteh.id = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC";
|
||||
};
|
||||
|
||||
ignorePaths = [
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
rec {
|
||||
thunderbirdProfile = "donnervogel";
|
||||
pronouns = builtins.concatStringsSep "/" [
|
||||
"er"
|
||||
"he"
|
||||
"is"
|
||||
"οὗτος"
|
||||
"هو"
|
||||
"ⲛ̄ⲧⲟϥ"
|
||||
"он"
|
||||
"han"
|
||||
"सः"
|
||||
];
|
||||
defaults = {
|
||||
thunderbird = {
|
||||
enable = true;
|
||||
profiles = [thunderbirdProfile];
|
||||
};
|
||||
aerc.enable = true;
|
||||
realName = "Kierán Meinhardt";
|
||||
folders.inbox = "INBOX";
|
||||
};
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
ful = "130.61.217.114";
|
||||
makanek = "88.99.83.173";
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
path,
|
||||
}: ''
|
||||
<config>
|
||||
<paths>
|
||||
<path recursive="1">${path}</path>
|
||||
</paths>
|
||||
<sounddirs/>
|
||||
<dictionaryOrder name="" id="0">
|
||||
<mutedDictionaries/>
|
||||
</dictionaryOrder>
|
||||
<inactiveDictionaries name="" id="0">
|
||||
<mutedDictionaries/>
|
||||
</inactiveDictionaries>
|
||||
<groups nextId="1"/>
|
||||
<hunspell dictionariesPath=""/>
|
||||
<transliteration>
|
||||
<enableRussianTransliteration>0</enableRussianTransliteration>
|
||||
<enableGermanTransliteration>0</enableGermanTransliteration>
|
||||
<enableGreekTransliteration>0</enableGreekTransliteration>
|
||||
<enableBelarusianTransliteration>0</enableBelarusianTransliteration>
|
||||
<chinese>
|
||||
<enable>0</enable>
|
||||
<enableSCToTWConversion>1</enableSCToTWConversion>
|
||||
<enableSCToHKConversion>1</enableSCToHKConversion>
|
||||
<enableTCToSCConversion>1</enableTCToSCConversion>
|
||||
</chinese>
|
||||
<romaji>
|
||||
<enable>0</enable>
|
||||
<enableHepburn>1</enableHepburn>
|
||||
<enableNihonShiki>0</enableNihonShiki>
|
||||
<enableKunreiShiki>0</enableKunreiShiki>
|
||||
<enableHiragana>1</enableHiragana>
|
||||
<enableKatakana>1</enableKatakana>
|
||||
</romaji>
|
||||
</transliteration>
|
||||
<forvo>
|
||||
<enable>0</enable>
|
||||
<apiKey></apiKey>
|
||||
<languageCodes></languageCodes>
|
||||
</forvo>
|
||||
<mediawikis>
|
||||
<mediawiki enabled="0" name="English Wikipedia" icon="" id="ae6f89aac7151829681b85f035d54e48" url="https://en.wikipedia.org/w"/>
|
||||
<mediawiki enabled="0" name="English Wiktionary" icon="" id="affcf9678e7bfe701c9b071f97eccba3" url="https://en.wiktionary.org/w"/>
|
||||
<mediawiki enabled="0" name="German Wikipedia" icon="" id="a8a66331a1242ca2aeb0b4aed361c41d" url="https://de.wikipedia.org/w"/>
|
||||
<mediawiki enabled="0" name="German Wiktionary" icon="" id="21c64bca5ec10ba17ff19f3066bc962a" url="https://de.wiktionary.org/w"/>
|
||||
</mediawikis>
|
||||
<websites>
|
||||
<website enabled="0" name="Google En-En (Oxford)" icon="" id="b88cb2898e634c6638df618528284c2d" url="https://www.google.com/search?q=define:%GDWORD%&hl=en" inside_iframe="1"/>
|
||||
<website enabled="0" name="Urban Dictionary" icon="" id="f376365a0de651fd7505e7e5e683aa45" url="https://www.urbandictionary.com/define.php?term=%GDWORD%" inside_iframe="1"/>
|
||||
<website enabled="0" name="Multitran (En)" icon="" id="324ca0306187df7511b26d3847f4b07c" url="https://multitran.ru/c/m.exe?CL=1&l1=1&s=%GD1251%" inside_iframe="1"/>
|
||||
<website enabled="0" name="Lingvo (En-Ru)" icon="" id="924db471b105299c82892067c0f10787" url="http://lingvopro.abbyyonline.com/en/Search/en-ru/%GDWORD%" inside_iframe="1"/>
|
||||
<website enabled="0" name="Michaelis (Pt-En)" icon="" id="087a6d65615fb047f4c80eef0a9465db" url="http://michaelis.uol.com.br/moderno/ingles/index.php?lingua=portugues-ingles&palavra=%GDISO1%" inside_iframe="1"/>
|
||||
</websites>
|
||||
<dictservers/>
|
||||
<programs>
|
||||
<program enabled="0" name="Espeak" icon="" id="2cf8b3a60f27e1ac812de0b57c148340" commandLine="${pkgs.espeak}/bin/espeak %GDWORD%" type="0"/>
|
||||
<program enabled="0" name="Manpages" icon="" id="4f898f7582596cea518c6b0bfdceb8b3" commandLine="${pkgs.man_db}/bin/man -a --html=/bin/cat %GDWORD%" type="2"/>
|
||||
</programs>
|
||||
<voiceEngines/>
|
||||
<mutedDictionaries/>
|
||||
<popupMutedDictionaries>
|
||||
<mutedDictionary>ae6f89aac7151829681b85f035d54e48</mutedDictionary>
|
||||
</popupMutedDictionaries>
|
||||
<preferences>
|
||||
<interfaceLanguage></interfaceLanguage>
|
||||
<helpLanguage></helpLanguage>
|
||||
<displayStyle>modern</displayStyle>
|
||||
<newTabsOpenAfterCurrentOne>0</newTabsOpenAfterCurrentOne>
|
||||
<newTabsOpenInBackground>1</newTabsOpenInBackground>
|
||||
<hideSingleTab>0</hideSingleTab>
|
||||
<mruTabOrder>0</mruTabOrder>
|
||||
<hideMenubar>0</hideMenubar>
|
||||
<enableTrayIcon>1</enableTrayIcon>
|
||||
<startToTray>1</startToTray>
|
||||
<closeToTray>1</closeToTray>
|
||||
<autoStart>0</autoStart>
|
||||
<doubleClickTranslates>1</doubleClickTranslates>
|
||||
<selectWordBySingleClick>0</selectWordBySingleClick>
|
||||
<escKeyHidesMainWindow>0</escKeyHidesMainWindow>
|
||||
<zoomFactor>1</zoomFactor>
|
||||
<helpZoomFactor>1</helpZoomFactor>
|
||||
<wordsZoomLevel>0</wordsZoomLevel>
|
||||
<enableMainWindowHotkey>1</enableMainWindowHotkey>
|
||||
<mainWindowHotkey>Ctrl+F11, Ctrl+F11</mainWindowHotkey>
|
||||
<enableClipboardHotkey>1</enableClipboardHotkey>
|
||||
<clipboardHotkey>Ctrl+C, Ctrl+C</clipboardHotkey>
|
||||
<enableScanPopup>1</enableScanPopup>
|
||||
<startWithScanPopupOn>0</startWithScanPopupOn>
|
||||
<enableScanPopupModifiers>0</enableScanPopupModifiers>
|
||||
<scanPopupModifiers>0</scanPopupModifiers>
|
||||
<scanPopupAltMode>0</scanPopupAltMode>
|
||||
<scanPopupAltModeSecs>3</scanPopupAltModeSecs>
|
||||
<ignoreOwnClipboardChanges>0</ignoreOwnClipboardChanges>
|
||||
<scanToMainWindow>0</scanToMainWindow>
|
||||
<ignoreDiacritics>0</ignoreDiacritics>
|
||||
<showScanFlag>0</showScanFlag>
|
||||
<scanPopupUseUIAutomation>1</scanPopupUseUIAutomation>
|
||||
<scanPopupUseIAccessibleEx>1</scanPopupUseIAccessibleEx>
|
||||
<scanPopupUseGDMessage>1</scanPopupUseGDMessage>
|
||||
<scanPopupUnpinnedWindowFlags>0</scanPopupUnpinnedWindowFlags>
|
||||
<scanPopupUnpinnedBypassWMHint>0</scanPopupUnpinnedBypassWMHint>
|
||||
<pronounceOnLoadMain>0</pronounceOnLoadMain>
|
||||
<pronounceOnLoadPopup>0</pronounceOnLoadPopup>
|
||||
<useInternalPlayer>1</useInternalPlayer>
|
||||
<internalPlayerBackend>FFmpeg+libao</internalPlayerBackend>
|
||||
<audioPlaybackProgram>mplayer</audioPlaybackProgram>
|
||||
<alwaysOnTop>1</alwaysOnTop>
|
||||
<searchInDock>1</searchInDock>
|
||||
<historyStoreInterval>0</historyStoreInterval>
|
||||
<favoritesStoreInterval>0</favoritesStoreInterval>
|
||||
<confirmFavoritesDeletion>1</confirmFavoritesDeletion>
|
||||
<proxyserver enabled="0" useSystemProxy="0">
|
||||
<type>0</type>
|
||||
<host></host>
|
||||
<port>3128</port>
|
||||
<user></user>
|
||||
<password></password>
|
||||
<systemProxyUser></systemProxyUser>
|
||||
<systemProxyPassword></systemProxyPassword>
|
||||
</proxyserver>
|
||||
<disallowContentFromOtherSites>0</disallowContentFromOtherSites>
|
||||
<enableWebPlugins>0</enableWebPlugins>
|
||||
<hideGoldenDictHeader>0</hideGoldenDictHeader>
|
||||
<maxNetworkCacheSize>50</maxNetworkCacheSize>
|
||||
<clearNetworkCacheOnExit>1</clearNetworkCacheOnExit>
|
||||
<maxStringsInHistory>500</maxStringsInHistory>
|
||||
<storeHistory>1</storeHistory>
|
||||
<alwaysExpandOptionalParts>0</alwaysExpandOptionalParts>
|
||||
<addonStyle></addonStyle>
|
||||
<collapseBigArticles>0</collapseBigArticles>
|
||||
<articleSizeLimit>2000</articleSizeLimit>
|
||||
<limitInputPhraseLength>0</limitInputPhraseLength>
|
||||
<inputPhraseLengthLimit>1000</inputPhraseLengthLimit>
|
||||
<maxDictionaryRefsInContextMenu>20</maxDictionaryRefsInContextMenu>
|
||||
<trackClipboardChanges>0</trackClipboardChanges>
|
||||
<synonymSearchEnabled>1</synonymSearchEnabled>
|
||||
<fullTextSearch>
|
||||
<searchMode>0</searchMode>
|
||||
<matchCase>0</matchCase>
|
||||
<maxArticlesPerDictionary>100</maxArticlesPerDictionary>
|
||||
<maxDistanceBetweenWords>2</maxDistanceBetweenWords>
|
||||
<useMaxArticlesPerDictionary>0</useMaxArticlesPerDictionary>
|
||||
<useMaxDistanceBetweenWords>1</useMaxDistanceBetweenWords>
|
||||
<dialogGeometry></dialogGeometry>
|
||||
<disabledTypes></disabledTypes>
|
||||
<enabled>1</enabled>
|
||||
<ignoreWordsOrder>0</ignoreWordsOrder>
|
||||
<ignoreDiacritics>0</ignoreDiacritics>
|
||||
<maxDictionarySize>0</maxDictionarySize>
|
||||
</fullTextSearch>
|
||||
</preferences>
|
||||
<lastMainGroupId>0</lastMainGroupId>
|
||||
<lastPopupGroupId>0</lastPopupGroupId>
|
||||
<popupWindowState>AAAA/wAAAAH9AAAAAAAAAg0AAAGTAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAQAAAAEAAAAaAGQAaQBjAHQAaQBvAG4AYQByAHkAQgBhAHIDAAAAAP////8AAAAAAAAAAA==</popupWindowState>
|
||||
<popupWindowGeometry>AdnQywADAAAAAAC6AAABEgAAAuYAAAKkAAAAugAAARIAAALmAAACpAAAAAAAAAAABVYAAAC6AAABEgAAAuYAAAKk</popupWindowGeometry>
|
||||
<pinPopupWindow>0</pinPopupWindow>
|
||||
<popupWindowAlwaysOnTop>0</popupWindowAlwaysOnTop>
|
||||
<mainWindowState>AAAA/wAAAAH9AAAAAgAAAAAAAADMAAAC0PwCAAAAAfsAAAAUAHMAZQBhAHIAYwBoAFAAYQBuAGUBAAAAFAAAAtAAAAB9AP///wAAAAEAAADMAAAC0PwCAAAAA/sAAAASAGQAaQBjAHQAcwBQAGEAbgBlAQAAABQAAAFvAAAAYQD////7AAAAGgBmAGEAdgBvAHIAaQB0AGUAcwBQAGEAbgBlAAAAABQAAALQAAAAYQD////7AAAAFgBoAGkAcwB0AG8AcgB5AFAAYQBuAGUBAAABhAAAAWAAAABhAP///wAAA7QAAALQAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAUAG4AYQB2AFQAbwBvAGwAYgBhAHIAAAAAAP////8AAAAAAAAAAAAAABoAZABpAGMAdABpAG8AbgBhAHIAeQBCAGEAcgAAAAAA/////wAAAAAAAAAA</mainWindowState>
|
||||
<mainWindowGeometry>AdnQywADAAAAAAAEAAAAGAAABVEAAAL7AAAABAAAABgAAAVRAAAC+wAAAAAAAAAABVYAAAAEAAAAGAAABVEAAAL7</mainWindowGeometry>
|
||||
<helpWindowGeometry>AdnQywADAAAAAAF3AAAAgwAAA9AAAAJGAAABeAAAAIQAAAPPAAACRQAAAAAAAAAABVYAAAF4AAAAhAAAA88AAAJF</helpWindowGeometry>
|
||||
<helpSplitterState>AAAA/wAAAAEAAAACAAABBAAABAAB/////wEAAAABAA==</helpSplitterState>
|
||||
<dictInfoGeometry>AdnQywADAAAAAAF1AAAAmgAAA84AAAIrAAABdgAAAJsAAAPNAAACKgAAAAAAAAAABVYAAAF2AAAAmwAAA80AAAIq</dictInfoGeometry>
|
||||
<inspectorGeometry></inspectorGeometry>
|
||||
<timeForNewReleaseCheck></timeForNewReleaseCheck>
|
||||
<skippedRelease></skippedRelease>
|
||||
<showingDictBarNames>1</showingDictBarNames>
|
||||
<usingSmallIconsInToolbars>1</usingSmallIconsInToolbars>
|
||||
<editDictionaryCommandLine></editDictionaryCommandLine>
|
||||
<maxPictureWidth>0</maxPictureWidth>
|
||||
<maxHeadwordSize>256</maxHeadwordSize>
|
||||
<maxHeadwordsToExpand>0</maxHeadwordsToExpand>
|
||||
<headwordsDialog>
|
||||
<searchMode>0</searchMode>
|
||||
<matchCase>0</matchCase>
|
||||
<autoApply>0</autoApply>
|
||||
<headwordsExportPath></headwordsExportPath>
|
||||
<headwordsDialogGeometry></headwordsDialogGeometry>
|
||||
</headwordsDialog>
|
||||
</config>
|
||||
''
|
||||
@@ -1,2 +0,0 @@
|
||||
# https://github.com/hercules-ci/gitignore.nix/pull/58/files
|
||||
path: ~/. + path
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,23 +0,0 @@
|
||||
// Arabic keyboard using Buckwalter transliteration
|
||||
// http://www.qamus.org/transliteration.htm
|
||||
// Martin Vidner
|
||||
// stolen from https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/2505a3ec2605ea7303bc6de68acf96578f0fd424/symbols/ara#L179
|
||||
|
||||
// TODO 06CC ARABIC LETTER FARSI YEH
|
||||
|
||||
default partial alphanumeric_keys
|
||||
xkb_symbols "buckwalter" {
|
||||
include "ara(buckwalter)"
|
||||
name[Group1] = "Arabic (Buckwalter + Persian)";
|
||||
|
||||
key <AE09> {[ 0x1000669, parenleft ] };
|
||||
key <AE10> {[ 0x1000660, parenright ] };
|
||||
key <AD10> {[ Arabic_tehmarbuta, 0x100067E ] }; // پ
|
||||
key <AD11> {[ 0x100200C, 0x1000671 ] }; // alif wasla, ZWNJ
|
||||
key <AD12> {[ 0x10006C0, Arabic_hamzaonyeh ] }; // ۀ
|
||||
key <AC05> {[ Arabic_ghain, 0x10006AF ] }; // گ
|
||||
key <AC07> {[ Arabic_jeem, 0x1000686 ] }; // چ
|
||||
key <AB03> {[ 0x10006A9, 0x1000698 ] }; // ک ژ
|
||||
key <AB04> {[ Arabic_theh, 0x10006A4 ] }; // ڤ
|
||||
key <AB09> {[ period, Arabic_hamzaonalef ] };
|
||||
};
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
officejet = "192.168.0.251";
|
||||
router = "192.168.0.1";
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
zaatar = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
|
||||
fatteh = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
|
||||
ful = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
|
||||
kabsa = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
|
||||
makanek = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
|
||||
manakish = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: {
|
||||
# watcher scripts
|
||||
@@ -30,7 +29,7 @@
|
||||
nick ? ''"$PANOPTIKON_WATCHER"-watcher'',
|
||||
}:
|
||||
pkgs.writers.writeDash "kpaste-irc-reporter" ''
|
||||
KPASTE_CONTENT_TYPE=text/plain ${niveumPackages.kpaste}/bin/kpaste \
|
||||
KPASTE_CONTENT_TYPE=text/plain ${pkgs.kpaste}/bin/kpaste \
|
||||
| ${pkgs.gnused}/bin/sed -n "${
|
||||
if retiolumLink
|
||||
then "2"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
kabsa = {
|
||||
ipv4 = "10.243.2.4";
|
||||
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
||||
};
|
||||
|
||||
ful = {
|
||||
ipv4 = "10.243.2.107";
|
||||
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
|
||||
};
|
||||
|
||||
zaatar = {
|
||||
ipv4 = "10.243.2.34";
|
||||
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
||||
};
|
||||
|
||||
makanek = {
|
||||
ipv4 = "10.243.2.84";
|
||||
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
|
||||
};
|
||||
|
||||
fatteh = {
|
||||
ipv6 = "42:0:3c46:aa73:82b0:14d7:7bf8:bf2";
|
||||
ipv4 = "10.243.2.77";
|
||||
};
|
||||
|
||||
manakish = {
|
||||
ipv4 = "10.243.2.85";
|
||||
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
|
||||
};
|
||||
tabula = {
|
||||
ipv4 = "10.243.2.78";
|
||||
ipv6 = "";
|
||||
};
|
||||
tahina = {
|
||||
ipv4 = "10.243.2.74";
|
||||
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
|
||||
};
|
||||
}
|
||||
73
lib/systems.nix
Normal file
73
lib/systems.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
kabsa = {
|
||||
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk";
|
||||
syncthingId = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.4";
|
||||
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
||||
};
|
||||
mycelium.ipv6 = "432:e30:d5d8:9311:e34b:6587:96ee:3fcb";
|
||||
};
|
||||
manakish = {
|
||||
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOiQEc8rTr7C7xVLYV7tQ99BDDBLrJsy5hslxtCEatkB";
|
||||
syncthingId = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.85";
|
||||
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
|
||||
};
|
||||
mycelium.ipv6 = "512:d3bd:3cd9:fcc8:ae34:81fa:385f:8c21";
|
||||
};
|
||||
fatteh = {
|
||||
sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByreBjBEMJKjgpKLd5XZHIUUwIhNafVqN6OUOQpJa3y";
|
||||
syncthingId = "GSOGYT3-2GBHZXT-MNCTDIY-3BJIR4V-OHVOOMJ-ICVLKXR-U4C7RFB-HJOK3AC";
|
||||
retiolum = {
|
||||
ipv6 = "42:0:3c46:aa73:82b0:14d7:7bf8:bf2";
|
||||
ipv4 = "10.243.2.77";
|
||||
};
|
||||
mycelium.ipv6 = "463:a0d4:daa3:aa8d:a9b1:744a:46a5:7a80";
|
||||
};
|
||||
kibbeh = {
|
||||
syncthingId = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
||||
};
|
||||
ful = {
|
||||
externalIp = "130.61.217.114";
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.107";
|
||||
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
|
||||
};
|
||||
mycelium.ipv6 = "5bf:d60e:bebf:5163:f495:8787:880c:6d41";
|
||||
};
|
||||
zaatar = {
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.34";
|
||||
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
||||
};
|
||||
mycelium.ipv6 = "5c5:49e0:7793:f017:59e1:1715:9e0e:3fc8";
|
||||
};
|
||||
makanek = {
|
||||
externalIp = "88.99.83.173";
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.84";
|
||||
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
|
||||
};
|
||||
mycelium.ipv6 = "43f:ad4f:fa67:d9f7:8a56:713c:7418:164b";
|
||||
};
|
||||
officejet = {
|
||||
internalIp = "192.168.0.251";
|
||||
};
|
||||
router = {
|
||||
internalIp = "192.168.0.1";
|
||||
};
|
||||
tabula = {
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.78";
|
||||
ipv6 = "";
|
||||
};
|
||||
};
|
||||
tahina = {
|
||||
retiolum = {
|
||||
ipv4 = "10.243.2.74";
|
||||
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -56,7 +56,7 @@ with lib; let
|
||||
|
||||
imp = {
|
||||
systemd.services.power-action = {
|
||||
serviceConfig = rec {
|
||||
serviceConfig = {
|
||||
ExecStart = startScript;
|
||||
User = cfg.user;
|
||||
};
|
||||
|
||||
@@ -3,33 +3,33 @@
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
pandoc,
|
||||
}: let
|
||||
owner = "kamalist";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "auc";
|
||||
version = "2019-04-02";
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "auc";
|
||||
version = "2019-04-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit owner;
|
||||
repo = "AUC";
|
||||
rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3";
|
||||
sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la";
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
owner = "kamalist";
|
||||
repo = "AUC";
|
||||
rev = "66d1cd57472442b4bf3c1ed12ca5cadd57d076b3";
|
||||
sha256 = "0gb4asmlfr19h42f3c5wg9c9i3014if3ymrqan6w9klgzgfyh2la";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,man/man1}
|
||||
install auc $out/bin
|
||||
${pandoc}/bin/pandoc -V title=${lib.escapeShellArg pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,man/man1}
|
||||
install auc $out/bin
|
||||
${pandoc}/bin/pandoc -V title=${lib.escapeShellArg finalAttrs.pname} -V section=1 $src/README.md -s -t man -o $out/man/man1/auc.1
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line Roman calendar";
|
||||
longDescription = ''
|
||||
AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans.
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line Roman calendar";
|
||||
longDescription = ''
|
||||
AUC (Ab Urbe condita) is a command-line Roman calendar tool. Currently it shows the specified date in the format of the Ancient Romans.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = [maintainers.kmein];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.kmein ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
{yarn2nix-moretea}:
|
||||
{yarn2nix-moretea, lib}:
|
||||
yarn2nix-moretea.mkYarnPackage {
|
||||
name = "devanagari";
|
||||
src = ./.;
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./devanagari.js
|
||||
./package.json
|
||||
];
|
||||
};
|
||||
packageJson = ./package.json;
|
||||
yarnLock = ./yarn.lock;
|
||||
}
|
||||
|
||||
@@ -12,16 +12,17 @@
|
||||
util-linux,
|
||||
zbar,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hc-${meta.version}";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "hc-${finalAttrs.version}";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://cgit.krebsco.de/hc";
|
||||
rev = "refs/tags/v${meta.version}";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
sha256 = "09349gja22p0j3xs082kp0fnaaada14bafszn4r3q7rg1id2slfb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [makeWrapper];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildPhase = null;
|
||||
|
||||
@@ -31,19 +32,21 @@ stdenv.mkDerivation rec {
|
||||
cp $src/bin/hc $out/bin/hc
|
||||
|
||||
wrapProgram $out/bin/hc \
|
||||
--prefix PATH : ${lib.makeBinPath [
|
||||
coreutils
|
||||
findutils
|
||||
gawk
|
||||
gnugrep
|
||||
qrencode
|
||||
texlive.combined.scheme-full
|
||||
util-linux
|
||||
zbar
|
||||
]}
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
coreutils
|
||||
findutils
|
||||
gawk
|
||||
gnugrep
|
||||
qrencode
|
||||
texlive.combined.scheme-full
|
||||
util-linux
|
||||
zbar
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
version = "1.0.0";
|
||||
version = finalAttrs.version;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
{pkgs ? import <nixpkgs> {}}:
|
||||
pkgs.writers.writeDashBin "jsesh" ''
|
||||
${pkgs.jre}/bin/java -jar ${pkgs.fetchzip {
|
||||
url = "https://github.com/rosmord/jsesh/releases/download/release-7.5.5/JSesh-7.5.5.zip";
|
||||
sha256 = "1z7ln51cil9pypz855x9a8p9ip2aflvknh566wcaah1kmz3fp57r";
|
||||
}}/lib/jseshAppli-7.5.5.jar
|
||||
{
|
||||
writers,
|
||||
jre,
|
||||
fetchzip,
|
||||
}:
|
||||
writers.writeDashBin "jsesh" ''
|
||||
${jre}/bin/java -jar ${
|
||||
fetchzip {
|
||||
url = "https://github.com/rosmord/jsesh/releases/download/release-7.5.5/JSesh-7.5.5.zip";
|
||||
sha256 = "1z7ln51cil9pypz855x9a8p9ip2aflvknh566wcaah1kmz3fp57r";
|
||||
}
|
||||
}/lib/jseshAppli-7.5.5.jar
|
||||
''
|
||||
|
||||
@@ -1,32 +1,36 @@
|
||||
# klem < klemm < klemmbrett ~ clipboard
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
dmenu,
|
||||
curl,
|
||||
gnused,
|
||||
coreutils,
|
||||
xclip,
|
||||
libnotify,
|
||||
writers,
|
||||
options ? { },
|
||||
...
|
||||
} @ args: let
|
||||
cfg = eval.config;
|
||||
|
||||
}: let
|
||||
eval = lib.evalModules {
|
||||
modules = [
|
||||
{
|
||||
_file = toString ./klem.nix;
|
||||
imports = [(args.config or {})];
|
||||
imports = [options];
|
||||
options = {
|
||||
selection = lib.mkOption {
|
||||
default = "clipboard";
|
||||
type = lib.types.enum ["primary" "secondary" "clipboard"];
|
||||
};
|
||||
dmenu = lib.mkOption {
|
||||
default = "${pkgs.dmenu}/bin/dmenu -i -p klem";
|
||||
default = "${dmenu}/bin/dmenu -i -p klem";
|
||||
type = lib.types.path;
|
||||
};
|
||||
scripts = lib.mkOption {
|
||||
default = {
|
||||
pastebin = "${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io";
|
||||
pastebin = "${curl}/bin/curl -fSs -F 'f:1=<-' ix.io";
|
||||
shorten = ''
|
||||
${pkgs.curl}/bin/curl -fSs -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://0x0.st
|
||||
${curl}/bin/curl -fSs -F "shorten=$(${coreutils}/bin/cat)" https://0x0.st
|
||||
'';
|
||||
"replace p.r" = "${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'";
|
||||
"replace p.r" = "${gnused}/bin/sed 's/\\<r\\>/krebsco.de/'";
|
||||
};
|
||||
type = lib.types.attrs;
|
||||
};
|
||||
@@ -35,21 +39,21 @@
|
||||
];
|
||||
};
|
||||
|
||||
scriptCase = option: script: ''
|
||||
'${option}') ${toString script} ;;
|
||||
'';
|
||||
cfg = eval.config;
|
||||
in
|
||||
pkgs.writers.writeDashBin "klem" ''
|
||||
writers.writeDashBin "klem" ''
|
||||
set -efu
|
||||
|
||||
${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -out \
|
||||
${xclip}/bin/xclip -selection ${cfg.selection} -out \
|
||||
| case $(echo "${
|
||||
lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)
|
||||
}" | ${cfg.dmenu}) in
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)}
|
||||
*) ${pkgs.coreutils}/bin/cat ;;
|
||||
${lib.concatStringsSep "\n" (lib.mapAttrsToList (option: script: ''
|
||||
'${option}') ${toString script} ;;
|
||||
'') cfg.scripts)}
|
||||
*) ${coreutils}/bin/cat ;;
|
||||
esac \
|
||||
| ${pkgs.xclip}/bin/xclip -selection ${cfg.selection} -in
|
||||
| ${xclip}/bin/xclip -selection ${cfg.selection} -in
|
||||
|
||||
${pkgs.libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
|
||||
${libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard."
|
||||
''
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
pandoc,
|
||||
lib,
|
||||
fetchgit,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "pandoc-doc";
|
||||
version = pandoc.version;
|
||||
src = fetchgit {
|
||||
url = "https://github.com/jgm/pandoc";
|
||||
rev = pandoc.version;
|
||||
hash = "sha256-4VDfRUr6TyF4oZsCve9t6FlEN0AqzYdlYXRny+SAcsY=";
|
||||
};
|
||||
buildPhase = ''
|
||||
mkdir -p $out/man/man1
|
||||
${pandoc}/bin/pandoc -V section=1 --standalone --write=man $src/MANUAL.txt -o $out/man/man1/pandoc.1
|
||||
'';
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
writers,
|
||||
gnused,
|
||||
pari,
|
||||
dmenu,
|
||||
xclip,
|
||||
}:
|
||||
writers.writeDashBin "=" ''
|
||||
# https://github.com/onespaceman/menu-calc
|
||||
|
||||
answer=$(echo "$@" | ${pari}/bin/gp -q | ${gnused}/bin/sed '/\./ s/\.\{0,1\}0\{1,\}$//')
|
||||
|
||||
action=$(printf "copy\nclear" | ${dmenu}/bin/dmenu -p "= $answer")
|
||||
|
||||
case $action in
|
||||
"clear") $0 ;;
|
||||
"copy") printf %s "$answer" | ${xclip}/bin/xclip -selection clipboard;;
|
||||
"") ;;
|
||||
*) $0 "$answer $action" ;;
|
||||
esac
|
||||
''
|
||||
@@ -1,35 +1,28 @@
|
||||
{
|
||||
writeText,
|
||||
lib,
|
||||
writers,
|
||||
mpv,
|
||||
dmenu,
|
||||
coreutils,
|
||||
gnused,
|
||||
di-fm-key-file,
|
||||
radioStreams,
|
||||
executableName ? "mpv-radio",
|
||||
mpvCommand ? "${mpv}/bin/mpv --force-window=yes"
|
||||
}: let
|
||||
streams = import ../lib/streams.nix {
|
||||
mpvCommand ? "${mpv}/bin/mpv --force-window=yes",
|
||||
}:
|
||||
let
|
||||
streams = radioStreams.override {
|
||||
di-fm-key = "%DI_FM_KEY%";
|
||||
};
|
||||
streams-tsv = writeText "streams.tsv" (lib.concatMapStringsSep "\n" ({
|
||||
desc ? "",
|
||||
stream,
|
||||
station,
|
||||
...
|
||||
}: "${station}\t${desc}\t${stream}")
|
||||
streams);
|
||||
in
|
||||
writers.writeDashBin executableName ''
|
||||
set -x
|
||||
writers.writeDashBin executableName ''
|
||||
set -x
|
||||
|
||||
if [ -z ''${DI_FM_KEY} ]; then
|
||||
DI_FM_KEY=$(cat "${di-fm-key-file}")
|
||||
fi
|
||||
exec ${mpvCommand} "$(
|
||||
${dmenu}/bin/dmenu -i -l 5 < ${streams-tsv} \
|
||||
| ${coreutils}/bin/cut -f3 \
|
||||
| ${gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/
|
||||
)"
|
||||
''
|
||||
if [ -z ''${DI_FM_KEY} ]; then
|
||||
DI_FM_KEY=$(cat "${di-fm-key-file}")
|
||||
fi
|
||||
exec ${mpvCommand} "$(
|
||||
${dmenu}/bin/dmenu -i -l 5 < ${streams.tsv} \
|
||||
| ${coreutils}/bin/cut -f3 \
|
||||
| ${gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/
|
||||
)"
|
||||
''
|
||||
|
||||
@@ -5,18 +5,19 @@
|
||||
mpv,
|
||||
gnused,
|
||||
di-fm-key-file,
|
||||
radioStreams,
|
||||
findutils,
|
||||
}: let
|
||||
streams = import ../lib/streams.nix {
|
||||
}:
|
||||
let
|
||||
streams = radioStreams.override {
|
||||
di-fm-key = "%DI_FM_KEY%";
|
||||
};
|
||||
streams-list = writeText "streams.txt" (lib.concatMapStringsSep "\n" (station: station.stream) streams);
|
||||
in
|
||||
writers.writeDashBin "mpv-tuner" ''
|
||||
if [ -z ''${DI_FM_KEY} ]; then
|
||||
DI_FM_KEY=$(cat "${di-fm-key-file}")
|
||||
fi
|
||||
shuf ${streams-list} \
|
||||
| ${gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/ \
|
||||
| ${findutils}/bin/xargs ${mpv}/bin/mpv
|
||||
''
|
||||
writers.writeDashBin "mpv-tuner" ''
|
||||
if [ -z ''${DI_FM_KEY} ]; then
|
||||
DI_FM_KEY=$(cat "${di-fm-key-file}")
|
||||
fi
|
||||
shuf ${streams.playlist} \
|
||||
| ${gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/ \
|
||||
| ${findutils}/bin/xargs ${mpv}/bin/mpv
|
||||
''
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
coreutils,
|
||||
noteDirectory ? "~/state/obsidian",
|
||||
currentDates ? false,
|
||||
niveumPackages,
|
||||
obsidian-vim
|
||||
}:
|
||||
writers.writeDashBin "notemenu" ''
|
||||
set -efu
|
||||
@@ -24,6 +24,6 @@ writers.writeDashBin "notemenu" ''
|
||||
} | rofi -dmenu -i -p 'notes')
|
||||
if test "$note_file"
|
||||
then
|
||||
alacritty --working-directory ${noteDirectory} -e ${niveumPackages.obsidian-vim}/bin/nvim "$note_file"
|
||||
alacritty --working-directory ${noteDirectory} -e ${obsidian-vim}/bin/nvim "$note_file"
|
||||
fi
|
||||
''
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
neovim.override {
|
||||
configure = {
|
||||
customRC = ''
|
||||
source ${../lib/vim/shared.vim}
|
||||
source ${./vim-kmein/shared.vim}
|
||||
|
||||
cd ${obsidiantVaultDirectory}
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
libogg,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
name = "opustags";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fmang";
|
||||
repo = "opustags";
|
||||
rev = version;
|
||||
rev = finalAttrs.version;
|
||||
sha256 = "09z0cdg20algaj2yyhfz3hxh1biwjjvzx1pc2vdc64n8lkswqsc1";
|
||||
};
|
||||
|
||||
@@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
|
||||
"-DCMAKE_INSTALL_PREFIX=$out"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
buildInputs = [libogg];
|
||||
|
||||
nativeBuildInputs = [cmake pkg-config];
|
||||
@@ -30,4 +32,4 @@ stdenv.mkDerivation rec {
|
||||
description = "Ogg Opus tags editor";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
regex,
|
||||
...
|
||||
}:
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "indic_transliteration";
|
||||
version = "unstable-2020-12-15";
|
||||
src = fetchFromGitHub {
|
||||
repo = pname;
|
||||
repo = finalAttrs.pname;
|
||||
owner = "sanskrit-coders";
|
||||
rev = "2ea25a03af15937916b6768835e056166986c567";
|
||||
sha256 = "1pcf800hl0zkcffc47mkjq9mizsxdi0hwxlnij5bvbqdshd3w9ll";
|
||||
@@ -18,4 +18,4 @@ buildPythonPackage rec {
|
||||
patches = [./regex-version.patch];
|
||||
propagatedBuildInputs = [backports_functools_lru_cache selenium regex];
|
||||
doCheck = false;
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
taglib,
|
||||
zlib,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "stag";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "smabie";
|
||||
repo = "stag";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-IWb6ZbPlFfEvZogPh8nMqXatrg206BTV2DYg7BMm7R4=";
|
||||
};
|
||||
|
||||
@@ -27,6 +27,8 @@ stdenv.mkDerivation rec {
|
||||
make all
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp stag $out/bin/
|
||||
@@ -40,6 +42,5 @@ stdenv.mkDerivation rec {
|
||||
license = lib.licenses.publicDomain;
|
||||
maintainers = [ lib.maintainers.kmein ];
|
||||
platforms = lib.platforms.unix;
|
||||
source = src;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -27,8 +27,9 @@ stdenv.mkDerivation {
|
||||
env.NIX_CFLAGS_COMPILE = toString [
|
||||
"-Wno-error=format-security"
|
||||
];
|
||||
patchPhase = ''
|
||||
${gnused}/bin/sed -i s/noinst_PROGRAMS/bin_PROGRAMS/ tools/src/Makefile.am
|
||||
postPatch = ''
|
||||
substituteInPlace tools/src/Makefile.am \
|
||||
--replace-fail noinst_PROGRAMS bin_PROGRAMS
|
||||
'';
|
||||
installFlags = ["INSTALL_PREFIX=$(out)"];
|
||||
autoreconfPhase = ''
|
||||
@@ -39,6 +40,7 @@ stdenv.mkDerivation {
|
||||
mkdir $out
|
||||
make install
|
||||
'';
|
||||
doCheck = true;
|
||||
src = fetchFromGitHub {
|
||||
owner = "huzheng001";
|
||||
repo = "stardict-3";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,15 +2,14 @@
|
||||
stdenv,
|
||||
fetchurl,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
stdenv.mkDerivation {
|
||||
pname = "text2pdf";
|
||||
version = "1.1";
|
||||
src = fetchurl {
|
||||
url = "http://www.eprg.org/pdfcorner/text2pdf/text2pdf.c";
|
||||
sha256 = "002nyky12vf1paj7az6j6ra7lljwkhqzz238v7fyp7sfgxw0f7d1";
|
||||
};
|
||||
phases = ["buildPhase"];
|
||||
phases = [ "buildPhase" ];
|
||||
buildPhase = ''
|
||||
mkdir -p $out/bin
|
||||
gcc -o $out/bin/text2pdf $src
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
vimPlugins,
|
||||
fetchFromGitHub,
|
||||
vimUtils,
|
||||
niveumPackages,
|
||||
writeText,
|
||||
stylixColors ? null,
|
||||
colorscheme ? null,
|
||||
@@ -12,10 +11,10 @@
|
||||
}: (neovim.override {
|
||||
configure = {
|
||||
customRC = ''
|
||||
source ${../lib/vim/shared.vim}
|
||||
source ${../lib/vim/init.vim}
|
||||
source ${./shared.vim}
|
||||
source ${./init.vim}
|
||||
let g:snippet_directory = '${vimPlugins.friendly-snippets}'
|
||||
luafile ${../lib/vim/init.lua}
|
||||
luafile ${./init.lua}
|
||||
'' + lib.optionalString (stylixColors != null) (with stylixColors.withHashtag; ''
|
||||
luafile ${writeText "colors.lua" ''
|
||||
require('base16-colorscheme').setup({
|
||||
@@ -44,8 +43,8 @@
|
||||
|
||||
goyo
|
||||
limelight-vim
|
||||
niveumPackages.vimPlugins-mdwa-nvim
|
||||
niveumPackages.vimPlugins-vim-ernest
|
||||
vimPlugins.mdwa-nvim
|
||||
vimPlugins.vim-ernest
|
||||
|
||||
fzf-vim
|
||||
fzfWrapper
|
||||
@@ -53,21 +52,20 @@
|
||||
undotree
|
||||
tabular
|
||||
# vimwiki
|
||||
niveumPackages.vimPlugins-vim-colors-paramount
|
||||
vimPlugins.vim-colors-paramount
|
||||
nvim-lspconfig
|
||||
vim-commentary
|
||||
vim-css-color
|
||||
vim-eunuch
|
||||
niveumPackages.vimPlugins-vim-fetch
|
||||
vimPlugins.vim-fetch
|
||||
vim-fugitive
|
||||
vim-gitgutter
|
||||
vim-repeat
|
||||
vim-sensible
|
||||
vim-surround
|
||||
(vimUtils.buildVimPlugin rec {
|
||||
(let version = "1.1.0"; pname = "vim-dim"; in vimUtils.buildVimPlugin {
|
||||
pname = "vim-dim";
|
||||
version = "1.1.0";
|
||||
name = "${pname}-${version}";
|
||||
version = version;
|
||||
src = fetchFromGitHub {
|
||||
owner = "jeffkreeftmeijer";
|
||||
repo = pname;
|
||||
@@ -83,8 +81,8 @@
|
||||
emmet-vim
|
||||
vim-elixir
|
||||
haskell-vim
|
||||
niveumPackages.vimPlugins-icalendar-vim
|
||||
niveumPackages.vimPlugins-jq-vim
|
||||
vimPlugins.icalendar-vim
|
||||
vimPlugins.jq-vim
|
||||
rust-vim
|
||||
typescript-vim
|
||||
vim-javascript
|
||||
@@ -93,8 +91,8 @@
|
||||
vimtex
|
||||
vim-pandoc
|
||||
vim-pandoc-syntax
|
||||
niveumPackages.vimPlugins-vim-256noir
|
||||
niveumPackages.vimPlugins-typst-vim
|
||||
vimPlugins.vim-256noir
|
||||
vimPlugins.typst-vim
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -9,8 +9,8 @@
|
||||
config = args.config or {};
|
||||
|
||||
lib =
|
||||
args.lib
|
||||
// rec {
|
||||
args.lib //
|
||||
(let
|
||||
attrPaths = let
|
||||
recurse = path: value:
|
||||
if builtins.isAttrs value
|
||||
@@ -18,9 +18,6 @@
|
||||
else [(lib.nameValuePair path value)];
|
||||
in
|
||||
attrs: lib.flatten (recurse [] attrs);
|
||||
|
||||
attrPathsSep = sep: attrs: lib.listToAttrs (map (x: x // {name = lib.concatStringsSep sep x.name;}) (attrPaths attrs));
|
||||
|
||||
toWeechatValue = x:
|
||||
{
|
||||
bool = builtins.toJSON x;
|
||||
@@ -29,11 +26,15 @@
|
||||
int = toString x;
|
||||
}
|
||||
.${builtins.typeOf x};
|
||||
in {
|
||||
inherit attrPaths toWeechatValue;
|
||||
|
||||
attrPathsSep = sep: attrs: lib.listToAttrs (map (x: x // {name = lib.concatStringsSep sep x.name;}) (attrPaths attrs));
|
||||
|
||||
setCommand = name: value: "/set ${name} \"${toWeechatValue value}\"";
|
||||
|
||||
filterAddreplace = name: filter: "/filter addreplace ${name} ${filter.buffer} ${toWeechatValue filter.tags} ${filter.regex}";
|
||||
};
|
||||
});
|
||||
|
||||
cfg = eval.config;
|
||||
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../configs/networkmanager.nix
|
||||
@@ -42,7 +40,7 @@ in {
|
||||
};
|
||||
|
||||
networking.hostName = "fatteh";
|
||||
networking.retiolum = retiolumAddresses.fatteh;
|
||||
networking.retiolum = pkgs.lib.niveum.retiolumAddresses.fatteh;
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) kieran retiolumAddresses restic;
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./matomo.nix
|
||||
@@ -60,7 +58,7 @@ in {
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
inherit (restic) repository;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -75,7 +73,7 @@ in {
|
||||
firewall.allowedTCPPorts = [80 443];
|
||||
hostName = "ful";
|
||||
interfaces.enp0s3.useDHCP = true;
|
||||
retiolum = retiolumAddresses.ful;
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.ful;
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
@@ -92,7 +90,7 @@ in {
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = kieran.email;
|
||||
defaults.email = pkgs.lib.niveum.kieran.email;
|
||||
};
|
||||
|
||||
users.users.root.hashedPasswordFile = config.age.secrets.root.path;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, niveumPackages ,... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
port = 2857;
|
||||
in
|
||||
@@ -7,7 +7,7 @@ in
|
||||
enable = true;
|
||||
host = "dichtungsring.kmein.de";
|
||||
listenAddress = "127.0.0.1:${toString port}";
|
||||
package = niveumPackages.go-webring;
|
||||
package = pkgs.go-webring;
|
||||
members = [
|
||||
{ username = "meteora"; site = "meteora.xn--kiern-0qa.de"; }
|
||||
{ username = "huldra"; site = "huldras-halbtraum.com"; }
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{pkgs, ...}: let
|
||||
inherit (import ../../lib) kieran;
|
||||
in {
|
||||
{pkgs, lib, ...}: {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
@@ -12,7 +10,7 @@ in {
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = kieran.email;
|
||||
defaults.email = pkgs.lib.niveum.kieran.email;
|
||||
};
|
||||
|
||||
services.matomo = {
|
||||
|
||||
@@ -2,13 +2,9 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
niveumLib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
panoptikon = niveumLib.panoptikon {inherit pkgs lib niveumPackages config;};
|
||||
|
||||
irc-xxx = panoptikon.kpaste-irc {
|
||||
irc-xxx = pkgs.lib.panoptikon.kpaste-irc {
|
||||
target = lib.escapeShellArg "#xxx";
|
||||
retiolumLink = true;
|
||||
};
|
||||
@@ -41,7 +37,7 @@
|
||||
| ${pkgs.jq}/bin/jq -e .ok
|
||||
'';
|
||||
|
||||
irc-kmein = panoptikon.kpaste-irc {
|
||||
irc-kmein = pkgs.lib.panoptikon.kpaste-irc {
|
||||
messagePrefix = "$PANOPTIKON_WATCHER: ";
|
||||
target = "kmein";
|
||||
nick = "panoptikon-kmein";
|
||||
@@ -60,7 +56,7 @@ in {
|
||||
enable = true;
|
||||
watchers = {
|
||||
"github-meta" = {
|
||||
script = panoptikon.urlJSON {
|
||||
script = pkgs.lib.panoptikon.urlJSON {
|
||||
jqScript = ''
|
||||
{
|
||||
ssh_key_fingerprints: .ssh_key_fingerprints,
|
||||
@@ -71,79 +67,79 @@ in {
|
||||
reporters = [irc-xxx];
|
||||
};
|
||||
lammla = {
|
||||
script = panoptikon.url "http://lammla.info/index.php?reihe=30";
|
||||
script = pkgs.lib.panoptikon.url "http://lammla.info/index.php?reihe=30";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
kratylos = {
|
||||
script = panoptikon.url "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
|
||||
script = pkgs.lib.panoptikon.url "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
kobudo-tesshinkan = {
|
||||
script = panoptikon.url "https://kobudo-tesshinkan.eu/index.php/de/termine-berichte/lehrgaenge/";
|
||||
script = pkgs.lib.panoptikon.url "https://kobudo-tesshinkan.eu/index.php/de/termine-berichte/lehrgaenge/";
|
||||
reporters = [telegram-kmein matrix-kmein];
|
||||
};
|
||||
zeno-free = {
|
||||
script = panoptikon.urlSelector ".zenoCOMain" "http://www.zeno.org/Lesesaal/M/E-Books";
|
||||
script = pkgs.lib.panoptikon.urlSelector ".zenoCOMain" "http://www.zeno.org/Lesesaal/M/E-Books";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
carolinawelslau = {
|
||||
script = panoptikon.urlSelector "#main" "https://carolinawelslau.de/";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#main" "https://carolinawelslau.de/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
humboldt-preis = {
|
||||
script = panoptikon.urlSelector "#content-core" "https://www.hu-berlin.de/de/ueberblick/menschen/ehrungen/humboldtpreis";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#content-core" "https://www.hu-berlin.de/de/ueberblick/menschen/ehrungen/humboldtpreis";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
lisalittmann = {
|
||||
script = panoptikon.urlSelector "#site-content" "https://lisalittmann.de/";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://lisalittmann.de/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
lisalittmann-archive = {
|
||||
script = panoptikon.urlSelector "#site-content" "https://lisalittmann.de/archive/";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://lisalittmann.de/archive/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
lisalittmann-projects = {
|
||||
script = panoptikon.urlSelector "#site-content" "https://lisalittmann.de/projects/";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://lisalittmann.de/projects/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
tatort = {
|
||||
script = panoptikon.urlSelector ".linklist" "https://www.daserste.de/unterhaltung/krimi/tatort/sendung/index.html";
|
||||
script = pkgs.lib.panoptikon.urlSelector ".linklist" "https://www.daserste.de/unterhaltung/krimi/tatort/sendung/index.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
warpgrid-idiomarium = {
|
||||
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/idiomarium/";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/idiomarium/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
warpgrid-futurism = {
|
||||
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/futurism/";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/futurism/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
warpgrid-imagiary = {
|
||||
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/imagiary/";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/imagiary/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
warpgrid-alchemy = {
|
||||
script = panoptikon.urlSelector "#site-content" "https://warpgrid.de/alchemy/";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/alchemy/";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
indogermanische-forschungen = {
|
||||
script = panoptikon.urlSelector "#latestIssue" "https://www.degruyter.com/journal/key/INDO/html";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#latestIssue" "https://www.degruyter.com/journal/key/INDO/html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
ig-neuigkeiten = {
|
||||
script = panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/aktuelles/neuigkeiten.html";
|
||||
script = pkgs.lib.panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/aktuelles/neuigkeiten.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
ig-tagungen = {
|
||||
script = panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/tagungen/tagungen-der-ig.html";
|
||||
script = pkgs.lib.panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/tagungen/tagungen-der-ig.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
fu-distant = {
|
||||
script = panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/en/e/ma-distant/Termine/index.html";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/en/e/ma-distant/Termine/index.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
fu-aegyptologie = {
|
||||
script = panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/e/aegyptologie/termine/index.html";
|
||||
script = pkgs.lib.panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/e/aegyptologie/termine/index.html";
|
||||
reporters = [matrix-kmein];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
niveumPackages,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
liquidsoapDirectory = "/var/cache/liquidsoap";
|
||||
icecastPassword = "hackme";
|
||||
refresh-qasaid = pkgs.writers.writeDashBin "refresh-qasaid" ''
|
||||
@@ -23,7 +21,7 @@
|
||||
poem: .[0].["#text"],
|
||||
author: .[1].["#text"]
|
||||
})
|
||||
' | ${niveumPackages.cyberlocker-tools}/bin/cput qasaid.json
|
||||
' | ${pkgs.cyberlocker-tools}/bin/cput qasaid.json
|
||||
'';
|
||||
qasida-poem = pkgs.writers.writeDash "qasida.sh" ''
|
||||
set -efu
|
||||
@@ -136,7 +134,7 @@ in {
|
||||
environment.systemPackages = [refresh-qasaid];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(tmpfilesConfig {
|
||||
(pkgs.lib.niveum.tmpfilesConfig {
|
||||
type = "d";
|
||||
path = liquidsoapDirectory;
|
||||
mode = "0750";
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
../kibbeh/hardware-configuration.nix
|
||||
../../configs/tlp.nix
|
||||
@@ -50,7 +48,7 @@ in {
|
||||
networking = {
|
||||
hostName = "kabsa";
|
||||
wireless.interfaces = ["wlp3s0"];
|
||||
retiolum = retiolumAddresses.kabsa;
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.kabsa;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
niveumPackages,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -10,7 +9,7 @@
|
||||
./hardware-configuration.nix
|
||||
../../configs/spacetime.nix
|
||||
../../configs/admin-essentials.nix
|
||||
../../configs/keyboard.nix
|
||||
../../configs/keyboard
|
||||
../../configs/sound.nix
|
||||
../../configs/printing.nix
|
||||
../../configs/nix.nix
|
||||
@@ -76,9 +75,9 @@
|
||||
libreoffice
|
||||
xournalpp
|
||||
jellyfin-media-player
|
||||
niveumPackages.mpv-tv
|
||||
mpv-tv
|
||||
telegram-desktop
|
||||
(niveumPackages.mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; })
|
||||
(mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; })
|
||||
spotify
|
||||
];
|
||||
};
|
||||
@@ -88,7 +87,7 @@
|
||||
git
|
||||
vim
|
||||
tmux
|
||||
(niveumPackages.vim.override { colorscheme = "base16-gruvbox-dark-medium"; })
|
||||
(vim-kmein.override { colorscheme = "base16-gruvbox-dark-medium"; })
|
||||
];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) kieran retiolumAddresses restic;
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
./gitea.nix
|
||||
./hardware-configuration.nix
|
||||
@@ -36,7 +34,7 @@ in {
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
inherit (restic) repository;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -82,7 +80,7 @@ in {
|
||||
firewall.allowedTCPPorts = [80 443];
|
||||
hostName = "makanek";
|
||||
interfaces.ens3.useDHCP = true;
|
||||
retiolum = retiolumAddresses.makanek;
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.makanek;
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
@@ -115,7 +113,7 @@ in {
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = kieran.email;
|
||||
defaults.email = pkgs.lib.niveum.kieran.email;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."www.kmein.de" = {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
inherit (import ../../lib) sshPort;
|
||||
domain = "code.kmein.de";
|
||||
in {
|
||||
services.anubis = {
|
||||
@@ -27,7 +26,7 @@ in {
|
||||
settings = {
|
||||
server.ROOT_URL = "https://${domain}";
|
||||
server.DOMAIN = domain;
|
||||
server.SSH_PORT = sshPort;
|
||||
server.SSH_PORT = pkgs.lib.niveum.sshPort;
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
backupLocation = "/var/lib/codimd-backup";
|
||||
stateLocation = "/var/lib/codimd/state.sqlite";
|
||||
domain = "pad.kmein.de";
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
in {
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
enableACME = true;
|
||||
@@ -56,7 +56,7 @@ in {
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(tmpfilesConfig {
|
||||
(pkgs.lib.niveum.tmpfilesConfig {
|
||||
user = "codimd";
|
||||
group = "codimd";
|
||||
mode = "0755";
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
let
|
||||
lokiConfig = import ./loki.nix;
|
||||
blackboxConfig = import ./blackbox.nix;
|
||||
inherit (import ../../../lib) restic;
|
||||
in
|
||||
{
|
||||
services.grafana = {
|
||||
@@ -426,7 +425,7 @@ in
|
||||
{
|
||||
targets = [
|
||||
"zaatar.r:${toString config.services.prometheus.exporters.node.port}"
|
||||
"zaatar.r:${toString restic.port}"
|
||||
"zaatar.r:${toString pkgs.lib.niveum.restic.port}"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
@@ -49,10 +49,10 @@ in
|
||||
};
|
||||
|
||||
niveum.passport.services = [
|
||||
rec {
|
||||
{
|
||||
link = "https://tarot.kmein.de";
|
||||
title = "Tarot";
|
||||
description = "draws Tarot cards for you. See <a href=\"${link}/files/key.pdf\">here</a> for information on how to interpret them.";
|
||||
description = "draws Tarot cards for you.";
|
||||
}
|
||||
{
|
||||
link = "https://iching.kmein.de";
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
niveumPackages,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) serveHtml;
|
||||
remote = "https://cgit.lassul.us/stockholm";
|
||||
in {
|
||||
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml ../../lib/radio-news.html pkgs;
|
||||
}:
|
||||
{
|
||||
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig =
|
||||
pkgs.lib.niveum.serveHtml ../../packages/radio-news/index.html pkgs;
|
||||
|
||||
age.secrets = {
|
||||
gemini-api-key.file = ../../secrets/gemini-api-key.age;
|
||||
@@ -16,16 +14,22 @@ in {
|
||||
|
||||
systemd.services.news-digest = {
|
||||
enable = true;
|
||||
wantedBy = ["multi-user.target"];
|
||||
wants = ["network-online.target"];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
serviceConfig.LoadCredential = [
|
||||
"gemini-api-key:${config.age.secrets.gemini-api-key.path}"
|
||||
];
|
||||
startAt = "*:50";
|
||||
script = ''
|
||||
PATH=$PATH:${lib.makeBinPath [pkgs.gnused pkgs.curl pkgs.jq]}
|
||||
PATH=$PATH:${
|
||||
lib.makeBinPath [
|
||||
pkgs.gnused
|
||||
pkgs.curl
|
||||
pkgs.jq
|
||||
]
|
||||
}
|
||||
|
||||
GEMINI_API_KEY="$(cat "$CREDENTIALS_DIRECTORY/gemini-api-key")" ${niveumPackages.radio-news}/bin/radio-news | jq --arg from "$(date -u -Is | sed 's/+00:00/Z/')" --arg to "$(date -u -Is -d 'now + 30 minutes' | sed 's/+00:00/Z/')" '
|
||||
GEMINI_API_KEY="$(cat "$CREDENTIALS_DIRECTORY/gemini-api-key")" ${pkgs.radio-news}/bin/radio-news | jq --arg from "$(date -u -Is | sed 's/+00:00/Z/')" --arg to "$(date -u -Is -d 'now + 30 minutes' | sed 's/+00:00/Z/')" '
|
||||
{
|
||||
from: $from,
|
||||
to: $to,
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) kieran;
|
||||
weechatHome = "/var/lib/weechat";
|
||||
weechat-declarative = pkgs.callPackage ../../packages/weechat-declarative.nix {};
|
||||
in {
|
||||
systemd.services.weechat = let
|
||||
tmux = pkgs.writers.writeDash "tmux" ''
|
||||
@@ -26,13 +24,13 @@ in {
|
||||
''
|
||||
} "$@"
|
||||
'';
|
||||
weechat = weechat-declarative.override {
|
||||
weechat = pkgs.weechat-declarative.override {
|
||||
config = {
|
||||
scripts = [
|
||||
pkgs.weechatScripts.weechat-autosort
|
||||
pkgs.weechatScripts.colorize_nicks
|
||||
pkgs.weechatScripts.hotlist2extern
|
||||
# pkgs.weechatScripts.weechat-matrix
|
||||
(pkgs.callPackage ../../packages/weechatScripts/hotlist2extern.nix {})
|
||||
];
|
||||
settings = let
|
||||
nick = "kmein";
|
||||
@@ -52,7 +50,7 @@ in {
|
||||
msg_part = "tschö mit ö";
|
||||
msg_quit = "ciao kakao";
|
||||
msg_kick = "warum machst du diese?";
|
||||
realname = lib.head (lib.strings.split " " kieran.name);
|
||||
realname = lib.head (lib.strings.split " " pkgs.lib.niveum.kieran.name);
|
||||
};
|
||||
server = {
|
||||
hackint = {
|
||||
@@ -182,7 +180,7 @@ in {
|
||||
users.extraUsers.weechat = {
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys =
|
||||
kieran.sshKeys
|
||||
pkgs.lib.niveum.kieran.sshKeys
|
||||
++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@kibbeh"
|
||||
];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{ lib, pkgs, config, unstablePackages, ... }:
|
||||
let
|
||||
inherit (import ../../lib) kieran;
|
||||
weechatHome = "/var/lib/weechat";
|
||||
weechat-declarative =
|
||||
pkgs.callPackage ../../packages/weechat-declarative.nix {
|
||||
@@ -54,7 +53,7 @@ in {
|
||||
msg_part = "tschö mit ö";
|
||||
msg_quit = "ciao kakao";
|
||||
msg_kick = "warum machst du diese?";
|
||||
realname = lib.head (lib.strings.split " " kieran.name);
|
||||
realname = lib.head (lib.strings.split " " pkgs.lib.niveum.kieran.name);
|
||||
};
|
||||
server = {
|
||||
hackint = {
|
||||
@@ -185,7 +184,7 @@ in {
|
||||
users.groups.weechat = { };
|
||||
users.extraUsers.weechat = {
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = kieran.sshKeys ++ [
|
||||
openssh.authorizedKeys.keys = pkgs.lib.niveum.kieran.sshKeys ++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@kibbeh"
|
||||
];
|
||||
createHome = true;
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
@@ -50,7 +48,7 @@ in {
|
||||
wwp0s20u4i6.useDHCP = true;
|
||||
};
|
||||
wireless.interfaces = ["wlp3s0"];
|
||||
retiolum = retiolumAddresses.manakish;
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.manakish;
|
||||
hostName = "manakish";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../configs/spacetime.nix
|
||||
@@ -67,7 +66,7 @@ in {
|
||||
enp0s4.useDHCP = true;
|
||||
wlp2s0.useDHCP = true;
|
||||
};
|
||||
retiolum = retiolumAddresses.tabula;
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.tabula;
|
||||
hostName = "tabula";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses;
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../configs/spacetime.nix
|
||||
@@ -75,7 +74,7 @@ in {
|
||||
enp0s25.useDHCP = true;
|
||||
wlo1.useDHCP = true;
|
||||
};
|
||||
retiolum = retiolumAddresses.tahina;
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.tahina;
|
||||
hostName = "tahina";
|
||||
};
|
||||
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
niveumLib = import ../../lib;
|
||||
inherit (niveumLib) retiolumAddresses restic;
|
||||
firewall = niveumLib.firewall lib;
|
||||
dataDir = "/backup/restic";
|
||||
in {
|
||||
services.restic.server = {
|
||||
@@ -15,7 +12,7 @@ in {
|
||||
inherit dataDir;
|
||||
prometheus = true;
|
||||
extraFlags = ["--no-auth"]; # auth is done via firewall
|
||||
listenAddress = toString restic.port;
|
||||
listenAddress = toString pkgs.lib.niveum.restic.port;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
@@ -30,32 +27,32 @@ in {
|
||||
};
|
||||
|
||||
networking.firewall = let
|
||||
dport = restic.port;
|
||||
dport = pkgs.lib.niveum.restic.port;
|
||||
protocol = "tcp";
|
||||
rules = [
|
||||
(firewall.accept {
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = retiolumAddresses.kabsa.ipv4;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.kabsa.ipv4;
|
||||
})
|
||||
(firewall.accept {
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = retiolumAddresses.manakish.ipv4;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.manakish.ipv4;
|
||||
})
|
||||
(firewall.accept {
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = retiolumAddresses.makanek.ipv4;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.makanek.ipv4;
|
||||
})
|
||||
(firewall.accept {
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = retiolumAddresses.fatteh.ipv4;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.fatteh.ipv4;
|
||||
})
|
||||
(firewall.accept {
|
||||
(pkgs.lib.niveum.firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = retiolumAddresses.ful.ipv4;
|
||||
source = pkgs.lib.niveum.retiolumAddresses.ful.ipv4;
|
||||
})
|
||||
];
|
||||
in {
|
||||
extraCommands = firewall.addRules rules;
|
||||
extraStopCommands = firewall.removeRules rules;
|
||||
extraCommands = pkgs.lib.niveum.firewall.addRules rules;
|
||||
extraStopCommands = pkgs.lib.niveum.firewall.removeRules rules;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,9 +3,8 @@
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../../lib) retiolumAddresses restic;
|
||||
in {
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./backup.nix
|
||||
./gaslight.nix
|
||||
@@ -51,7 +50,7 @@ in {
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
inherit (restic) repository;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -70,24 +69,26 @@ in {
|
||||
|
||||
services.illum.enable = true;
|
||||
|
||||
environment.systemPackages = let
|
||||
worldradio = pkgs.callPackage ../../packages/worldradio.nix {};
|
||||
in [
|
||||
(pkgs.writers.writeDashBin "mpv" ''${pkgs.mpv}/bin/mpv --no-video "$@"'')
|
||||
(pkgs.writers.writeDashBin "worldradio" ''
|
||||
shuf ${worldradio} | ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv --no-video
|
||||
'')
|
||||
pkgs.git
|
||||
pkgs.vim
|
||||
pkgs.htop
|
||||
pkgs.ncmpcpp
|
||||
pkgs.python3 # for sshuttle
|
||||
];
|
||||
environment.systemPackages =
|
||||
let
|
||||
worldradio = pkgs.callPackage ../../packages/worldradio.nix { };
|
||||
in
|
||||
[
|
||||
(pkgs.writers.writeDashBin "mpv" ''${pkgs.mpv}/bin/mpv --no-video "$@"'')
|
||||
(pkgs.writers.writeDashBin "worldradio" ''
|
||||
shuf ${worldradio} | ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv --no-video
|
||||
'')
|
||||
pkgs.git
|
||||
pkgs.vim
|
||||
pkgs.htop
|
||||
pkgs.ncmpcpp
|
||||
pkgs.python3 # for sshuttle
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "zaatar";
|
||||
wireless.interfaces = ["wlp2s0"];
|
||||
retiolum = retiolumAddresses.zaatar;
|
||||
wireless.interfaces = [ "wlp2s0" ];
|
||||
retiolum = pkgs.lib.niveum.retiolumAddresses.zaatar;
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
{config, pkgs, lib, ...}: let
|
||||
port = 8123;
|
||||
inherit (import ../../lib) restic;
|
||||
volumeName = "home-assistant";
|
||||
streams = import ../../lib/streams.nix {
|
||||
di-fm-key = "%DI_FM_KEY%"; # TODO lib.strings.fileContents <secrets/di.fm/key>;
|
||||
};
|
||||
playlistDirectoryPath = "/var/lib/mpd/playlists";
|
||||
in {
|
||||
networking.firewall.allowedTCPPorts = [port];
|
||||
|
||||
@@ -17,7 +12,7 @@ in {
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
inherit (restic) repository;
|
||||
repository = pkgs.lib.niveum.restic.repository;
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
RandomizedDelaySec = "1h";
|
||||
@@ -32,46 +27,6 @@ in {
|
||||
di-fm-key.file = ../../secrets/di-fm-key.age;
|
||||
};
|
||||
|
||||
systemd.services.mpd-playlists = {
|
||||
before = ["podman-homeassistant.service"];
|
||||
wantedBy = ["podman-homeassistant.service"];
|
||||
script = let
|
||||
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
||||
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
||||
makePlaylist = name: streams: pkgs.writeText "${name}.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
||||
playlistDirectory = pkgs.linkFarm "playlists" (
|
||||
[
|
||||
{
|
||||
name = "all.m3u";
|
||||
path = makePlaylist "all" streams;
|
||||
}
|
||||
]
|
||||
++ map (tag: {
|
||||
name = "${tag}.m3u";
|
||||
path = makePlaylist tag (tagStreams tag);
|
||||
})
|
||||
tags
|
||||
);
|
||||
in ''
|
||||
mkdir -p ${playlistDirectoryPath}
|
||||
|
||||
export DI_FM_KEY="$(cat "$CREDENTIALS_DIRECTORY/di-fm-key")"
|
||||
|
||||
rm -rf ${playlistDirectoryPath}
|
||||
mkdir ${playlistDirectoryPath}
|
||||
|
||||
for m3u in $(ls ${playlistDirectory})
|
||||
do
|
||||
${pkgs.gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/g ${playlistDirectory}/"$m3u" > ${playlistDirectoryPath}/"$(basename "$m3u")"
|
||||
done
|
||||
'';
|
||||
serviceConfig = {
|
||||
LoadCredential = [
|
||||
"di-fm-key:${config.age.secrets.di-fm-key.path}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
|
||||
systemd.services.update-containers = {
|
||||
@@ -113,7 +68,6 @@ in {
|
||||
containers.homeassistant = {
|
||||
volumes = [
|
||||
"${volumeName}:/config"
|
||||
"${playlistDirectoryPath}:/media"
|
||||
"/run/dbus:/run/dbus:ro"
|
||||
];
|
||||
# needed for bluetooth
|
||||
|
||||
@@ -141,7 +141,7 @@ in {
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
exports = let
|
||||
machines = with (import ../../lib).retiolumAddresses; [kabsa manakish];
|
||||
machines = with pkgs.lib.niveum.retiolumAddresses; [kabsa manakish];
|
||||
in ''
|
||||
/export ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(fsid=0)") machines}
|
||||
/export/moodle ${lib.concatMapStringsSep " " (machine: "${machine.ipv4}(insecure,rw)") machines}
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
firewall = (import ../../lib).firewall lib;
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
|
||||
mukkeMountPoint = "/mnt/mukke";
|
||||
fritzboxMountPoint = "/mnt/fritz";
|
||||
|
||||
streams = import ../../lib/streams.nix {
|
||||
di-fm-key = "%DI_FM_KEY%"; # TODO lib.strings.fileContents <secrets/di.fm/key>;
|
||||
};
|
||||
in {
|
||||
users.users.${config.services.mpd.user}.extraGroups = ["pipewire" "audio"];
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.listenAddress = "0.0.0.0";
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
auto_update "yes"
|
||||
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "zaatar single room audio system"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
fileSystems.${mukkeMountPoint} = {
|
||||
device = "//mukke.r/public";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"guest"
|
||||
"nofail"
|
||||
"noauto"
|
||||
"ro"
|
||||
"rsize=16777216"
|
||||
"cache=loose"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."${fritzboxMountPoint}" = {
|
||||
device = "//192.168.178.1/FRITZ.NAS/Backup";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"username=ftpuser"
|
||||
"password=ftppassword"
|
||||
"noauto"
|
||||
"nounix"
|
||||
"ro"
|
||||
"noserverino" # ref https://askubuntu.com/a/1265165
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(tmpfilesConfig {
|
||||
type = "L+";
|
||||
mode = "0644";
|
||||
user = "mpd";
|
||||
group = "mpd";
|
||||
path = "${config.services.mpd.musicDirectory}/mukke";
|
||||
argument = mukkeMountPoint;
|
||||
})
|
||||
(tmpfilesConfig {
|
||||
type = "L+";
|
||||
mode = "0644";
|
||||
user = "mpd";
|
||||
group = "mpd";
|
||||
path = "${config.services.mpd.musicDirectory}/fritz";
|
||||
argument = "${fritzboxMountPoint}";
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = [pkgs.mpc_cli];
|
||||
|
||||
networking.firewall = let
|
||||
dport = config.services.mpd.network.port;
|
||||
protocol = "tcp";
|
||||
rules = [
|
||||
(firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = "192.168.0.0/16";
|
||||
})
|
||||
(firewall.accept {
|
||||
inherit dport protocol;
|
||||
source = "127.0.0.0/8";
|
||||
})
|
||||
];
|
||||
in {
|
||||
allowedTCPPorts = [80];
|
||||
extraCommands = firewall.addRules rules;
|
||||
extraStopCommands = firewall.removeRules rules;
|
||||
};
|
||||
|
||||
systemd.services.mpd-playlists = {
|
||||
before = ["mpd.service"];
|
||||
wantedBy = ["mpd.service"];
|
||||
script = let
|
||||
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
||||
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
||||
makePlaylist = name: streams: pkgs.writeText "${name}.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
||||
playlistDirectory = pkgs.linkFarm "playlists" (
|
||||
[
|
||||
{
|
||||
name = "all.m3u";
|
||||
path = makePlaylist "all" streams;
|
||||
}
|
||||
]
|
||||
++ map (tag: {
|
||||
name = "${tag}.m3u";
|
||||
path = makePlaylist tag (tagStreams tag);
|
||||
})
|
||||
tags
|
||||
);
|
||||
playlistDirectoryPath = "/var/lib/mpd/playlists";
|
||||
in ''
|
||||
export DI_FM_KEY="$(cat "$CREDENTIALS_DIRECTORY/di-fm-key")"
|
||||
|
||||
rm -rf ${playlistDirectoryPath}
|
||||
mkdir ${playlistDirectoryPath}
|
||||
|
||||
for m3u in $(ls ${playlistDirectory})
|
||||
do
|
||||
${pkgs.gnused}/bin/sed s/%DI_FM_KEY%/"$DI_FM_KEY"/g ${playlistDirectory}/"$m3u" > ${playlistDirectoryPath}/"$(basename "$m3u")"
|
||||
done
|
||||
'';
|
||||
serviceConfig = {
|
||||
LoadCredential = [
|
||||
"di-fm-key:${config.age.secrets.di-fm-key.path}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.ympd = {
|
||||
enable = true;
|
||||
mpd.port = config.services.mpd.network.port;
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
ympd-basicAuth = {
|
||||
file = ../../secrets/zaatar-ympd-basicAuth.age;
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
mode = "400";
|
||||
};
|
||||
di-fm-key.file = ../../secrets/di-fm-key.age;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts."radio.kmein.r" = {
|
||||
basicAuthFile = config.age.secrets.ympd-basicAuth.path;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${config.services.ympd.webPort}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{config, ...}: {
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
# mpris is a dbus service for controlling all music players with e.g. playerctl
|
||||
# I do not need this, because I only interact with the service via Spotify Connect
|
||||
# otherẃise it will pull in DBus which fails without X11
|
||||
spotifyd = pkgs.spotifyd.overrideAttrs {
|
||||
withMpris = false;
|
||||
withKeyring = false;
|
||||
};
|
||||
};
|
||||
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
username_cmd = "cat $CREDENTIALS_DIRECTORY/username";
|
||||
password_cmd = "cat $CREDENTIALS_DIRECTORY/password";
|
||||
bitrate = 320;
|
||||
use_mpris = false;
|
||||
device_type = "s_t_b"; # set-top box
|
||||
device_name = config.networking.hostName;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.spotifyd = {
|
||||
serviceConfig.LoadCredential = [
|
||||
"username:${config.age.secrets.spotify-username.path}"
|
||||
"password:${config.age.secrets.spotify-password.path}"
|
||||
];
|
||||
serviceConfig.RuntimeMaxSec = "${toString (5 * 60 * 60)}s";
|
||||
serviceConfig.SupplementaryGroups = ["pipewire"];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [4713];
|
||||
|
||||
age.secrets = {
|
||||
spotify-username.file = ../../secrets/spotify-username.age;
|
||||
spotify-password.file = ../../secrets/spotify-password.age;
|
||||
};
|
||||
|
||||
# ref https://github.com/NixOS/nixpkgs/issues/71362#issuecomment-753461502
|
||||
hardware.pulseaudio.extraConfig = ''
|
||||
unload-module module-native-protocol-unix
|
||||
load-module module-native-protocol-unix auth-anonymous=1
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user