1
0
mirror of https://github.com/kmein/niveum synced 2026-03-21 04:11:07 +01:00

25 Commits

Author SHA1 Message Date
d06d0a9de4 WIP: mympd 2022-04-15 01:16:50 +02:00
d4e82500ae feat(mpv): limit resolution 2022-04-14 13:40:11 +02:00
6aa9be6f70 feat: more fonts 2022-04-13 09:01:23 +02:00
4e362678ca feat(astrology): pause bot 2022-04-13 09:01:23 +02:00
a2081dece4 feat(weechat): block people 2022-04-11 23:02:02 +02:00
98cf188a17 feat: use more tmpfiles.d 2022-04-10 19:38:47 +02:00
4932c7c08a chore(update) 2022-04-10 09:13:34 +02:00
c8a6991f09 fix(menstruation): update to pinning version 2022-04-10 00:36:07 +02:00
5d3c9a67ab fix(monitoring): remove tahina 2022-04-04 18:35:32 +02:00
github-actions[bot]
659a888c3d flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/a8d00f5c038cf7ec54e7dac9c57b171c1217f008' (2022-03-13)
  → 'github:nix-community/home-manager/0bdbdea2e26c984b096f4f7d10e3c88536a980b0' (2022-04-01)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/d2caa9377539e3b5ff1272ac3aa2d15f3081069f' (2022-03-22)
  → 'github:NixOS/nixpkgs/6f88260faaaa3cda8f4e478be72be6c0861c47ad' (2022-04-01)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/6de161729c81dc98e844793cc9c8fda29d5ef62a' (2022-03-26)
  → 'github:NixOS/nixpkgs/21299f3dd3ff475f19bc8933f30ebb6a135799f1' (2022-04-02)
• Updated input 'scripts':
    'github:kmein/scripts/d1d525b92a34e55b1ad886807c284106e58716b2' (2022-03-26)
  → 'github:kmein/scripts/f5df67a2416d8f05a7dbfea269c44668854c7887' (2022-03-27)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=ae9c0b12710b5361d0d45510eb401eebfc1b3fb0' (2022-03-25)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=b9e0a7ec71e0318a992ff2b275a6aaee3cef63bd' (2022-03-28)
2022-04-03 00:47:09 +00:00
26908b03a3 chore(tahina): clean 2022-03-30 18:29:16 +02:00
feccea5234 feat(streams): add soma playlist 2022-03-30 18:29:04 +02:00
8ffb0bd245 feat: jless 2022-03-30 09:17:58 +02:00
c1b777b689 feat(tor): enable 2022-03-29 20:13:29 +02:00
e85a8f7634 feat(mpd): tag stations 2022-03-29 20:13:29 +02:00
25bc6f573c chore(tahina): clean 2022-03-29 09:54:56 +02:00
4b5915354b fix(nextcloud): start with gnome-keyring 2022-03-29 09:54:37 +02:00
43ab6b3210 feat(tahina): init as guest laptop 2022-03-29 01:07:01 +02:00
e08eb0e970 feat(tahina): init 2022-03-28 20:47:55 +02:00
012d78cc0e feat(ssh): add tahina 2022-03-28 20:47:55 +02:00
github-actions[bot]
62f52922b8 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07)
  → 'github:numtide/flake-utils/0f8662f1319ad6abf89b3380dd2722369fc51ade' (2022-03-26)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2c66a7a6e036971c4847cca424125f55b9eb0b0b' (2022-03-17)
  → 'github:NixOS/nixpkgs/d2caa9377539e3b5ff1272ac3aa2d15f3081069f' (2022-03-22)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/b8f8b90b90ac713eb7f5cc7eb2100141ee29751d' (2022-03-20)
  → 'github:NixOS/nixpkgs/6de161729c81dc98e844793cc9c8fda29d5ef62a' (2022-03-26)
• Updated input 'scripts':
    'github:kmein/scripts/d34a8161ba11135a45d3141dc9af482db945d63c' (2021-12-13)
  → 'github:kmein/scripts/d1d525b92a34e55b1ad886807c284106e58716b2' (2022-03-26)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=b1068cadc4458d91889b7ede847829af33d2b145' (2022-03-15)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=ae9c0b12710b5361d0d45510eb401eebfc1b3fb0' (2022-03-25)
