1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 19:41:08 +01:00

1 Commits

Author SHA1 Message Date
f7fe1fe8a8 flake: do not use flake-utils 2025-12-13 14:01:31 +01:00
48 changed files with 1815 additions and 461 deletions

8
configs/0ad.nix Normal file
View File

@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.zeroad ];
networking.firewall = {
allowedTCPPorts = [ 20595 ];
allowedUDPPorts = [ 20595 ];
};
}

View File

@@ -4,7 +4,7 @@
lib, lib,
... ...
}: let }: let
darwin = lib.strings.hasSuffix "-darwin" pkgs.stdenv.hostPlatform.system; darwin = lib.strings.hasSuffix "-darwin" pkgs.system;
in { in {
environment.systemPackages = environment.systemPackages =
[ [

View File

@@ -17,15 +17,11 @@ in {
./hesychius.nix ./hesychius.nix
./smyth.nix ./smyth.nix
./nachtischsatan.nix ./nachtischsatan.nix
# ./tlg-wotd.nix TODO reenable ./tlg-wotd.nix
./celan.nix ./celan.nix
./nietzsche.nix ./nietzsche.nix
]; ];
age.secrets = {
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
};
systemd.tmpfiles.rules = map (path: systemd.tmpfiles.rules = map (path:
tmpfilesConfig { tmpfilesConfig {
type = "d"; type = "d";

View File

@@ -3,14 +3,11 @@
lib, lib,
config, config,
niveumPackages, niveumPackages,
unstablePackages,
... ...
}: let }: let
mastodonEndpoint = "https://social.krebsco.de"; mastodonEndpoint = "https://social.krebsco.de";
in { in {
systemd.services.bot-tlg-wotd = { systemd.services.bot-tlg-wotd = {
# TODO reenable
# once https://github.com/NixOS/nixpkgs/pull/462893 is in stable NixOS
enable = true; enable = true;
wants = ["network-online.target"]; wants = ["network-online.target"];
startAt = "9:30"; startAt = "9:30";
@@ -45,8 +42,9 @@ in {
#ancientgreek #classics #wotd #wordoftheday #ancientgreek #classics #wotd #wordoftheday
transliteration=$(${pkgs.writers.writePython3 "translit.py" { transliteration=$(${pkgs.writers.makePythonWriter pkgs.python311 pkgs.python311Packages pkgs.python3Packages "translit.py" {
libraries = py: [ py.cltk ]; # revert to pkgs.writers.writePython3 once https://github.com/NixOS/nixpkgs/pull/353367 is merged
libraries = [ pkgs.python3Packages.cltk ];
} '' } ''
import sys import sys
from cltk.phonology.grc.transcription import Transcriber from cltk.phonology.grc.transcription import Transcriber
@@ -151,6 +149,7 @@ in {
}; };
age.secrets = { age.secrets = {
telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age; mastodon-token-tlgwotd.file = ../../secrets/mastodon-token-tlgwotd.age;
}; };

View File

@@ -135,6 +135,7 @@ in
}; };
}; };
} }
{ programs.command-not-found.enable = true; }
{ {
programs.gnupg = { programs.gnupg = {
agent = { agent = {

View File

@@ -1,13 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.zeroad
pkgs.mari0
pkgs.luanti # fka minetest
];
networking.firewall = {
# for 0ad multiplayer
allowedTCPPorts = [ 20595 ];
allowedUDPPorts = [ 20595 ];
};
}

View File

@@ -17,6 +17,7 @@ in {
pkgs.gitstats pkgs.gitstats
pkgs.patch pkgs.patch
pkgs.patchutils pkgs.patchutils
inputs.self.packages.${pkgs.system}.git-preview
]; ];
environment.shellAliases = { environment.shellAliases = {

View File

@@ -37,7 +37,7 @@ in {
}; };
scripts = [ scripts = [
pkgs.mpvScripts.quality-menu pkgs.mpvScripts.quality-menu
pkgs.mpvScripts.visualizer niveumPackages.mpv-visualizer
]; ];
}; };
}; };

View File

@@ -52,8 +52,8 @@
pkgs.nodePackages.typescript-language-server pkgs.nodePackages.typescript-language-server
pkgs.lua-language-server pkgs.lua-language-server
pkgs.nodePackages.vscode-langservers-extracted pkgs.nodePackages.vscode-langservers-extracted
pkgs.lemminx # XML LSP pkgs.lemminx
pkgs.jq-lsp niveumPackages.jq-lsp
pkgs.dhall-lsp-server pkgs.dhall-lsp-server
]; ];
} }

View File

@@ -0,0 +1,46 @@
{ pkgs, niveumPackages, config, ... }: {
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
environment.shellAliases.vi = "nvim";
environment.shellAliases.vim = "nvim";
environment.shellAliases.view = "nvim -R";
home-manager.users.me = {
editorconfig = {
enable = true;
settings = {
"*" = {
charset = "utf-8";
end_of_line = "lf";
trim_trailing_whitespace = true;
insert_final_newline = true;
indent_style = "space";
indent_size = 2;
};
"*.py" = { indent_size = 4; };
Makefile = { indent_style = "tab"; };
"*.md" = { trim_trailing_whitespace = false; };
};
};
};
environment.systemPackages = [
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
(niveumPackages.vim.override {
stylixColors = config.lib.stylix.colors;
# colorscheme = "base16-gruvbox-dark-medium";
})
# language servers
pkgs.pyright
pkgs.haskellPackages.haskell-language-server
pkgs.texlab
pkgs.nil
pkgs.rust-analyzer
pkgs.nodePackages.typescript-language-server
pkgs.lua-language-server
pkgs.nodePackages.vscode-langservers-extracted
pkgs.lemminx
niveumPackages.jq-lsp
pkgs.dhall-lsp-server
];
}

View File

@@ -153,12 +153,15 @@ in {
niveumPackages.mpv-iptv niveumPackages.mpv-iptv
niveumPackages.devanagari niveumPackages.devanagari
niveumPackages.betacode # ancient greek betacode to unicode converter niveumPackages.betacode # ancient greek betacode to unicode converter
pkgs.jq-lsp niveumPackages.meteo
niveumPackages.jq-lsp
niveumPackages.swallow # window swallowing niveumPackages.swallow # window swallowing
niveumPackages.literature-quote niveumPackages.literature-quote
niveumPackages.booksplit niveumPackages.booksplit
niveumPackages.dmenu-randr niveumPackages.dmenu-randr
niveumPackages.dmenu-bluetooth
niveumPackages.manual-sort niveumPackages.manual-sort
niveumPackages.dns-sledgehammer
niveumPackages.wttr niveumPackages.wttr
niveumPackages.unicodmenu niveumPackages.unicodmenu
niveumPackages.emailmenu niveumPackages.emailmenu
@@ -206,7 +209,11 @@ in {
ncspot ncspot
playerctl playerctl
nix-index
niveumPackages.nix-index-update
#krebs #krebs
niveumPackages.dic
pkgs.nur.repos.mic92.ircsink pkgs.nur.repos.mic92.ircsink
(haskellPackages.ghcWithHoogle (hs: [ (haskellPackages.ghcWithHoogle (hs: [

446
flake.lock generated
View File

@@ -53,6 +53,43 @@
"type": "github" "type": "github"
} }
}, },
"almanac": {
"flake": false,
"locked": {
"lastModified": 1640984494,
"narHash": "sha256-xxbrGJtRK6wzOR09vGPqoUvnY5f0h6hn6Uecy331Zhw=",
"owner": "lfborjas",
"repo": "almanac",
"rev": "72931bd9accefccd2df59d9d64a6cbb91f2d5f17",
"type": "github"
},
"original": {
"owner": "lfborjas",
"repo": "almanac",
"type": "github"
}
},
"astro-calendar": {
"inputs": {
"almanac": "almanac",
"nixpkgs": "nixpkgs_4",
"swiss-ephemeris": "swiss-ephemeris",
"swisseph": "swisseph"
},
"locked": {
"lastModified": 1759827606,
"narHash": "sha256-JunaXkzalZtQYjGxJrMGYDEgOwullKLnpAFj/SaJaKI=",
"owner": "kmein",
"repo": "astro-calendar",
"rev": "f1579f087ee49e4c6a3bcf130b20738123f8616a",
"type": "github"
},
"original": {
"owner": "kmein",
"repo": "astro-calendar",
"type": "github"
}
},
"autorenkalender": { "autorenkalender": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -308,7 +345,7 @@
}, },
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_6",
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
@@ -467,20 +504,36 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "flake-utils", "owner": "numtide",
"type": "indirect" "repo": "flake-utils",
"type": "github"
} }
}, },
"flake-utils_4": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_5" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1701680307,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"locked": {
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -611,6 +664,25 @@
"type": "github" "type": "github"
} }
}, },
"ical-ephemeris": {
"inputs": {
"astro-calendar": "astro-calendar",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1761309163,
"narHash": "sha256-x5BdTIoG/ANMhJJw+IMWLbdXJ7vTh3dou8zN4LCnTeU=",
"ref": "refs/heads/master",
"rev": "949682c2ec4da9a23c414a8ca8c039652cbbef0c",
"revCount": 22,
"type": "git",
"url": "ssh://gitea@code.kmein.de:22022/kfm/ical-ephemeris"
},
"original": {
"type": "git",
"url": "ssh://gitea@code.kmein.de:22022/kfm/ical-ephemeris"
}
},
"kellia-dictionary": { "kellia-dictionary": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -678,14 +750,15 @@
"menstruation-backend_2": { "menstruation-backend_2": {
"inputs": { "inputs": {
"fenix": "fenix", "fenix": "fenix",
"nixpkgs": "nixpkgs_5" "flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1765657254, "lastModified": 1759437689,
"narHash": "sha256-9kZdra5Bx3sfkcZW0eRULsWwloigv7+xQfr+JL0kX6s=", "narHash": "sha256-L3gLXmW+9oE+5YosaOSIDtNlXmXxnY8RXDNj2J8uIRs=",
"owner": "kmein", "owner": "kmein",
"repo": "menstruation.rs", "repo": "menstruation.rs",
"rev": "cc7278fc187f1d4b1f802fbde926a6195a7a0d47", "rev": "7ae9a7affffd20eafe0158b9b7ca50cc8a77f2af",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -728,6 +801,9 @@
}, },
"menstruation-telegram_2": { "menstruation-telegram_2": {
"inputs": { "inputs": {
"flake-utils": [
"flake-utils"
],
"menstruation-backend": [ "menstruation-backend": [
"menstruation-backend" "menstruation-backend"
], ],
@@ -736,11 +812,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1765657432, "lastModified": 1677075205,
"narHash": "sha256-gzoBH783lFsQocSwjp2d6v778sWcLnKXIQPnkVTx+qU=", "narHash": "sha256-2+xuAhsS3y2qB0ObVPCHXrmnTsIZ8uI5HFI4+Ash8PY=",
"owner": "kmein", "owner": "kmein",
"repo": "menstruation-telegram", "repo": "menstruation-telegram",
"rev": "63ff6b28e0609f470b63813b37320188fff7e95d", "rev": "f7ddb6d9610aacb50ec66a3ce1bdc49fe4664a49",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -813,23 +889,26 @@
"type": "github" "type": "github"
} }
}, },
"nix-index-database": { "nix-formatter-pack_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nix-on-droid",
"nixpkgs" "nixpkgs"
] ],
"nmd": "nmd_3",
"nmt": "nmt_2"
}, },
"locked": { "locked": {
"lastModified": 1765267181, "lastModified": 1666720474,
"narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=", "narHash": "sha256-iWojjDS1D19zpeZXbBdjWb9MiKmVVFQCqtJmtTXgPx8=",
"owner": "nix-community", "owner": "Gerschtli",
"repo": "nix-index-database", "repo": "nix-formatter-pack",
"rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f", "rev": "14876cc8fe94a3d329964ecb073b4c988c7b61f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "Gerschtli",
"repo": "nix-index-database", "repo": "nix-formatter-pack",
"type": "github" "type": "github"
} }
}, },
@@ -864,6 +943,33 @@
"type": "github" "type": "github"
} }
}, },
"nix-on-droid_2": {
"inputs": {
"home-manager": [
"home-manager"
],
"nix-formatter-pack": "nix-formatter-pack_2",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap_2",
"nmd": "nmd_4"
},
"locked": {
"lastModified": 1688144254,
"narHash": "sha256-8KL1l/7eP2Zm1aJjdVaSOk0W5kTnJo9kcgW03gqWuiI=",
"owner": "t184256",
"repo": "nix-on-droid",
"rev": "2301e01d48c90b60751005317de7a84a51a87eb6",
"type": "github"
},
"original": {
"owner": "t184256",
"ref": "release-23.05",
"repo": "nix-on-droid",
"type": "github"
}
},
"nix-writers": { "nix-writers": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -904,7 +1010,7 @@
}, },
"nixinate_2": { "nixinate_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1742737607, "lastModified": 1742737607,
@@ -952,6 +1058,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-for-bootstrap_2": {
"locked": {
"lastModified": 1686921029,
"narHash": "sha256-J1bX9plPCFhTSh6E3TWn9XSxggBh/zDD4xigyaIQBy8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04",
"type": "github"
}
},
"nixpkgs-old": { "nixpkgs-old": {
"locked": { "locked": {
"lastModified": 1682600000, "lastModified": 1682600000,
@@ -1017,6 +1139,22 @@
} }
}, },
"nixpkgs_10": { "nixpkgs_10": {
"locked": {
"lastModified": 1765186076,
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_11": {
"locked": { "locked": {
"lastModified": 1760878510, "lastModified": 1760878510,
"narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=",
@@ -1032,7 +1170,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_11": { "nixpkgs_12": {
"locked": { "locked": {
"lastModified": 1659446231, "lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
@@ -1048,22 +1186,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_12": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_13": { "nixpkgs_13": {
"locked": { "locked": {
"lastModified": 1615532953, "lastModified": 1615532953,
@@ -1108,11 +1230,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1701436327, "lastModified": 1758035966,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=", "narHash": "sha256-qqIJ3yxPiB0ZQTT9//nFGQYn8X/PBoJbofA7hRKZnmE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a", "rev": "8d4ddb19d03c65a36ad8d189d001dc32ffb0306b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1123,6 +1245,22 @@
} }
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": {
"lastModified": 1759381078,
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1701436327, "lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=", "narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
@@ -1138,7 +1276,23 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_7": {
"locked": {
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1653060744, "lastModified": 1653060744,
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=", "narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
@@ -1154,7 +1308,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1764983851, "lastModified": 1764983851,
"narHash": "sha256-y7RPKl/jJ/KAP/VKLMghMgXTlvNIJMHKskl8/Uuar7o=", "narHash": "sha256-y7RPKl/jJ/KAP/VKLMghMgXTlvNIJMHKskl8/Uuar7o=",
@@ -1170,38 +1324,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": {
"locked": {
"lastModified": 1765186076,
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": { "nmd": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -1234,6 +1356,38 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"nmd_3": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmd_4": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmt": { "nmt": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -1250,6 +1404,22 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"nmt_2": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
}
},
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1693680361, "lastModified": 1693680361,
@@ -1268,7 +1438,7 @@
"nur_2": { "nur_2": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_10"
}, },
"locked": { "locked": {
"lastModified": 1765367248, "lastModified": 1765367248,
@@ -1340,16 +1510,19 @@
"recht_2": { "recht_2": {
"inputs": { "inputs": {
"blessings": "blessings_2", "blessings": "blessings_2",
"flake-utils": [
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1765658439, "lastModified": 1736882697,
"narHash": "sha256-7u21xVZBEYhgEd4UX+nG86oDblxCJtG/eYT1g2S45nc=", "narHash": "sha256-G++JyQ6GJlQ8T/R18xb02HhSE1NWfpAboUEBleaadd8=",
"owner": "kmein", "owner": "kmein",
"repo": "recht", "repo": "recht",
"rev": "dbdd8fd69d6b82bce1132ceb8dd2f5715887e6ee", "rev": "dd49a91b1e611920889680aa2c9101166b0ce83e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1395,16 +1568,18 @@
"coptic-dictionary": "coptic-dictionary", "coptic-dictionary": "coptic-dictionary",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"ical-ephemeris": "ical-ephemeris",
"menstruation-backend": "menstruation-backend_2", "menstruation-backend": "menstruation-backend_2",
"menstruation-telegram": "menstruation-telegram_2", "menstruation-telegram": "menstruation-telegram_2",
"nix-index-database": "nix-index-database", "nix-on-droid": "nix-on-droid_2",
"nixinate": "nixinate_2", "nixinate": "nixinate_2",
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_9",
"nixpkgs-old": "nixpkgs-old_2", "nixpkgs-old": "nixpkgs-old_2",
"nixpkgs-unstable": "nixpkgs-unstable_2", "nixpkgs-unstable": "nixpkgs-unstable_2",
"nur": "nur_2", "nur": "nur_2",
"recht": "recht_2", "recht": "recht_2",
"retiolum": "retiolum_2", "retiolum": "retiolum_2",
"rust-overlay": "rust-overlay_2",
"scripts": "scripts_2", "scripts": "scripts_2",
"stockholm": "stockholm", "stockholm": "stockholm",
"stylix": "stylix_2", "stylix": "stylix_2",
@@ -1461,32 +1636,16 @@
}, },
"rust-overlay_2": { "rust-overlay_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_9" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1765593578, "lastModified": 1765334520,
"narHash": "sha256-qbl874bCIy9+OLImdfBfZ9ITUDDjjTAB04Dk4PlZFV0=", "narHash": "sha256-jTof2+ir9UPmv4lWksYO6WbaXCC0nsDExrB9KZj7Dz4=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "348b94ed9ddffccdf1a65582a2dcff0a4a3eeeb4", "rev": "db61f666aea93b28f644861fbddd37f235cc5983",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_3": {
"inputs": {
"nixpkgs": "nixpkgs_12"
},
"locked": {
"lastModified": 1765593578,
"narHash": "sha256-qbl874bCIy9+OLImdfBfZ9ITUDDjjTAB04Dk4PlZFV0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "348b94ed9ddffccdf1a65582a2dcff0a4a3eeeb4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1529,17 +1688,22 @@
}, },
"scripts_2": { "scripts_2": {
"inputs": { "inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": "rust-overlay_2" "rust-overlay": [
"rust-overlay"
]
}, },
"locked": { "locked": {
"lastModified": 1765657698, "lastModified": 1763370753,
"narHash": "sha256-Ic5lcBZQKw9kOU6BUl3w+r1zCj9hveHyaHsOAYB7Yhg=", "narHash": "sha256-sjYc9aP52GrVCPWxf+B0o0lqDGVGfpXqX9MI9eKyCZI=",
"owner": "kmein", "owner": "kmein",
"repo": "scripts", "repo": "scripts",
"rev": "aeea5b4cdaf39169ab469a7c31269c8360b9c403", "rev": "e71d09ba89bb1e210a7e103aaa3fe619dbc801e7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1552,7 +1716,7 @@
"inputs": { "inputs": {
"buildbot-nix": "buildbot-nix", "buildbot-nix": "buildbot-nix",
"nix-writers": "nix-writers", "nix-writers": "nix-writers",
"nixpkgs": "nixpkgs_10" "nixpkgs": "nixpkgs_11"
}, },
"locked": { "locked": {
"lastModified": 1763891069, "lastModified": 1763891069,
@@ -1611,7 +1775,7 @@
"nixpkgs" "nixpkgs"
], ],
"nur": "nur_3", "nur": "nur_3",
"systems": "systems_4", "systems": "systems_5",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@@ -1633,6 +1797,38 @@
"type": "github" "type": "github"
} }
}, },
"swiss-ephemeris": {
"flake": false,
"locked": {
"lastModified": 1638583659,
"narHash": "sha256-EEgKk5DDkmICteFzFzXdvdGke7aPoJa6aQ228nAYieQ=",
"owner": "lfborjas",
"repo": "swiss-ephemeris",
"rev": "3094368f5f963e8756e89e3b3dd24b96796b8682",
"type": "github"
},
"original": {
"owner": "lfborjas",
"repo": "swiss-ephemeris",
"type": "github"
}
},
"swisseph": {
"flake": false,
"locked": {
"lastModified": 1757697308,
"narHash": "sha256-m2Qgzhsgrv0KyJin8UfNFJ8KL/HFfoN8AmCTlcirHXE=",
"owner": "aloistr",
"repo": "swisseph",
"rev": "3084917b5d2384af6fb928583552e0a299fb6d83",
"type": "github"
},
"original": {
"owner": "aloistr",
"repo": "swisseph",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@@ -1729,14 +1925,15 @@
}, },
"telebots_2": { "telebots_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_11" "flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_12"
}, },
"locked": { "locked": {
"lastModified": 1765657917, "lastModified": 1703313352,
"narHash": "sha256-buujY0TRj+Skg1Uo8ut7kUKHDfOtsvxt/LEOiO+ehvA=", "narHash": "sha256-EV1hfkxEn6L+z6A9rcyfkmBGzu0VwA2rF1iA32nfXW8=",
"owner": "kmein", "owner": "kmein",
"repo": "telebots", "repo": "telebots",
"rev": "1232c6f82e7cdf80b6b76a992544db42a293f7b2", "rev": "534221956e6d9dc5528d94247dd35e9f597de169",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1779,17 +1976,22 @@
}, },
"tinc-graph_2": { "tinc-graph_2": {
"inputs": { "inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": "rust-overlay_3" "rust-overlay": [
"rust-overlay"
]
}, },
"locked": { "locked": {
"lastModified": 1765658153, "lastModified": 1748887042,
"narHash": "sha256-cNTBy57MGlRBY9211prc/wau+CbwoJo0mydgGva1/LQ=", "narHash": "sha256-WWQxnmKyQm/iccHxDdobdGOPfcVNf+PQwy9HQ2b9W8g=",
"owner": "kmein", "owner": "kmein",
"repo": "tinc-graph", "repo": "tinc-graph",
"rev": "119c9486460f90c45d4a157ea9b9f1cd2901d176", "rev": "8847b2d0e69065bf4bbb9885fbd465f3b1b2369a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1959,7 +2161,9 @@
}, },
"wallpaper-generator_2": { "wallpaper-generator_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": [
"flake-utils"
],
"nixpkgs": "nixpkgs_13" "nixpkgs": "nixpkgs_13"
}, },
"locked": { "locked": {

313
flake.nix
View File

@@ -5,12 +5,14 @@
self.submodules = true; self.submodules = true;
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
# alew-web.url = "git+ssh://gitea@code.kmein.de:22022/kfm/alew-web.git?ref=refs/heads/master";
autorenkalender.url = "github:kmein/autorenkalender"; autorenkalender.url = "github:kmein/autorenkalender";
coptic-dictionary.url = "github:kmein/coptic-dictionary"; coptic-dictionary.url = "github:kmein/coptic-dictionary";
flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager/release-25.11"; home-manager.url = "github:nix-community/home-manager/release-25.11";
menstruation-backend.url = "github:kmein/menstruation.rs"; menstruation-backend.url = "github:kmein/menstruation.rs";
menstruation-telegram.url = "github:kmein/menstruation-telegram"; menstruation-telegram.url = "github:kmein/menstruation-telegram";
nix-index-database.url = "github:nix-community/nix-index-database"; nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05";
nixinate.url = "github:matthewcroughan/nixinate"; nixinate.url = "github:matthewcroughan/nixinate";
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0"; nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
@@ -18,6 +20,7 @@
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
recht.url = "github:kmein/recht"; recht.url = "github:kmein/recht";
retiolum.url = "github:krebs/retiolum"; retiolum.url = "github:krebs/retiolum";
rust-overlay.url = "github:oxalica/rust-overlay";
scripts.url = "github:kmein/scripts"; scripts.url = "github:kmein/scripts";
stockholm.url = "github:krebs/stockholm"; stockholm.url = "github:krebs/stockholm";
stylix.url = "github:danth/stylix/release-25.11"; stylix.url = "github:danth/stylix/release-25.11";
@@ -26,102 +29,117 @@
voidrice.url = "github:Lukesmithxyz/voidrice"; voidrice.url = "github:Lukesmithxyz/voidrice";
wallpaper-generator.url = "github:pinpox/wallpaper-generator/v1.1"; wallpaper-generator.url = "github:pinpox/wallpaper-generator/v1.1";
wallpapers.url = "github:kmein/wallpapers"; wallpapers.url = "github:kmein/wallpapers";
ical-ephemeris.url = "git+ssh://gitea@code.kmein.de:22022/kfm/ical-ephemeris";
autorenkalender.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.home-manager.follows = "home-manager"; agenix.inputs.home-manager.follows = "home-manager";
agenix.inputs.nixpkgs.follows = "nixpkgs"; agenix.inputs.nixpkgs.follows = "nixpkgs";
autorenkalender.inputs.nixpkgs.follows = "nixpkgs";
coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs"; coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
# menstruation-backend.inputs.flake-utils.follows = "flake-utils";
# menstruation-backend.inputs.nixpkgs.follows = "nixpkgs";
# menstruation-backend.inputs.rust-overlay.follows = "rust-overlay";
menstruation-telegram.inputs.flake-utils.follows = "flake-utils";
menstruation-telegram.inputs.menstruation-backend.follows = "menstruation-backend"; menstruation-telegram.inputs.menstruation-backend.follows = "menstruation-backend";
menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old"; menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; nix-on-droid.inputs.home-manager.follows = "home-manager";
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
recht.inputs.flake-utils.follows = "flake-utils";
recht.inputs.nixpkgs.follows = "nixpkgs"; recht.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
scripts.inputs.flake-utils.follows = "flake-utils";
scripts.inputs.nixpkgs.follows = "nixpkgs"; scripts.inputs.nixpkgs.follows = "nixpkgs";
scripts.inputs.rust-overlay.follows = "rust-overlay";
stylix.inputs.nixpkgs.follows = "nixpkgs"; stylix.inputs.nixpkgs.follows = "nixpkgs";
tinc-graph.inputs.flake-utils.follows = "flake-utils";
tinc-graph.inputs.nixpkgs.follows = "nixpkgs"; tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
tinc-graph.inputs.rust-overlay.follows = "rust-overlay";
voidrice.flake = false; voidrice.flake = false;
wallpaper-generator.inputs.flake-utils.follows = "flake-utils";
wallpapers.flake = false; wallpapers.flake = false;
}; };
outputs = nixConfig = {
inputs@{ extra-substituters = [ "https://kmein.cachix.org" ];
self, extra-trusted-public-keys = [ "kmein.cachix.org-1:rsJ2b6++VQHJ1W6rGuDUYsK/qUkFA3bNpO6PyEyJ9Ls=" ];
nixpkgs, };
nixpkgs-unstable,
nur, outputs = inputs @ {
home-manager, self,
agenix, nixpkgs,
retiolum, nixpkgs-unstable,
nixinate, nur,
flake-utils, home-manager,
nix-index-database, agenix,
stylix, retiolum,
... nixinate,
}: flake-utils,
let nix-on-droid,
lib = nixpkgs.lib; stylix,
eachSupportedSystem = lib.genAttrs lib.systems.flakeExposed; ...
in }:
{ let
lib = nixpkgs.lib;
eachSupportedSystem = lib.genAttrs lib.systems.flakeExposed;
in {
apps = { apps = {
x86_64-linux = x86_64-darwin = let
let pkgs = nixpkgs.legacyPackages.x86_64-darwin;
pkgs = nixpkgs.legacyPackages.x86_64-linux; in {
lib = nixpkgs.lib; deploy-maakaron = {
in type = "app";
program = toString (pkgs.writers.writeDash "deploy-maakaron" ''
exec $(nix build .#homeConfigurations.maakaron.activationPackage --no-link --print-out-paths)/activate
'');
};
};
x86_64-linux = let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
lib = nixpkgs.lib;
in
nixinate.nixinate.x86_64-linux self nixinate.nixinate.x86_64-linux self
// { // {
mock-secrets = { mock-secrets = {
type = "app"; type = "app";
program = toString ( program = toString (pkgs.writers.writeDash "mock-secrets" ''
pkgs.writers.writeDash "mock-secrets" '' ${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
${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 # the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
// builtins.listToAttrs ( // builtins.listToAttrs (map (hostname: let
map ( externalNetwork = import ./lib/external-network.nix;
hostname: targets = {
let ful = "root@ful";
targets = { zaatar = "root@zaatar";
ful = "root@ful"; makanek = "root@makanek";
zaatar = "root@zaatar"; manakish = "root@manakish";
makanek = "root@makanek"; tahina = "root@tahina";
manakish = "root@manakish"; tabula = "root@tabula";
tahina = "root@tahina"; kabsa = "root@kabsa";
tabula = "root@tabula"; fatteh = "root@fatteh";
kabsa = "root@kabsa"; kibbeh = "root@kibbeh";
fatteh = "root@fatteh"; };
kibbeh = "root@kibbeh"; in
}; lib.attrsets.nameValuePair "deploy-${hostname}" {
in type = "app";
lib.attrsets.nameValuePair "deploy-${hostname}" { program = toString (pkgs.writers.writeDash "deploy-${hostname}" ''
type = "app"; exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \
program = toString ( --max-jobs 2 \
pkgs.writers.writeDash "deploy-${hostname}" '' --log-format internal-json \
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch \ --flake .#${hostname} \
--max-jobs 2 \ --target-host ${targets.${hostname}} 2>&1 \
--log-format internal-json \ | ${pkgs.nix-output-monitor}/bin/nom --json
--flake .#${hostname} \ '');
--target-host ${targets.${hostname}} 2>&1 \ }) (builtins.attrNames self.nixosConfigurations))
| ${pkgs.nix-output-monitor}/bin/nom --json
''
);
}
) (builtins.attrNames self.nixosConfigurations)
)
// { // {
deploy-ful = { deploy-ful = {
type = "app"; type = "app";
program = toString ( program = toString (pkgs.writers.writeDash "deploy-ful" ''
pkgs.writers.writeDash "deploy-ful" '' exec ${pkgs.nix}/bin/nix run .#nixinate.ful \
exec ${pkgs.nix}/bin/nix run .#nixinate.ful \ --log-format internal-json 2>&1 \
--log-format internal-json 2>&1 \ | ${pkgs.nix-output-monitor}/bin/nom --json
| ${pkgs.nix-output-monitor}/bin/nom --json '');
''
);
}; };
}; };
}; };
@@ -130,6 +148,7 @@
# TODO remove flake-utils dependency from my own repos # TODO remove flake-utils dependency from my own repos
nixosModules = { nixosModules = {
htgen = import modules/htgen.nix;
moodle-dl = import modules/moodle-dl.nix; moodle-dl = import modules/moodle-dl.nix;
networkmanager-declarative = import modules/networkmanager-declarative.nix; networkmanager-declarative = import modules/networkmanager-declarative.nix;
passport = import modules/passport.nix; passport = import modules/passport.nix;
@@ -144,6 +163,37 @@
panoptikon = import lib/panoptikon.nix; panoptikon = import lib/panoptikon.nix;
}; };
nixOnDroidConfigurations = {
moto = nix-on-droid.lib.nixOnDroidConfiguration {
modules = [systems/moto/configuration.nix];
pkgs = import nixpkgs {
system = "aarch64-linux";
overlays = [nix-on-droid.overlays.default];
};
extraSpecialArgs = {
niveumPackages = inputs.self.packages.aarch64-linux;
niveumLib = inputs.self.lib;
inherit inputs;
};
home-manager-path = home-manager.outPath;
};
};
homeConfigurations = {
maakaron = let
system = "x86_64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [./systems/maakaron/home.nix];
extraSpecialArgs = {
inherit inputs;
niveumPackages = inputs.self.packages.${system};
};
};
};
nixosConfigurations = let nixosConfigurations = let
niveumSpecialArgs = system: { niveumSpecialArgs = system: {
unstablePackages = import nixpkgs-unstable { unstablePackages = import nixpkgs-unstable {
@@ -167,8 +217,10 @@
systems/ful/configuration.nix systems/ful/configuration.nix
agenix.nixosModules.default agenix.nixosModules.default
inputs.self.nixosModules.passport inputs.self.nixosModules.passport
inputs.ical-ephemeris.nixosModules.default
inputs.self.nixosModules.panoptikon inputs.self.nixosModules.panoptikon
inputs.self.nixosModules.go-webring inputs.self.nixosModules.go-webring
inputs.self.nixosModules.htgen
inputs.stockholm.nixosModules.reaktor2 inputs.stockholm.nixosModules.reaktor2
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
nur.modules.nixos.default nur.modules.nixos.default
@@ -210,6 +262,7 @@
modules = [ modules = [
systems/makanek/configuration.nix systems/makanek/configuration.nix
inputs.self.nixosModules.telegram-bot inputs.self.nixosModules.telegram-bot
inputs.self.nixosModules.htgen
inputs.self.nixosModules.passport inputs.self.nixosModules.passport
agenix.nixosModules.default agenix.nixosModules.default
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
@@ -242,7 +295,6 @@
agenix.nixosModules.default agenix.nixosModules.default
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
nix-index-database.nixosModules.default
nur.modules.nixos.default nur.modules.nixos.default
stylix.nixosModules.stylix stylix.nixosModules.stylix
]; ];
@@ -256,7 +308,6 @@
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
nur.modules.nixos.default nur.modules.nixos.default
nix-index-database.nixosModules.default
stylix.nixosModules.stylix stylix.nixosModules.stylix
]; ];
}; };
@@ -269,7 +320,6 @@
retiolum.nixosModules.retiolum retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
nur.modules.nixos.default nur.modules.nixos.default
nix-index-database.nixosModules.default
stylix.nixosModules.stylix stylix.nixosModules.stylix
]; ];
}; };
@@ -282,11 +332,14 @@
overlays = [ overlays = [
nur.overlays.default nur.overlays.default
(self: super: { (self: super: {
mpv = super.mpv.override {scripts = [super.mpvScripts.visualizer super.mpvScripts.mpris];}; mpv = super.mpv.override {scripts = [inputs.self.packages.${system}.mpv-visualizer super.mpvScripts.mpris];};
dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"''; dmenu = super.writers.writeDashBin "dmenu" ''exec ${pkgs.rofi}/bin/rofi -dmenu "$@"'';
}) })
]; ];
}; };
unstablePackages = import nixpkgs-unstable {
inherit system;
};
wrapScript = { wrapScript = {
packages ? [], packages ? [],
name, name,
@@ -294,104 +347,112 @@
}: }:
pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"''; pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"'';
in { in {
# linguistics and ancient world
auc = pkgs.callPackage packages/auc.nix {}; auc = pkgs.callPackage packages/auc.nix {};
betacode = pkgs.callPackage packages/betacode.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 {}; brainmelter = pkgs.callPackage packages/brainmelter.nix {};
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {}; brassica = pkgs.callPackage packages/brassica.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 {}; cheat-sh = pkgs.callPackage packages/cheat-sh.nix {};
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {}; # TODO upstream closest = pkgs.callPackage packages/closest {};
cro = pkgs.callPackage packages/cro.nix {}; cro = pkgs.callPackage packages/cro.nix {};
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {};
default-gateway = pkgs.callPackage packages/default-gateway.nix {}; default-gateway = pkgs.callPackage packages/default-gateway.nix {};
depp = pkgs.callPackage packages/depp.nix {}; depp = pkgs.callPackage packages/depp.nix {};
dashboard = pkgs.callPackage packages/dashboard {}; dashboard = pkgs.callPackage packages/dashboard {};
devanagari = pkgs.callPackage packages/devanagari {};
devour = pkgs.callPackage packages/devour.nix {};
dic = pkgs.callPackage packages/dic.nix {};
dirmir = pkgs.callPackage packages/dirmir.nix {};
dmenu-bluetooth = pkgs.callPackage packages/dmenu-bluetooth.nix {};
dmenu-scrot = pkgs.callPackage packages/dmenu-scrot.nix {};
dns-sledgehammer = pkgs.callPackage packages/dns-sledgehammer.nix {};
fkill = pkgs.callPackage packages/fkill.nix {}; fkill = pkgs.callPackage packages/fkill.nix {};
fzfmenu = pkgs.callPackage packages/fzfmenu.nix {}; fzfmenu = pkgs.callPackage packages/fzfmenu.nix {};
genius = pkgs.callPackage packages/genius.nix {};
gfs-fonts = pkgs.callPackage packages/gfs-fonts.nix {};
git-preview = pkgs.callPackage packages/git-preview.nix {};
gpt35 = pkgs.callPackage packages/gpt.nix {model = "gpt-3.5-turbo";}; gpt35 = pkgs.callPackage packages/gpt.nix {model = "gpt-3.5-turbo";};
gpt4 = pkgs.callPackage packages/gpt.nix {model = "gpt-4";}; gpt4 = pkgs.callPackage packages/gpt.nix {model = "gpt-4";};
hc = pkgs.callPackage packages/hc.nix {};
jq-lsp = pkgs.callPackage packages/jq-lsp.nix {};
stardict-tools = pkgs.callPackage packages/stardict-tools.nix {};
heuretes = pkgs.callPackage packages/heuretes.nix {};
htgen = pkgs.callPackage packages/htgen.nix {};
image-convert-favicon = pkgs.callPackage packages/image-convert-favicon.nix {}; image-convert-favicon = pkgs.callPackage packages/image-convert-favicon.nix {};
image-convert-tolino = pkgs.callPackage packages/image-convert-tolino.nix {}; image-convert-tolino = pkgs.callPackage packages/image-convert-tolino.nix {};
infschmv = pkgs.callPackage packages/infschmv.nix {};
iolanguage = pkgs.callPackage packages/iolanguage.nix {};
ipa = pkgs.writers.writePython3Bin "ipa" {flakeIgnore = ["E501"];} (builtins.readFile packages/ipa.py);
ix = pkgs.callPackage packages/ix.nix {};
jsesh = pkgs.callPackage packages/jsesh.nix {};
k-lock = pkgs.callPackage packages/k-lock.nix {}; k-lock = pkgs.callPackage packages/k-lock.nix {};
kirciuoklis = pkgs.callPackage packages/kirciuoklis.nix {};
klem = pkgs.callPackage packages/klem.nix {}; klem = pkgs.callPackage packages/klem.nix {};
man-pandoc = pkgs.callPackage packages/man/pandoc.nix {}; # TODO upstream kpaste = pkgs.callPackage packages/kpaste.nix {};
literature-quote = pkgs.callPackage packages/literature-quote.nix {};
mahlzeit = pkgs.haskellPackages.callPackage packages/mahlzeit.nix {};
man-pandoc = pkgs.callPackage packages/man/pandoc.nix {};
man-pdf = pkgs.callPackage packages/man-pdf.nix {}; man-pdf = pkgs.callPackage packages/man-pdf.nix {};
mansplain = pkgs.callPackage packages/mansplain.nix {}; mansplain = pkgs.callPackage packages/mansplain.nix {};
manual-sort = pkgs.callPackage packages/manual-sort.nix {}; manual-sort = pkgs.callPackage packages/manual-sort.nix {};
menu-calc = pkgs.callPackage packages/menu-calc.nix {}; menu-calc = pkgs.callPackage packages/menu-calc.nix {};
meteo = pkgs.callPackage packages/meteo.nix {};
noise-waves = pkgs.callPackage packages/noise-waves.nix {}; noise-waves = pkgs.callPackage packages/noise-waves.nix {};
mpv-radio = pkgs.callPackage packages/mpv-radio.nix {di-fm-key-file = "/dev/null";}; 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-tuner = pkgs.callPackage packages/mpv-tuner.nix {di-fm-key-file = "/dev/null";};
mpv-tv = pkgs.callPackage packages/mpv-tv.nix {}; mpv-tv = pkgs.callPackage packages/mpv-tv.nix {};
mpv-iptv = pkgs.callPackage packages/mpv-iptv.nix {}; mpv-iptv = pkgs.callPackage packages/mpv-iptv.nix {};
mpv-visualizer = unstablePackages.mpvScripts.visualizer;
new-mac = pkgs.callPackage packages/new-mac.nix {}; new-mac = pkgs.callPackage packages/new-mac.nix {};
nix-git = pkgs.callPackage packages/nix-git.nix {}; nix-git = pkgs.callPackage packages/nix-git.nix {};
nix-index-update = pkgs.callPackage packages/nix-index-update.nix {inherit system;};
notemenu = pkgs.callPackage packages/notemenu.nix {niveumPackages = self.packages.${system};}; notemenu = pkgs.callPackage packages/notemenu.nix {niveumPackages = self.packages.${system};};
opustags = pkgs.callPackage packages/opustags.nix {}; # TODO upstream opustags = pkgs.callPackage packages/opustags.nix {};
pls = pkgs.callPackage packages/pls.nix {};
polyglot = pkgs.callPackage packages/polyglot.nix {};
q = pkgs.callPackage packages/q.nix {}; q = pkgs.callPackage packages/q.nix {};
qrpaste = pkgs.callPackage packages/qrpaste.nix {}; qrpaste = pkgs.callPackage packages/qrpaste.nix {};
go-webring = pkgs.callPackage packages/go-webring.nix {}; # TODO upstream random-zeno = pkgs.callPackage packages/random-zeno.nix {};
go-webring = pkgs.callPackage packages/go-webring.nix {};
rfc = pkgs.callPackage packages/rfc.nix {}; rfc = pkgs.callPackage packages/rfc.nix {};
gimp = pkgs.callPackage packages/gimp.nix {}; gimp = pkgs.callPackage packages/gimp.nix {};
scanned = pkgs.callPackage packages/scanned.nix {}; scanned = pkgs.callPackage packages/scanned.nix {};
text2pdf = pkgs.callPackage packages/text2pdf.nix {}; # TODO upstream swallow = pkgs.callPackage packages/swallow.nix {};
text2pdf = pkgs.callPackage packages/text2pdf.nix {};
timer = pkgs.callPackage packages/timer.nix {}; timer = pkgs.callPackage packages/timer.nix {};
trans = pkgs.callPackage packages/trans.nix {}; # TODO upstream tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
trans = pkgs.callPackage packages/trans.nix {};
ttspaste = pkgs.callPackage packages/ttspaste.nix {}; ttspaste = pkgs.callPackage packages/ttspaste.nix {};
unicodmenu = pkgs.callPackage packages/unicodmenu.nix {}; unicodmenu = pkgs.callPackage packages/unicodmenu.nix {};
emailmenu = pkgs.callPackage packages/emailmenu.nix {}; emailmenu = pkgs.callPackage packages/emailmenu.nix {};
stag = pkgs.callPackage packages/stag.nix {}; # TODO upstream stag = pkgs.callPackage packages/stag.nix {};
untilport = pkgs.callPackage packages/untilport.nix {};
vg = pkgs.callPackage packages/vg.nix {}; vg = pkgs.callPackage packages/vg.nix {};
vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};}; vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};};
obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {}; obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {};
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {}; # TODO upstream radio-news = pkgs.callPackage packages/radio-news.nix {};
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {}; # TODO upstream vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {};
vimPlugins-typst-vim = pkgs.callPackage packages/vimPlugins/typst-vim.nix {}; # TODO upstream vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {};
vimPlugins-mdwa-nvim = pkgs.callPackage packages/vimPlugins/mdwa-nvim.nix {}; # TODO upstream vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {};
vimPlugins-vim-ernest = pkgs.callPackage packages/vimPlugins/vim-ernest.nix {}; # TODO upstream vimPlugins-typst-vim = pkgs.callPackage packages/vimPlugins/typst-vim.nix {};
vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix {}; # TODO upstream vimPlugins-mdwa-nvim = pkgs.callPackage packages/vimPlugins/mdwa-nvim.nix {};
vimPlugins-vim-colors-paramount = pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix {}; # TODO upstream vimPlugins-vim-ernest = pkgs.callPackage packages/vimPlugins/vim-ernest.nix {};
vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix {}; # TODO upstream vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix {};
vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix {}; # TODO upstream vimPlugins-vim-colors-paramount = pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix {};
vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix {}; # TODO upstream vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix {};
vimPlugins-vim-reason-plus = pkgs.callPackage packages/vimPlugins/vim-reason-plus.nix {}; # TODO upstream vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix {};
vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix {};
vimPlugins-vim-reason-plus = pkgs.callPackage packages/vimPlugins/vim-reason-plus.nix {};
vimv = pkgs.callPackage packages/vimv.nix {}; vimv = pkgs.callPackage packages/vimv.nix {};
weechat-declarative = pkgs.callPackage packages/weechat-declarative.nix {}; # TODO upstream weechat-declarative = pkgs.callPackage packages/weechat-declarative.nix {};
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {}; # TODO upstream weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {};
dmenu-randr = pkgs.callPackage packages/dmenu-randr.nix {}; wttr = pkgs.callPackage packages/wttr.nix {};
wttr = pkgs.callPackage packages/wttr.nix {}; # TODO upstream
booksplit = wrapScript { booksplit = wrapScript {
script = inputs.voidrice.outPath + "/.local/bin/booksplit"; script = inputs.voidrice.outPath + "/.local/bin/booksplit";
name = "booksplit"; name = "booksplit";
packages = [pkgs.ffmpeg pkgs.glibc.bin]; packages = [pkgs.ffmpeg pkgs.glibc.bin];
}; };
dmenu-randr = pkgs.callPackage packages/dmenu-randr.nix {};
tag = wrapScript { tag = wrapScript {
script = inputs.voidrice.outPath + "/.local/bin/tag"; script = inputs.voidrice.outPath + "/.local/bin/tag";
name = "tag"; name = "tag";

View File

@@ -85,6 +85,9 @@ let
big-fm-name = name: "${name} | bigFM"; big-fm-name = name: "${name} | bigFM";
big-fm = name: "https://streams.bigfm.de/bigfm-${name}-128-aac"; big-fm = name: "https://streams.bigfm.de/bigfm-${name}-128-aac";
rautemusik-name = name: "${name} | rm.fm";
rautemusik = name: "http://${name}-high.rautemusik.fm/";
rte-name = name: "RTÉ ${name}"; rte-name = name: "RTÉ ${name}";
rte = name: "https://www.rte.ie/manifests/${name}.m3u8"; rte = name: "https://www.rte.ie/manifests/${name}.m3u8";
@@ -1204,6 +1207,198 @@ in
logo = "https://cdn.schlagerparadies.de/images/rsp_setup/logo-radio-schlagerparadies.svg"; logo = "https://cdn.schlagerparadies.de/images/rsp_setup/logo-radio-schlagerparadies.svg";
tags = [tags.schlager]; tags = [tags.schlager];
} }
{
station = rautemusik-name "Volksmusik";
desc = "Volksmusik, Blasmusik, Schlager";
stream = rautemusik "volksmusik";
tags = [tags.schlager];
}
{
station = rautemusik-name "Study";
stream = rautemusik "study";
desc = "Lo-Fi, Chillout, Easy Listening";
tags = [tags.lofi tags.chill];
}
{
station = rautemusik-name "TechHouse";
stream = rautemusik "techhouse";
desc = "Techhouse, Deephouse, Techno, Minimal";
tags = [tags.party];
}
{
station = rautemusik-name "Goldies";
stream = rautemusik "goldies";
desc = "Oldies, 60s, 70s, 80s";
tags = [tags.vintage];
}
{
station = rautemusik-name "90s";
stream = rautemusik "90s";
desc = "90s, Eurodance, Pop, HipHop";
tags = [tags.vintage];
}
{
station = rautemusik-name "Schlager";
stream = rautemusik "schlager";
desc = "Schlager, Discofox, Deutsch, Pop";
tags = [tags.schlager];
}
{
station = rautemusik-name "Country";
stream = rautemusik "country";
desc = "Country, Western, Americana";
tags = [tags.trad tags.american];
}
{
station = rautemusik-name "Sex";
stream = rautemusik "sex";
desc = "RnB, Pop, Easy Listening";
tags = [tags.chill];
}
{
station = rautemusik-name "LoveHits";
stream = rautemusik "lovehits";
desc = "Lovesongs, Balladen, RnB, Pop";
tags = [tags.pop];
}
{
station = rautemusik-name "Klassik";
stream = rautemusik "klassik";
desc = "Symphonie, Orchester, Klassik";
tags = [tags.classical];
}
{
station = rautemusik-name "Traurig";
stream = rautemusik "traurig";
desc = "Balladen, Pop, Easy Listening";
tags = [tags.pop];
}
{
station = rautemusik-name "Happy";
stream = rautemusik "happy";
desc = "Pop, Dance, Charts";
tags = [tags.pop];
}
{
station = rautemusik-name "Solo Piano";
stream = rautemusik "solopiano";
desc = "Klavier, Instrumental, Easy Listening";
tags = [tags.classical];
}
{
station = rautemusik-name "HappyHardcore";
stream = rautemusik "happyhardcore";
desc = "UK Core, Happy Hardcore, Dance";
tags = [tags.party];
}
{
station = rautemusik-name "HardeR";
stream = rautemusik "harder";
desc = "Hardstyle, Hardcore, Jumpstyle";
tags = [tags.party];
}
{
station = rautemusik-name "BigCityBeats";
stream = rautemusik "bigcitybeats";
desc = "EDM, Dance, House, Electro, Star DJs";
tags = [tags.pop tags.party];
}
{
station = rautemusik-name "Lounge";
stream = rautemusik "lounge";
desc = "Ambient, Jazz, Chillout, Easy Listening";
tags = [tags.chill];
}
{
station = rautemusik-name "Oriental";
stream = rautemusik "oriental";
desc = "Arabisch, Oriental, HipHop";
tags = [tags.arabic];
}
{
station = rautemusik-name "Salsa";
stream = rautemusik "salsa";
desc = "Salsa, Latina, Tropical";
tags = [tags.groovy];
}
{
station = rautemusik-name "Christmas";
stream = rautemusik "christmas";
desc = "Weihnachtslieder, Balladen, Schlager";
tags = [tags.xmas];
}
{
station = rautemusik-name "Christmas Chor";
stream = rautemusik "christmas-chor";
desc = "Chor, Weihnachtslieder, Gesang";
tags = [tags.xmas];
}
{
station = rautemusik-name "Christmas Schlager";
stream = rautemusik "christmas-schlager";
desc = "Schlager, Weihnachtslieder";
tags = [tags.xmas tags.schlager];
}
{
station = rautemusik-name "Weihnachten.FM";
stream = rautemusik "weihnachten";
desc = "Weihnachtslieder, Pop";
tags = [tags.xmas];
}
{
station = rautemusik-name "Top40";
stream = rautemusik "top40";
desc = "Charts, Top40, Dance, Hiphop";
tags = [tags.top40];
}
{
station = rautemusik-name "Rock";
desc = "Rock, Alternative, Punk";
stream = rautemusik "rock";
tags = [tags.rock];
}
{
station = rautemusik-name "PartyHits";
desc = "Karneval, Mallorca, Après Ski, Schlager";
stream = rautemusik "partyhits";
tags = [tags.schlager];
}
{
station = rautemusik-name "Deutschrap Charts";
stream = rautemusik "deutschrap-charts";
desc = "Deutschrap, HipHop, Rap, Charts";
tags = [tags.rap];
}
{
station = rautemusik-name "Deutschrap Classic";
stream = rautemusik "deutschrap-classic";
desc = "Oldschool, Rap, HipHop, Deutschrap";
tags = [tags.rap];
}
{
station = rautemusik-name "ChartHits";
stream = rautemusik "ChartHits";
desc = "House, RnB, Dance, Electro";
tags = [tags.top40];
}
{
station = rautemusik-name "BreakZ.FM";
stream = rautemusik "breakz";
desc = "RnB, House, HipHop, Dance, Mixtapes";
tags = [tags.top40];
}
{
station = rautemusik-name "Bass";
stream = rautemusik "bass";
desc = "DnB, Dubstep, Trap & Bass House";
tags = [tags.party];
}
{
station = rautemusik-name "12punks";
stream = rautemusik "12punks";
desc = "Punk, Punk Rock, Ska, Hardcore";
tags = [tags.rock];
}
{ {
logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/77/a4/13931/1/c175.png"; logo = "https://d3kle7qwymxpcy.cloudfront.net/images/broadcasts/77/a4/13931/1/c175.png";
station = "Raidió Rírá"; station = "Raidió Rírá";
@@ -1211,6 +1406,12 @@ in
desc = "Is cairt-staisiún ceoil é Raidió Rí-Rá a bhíonn ag craoladh go hiomlán trí Ghaeilge! Bíonn an ceol ar fad ó na cairteacha le cloisteáil ar an stáisiún, mar aon leis an bpopnuacht, an nuacht spóirt agus an nuacht scannánaíochta is déanaí!"; desc = "Is cairt-staisiún ceoil é Raidió Rí-Rá a bhíonn ag craoladh go hiomlán trí Ghaeilge! Bíonn an ceol ar fad ó na cairteacha le cloisteáil ar an stáisiún, mar aon leis an bpopnuacht, an nuacht spóirt agus an nuacht scannánaíochta is déanaí!";
tags = [tags.top40]; tags = [tags.top40];
} }
{
stream = "http://188.247.86.67:8008";
station = "Rotana Tarab";
logo = "https://liveonlineradio.net/wp-content/uploads/2017/11/Rotana-Tarab-100x47.jpg";
tags = [tags.trad tags.arabic];
}
{ {
stream = "http://asima.out.airtime.pro:8000/asima_a"; stream = "http://asima.out.airtime.pro:8000/asima_a";
station = "Asima"; station = "Asima";
@@ -1353,11 +1554,6 @@ in
desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen."; desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen.";
tags = [tags.text]; tags = [tags.text];
} }
{
station = "NIUS";
stream = "https://nius.stream25.radiohost.de/live_mp3-192";
tags = [tags.text];
}
{ {
station = "Kontrafunk"; station = "Kontrafunk";
stream = "https://icecast.multhielemedia.de/listen/kontrafunk/radio.mp3"; stream = "https://icecast.multhielemedia.de/listen/kontrafunk/radio.mp3";
@@ -1453,6 +1649,21 @@ in
station = "ERTU Al Quran Al Kareem"; station = "ERTU Al Quran Al Kareem";
tags = [tags.arabic tags.text tags.holy]; tags = [tags.arabic tags.text tags.holy];
} }
{
stream = "http://149.28.52.216:3344/listen.mp3";
station = "Verse 24/7 Holy Quran";
tags = [tags.arabic tags.text tags.holy];
}
{
stream = "https://s6.voscast.com:9355/stream";
station = "Kilid Herat";
tags = [tags.arabic tags.holy]; # nasheeds
}
{
stream = "https://s6.voscast.com:9355/stream";
station = "Radio Salam Watandar";
tags = [tags.arabic tags.holy];
}
{ {
stream = "http://onair15.xdevel.com:7064/1/"; stream = "http://onair15.xdevel.com:7064/1/";
station = "Radio Mozart Italia"; station = "Radio Mozart Italia";
@@ -1460,6 +1671,12 @@ in
desc = "Emittente ufficiale delle Associazioni Mozart Italia nel mondo"; desc = "Emittente ufficiale delle Associazioni Mozart Italia nel mondo";
tags = [tags.classical]; tags = [tags.classical];
} }
{
stream = "http://onair7.xdevel.com:7126/1/";
station = "Opera Radio Budapest";
logo = "https://www.opera.hu/static/default/asset/img/common/opera-logo.svg";
tags = [tags.classical];
}
{ {
stream = "http://peacefulpiano.stream.publicradio.org/peacefulpiano.mp3"; stream = "http://peacefulpiano.stream.publicradio.org/peacefulpiano.mp3";
station = "Peaceful Piano"; station = "Peaceful Piano";
@@ -1629,6 +1846,11 @@ in
stream = "https://playerservices.streamtheworld.com/api/livestream-redirect/KAN_88.mp3"; stream = "https://playerservices.streamtheworld.com/api/livestream-redirect/KAN_88.mp3";
tags = [tags.hebrew]; tags = [tags.hebrew];
} }
{
station = "Digital Impulse Classical Channel";
stream = "http://orion.shoutca.st:8978/stream";
tags = [tags.classical];
}
{ {
station = "Старое радио (детское)"; station = "Старое радио (детское)";
stream = "http://195.91.237.50:8000/detskoe128"; stream = "http://195.91.237.50:8000/detskoe128";
@@ -1699,23 +1921,18 @@ in
stream = "http://cw.dimebank.com:8080/CNNfast"; stream = "http://cw.dimebank.com:8080/CNNfast";
tags = [tags.text]; tags = [tags.text];
} }
{
station = "80s80s | Dark Wave";
stream = "https://streams.80s80s.de/darkwave/mp3-192/homepage/";
tags = [tags.wave];
}
{
station = "80s80s | Wave";
stream = "https://streams.80s80s.de/wave/mp3-192/homepage/";
tags = [tags.wave];
}
{ {
station = "XXX orchestral"; station = "XXX orchestral";
stream = "http://orion.shoutca.st:8978/stream"; stream = "http://orion.shoutca.st:8978/stream";
tags = [tags.classical]; tags = [tags.classical];
} }
{ {
station = "Kral FM Xanthi"; station = "XXX greek";
stream = "http://radio.hostchefs.net:8046/stream?1520818130148";
tags = [tags.greek];
}
{
station = "XXX turkish or greek";
stream = "https://onairmediagroup.live24.gr/kralfm100xanthi"; stream = "https://onairmediagroup.live24.gr/kralfm100xanthi";
tags = [tags.greek tags.turkish]; tags = [tags.greek tags.turkish];
} }
@@ -1769,6 +1986,11 @@ in
stream = "http://s2.voscast.com:12312/;"; stream = "http://s2.voscast.com:12312/;";
station = "Bahrain Quran Radio"; station = "Bahrain Quran Radio";
} }
{
tags = [tags.arabic tags.text tags.holy];
stream = "http://162.244.81.30:8224/;";
station = "Quran Radio Lebanon";
}
{ {
tags = [tags.arabic tags.text tags.holy]; tags = [tags.arabic tags.text tags.holy];
stream = "http://tijaniyyah.asuscomm.com:8000/stream/2/"; stream = "http://tijaniyyah.asuscomm.com:8000/stream/2/";
@@ -1779,6 +2001,16 @@ in
station = "Coptic for God"; station = "Coptic for God";
stream = "http://66.70.249.70:5832/stream"; stream = "http://66.70.249.70:5832/stream";
} }
{
stream = "http://stream-025.zeno.fm/5y95pu36sm0uv?";
station = "Hayat FM";
tags = [tags.arabic tags.text tags.holy];
}
{
stream = "http://uk2.internet-radio.com:8151/stream";
station = "The Quran Radio";
tags = [tags.arabic tags.text tags.holy];
}
{ {
stream = "http://www.radioeins.de/livemp3"; stream = "http://www.radioeins.de/livemp3";
station = "radioeins | RBB"; station = "radioeins | RBB";
@@ -1793,17 +2025,9 @@ in
stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3"; stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3";
station = "Hitradio FFH"; station = "Hitradio FFH";
} }
{
stream = "https://mp3.planetradio.de/planetradio/hqlivestream.aac";
station = "planet radio";
}
{ # Lex Fridman's favourite { # Lex Fridman's favourite
stream = "av://lavfi:anoisesrc=color=brown"; stream = "av://lavfi:anoisesrc=color=brown";
station = "Brown noise"; station = "Brownian noise";
}
{
stream = "av://lavfi:anoisesrc=color=pink";
station = "Pink noise";
} }
{ {
stream = "https://st03.sslstream.dlf.de/dlf/03/high/aac/stream.aac"; stream = "https://st03.sslstream.dlf.de/dlf/03/high/aac/stream.aac";

47
modules/htgen.nix Normal file
View File

@@ -0,0 +1,47 @@
{
config,
lib,
pkgs,
...
}: let
htgen = pkgs.callPackage ../packages/htgen.nix {};
in {
options.services.htgen = lib.mkOption {
default = {};
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
options = {
enable = lib.mkEnableOption "htgen-${config._module.args.name}";
port = lib.mkOption {
type = lib.types.int;
};
script = lib.mkOption {
type = lib.types.str;
};
};
}));
};
config = {
systemd.services =
lib.mapAttrs' (
name: cfg:
lib.nameValuePair "htgen-${name}" {
wantedBy = ["multi-user.target"];
after = ["network.target"];
environment = {
HOME = "/var/lib/htgen-${name}";
HTGEN_PORT = toString cfg.port;
HTGEN_SCRIPT = cfg.script;
};
serviceConfig = {
SyslogIdentifier = "htgen-${name}";
DynamicUser = true;
StateDirectory = "htgen-${name}";
PrivateTmp = true;
Restart = "always";
ExecStart = "${htgen}/bin/htgen --serve";
};
}
)
config.services.htgen;
};
}

View File

@@ -29,7 +29,7 @@
default = "daily"; default = "daily";
}; };
loadCredential = lib.mkOption { loadCredential = lib.mkOption {
type = lib.types.listOf lib.types.str; type = lib.types.listOf lib.types.string;
description = '' description = ''
This can be used to pass secrets to the systemd service without adding them to the nix store. This can be used to pass secrets to the systemd service without adding them to the nix store.
''; '';

View File

@@ -3,7 +3,7 @@
writers, writers,
curl, curl,
}: }:
writers.writeDashBin "cht.sh" '' writers.writeDashBin "so" ''
IFS=+ IFS=+
${curl}/bin/curl -sSL http://cht.sh/"$*" ${curl}/bin/curl -sSL http://cht.sh/"$*"
'' ''

View File

@@ -1,10 +1,10 @@
{ coreutils, chromium }: { writers, chromium }:
chromium.override { writers.writeDashBin "cro" ''
commandLineArgs = [ ${chromium}/bin/chromium \
"--disable-sync" --disable-sync \
"--no-default-browser-check" --no-default-browser-check \
"--no-first-run" --no-first-run \
"--user-data-dir=$(${coreutils}/bin/mktemp -d)" --user-data-dir="$(mktemp -d)" \
"--incognito" --incognito \
]; "$@"
} ''

43
packages/dic.nix Normal file
View File

@@ -0,0 +1,43 @@
{
fetchgit,
lib,
stdenv,
coreutils,
curl,
gnugrep,
gnused,
util-linux,
}:
stdenv.mkDerivation {
name = "dic";
src = fetchgit {
url = https://cgit.ni.krebsco.de/dic;
rev = "refs/tags/v1.1.1";
sha256 = "1gbj967a5hj53fdkkxijqgwnl9hb8kskz0cmpjq7v65ffz3v6vag";
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase = let
path = lib.makeBinPath [
coreutils
curl
gnused
gnugrep
util-linux
];
in ''
mkdir -p $out/bin
sed \
's,^main() {$,&\n PATH=${path}; export PATH,' \
< ./dic \
> $out/bin/dic
chmod +x $out/bin/dic
'';
}

24
packages/dirmir.nix Normal file
View File

@@ -0,0 +1,24 @@
{writers}:
writers.writeDashBin "dirmir" ''
SOURCE="$1"
TARGET="$2"
if [ ! -d "$SOURCE" ] || [ $# -ne 2 ]; then
echo >/dev/stderr "Usage: dirmir SOURCE TARGET"
exit 1
fi
if [ -e "$TARGET" ]; then
echo >/dev/stderr "$TARGET" already exists. Please use a different name.
exit 1
fi
find "$SOURCE" | while read -r entry; do
if [ -d "$entry" ]; then
mkdir -p "$TARGET/$entry"
else
# create a file with the same permissions as $entry
install -m "$(stat -c %a "$entry")" /dev/null "$TARGET/$entry"
fi
done
''

View File

@@ -0,0 +1,64 @@
{
writers,
libnotify,
dmenu,
bluez5,
lib,
}:
writers.writeDashBin "dmenu-bluetooth" ''
# UI for connecting to bluetooth devices
set -efu
PATH=$PATH=${lib.makeBinPath [libnotify dmenu bluez5]}
bluetooth_notify() {
notify-send --app-name=" Bluetooth" "$@"
}
chose_device() {
# the output from `bluetoothctl {paired-,}devices` has a first column which always contains `Device` followed by a MAC address and the device name
cut -d ' ' -f2- | dmenu -i -l 5 -p "Bluetooth device"
}
bluetoothctl scan on &
case "$(printf "pair\nconnect\ndisconnect" | dmenu -i)" in
pair)
chosen="$(bluetoothctl devices | chose_device)"
chosen_name="$(echo "$chosen" | cut -d ' ' -f2-)"
bluetooth_notify "$chosen_name" "Pairing ..."
if bluetoothctl pair "$(echo "$chosen" | cut -d ' ' -f1)"; then
bluetooth_notify " $chosen_name" "Paired with device."
else
test "$chosen" && bluetooth_notify " $chosen_name" "Failed to pair with device."
fi
;;
connect)
chosen="$(bluetoothctl paired-devices | chose_device)"
chosen_name="$(echo "$chosen" | cut -d ' ' -f2-)"
bluetooth_notify "$chosen_name" "Trying to connect ..."
if bluetoothctl connect "$(echo "$chosen" | cut -d ' ' -f1)"; then
bluetooth_notify " $chosen_name" "Connected to device."
else # something was selected but it didn't work
test "$chosen" && bluetooth_notify " $chosen_name" "Failed to connect to device."
fi
;;
disconnect)
chosen="$(bluetoothctl paired-devices | chose_device)"
chosen_name="$(echo "$chosen" | cut -d ' ' -f2-)"
bluetooth_notify "$chosen_name" "Disconnecting ..."
if bluetoothctl disconnect "$(echo "$chosen" | cut -d ' ' -f1)"; then
bluetooth_notify " $chosen_name" "Disconnected from device."
else # something was selected but it didn't work
test "$chosen" && bluetooth_notify " $chosen_name" "Failed to disconnect from device."
fi
;;
esac
''

