mirror of
https://github.com/kmein/niveum
synced 2026-03-21 20:31:07 +01:00
Compare commits
38 Commits
tahina
...
89c852c4ea
| Author | SHA1 | Date | |
|---|---|---|---|
| 89c852c4ea | |||
|
|
3fa242b957 | ||
| 35c51b3b17 | |||
| f1c049ada3 | |||
| 8118009acb | |||
| 41706bc84b | |||
| eec7be0c3b | |||
| 2aac2609cb | |||
| 2b7db496b0 | |||
| 0feebd18cd | |||
| 892c758303 | |||
| 8cc3541d2d | |||
| 687aa456d1 | |||
|
|
fd60863f77 | ||
| a60cbab742 | |||
| 54383cb1ab | |||
| 9b414d104a | |||
| 67b7d63d9a | |||
| f3116bfc12 | |||
| f31baf9e56 | |||
| 906cc1981e | |||
| d4e82500ae | |||
| 6aa9be6f70 | |||
| 4e362678ca | |||
| a2081dece4 | |||
| 98cf188a17 | |||
| 4932c7c08a | |||
| c8a6991f09 | |||
| 5d3c9a67ab | |||
|
|
659a888c3d | ||
| 26908b03a3 | |||
| feccea5234 | |||
| 8ffb0bd245 | |||
| c1b777b689 | |||
| e85a8f7634 | |||
| 25bc6f573c | |||
| 4b5915354b | |||
| 43ab6b3210 |
1
ci.nix
1
ci.nix
@@ -36,6 +36,7 @@
|
|||||||
"mail/gmail/amroplay"
|
"mail/gmail/amroplay"
|
||||||
"mail/gmail/kieran.meinhardt"
|
"mail/gmail/kieran.meinhardt"
|
||||||
"mail/meinhaki"
|
"mail/meinhaki"
|
||||||
|
"mail/dslalewa"
|
||||||
"mail/posteo"
|
"mail/posteo"
|
||||||
"nextcloud-fysi/password"
|
"nextcloud-fysi/password"
|
||||||
"nextcloud/password"
|
"nextcloud/password"
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
<niveum/modules/dropbox.nix>
|
<niveum/modules/dropbox.nix>
|
||||||
];
|
];
|
||||||
@@ -12,19 +14,46 @@
|
|||||||
dropbox.enable = false;
|
dropbox.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.home-symlinks = ''
|
systemd.tmpfiles.rules = map tmpfilesConfig [
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
|
{
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
|
type = "L+";
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Uni ${config.users.users.me.home}/uni
|
user = config.users.users.me.name;
|
||||||
'';
|
group = "users";
|
||||||
|
mode = "0755";
|
||||||
|
argument = "${config.users.users.me.home}/cloud/Seafile/Wiki";
|
||||||
|
path = "${config.users.users.me.home}/notes";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "L+";
|
||||||
|
user = config.users.users.me.name;
|
||||||
|
group = "users";
|
||||||
|
mode = "0755";
|
||||||
|
argument = "${config.users.users.me.home}/cloud/Seafile/Uni";
|
||||||
|
path = "${config.users.users.me.home}/uni";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "L+";
|
||||||
|
user = config.users.users.me.name;
|
||||||
|
group = "users";
|
||||||
|
mode = "0755";
|
||||||
|
argument = "${config.users.users.me.home}/cloud/syncthing/common/mahlzeit";
|
||||||
|
path = "${config.users.users.me.home}/mahlzeit";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
|
services.gnome-keyring.enable = true;
|
||||||
services.nextcloud-client = {
|
services.nextcloud-client = {
|
||||||
enable = true;
|
enable = true;
|
||||||
startInBackground = true;
|
startInBackground = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.user.services.nextcloud-client = {
|
||||||
|
wants = ["gnome-keyring.service"];
|
||||||
|
after = ["gnome-keyring.service"];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writers.writeDashBin "book" ''
|
(pkgs.writers.writeDashBin "book" ''
|
||||||
set -efu
|
set -efu
|
||||||
|
|||||||
@@ -144,8 +144,8 @@ in {
|
|||||||
wcd = "source ${wcd}";
|
wcd = "source ${wcd}";
|
||||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
||||||
where = "source ${where}";
|
where = "source ${where}";
|
||||||
yt = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
|
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
|
||||||
yta = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio
|
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{i18n.defaultLocale = "en_DK.UTF-8";}
|
{i18n.defaultLocale = "en_DK.UTF-8";}
|
||||||
@@ -262,5 +262,6 @@ in {
|
|||||||
./vscode.nix
|
./vscode.nix
|
||||||
./watson.nix
|
./watson.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
|
./tor.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,42 +1,53 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
nixpkgs.config.joypixels.acceptLicense = true;
|
nixpkgs.config.joypixels.acceptLicense = true;
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultFonts = true;
|
enableDefaultFonts = true;
|
||||||
fontDir.enable = true;
|
fontDir.enable = true;
|
||||||
fonts = with pkgs; [
|
fonts = with pkgs; [
|
||||||
alegreya
|
alegreya
|
||||||
alegreya-sans
|
alegreya-sans
|
||||||
|
amiri
|
||||||
|
cantarell-fonts
|
||||||
|
charis-sil
|
||||||
corefonts
|
corefonts
|
||||||
|
crimson
|
||||||
eb-garamond
|
eb-garamond
|
||||||
|
etBook
|
||||||
fira
|
fira
|
||||||
font-awesome-ttf
|
font-awesome-ttf
|
||||||
|
gentium
|
||||||
|
gfs-fonts
|
||||||
|
gyre-fonts
|
||||||
|
ia-writer-duospace
|
||||||
ibm-plex
|
ibm-plex
|
||||||
inconsolata
|
jetbrains-mono
|
||||||
iosevka
|
joypixels
|
||||||
libertine
|
libertinus
|
||||||
|
libre-bodoni
|
||||||
lmodern
|
lmodern
|
||||||
|
merriweather
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-cjk
|
ocr-a
|
||||||
noto-fonts-emoji
|
|
||||||
roboto
|
roboto
|
||||||
roboto-mono
|
roboto-mono
|
||||||
roboto-slab
|
roboto-slab
|
||||||
|
scheherazade-new
|
||||||
source-code-pro
|
source-code-pro
|
||||||
source-serif-pro
|
|
||||||
source-sans-pro
|
source-sans-pro
|
||||||
ubuntu_font_family
|
source-serif-pro
|
||||||
gfs-fonts
|
theano
|
||||||
jetbrains-mono
|
|
||||||
twemoji-color-font
|
|
||||||
joypixels
|
|
||||||
tocharian-font
|
tocharian-font
|
||||||
];
|
vistafonts
|
||||||
fontconfig.defaultFonts = {
|
vollkorn
|
||||||
monospace = ["JetBrains Mono" "JoyPixels"];
|
zilla-slab
|
||||||
serif = ["Roboto Slab"];
|
]; # google-fonts league-of-moveable-type
|
||||||
sansSerif = ["Roboto" "Noto Sans"];
|
fontconfig.defaultFonts = let
|
||||||
emoji = ["JoyPixels"];
|
emojiFont = "JoyPixels";
|
||||||
|
in {
|
||||||
|
monospace = ["JetBrains Mono" emojiFont];
|
||||||
|
serif = ["Merriweather"];
|
||||||
|
sansSerif = ["Cantarell" emojiFont];
|
||||||
|
emoji = [emojiFont];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,12 @@
|
|||||||
}: let
|
}: let
|
||||||
commaSep = builtins.concatStringsSep ",";
|
commaSep = builtins.concatStringsSep ",";
|
||||||
in {
|
in {
|
||||||
|
# man 7 xkeyboard-config
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
layout = commaSep ["de" "gr"];
|
layout = commaSep ["de" "gr" "ru" "ara"];
|
||||||
xkbVariant = commaSep ["T3" "polytonic"];
|
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
|
||||||
|
# buckwalter: http://www.qamus.org/transliteration.htm
|
||||||
|
xkbVariant = commaSep ["T3" "polytonic" "phonetic" "buckwalter"];
|
||||||
xkbOptions =
|
xkbOptions =
|
||||||
commaSep ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
|
commaSep ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
@@ -17,4 +20,15 @@ in {
|
|||||||
|
|
||||||
# improve held key rate
|
# improve held key rate
|
||||||
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
||||||
|
|
||||||
|
systemd.user.services.gxkb = {
|
||||||
|
wantedBy = ["graphical-session.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
SyslogIdentifier = "gxkb";
|
||||||
|
ExecStart = "${pkgs.gxkb}/bin/gxkb";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = "15s";
|
||||||
|
StartLimitBurst = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ in {
|
|||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
|
ytdl-format = "bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
|
||||||
ytdl-raw-options = lib.concatStringsSep "," [''sub-lang="de,en"'' "write-sub=" "write-auto-sub="];
|
ytdl-raw-options = lib.concatStringsSep "," [''sub-lang="de,en"'' "write-sub=" "write-auto-sub="];
|
||||||
screenshot-template = "%F-%wH%wM%wS-%#04n";
|
screenshot-template = "%F-%wH%wM%wS-%#04n";
|
||||||
|
script-opts = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
|
||||||
};
|
};
|
||||||
bindings = {
|
bindings = {
|
||||||
"Alt+RIGHT" = "add video-rotate 90";
|
"Alt+RIGHT" = "add video-rotate 90";
|
||||||
|
|||||||
@@ -47,6 +47,20 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
accounts.work-admin = {
|
||||||
|
user = "dslalewa";
|
||||||
|
password = lib.strings.fileContents <secrets/mail/dslalewa>;
|
||||||
|
address = "admin.alew.vglsprwi@hu-berlin.de";
|
||||||
|
imap = "mailbox.cms.hu-berlin.de";
|
||||||
|
smtp = "mailhost.cms.hu-berlin.de";
|
||||||
|
smtpSettings = smtp: "smtp://${smtp}";
|
||||||
|
folders = {
|
||||||
|
drafts = "Drafts";
|
||||||
|
sent = "Sent";
|
||||||
|
trash = "Trash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
accounts.work-fysi = rec {
|
accounts.work-fysi = rec {
|
||||||
user = "kieran@fysi.tech";
|
user = "kieran@fysi.tech";
|
||||||
address = user;
|
address = user;
|
||||||
@@ -131,6 +145,7 @@ in {
|
|||||||
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
|
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
|
||||||
application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput;
|
application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput;
|
||||||
application/pgp-keys; ${pkgs.gnupg}/bin/gpg --import '%s'; copiousoutput;
|
application/pgp-keys; ${pkgs.gnupg}/bin/gpg --import '%s'; copiousoutput;
|
||||||
|
application/vnd.openxmlformats*; ${pkgs.libreoffice}/bin/soffice '%s';
|
||||||
''
|
''
|
||||||
}:$mailcap_path
|
}:$mailcap_path
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
}: let
|
}: let
|
||||||
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
|
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
|
||||||
|
|
||||||
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata";
|
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.yt-dlp}/bin/yt-dlp -f ${ytdl-format} --add-metadata";
|
||||||
|
|
||||||
newsboat-home = "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
|
newsboat-home = "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
|
||||||
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";
|
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";
|
||||||
|
|||||||
@@ -23,15 +23,15 @@
|
|||||||
cslDirectory = pkgs.linkFarm "citation-styles" [
|
cslDirectory = pkgs.linkFarm "citation-styles" [
|
||||||
(zoteroStyle {
|
(zoteroStyle {
|
||||||
name = "chicago-author-date-de";
|
name = "chicago-author-date-de";
|
||||||
sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s";
|
sha256 = "sha256-ddMYk4A9DJQhx9ldkmF7PhwKuc7wUSr26uHHGAze9Ps=";
|
||||||
})
|
})
|
||||||
(zoteroStyle {
|
(zoteroStyle {
|
||||||
name = "din-1505-2";
|
name = "din-1505-2";
|
||||||
sha256 = "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq";
|
sha256 = "sha256-bXZbB850fek8J6wMVFL32ndI7F4wiKKr1qUC71ezreE=";
|
||||||
})
|
})
|
||||||
(zoteroStyle {
|
(zoteroStyle {
|
||||||
name = "apa";
|
name = "apa";
|
||||||
sha256 = "1878vxp0y0h05yzaghnd51n981623mxskw3lsdyzmffqhihvv111";
|
sha256 = "sha256-yq4fW6hQknycLjaj5fPbXLrQlGBp5myXiOSHBU90jEc=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -137,6 +137,7 @@ in {
|
|||||||
pdfpc # presenter console for pdf slides
|
pdfpc # presenter console for pdf slides
|
||||||
hc # print files as qr codes
|
hc # print files as qr codes
|
||||||
youtubeDL
|
youtubeDL
|
||||||
|
yt-dlp
|
||||||
espeak
|
espeak
|
||||||
bc # calculator
|
bc # calculator
|
||||||
pari # gp -- better calculator
|
pari # gp -- better calculator
|
||||||
@@ -161,7 +162,7 @@ in {
|
|||||||
scripts.vimv
|
scripts.vimv
|
||||||
scripts.swallow # window swallowing
|
scripts.swallow # window swallowing
|
||||||
scripts.literature-quote
|
scripts.literature-quote
|
||||||
scripts.nav # json navigation
|
jless # less(1) for json
|
||||||
scripts.notetags
|
scripts.notetags
|
||||||
scripts.booksplit
|
scripts.booksplit
|
||||||
scripts.dmenurandr
|
scripts.dmenurandr
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
niveum.telegramBots.transits = {
|
niveum.telegramBots.transits = {
|
||||||
enable = true;
|
enable = false;
|
||||||
time = "*:0/1";
|
time = "*:0/1";
|
||||||
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||||
chatIds = ["-1001796440545"];
|
chatIds = ["-1001796440545"];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
services.tor.enable = true;
|
services.tor.enable = true;
|
||||||
services.tor.torsocks.enable = true;
|
environment.systemPackages = [pkgs.tor];
|
||||||
}
|
}
|
||||||
|
|||||||
44
flake.lock
generated
44
flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648297722,
|
"lastModified": 1649676176,
|
||||||
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -22,11 +22,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647175256,
|
"lastModified": 1651007218,
|
||||||
"narHash": "sha256-7H+veXPM7IwdN1DoZqliwb9sghlN56koV5dnCu1kpsc=",
|
"narHash": "sha256-NkQAMtqW0PSJTbLHalyZtaqj0ai2TZMOedug9yDIcFw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a8d00f5c038cf7ec54e7dac9c57b171c1217f008",
|
"rev": "d14adb99f3fb562ec74ad18c032efc154b438034",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -62,11 +62,11 @@
|
|||||||
"menstruation-backend": {
|
"menstruation-backend": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1634573652,
|
"lastModified": 1649545504,
|
||||||
"narHash": "sha256-FIj8oCOJO+Wqxr2o5MMqIShvzMJud4iUq3o8y4NIRvw=",
|
"narHash": "sha256-TVm3246ML7gWPeGm+bdb+Qo8o/7nve7sQ2hBdCZm3z8=",
|
||||||
"owner": "kmein",
|
"owner": "kmein",
|
||||||
"repo": "menstruation.rs",
|
"repo": "menstruation.rs",
|
||||||
"rev": "dd405fe2acf32441e8ac56e488e689bb1c4bea82",
|
"rev": "d9f3c6d53542fd7c7ed191e37cf4e342d4a47bcb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -109,11 +109,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647992509,
|
"lastModified": 1651093906,
|
||||||
"narHash": "sha256-AG40Nt5OWz0LBs5p457emOuwLKOvTtcv/2fUdnEN3Ws=",
|
"narHash": "sha256-kHXSbv+Hc73eV0/JVJ5YsJGr08bA4vJ3/XZew5PgZg0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d2caa9377539e3b5ff1272ac3aa2d15f3081069f",
|
"rev": "feea25c58657fa81d16e0e51f80e1a02ef4cbd49",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -125,11 +125,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648337267,
|
"lastModified": 1651365995,
|
||||||
"narHash": "sha256-8DRg8UDvs63iaIaHEbWG7/lnD9ImQlMNsTZMY3PvFLc=",
|
"narHash": "sha256-fHKY8+nfPuVMDjSih8j/xoaTLpngW6b4QxJbICBLQmc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6de161729c81dc98e844793cc9c8fda29d5ef62a",
|
"rev": "05ced71757730406ca3eb3e58503f05334a6057d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -194,11 +194,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648314795,
|
"lastModified": 1650993582,
|
||||||
"narHash": "sha256-hGIXkAcGiJnVXnl8kigZpI3VFrLmAr2+yr85hi5JwP0=",
|
"narHash": "sha256-cKcdHzyy6Y4H9+KcnCgk/Tt1Zqd8lhfiXv4LClcETLc=",
|
||||||
"owner": "kmein",
|
"owner": "kmein",
|
||||||
"repo": "scripts",
|
"repo": "scripts",
|
||||||
"rev": "d1d525b92a34e55b1ad886807c284106e58716b2",
|
"rev": "c1aaeb4339e9c41057d362667554835a0f49850f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -210,11 +210,11 @@
|
|||||||
"stockholm": {
|
"stockholm": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648214990,
|
"lastModified": 1650040948,
|
||||||
"narHash": "sha256-rptATGq+jcpL+P+Cr6d3OajV6zYkbHPWlt3aQNZI2TY=",
|
"narHash": "sha256-/4Q2vnl53BQVYQFSZqF512CF6tzIyPHaDy4Yheof8G4=",
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"rev": "ae9c0b12710b5361d0d45510eb401eebfc1b3fb0",
|
"rev": "92d5eacd6d9e530c4d1ea0dec2652417b0fde78a",
|
||||||
"revCount": 10497,
|
"revCount": 10516,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://cgit.lassul.us/stockholm"
|
"url": "https://cgit.lassul.us/stockholm"
|
||||||
},
|
},
|
||||||
|
|||||||
11
flake.nix
11
flake.nix
@@ -108,11 +108,7 @@
|
|||||||
in
|
in
|
||||||
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
||||||
source = krops.lib.evalSource [(source name)];
|
source = krops.lib.evalSource [(source name)];
|
||||||
target = "root@${host}:${
|
target = "root@${host}:${toString sshPort}";
|
||||||
if host == "130.61.203.118"
|
|
||||||
then "22"
|
|
||||||
else toString sshPort
|
|
||||||
}";
|
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
apps.${system} = let
|
apps.${system} = let
|
||||||
@@ -123,10 +119,7 @@
|
|||||||
type = "app";
|
type = "app";
|
||||||
program = deployScriptFor {
|
program = deployScriptFor {
|
||||||
inherit name;
|
inherit name;
|
||||||
host =
|
host = "${name}.r";
|
||||||
if name == "tahina"
|
|
||||||
then "130.61.203.118"
|
|
||||||
else "${name}.r";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ rec {
|
|||||||
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||||
toum.id = "CBJQXFF-FMFGWFU-2J6FMPR-SRDTSGX-7NHOYOH-CQCABKF-KQJMRJC-SDE24Q4";
|
toum.id = "CBJQXFF-FMFGWFU-2J6FMPR-SRDTSGX-7NHOYOH-CQCABKF-KQJMRJC-SDE24Q4";
|
||||||
zaatar.id = "CGHO6LK-ZJBAXBD-UWI7AH3-BXYARE6-EUIM7PE-O2FUCOM-VCCRNCM-IG34WQ7";
|
zaatar.id = "CGHO6LK-ZJBAXBD-UWI7AH3-BXYARE6-EUIM7PE-O2FUCOM-VCCRNCM-IG34WQ7";
|
||||||
|
tahina.id = "UKJ2CBO-EQPKQL4-3QLRUSG-SSYR6AB-CCCUTKU-CLPYR7N-RUI5A6Y-JTL5NA4";
|
||||||
};
|
};
|
||||||
|
|
||||||
ignorePaths = [
|
ignorePaths = [
|
||||||
|
|||||||
350
lib/streams.nix
350
lib/streams.nix
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
|||||||
}: let
|
}: let
|
||||||
streams-tsv = pkgs.fetchurl {
|
streams-tsv = pkgs.fetchurl {
|
||||||
url = "https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv.m3u";
|
url = "https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv.m3u";
|
||||||
sha256 = "1cw1gmb16vwh6qfw0z3wjjfgn0zg2qplnddqzva5b0xx2g2appla";
|
sha256 = "sha256-gbHV37Yo+D3TYfDXZyb9IX8aRsguZ3qG2SYlY8NsTL0=";
|
||||||
postFetch = ''
|
postFetch = ''
|
||||||
${pkgs.gnused}/bin/sed '/#EXTM3U/d;/#EXTINF/s/.*,//g' $out | ${pkgs.coreutils}/bin/paste -d'\t' - - > $out.tmp
|
${pkgs.gnused}/bin/sed '/#EXTM3U/d;/#EXTINF/s/.*,//g' $out | ${pkgs.coreutils}/bin/paste -d'\t' - - > $out.tmp
|
||||||
mv $out.tmp $out
|
mv $out.tmp $out
|
||||||
|
|||||||
@@ -7,9 +7,8 @@
|
|||||||
stateLocation = "/var/lib/codimd/state.sqlite";
|
stateLocation = "/var/lib/codimd/state.sqlite";
|
||||||
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||||
domain = "pad.kmein.de";
|
domain = "pad.kmein.de";
|
||||||
|
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||||
in {
|
in {
|
||||||
imports = [<stockholm/krebs/3modules/permown.nix>];
|
|
||||||
|
|
||||||
services.nginx.virtualHosts.${domain} = {
|
services.nginx.virtualHosts.${domain} = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
@@ -49,11 +48,15 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
krebs.permown.${backupLocation} = {
|
systemd.tmpfiles.rules = [
|
||||||
owner = "codimd";
|
(tmpfilesConfig {
|
||||||
group = "codimd";
|
user = "codimd";
|
||||||
umask = "0002";
|
group = "codimd";
|
||||||
};
|
mode = "0755";
|
||||||
|
type = "d";
|
||||||
|
path = backupLocation;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
systemd.services.hedgedoc-backup = {
|
systemd.services.hedgedoc-backup = {
|
||||||
description = "Hedgedoc backup service";
|
description = "Hedgedoc backup service";
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ in {
|
|||||||
"tarot.kmein.de"
|
"tarot.kmein.de"
|
||||||
"cloud.xn--kiern-0qa.de"
|
"cloud.xn--kiern-0qa.de"
|
||||||
"grafana.kmein.r"
|
"grafana.kmein.r"
|
||||||
"names.kmein.r"
|
# "names.kmein.r"
|
||||||
"rrm.r"
|
"rrm.r"
|
||||||
"graph.r"
|
"graph.r"
|
||||||
];
|
];
|
||||||
@@ -238,16 +238,6 @@ in {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
job_name = "tahina";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [
|
|
||||||
"tahina.r:${toString config.services.prometheus.exporters.node.port}"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.prometheus.exporters.blackbox = {
|
services.prometheus.exporters.blackbox = {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
port = 5703;
|
port = 5703;
|
||||||
geogen-src = "${<scripts>}/onomastics";
|
onomap-src = "${<scripts>}/onomastics-ng";
|
||||||
geogen = pkgs.callPackage geogen-src {};
|
onomap = pkgs.haskellPackages.callCabal2nix "onomap" onomap-src {};
|
||||||
in {
|
in {
|
||||||
systemd.services.names = {
|
systemd.services.names = {
|
||||||
wants = ["network-online.target"];
|
wants = ["network-online.target"];
|
||||||
@@ -13,12 +13,11 @@ in {
|
|||||||
description = "Better clone of geogen.stoepel.net";
|
description = "Better clone of geogen.stoepel.net";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
|
ExecStart = "${onomap}/bin/onomap-web";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "15s";
|
||||||
};
|
};
|
||||||
script = ''
|
environment.PORT = toString port;
|
||||||
cd $(mktemp -d)
|
|
||||||
ln -s "${geogen-src}/wsgi.py" wsgi.py
|
|
||||||
${geogen.dependencyEnv}/bin/gunicorn wsgi:app -b :${toString port}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
|
|||||||
@@ -143,6 +143,11 @@ in {
|
|||||||
tags = ["nick_gitlab"];
|
tags = ["nick_gitlab"];
|
||||||
regex = "*";
|
regex = "*";
|
||||||
};
|
};
|
||||||
|
people = {
|
||||||
|
buffer = "irc.*.*";
|
||||||
|
tags = map (name: "nick_${name}") ["mod_p[matrix-fli"];
|
||||||
|
regex = "*";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraCommands = ''/matrix connect nibbana'';
|
extraCommands = ''/matrix connect nibbana'';
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
@@ -8,22 +7,62 @@
|
|||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
<niveum/configs/monitoring.nix>
|
<niveum/configs/battery.nix>
|
||||||
<niveum/configs/nix.nix>
|
|
||||||
<niveum/configs/save-space.nix>
|
|
||||||
<niveum/configs/spacetime.nix>
|
<niveum/configs/spacetime.nix>
|
||||||
<niveum/configs/sshd.nix>
|
|
||||||
<niveum/modules/retiolum.nix>
|
<niveum/modules/retiolum.nix>
|
||||||
|
<niveum/configs/sshd.nix>
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.nixPath = ["/var/src"];
|
nix.nixPath = ["/var/src"];
|
||||||
|
|
||||||
networking = {
|
console.keyMap = "de";
|
||||||
hostName = "tahina";
|
i18n.defaultLocale = "de_DE.UTF-8";
|
||||||
retiolum = retiolumAddresses.tahina;
|
services.xserver = {
|
||||||
|
layout = "de";
|
||||||
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "22.05";
|
users.users.xenos = {
|
||||||
|
name = "xenos";
|
||||||
|
password = "xenos";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = ["networkmanager"];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
desktopManager.pantheon.enable = true;
|
||||||
|
displayManager = {
|
||||||
|
lightdm = {
|
||||||
|
enable = true;
|
||||||
|
greeters.pantheon.enable = true;
|
||||||
|
};
|
||||||
|
autoLogin = {
|
||||||
|
enable = true;
|
||||||
|
user = "xenos";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot.plymouth.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.libreoffice
|
||||||
|
pkgs.gimp
|
||||||
|
pkgs.inkscape
|
||||||
|
pkgs.firefox
|
||||||
|
pkgs.audacity
|
||||||
|
pkgs.pidgin
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces = {
|
||||||
|
enp0s25.useDHCP = true;
|
||||||
|
wlo1.useDHCP = true;
|
||||||
|
};
|
||||||
|
retiolum = retiolumAddresses.tahina;
|
||||||
|
hostName = "tahina";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "21.11";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,27 +6,43 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot = {
|
||||||
boot.loader.grub.version = 2;
|
loader = {
|
||||||
boot.loader.grub.device = "/dev/sda";
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod"];
|
consoleMode = "max";
|
||||||
boot.initrd.kernelModules = [];
|
};
|
||||||
boot.kernelModules = ["kvm-amd"];
|
efi.canTouchEfiVariables = true;
|
||||||
boot.extraModulePackages = [];
|
};
|
||||||
|
initrd = {
|
||||||
fileSystems."/" = {
|
availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "firewire_ohci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci"];
|
||||||
device = "/dev/disk/by-uuid/d36baa44-9359-45d1-af5f-dbac52c6d75e";
|
kernelModules = ["dm-snapshot"];
|
||||||
fsType = "ext4";
|
luks.devices.luksmap.device = "/dev/disk/by-uuid/b7d66981-8cb7-4aad-a595-ee6574b312cf";
|
||||||
|
};
|
||||||
|
kernelModules = ["kvm-intel"];
|
||||||
|
extraModulePackages = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-uuid/e9a8bd34-61eb-4317-888d-bd7d6248a906";
|
||||||
|
fsType = "xfs";
|
||||||
|
};
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/9B2F-31E1";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault false;
|
swapDevices = [
|
||||||
networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
{
|
||||||
|
device = "/swapfile";
|
||||||
|
size = 2048;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,16 @@ in {
|
|||||||
108283 # Digital Classicist
|
108283 # Digital Classicist
|
||||||
109211 # Altlitauisch
|
109211 # Altlitauisch
|
||||||
109185 # Etymologie
|
109185 # Etymologie
|
||||||
|
|
||||||
|
# SS 2022
|
||||||
|
112606 # Avestisch
|
||||||
|
111761 # Griechische Wissenschaftsliteratur
|
||||||
|
111515 # H. Furens
|
||||||
|
110914 # Apostelgeschichte
|
||||||
|
112225 # Gr. Paläographie
|
||||||
|
113275 # ALEW
|
||||||
|
112783 # Akzent und Silbenstruktur
|
||||||
|
113493 # Papyrologie
|
||||||
];
|
];
|
||||||
download_submissions = true;
|
download_submissions = true;
|
||||||
download_descriptions = true;
|
download_descriptions = true;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
firewall = (import <niveum/lib>).firewall lib;
|
firewall = (import <niveum/lib>).firewall lib;
|
||||||
|
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||||
|
|
||||||
streams = import <niveum/lib/streams.nix> {
|
streams = import <niveum/lib/streams.nix> {
|
||||||
di-fm-key = lib.strings.fileContents <secrets/di.fm/key>;
|
di-fm-key = lib.strings.fileContents <secrets/di.fm/key>;
|
||||||
@@ -71,13 +72,31 @@ in {
|
|||||||
extraStopCommands = firewall.removeRules rules;
|
extraStopCommands = firewall.removeRules rules;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.mpd-playlists = let
|
systemd.tmpfiles.rules = let
|
||||||
playlistFile = pkgs.writeText "radio.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
||||||
in ''
|
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
||||||
rm -rf /var/lib/mpd/playlists
|
makePlaylist = name: streams: pkgs.writeText "${name}.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
||||||
install -d /var/lib/mpd/playlists
|
in
|
||||||
ln -sfn "${toString playlistFile}" "/var/lib/mpd/playlists/radio.m3u"
|
map (tag:
|
||||||
'';
|
tmpfilesConfig {
|
||||||
|
type = "L+";
|
||||||
|
path = "/var/lib/mpd/playlists/${tag}.m3u";
|
||||||
|
mode = "0644";
|
||||||
|
user = "mpd";
|
||||||
|
group = "mpd";
|
||||||
|
argument = makePlaylist tag (tagStreams tag);
|
||||||
|
})
|
||||||
|
tags
|
||||||
|
++ [
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "L+";
|
||||||
|
mode = "0644";
|
||||||
|
user = "mpd";
|
||||||
|
group = "mpd";
|
||||||
|
path = "/var/lib/mpd/playlist/all.m3u";
|
||||||
|
argument = makePlaylist "all" streams;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
services.tuna = {
|
services.tuna = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -87,33 +106,15 @@ in {
|
|||||||
logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300",
|
logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300",
|
||||||
stream,
|
stream,
|
||||||
station,
|
station,
|
||||||
|
...
|
||||||
}: {inherit id desc logo stream station;})
|
}: {inherit id desc logo stream station;})
|
||||||
streams;
|
streams;
|
||||||
webPort = 8080;
|
webPort = 7044;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.tuna-stations = let
|
services.ympd = {
|
||||||
stations = lib.lists.imap0 (id: {
|
enable = true;
|
||||||
desc ? "",
|
mpd.port = config.services.mpd.network.port;
|
||||||
logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300",
|
|
||||||
stream,
|
|
||||||
station,
|
|
||||||
}: {inherit id desc logo stream station;})
|
|
||||||
streams;
|
|
||||||
stationsJson = (pkgs.formats.json {}).generate "stations.json" stations;
|
|
||||||
in {
|
|
||||||
enable = false;
|
|
||||||
wantedBy = ["tuna.service"];
|
|
||||||
startAt = "hourly";
|
|
||||||
script = ''
|
|
||||||
mkdir -p /etc/tuna
|
|
||||||
antenne_asb_url=$(
|
|
||||||
${pkgs.curl}/bin/curl -sS 'https://www.caster.fm/widgets/em_player.php?jsinit=true&uid=529295&t=blue&c=' \
|
|
||||||
| grep streamUrl \
|
|
||||||
| sed ${lib.escapeShellArg "s/^.*'\\([^']*\\)'.*/\\1/"}
|
|
||||||
)
|
|
||||||
${pkgs.jq}/bin/jq "map(if .station == \"Antenne ASB\" then .stream |= \"$antenne_asb_url\" else . end)" < ${stationsJson} > /etc/tuna/stations.json
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
@@ -125,7 +126,7 @@ in {
|
|||||||
virtualHosts."radio.kmein.r" = {
|
virtualHosts."radio.kmein.r" = {
|
||||||
basicAuth.dj = password;
|
basicAuth.dj = password;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${toString config.services.tuna.webPort}";
|
proxyPass = "http://127.0.0.1:${config.services.ympd.webPort}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user