2022-03-27 00:46:44 +00:00
28d359c73b fix(kabsa): dont fail if sdcard not present 2022-03-25 17:06:09 +01:00
8830147359 feat: git-absorb 2022-03-23 19:07:20 +01:00
e9adccacd9 feat: cdt, vit 2022-03-23 19:07:20 +01:00
github-actions[bot]
588ec3d180 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/2860d7e3bb350f18f7477858f3513f9798896831' (2022-02-04)
  → 'github:nix-community/home-manager/a8d00f5c038cf7ec54e7dac9c57b171c1217f008' (2022-03-13)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/bacbfd713b4781a4a82c1f390f8fe21ae3b8b95b' (2022-03-10)
  → 'github:NixOS/nixpkgs/2c66a7a6e036971c4847cca424125f55b9eb0b0b' (2022-03-17)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/b783c48432cdfc35224a39bd95666daa62fef126' (2022-03-13)
  → 'github:NixOS/nixpkgs/b8f8b90b90ac713eb7f5cc7eb2100141ee29751d' (2022-03-20)
• Updated input 'retiolum':
    'github:krebs/retiolum/5858b524a77cff53f1fbe21e0af3189e52a9654d' (2022-03-13)
  → 'github:krebs/retiolum/de6d7dc9bd671e65f2ee3004b6807625e7553e84' (2022-03-16)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=2dc05dbafbd5490be6a9754a55679a6576efbad1' (2022-03-11)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=b1068cadc4458d91889b7ede847829af33d2b145' (2022-03-15)
2022-03-20 08:11:31 +01:00
23 changed files with 650 additions and 130 deletions

1
ci.nix
View File

@@ -53,6 +53,7 @@
zaatar = ensureFiles (["moodle.token" "telegram/moodle-dl.token" "mpd-web.key"] ++ basic); zaatar = ensureFiles (["moodle.token" "telegram/moodle-dl.token" "mpd-web.key"] ++ basic);
kabsa = ensureFiles basic; kabsa = ensureFiles basic;
manakish = ensureFiles basic; manakish = ensureFiles basic;
tahina = ensureFiles basic;
makanek = ensureFiles ([ makanek = ensureFiles ([
"irc/retiolum" "irc/retiolum"
"irc/hackint" "irc/hackint"

View File

@@ -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,13 +14,35 @@
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;

View File

@@ -111,6 +111,10 @@ in {
take = pkgs.writers.writeDash "take" '' take = pkgs.writers.writeDash "take" ''
mkdir "$1" && cd "$1" mkdir "$1" && cd "$1"
''; '';
cdt = pkgs.writers.writeDash "cdt" ''
cd "$(mktemp -d)"
pwd
'';
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}"; swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
in { in {
"ß" = "${pkgs.utillinux}/bin/setsid"; "ß" = "${pkgs.utillinux}/bin/setsid";
@@ -131,6 +135,8 @@ in {
rm = "rm --interactive"; rm = "rm --interactive";
s = "${pkgs.systemd}/bin/systemctl"; s = "${pkgs.systemd}/bin/systemctl";
take = "source ${take}"; take = "source ${take}";
cdt = "source ${cdt}";
vit = "$EDITOR $(mktemp)";
tmux = "${pkgs.tmux}/bin/tmux -2"; tmux = "${pkgs.tmux}/bin/tmux -2";
sxiv = swallow "${pkgs.sxiv}/bin/sxiv"; sxiv = swallow "${pkgs.sxiv}/bin/sxiv";
zathura = swallow "${pkgs.zathura}/bin/zathura"; zathura = swallow "${pkgs.zathura}/bin/zathura";
@@ -256,5 +262,6 @@ in {
./vscode.nix ./vscode.nix
./watson.nix ./watson.nix
./zsh.nix ./zsh.nix
./tor.nix
]; ];
} }

View File

@@ -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];
}; };
}; };
} }

View File

@@ -13,6 +13,7 @@ in {
pkgs.gitAndTools.gh pkgs.gitAndTools.gh
pkgs.gitAndTools.git-extras pkgs.gitAndTools.git-extras
pkgs.gitAndTools.git-trim pkgs.gitAndTools.git-trim
pkgs.gitAndTools.git-absorb
pkgs.gitstats pkgs.gitstats
pkgs.patch pkgs.patch
pkgs.patchutils pkgs.patchutils

View File

@@ -18,6 +18,7 @@ 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";
}; };