42
packages/dmenu-scrot.nix Normal file
View File

@@ -0,0 +1,42 @@
{
writers,
lib,
dmenu,
scrot,
libnotify,
xclip,
screenshotsDirectory ? "/tmp",
}:
writers.writeDashBin "dmenu-scrot" ''
# ref https://gitlab.com/dwt1/dotfiles/-/blob/master/.dmenu/dmenu-scrot.sh
PATH=$PATH:${lib.makeBinPath [dmenu scrot libnotify xclip]}
APP_NAME="📸 Scrot"
IMG_PATH="${screenshotsDirectory}"
TIME=3000 #Miliseconds notification should remain visible
cmd=$(printf "fullscreen\nsection\nupload_fullscreen\nupload_section\n" | dmenu -p 'Screenshot')
cd "$IMG_PATH" || exit
case ''${cmd%% *} in
fullscreen)
scrot -d 1 \
&& notify-send -u low -t $TIME -a "$APP_NAME" 'Screenshot (full screen) saved.'
;;
section)
scrot -s \
&& notify-send -u low -t $TIME -a "$APP_NAME" 'Screenshot (section) saved.'
;;
upload_fullscreen)
scrot -d 1 -e "kpaste < \$f" | tail --lines=1 | xclip -selection clipboard -in \
&& notify-send -u low -t $TIME -a "$APP_NAME" "Screenshot (full screen) uploaded: $(xclip -selection clipboard -out)"
;;
upload_section)
scrot -s -e "kpaste < \$f" | tail --lines=1 | xclip -selection clipboard -in \
&& notify-send -u low -t $TIME -a "$APP_NAME" "Screenshot (section) uploaded: $(xclip -selection clipboard -out)"
;;
esac
''

