1
0
mirror of https://github.com/kmein/niveum synced 2026-03-17 02:31:09 +01:00

3 Commits

Author SHA1 Message Date
e3f4c34ac3 ical-ephemeris: remove 2025-12-13 22:41:55 +01:00
3a9bfab5fd ful: remove openapi joke 2025-12-13 22:40:20 +01:00
fc238008c8 update 2025-12-13 22:37:47 +01:00
43 changed files with 1341 additions and 344 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,
...
}: let
darwin = lib.strings.hasSuffix "-darwin" pkgs.stdenv.hostPlatform.system;
darwin = lib.strings.hasSuffix "-darwin" pkgs.system;
in {
environment.systemPackages =
[

View File

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

View File

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

View File

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

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

199
flake.lock generated
View File

@@ -813,23 +813,26 @@
"type": "github"
}
},
"nix-index-database": {
"nix-formatter-pack_2": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
]
],
"nmd": "nmd_3",
"nmt": "nmt_2"
},
"locked": {
"lastModified": 1765267181,
"narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f",
"lastModified": 1666720474,
"narHash": "sha256-iWojjDS1D19zpeZXbBdjWb9MiKmVVFQCqtJmtTXgPx8=",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"rev": "14876cc8fe94a3d329964ecb073b4c988c7b61f5",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"type": "github"
}
},
@@ -864,6 +867,33 @@
"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": {
"flake": false,
"locked": {
@@ -952,6 +982,22 @@
"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": {
"locked": {
"lastModified": 1682600000,
@@ -1017,22 +1063,6 @@
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1760878510,
"narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_11": {
"locked": {
"lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
@@ -1048,23 +1078,7 @@
"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_11": {
"locked": {
"lastModified": 1615532953,
"narHash": "sha256-SWpaGjrp/INzorEqMz3HLi6Uuk9I0KAn4YS8B4n3q5g=",
@@ -1188,16 +1202,16 @@
},
"nixpkgs_9": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"lastModified": 1760878510,
"narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@@ -1234,6 +1248,38 @@
"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": {
"flake": false,
"locked": {
@@ -1250,6 +1296,22 @@
"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": {
"locked": {
"lastModified": 1693680361,
@@ -1397,7 +1459,7 @@
"home-manager": "home-manager_2",
"menstruation-backend": "menstruation-backend_2",
"menstruation-telegram": "menstruation-telegram_2",
"nix-index-database": "nix-index-database",
"nix-on-droid": "nix-on-droid_2",
"nixinate": "nixinate_2",
"nixpkgs": "nixpkgs_7",
"nixpkgs-old": "nixpkgs-old_2",
@@ -1405,6 +1467,7 @@
"nur": "nur_2",
"recht": "recht_2",
"retiolum": "retiolum_2",
"rust-overlay": "rust-overlay_2",
"scripts": "scripts_2",
"stockholm": "stockholm",
"stylix": "stylix_2",
@@ -1461,32 +1524,16 @@
},
"rust-overlay_2": {
"inputs": {
"nixpkgs": "nixpkgs_9"
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1765593578,
"narHash": "sha256-qbl874bCIy9+OLImdfBfZ9ITUDDjjTAB04Dk4PlZFV0=",
"lastModified": 1765334520,
"narHash": "sha256-jTof2+ir9UPmv4lWksYO6WbaXCC0nsDExrB9KZj7Dz4=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "348b94ed9ddffccdf1a65582a2dcff0a4a3eeeb4",
"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",
"rev": "db61f666aea93b28f644861fbddd37f235cc5983",
"type": "github"
},
"original": {
@@ -1532,7 +1579,9 @@
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay_2"
"rust-overlay": [
"rust-overlay"
]
},
"locked": {
"lastModified": 1765657698,
@@ -1552,7 +1601,7 @@
"inputs": {
"buildbot-nix": "buildbot-nix",
"nix-writers": "nix-writers",
"nixpkgs": "nixpkgs_10"
"nixpkgs": "nixpkgs_9"
},
"locked": {
"lastModified": 1763891069,
@@ -1729,7 +1778,7 @@
},
"telebots_2": {
"inputs": {
"nixpkgs": "nixpkgs_11"
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1765657917,
@@ -1782,7 +1831,9 @@
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay_3"
"rust-overlay": [
"rust-overlay"
]
},
"locked": {
"lastModified": 1765658153,
@@ -1960,7 +2011,7 @@
"wallpaper-generator_2": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_13"
"nixpkgs": "nixpkgs_11"
},
"locked": {
"lastModified": 1615819231,

184
flake.nix
View File

@@ -10,7 +10,7 @@
home-manager.url = "github:nix-community/home-manager/release-25.11";
menstruation-backend.url = "github:kmein/menstruation.rs";
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";
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
@@ -18,6 +18,7 @@
nur.url = "github:nix-community/NUR";
recht.url = "github:kmein/recht";
retiolum.url = "github:krebs/retiolum";
rust-overlay.url = "github:oxalica/rust-overlay";
scripts.url = "github:kmein/scripts";
stockholm.url = "github:krebs/stockholm";
stylix.url = "github:danth/stylix/release-25.11";
@@ -27,18 +28,25 @@
wallpaper-generator.url = "github:pinpox/wallpaper-generator/v1.1";
wallpapers.url = "github:kmein/wallpapers";
autorenkalender.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.home-manager.follows = "home-manager";
agenix.inputs.nixpkgs.follows = "nixpkgs";
autorenkalender.inputs.nixpkgs.follows = "nixpkgs";
coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# menstruation-backend.inputs.flake-utils.follows = "flake-utils";
# menstruation-backend.inputs.nixpkgs.follows = "nixpkgs";
# menstruation-backend.inputs.rust-overlay.follows = "rust-overlay";
menstruation-telegram.inputs.menstruation-backend.follows = "menstruation-backend";
menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
nix-on-droid.inputs.home-manager.follows = "home-manager";
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
recht.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
scripts.inputs.nixpkgs.follows = "nixpkgs";
scripts.inputs.rust-overlay.follows = "rust-overlay";
stylix.inputs.nixpkgs.follows = "nixpkgs";
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
tinc-graph.inputs.rust-overlay.follows = "rust-overlay";
voidrice.flake = false;
wallpapers.flake = false;
};
@@ -54,7 +62,7 @@
retiolum,
nixinate,
flake-utils,
nix-index-database,
nix-on-droid,
stylix,
...
}:
@@ -64,6 +72,20 @@
in
{
apps = {
x86_64-darwin =
let
pkgs = nixpkgs.legacyPackages.x86_64-darwin;
in
{
deploy-maakaron = {
type = "app";
program = toString (
pkgs.writers.writeDash "deploy-maakaron" ''
exec $(nix build .#homeConfigurations.maakaron.activationPackage --no-link --print-out-paths)/activate
''
);
};
};
x86_64-linux =
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
@@ -85,6 +107,7 @@
map (
hostname:
let
externalNetwork = import ./lib/external-network.nix;
targets = {
ful = "root@ful";
zaatar = "root@zaatar";
@@ -130,6 +153,7 @@
# TODO remove flake-utils dependency from my own repos
nixosModules = {
htgen = import modules/htgen.nix;
moodle-dl = import modules/moodle-dl.nix;
networkmanager-declarative = import modules/networkmanager-declarative.nix;
passport = import modules/passport.nix;
@@ -144,6 +168,38 @@
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
niveumSpecialArgs = system: {
unstablePackages = import nixpkgs-unstable {
@@ -169,6 +225,7 @@
inputs.self.nixosModules.passport
inputs.self.nixosModules.panoptikon
inputs.self.nixosModules.go-webring
inputs.self.nixosModules.htgen
inputs.stockholm.nixosModules.reaktor2
retiolum.nixosModules.retiolum
nur.modules.nixos.default
@@ -210,6 +267,7 @@
modules = [
systems/makanek/configuration.nix
inputs.self.nixosModules.telegram-bot
inputs.self.nixosModules.htgen
inputs.self.nixosModules.passport
agenix.nixosModules.default
retiolum.nixosModules.retiolum
@@ -242,7 +300,6 @@
agenix.nixosModules.default
retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager
nix-index-database.nixosModules.default
nur.modules.nixos.default
stylix.nixosModules.stylix
];
@@ -256,7 +313,6 @@
retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager
nur.modules.nixos.default
nix-index-database.nixosModules.default
stylix.nixosModules.stylix
];
};
@@ -269,7 +325,6 @@
retiolum.nixosModules.retiolum
home-manager.nixosModules.home-manager
nur.modules.nixos.default
nix-index-database.nixosModules.default
stylix.nixosModules.stylix
];
};
@@ -282,11 +337,14 @@
overlays = [
nur.overlays.default
(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 "$@"'';
})
];
};
unstablePackages = import nixpkgs-unstable {
inherit system;
};
wrapScript = {
packages ? [],
name,
@@ -294,104 +352,112 @@
}:
pkgs.writers.writeDashBin name ''PATH=$PATH:${nixpkgs.lib.makeBinPath (packages ++ [pkgs.findutils pkgs.coreutils pkgs.gnused pkgs.gnugrep])} ${script} "$@"'';
in {
# linguistics and ancient world
auc = pkgs.callPackage packages/auc.nix {};
betacode = pkgs.callPackage packages/betacode.nix {};
brassica = pkgs.callPackage packages/brassica.nix {}; # TODO upstream
devanagari = pkgs.callPackage packages/devanagari {};
stardict-tools = pkgs.callPackage packages/stardict-tools.nix {};
heuretes = pkgs.callPackage packages/heuretes.nix {};
ipa = pkgs.writers.writePython3Bin "ipa" {flakeIgnore = ["E501"];} (builtins.readFile packages/ipa.py);
jsesh = pkgs.callPackage packages/jsesh.nix {}; # TODO upstream
kirciuoklis = pkgs.callPackage packages/kirciuoklis.nix {};
polyglot = pkgs.callPackage packages/polyglot.nix {};
tocharian-font = pkgs.callPackage packages/tocharian-font.nix {};
gfs-fonts = pkgs.callPackage packages/gfs-fonts.nix {};
closest = pkgs.callPackage packages/closest {};
# lit
random-zeno = pkgs.callPackage packages/random-zeno.nix {};
literature-quote = pkgs.callPackage packages/literature-quote.nix {};
# krebs
brainmelter = pkgs.callPackage packages/brainmelter.nix {};
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {};
hc = pkgs.callPackage packages/hc.nix {};
kpaste = pkgs.callPackage packages/kpaste.nix {};
pls = pkgs.callPackage packages/pls.nix {};
untilport = pkgs.callPackage packages/untilport.nix {};
radio-news = pkgs.callPackage packages/radio-news.nix {};
# window manager
swallow = pkgs.callPackage packages/swallow.nix {};
devour = pkgs.callPackage packages/devour.nix {};
brassica = pkgs.callPackage packages/brassica.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 {};
cyberlocker-tools = pkgs.callPackage packages/cyberlocker-tools.nix {};
default-gateway = pkgs.callPackage packages/default-gateway.nix {};
depp = pkgs.callPackage packages/depp.nix {};
dashboard = pkgs.callPackage packages/dashboard {};
devanagari = pkgs.callPackage packages/devanagari {};
devour = pkgs.callPackage packages/devour.nix {};
dic = pkgs.callPackage packages/dic.nix {};
dirmir = pkgs.callPackage packages/dirmir.nix {};
dmenu-bluetooth = pkgs.callPackage packages/dmenu-bluetooth.nix {};
dmenu-scrot = pkgs.callPackage packages/dmenu-scrot.nix {};
dns-sledgehammer = pkgs.callPackage packages/dns-sledgehammer.nix {};
fkill = pkgs.callPackage packages/fkill.nix {};
fzfmenu = pkgs.callPackage packages/fzfmenu.nix {};
genius = pkgs.callPackage packages/genius.nix {};
gfs-fonts = pkgs.callPackage packages/gfs-fonts.nix {};
git-preview = pkgs.callPackage packages/git-preview.nix {};
gpt35 = pkgs.callPackage packages/gpt.nix {model = "gpt-3.5-turbo";};
gpt4 = pkgs.callPackage packages/gpt.nix {model = "gpt-4";};
hc = pkgs.callPackage packages/hc.nix {};
jq-lsp = pkgs.callPackage packages/jq-lsp.nix {};
stardict-tools = pkgs.callPackage packages/stardict-tools.nix {};
heuretes = pkgs.callPackage packages/heuretes.nix {};
htgen = pkgs.callPackage packages/htgen.nix {};
image-convert-favicon = pkgs.callPackage packages/image-convert-favicon.nix {};
image-convert-tolino = pkgs.callPackage packages/image-convert-tolino.nix {};
infschmv = pkgs.callPackage packages/infschmv.nix {};
iolanguage = pkgs.callPackage packages/iolanguage.nix {};
ipa = pkgs.writers.writePython3Bin "ipa" {flakeIgnore = ["E501"];} (builtins.readFile packages/ipa.py);
ix = pkgs.callPackage packages/ix.nix {};
jsesh = pkgs.callPackage packages/jsesh.nix {};
k-lock = pkgs.callPackage packages/k-lock.nix {};
kirciuoklis = pkgs.callPackage packages/kirciuoklis.nix {};
klem = pkgs.callPackage packages/klem.nix {};
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 {};
mansplain = pkgs.callPackage packages/mansplain.nix {};
manual-sort = pkgs.callPackage packages/manual-sort.nix {};
menu-calc = pkgs.callPackage packages/menu-calc.nix {};
meteo = pkgs.callPackage packages/meteo.nix {};
noise-waves = pkgs.callPackage packages/noise-waves.nix {};
mpv-radio = pkgs.callPackage packages/mpv-radio.nix {di-fm-key-file = "/dev/null";};
mpv-tuner = pkgs.callPackage packages/mpv-tuner.nix {di-fm-key-file = "/dev/null";};
mpv-tv = pkgs.callPackage packages/mpv-tv.nix {};
mpv-iptv = pkgs.callPackage packages/mpv-iptv.nix {};
mpv-visualizer = unstablePackages.mpvScripts.visualizer;
new-mac = pkgs.callPackage packages/new-mac.nix {};
nix-git = pkgs.callPackage packages/nix-git.nix {};
nix-index-update = pkgs.callPackage packages/nix-index-update.nix {inherit system;};
notemenu = pkgs.callPackage packages/notemenu.nix {niveumPackages = self.packages.${system};};
opustags = pkgs.callPackage packages/opustags.nix {}; # 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 {};
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 {};
gimp = pkgs.callPackage packages/gimp.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 {};
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 {};
unicodmenu = pkgs.callPackage packages/unicodmenu.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 {};
vim = pkgs.callPackage packages/vim.nix {niveumPackages = self.packages.${system};};
obsidian-vim = pkgs.callPackage packages/obsidian-vim.nix {};
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {}; # TODO upstream
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {}; # TODO upstream
vimPlugins-typst-vim = pkgs.callPackage packages/vimPlugins/typst-vim.nix {}; # TODO upstream
vimPlugins-mdwa-nvim = pkgs.callPackage packages/vimPlugins/mdwa-nvim.nix {}; # TODO upstream
vimPlugins-vim-ernest = pkgs.callPackage packages/vimPlugins/vim-ernest.nix {}; # TODO upstream
vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix {}; # TODO upstream
vimPlugins-vim-colors-paramount = pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix {}; # TODO upstream
vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix {}; # TODO upstream
vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix {}; # TODO upstream
vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix {}; # TODO upstream
vimPlugins-vim-reason-plus = pkgs.callPackage packages/vimPlugins/vim-reason-plus.nix {}; # TODO upstream
radio-news = pkgs.callPackage packages/radio-news.nix {};
vimPlugins-cheat-sh-vim = pkgs.callPackage packages/vimPlugins/cheat-sh.nix {};
vimPlugins-icalendar-vim = pkgs.callPackage packages/vimPlugins/icalendar-vim.nix {};
vimPlugins-jq-vim = pkgs.callPackage packages/vimPlugins/jq-vim.nix {};
vimPlugins-typst-vim = pkgs.callPackage packages/vimPlugins/typst-vim.nix {};
vimPlugins-mdwa-nvim = pkgs.callPackage packages/vimPlugins/mdwa-nvim.nix {};
vimPlugins-vim-ernest = pkgs.callPackage packages/vimPlugins/vim-ernest.nix {};
vimPlugins-vim-256noir = pkgs.callPackage packages/vimPlugins/vim-256noir.nix {};
vimPlugins-vim-colors-paramount = pkgs.callPackage packages/vimPlugins/vim-colors-paramount.nix {};
vimPlugins-vim-fetch = pkgs.callPackage packages/vimPlugins/vim-fetch.nix {};
vimPlugins-vim-fsharp = pkgs.callPackage packages/vimPlugins/vim-fsharp.nix {};
vimPlugins-vim-mail = pkgs.callPackage packages/vimPlugins/vim-mail.nix {};
vimPlugins-vim-reason-plus = pkgs.callPackage packages/vimPlugins/vim-reason-plus.nix {};
vimv = pkgs.callPackage packages/vimv.nix {};
weechat-declarative = pkgs.callPackage packages/weechat-declarative.nix {}; # TODO upstream
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {}; # TODO upstream
dmenu-randr = pkgs.callPackage packages/dmenu-randr.nix {};
wttr = pkgs.callPackage packages/wttr.nix {}; # TODO upstream
weechat-declarative = pkgs.callPackage packages/weechat-declarative.nix {};
weechatScripts-hotlist2extern = pkgs.callPackage packages/weechatScripts/hotlist2extern.nix {};
wttr = pkgs.callPackage packages/wttr.nix {};
booksplit = wrapScript {
script = inputs.voidrice.outPath + "/.local/bin/booksplit";
name = "booksplit";
packages = [pkgs.ffmpeg pkgs.glibc.bin];
};
dmenu-randr = pkgs.callPackage packages/dmenu-randr.nix {};
tag = wrapScript {
script = inputs.voidrice.outPath + "/.local/bin/tag";
name = "tag";

View File

@@ -85,6 +85,9 @@ let
big-fm-name = name: "${name} | bigFM";
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: "https://www.rte.ie/manifests/${name}.m3u8";
@@ -1204,6 +1207,198 @@ in
logo = "https://cdn.schlagerparadies.de/images/rsp_setup/logo-radio-schlagerparadies.svg";
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";
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í!";
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";
station = "Asima";
@@ -1353,11 +1554,6 @@ in
desc = "Ohne Blatt vor dem Mund! Für alle, die aufwachen wollen.";
tags = [tags.text];
}
{
station = "NIUS";
stream = "https://nius.stream25.radiohost.de/live_mp3-192";
tags = [tags.text];
}
{
station = "Kontrafunk";
stream = "https://icecast.multhielemedia.de/listen/kontrafunk/radio.mp3";
@@ -1453,6 +1649,21 @@ in
station = "ERTU Al Quran Al Kareem";
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/";
station = "Radio Mozart Italia";
@@ -1460,6 +1671,12 @@ in
desc = "Emittente ufficiale delle Associazioni Mozart Italia nel mondo";
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";
station = "Peaceful Piano";
@@ -1629,6 +1846,11 @@ in
stream = "https://playerservices.streamtheworld.com/api/livestream-redirect/KAN_88.mp3";
tags = [tags.hebrew];
}
{
station = "Digital Impulse Classical Channel";
stream = "http://orion.shoutca.st:8978/stream";
tags = [tags.classical];
}
{
station = "Старое радио (детское)";
stream = "http://195.91.237.50:8000/detskoe128";
@@ -1699,23 +1921,18 @@ in
stream = "http://cw.dimebank.com:8080/CNNfast";
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";
stream = "http://orion.shoutca.st:8978/stream";
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";
tags = [tags.greek tags.turkish];
}
@@ -1769,6 +1986,11 @@ in
stream = "http://s2.voscast.com:12312/;";
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];
stream = "http://tijaniyyah.asuscomm.com:8000/stream/2/";
@@ -1779,6 +2001,16 @@ in
station = "Coptic for God";
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";
station = "radioeins | RBB";
@@ -1793,17 +2025,9 @@ in
stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3";
station = "Hitradio FFH";
}
{
stream = "https://mp3.planetradio.de/planetradio/hqlivestream.aac";
station = "planet radio";
}
{ # Lex Fridman's favourite
stream = "av://lavfi:anoisesrc=color=brown";
station = "Brown noise";
}
{
stream = "av://lavfi:anoisesrc=color=pink";
station = "Pink noise";
station = "Brownian noise";
}
{
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

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

View File

@@ -1,10 +1,10 @@
{ coreutils, chromium }:
chromium.override {
commandLineArgs = [
"--disable-sync"
"--no-default-browser-check"
"--no-first-run"
"--user-data-dir=$(${coreutils}/bin/mktemp -d)"
"--incognito"
];
}
{ writers, chromium }:
writers.writeDashBin "cro" ''
${chromium}/bin/chromium \
--disable-sync \
--no-default-browser-check \
--no-first-run \
--user-data-dir="$(mktemp -d)" \
--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,
fetchurl,
xan,
util-linux,
}: let
database = fetchurl {
url = "http://c.krebsco.de/greek.csv";
@@ -10,5 +9,5 @@
};
in
writers.writeDashBin "heuretes" ''
${xan}/bin/xan search -s simple "$*" ${database} | ${util-linux}/bin/column -s, -t
${xan}/bin/xan search -s simple "^$*$" ${database} | ${xan}/bin/xan table
''

31
packages/htgen.nix Normal file
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,
curl,
pup,
gawk,
gnused,
gnugrep,
less,
fzf,
}:

Submodule secrets updated: 3f3a8d1334...236a3353a7

View File

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

View File

@@ -15,7 +15,6 @@ in {
./go-webring.nix
./gemini.nix
./wallabag.nix
./nethack.nix
../../configs/monitoring.nix
../../configs/mycelium.nix
../../configs/tor.nix

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

@@ -79,6 +79,7 @@
niveumPackages.mpv-tv
telegram-desktop
(niveumPackages.mpv-radio.override { di-fm-key-file = config.age.secrets.di-fm-key.path; })
niveumPackages.meteo
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 = {
USER_DEFINED_DEFAULT = true;
};
instances = let instance = "gitea"; in {
${instance}.settings = {
BIND = "/run/anubis/anubis-${instance}/anubis.sock";
METRICS_BIND = "/run/anubis/anubis-${instance}/anubis-metrics.sock";
instances = {
"gitea".settings = {
TARGET = "http://localhost:${toString config.services.gitea.settings.server.HTTP_PORT}";
USER_DEFINED_INSTANCE = true;
OG_PASSTHROUGH = true;

View File

@@ -3,8 +3,7 @@
pkgs,
lib,
...
}:
let
}: let
tarotPort = 7407;
tarotFiles = pkgs.fetchzip {
url = "https://c.krebsco.de/tarot.zip";
@@ -15,45 +14,33 @@ let
url = "http://c.krebsco.de/tarot.pdf";
sha256 = "1n2m53kjg2vj9dbr70b9jrsbqwdfrcb48l4wswn21549fi24g6dx";
};
in
{
systemd.services.tarot = {
enable = true;
serviceConfig.Type = "simple";
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = pkgs.writers.writePython3 "tarot-server" {
libraries = py: [ py.pillow py.flask ];
} ''
from flask import Flask, send_file
from pathlib import Path
from random import choice, randint
from io import BytesIO
from PIL import Image
app = Flask(__name__)
TAROT_DIR = Path("${tarotFiles}")
@app.route("/")
def tarot():
card_path = choice(list(TAROT_DIR.glob("*")))
with Image.open(card_path) as img:
if randint(0, 1):
img = img.rotate(180)
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})
'';
in {
services.htgen.tarot = {
port = tarotPort;
script = ''. ${pkgs.writers.writeDash "tarot" ''
case "$Method $Request_URI" in
"GET /")
if item=$(${pkgs.findutils}/bin/find ${toString tarotFiles} -type f | ${pkgs.coreutils}/bin/shuf -n1); then
card=$(mktemp --tmpdir tarot.XXX)
trap 'rm $card' EXIT
reverse=$(${pkgs.coreutils}/bin/shuf -i0-1 -n1)
if [ "$reverse" -eq 1 ]; then
${pkgs.imagemagick}/bin/convert -rotate 180 "$item" "$card"
else
${pkgs.coreutils}/bin/cp "$item" "$card"
fi
printf 'HTTP/1.1 200 OK\r\n'
printf 'Content-Type: %s\r\n' "$(${pkgs.file}/bin/file -ib "$card")"
printf 'Server: %s\r\n' "$Server"
printf 'Connection: close\r\n'
printf 'Content-Length: %d\r\n' $(${pkgs.coreutils}/bin/wc -c < "$card")
printf '\r\n'
cat "$card"
exit
fi
;;
esac
''}'';
};
niveum.passport.services = [
@@ -68,7 +55,7 @@ in
enableACME = true;
forceSSL = true;
locations = {
"/".proxyPass = "http://127.0.0.1:${toString tarotPort}/";
"/".proxyPass = "http://127.0.0.1:${toString tarotPort}";
"/files/" = {
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;
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 = {
backend = "podman";
containers.homeassistant = {
@@ -116,9 +82,6 @@ in {
"${playlistDirectoryPath}:/media"
"/run/dbus:/run/dbus:ro"
];
# needed for bluetooth
capabilities.NET_ADMIN = true;
capabilities.NET_RAW = true;
environment.TZ = "Europe/Berlin";
image = "ghcr.io/home-assistant/home-assistant:stable";
extraOptions = [