View File

@@ -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=";
}) })
]; ];
@@ -161,7 +161,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

View File

@@ -29,6 +29,11 @@ in {
user = "root"; user = "root";
port = sshPort; port = sshPort;
}; };
tahina = {
hostname = "tahina.r";
user = "root";
port = sshPort;
};
manakish = { manakish = {
hostname = "manakish.r"; hostname = "manakish.r";
user = "kfm"; user = "kfm";

View File

@@ -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"];

View File

@@ -1,4 +1,4 @@
{ {pkgs, ...}: {
services.tor.enable = true; services.tor.enable = true;
services.tor.torsocks.enable = true; environment.systemPackages = [pkgs.tor];
} }

50
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": { "nodes": {
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1644229661, "lastModified": 1648297722,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -22,11 +22,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1643933536, "lastModified": 1648834319,
"narHash": "sha256-yRmsWAG4DnLxLIUtlaZsl0kH7rN5xSoyNRlf0YZrcH4=", "narHash": "sha256-i5Aj4Aw64D/A0X6XW5LxSS4XBnYj7gMz+kN4dpsbdk8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2860d7e3bb350f18f7477858f3513f9798896831", "rev": "0bdbdea2e26c984b096f4f7d10e3c88536a980b0",
"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": 1646933238, "lastModified": 1649490789,
"narHash": "sha256-RZJnLN0o4B35eTnUc2tEAD12X5TNeeJhhvH3Fd6Pmdo=", "narHash": "sha256-YrhVxwoofZSx/wLZ4GYET//8vS+uqWX572zvdmP/Etg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bacbfd713b4781a4a82c1f390f8fe21ae3b8b95b", "rev": "c86185d20d708013caf97a6adaa8dc6d72313c75",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -125,11 +125,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1647130139, "lastModified": 1649541735,
"narHash": "sha256-m0yeKJJPub9Zv6N7KX/a36A3ocidWUnuyWVdLfNVjj8=", "narHash": "sha256-JdOywA2jcdGCxNgu0dJA7ZNtaV7sS0HwuZg9YaXd94c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b783c48432cdfc35224a39bd95666daa62fef126", "rev": "c2b6e029cd1efa0efd37daab89264ef040ae5669",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -158,11 +158,11 @@
"retiolum": { "retiolum": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1647188627, "lastModified": 1647444524,
"narHash": "sha256-xot7F7bKWnJAhzSXwiDopas1b66/9WUIabRJWreYkSQ=", "narHash": "sha256-N4T1UXLkYJMQqk65LkTDpW70ujXXeZ9xe5k+LOpznAI=",
"owner": "krebs", "owner": "krebs",
"repo": "retiolum", "repo": "retiolum",
"rev": "5858b524a77cff53f1fbe21e0af3189e52a9654d", "rev": "de6d7dc9bd671e65f2ee3004b6807625e7553e84",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -194,11 +194,11 @@
"scripts": { "scripts": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1639436812, "lastModified": 1648400983,
"narHash": "sha256-6CajvfDo7t4ANgjc7DxqH7lI3WRE4MK8q3mBKAjk80k=", "narHash": "sha256-I9ADWgUN1orbnXPBW4kulHpv8wkx6C8zsQcg9wphpPg=",
"owner": "kmein", "owner": "kmein",
"repo": "scripts", "repo": "scripts",
"rev": "d34a8161ba11135a45d3141dc9af482db945d63c", "rev": "f5df67a2416d8f05a7dbfea269c44668854c7887",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -210,11 +210,11 @@
"stockholm": { "stockholm": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1647025390, "lastModified": 1649089964,
"narHash": "sha256-98w91+xsqyus0uyxxQQ5roWx+tEyaAogiVyWgBsVVig=", "narHash": "sha256-ybuVI8rnpMyBUoyoIXJ1e3QBMBIOoEgKTiFzIPfzy8A=",
"ref": "master", "ref": "master",
"rev": "2dc05dbafbd5490be6a9754a55679a6576efbad1", "rev": "b3833baee96d7bce2c54295110b40c646468a1ff",
"revCount": 10463, "revCount": 10500,
"type": "git", "type": "git",
"url": "https://cgit.lassul.us/stockholm" "url": "https://cgit.lassul.us/stockholm"
}, },

View File

@@ -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 = [

View File

@@ -18,4 +18,9 @@
ipv4 = "10.243.2.85"; ipv4 = "10.243.2.85";
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27"; ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
}; };
tahina = {
ipv4 = "10.243.2.74";
ipv6 = "42:0:3c46:2923:1c90:872:edd6:306";
};
} }

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -36,6 +36,7 @@
"/mnt/sd-card" = { "/mnt/sd-card" = {
device = "/dev/disk/by-id/mmc-SD32G_0xda0aa352-part1"; device = "/dev/disk/by-id/mmc-SD32G_0xda0aa352-part1";
fsType = "vfat"; fsType = "vfat";
options = ["nofail"];
}; };
}; };