View File

@@ -0,0 +1,7 @@
{
writers,
coreutils,
}:
writers.writeDashBin "dns-sledgehammer" ''
${coreutils}/bin/printf '%s\n' 'nameserver 1.1.1.1' 'options edns0' > /etc/resolv.conf
''

28
packages/genius.nix Normal file
View File

@@ -0,0 +1,28 @@
{
writers,
curl,
coreutils,
gnused,
pandoc,
}:
writers.writeDashBin "genius" ''
${coreutils}/bin/test "$#" -eq 2 || (
echo "usage: $0 <artist> <song>"
exit 1
)
normalize() {
${coreutils}/bin/tr -d -c '0-9A-Za-z ' | ${coreutils}/bin/tr ' ' - | ${coreutils}/bin/tr '[:upper:]' '[:lower:]'
}
ARTIST=$(echo "$1" | normalize | ${gnused}/bin/sed 's/./\U&/')
TITLE=$(echo "$2" | normalize)
GENIUS_URL="https://genius.com/$ARTIST-$TITLE-lyrics"
${curl}/bin/curl -s "$GENIUS_URL" \
| ${gnused}/bin/sed -ne '/class="lyrics"/,/<\/p>/p' \
| ${pandoc}/bin/pandoc -f html -s -t plain \
| ${gnused}/bin/sed 's/^_/\x1b[3m/g;s/_$/\x1b[0m/g;s/^\[/\n\x1b\[1m\[/g;s/\]$/\]\x1b[0m/g'
printf "\n%s\n" "$GENIUS_URL" >/dev/stderr
''

23
packages/git-preview.nix Normal file
View File

@@ -0,0 +1,23 @@
{
coreutils,
git,
writers,
}:
writers.writeDashBin "git-preview" ''
set -efu
head_commit=$(${git}/bin/git log -1 --format=%H)
merge_commit=$1; shift
merge_message='Merge for git-preview'
preview_dir=$(${coreutils}/bin/mktemp --tmpdir -d git-preview.XXXXXXXX)
preview_name=$(${coreutils}/bin/basename "$preview_dir")
${git}/bin/git worktree add --detach -f "$preview_dir" 2>/dev/null
${git}/bin/git -C "$preview_dir" checkout -q "$head_commit"
${git}/bin/git -C "$preview_dir" merge \
''${GIT_PREVIEW_MERGE_STRATEGY+-s "$GIT_PREVIEW_MERGE_STRATEGY"} \
-m "$merge_message" \
-q \
"$merge_commit"
${git}/bin/git -C "$preview_dir" diff "$head_commit.." "$@"
${coreutils}/bin/rm -fR "$preview_dir"
${coreutils}/bin/rm -R .git/worktrees/"$preview_name"
''

View File

@@ -2,7 +2,6 @@
writers, writers,
fetchurl, fetchurl,
xan, xan,
util-linux,
}: let }: let
database = fetchurl { database = fetchurl {
url = "http://c.krebsco.de/greek.csv"; url = "http://c.krebsco.de/greek.csv";
@@ -10,5 +9,5 @@
}; };
in in
writers.writeDashBin "heuretes" '' writers.writeDashBin "heuretes" ''
${xan}/bin/xan search -s simple "$*" ${database} | ${util-linux}/bin/column -s, -t ${xan}/bin/xan search -s simple "^$*$" ${database} | ${xan}/bin/xan table
'' ''