View File

@@ -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";

View File

@@ -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'';

View File

@@ -0,0 +1,68 @@
{
config,
pkgs,
...
}: let
inherit (import <niveum/lib>) retiolumAddresses;
in {
imports = [
./hardware-configuration.nix
<niveum/configs/battery.nix>
<niveum/configs/spacetime.nix>
<niveum/modules/retiolum.nix>
<niveum/configs/sshd.nix>
];
nix.nixPath = ["/var/src"];
console.keyMap = "de";
i18n.defaultLocale = "de_DE.UTF-8";
services.xserver = {
layout = "de";
libinput.enable = true;
};
users.users.xenos = {
name = "xenos";
password = "xenos";
isNormalUser = true;
extraGroups = ["networkmanager"];
};
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";
}

View File

@@ -0,0 +1,48 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
loader = {
systemd-boot = {
enable = true;
consoleMode = "max";
};
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "firewire_ohci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci"];
kernelModules = ["dm-snapshot"];
luks.devices.luksmap.device = "/dev/disk/by-uuid/b7d66981-8cb7-4aad-a595-ee6574b312cf";
};
kernelModules = ["kvm-intel"];
extraModulePackages = [];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/e9a8bd34-61eb-4317-888d-bd7d6248a906";
fsType = "xfs";
};
"/boot" = {
device = "/dev/disk/by-uuid/9B2F-31E1";
fsType = "vfat";
};
};
swapDevices = [
{
device = "/swapfile";
size = 2048;
}
];
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -15,6 +15,7 @@ in {
./pulseaudio.nix ./pulseaudio.nix
./home-assistant.nix ./home-assistant.nix
./tuna.nix ./tuna.nix
./mympd.nix
./grocy.nix ./grocy.nix
./spotifyd.nix ./spotifyd.nix
<home-manager/nixos> <home-manager/nixos>

57
systems/zaatar/mympd.nix Normal file
View File

@@ -0,0 +1,57 @@
{pkgs, ...}: let
inherit (import <niveum/lib>) tmpfilesConfig;
in {
systemd.tmpfiles.rules = [
(tmpfilesConfig {
type = "d";
mode = "0755";
user = "mympd";
group = "mympd";
path = "/var/lib/mympd";
})
(tmpfilesConfig {
type = "d";
mode = "0755";
user = "mympd";
group = "mympd";
age = "1d";
path = "/var/cache/mympd";
})
(tmpfilesConfig {
type = "L+";
mode = "0644";
user = "mympd";
group = "mympd";
path = "/var/lib/mympd/config/http_port";
argument = pkgs.writeText "port" "8764";
})
(tmpfilesConfig {
type = "L+";
mode = "0644";
user = "mympd";
group = "mympd";
path = "/var/lib/mympd/config/ssl";
argument = pkgs.writeText "ssl" "false";
})
];
users.users.mympd = {
isSystemUser = true;
group = "mympd";
};
users.groups.mympd = {};
systemd.services.mympd = {
wantedBy = ["multi-user.target"];
after = ["mpd.service"];
script = "${pkgs.mympd}/bin/mympd";
environment = {
MYMPD_HTTP_PORT = "8764";
};
serviceConfig = {
Restart = "always";
User = "mympd";
Group = "mympd";
};
};
}

View File

@@ -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;
}; };
}; };