31
packages/htgen.nix Normal file
View File

@@ -0,0 +1,31 @@
{
fetchgit,
lib,
pkgs,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "htgen";
version = "1.3.1";
src = fetchgit {
url = "http://cgit.krebsco.de/htgen";
rev = "refs/tags/${version}";
sha256 = "0ml8kp89bwkrwy6iqclzyhxgv2qn9dcpwaafbmsr4mgcl70zx22r";
};
installPhase = ''
mkdir -p $out/bin
{
echo '#! ${pkgs.dash}/bin/dash'
echo 'export PATH=${lib.makeBinPath [
pkgs.coreutils
pkgs.jq
pkgs.ucspi-tcp
]}''${PATH+":$PATH"}'
sed 's:^Server=htgen$:&/${version}:' htgen
} > $out/bin/htgen
chmod +x $out/bin/htgen
cp -r examples $out
'';
}

13
packages/infschmv.nix Normal file
View File

@@ -0,0 +1,13 @@
{
writers,
pup,
curl,
pandoc,
man,
}:
writers.writeDashBin "InfSchMV" ''
${curl}/bin/curl -sSL https://www.berlin.de/corona/massnahmen/verordnung/ \
| ${pup}/bin/pup .textile \
| ${pandoc}/bin/pandoc -f html -t man -s \
| ${man}/bin/man -l -
''

29
packages/iolanguage.nix Normal file
View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
cmake,
python3,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
version = "2017.09.06";
name = "iolanguage-${version}";
src = fetchFromGitHub {
owner = "IoLanguage";
repo = "io";
rev = "${version}";
sha256 = "07rg1zrz6i6ghp11cm14w7bbaaa1s8sb0y5i7gr2sds0ijlpq223";
fetchSubmodules = true;
};
buildInputs = [cmake python3];
preBuild = "mkdir -p build && cd build";
buildPhase = ''
cmake -DCMAKE_INSTALL_PREFIX=$out/ ..
make all
'';
meta = with lib; {
homepage = "https://iolanguage.org/";
description = "Io programming language. Inspired by Self, Smalltalk and LISP.";
license = licenses.bsd3;
};
}

16
packages/ix.nix Normal file
View File

@@ -0,0 +1,16 @@
{
stdenv,
fetchurl,
}:
stdenv.mkDerivation {
name = "ix";
src = fetchurl {
url = "https://ix.io/client";
sha256 = "0xc2s4s1aq143zz8lgkq5k25dpf049dw253qxiav5k7d7qvzzy57";
};
phases = ["installPhase"];
installPhase = ''
mkdir -p $out/bin
install $src $out/bin/ix
'';
}

16
packages/jq-lsp.nix Normal file
View File

@@ -0,0 +1,16 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule {
name = "jq-lsp";
version = "unstable-2023-09-08";
src = fetchFromGitHub {
owner = "wader";
repo = "jq-lsp";
rev = "85edf1adbe5e6c91b37c67b6a4bf85eda1e49f2f";
hash = "sha256-ItLKRSbGZ8UqFEHCoh96KwhSpuKZ3l+2ZXnBkHEZL0M=";
};
vendorHash = "sha256-ppQ81uERHBgOr/bm/CoDSWcK+IqHwvcL6RFi0DgoLuw=";
}

63
packages/mahlzeit.nix Normal file
View File

@@ -0,0 +1,63 @@
{
lib,
fetchFromGitHub,
mkDerivation,
ansi-terminal,
base,
directory,
doctest,
filepath,
megaparsec,
optparse-applicative,
prettyprinter,
process,
raw-strings-qq,
stdenv,
tasty,
tasty-hunit,
text,
yaml,
}:
mkDerivation {
pname = "mahlzeit";
version = "0.1.0";
src = fetchFromGitHub {
owner = "kmein";
repo = "mahlzeit";
rev = "954c0fb3f45815999bc65d003794af6a850b069c";
sha256 = "046yrr40hjmxkjmwzcvmwb39fxx2v2i6hgdxrjfiwilzvhikarrg";
};
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
ansi-terminal
base
directory
filepath
megaparsec
prettyprinter
text
yaml
];
executableHaskellDepends = [
ansi-terminal
base
directory
filepath
optparse-applicative
process
text
yaml
];
testHaskellDepends = [
base
doctest
megaparsec
raw-strings-qq
tasty
tasty-hunit
];
homepage = "https://github.com/kmein/mahlzeit";
description = "Recipe toolkit";
license = lib.licenses.mit;
}

89
packages/meteo.nix Normal file
View File

@@ -0,0 +1,89 @@
{
writers,
lib,
jq,
curl,
xdotool,
nsxiv,
gnused,
defaultStation ? 103840,
}:
writers.writeDashBin "meteo" ''
# usage: meteo --list
# usage: meteo --update
# usage: meteo STATION
set -efu
PATH=$PATH:${lib.makeBinPath [jq curl xdotool nsxiv gnused]}
# TODO XDG
CONFIG_DIR=$HOME/.config/wetter
STATIONS_FILE=$CONFIG_DIR/stations.json
case ''${1-} in
--list)
sed -n 's/^\s*\(--[^)]\+\))$/\1/p' "$0"
jq -r -n \
--slurpfile stations_file "$STATIONS_FILE" \
'
$stations_file[0] as $known_stations |
$known_stations | keys[]
'
exit
;;
--update)
mkdir -p "$(dirname "$STATIONS_FILE")"
exec >"$STATIONS_FILE"
curl -fsSL http://wetterstationen.meteomedia.de/ |
jq -Rrs '
def decodeHTML:
gsub("&auml;";"ä") |
gsub("&ouml;";"ö") |
gsub("&uuml;";"ü") |
gsub("&Auml;";"Ä") |
gsub("&Ouml;";"Ö") |
gsub("&Uuml;";"Ü") |
gsub("&szlig;";"ß")
;
[
match(".*<option value=\"/\\?map=Deutschland&station=(?<station>[0-9]+)\">(?<name>[^<]+)</option>";"g")
.captures |
map({"\(.name)":(.string)}) |
add |
{"\(.name|decodeHTML)":(.station|tonumber)}
] |
add
'
exit
;;
esac
# set -x
station=''${1-${toString defaultStation}}
station=$(jq -e -n \
--arg station "$station" \
--slurpfile stations_file "$STATIONS_FILE" \
'
$stations_file[0] as $known_stations |
$station |
if test("^[0-9]+$") then
tonumber
else
$known_stations[.]
end
')
cache="/tmp/''${LOGNAME}_wetter_$station.png"
curl -sSL \
"http://wetterstationen.meteomedia.de/messnetz/vorhersagegrafik/$station.png" \
-o "$cache"
if window_id=$(xdotool search --name "^nsxiv - $cache$"); then
xdotool key --window "$window_id" r
else
nsxiv "$cache" &
fi
''

View File

@@ -0,0 +1,13 @@
{
writers,
wget,
system,
}:
writers.writeDashBin "nix-index-update" ''
filename="index-${system}"
mkdir -p ~/.cache/nix-index
cd ~/.cache/nix-index
# -N will only download a new version if there is an update.
${wget}/bin/wget -q -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename
ln -f $filename files
''

View File

@@ -1,8 +1,10 @@
{ {
writers, writers,
curl, curl,
pup,
gawk, gawk,
gnused, gnused,
gnugrep,
less, less,
fzf, fzf,
}: }:

Submodule secrets updated: 3f3a8d1334...236a3353a7

View File

@@ -9,7 +9,7 @@ in {
./hardware-configuration.nix ./hardware-configuration.nix
../../configs/networkmanager.nix ../../configs/networkmanager.nix
../../configs/default.nix ../../configs/default.nix
../../configs/gaming.nix ../../configs/0ad.nix
# ../../configs/gnome.nix # ../../configs/gnome.nix
]; ];

View File

@@ -2,6 +2,7 @@
config, config,
pkgs, pkgs,
lib, lib,
inputs,
... ...
}: let }: let
inherit (import ../../lib) kieran retiolumAddresses restic; inherit (import ../../lib) kieran retiolumAddresses restic;
@@ -14,8 +15,8 @@ in {
./hledger.nix ./hledger.nix
./go-webring.nix ./go-webring.nix
./gemini.nix ./gemini.nix
./ical-ephemeris.nix
./wallabag.nix ./wallabag.nix
./nethack.nix
../../configs/monitoring.nix ../../configs/monitoring.nix
../../configs/mycelium.nix ../../configs/mycelium.nix
../../configs/tor.nix ../../configs/tor.nix
@@ -71,6 +72,64 @@ in {
]; ];
}; };
users.users.servant = {
isSystemUser = true;
group = "servant";
};
users.groups.servant = {};
systemd.services.servant = {
enable = true;
environment.PORT = toString 18987;
environment.VIRTUAL_HOST = "https://openapiaiapi.kmein.de";
serviceConfig.ExecStart = pkgs.writers.writeHaskell "server" {
libraries = with pkgs.haskellPackages; [
servant
servant-server
servant-openapi3
servant-swagger-ui
servant-client
aeson
text
warp
uuid
lens
];
ghcArgs = ["-O3" "-threaded"];
} ./servant-openapi.hs;
serviceConfig.User = "servant";
serviceConfig.Group = "servant";
};
services.htgen.openapi-conversion = {
port = 18988;
script = ''. ${pkgs.writers.writeDash "openapi-conversion" ''
case "$Method $Request_URI" in
"GET /openapi-3.1.json")
schema=$(mktemp -d)
trap 'rm -rf $schema' EXIT
${pkgs.wget}/bin/wget http://127.0.0.1:${toString 18987}/openapi.json -O "$schema"/openapi.json
cat "$schema"/openapi.json >&2
PATH=${lib.makeBinPath [pkgs.bashInteractive pkgs.nodejs]} ${pkgs.nodejs}/bin/npx --yes openapi-format "$schema"/openapi.json --convertTo "3.1" -o "$schema"/openapi-new.json
printf 'HTTP/1.1 200 OK\r\n'
printf 'Content-Type: %s\r\n' "$(${pkgs.file}/bin/file -ib "$schema"/openapi-new.json)"
printf 'Server: %s\r\n' "$Server"
printf 'Connection: close\r\n'
printf 'Content-Length: %d\r\n' $(${pkgs.coreutils}/bin/wc -c < "$schema"/openapi-new.json)
printf '\r\n'
cat "$schema"/openapi-new.json
exit
;;
esac
''}'';
};
services.nginx.virtualHosts."openapiaiapi.kmein.de" = {
enableACME = true;
forceSSL = true;
locations."/openapi-3.1.json".proxyPass = "http://127.0.0.1:${toString 18988}";
locations."/".proxyPass = "http://127.0.0.1:${toString 18987}";
};
networking = { networking = {
firewall.allowedTCPPorts = [80 443]; firewall.allowedTCPPorts = [80 443];
hostName = "ful"; hostName = "ful";

View File

@@ -0,0 +1,29 @@
{ config, ... }:
let
port = 9090;
in
{
services.nginx.virtualHosts."ical-ephemeris.kmein.de" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}/";
};
};
services.ical-ephemeris = {
enable = true;
inherit port;
brevoApiKeyFile = config.age.secrets.brevo-key.path;
copecartIpnKeyFile = config.age.secrets.copecart-ipn.path;
baseUrl = "https://ical-ephemeris.kmein.de";
};
age.secrets.copecart-ipn = {
file = ../../secrets/copecart-ipn.age;
};
age.secrets.brevo-key = {
file = ../../secrets/brevo-key.age;
};
}

View File

@@ -21,7 +21,7 @@ in {
nginx = { nginx = {
serverName = "matomo.kmein.de"; serverName = "matomo.kmein.de";
}; };
package = pkgs.matomo; package = pkgs.matomo_5;
}; };
services.mysql = { services.mysql = {

View File

@@ -1,60 +0,0 @@
{
networking.firewall.allowedTCPPorts = [ 22 ];
containers.nethack = {
autoStart = true;
forwardPorts = [
{
containerPort = 22;
hostPort = 22;
}
];
config =
{ pkgs, ... }:
{
system.stateVersion = "25.11";
networking.hostName = "nethack";
services.openssh.enable = true;
environment.systemPackages = [ pkgs.nethack ];
programs.tmux.enable = true;
programs.tmux.extraConfig = ''
set -g mouse on
set -g allow-rename off
set -g detach-on-destroy off
unbind-key C-b
set -g prefix None
'';
users.users.nethack = {
isNormalUser = true;
home = "/home/nethack";
createHome = true;
shell = pkgs.bash;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAA...yourkey"
"ssh-ed25519 AAAA...friendkey"
];
};
services.openssh.settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
};
services.openssh.extraConfig = ''
Match User nethack
ForceCommand ${pkgs.tmux}/bin/tmux attach -t nethack || \
${pkgs.tmux}/bin/tmux new -s nethack ${pkgs.nethack}/bin/nethack
AllowTcpForwarding no
X11Forwarding no
PermitTTY yes
'';
};
};
}

View File

@@ -0,0 +1,119 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Aeson (ToJSON, FromJSON)
import GHC.Generics (Generic)
import Data.String (IsString(..))
import Network.Wai (Application)
import Network.Wai.Handler.Warp (run)
import Servant
import Servant.Client (HasClient (..))
import Servant.OpenApi (HasOpenApi(..), toOpenApi)
import qualified Data.Version as Version
import Servant.Swagger.UI (SwaggerSchemaUI, swaggerSchemaUIServer)
import Data.OpenApi (ToSchema, servers, license, info, description, version, title)
import qualified Data.OpenApi as OpenApi
import Control.Concurrent.MVar (MVar, newMVar, modifyMVar, readMVar)
import System.Environment (getEnv)
import Control.Monad.IO.Class (liftIO)
import Control.Lens
import qualified Data.Text as T
import GHC.Generics
import GHC.TypeLits
import Data.UUID (UUID)
import Data.UUID.V4 (nextRandom)
import qualified Data.UUID as UUID
-- Define a simple data type
data User = User
{ userId :: UUID
, name :: String
, age :: Int
} deriving (Generic, Show)
instance ToJSON User
instance FromJSON User
instance ToSchema User
-- Define the API type
type API = "users" :> OperationId "getUsers" :> Get '[JSON] [User]
:<|> "users" :> OperationId "insertUser" :> ReqBody '[JSON] User :> Post '[JSON] User
:<|> "users" :> OperationId "updateUser" :> Capture "id" UUID :> ReqBody '[JSON] User :> Put '[JSON] User
:<|> "users" :> OperationId "deleteUser" :> Capture "id" UUID :> Delete '[JSON] NoContent
-- Define the API with Swagger endpoints
type APIWithSwagger = API
:<|> SwaggerSchemaUI "swagger-ui" "openapi.json"
data OperationId (name :: Symbol)
instance HasServer subApi ctx => HasServer (OperationId name :> subApi) ctx where
type ServerT (OperationId name :> subApi) m = ServerT subApi m
route _ = route (Proxy @subApi)
hoistServerWithContext _ = hoistServerWithContext (Proxy @subApi)
instance (HasOpenApi subApi, KnownSymbol name) => HasOpenApi (OperationId name :> subApi) where
toOpenApi _ = toOpenApi (Proxy @subApi) & OpenApi.allOperations . OpenApi.operationId ?~ apiName
where
apiName = T.pack $ symbolVal (Proxy @name)
instance HasClient m api => HasClient m (OperationId name :> api) where
type Client m (OperationId name :> api) = Client m api
clientWithRoute pm Proxy = clientWithRoute pm (Proxy :: Proxy api)
hoistClientMonad pm _ = hoistClientMonad pm (Proxy :: Proxy api)
-- Handlers for the API
getUsers :: MVar [User] -> Handler [User]
getUsers usersVar = liftIO $ readMVar usersVar
addUser :: MVar [User] -> User -> Handler User
addUser usersVar newUser = liftIO $ do
newId <- nextRandom
let userWithId = newUser { userId = newId }
modifyMVar usersVar $ \users -> return (userWithId : users, userWithId)
updateUser :: MVar [User] -> UUID -> User -> Handler User
updateUser usersVar uid updatedUser = liftIO $ do
modifyMVar usersVar $ \users ->
let newUsers = map (\user -> if userId user == uid then updatedUser { userId = uid } else user) users
in return (newUsers, updatedUser { userId = uid })
deleteUser :: MVar [User] -> UUID -> Handler NoContent
deleteUser usersVar uid = liftIO $ do
modifyMVar usersVar $ \users ->
let newUsers = filter (\user -> userId user /= uid) users
in return (newUsers, NoContent)
-- Implement the server
server :: OpenApi.Server -> MVar [User] -> Server APIWithSwagger
server virtualHost usersVar = (getUsers usersVar
:<|> addUser usersVar
:<|> updateUser usersVar
:<|> deleteUser usersVar)
:<|> swaggerSchemaUIServer (toOpenApi (Proxy :: Proxy API)
& info.title .~ "OpenAPI AI API"
& info.version .~ "1.0"
& info.description ?~ "This is an API for AI with OpenAPI"
& info.license ?~ "MIT"
& servers .~ [virtualHost])
-- Create the application
app :: OpenApi.Server -> MVar [User] -> Application
app virtualHost usersVar = serve (Proxy :: Proxy APIWithSwagger) (server virtualHost usersVar)
-- Main entry point
main :: IO ()
main = do
initialUsers <- mapM (\(name, age) -> nextRandom >>= \uid -> return (User uid name age)) [("Alice", 30), ("Bob", 25)]
usersVar <- newMVar initialUsers
virtualHost <- getEnv "VIRTUAL_HOST"
port <- read <$> getEnv "PORT" -- Assuming PORT is a number
run port (app (fromString virtualHost) usersVar)

View File

@@ -14,6 +14,7 @@
../../configs/sound.nix ../../configs/sound.nix
../../configs/printing.nix ../../configs/printing.nix
../../configs/nix.nix ../../configs/nix.nix
../../configs/flix.nix
../../configs/fonts.nix ../../configs/fonts.nix
../../configs/mycelium.nix ../../configs/mycelium.nix
../../configs/retiolum.nix ../../configs/retiolum.nix
@@ -79,6 +80,7 @@
niveumPackages.mpv-tv niveumPackages.mpv-tv
telegram-desktop telegram-desktop
(niveumPackages.mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; }) (niveumPackages.mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; })
niveumPackages.meteo
spotify spotify
]; ];
}; };

103
systems/maakaron/home.nix Normal file
View File

@@ -0,0 +1,103 @@
{
config,
pkgs,
lib,
inputs,
niveumPackages,
...
}: let
system = "x86_64-darwin";
nextcloud = "${config.home.homeDirectory}/Nextcloud/ZODIAC";
hora = pkgs.callPackage ../../packages/hora.nix {
timeLedger = "${nextcloud}/hora.timeclock";
};
adminEssentials = import ../../configs/admin-essentials.nix {
inherit pkgs niveumPackages lib system;
};
stardict = import ../../configs/stardict.nix {
inherit pkgs lib inputs;
};
git = import ../../configs/git.nix {
inherit pkgs lib inputs system;
};
in {
home.packages =
[
hora
niveumPackages.vim
pkgs.ghc
pkgs.python3
]
++ adminEssentials.environment.systemPackages
++ git.environment.systemPackages;
#++ stardict.environment.systemPackages;
home.shellAliases =
adminEssentials.environment.shellAliases
// git.environment.shellAliases;
programs.git = git.home-manager.users.me.programs.git;
programs.zsh = let
promptColours = {
success = "green";
failure = "red";
};
in {
autocd = true;
defaultKeymap = "viins";
enableAutosuggestions = true;
enableCompletion = true;
enable = true;
historySubstringSearch.enable = true;
syntaxHighlighting.enable = true;
syntaxHighlighting.highlighters = ["main" "brackets" "pattern" "line"];
initExtra = ''
# ref https://gist.github.com/meeech/0b97a86f235d10bc4e2a1116eec38e7e
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ];
then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
precmd () {
if [[ -n $IN_NIX_SHELL ]]; then
PROMPT='%B%~%b %(?.%F{${promptColours.success}}.%F{${promptColours.failure}})λ%f '
else
PROMPT='%B%~%b %(?.%F{${promptColours.success}}.%F{${promptColours.failure}})%#%f '
fi
print -Pn "\e]2;%n@%M:%~\a" # title bar prompt
}
zle-keymap-select zle-line-init () {
case $KEYMAP in
vicmd) print -n '\e]12;green\a';;
viins|main) print -n '\e]12;gray\a';;
esac
}
zle -N zle-line-init
zle -N zle-keymap-select
'';
};
home.sessionVariables.EDITOR = "${niveumPackages.vim}/bin/nvim";
home.file."Local Applications".source = pkgs.symlinkJoin {
name = "local-applications";
paths = [pkgs.anki-bin pkgs.dbeaver pkgs.vscode pkgs.stellarium];
};
home.stateVersion = "23.11";
home.username = "xm7234fu";
home.homeDirectory = "/Users/${config.home.username}";
nixpkgs.config.allowUnfree = true;
nix.package = pkgs.nixVersions.stable;
nix.extraOptions = "experimental-features = nix-command flakes";
}
/*
hora register -p weekly --depth 1 --empty
*/

View File

@@ -7,10 +7,8 @@ in {
defaultOptions.settings = { defaultOptions.settings = {
USER_DEFINED_DEFAULT = true; USER_DEFINED_DEFAULT = true;
}; };
instances = let instance = "gitea"; in { instances = {
${instance}.settings = { "gitea".settings = {
BIND = "/run/anubis/anubis-${instance}/anubis.sock";
METRICS_BIND = "/run/anubis/anubis-${instance}/anubis-metrics.sock";
TARGET = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}"; TARGET = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
USER_DEFINED_INSTANCE = true; USER_DEFINED_INSTANCE = true;
OG_PASSTHROUGH = true; OG_PASSTHROUGH = true;

View File

@@ -3,8 +3,7 @@
pkgs, pkgs,
lib, lib,
... ...
}: }: let
let
tarotPort = 7407; tarotPort = 7407;
tarotFiles = pkgs.fetchzip { tarotFiles = pkgs.fetchzip {
url = "https://c.krebsco.de/tarot.zip"; url = "https://c.krebsco.de/tarot.zip";
@@ -15,45 +14,33 @@ let
url = "http://c.krebsco.de/tarot.pdf"; url = "http://c.krebsco.de/tarot.pdf";
sha256 = "1n2m53kjg2vj9dbr70b9jrsbqwdfrcb48l4wswn21549fi24g6dx"; sha256 = "1n2m53kjg2vj9dbr70b9jrsbqwdfrcb48l4wswn21549fi24g6dx";
}; };
in in {
{ services.htgen.tarot = {
systemd.services.tarot = { port = tarotPort;
enable = true; script = ''. ${pkgs.writers.writeDash "tarot" ''
serviceConfig.Type = "simple"; case "$Method $Request_URI" in
wantedBy = [ "multi-user.target" ]; "GET /")
serviceConfig.ExecStart = pkgs.writers.writePython3 "tarot-server" { if item=$(${pkgs.findutils}/bin/find ${toString tarotFiles} -type f | ${pkgs.coreutils}/bin/shuf -n1); then
libraries = py: [ py.pillow py.flask ]; card=$(mktemp --tmpdir tarot.XXX)
} '' trap 'rm $card' EXIT
from flask import Flask, send_file reverse=$(${pkgs.coreutils}/bin/shuf -i0-1 -n1)
from pathlib import Path if [ "$reverse" -eq 1 ]; then
from random import choice, randint ${pkgs.imagemagick}/bin/convert -rotate 180 "$item" "$card"
from io import BytesIO else
from PIL import Image ${pkgs.coreutils}/bin/cp "$item" "$card"
fi
app = Flask(__name__) printf 'HTTP/1.1 200 OK\r\n'
TAROT_DIR = Path("${tarotFiles}") printf 'Content-Type: %s\r\n' "$(${pkgs.file}/bin/file -ib "$card")"
printf 'Server: %s\r\n' "$Server"
printf 'Connection: close\r\n'
@app.route("/") printf 'Content-Length: %d\r\n' $(${pkgs.coreutils}/bin/wc -c < "$card")
def tarot(): printf '\r\n'
card_path = choice(list(TAROT_DIR.glob("*"))) cat "$card"
exit
with Image.open(card_path) as img: fi
if randint(0, 1): ;;
img = img.rotate(180) esac
buf = BytesIO() ''}'';
img.save(buf, format="JPEG")
buf.seek(0)
return send_file(
buf,
mimetype='image/jpeg',
as_attachment=False
)
if __name__ == "__main__":
app.run(port=${toString tarotPort})
'';
}; };
niveum.passport.services = [ niveum.passport.services = [
@@ -68,7 +55,7 @@ in
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations = { locations = {
"/".proxyPass = "http://127.0.0.1:${toString tarotPort}/"; "/".proxyPass = "http://127.0.0.1:${toString tarotPort}";
"/files/" = { "/files/" = {
root = pkgs.linkFarm "tarot" [ root = pkgs.linkFarm "tarot" [
{ {

View File

@@ -0,0 +1,71 @@
{
pkgs,
niveumPackages,
inputs,
...
}: let
sshPort = 8022;
in {
environment.packages = with pkgs; [
nil
bzip2
coreutils
curl
diffutils
findutils
git
gnugrep
gnupg
gnused
gnutar
gzip
hostname
iproute2
man
openssh
procps
tzdata
unzip
util-linux
vim
which
xz
zip
hledger
hledger-ui
niveumPackages.vim
gitAndTools.gh
ripgrep
(pkgs.writers.writeDashBin "start-ssh" ''
${pkgs.openssh}/bin/sshd -f ${pkgs.writeText "sshd_config" ''
HostKey /data/data/com.termux.nix/files/home/.ssh/ssh_host_rsa_key
Port ${toString sshPort}
''}
'')
];
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
home-manager = {
useGlobalPkgs = true;
backupFileExtension = "hm-bak";
config = {pkgs, ...}: {
home.stateVersion = "23.05";
programs.tmux.enable = true;
};
};
environment.sessionVariables = {
LEDGER_FILE = "/data/data/com.termux.nix/files/home/src/ledger/privat.journal";
};
user.shell = "${pkgs.fish}/bin/fish";
environment.etcBackupExtension = ".bak";
system.stateVersion = "23.05";
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
}

View File

@@ -74,40 +74,6 @@ in {
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
systemd.services.update-containers = {
startAt = "Mon 02:00";
script = ''
images=$(${pkgs.podman}/bin/podman ps -a --format="{{.Image}}" | sort -u)
for image in $images; do
${pkgs.podman}/bin/podman pull "$image"
done
'';
serviceConfig = {
Type = "oneshot";
Restart = "on-failure";
RestartSec = "1h";
};
};
systemd.services.restart-homeassistant = {
startAt = "Tue 02:00";
script = ''
${pkgs.systemd}/bin/systemctl try-restart podman-homeassistant.service
'';
serviceConfig = {
Type = "oneshot";
};
};
virtualisation.podman = {
enable = true;
autoPrune = {
enable = true;
flags = ["--all"];
};
};
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";
containers.homeassistant = { containers.homeassistant = {
@@ -116,9 +82,6 @@ in {
"${playlistDirectoryPath}:/media" "${playlistDirectoryPath}:/media"
"/run/dbus:/run/dbus:ro" "/run/dbus:/run/dbus:ro"
]; ];
# needed for bluetooth
capabilities.NET_ADMIN = true;
capabilities.NET_RAW = true;
environment.TZ = "Europe/Berlin"; environment.TZ = "Europe/Berlin";
image = "ghcr.io/home-assistant/home-assistant:stable"; image = "ghcr.io/home-assistant/home-assistant:stable";
extraOptions = [ extraOptions = [