mirror of
https://github.com/kmein/niveum
synced 2026-03-16 18:21:07 +01:00
Compare commits
196 Commits
20.09
...
7c67d3f88a
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c67d3f88a | |||
| 0d20cded25 | |||
| 6c1e8368a1 | |||
| ac1a7ac37e | |||
| 85a6001b53 | |||
| 4e107f3df7 | |||
| 37880ae746 | |||
| 155722a8cd | |||
| 73d71498c7 | |||
| e9b5c2623d | |||
| ddc4ca0db4 | |||
| 8fbaed35f8 | |||
| 87042f5409 | |||
| a9b1a03af1 | |||
| 010d620b76 | |||
| 18033c0e54 | |||
| 5cdf3637a5 | |||
| 9192fa458b | |||
| 40472e2ff8 | |||
| a592947bbf | |||
| 444336cd19 | |||
| 6ef578d644 | |||
| 8e19069d4c | |||
| 42df0dc7df | |||
| d6c10df13e | |||
| 8cbbb4b50d | |||
| bc23d7ac24 | |||
| 40f31fa316 | |||
| f73d8725c4 | |||
| 97fc0f82bf | |||
| ef3d6c4eaf | |||
| c6d7dbe787 | |||
| b9149c8d9a | |||
| 36502ecfd8 | |||
| 43fd4bbf19 | |||
| 37e851cc50 | |||
| 018f79f88d | |||
| 6843ac90b5 | |||
| afb69bf334 | |||
| ea57f539b0 | |||
| 3d10ac09ab | |||
| 38f088d9e5 | |||
| 422f2b8676 | |||
| 7c1ca72a29 | |||
| f171284b71 | |||
| ca50ba931a | |||
| 63ad607d46 | |||
| e553f1bcda | |||
| 8923f7a2c9 | |||
| 07024df1c9 | |||
| cb9bcf2d1d | |||
| 7aeda72026 | |||
| 95c93cc565 | |||
| c9979de250 | |||
| 7889d56b99 | |||
| 03be9636ad | |||
| 5d36ed4cd6 | |||
| c33446aee3 | |||
| fe7744bedb | |||
| 9673e9d3e8 | |||
| 5175f3f819 | |||
| 5923f3341a | |||
| 901cf6f711 | |||
| 859e536159 | |||
| 4ea18d0152 | |||
| c7c7017070 | |||
| 7c80f160db | |||
| 6fce803c70 | |||
| a6bff424b0 | |||
| d61b17c656 | |||
| cbdf8ef038 | |||
| 876dbe785b | |||
| fb4a14a6bf | |||
| 02977ea936 | |||
| dcca34d5c1 | |||
| 8bd8ec611f | |||
| 96a67a937e | |||
| fb85c29651 | |||
| 3344af5339 | |||
| fdfd8a687f | |||
| e804da180d | |||
| 2af8e1aa86 | |||
| 10224de58a | |||
| 2bf095c553 | |||
| a7d994abe7 | |||
| 680997fb12 | |||
| a2d1ab6f53 | |||
| 52761a13e2 | |||
| 98f7de9680 | |||
| 72f04f9391 | |||
| 10ad21a39c | |||
| 5c9e25f27a | |||
| 4b563ddf00 | |||
| d041e6fa52 | |||
| 8749646101 | |||
| 960311c65f | |||
| a70f05239a | |||
| d716e5716f | |||
| 2781930ecf | |||
| f34a938968 | |||
| 080439604b | |||
| 72df03fbf6 | |||
| b799e7c26f | |||
| 2a450e2f36 | |||
| 485e07ec9e | |||
| dcf3452353 | |||
| edc8e83594 | |||
| 01bc8178ad | |||
| eff303a854 | |||
| bc992a170c | |||
| 78e9bedcb4 | |||
| d5cdbf3795 | |||
| bcb5949e15 | |||
| dd61883648 | |||
| 1d7a432bec | |||
| 0e7652ff46 | |||
| a96c0d9ab3 | |||
| 82bb2d9f17 | |||
| 4fa0256095 | |||
| 2915594238 | |||
| cf48d89ea6 | |||
| 37f570a979 | |||
| f8af039913 | |||
| 46882af11e | |||
| 2c5d2f4add | |||
| bd089bd408 | |||
| fce8d15356 | |||
| acec2505e4 | |||
| 218c251d31 | |||
| 8cda7861f9 | |||
| a35c883eca | |||
| db61bc4b91 | |||
| 43fc9ebba2 | |||
| 23d60233a0 | |||
| f2fcc3be9a | |||
| 30e3baa335 | |||
| 616a530c64 | |||
| e5d437949b | |||
| 80c3b143ca | |||
| 263a732580 | |||
| c638ef93f5 | |||
| 69c2f506ae | |||
| db4857c86d | |||
| 6668542d53 | |||
| 561faed161 | |||
| 36ed681e99 | |||
| be84688b63 | |||
| de296c4e62 | |||
| d7807ba1b9 | |||
| 51fba9baa6 | |||
| a0fb2bd819 | |||
| a0830070f3 | |||
| c860529161 | |||
| 03461dcaaa | |||
| 1cd7039759 | |||
| af0806b766 | |||
| bd8960fd44 | |||
| 1bc90b2e84 | |||
| d2939795ac | |||
| 4a4d5a148d | |||
| f30cfbf142 | |||
| 15bda4721d | |||
| 4d610461b8 | |||
| eed54d1593 | |||
| ddec0551e8 | |||
| b0f2a74372 | |||
| 65584ec52f | |||
| 96f5d750ef | |||
| 77e97e84a9 | |||
| 96cb298584 | |||
| 5dc561da83 | |||
| b8c79fd21c | |||
| a98333a6b8 | |||
| fa5fe37610 | |||
| 0be0356005 | |||
| 394615168d | |||
| b6e77f77af | |||
| d7727433fd | |||
| 3f02559da2 | |||
| e7c801b6c4 | |||
| 3092fcda85 | |||
| 43a1ecedac | |||
| da55a342e3 | |||
| 48fcb08427 | |||
| a0855f8bbb | |||
| 3efb4682f2 | |||
| 048429f593 | |||
| 59cacae72e | |||
| 420245231a | |||
| 2911972900 | |||
| 5efcb813f0 | |||
| fd8f5d3a5c | |||
| 3508575ebe | |||
| 3741304284 | |||
| 6bfaf551d2 | |||
| 423cb074a0 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,6 +1,5 @@
|
||||
secrets.nix
|
||||
result
|
||||
.direnv
|
||||
.envrc
|
||||
.history
|
||||
**/*.bak
|
||||
.todo
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
x 2020-04-27 2019-08-27 fix offlineimap password
|
||||
x 2020-04-27 2019-07-09 @package fzf wrappers
|
||||
@@ -1,6 +0,0 @@
|
||||
(C) 2019-08-25 environment.etc."sshd/banner-line".text = config.networking.hostName;
|
||||
(C) 2019-08-25 fix man-pdf: man-pdf 1p env, man-pdf env: man $options -t $command | ps2pdf - $command.pdf
|
||||
|
||||
|
||||
(A) 2019-08-26 run services as their own @users
|
||||
(A) use lassulus xdg-open wrapper https://cgit.krebsco.de/stockholm/tree/lass/2configs/xdg-open.nix
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"url": "https://github.com/rycee/home-manager.git",
|
||||
"rev": "abaebf3b346c4bef500c5bd2fdebbed109261a0c",
|
||||
"date": "2020-10-25T19:44:12+01:00",
|
||||
"sha256": "1gcv2ni4nsicpmi4ain568msvgxch8cj04fxf6qgvhdklmh2y84k",
|
||||
"fetchSubmodules": false
|
||||
"url": "https://github.com/nix-community/home-manager.git",
|
||||
"rev": "209566c752c4428c7692c134731971193f06b37c",
|
||||
"date": "2021-02-09T15:29:47-05:00",
|
||||
"path": "/nix/store/fslcg7lcxr87ca3ccqd1jcahjlq3ak44-home-manager",
|
||||
"sha256": "1canlfkm09ssbgm3hq0kb9d86bdh84jhidxv75g98zq5wgadk7jm",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
"url": "https://cgit.krebsco.de/krops",
|
||||
"rev": "55aa2c77ce8183f3d2b24f54efa33ab6a42e1e02",
|
||||
"date": "2020-04-19T01:06:20+02:00",
|
||||
"path": "/nix/store/08wg2yrcgkr6iwipjd6g0fbwb7gacqax-krops",
|
||||
"sha256": "00rvx9h596ync8wgic6xc9srzajzm28wlp9q7mv4z0jsb27l5bj8",
|
||||
"fetchSubmodules": false
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"url": "https://github.com/NixOS/nixpkgs.git",
|
||||
"rev": "95d26c9a9f2a102e25cf318a648de44537f42e09",
|
||||
"date": "2020-10-24T10:37:53+02:00",
|
||||
"sha256": "0ymhj252dq7z2ajdjsdz99h106ylm4vsmz5v3xiwsylcs4bz2nl8",
|
||||
"fetchSubmodules": false
|
||||
"rev": "2118cf551b9944cfdb929b8ea03556f097dd0381",
|
||||
"date": "2021-02-13T10:35:51+01:00",
|
||||
"path": "/nix/store/mk9v88y4dn54i22h5n6g7kmqyc998rf9-nixpkgs",
|
||||
"sha256": "0ajsxh1clbf3q643gi8v6b0i0nn358hak0f265j7c1lrsbxyw457",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"url": "https://github.com/krebs/retiolum",
|
||||
"rev": "21244d55c10234b09a9f121015de1175f5facc69",
|
||||
"date": "2020-10-25T17:02:11+01:00",
|
||||
"sha256": "0jzifani14rd68zv728mjq97p04njk8syrqbmn2vjd3plphvl5y5",
|
||||
"fetchSubmodules": false
|
||||
"rev": "0afb48d07db8840076a96e62fff954d068c0e3b6",
|
||||
"date": "2021-02-13T20:32:12+01:00",
|
||||
"path": "/nix/store/0gif6j27nxdjyhgd0pqq31a3ni3pmixp-retiolum",
|
||||
"sha256": "1s68jk6wi4l6sqv0p83w2gg6p9z8v9i02kmnyjbj3gzhmf0c06na",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"url": "https://cgit.krebsco.de/stockholm",
|
||||
"rev": "b034f63f7a2e4361b32c33c0e1a980eecf1a5aa6",
|
||||
"date": "2020-10-17T01:00:54+02:00",
|
||||
"sha256": "1ji45h7xp3za5lq9qdg3f8gldrvqfpr8grinblzvf9iqxjgidr68",
|
||||
"fetchSubmodules": false
|
||||
"url": "https://github.com/kmein/stockholm",
|
||||
"rev": "f0325bef7954cb946674050847c6d52112cb658f",
|
||||
"date": "2020-11-11T07:45:58+01:00",
|
||||
"path": "/nix/store/lka6fhjfbwdx9bc7lk1bz4gizdv7nrbm-stockholm",
|
||||
"sha256": "0gbw6n5yq36ysc30afa5d2dbsl2d46f73ms6f0rprdbr4nhdw8l2",
|
||||
"fetchSubmodules": false,
|
||||
"deepClone": false,
|
||||
"leaveDotGit": false
|
||||
}
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) colours;
|
||||
colourNames =
|
||||
[ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
|
||||
colours = lib.getAttrs colourNames config.niveum.colours;
|
||||
colourPairs = lib.getAttrs colourNames colours;
|
||||
alacrittyConfig = {
|
||||
background_opacity = 0.9;
|
||||
colors = {
|
||||
primary = { inherit (config.niveum.colours) background foreground; };
|
||||
normal = lib.mapAttrs (_: colour: colour.dark) colours;
|
||||
bright = lib.mapAttrs (_: colour: colour.bright) colours;
|
||||
primary = { inherit (colours) background foreground; };
|
||||
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
|
||||
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
|
||||
};
|
||||
font = {
|
||||
normal.family = "Monospace";
|
||||
size = config.niveum.fonts.size - 2;
|
||||
size = 6;
|
||||
};
|
||||
key_bindings = [
|
||||
{
|
||||
@@ -36,7 +37,7 @@ in {
|
||||
environment.variables.TERMINAL = "alacritty";
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.unstable.alacritty
|
||||
pkgs.alacritty
|
||||
];
|
||||
|
||||
home-manager.users.me.xdg.configFile = {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
# "ihlenndgcmojhcghmfjfneahoeklbjjh" # cVim
|
||||
# "fpnmgdkabkmnadcjpehmlllkndpkmiak" # Wayback Machine
|
||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
|
||||
"khncfooichmfjbepaaaebmommgaepoid" # Remove YouTube Recommended Videos
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
'';
|
||||
|
||||
home-manager.users.me = {
|
||||
services.nextcloud-client.enable = true;
|
||||
services.nextcloud-client.enable = false;
|
||||
};
|
||||
|
||||
services.syncthing = rec {
|
||||
@@ -28,26 +28,18 @@
|
||||
declarative = rec {
|
||||
cert = toString <system-secrets/syncthing/cert.pem>;
|
||||
key = toString <system-secrets/syncthing/key.pem>;
|
||||
devices = {
|
||||
homeros.id =
|
||||
"HSOL72W-MMN346W-C3WCWCH-OTRKJYG-MY2WWV6-P7JUHN7-5WYYYRV-ZMH4KAA";
|
||||
scardanelli.id =
|
||||
"7CZYHEX-3CSFDQU-PEEMYHG-6XGQ2ZD-KGVUWH5-GFRB2XK-FP57ERX-7APZUQU";
|
||||
rilke.id =
|
||||
"NYNNHXP-7JMSTXG-SVNOPWD-RWXCCCL-CBOVBEI-X4QPLF4-NJA5G2P-RSGYRQQ";
|
||||
wilde.id =
|
||||
"R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||
heym.id =
|
||||
"HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
||||
};
|
||||
inherit ((import <niveum/lib>).syncthing) devices;
|
||||
folders =
|
||||
let syncthing-dir = "${config.users.users.me.home}/cloud/syncthing";
|
||||
let cloud-dir = "${config.users.users.me.home}/cloud";
|
||||
in {
|
||||
"${syncthing-dir}/common".devices =
|
||||
[ "homeros" "scardanelli" "wilde" ];
|
||||
"${syncthing-dir}/library".devices = lib.attrNames devices;
|
||||
"${syncthing-dir}/mundoiu".devices = lib.attrNames devices;
|
||||
"${syncthing-dir}/music".devices = lib.attrNames devices;
|
||||
"${cloud-dir}/syncthing/common".devices = [ "wilde" "manakish" ];
|
||||
"${cloud-dir}/syncthing/library".devices = [ "wilde" "manakish" "heym" ];
|
||||
"${cloud-dir}/syncthing/mundoiu".devices = [ "wilde" "manakish" "heym" ];
|
||||
"${cloud-dir}/syncthing/music".devices = [ "wilde" "manakish" "heym" ];
|
||||
"${cloud-dir}/moodle" = {
|
||||
devices = [ "wilde" "toum" "manakish" ];
|
||||
id = "moodle-dl";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,40 +1,14 @@
|
||||
{ pkgs, lib, config, options, ... }:
|
||||
let
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import <niveum/lib>) localAddresses;
|
||||
inherit (import <niveum/lib>) localAddresses kieran;
|
||||
in {
|
||||
imports = [
|
||||
<niveum/modules/constants.nix>
|
||||
<home-manager/nixos>
|
||||
<niveum/modules/system-dependent.nix>
|
||||
{
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
}
|
||||
{
|
||||
niveum.user = {
|
||||
github = "kmein";
|
||||
email = "kmein@posteo.de";
|
||||
name = "Kierán Meinhardt";
|
||||
};
|
||||
|
||||
niveum.applications = rec {
|
||||
fileManager = "$TERMINAL -e ${pkgs.ranger}/bin/ranger";
|
||||
};
|
||||
|
||||
niveum.theme = {
|
||||
gtk = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome3.gnome-themes-extra;
|
||||
};
|
||||
icon = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome3.adwaita-icon-theme;
|
||||
};
|
||||
cursor = {
|
||||
name = "capitaine-cursors-white";
|
||||
package = pkgs.capitaine-cursors;
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
nix.nixPath = [
|
||||
"/var/src"
|
||||
@@ -42,32 +16,18 @@ in {
|
||||
];
|
||||
}
|
||||
{ services.dbus.packages = [ pkgs.gnome3.dconf ]; }
|
||||
{
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "x-www-browser" ''
|
||||
for browser in $BROWSER firefox chromium google-chrome google-chrome-stable opera vivaldi qupzilla iceweasel konqueror firefox-aurora google-chrome-beta opera-beta vivaldi-beta google-chrome-dev opera-developer vivaldi-snapshot luakit midori epiphany lynx w3m dillo elinks vimb; do
|
||||
if command -v $browser > /dev/null 2>&1; then
|
||||
exec $browser "$@"
|
||||
fi
|
||||
done
|
||||
exit 1
|
||||
'')
|
||||
];
|
||||
}
|
||||
{
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
packageOverrides = pkgs: {
|
||||
nur = import (builtins.fetchTarball
|
||||
"https://github.com/nix-community/NUR/archive/aea85375c7a82297d977904de8dd7f41baf2d59a.tar.gz") {
|
||||
"https://github.com/nix-community/NUR/archive/222ea29ec4afb09c5565a7e5dda14bfd65a4a9f6.tar.gz") {
|
||||
inherit pkgs;
|
||||
};
|
||||
writeDashBin = pkgs.writers.writeDashBin;
|
||||
writeDash = pkgs.writers.writeDash;
|
||||
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {
|
||||
scardanelli = config.networking.hostName == "scardanelli";
|
||||
};
|
||||
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {};
|
||||
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> { };
|
||||
ix = pkgs.callPackage <niveum/packages/ix.nix> { };
|
||||
};
|
||||
@@ -88,13 +48,6 @@ in {
|
||||
boot.loader.timeout = 1;
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
|
||||
}
|
||||
{
|
||||
time.timeZone = "Europe/Berlin";
|
||||
location = {
|
||||
latitude = 52.517;
|
||||
longitude = 13.3872;
|
||||
};
|
||||
}
|
||||
{
|
||||
home-manager.users.me = {
|
||||
programs.zathura = {
|
||||
@@ -113,10 +66,11 @@ in {
|
||||
|
||||
users.users.me = {
|
||||
name = "kfm";
|
||||
description = config.niveum.user.name;
|
||||
description = kieran.name;
|
||||
hashedPassword =
|
||||
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
};
|
||||
}
|
||||
{
|
||||
@@ -129,7 +83,7 @@ in {
|
||||
|
||||
users.users.me.extraGroups = [ "audio" ];
|
||||
|
||||
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ];
|
||||
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer pkgs.pulsemixer ];
|
||||
}
|
||||
{
|
||||
environment.interactiveShellInit =
|
||||
@@ -150,29 +104,27 @@ in {
|
||||
cat = "${pkgs.bat}/bin/bat --style=plain";
|
||||
chromium-incognito =
|
||||
"chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito";
|
||||
cp = "cp -i";
|
||||
dig = "dig +short";
|
||||
cp = "cp --interactive";
|
||||
ip = "${pkgs.iproute}/bin/ip -c";
|
||||
l = "${pkgs.exa}/bin/exa -s type -a";
|
||||
la = "${pkgs.exa}/bin/exa -s type -la";
|
||||
ll = "${pkgs.exa}/bin/exa -s type -l";
|
||||
ls = "${pkgs.exa}/bin/exa -s type";
|
||||
mv = "mv -i";
|
||||
l = "ls --color=auto --time-style=long-iso --almost-all";
|
||||
ls = "ls --color=auto --time-style=long-iso";
|
||||
ll = "ls --color=auto --time-style=long-iso -l";
|
||||
la = "ls --color=auto --time-style=long-iso --almost-all -l";
|
||||
mv = "mv --interactive";
|
||||
nixi = "nix repl '<nixpkgs>'";
|
||||
ns = "nix-shell --run zsh";
|
||||
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
||||
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
|
||||
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
|
||||
rm = "rm -i";
|
||||
rm = "rm --interactive";
|
||||
s = "${pkgs.systemd}/bin/systemctl";
|
||||
take = "source ${take}";
|
||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||
tree = "${pkgs.exa}/bin/exa --tree";
|
||||
sxiv = swallow "${pkgs.sxiv}/bin/sxiv";
|
||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||
us = "${pkgs.systemd}/bin/systemctl --user";
|
||||
wcd = "source ${wcd}";
|
||||
weechat = "${pkgs.openssh}/bin/ssh kmein@prism.r -t tmux attach";
|
||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
||||
where = "source ${where}";
|
||||
yt =
|
||||
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
|
||||
@@ -180,50 +132,6 @@ in {
|
||||
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio
|
||||
};
|
||||
}
|
||||
{
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
userControlled.enable = true;
|
||||
networks = {
|
||||
"Aether" = {
|
||||
pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||
priority = 10;
|
||||
};
|
||||
"Asoziales Netzwerk" = {
|
||||
pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6";
|
||||
priority = 10;
|
||||
};
|
||||
"Libertarian WiFi" = {
|
||||
pskRaw = "e9beaae6ffa55d10e80b8a2e7d997411d676a3cc6f1f29d0b080391f04555050";
|
||||
priority = 9;
|
||||
};
|
||||
"EasyBox-927376".pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22";
|
||||
"FlixBus Wi-Fi" = { };
|
||||
"FlixBus" = { };
|
||||
"FlixTrain" = { };
|
||||
"BVG Wi-Fi" = { };
|
||||
"wannseeforum" = { }; # login via curl -XPOST http://WannseeLancom.intern.:80/authen/login/ -d userid=$USER_ID -d password=$PASSWORD
|
||||
"Hotel_Krone" = { }; # login: http://192.168.10.1/
|
||||
"Ni/Schukajlow".pskRaw = "ffc47f6829da59c48aea878a32252223303f5c47a3859edc90971ffc63346781";
|
||||
"WIFIonICE" = { }; # login: http://10.101.64.10/
|
||||
"WLAN-914742".psk = "67647139648174545446";
|
||||
"KDG-CEAA4".psk = "PBkBSmejcvM4";
|
||||
"KDG-4ECF7".psk = "Gdbwh7afw2Bx";
|
||||
"WLAN-XVMU6T".pskRaw =
|
||||
"46ea807283255a3d7029233bd79c18837df582666c007c86a8d591f65fae17cc";
|
||||
"c-base-public" = { };
|
||||
"discord".psk = "baraustrinken";
|
||||
"GoOnline".psk = "airbnbguest";
|
||||
"security-by-obscurity".psk = "44629828256481964386";
|
||||
"Mayflower".psk = "Fr31EsLan";
|
||||
"Born11".psk = "56LMVLbw840EGNWk0RYRqvgicx3FSO";
|
||||
"FactoryCommunityGuest".psk = "Factory4ever";
|
||||
"krebs".psk = "aidsballs";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.wpa_supplicant_gui ];
|
||||
}
|
||||
{ i18n.defaultLocale = "en_GB.UTF-8"; }
|
||||
{ services.illum.enable = true; }
|
||||
{
|
||||
@@ -254,7 +162,10 @@ in {
|
||||
{
|
||||
programs.gnupg.agent.enable = true;
|
||||
|
||||
environment.systemPackages = [ pkgs.gnupg pkgs.pass ];
|
||||
environment.systemPackages = [
|
||||
pkgs.gnupg
|
||||
(pkgs.pass.withExtensions (e: [e.pass-otp]))
|
||||
];
|
||||
}
|
||||
{
|
||||
services.atd.enable = true;
|
||||
@@ -295,25 +206,26 @@ in {
|
||||
./i3.nix
|
||||
./keybase.nix
|
||||
./keyboard.nix
|
||||
./mail.nix
|
||||
./mail/client.nix
|
||||
./mpv.nix
|
||||
./mime.nix
|
||||
./nano.nix
|
||||
./neovim.nix
|
||||
./nix.nix
|
||||
./newsboat.nix
|
||||
./flameshot-once.nix
|
||||
./nixpkgs-unstable.nix
|
||||
./packages
|
||||
./power-action.nix
|
||||
./printing.nix
|
||||
./wallpaper.nix
|
||||
./redshift.nix
|
||||
./retiolum.nix
|
||||
./rofi.nix
|
||||
./spotify.nix
|
||||
./spacetime.nix
|
||||
./ssh.nix
|
||||
./sshd.nix
|
||||
./sudo.nix
|
||||
./sxiv.nix
|
||||
./themes/mac-os.nix
|
||||
./theming.nix
|
||||
./tmux.nix
|
||||
./tor.nix
|
||||
@@ -323,7 +235,7 @@ in {
|
||||
./version.nix
|
||||
./vscode.nix
|
||||
./watson.nix
|
||||
./xautolock.nix
|
||||
./wifi.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
with config.niveum; {
|
||||
let
|
||||
inherit (import <niveum/lib>) defaultApplications colours theme;
|
||||
in {
|
||||
home-manager.users.me.services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = theme.icon;
|
||||
iconTheme = (theme pkgs).icon;
|
||||
settings = {
|
||||
global = {
|
||||
transparency = 10;
|
||||
font = "Sans ${toString fonts.size}";
|
||||
font = "Monospace 8";
|
||||
geometry = "200x5-30+20";
|
||||
frame_color = colours.foreground;
|
||||
follow = "mouse";
|
||||
@@ -31,7 +33,7 @@ with config.niveum; {
|
||||
sticky_history = true;
|
||||
history_length = 20;
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
|
||||
browser = "x-www-browser";
|
||||
browser = (defaultApplications pkgs).browser;
|
||||
verbosity = "mesg";
|
||||
corner_radius = 0;
|
||||
mouse_left_click = "do_action";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) defaultApplications;
|
||||
flameshot-once =
|
||||
pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
|
||||
in {
|
||||
@@ -16,7 +17,7 @@ in {
|
||||
enable = true;
|
||||
createUrl = "http://p.r/image";
|
||||
deleteUrl = "http://p.r/image/delete/%1";
|
||||
xdg-open.browser = "x-www-browser";
|
||||
xdg-open.browser = (defaultApplications pkgs).browser;
|
||||
};
|
||||
config.timeout = 200;
|
||||
})
|
||||
|
||||
@@ -48,6 +48,16 @@ in {
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeDashBin "mpv-simpsons" ''
|
||||
set -efu
|
||||
cd "${flixLocation}/download"
|
||||
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
|
||||
|
||||
cat "${cacheLocation}/${indexFilename}" \
|
||||
| ${pkgs.gnugrep}/bin/grep -i 'simpsons.*mkv' \
|
||||
| shuf \
|
||||
| ${pkgs.findutils}/bin/xargs -d '\n' ${pkgs.mpv}/bin/mpv
|
||||
'')
|
||||
(pkgs.writeDashBin "flixmenu" ''
|
||||
set -efu
|
||||
cd "${flixLocation}/download"
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ pkgs, ... }: {
|
||||
niveum.fonts.size = 9;
|
||||
|
||||
fonts = {
|
||||
enableDefaultFonts = true;
|
||||
enableFontDir = true;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ pkgs, config, lib, ... }: {
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran ignorePaths;
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.mr
|
||||
pkgs.git
|
||||
@@ -6,7 +10,7 @@
|
||||
pkgs.gitAndTools.hub
|
||||
pkgs.gitAndTools.gh
|
||||
pkgs.gitAndTools.git-extras
|
||||
pkgs.unstable.gitAndTools.git-trim
|
||||
pkgs.gitAndTools.git-trim
|
||||
pkgs.gitstats
|
||||
pkgs.patch
|
||||
pkgs.patchutils
|
||||
@@ -53,8 +57,8 @@
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = config.niveum.user.name;
|
||||
userEmail = config.niveum.user.email;
|
||||
userName = kieran.name;
|
||||
userEmail = kieran.email;
|
||||
aliases = {
|
||||
br = "branch";
|
||||
co = "checkout";
|
||||
@@ -69,8 +73,11 @@
|
||||
graph =
|
||||
"log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
};
|
||||
ignores = config.niveum.ignore;
|
||||
ignores = ignorePaths;
|
||||
extraConfig = {
|
||||
pull.ff = "only";
|
||||
rebase.autoStash = true;
|
||||
merge.autoStash = true;
|
||||
core.pager =
|
||||
"${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | ${pkgs.less}/bin/less --tabs=4 -RFX";
|
||||
color = {
|
||||
|
||||
13
configs/gitea.nix
Normal file
13
configs/gitea.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
disableRegistration = true;
|
||||
rootUrl = "https://code.xn--kiern-0qa.de";
|
||||
appName = "code.kierán.de";
|
||||
};
|
||||
services.nginx.virtualHosts."code.xn--kiern-0qa.de" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/".extraConfig = "proxy_pass http://localhost:3000;";
|
||||
};
|
||||
}
|
||||
@@ -4,14 +4,9 @@ let
|
||||
inherit (import <niveum/lib>) localAddresses;
|
||||
in
|
||||
{
|
||||
disabledModules = [
|
||||
"services/misc/home-assistant.nix"
|
||||
];
|
||||
|
||||
imports = [
|
||||
./zigbee.nix
|
||||
./frontend.nix
|
||||
<nixpkgs-unstable/nixos/modules/services/misc/home-assistant.nix>
|
||||
];
|
||||
|
||||
services.home-assistant = {
|
||||
@@ -22,8 +17,8 @@ in
|
||||
config = {
|
||||
homeassistant = {
|
||||
name = "Toum";
|
||||
latitude = 52.461;
|
||||
longitude = 13.378;
|
||||
latitude = config.location.latitude;
|
||||
longitude = config.location.longitude;
|
||||
elevation = 90; # TODO find out how high I live
|
||||
unit_system = "metric";
|
||||
time_zone = config.time.timeZone;
|
||||
@@ -2,15 +2,6 @@ let
|
||||
inherit (import ./lib.nix) triggers;
|
||||
in
|
||||
{
|
||||
disabledModules = [
|
||||
"services/misc/home-assistant.nix"
|
||||
];
|
||||
|
||||
imports = [
|
||||
<nixpkgs-unstable/nixos/modules/services/misc/home-assistant.nix>
|
||||
];
|
||||
|
||||
|
||||
services.home-assistant.config = {
|
||||
frontend = {
|
||||
themes = {
|
||||
@@ -1,63 +1,25 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (import <stockholm/lib>) genid;
|
||||
inherit (import <niveum/lib>) localAddresses;
|
||||
zigbee2mqttDevice = "/dev/ttyACM0";
|
||||
|
||||
zigbee2mqttConfig = {
|
||||
permit_join = false;
|
||||
homeassistant = true;
|
||||
serial = {
|
||||
port = zigbee2mqttDevice;
|
||||
disable_led = true;
|
||||
};
|
||||
mqtt = {
|
||||
discovery = true;
|
||||
base_topic = "zigbee";
|
||||
server = "mqtt://${localAddresses.toum}"; # Rasperry local IP
|
||||
user = "albrecht";
|
||||
password = lib.strings.fileContents <system-secrets/mosquitto>;
|
||||
};
|
||||
};
|
||||
zigbee2mqtt_cfg = pkgs.writeText "zigbee2mqtt.json" (builtins.toJSON zigbee2mqttConfig);
|
||||
in
|
||||
{
|
||||
disabledModules = [
|
||||
"services/misc/home-assistant.nix"
|
||||
];
|
||||
|
||||
imports = [
|
||||
<nixpkgs-unstable/nixos/modules/services/misc/home-assistant.nix>
|
||||
<nixpkgs-unstable/nixos/modules/services/misc/zigbee2mqtt.nix>
|
||||
];
|
||||
|
||||
/*
|
||||
ids = {
|
||||
uids.zigbee2mqtt = genid "zigbee2mqtt";
|
||||
gids.zigbee2mqtt = genid "zigbee2mqtt";
|
||||
};
|
||||
services.zigbee2mqtt = {
|
||||
enable = true;
|
||||
config = zigbee2mqttConfig;
|
||||
package = pkgs.unstable.zigbee2mqtt;
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
system.activationScripts.installZigbee = ''
|
||||
install -d /var/lib/zigbee2mqtt
|
||||
install ${zigbee2mqtt_cfg} /var/lib/zigbee2mqtt/configuration.yaml
|
||||
'';
|
||||
|
||||
# hack to restart docker container on config change
|
||||
systemd.services.docker-zigbee2mqtt.environment.cfg = zigbee2mqtt_cfg;
|
||||
|
||||
docker-containers.zigbee2mqtt = {
|
||||
image = "koenkk/zigbee2mqtt";
|
||||
extraDockerOptions = [
|
||||
"--device=${zigbee2mqttDevice}:${zigbee2mqttDevice}"
|
||||
];
|
||||
volumes = ["/var/lib/zigbee2mqtt:/app/data"];
|
||||
config = {
|
||||
permit_join = false;
|
||||
homeassistant = true;
|
||||
serial = {
|
||||
port = "/dev/ttyACM0";
|
||||
disable_led = true;
|
||||
};
|
||||
mqtt = {
|
||||
discovery = true;
|
||||
base_topic = "zigbee";
|
||||
server = "mqtt://${localAddresses.toum}";
|
||||
user = "albrecht";
|
||||
password = lib.strings.fileContents <system-secrets/mosquitto>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.mosquitto = {
|
||||
25
configs/hedgedoc.nix
Normal file
25
configs/hedgedoc.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
services.nginx.virtualHosts."pad.xn--kiern-0qa.de" = {
|
||||
enableACME = true;
|
||||
addSSL = true;
|
||||
locations."/".extraConfig = ''
|
||||
client_max_body_size 4G;
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://localhost:3091;
|
||||
'';
|
||||
};
|
||||
|
||||
services.hedgedoc = {
|
||||
enable = true;
|
||||
configuration = {
|
||||
allowAnonymous = false;
|
||||
allowGravatar = false;
|
||||
db = {
|
||||
dialect = "sqlite";
|
||||
storage = "/var/lib/codimd/db.codimd.sqlite";
|
||||
useCDN = false;
|
||||
};
|
||||
port = 3091;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -9,14 +9,14 @@
|
||||
detailedCpuTime = false;
|
||||
headerMargin = true;
|
||||
hideKernelThreads = true;
|
||||
hideThreads = false;
|
||||
hideUserlandThreads = false;
|
||||
hideThreads = true;
|
||||
hideUserlandThreads = true;
|
||||
highlightBaseName = true;
|
||||
highlightMegabytes = true;
|
||||
highlightThreads = true;
|
||||
shadowOtherUsers = true;
|
||||
showProgramPath = false;
|
||||
showThreadNames = true;
|
||||
showThreadNames = false;
|
||||
sortDescending = true;
|
||||
sortKey = "PERCENT_CPU";
|
||||
treeView = true;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib.strings) fileContents;
|
||||
inherit (import <niveum/lib>) sshPort;
|
||||
eduroam = {
|
||||
identity = fileContents <secrets/eduroam/identity>;
|
||||
password = fileContents <secrets/eduroam/password>;
|
||||
@@ -22,23 +23,60 @@ let
|
||||
}"
|
||||
phase2="auth=PAP"
|
||||
'';
|
||||
hu-berlin-cifs-options = [
|
||||
"uid=${toString config.users.users.me.uid}"
|
||||
"gid=${toString config.users.groups.users.gid}"
|
||||
"sec=ntlmv2"
|
||||
"workgroup=german"
|
||||
"username=meinhaki"
|
||||
"password=${lib.strings.fileContents <secrets/mail/meinhaki>}"
|
||||
"noauto"
|
||||
"x-systemd.requires=hu-vpn.service"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=1"
|
||||
"x-systemd.idle-timeout=1min"
|
||||
];
|
||||
in {
|
||||
networking.wireless.networks = {
|
||||
eduroam_5GHz.auth = eduroamAuth;
|
||||
eduroam.auth = eduroamAuth;
|
||||
};
|
||||
|
||||
fileSystems."/media/hu-berlin/germpro2" = {
|
||||
device = "//hugerm31c.user.hu-berlin.de/germpro2/ling";
|
||||
fsType = "cifs";
|
||||
options = hu-berlin-cifs-options;
|
||||
};
|
||||
|
||||
fileSystems."/media/hu-berlin/germhome" = {
|
||||
device = "//hugerm31c.user.hu-berlin.de/germhome/ling/meinhaki";
|
||||
fsType = "cifs";
|
||||
options = hu-berlin-cifs-options;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "hu-vpn" ''
|
||||
${pkgs.openfortivpn}/bin/openfortivpn -p "${eduroam.password}" -c ${pkgs.writeText "hu-berlin.config" ''
|
||||
host = forti-ssl.vpn.hu-berlin.de
|
||||
port = 443
|
||||
trusted-cert = e5a7d56543002ffe1e8962caa5fd6d94053aa702381458247b670877a66f3c6f
|
||||
username = ${eduroam.identity}
|
||||
''}
|
||||
(pkgs.writers.writeDashBin "hu-ip" ''
|
||||
${pkgs.w3m}/bin/w3m -dump meineip.hu-berlin.de | head --lines=-4 | tail --lines=+3
|
||||
'')
|
||||
];
|
||||
|
||||
systemd.services.hu-vpn = {
|
||||
enable = true;
|
||||
wants = [ "network-online.target" ];
|
||||
conflicts = [ "openvpn-hu-berlin.service" ];
|
||||
script = ''
|
||||
${pkgs.openfortivpn}/bin/openfortivpn -c ${pkgs.writeText "hu-berlin.config" ''
|
||||
host = forti-ssl.vpn.hu-berlin.de
|
||||
port = 443
|
||||
trusted-cert = 42193a913d276d9eb86217612956e1e6464d6f07bed5393a4787c87adc4bd359
|
||||
username = ${eduroam.identity}
|
||||
password = ${eduroam.password}
|
||||
''}
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.openvpn-hu-berlin.conflicts = [ "hu-vpn.service" ];
|
||||
|
||||
services.openvpn.servers.hu-berlin = {
|
||||
autoStart = false;
|
||||
authUserPass = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) defaultApplications colours;
|
||||
klem = import <niveum/packages/scripts/klem.nix> {
|
||||
inherit pkgs lib;
|
||||
config.scripts = {
|
||||
@@ -26,6 +27,9 @@ let
|
||||
"betacode" = pkgs.writers.writeDash "betacode" ''
|
||||
${pkgs.scripts.betacode}/bin/betacode
|
||||
'';
|
||||
"devanagari" = pkgs.writers.writeDash "devanagari" ''
|
||||
${pkgs.scripts.devanagari}/bin/devanagari
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -41,12 +45,32 @@ let
|
||||
emoji-file = pkgs.fetchurl {
|
||||
url =
|
||||
"https://raw.githubusercontent.com/LukeSmithxyz/voidrice/master/.local/share/larbs/emoji";
|
||||
sha256 = "09m2rgb9d5jpiy8q4jz3dw36gkpb4ng2pl7xi7ppsrzzzdvq85qk";
|
||||
sha256 = "03fv69ah8msh2j6i3lm4sdkckqq8jwn1kj43j98dh0xjpzazsy46";
|
||||
};
|
||||
kaomoji-file = pkgs.writeText "kaomoji.txt" ''
|
||||
¯\(°_o)/¯ dunno lol shrug dlol
|
||||
¯\_(ツ)_/¯ dunno lol shrug dlol
|
||||
( ͡° ͜ʖ ͡°) lenny
|
||||
¯\_( ͡° ͜ʖ ͡°)_/¯ lenny shrug dlol
|
||||
( ゚д゚) aaah sad noo
|
||||
ヽ(^o^)丿 hi yay hello
|
||||
(^o^: ups hehe
|
||||
(^∇^) yay
|
||||
┗(`皿´)┛ angry argh
|
||||
ヾ(^_^) byebye!! bye
|
||||
<(^.^<) <(^.^)> (>^.^)> (7^.^)7 (>^.^<) dance
|
||||
(-.-)Zzz... sleep
|
||||
(∩╹□╹∩) oh noes woot
|
||||
(╯°□°)╯ ┻━┻ table flip
|
||||
(」゜ロ゜)」 why woot
|
||||
(_゜_゜_) gloom I see you
|
||||
༼ ༎ຶ ෴ ༎ຶ༽ sad
|
||||
(\/) (°,,,,°) (\/) krebs
|
||||
'';
|
||||
in with pkgs;
|
||||
writers.writeDashBin "emoji-menu" ''
|
||||
PATH=${lib.makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]}
|
||||
chosen=$(cut -d ';' -f1 ${emoji-file} | dmenu -i -l 10 | sed "s/ .*//")
|
||||
chosen=$(cat ${emoji-file} ${kaomoji-file} | cut -d ';' -f1 | dmenu -i -l 10 | sed "s/ .*//")
|
||||
|
||||
[ "$chosen" != "" ] || exit
|
||||
|
||||
@@ -59,7 +83,7 @@ let
|
||||
fi
|
||||
'';
|
||||
|
||||
in with config.niveum; {
|
||||
in {
|
||||
services.xserver = {
|
||||
displayManager.defaultSession = "none+i3";
|
||||
windowManager.i3 = {
|
||||
@@ -68,10 +92,25 @@ in with config.niveum; {
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
monitorSection = ''Option "DPMS" "false"'';
|
||||
serverFlagsSection = ''
|
||||
Option "BlankTime" "0"
|
||||
Option "StandbyTime" "0"
|
||||
Option "SuspendTime" "0"
|
||||
Option "OffTime" "0"
|
||||
'';
|
||||
extraConfig = ''
|
||||
Section "Extensions"
|
||||
Option "DPMS" "Disable"
|
||||
EndSection
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager.users.me.xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
config = rec {
|
||||
fonts = [ "Monospace ${toString config.niveum.fonts.size}" ];
|
||||
fonts = [ "Monospace 10" ];
|
||||
modifier = "Mod4";
|
||||
window = {
|
||||
titlebar = false;
|
||||
@@ -133,7 +172,7 @@ in with config.niveum; {
|
||||
};
|
||||
bars = [{
|
||||
workspaceButtons = false;
|
||||
fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ];
|
||||
fonts = [ "Monospace 8" ];
|
||||
mode = "hide"; # "dock"
|
||||
position = "bottom";
|
||||
colors = rec {
|
||||
@@ -147,10 +186,9 @@ in with config.niveum; {
|
||||
};
|
||||
};
|
||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${
|
||||
pkgs.writeTOML (import <niveum/dot/i3status-rust.nix> {
|
||||
wifi-interface = networkInterfaces.wireless;
|
||||
batteryBlock = batteryBlocks.default;
|
||||
inherit (config.niveum) colours;
|
||||
pkgs.writeTOML (import <niveum/lib/i3status-rust.nix> {
|
||||
inherit (config.niveum) batteryName wirelessInterface;
|
||||
inherit colours;
|
||||
inherit pkgs;
|
||||
})
|
||||
}";
|
||||
@@ -164,17 +202,15 @@ in with config.niveum; {
|
||||
"l" = "resize grow width 10 px or 5 ppt";
|
||||
};
|
||||
keybindings = {
|
||||
"${modifier}+Shift+h" = "move left";
|
||||
"${modifier}+Shift+j" = "move down";
|
||||
"${modifier}+Shift+k" = "move up";
|
||||
"${modifier}+Shift+l" = "move right";
|
||||
"${modifier}+Shift+h" = "move left 25 px";
|
||||
"${modifier}+Shift+j" = "move down 25 px";
|
||||
"${modifier}+Shift+k" = "move up 25 px";
|
||||
"${modifier}+Shift+l" = "move right 25 px";
|
||||
"${modifier}+h" = "focus left";
|
||||
"${modifier}+j" = "focus down";
|
||||
"${modifier}+k" = "focus up";
|
||||
"${modifier}+l" = "focus right";
|
||||
|
||||
"${modifier}+Menu" = "exec ${klem}/bin/klem";
|
||||
|
||||
"${modifier}+Shift+b" = "move window to workspace prev";
|
||||
"${modifier}+Shift+n" = "move window to workspace next";
|
||||
"${modifier}+Shift+x" = "exec --no-startup-id ${move-to-new-workspace}";
|
||||
@@ -196,12 +232,12 @@ in with config.niveum; {
|
||||
"${modifier}+v" = "split v";
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
|
||||
"${modifier}+Return" = "exec i3-sensible-terminal";
|
||||
# "${modifier}+Shift+y" = "exec ${pkgs.qutebrowser}/bin/qutebrowser";
|
||||
"${modifier}+t" = "exec ${applications.fileManager}";
|
||||
"${modifier}+y" = "exec x-www-browser";
|
||||
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
||||
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
|
||||
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
|
||||
|
||||
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
|
||||
"${modifier}+Shift+w" = "exec ${pkgs.scripts.k-lock}/bin/k-lock";
|
||||
"${modifier}+a" =
|
||||
"exec --no-startup-id ${pkgs.rofi}/bin/rofi -display-window — -show window";
|
||||
"${modifier}+d" = "exec --no-startup-id ${pkgs.dmenu}/bin/dmenu_run";
|
||||
@@ -228,6 +264,7 @@ in with config.niveum; {
|
||||
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
|
||||
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
||||
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";
|
||||
"${modifier}+F12" = "exec ${klem}/bin/klem";
|
||||
|
||||
"Print" = "exec flameshot-once";
|
||||
"XF86AudioLowerVolume" =
|
||||
@@ -245,7 +282,7 @@ in with config.niveum; {
|
||||
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioPrev" =
|
||||
"exec --no-startup-id ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86ScreenSaver" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
|
||||
"XF86ScreenSaver" = "exec ${pkgs.scripts.k-lock}/bin/k-lock";
|
||||
|
||||
"XF86Display" = "exec ${pkgs.scripts.dmenurandr}/bin/dmenurandr";
|
||||
|
||||
|
||||
233
configs/mail.nix
233
configs/mail.nix
@@ -1,233 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
tagRules = [
|
||||
{
|
||||
query = "to:miaengiadina-pwa@noreply.github.com AND subject:\"PR run failed\"";
|
||||
tags = [ "-new" "+deleted" ];
|
||||
}
|
||||
{
|
||||
query = lib.concatStringsSep " OR " [
|
||||
"from:noreply-local-guides@google.com"
|
||||
"from:google-maps-noreply@google.com"
|
||||
"subject:fd-noti"
|
||||
"from:nebenan.de"
|
||||
"to:miaengiadina-pwa@noreply.github.com"
|
||||
];
|
||||
tags = [ "-new" ];
|
||||
}
|
||||
{
|
||||
query = "tag:new";
|
||||
tags = [ "-new" "+inbox" ];
|
||||
}
|
||||
];
|
||||
|
||||
# turns out we have to escape $ because, if the password contains a $, it will get interpolated as a variable by the msmtp `passwordeval` which does: `bash -c "COMMAND; echo"`
|
||||
pass_ = file: "echo ${lib.escape ["$"] (lib.escapeShellArg (lib.strings.fileContents file))}";
|
||||
|
||||
generateTaggingScript = filters:
|
||||
let
|
||||
template = { tags, query, message ? "tagging ${query} -> ${lib.concatStringsSep " " tags}", ... }: ''
|
||||
echo '${message}'
|
||||
${pkgs.notmuch}/bin/notmuch tag ${lib.concatStringsSep " " tags} -- "${query}"
|
||||
'';
|
||||
in lib.concatStringsSep "\n" (map template filters);
|
||||
|
||||
enableDefaults = lib.recursiveUpdate {
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
};
|
||||
msmtp.enable = true;
|
||||
notmuch.enable = true;
|
||||
};
|
||||
|
||||
much-pkg = pkgs.haskellPackages.callCabal2nix "much" <niveum/submodules/much> {};
|
||||
much = pkgs.haskell.lib.dontHaddock much-pkg;
|
||||
|
||||
mail-sync = pkgs.writers.writeDashBin "mail-sync" ''
|
||||
${pkgs.isync}/bin/mbsync --all
|
||||
${pkgs.notmuch}/bin/notmuch new
|
||||
'';
|
||||
in {
|
||||
environment.variables.NOTMUCH_CONFIG = config.home-manager.users.me.home.sessionVariables.NOTMUCH_CONFIG;
|
||||
|
||||
systemd.services.mail-sync = {
|
||||
enable = true;
|
||||
wants = [ "network-online.target" ];
|
||||
startAt = "*:0/15";
|
||||
serviceConfig.User = "kfm";
|
||||
serviceConfig.Type = "oneshot";
|
||||
environment.NOTMUCH_CONFIG = config.home-manager.users.me.home.sessionVariables.NOTMUCH_CONFIG;
|
||||
script = ''
|
||||
export PATH=${lib.makeBinPath [ pkgs.muchsync pkgs.notmuch mail-sync ]}
|
||||
mail-sync
|
||||
muchsync
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.neomutt
|
||||
|
||||
pkgs.notmuch-addrlookup
|
||||
|
||||
mail-sync
|
||||
|
||||
pkgs.muchsync
|
||||
|
||||
(pkgs.writers.writeDashBin "mua" ''
|
||||
if [ $# -eq 0 ]; then
|
||||
${much}/bin/much-kmein
|
||||
else
|
||||
${much}/bin/much-kmein -q "$*"
|
||||
fi
|
||||
'')
|
||||
|
||||
(pkgs.writers.writeDashBin "mail-clean" ''
|
||||
${pkgs.notmuch}/bin/notmuch search --output files --format=text0 tag:deleted | ${pkgs.findutils}/bin/xargs -r0 rm
|
||||
${pkgs.notmuch}/bin/notmuch new
|
||||
'')
|
||||
];
|
||||
|
||||
|
||||
home-manager.users.me = {
|
||||
services.muchsync.remotes =
|
||||
let
|
||||
muchsyncConfig = host: {
|
||||
name = host;
|
||||
value = {
|
||||
frequency = "*:0/10";
|
||||
remote.host = host;
|
||||
remote.checkForModifiedFiles = false;
|
||||
local.checkForModifiedFiles = false;
|
||||
# don't run `notmuch new` locally nor remotely because muchsync is only regularly run after `mail-sync`
|
||||
remote.importNew = false;
|
||||
local.importNew = false;
|
||||
};
|
||||
};
|
||||
in lib.listToAttrs (map muchsyncConfig [
|
||||
"wilde"
|
||||
"homeros"
|
||||
]);
|
||||
|
||||
programs.msmtp.enable = true;
|
||||
|
||||
programs.mbsync.enable = true;
|
||||
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
new.tags = [ "new" ];
|
||||
search.excludeTags = [ "deleted" "spam" ];
|
||||
hooks.postNew = generateTaggingScript tagRules;
|
||||
extraConfig.muchsync.and_tags = "inbox;unread";
|
||||
};
|
||||
|
||||
accounts.email.maildirBasePath = "${config.users.users.me.home}/mail";
|
||||
|
||||
accounts.email.accounts = {
|
||||
fysi = enableDefaults {
|
||||
primary = false;
|
||||
smtp = {
|
||||
host = "smtp.fastmail.com";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
imap = {
|
||||
host = "imap.fastmail.com";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
userName = "kieran@fysi.tech";
|
||||
address = "kieran@fysi.tech";
|
||||
realName = config.niveum.user.name;
|
||||
passwordCommand = pass_ <secrets/mail/fastmail>;
|
||||
};
|
||||
cock = enableDefaults {
|
||||
primary = false;
|
||||
smtp = {
|
||||
host = "mail.cock.li";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "mail.cock.li";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
userName = "2210@cock.li";
|
||||
address = "2210@cock.li";
|
||||
realName = "2210";
|
||||
passwordCommand = pass_ <secrets/mail/cock>;
|
||||
};
|
||||
kieran-gmail = enableDefaults {
|
||||
primary = false;
|
||||
flavor = "gmail.com";
|
||||
address = "kieran.meinhardt@gmail.com";
|
||||
realName = config.niveum.user.name;
|
||||
userName = "kieran.meinhardt";
|
||||
passwordCommand = pass_ <secrets/mail/gmail/kieran.meinhardt>;
|
||||
folders = {
|
||||
drafts = "[Gmail]/Entw&APw-rfe";
|
||||
sent = "[Gmail]/Gesendet";
|
||||
trash = "[Gmail]/Papierkorb";
|
||||
};
|
||||
};
|
||||
amroplay = enableDefaults {
|
||||
primary = false;
|
||||
flavor = "gmail.com";
|
||||
address = "amroplay@gmail.com";
|
||||
realName = config.niveum.user.name;
|
||||
userName = "amroplay";
|
||||
passwordCommand = pass_ <secrets/mail/gmail/amroplay>;
|
||||
folders = {
|
||||
drafts = "[Gmail]/Drafts";
|
||||
sent = "[Gmail]/Sent Mail";
|
||||
trash = "[Gmail]/Bin";
|
||||
};
|
||||
};
|
||||
posteo = enableDefaults {
|
||||
primary = true;
|
||||
smtp = {
|
||||
host = "posteo.de";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "posteo.de";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
address = "kieran.meinhardt@posteo.net";
|
||||
realName = config.niveum.user.name;
|
||||
userName = "kieran.meinhardt@posteo.net";
|
||||
passwordCommand = pass_ <secrets/mail/posteo>;
|
||||
};
|
||||
hu-berlin = enableDefaults {
|
||||
primary = false;
|
||||
address = "meinhark@hu-berlin.de";
|
||||
realName = config.niveum.user.name;
|
||||
userName = "meinhark";
|
||||
passwordCommand = pass_ <secrets/eduroam/password>;
|
||||
smtp = {
|
||||
host = "mailhost.cms.hu-berlin.de";
|
||||
port = 25;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "mailbox.cms.hu-berlin.de";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
145
configs/mail/accounts.nix
Normal file
145
configs/mail/accounts.nix
Normal file
@@ -0,0 +1,145 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran;
|
||||
|
||||
enableDefaults = lib.recursiveUpdate {
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
};
|
||||
msmtp.enable = true;
|
||||
notmuch.enable = true;
|
||||
};
|
||||
|
||||
settings = {
|
||||
fastmail = {
|
||||
smtp = {
|
||||
host = "smtp.fastmail.com";
|
||||
port = 465;
|
||||
tls.enable = true;
|
||||
};
|
||||
imap = {
|
||||
host = "imap.fastmail.com";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
cock = {
|
||||
smtp = {
|
||||
host = "mail.cock.li";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "mail.cock.li";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
posteo = {
|
||||
smtp = {
|
||||
host = "posteo.de";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "posteo.de";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
hu-berlin = {
|
||||
smtp = {
|
||||
host = "mailhost.cms.hu-berlin.de";
|
||||
port = 25;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
imap = {
|
||||
host = "mailbox.cms.hu-berlin.de";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# turns out we have to escape $ because, if the password contains a $, it will get interpolated as a variable by the msmtp `passwordeval` which does: `bash -c "COMMAND; echo"`
|
||||
pass_ = file: "echo ${lib.escape ["$"] (lib.escapeShellArg (lib.strings.fileContents file))}";
|
||||
in
|
||||
{
|
||||
fysi = enableDefaults {
|
||||
primary = false;
|
||||
userName = "kieran@fysi.tech";
|
||||
address = "kieran@fysi.tech";
|
||||
realName = kieran.name;
|
||||
passwordCommand = pass_ <secrets/mail/fastmail>;
|
||||
inherit (settings.fastmail) imap smtp;
|
||||
};
|
||||
cock = enableDefaults {
|
||||
primary = false;
|
||||
userName = "2210@cock.li";
|
||||
address = "2210@cock.li";
|
||||
realName = "2210";
|
||||
passwordCommand = pass_ <secrets/mail/cock>;
|
||||
inherit (settings.cock) imap smtp;
|
||||
};
|
||||
kieran-gmail = enableDefaults {
|
||||
primary = false;
|
||||
flavor = "gmail.com";
|
||||
address = "kieran.meinhardt@gmail.com";
|
||||
realName = kieran.name;
|
||||
userName = "kieran.meinhardt";
|
||||
passwordCommand = pass_ <secrets/mail/gmail/kieran.meinhardt>;
|
||||
folders = {
|
||||
drafts = "[Gmail]/Entw&APw-rfe";
|
||||
sent = "[Gmail]/Gesendet";
|
||||
trash = "[Gmail]/Papierkorb";
|
||||
};
|
||||
};
|
||||
amroplay = enableDefaults {
|
||||
primary = false;
|
||||
flavor = "gmail.com";
|
||||
address = "amroplay@gmail.com";
|
||||
realName = kieran.name;
|
||||
userName = "amroplay";
|
||||
passwordCommand = pass_ <secrets/mail/gmail/amroplay>;
|
||||
folders = {
|
||||
drafts = "[Gmail]/Drafts";
|
||||
sent = "[Gmail]/Sent Mail";
|
||||
trash = "[Gmail]/Bin";
|
||||
};
|
||||
};
|
||||
posteo = enableDefaults {
|
||||
primary = true;
|
||||
address = "kieran.meinhardt@posteo.net";
|
||||
realName = kieran.name;
|
||||
userName = "kieran.meinhardt@posteo.net";
|
||||
passwordCommand = pass_ <secrets/mail/posteo>;
|
||||
inherit (settings.posteo) imap smtp;
|
||||
};
|
||||
hu-berlin = enableDefaults {
|
||||
primary = false;
|
||||
address = "meinhark@hu-berlin.de";
|
||||
realName = kieran.name;
|
||||
userName = "meinhark";
|
||||
passwordCommand = pass_ <secrets/eduroam/password>;
|
||||
inherit (settings.hu-berlin) imap smtp;
|
||||
};
|
||||
hu-berlin-work = enableDefaults {
|
||||
primary = false;
|
||||
address = "meinhaki@hu-berlin.de";
|
||||
realName = kieran.name;
|
||||
userName = "meinhaki";
|
||||
passwordCommand = pass_ <secrets/mail/meinhaki>;
|
||||
inherit (settings.hu-berlin) imap smtp;
|
||||
};
|
||||
}
|
||||
56
configs/mail/client.nix
Normal file
56
configs/mail/client.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
much =
|
||||
let
|
||||
nixpkgs-much = import (pkgs.fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
rev = "7c2a362b58a1c2ba72d24aa3869da3b1a91d39e1";
|
||||
sha256 = "0gl4xndyahasa9dv5mi3x9w8s457wl2xh9lcldizcn1irjvkrzs4";
|
||||
}) {
|
||||
overlays = [
|
||||
(import <stockholm/krebs/5pkgs/haskell>)
|
||||
];
|
||||
};
|
||||
much-pkg = nixpkgs-much.haskellPackages.callCabal2nix "much" <niveum/submodules/much> {};
|
||||
in nixpkgs-much.haskell.lib.dontHaddock much-pkg;
|
||||
in {
|
||||
environment.variables.NOTMUCH_CONFIG = config.home-manager.users.me.home.sessionVariables.NOTMUCH_CONFIG;
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.notmuch-addrlookup
|
||||
|
||||
pkgs.muchsync
|
||||
|
||||
(pkgs.writers.writeDashBin "mua" ''
|
||||
if [ $# -eq 0 ]; then
|
||||
${much}/bin/much-kmein
|
||||
else
|
||||
${much}/bin/much-kmein -q "$*"
|
||||
fi
|
||||
'')
|
||||
|
||||
(pkgs.writers.writeDashBin "mail-clean" ''
|
||||
${pkgs.notmuch}/bin/notmuch search --output files --format=text0 tag:deleted | ${pkgs.findutils}/bin/xargs -r0 rm
|
||||
${pkgs.notmuch}/bin/notmuch new
|
||||
'')
|
||||
];
|
||||
|
||||
home-manager.users.me = {
|
||||
services.muchsync.remotes.zaatar = {
|
||||
frequency = "*:0/10";
|
||||
remote.host = "email@zaatar";
|
||||
remote.importNew = false;
|
||||
};
|
||||
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
search.excludeTags = [ "deleted" "spam" ];
|
||||
# extraConfig.muchsync.and_tags = "inbox;unread";
|
||||
};
|
||||
|
||||
programs.msmtp.enable = true;
|
||||
|
||||
accounts.email.accounts = import ./accounts.nix { inherit lib; };
|
||||
};
|
||||
}
|
||||
68
configs/mail/fetcher.nix
Normal file
68
configs/mail/fetcher.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran;
|
||||
|
||||
tagRules = [
|
||||
{
|
||||
query = "to:miaengiadina-pwa@noreply.github.com AND subject:\"PR run failed\"";
|
||||
tags = [ "-new" "+deleted" ];
|
||||
}
|
||||
{
|
||||
query = lib.concatStringsSep " OR " [
|
||||
"from:noreply-local-guides@google.com"
|
||||
"from:google-maps-noreply@google.com"
|
||||
"subject:fd-noti"
|
||||
"from:nebenan.de"
|
||||
"to:miaengiadina-pwa@noreply.github.com"
|
||||
];
|
||||
tags = [ "-new" ];
|
||||
}
|
||||
{
|
||||
query = "tag:new";
|
||||
tags = [ "-new" "+inbox" ];
|
||||
}
|
||||
];
|
||||
|
||||
generateTaggingScript = filters:
|
||||
let
|
||||
template = { tags, query, message ? "tagging ${query} -> ${lib.concatStringsSep " " tags}", ... }: ''
|
||||
echo '${message}'
|
||||
${pkgs.notmuch}/bin/notmuch tag ${lib.concatStringsSep " " tags} -- "${query}"
|
||||
'';
|
||||
in lib.concatStringsSep "\n" (map template filters);
|
||||
in
|
||||
{
|
||||
users.users.email = {
|
||||
isNormalUser = true;
|
||||
description = "fetching mails since 2021";
|
||||
openssh.authorizedKeys.keys = kieran.sshKeys pkgs;
|
||||
packages = [ pkgs.muchsync ];
|
||||
};
|
||||
|
||||
environment.variables.NOTMUCH_CONFIG = config.home-manager.users.email.home.sessionVariables.NOTMUCH_CONFIG;
|
||||
|
||||
systemd.services.mail-sync = {
|
||||
enable = true;
|
||||
wants = [ "network-online.target" ];
|
||||
startAt = "*:0/15";
|
||||
serviceConfig.User = config.users.users.email.name;
|
||||
serviceConfig.Type = "oneshot";
|
||||
environment.NOTMUCH_CONFIG = config.home-manager.users.email.home.sessionVariables.NOTMUCH_CONFIG;
|
||||
script = ''
|
||||
${pkgs.isync}/bin/mbsync --all
|
||||
${pkgs.notmuch}/bin/notmuch new
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager.users.email = {
|
||||
programs.mbsync.enable = true;
|
||||
|
||||
accounts.email.accounts = import ./accounts.nix { inherit lib; };
|
||||
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
new.tags = [ "new" ];
|
||||
hooks.postNew = generateTaggingScript tagRules;
|
||||
};
|
||||
};
|
||||
}
|
||||
72
configs/matterbridge.nix
Normal file
72
configs/matterbridge.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||
config = {
|
||||
general = {
|
||||
RemoteNickFormat = "[{NICK}] ";
|
||||
Charset = "utf-8";
|
||||
};
|
||||
telegram.kmein.Token = bridgeBotToken;
|
||||
irc.freenode = {
|
||||
Server = "irc.freenode.net:6667";
|
||||
Nick = "ponte";
|
||||
};
|
||||
mumble.lassulus = {
|
||||
Server = "lassul.us:64738";
|
||||
Nick = "krebs_bridge";
|
||||
SkipTLSVerify = true;
|
||||
};
|
||||
gateway = [
|
||||
{
|
||||
name = "krebs-bridge";
|
||||
enable = true;
|
||||
inout = [
|
||||
{
|
||||
account = "irc.freenode";
|
||||
channel = "#krebs";
|
||||
}
|
||||
{
|
||||
account = "telegram.kmein";
|
||||
channel = "-330372458";
|
||||
}
|
||||
{
|
||||
account = "mumble.lassulus";
|
||||
channel = 6; # "nixos"
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "myengadin-bridge";
|
||||
enable = true;
|
||||
inout = [
|
||||
{
|
||||
account = "irc.freenode";
|
||||
channel = "##myengadin";
|
||||
}
|
||||
{
|
||||
account = "telegram.kmein";
|
||||
channel = "-425759153";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(import <niveum/overlays/toml.nix>)
|
||||
(self: super: {
|
||||
matterbridge = (import (super.fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
rev = "e45d91ee65db293a172ec506759d1248e40c35f5";
|
||||
sha256 = "03cjs5xcx09lw0djyrx2kfakw7gkg4iqmy9w25azai62im39l30k";
|
||||
}) {}).matterbridge;
|
||||
})
|
||||
];
|
||||
|
||||
services.matterbridge = {
|
||||
enable = true;
|
||||
configPath = toString (pkgs.writeTOML config);
|
||||
};
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
"x-scheme-handler/mailto" = "brave-browser.desktop";
|
||||
"x-scheme-handler/unknown" = "brave-browser.desktop";
|
||||
"x-scheme-handler/webcal" = "brave-browser.desktop";
|
||||
"inode/directory" = "pcmanfm.desktop";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
86
configs/moodle-dl.nix
Normal file
86
configs/moodle-dl.nix
Normal file
@@ -0,0 +1,86 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran;
|
||||
|
||||
moodle-dl = pkgs.callPackage <niveum/packages/moodle-dl> {};
|
||||
|
||||
moodle-dl-config = {
|
||||
telegram = {
|
||||
token = lib.strings.fileContents <system-secrets/telegram/moodle-dl.token>;
|
||||
chat_id = "18980945";
|
||||
send_error_msg = true;
|
||||
};
|
||||
token = lib.strings.fileContents <system-secrets/moodle.token>;
|
||||
moodle_domain = "moodle.hu-berlin.de";
|
||||
moodle_path = "/";
|
||||
download_course_ids = [
|
||||
99881 # Dialektologie
|
||||
100183 # Onomastik
|
||||
100353 # Sanskrit I
|
||||
100692 # Sanskrit Tutorium
|
||||
99832 # Germanisch
|
||||
99823 # Gotisch
|
||||
99813 # Altalbanisch
|
||||
98681 # Geistliche Lyrik von Luther bis Lehnert
|
||||
99667 # Antike Mythologie
|
||||
# 52365 # FSR KlassPhil
|
||||
];
|
||||
download_submissions = true;
|
||||
download_descriptions = true;
|
||||
download_links_in_descriptions = false;
|
||||
download_databases = false;
|
||||
download_forums = false;
|
||||
download_linked_files = false;
|
||||
download_also_with_cookie = false;
|
||||
};
|
||||
|
||||
moodle-dl-json = pkgs.writeText "moodle-dl.json" (builtins.toJSON moodle-dl-config);
|
||||
|
||||
moodle-dl-directory = "/var/lib/moodle";
|
||||
in
|
||||
{
|
||||
users.extraUsers.moodle = {
|
||||
isNormalUser = false;
|
||||
home = moodle-dl-directory;
|
||||
createHome = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
# for sshfs mount
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDtIFmbspaBHaSkLEx43V0uaVd7l9NUFiwt2VOP++KzLjvRMLkyF2hg2HjmogTjUvTyoDs7RHwEH/cHZlJ5JQkM1jRqQpnYwGfkZEwYvmXAl6LY9+vQMP36gNPfXmKX3y3LelO7oD2uhUs0guTtg0tHUyN5/UY5u+VinyD6djxDkHaCUn3S7CS/odBcs/4flXT654wsvzgYicnSKH9R4W+7C0YsckZ/NoIkA4jnuwtWZYWrUkxd4/290buX6pAc5+zVVZqyy0sI4i8s6pO9RL5W7xvYt+w+U0u0dMxm5ckiRmLVKfIbMN4YtDxsZbZDajlQ1nDbOsEsrSXWz4H4cSNot7J820x1qh5SSxL4GSQlcT+6xCFk9kKyflxoS3oLoPLttx3rmOMkZKJWxF/IKLW47orxV6wkG5mHxdeR3cf6jX4j3nkwFVyC9R+WG4w2Z4vKONVE7uWGYU3y4OpR1e6MGHVShkNKqEvC/Kjcc/6v7I7AKRAuPZB0WEw36tA65/8= root@wilde"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFFPHt+FPQ6gq8Ev65YsBZrafdtpWGpCNnlVvy67S1BK root@manakish"
|
||||
];
|
||||
useDefaultShell = true;
|
||||
};
|
||||
|
||||
system.activationScripts.moodle-dl-config = "ln -sfn ${toString moodle-dl-json} ${config.users.extraUsers.moodle.home}/config.json";
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "moodle"; # config.users.extraUsers.moodle.name;
|
||||
openDefaultPorts = true;
|
||||
configDir = "${moodle-dl-directory}/.config/syncthing";
|
||||
dataDir = "${moodle-dl-directory}/.config/syncthing";
|
||||
declarative = rec {
|
||||
cert = toString <system-secrets/syncthing/cert.pem>;
|
||||
key = toString <system-secrets/syncthing/key.pem>;
|
||||
devices = {
|
||||
inherit ((import <niveum/lib>).syncthing.devices) wilde manakish toum;
|
||||
};
|
||||
folders.${moodle-dl-directory} = {
|
||||
devices = [ "toum" "wilde" "manakish" ];
|
||||
id = "moodle-dl";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.moodle-dl = {
|
||||
enable = true;
|
||||
startAt = "hourly";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = config.users.extraUsers.moodle.name;
|
||||
WorkingDirectory = config.users.extraUsers.moodle.home;
|
||||
};
|
||||
wants = [ "network-online.target" ];
|
||||
script = "${moodle-dl}/bin/moodle-dl";
|
||||
};
|
||||
}
|
||||
83
configs/mpd-fm.nix
Normal file
83
configs/mpd-fm.nix
Normal file
@@ -0,0 +1,83 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
streams = import <niveum/lib/streams.nix> {
|
||||
di-fm-key = lib.strings.fileContents <secrets/di.fm/key>;
|
||||
};
|
||||
multi-room-audio-port = 8000;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
<niveum/modules/mpd-fm.nix>
|
||||
];
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
auto_update "yes"
|
||||
|
||||
audio_output {
|
||||
type "alsa"
|
||||
name "zaatar single room audio system"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "httpd"
|
||||
name "zaatar multi room audio system"
|
||||
encoder "vorbis" # optional
|
||||
port "${toString multi-room-audio-port}"
|
||||
quality "5.0" # do not define if bitrate is defined
|
||||
# bitrate "128" # do not define if quality is defined
|
||||
format "44100:16:2"
|
||||
always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped.
|
||||
tags "yes" # httpd supports sending tags to listening streams.
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.mpc_cli ];
|
||||
|
||||
services.mpd-fm = {
|
||||
enable = true;
|
||||
# stationsFile = "/etc/mpd-fm/stations.json";
|
||||
stations = lib.lists.imap0 (id: {desc ? "", logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300", stream, station}: { inherit id desc logo stream station; }) streams;
|
||||
webPort = 8080;
|
||||
};
|
||||
|
||||
systemd.services.mpd-fm-stations =
|
||||
let
|
||||
stations = lib.lists.imap0 (id: {desc ? "", logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300", stream, station}: { inherit id desc logo stream station; }) streams;
|
||||
stationsJson = pkgs.writeText "stations.json" (builtins.toJSON stations);
|
||||
in {
|
||||
wantedBy = [ "mpd-fm.service" ];
|
||||
startAt = "hourly";
|
||||
script = ''
|
||||
mkdir -p /etc/mpd-fm
|
||||
antenne_asb_url=$(
|
||||
${pkgs.curl}/bin/curl -sS 'https://www.caster.fm/widgets/em_player.php?jsinit=true&uid=529295&t=blue&c=' \
|
||||
| grep streamUrl \
|
||||
| sed ${lib.escapeShellArg "s/^.*'\\([^']*\\)'.*/\\1/"}
|
||||
)
|
||||
${pkgs.jq}/bin/jq "map(if .station == \"Antenne ASB\" then .stream |= \"$antenne_asb_url\" else . end)" < ${stationsJson} > /etc/mpd-fm/stations.json
|
||||
'';
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts.default = {
|
||||
basicAuth.dj = lib.strings.fileContents <system-secrets/mpd-web.key>;
|
||||
locations."= /listen.ogg" = {
|
||||
proxyPass = "http://127.0.0.1:${toString multi-room-audio-port}";
|
||||
};
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.mpd-fm.webPort}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
{ pkgs, ... }: let
|
||||
swallow = command: "${pkgs.scripts.swallow}/bin/swallow ${command}";
|
||||
in {
|
||||
environment.shellAliases.mpv = swallow "mpv";
|
||||
environment.shellAliases.smpv = swallow "mpv";
|
||||
|
||||
home-manager.users.me = {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
force-window = "yes";
|
||||
ytdl-format = "bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
|
||||
ytdl-format = "bestvideo+bestaudio/best";
|
||||
};
|
||||
bindings = {
|
||||
"Alt+RIGHT" = "add video-rotate 90";
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "vim" ''neovim "$@"'')
|
||||
(pkgs.neovim.override {
|
||||
configure = {
|
||||
customRC = builtins.readFile <niveum/dot/init.vim>;
|
||||
customRC = builtins.readFile <niveum/lib/vim/init.vim>;
|
||||
packages.nvim = with pkgs.vimPlugins; {
|
||||
start = [
|
||||
# cheat-sh-vim
|
||||
@@ -60,6 +61,7 @@
|
||||
haskell-vim
|
||||
icalendar-vim
|
||||
idris-vim
|
||||
nim-vim
|
||||
jq-vim
|
||||
purescript-vim
|
||||
rust-vim
|
||||
|
||||
@@ -3,35 +3,22 @@ let
|
||||
inherit (import <niveum/lib>) localAddresses;
|
||||
in
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
# Only allow PFS-enabled ciphers with AES256
|
||||
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
||||
};
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud19;
|
||||
package = pkgs.nextcloud20;
|
||||
|
||||
https = true;
|
||||
|
||||
autoUpdateApps = {
|
||||
enable = true;
|
||||
startAt = "05:00:00";
|
||||
};
|
||||
|
||||
hostName = localAddresses.toum;
|
||||
hostName = "cloud.xn--kiern-0qa.de";
|
||||
|
||||
nginx.enable = true;
|
||||
# https = true;
|
||||
config = {
|
||||
# overwriteProtocol = "https";
|
||||
overwriteProtocol = "https";
|
||||
|
||||
dbtype = "pgsql";
|
||||
dbuser = "nextcloud";
|
||||
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
||||
@@ -39,7 +26,7 @@ in
|
||||
dbpass = lib.strings.fileContents <system-secrets/nextcloud/database>;
|
||||
adminpass = lib.strings.fileContents <system-secrets/nextcloud/admin>;
|
||||
adminuser = "admin";
|
||||
extraTrustedDomains = [ "toum.r" ];
|
||||
# extraTrustedDomains = [ "toum.r" ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -54,6 +41,12 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
services.nginx.virtualHosts."cloud.xn--kiern-0qa.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
|
||||
# Ensure that postgres is running before running the setup
|
||||
systemd.services."nextcloud-setup" = {
|
||||
requires = ["postgresql.service"];
|
||||
|
||||
10
configs/nix.nix
Normal file
10
configs/nix.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# enable `nix flake`
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
# extraOptions = ''
|
||||
# experimental-features = nix-command
|
||||
# '';
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{ config, ... }: {
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
unstable = import <nixpkgs-unstable> { config = config.nixpkgs.config; };
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
|
||||
inherit (import <niveum/lib>) nixpkgs-unstable;
|
||||
in {
|
||||
imports = [
|
||||
./krebs.nix
|
||||
./writing.nix
|
||||
@@ -32,23 +36,20 @@
|
||||
environment.systemPackages = with pkgs; [
|
||||
# INTERNET
|
||||
aria2
|
||||
firefox
|
||||
# tor-browser-bundle-bin
|
||||
# qutebrowser
|
||||
# firefox
|
||||
tdesktop
|
||||
skypeforlinux
|
||||
w3m
|
||||
wget
|
||||
httpie
|
||||
whois
|
||||
ddgr
|
||||
ix
|
||||
# thunderbird
|
||||
nur.repos.kmein.python3Packages.instaloader
|
||||
dnsutils
|
||||
# mtr # my traceroute
|
||||
# FILE MANAGERS
|
||||
ranger
|
||||
gnome3.nautilus
|
||||
pcmanfm
|
||||
# MEDIA
|
||||
ffmpeg
|
||||
imagemagick
|
||||
@@ -74,12 +75,14 @@
|
||||
ncdu # ncurses disk usage
|
||||
python3Packages.jsonschema # json validation
|
||||
jq # json toolkit
|
||||
pup # html toolkit
|
||||
jo # json creation
|
||||
xsv # csv toolkit
|
||||
xmlstarlet # xml toolkit
|
||||
manpages
|
||||
posix_man_pages
|
||||
# moreutils # for parallel, sponge, combine
|
||||
tree
|
||||
parallel # for parallel, since moreutils shadows task spooler
|
||||
ripgrep # better grep
|
||||
rlwrap
|
||||
@@ -97,17 +100,21 @@
|
||||
audacity
|
||||
calibre
|
||||
inkscape
|
||||
zoom-us # video conferencing
|
||||
nixpkgs-unstable.zoom-us # video conferencing
|
||||
pdfgrep # search in pdf
|
||||
pdftk # pdf toolkit
|
||||
evince # for viewing pdf annotations
|
||||
xournal # for annotating pdfs
|
||||
xournalpp # for annotating pdfs
|
||||
hc # print files as qr codes
|
||||
youtubeDL
|
||||
bc # calculator
|
||||
scripts.infschmv
|
||||
scripts.default-gateway
|
||||
scripts.showkeys-toggle
|
||||
scripts.favicon
|
||||
scripts.ipa # XSAMPA to IPA converter
|
||||
scripts.playlist
|
||||
scripts.devanagari
|
||||
scripts.betacode # ancient greek betacode to unicode converter
|
||||
nur.repos.kmein.mahlzeit
|
||||
# nur.repos.kmein.slide
|
||||
@@ -121,12 +128,18 @@
|
||||
scripts.notetags
|
||||
scripts.booksplit
|
||||
scripts.dmenurandr
|
||||
scripts.interdimensional-cable
|
||||
scripts.dmenubluetooth
|
||||
scripts.manual-sort
|
||||
scripts.much-scripts
|
||||
scripts.dns-sledgehammer
|
||||
ts
|
||||
scripts.vg
|
||||
scripts.fkill
|
||||
scripts.wttr
|
||||
scripts.boetlingk
|
||||
scripts.trans
|
||||
scripts.liddel-scott-jones
|
||||
# kmein.slide
|
||||
scripts.tolino-screensaver
|
||||
nix-prefetch-git
|
||||
@@ -135,6 +148,10 @@
|
||||
par
|
||||
qrencode
|
||||
wtf
|
||||
|
||||
spotify
|
||||
spotify-tui
|
||||
playerctl
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
'';
|
||||
# :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
|
||||
# :def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
|
||||
".stack/config.yaml".text = let inherit (config.niveum) user;
|
||||
".stack/config.yaml".text = let inherit (import <niveum/lib>) kieran;
|
||||
in builtins.toJSON {
|
||||
templates.params = {
|
||||
author-name = user.name;
|
||||
author-email = user.email;
|
||||
copyright = "Copyright: (c) 2019 ${user.name}";
|
||||
github-username = user.github;
|
||||
author-name = kieran.name;
|
||||
author-email = kieran.email;
|
||||
copyright = "Copyright: (c) 2020 ${kieran.name}";
|
||||
github-username = kieran.github;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -32,8 +32,7 @@
|
||||
cabal2nix
|
||||
cabal-install
|
||||
hlint
|
||||
haskellPackages.brittany
|
||||
# haskellPackages.hfmt
|
||||
haskellPackages.ormolu
|
||||
(haskellPackages.ghcWithHoogle (import ./packages.nix))
|
||||
] ++ map haskell.lib.justStaticExecutables [
|
||||
haskellPackages.ghcid
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) nixpkgs-unstable;
|
||||
|
||||
zoteroStyle = { name, sha256 }: {
|
||||
name = "${name}.csl";
|
||||
path = pkgs.fetchurl {
|
||||
@@ -15,17 +17,11 @@ let
|
||||
})
|
||||
(zoteroStyle {
|
||||
name = "din-1505-2";
|
||||
sha256 = if scardanelli then
|
||||
"1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq"
|
||||
else
|
||||
"150kbnxl1r4g1s40khdavv5s6ah10ws135r9k883f6srk78sz6zi";
|
||||
sha256 = "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq";
|
||||
})
|
||||
(zoteroStyle {
|
||||
name = "apa";
|
||||
sha256 = if scardanelli then
|
||||
"0g8vhp7gnd315h5b60r3zqp49kaq3fkxqnz2v7j2a0zp6s3cisdk"
|
||||
else
|
||||
"1rg41mblmqifba1azb6481dwxhsbl606kf6ysqkqd786f9l9dcf8";
|
||||
sha256 = "1878vxp0y0h05yzaghnd51n981623mxskw3lsdyzmffqhihvv111";
|
||||
})
|
||||
];
|
||||
|
||||
@@ -34,7 +30,6 @@ let
|
||||
name = "dic/${name}";
|
||||
inherit path;
|
||||
}) dicts);
|
||||
scardanelli = config.networking.hostName == "scardanelli";
|
||||
in {
|
||||
environment.variables.STARDICT_DATA_DIR = toString (makeStardictDataDir [
|
||||
{
|
||||
@@ -69,9 +64,11 @@ in {
|
||||
texlive.combined.scheme-full
|
||||
(aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ]))
|
||||
haskellPackages.pandoc-citeproc
|
||||
# nur.repos.kmein.text2pdf
|
||||
nur.repos.kmein.text2pdf
|
||||
libreoffice
|
||||
unstable.pandoc
|
||||
# gnumeric
|
||||
dia
|
||||
nixpkgs-unstable.pandoc
|
||||
# proselint
|
||||
asciidoctor
|
||||
wordnet
|
||||
|
||||
24
configs/power-action.nix
Normal file
24
configs/power-action.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
suspend = pkgs.writers.writeDash "suspend" "${pkgs.systemd}/bin/systemctl suspend";
|
||||
in
|
||||
{
|
||||
imports = [ <stockholm/krebs/3modules/power-action.nix> ];
|
||||
|
||||
krebs.power-action = {
|
||||
enable = true;
|
||||
plans.suspend = {
|
||||
upperLimit = 7;
|
||||
lowerLimit = 0;
|
||||
charging = false;
|
||||
action = pkgs.writeDash "suspend-wrapper" ''
|
||||
/run/wrappers/bin/sudo ${suspend}
|
||||
'';
|
||||
};
|
||||
user = config.users.users.me.name;
|
||||
};
|
||||
|
||||
security.sudo.extraConfig = ''
|
||||
${config.krebs.power-action.user} ALL= (root) NOPASSWD: ${suspend}
|
||||
'';
|
||||
}
|
||||
295
configs/radio.nix
Normal file
295
configs/radio.nix
Normal file
@@ -0,0 +1,295 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) nixpkgs-unstable;
|
||||
radioStore = "/var/lib/radio";
|
||||
htgenPort = 8080;
|
||||
meddl = { streamPort = 8000; mpdPort = 6600; };
|
||||
lyrikline = { streamPort = 8001; mpdPort = 6601; };
|
||||
lyrik = { streamPort = 8002; mpdPort = 6602; };
|
||||
mpd-add-with-tags = pkgs.writers.writeHaskell "mpd-add-with-tags" {
|
||||
libraries = with pkgs.haskellPackages; [ optparse-generic libmpd ];
|
||||
} ''
|
||||
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-}
|
||||
import Control.Monad (void)
|
||||
import Data.String
|
||||
import Network.MPD
|
||||
import Options.Generic
|
||||
|
||||
data Options = Options { url :: String, artist :: Maybe String, title :: Maybe String }
|
||||
deriving (Generic)
|
||||
|
||||
instance ParseRecord Options
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
options <- getRecord "Add to MPD with tags"
|
||||
void $ withMPD $ do
|
||||
songId <- addId (fromString $ url options) Nothing
|
||||
maybe (pure ()) (addTagId songId Artist . fromString) $ artist options
|
||||
maybe (pure ()) (addTagId songId Title . fromString) $ title options
|
||||
'';
|
||||
|
||||
mpc-lyrikline = pkgs.writers.writeDashBin "mpc-lyrikline" ''MPD_PORT=${toString lyrikline.mpdPort} ${pkgs.mpc_cli}/bin/mpc "$@"'';
|
||||
mpc-meddl = pkgs.writers.writeDashBin "mpc-meddl" ''MPD_PORT=${toString meddl.mpdPort} ${pkgs.mpc_cli}/bin/mpc "$@"'';
|
||||
mpc-lyrik = pkgs.writers.writeDashBin "mpc-lyrik" ''MPD_PORT=${toString lyrik.mpdPort} ${pkgs.mpc_cli}/bin/mpc "$@"'';
|
||||
in
|
||||
{
|
||||
imports = [ <stockholm/krebs/3modules/htgen.nix> ];
|
||||
nixpkgs.overlays = [
|
||||
(self: super: { htgen = super.callPackage <stockholm/krebs/5pkgs/simple/htgen> {}; })
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${radioStore}' 0755 ${config.users.extraUsers.radio.name} - 1d -"
|
||||
];
|
||||
|
||||
users.extraUsers.radio.isSystemUser = true;
|
||||
|
||||
containers.lyrik = {
|
||||
autoStart = true;
|
||||
config = {config, pkgs, ...}: {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.port = lyrik.mpdPort;
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
|
||||
audio_output {
|
||||
name "Lyrik-Radio"
|
||||
type "httpd"
|
||||
encoder "vorbis"
|
||||
port "${toString lyrik.streamPort}"
|
||||
bitrate "128"
|
||||
format "44100:16:2"
|
||||
always_on "yes"
|
||||
tags "yes"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
krebs.htgen.radio = {
|
||||
port = htgenPort;
|
||||
user.name = "radio";
|
||||
script = ''. ${pkgs.writers.writeDash "meinskript" ''
|
||||
case "$Method $Request_URI" in
|
||||
"GET /lyrik/status")
|
||||
printf 'HTTP/1.1 200 OK\r\n'
|
||||
printf 'Content-Type: text/html; charset=UTF-8\r\n'
|
||||
printf 'Connection: close\r\n'
|
||||
printf '\r\n'
|
||||
|
||||
video_id="$(
|
||||
MPD_PORT=${toString lyrik.mpdPort} ${pkgs.mpc_cli}/bin/mpc status -f %file% \
|
||||
| head -n1 \
|
||||
| grep -o 'id=[^&]*' \
|
||||
| sed 's/^id=//g'
|
||||
)"
|
||||
|
||||
${pkgs.youtube-dl}/bin/youtube-dl -j "https://www.youtube.com/watch?v=$video_id" \
|
||||
| ${pkgs.jq}/bin/jq -r '"% [\(.title)](\(.webpage_url))\n\n\(.description)"' \
|
||||
| sed 's/$/ /g' \
|
||||
| ${nixpkgs-unstable.pandoc}/bin/pandoc -s
|
||||
|
||||
exit
|
||||
;;
|
||||
"GET /lyrikline/status")
|
||||
printf 'HTTP/1.1 200 OK\r\n'
|
||||
printf 'Content-Type: text/html; charset=UTF-8\r\n'
|
||||
printf 'Connection: close\r\n'
|
||||
printf '\r\n'
|
||||
|
||||
hash="$(
|
||||
MPD_PORT=${toString lyrikline.mpdPort} ${pkgs.mpc_cli}/bin/mpc status -f '%file%' \
|
||||
| head -n 1 \
|
||||
| md5sum \
|
||||
| cut -d' ' -f 1
|
||||
)"
|
||||
url="$(cat ${radioStore}/$hash)"
|
||||
|
||||
echo "<html><body style='margin:0'><iframe style='width:100%;height:100%;border:0' src="$url"></iframe></body></html>"
|
||||
exit
|
||||
;;
|
||||
"POST /meddl/skip")
|
||||
printf 'HTTP/1.1 200 OK\r\n'
|
||||
printf 'Content-Type: text/html; charset=UTF-8\r\n'
|
||||
printf 'Connection: close\r\n'
|
||||
printf '\r\n'
|
||||
${mpc-meddl}/bin/mpc-meddl next
|
||||
exit
|
||||
;;
|
||||
"GET /meddl/status")
|
||||
printf 'HTTP/1.1 200 OK\r\n'
|
||||
printf 'Content-Type: text/html; charset=UTF-8\r\n'
|
||||
printf 'Connection: close\r\n'
|
||||
printf '\r\n'
|
||||
|
||||
hash="$(
|
||||
MPD_PORT=${toString meddl.mpdPort} ${pkgs.mpc_cli}/bin/mpc status -f '%file%' \
|
||||
| head -n 1 \
|
||||
| md5sum \
|
||||
| cut -d' ' -f 1
|
||||
)"
|
||||
url="$(cat ${radioStore}/$hash)"
|
||||
|
||||
echo "<html><body style='margin:0'><iframe style='width:100%;height:100%;border:0' src="$url"></iframe></body></html>"
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
''}'';
|
||||
};
|
||||
|
||||
containers.meddl = {
|
||||
autoStart = true;
|
||||
config = {config, pkgs, ...}: {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.port = meddl.mpdPort;
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
volume_normalization "yes"
|
||||
|
||||
audio_output {
|
||||
name "DrachenLord Radio"
|
||||
type "httpd"
|
||||
encoder "vorbis"
|
||||
port "${toString meddl.streamPort}"
|
||||
bitrate "128"
|
||||
format "44100:16:2"
|
||||
always_on "yes"
|
||||
tags "yes"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
containers.lyrikline = {
|
||||
autoStart = true;
|
||||
config = {config, pkgs, ...}: {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
network.port = lyrikline.mpdPort;
|
||||
extraConfig = ''
|
||||
log_level "default"
|
||||
|
||||
audio_output {
|
||||
name "lyrikline.org Radio"
|
||||
type "httpd"
|
||||
encoder "vorbis"
|
||||
port "${toString lyrikline.streamPort}"
|
||||
bitrate "128"
|
||||
format "44100:16:2"
|
||||
always_on "yes"
|
||||
tags "yes"
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.lyrikline = {
|
||||
after = [ "container@lyrikline.service" ];
|
||||
wantedBy = [ "container@lyrikline.service" ];
|
||||
startAt = "*:00/5";
|
||||
serviceConfig.User = config.users.extraUsers.radio.name;
|
||||
preStart = "${mpc-lyrikline}/bin/mpc-lyrikline crop || :";
|
||||
script = ''
|
||||
set -efu
|
||||
|
||||
lyrikline=https://www.lyrikline.org
|
||||
for _ in $(seq 1 10); do
|
||||
random_route="$(${pkgs.curl}/bin/curl -sSL "$lyrikline/index.php/tools/getrandompoem" --data-raw 'lang=de' --compressed | ${pkgs.jq}/bin/jq -r .link)"
|
||||
poem_url="$lyrikline$random_route"
|
||||
|
||||
poem_file="$(
|
||||
${pkgs.curl}/bin/curl -sSL "$poem_url" \
|
||||
| grep -o 'https://.*\.mp3' \
|
||||
| head -n1
|
||||
)"
|
||||
|
||||
hash="$(echo "$poem_file" | md5sum | cut -d' ' -f 1)"
|
||||
echo "$poem_file ($hash) -> $poem_url"
|
||||
echo "$poem_url" > "${radioStore}/$hash"
|
||||
|
||||
${mpc-lyrikline}/bin/mpc-lyrikline add "$poem_file"
|
||||
done
|
||||
|
||||
${mpc-lyrikline}/bin/mpc-lyrikline play
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.services.lyrik = {
|
||||
after = [ "container@lyrik.service" ];
|
||||
wantedBy = [ "container@lyrik.service" ];
|
||||
preStart = "${mpc-lyrik}/bin/mpc-lyrik crop || :";
|
||||
restartIfChanged = true;
|
||||
serviceConfig.User = config.users.extraUsers.radio.name;
|
||||
script =
|
||||
let
|
||||
videoIds = import <niveum/lib/hot-rotation/lyrik.nix>;
|
||||
streams = lib.concatMapStringsSep "\n" (id: "https://au.ytprivate.com/latest_version?id=${id}&itag=251") videoIds;
|
||||
streamsFile = pkgs.writeText "hotrot" streams;
|
||||
in ''
|
||||
set -efu
|
||||
${mpc-lyrik}/bin/mpc-lyrik add < ${toString streamsFile}
|
||||
|
||||
${mpc-lyrik}/bin/mpc-lyrik crossfade 5
|
||||
${mpc-lyrik}/bin/mpc-lyrik random on
|
||||
${mpc-lyrik}/bin/mpc-lyrik repeat on
|
||||
${mpc-lyrik}/bin/mpc-lyrik play
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
systemd.services.meddl = {
|
||||
after = [ "container@meddl.service" ];
|
||||
wantedBy = [ "container@meddl.service" ];
|
||||
startAt = "*:00/10";
|
||||
serviceConfig.User = config.users.extraUsers.radio.name;
|
||||
preStart = "${mpc-meddl}/bin/mpc-meddl crop || :";
|
||||
script = ''
|
||||
set -efu
|
||||
host=http://antenne-asb.ga
|
||||
|
||||
prepend_host() {
|
||||
sed "s#^#$host/#"
|
||||
}
|
||||
|
||||
${pkgs.curl}/bin/curl -sSL "$host" \
|
||||
| ${pkgs.pup}/bin/pup 'li a attr{href}' \
|
||||
| prepend_host \
|
||||
| while read -r song; do
|
||||
song_url="$(${pkgs.curl}/bin/curl -sSL "$song" \
|
||||
| ${pkgs.pup}/bin/pup 'audio source attr{src}' \
|
||||
| prepend_host
|
||||
)"
|
||||
|
||||
hash="$(echo "$song_url" | md5sum | cut -d' ' -f 1)"
|
||||
echo "$song_url ($hash) -> $song"
|
||||
echo "$song" > "${radioStore}/$hash"
|
||||
|
||||
${mpc-meddl}/bin/mpc-meddl add "$song_url"
|
||||
done
|
||||
|
||||
${mpc-meddl}/bin/mpc-meddl play
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = [ mpc-lyrikline mpc-lyrik mpc-meddl ];
|
||||
|
||||
services.nginx.virtualHosts."radio.xn--kiern-0qa.de".locations = {
|
||||
"= /meddl/status".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
"= /meddl/listen.ogg".proxyPass = "http://127.0.0.1:${toString meddl.streamPort}";
|
||||
"= /meddl/skip".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
"= /lyrikline/status".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
"= /lyrikline/listen.ogg".proxyPass = "http://127.0.0.1:${toString lyrikline.streamPort}";
|
||||
"= /lyrik/status".proxyPass = "http://127.0.0.1:${toString htgenPort}";
|
||||
"= /lyrik/listen.ogg".proxyPass = "http://127.0.0.1:${toString lyrik.streamPort}";
|
||||
"= /lyrik.ogg".return = "301 http://radio.xn--kiern-0qa.de/lyrik/listen.ogg";
|
||||
"= /meddl.ogg".return = "301 http://radio.xn--kiern-0qa.de/meddl/listen.ogg";
|
||||
"= /lyrikline.ogg".return = "301 http://radio.xn--kiern-0qa.de/lyrikline/listen.ogg";
|
||||
};
|
||||
}
|
||||
@@ -1,10 +1,7 @@
|
||||
{ config, pkgs, ... }: {
|
||||
imports = [ <niveum/modules/retiolum.nix> ];
|
||||
imports = [
|
||||
<niveum/modules/retiolum.nix>
|
||||
];
|
||||
|
||||
networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; };
|
||||
|
||||
environment.etc."tinc/retiolum/rsa_key.priv" = {
|
||||
text = builtins.readFile <system-secrets/retiolum.key>;
|
||||
mode = "400";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
{ config, ... }:
|
||||
with config.niveum; {
|
||||
let
|
||||
inherit (import <niveum/lib>) colours;
|
||||
in{
|
||||
home-manager.users.me.programs.rofi = {
|
||||
enable = true;
|
||||
separator = "solid";
|
||||
scrollbar = false;
|
||||
borderWidth = 0;
|
||||
lines = 5;
|
||||
font = "Monospace ${toString (fonts.size - 1)}";
|
||||
font = "Monospace 10";
|
||||
colors = rec {
|
||||
window = rec {
|
||||
background = colours.foreground;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
documentation.enable = false;
|
||||
documentation.info.enable = false;
|
||||
documentation.man.enable = false;
|
||||
documentation.man.generateCaches = false;
|
||||
fonts.fontconfig.enable = false;
|
||||
nix.gc.automatic = true;
|
||||
nix.optimise.automatic = true;
|
||||
|
||||
7
configs/spacetime.nix
Normal file
7
configs/spacetime.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
time.timeZone = "Europe/Berlin";
|
||||
location = {
|
||||
latitude = 52.517;
|
||||
longitude = 13.3872;
|
||||
};
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
inherit (lib.strings) fileContents;
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [ spotify spotify-tui playerctl ];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/audio/spotifyd.nix
|
||||
systemd.user.services.spotifyd = let
|
||||
spotifyd = pkgs.unstable.spotifyd.override {
|
||||
withMpris = true;
|
||||
withPulseAudio = true;
|
||||
inherit (pkgs) libpulseaudio dbus;
|
||||
};
|
||||
spotifydConf = pkgs.writeText "spotifyd.conf" (lib.generators.toINI { } {
|
||||
global = {
|
||||
username = fileContents <secrets/spotify/username>;
|
||||
password = fileContents <secrets/spotify/password>;
|
||||
backend = "pulseaudio";
|
||||
on_song_change_hook = toString (pkgs.writers.writeDash "songinfo" ''
|
||||
PATH=$PATH:${
|
||||
lib.makeBinPath [ pkgs.playerctl pkgs.gawk pkgs.libnotify ]
|
||||
}
|
||||
metadata=$(playerctl metadata --player spotifyd)
|
||||
title=$(echo "$metadata" | awk '/^xesam:title\s/ { print substr($0, index($0, $3)) }')
|
||||
artist=$(echo "$metadata" | awk '/^xesam:artist\s/ { print substr($0, index($0, $3)) }' | paste --serial --delimiters "/")
|
||||
album=$(echo "$metadata" | awk '/^xesam:album\s/ { print substr($0, index($0, $3)) }')
|
||||
notify-send --app-name=" Spotify" "$title" "$artist – $album"
|
||||
'');
|
||||
};
|
||||
});
|
||||
in {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network-online.target" "sound.target" ];
|
||||
description = "spotifyd, a Spotify playing daemon";
|
||||
serviceConfig = {
|
||||
ExecStart =
|
||||
"${spotifyd}/bin/spotifyd --no-daemon --config-path ${spotifydConf}";
|
||||
Restart = "always";
|
||||
RestartSec = 12;
|
||||
};
|
||||
};
|
||||
}
|
||||
14
configs/spotifyd.nix
Normal file
14
configs/spotifyd.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
config = lib.generators.toINI { } {
|
||||
global = {
|
||||
username = lib.strings.fileContents <secrets/spotify/username>;
|
||||
password = lib.strings.fileContents <secrets/spotify/password>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.spotifyd.serviceConfig.Restart = "always";
|
||||
}
|
||||
@@ -1,27 +1,12 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
sshPort = 22022;
|
||||
kmeinKeys = lib.strings.splitString "\n" (lib.strings.fileContents (pkgs.fetchurl {
|
||||
url = "https://github.com/kmein.keys";
|
||||
sha256 = "1b9gbpgihg7zc89ivsz0gs3najp0zg53rcknvzvkm0851fdzkryx";
|
||||
}));
|
||||
inherit (import <niveum/lib>) sshPort kieran;
|
||||
in {
|
||||
services.xserver.displayManager.sessionCommands =
|
||||
"${pkgs.openssh}/bin/ssh-add";
|
||||
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
|
||||
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
services.openssh = {
|
||||
ports = [ sshPort ];
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
forwardX11 = true;
|
||||
};
|
||||
|
||||
users.motd = "Welcome to ${config.networking.hostName}!";
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = kmeinKeys;
|
||||
users.users.me.openssh.authorizedKeys.keys = kmeinKeys;
|
||||
users.users.me.openssh.authorizedKeys.keys = kieran.sshKeys pkgs;
|
||||
|
||||
home-manager.users.me.programs.ssh = {
|
||||
enable = true;
|
||||
@@ -30,19 +15,24 @@ in {
|
||||
hostname = "ssh.github.com";
|
||||
port = 443;
|
||||
};
|
||||
scardanelli = {
|
||||
hostname = "scardanelli.r";
|
||||
user = "kfm";
|
||||
zaatar = {
|
||||
hostname = "zaatar.r";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
};
|
||||
homeros = {
|
||||
hostname = "homeros.r";
|
||||
makanek = {
|
||||
hostname = "makanek.r";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
};
|
||||
manakish = {
|
||||
hostname = "manakish.r";
|
||||
user = "kfm";
|
||||
port = sshPort;
|
||||
};
|
||||
toum = {
|
||||
hostname = "toum.r";
|
||||
user = "kfm";
|
||||
user = "root";
|
||||
port = sshPort;
|
||||
};
|
||||
wilde = {
|
||||
|
||||
16
configs/sshd.nix
Normal file
16
configs/sshd.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) sshPort kieran;
|
||||
in
|
||||
{
|
||||
users.motd = "Welcome to ${config.networking.hostName}!";
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ sshPort ];
|
||||
passwordAuthentication = false;
|
||||
forwardX11 = true;
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = kieran.sshKeys pkgs;
|
||||
}
|
||||
@@ -3,8 +3,8 @@ let
|
||||
autorenkalender-package = pkgs.fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "autorenkalender";
|
||||
rev = "1971f082ec6e14d392a0dc3ac62e0b1e4187409b";
|
||||
sha256 = "0hipj616vcsa3f62s83jvlx8zx4bmbgl5h2n4w8ba5ngp40lkmb3";
|
||||
rev = "cf49a7b057301332d980eb47042a626add93db66";
|
||||
sha256 = "1pa7sjg33vdnjianrqldv445jdzzv3mn231ljk1j58hs0cd505gs";
|
||||
};
|
||||
autorenkalender =
|
||||
pkgs.python3Packages.callPackage autorenkalender-package { };
|
||||
@@ -24,6 +24,7 @@ in {
|
||||
./autorenkalender.nix
|
||||
./proverb.nix
|
||||
./nachtischsatan.nix
|
||||
<niveum/modules/telegram-bot.nix>
|
||||
];
|
||||
|
||||
systemd.services.telegram-odyssey = {
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
bright = "#151515";
|
||||
dark = "#000000";
|
||||
};
|
||||
red = {
|
||||
bright = "#de575c";
|
||||
dark = "#de575c";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#ebe971";
|
||||
dark = "#ebe971";
|
||||
};
|
||||
green = {
|
||||
bright = "#00b853";
|
||||
dark = "#00b853";
|
||||
};
|
||||
blue = {
|
||||
bright = "#90d0f0";
|
||||
dark = "#7fc6f0";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#cf9ffa";
|
||||
dark = "#cf9ffa";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#4ae5e8";
|
||||
dark = "#4ae5e8";
|
||||
};
|
||||
white = {
|
||||
bright = "#ffffff";
|
||||
dark = "#bbbbbb";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.dark;
|
||||
cursor = green.bright;
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = {
|
||||
black = {
|
||||
bright = "#444444";
|
||||
dark = "#1c1c1c";
|
||||
};
|
||||
red = {
|
||||
bright = "#ff8700";
|
||||
dark = "#af5f5f";
|
||||
};
|
||||
green = {
|
||||
bright = "#87af87";
|
||||
dark = "#5f875f";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#ffffaf";
|
||||
dark = "#87875f";
|
||||
};
|
||||
blue = {
|
||||
bright = "#8fafd7";
|
||||
dark = "#5f87af";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#8787af";
|
||||
dark = "#5f5f87";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#5fafaf";
|
||||
dark = "#5f8787";
|
||||
};
|
||||
white = {
|
||||
bright = "#999999";
|
||||
dark = "#6c6c6c";
|
||||
};
|
||||
background = "#262626";
|
||||
foreground = "#bcbcbc";
|
||||
cursor = "#bcbcbc";
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
bright = "#454545";
|
||||
dark = "#222222";
|
||||
};
|
||||
red = {
|
||||
bright = "#FA8072";
|
||||
dark = "#B22222";
|
||||
};
|
||||
green = {
|
||||
bright = "#779A3E";
|
||||
dark = "#556B2F";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#DAA520";
|
||||
dark = "#B8860B";
|
||||
};
|
||||
blue = {
|
||||
bright = "#6495ED";
|
||||
dark = "#4682B4";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#DA70D6";
|
||||
dark = "#9932CC";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#B0E0E6";
|
||||
dark = "#87CEEB";
|
||||
};
|
||||
white = {
|
||||
bright = "#FFFFFF";
|
||||
dark = "#C0C0C0";
|
||||
};
|
||||
background = "#000000";
|
||||
foreground = "#AAAAAA";
|
||||
cursor = green.bright;
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
bright = "#818383";
|
||||
dark = "#000000";
|
||||
};
|
||||
red = {
|
||||
bright = "#fc391f";
|
||||
dark = "#c23621";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#eaec23";
|
||||
dark = "#adad27";
|
||||
};
|
||||
green = {
|
||||
bright = "#31e722";
|
||||
dark = "#25bc24";
|
||||
};
|
||||
blue = {
|
||||
bright = "#5833ff";
|
||||
dark = "#492ee1";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#f935f8";
|
||||
dark = "#d338d3";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#14f0f0";
|
||||
dark = "#33bbc8";
|
||||
};
|
||||
white = {
|
||||
bright = "#e9ebeb";
|
||||
dark = "#cbcccd";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.dark;
|
||||
cursor = green.bright;
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
bright = "#4b4b4b";
|
||||
dark = "#242424";
|
||||
};
|
||||
red = {
|
||||
bright = "#fc1c18";
|
||||
dark = "#d71c15";
|
||||
};
|
||||
green = {
|
||||
bright = "#6bc219";
|
||||
dark = "#5aa513";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#fec80e";
|
||||
dark = "#fdb40c";
|
||||
};
|
||||
blue = {
|
||||
bright = "#0955ff";
|
||||
dark = "#063b8c";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#fb0050";
|
||||
dark = "#e40038";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#3ea8fc";
|
||||
dark = "#2595e1";
|
||||
};
|
||||
white = {
|
||||
bright = "#8c00ec";
|
||||
dark = "#efefef";
|
||||
};
|
||||
background = "#181818";
|
||||
foreground = white.dark;
|
||||
cursor = "#bbbbbb";
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
bright = "#282c34";
|
||||
dark = "#282c34";
|
||||
};
|
||||
red = {
|
||||
bright = "#e06c75";
|
||||
dark = "#e06c75";
|
||||
};
|
||||
green = {
|
||||
bright = "#98c379";
|
||||
dark = "#98c379";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#e5c07b";
|
||||
dark = "#e5c07b";
|
||||
};
|
||||
blue = {
|
||||
bright = "#61afef";
|
||||
dark = "#61afef";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#c678dd";
|
||||
dark = "#c678dd";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#56b6c2";
|
||||
dark = "#56b6c2";
|
||||
};
|
||||
white = {
|
||||
bright = "#dcdfe4";
|
||||
dark = "#dcdfe4";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.bright;
|
||||
cursor = "#a3b3cc";
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
dark = "#073642";
|
||||
bright = "#002b36";
|
||||
};
|
||||
red = {
|
||||
dark = "#dc322f";
|
||||
bright = "#cb4b16";
|
||||
};
|
||||
yellow = {
|
||||
dark = "#b58900";
|
||||
bright = "#657b83";
|
||||
};
|
||||
green = {
|
||||
dark = "#859900";
|
||||
bright = "#586e75";
|
||||
};
|
||||
blue = {
|
||||
dark = "#268bd2";
|
||||
bright = "#839496";
|
||||
};
|
||||
magenta = {
|
||||
dark = "#d33682";
|
||||
bright = "#6c71c4";
|
||||
};
|
||||
cyan = {
|
||||
dark = "#2aa198";
|
||||
bright = "#93a1a1";
|
||||
};
|
||||
white = {
|
||||
dark = "#eee8d5";
|
||||
bright = "#fdf6e3";
|
||||
};
|
||||
background = black.bright;
|
||||
foreground = blue.bright;
|
||||
cursor = cyan.bright;
|
||||
};
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{
|
||||
niveum.colours = rec {
|
||||
black = {
|
||||
dark = "#073642";
|
||||
bright = "#002b36";
|
||||
};
|
||||
red = {
|
||||
dark = "#dc322f";
|
||||
bright = "#cb4b16";
|
||||
};
|
||||
yellow = {
|
||||
dark = "#b58900";
|
||||
bright = "#657b83";
|
||||
};
|
||||
green = {
|
||||
dark = "#859900";
|
||||
bright = "#586e75";
|
||||
};
|
||||
blue = {
|
||||
dark = "#268bd2";
|
||||
bright = "#839496";
|
||||
};
|
||||
magenta = {
|
||||
dark = "#d33682";
|
||||
bright = "#6c71c4";
|
||||
};
|
||||
cyan = {
|
||||
dark = "#2aa198";
|
||||
bright = "#93a1a1";
|
||||
};
|
||||
white = {
|
||||
dark = "#eee8d5";
|
||||
bright = "#fdf6e3";
|
||||
};
|
||||
background = white.bright;
|
||||
foreground = yellow.bright;
|
||||
cursor = green.bright;
|
||||
};
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
{ lib, config, ... }:
|
||||
let inherit (config.niveum) theme colourPalette;
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
theme = (import <niveum/lib>).theme pkgs;
|
||||
in {
|
||||
console.colors = map (c: lib.strings.removePrefix "#" c) colourPalette;
|
||||
|
||||
environment.systemPackages =
|
||||
[ theme.gtk.package theme.icon.package theme.cursor.package ];
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ let
|
||||
'';
|
||||
in {
|
||||
home-manager.users.me.home.file.".todo/config".text = ''
|
||||
export TODO_DIR="$(${get-todo-dir})"
|
||||
# export TODO_DIR="$(${get-todo-dir})"
|
||||
export TODO_DIR="$HOME/cloud/Dropbox/todo"
|
||||
|
||||
export TODO_FILE="$TODO_DIR/todo.txt"
|
||||
export DONE_FILE="$TODO_DIR/done.txt"
|
||||
|
||||
@@ -29,6 +29,7 @@ in
|
||||
bedroom = 131082;
|
||||
living-room = living-room-id;
|
||||
bedside = 131087;
|
||||
desk = 131089;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
93
configs/urlwatch.nix
Normal file
93
configs/urlwatch.nix
Normal file
@@ -0,0 +1,93 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran;
|
||||
|
||||
urlwatchDir = "/var/lib/urlwatch";
|
||||
|
||||
urlsFile = pkgs.writeText "urls" (builtins.concatStringsSep "\n---\n" (map builtins.toJSON urls));
|
||||
|
||||
urls = [
|
||||
{
|
||||
name = "Corona-Verordnung";
|
||||
url = "https://www.berlin.de/corona/massnahmen/verordnung/";
|
||||
filter = [
|
||||
{
|
||||
css = "[role=main]";
|
||||
}
|
||||
"html2text"
|
||||
"strip"
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Christian-Metz-Blamage";
|
||||
url = "https://www.deutschlandfunk.de/meine-nacht-schlaeft-nicht-pflanze-mich-nicht-in-dein-herz.700.de.html?dram:article_id=486475";
|
||||
filter = [
|
||||
{
|
||||
element-by-class = "dlf-articledetail";
|
||||
}
|
||||
"html2text"
|
||||
"strip"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
configFile = pkgs.writeText "urlwatch.yaml" (builtins.toJSON {
|
||||
display = {
|
||||
error = true;
|
||||
new = true;
|
||||
unchanged = false;
|
||||
};
|
||||
report = {
|
||||
email = {
|
||||
enabled = true;
|
||||
from = "2210@cock.li";
|
||||
html = false;
|
||||
method = "smtp";
|
||||
smtp = {
|
||||
host = "mail.cock.li";
|
||||
port = 587;
|
||||
starttls = true;
|
||||
auth = true;
|
||||
insecure_password = lib.strings.fileContents <secrets/mail/cock>;
|
||||
};
|
||||
subject = "{count} changes: {jobs}";
|
||||
to = kieran.email;
|
||||
};
|
||||
html.diff = "unified";
|
||||
stdout = {
|
||||
color = true;
|
||||
enabled = true;
|
||||
};
|
||||
text.footer = false;
|
||||
# telegram = {
|
||||
# enabled = false;
|
||||
# bot_token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||
# chat_id = [ "18980945" ];
|
||||
# };
|
||||
};
|
||||
});
|
||||
in
|
||||
{
|
||||
users.extraUsers.urlwatch = {
|
||||
home = urlwatchDir;
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
systemd.services.urlwatch = {
|
||||
enable = true;
|
||||
startAt = "*-*-* 05:00:00";
|
||||
script = ''
|
||||
${pkgs.urlwatch}/bin/urlwatch \
|
||||
--config=${lib.escapeShellArg configFile} \
|
||||
--urls=${lib.escapeShellArg urlsFile}
|
||||
'';
|
||||
serviceConfig = {
|
||||
User = config.users.extraUsers.urlwatch.name;
|
||||
WorkingDirectory = config.users.extraUsers.urlwatch.home;
|
||||
PermissionsStartOnly = "true";
|
||||
PrivateTmp = "true";
|
||||
SyslogIdentifier = "urlwatch";
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -16,19 +16,34 @@ let
|
||||
rev = "33cad3099919366cea2627f930da9b47609e8554";
|
||||
sha256 = "1li6rrn016fpgvmnijqhvkp07kj83cjwcjx2l2b3asb99d51814i";
|
||||
};
|
||||
*/
|
||||
kmein-wallpapers = pkgs.fetchFromGitHub {
|
||||
owner = "kmein";
|
||||
repo = "wallpapers";
|
||||
rev = "7c553bc6bd78afa6dbf2824691466bbad0d8e6e9";
|
||||
sha256 = "1zik5z1cq1084j1hdwm204afz89f5hpg21z0vvcbppzkmldfxnnq";
|
||||
};
|
||||
*/
|
||||
in {
|
||||
imports = [ <stockholm/krebs/3modules/fetchWallpaper.nix> ];
|
||||
|
||||
krebs.fetchWallpaper = {
|
||||
enable = true;
|
||||
# unitConfig.ConditionPathExists = "!/var/run/ppp0.pid";
|
||||
url = "https://lassul.us/wallpaper-marker.png";
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
display = lib.mkForce 0; # needed for fetchWallpaper to find the X display
|
||||
displayManager.sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +LOCAL:";
|
||||
};
|
||||
|
||||
/*
|
||||
home-manager.users.me = {
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
imageDirectory = "${kmein-wallpapers}/saudade";
|
||||
imageDirectory = "${kmein-wallpapers}/meteora";
|
||||
interval = "1h";
|
||||
};
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.watson ];
|
||||
|
||||
system.activationScripts.watsonFiles = ''
|
||||
install -d ${config.users.users.me.home}/.config/watson/
|
||||
ln -sf ${config.users.users.me.home}/cloud/Dropbox/watson-frames.json ${config.users.users.me.home}/.config/watson/frames
|
||||
'';
|
||||
}
|
||||
|
||||
90
configs/weechat.nix
Normal file
90
configs/weechat.nix
Normal file
@@ -0,0 +1,90 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
inherit (import <niveum/lib>) kieran nixpkgs-unstable;
|
||||
relayPassword = lib.fileContents <system-secrets/weechat/relay>;
|
||||
in {
|
||||
systemd.services.weechat =
|
||||
let
|
||||
tmux = pkgs.writers.writeDash "tmux" ''
|
||||
exec ${pkgs.tmux}/bin/tmux -f ${pkgs.writeText "tmux.conf" ''
|
||||
set-option -g prefix `
|
||||
unbind-key C-b
|
||||
bind ` send-prefix
|
||||
|
||||
set-option -g status off
|
||||
set-option -g default-terminal screen-256color
|
||||
|
||||
#use session instead of windows
|
||||
bind-key c new-session
|
||||
bind-key p switch-client -p
|
||||
bind-key n switch-client -n
|
||||
bind-key C-s switch-client -l
|
||||
''} "$@"
|
||||
'';
|
||||
weechat = pkgs.weechat.override {
|
||||
configure = { ... }: {
|
||||
scripts = [ pkgs.weechatScripts.weechat-autosort nixpkgs-unstable.weechatScripts.colorize_nicks ];
|
||||
init = ''
|
||||
/set irc.server_default.nicks "kmein,kfm,kieran"
|
||||
/set irc.server_default.msg_part "tschö mit ö"
|
||||
/set irc.server_default.msg_quit "ciao kakao"
|
||||
/set irc.server_default.msg_kick "warum machst du diese?"
|
||||
/set irc.server_default.realname "${kieran.name}"
|
||||
|
||||
/server add hackint irc.hackint.org/6697 -ipv6 -ssl
|
||||
/server add freenode chat.freenode.org/6697 -ssl
|
||||
/server add irc.r irc.r
|
||||
/server add news.r news.r
|
||||
|
||||
/alias add mod /quote omode $channel +o $nick
|
||||
|
||||
/relay add weechat 9000
|
||||
/set relay.network.password ${relayPassword}
|
||||
|
||||
/set irc.server.freenode.autojoin "#krebs,#flipdot,##myengadin,#nixos,#nixos-de,#haskell"
|
||||
/set irc.server.hackint.autojoin "#hsmr"
|
||||
/set irc.server.irc.r.autojoin "#xxx,#brockman"
|
||||
/set irc.server.news.r.autojoin "#drachengame,#berlin"
|
||||
/set logger.level.irc.news.r.#all 0
|
||||
|
||||
/filter addreplace corona irc.news.r.* * [kc]orona|[kc]ovid|virus|lockdown|va[kc][sc]in|mutante|mutation|impf|pandemi|κορ[ωο]νοϊός|корона|expert[es]
|
||||
/filter addreplace joinquit * irc_join,irc_part,irc_quit *
|
||||
|
||||
/set irc.look.server_buffer independent
|
||||
|
||||
/connect freenode
|
||||
/connect hackint
|
||||
/connect irc.r
|
||||
/connect news.r
|
||||
'';
|
||||
};
|
||||
};
|
||||
in {
|
||||
description = "Weechat bouncer";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
restartIfChanged = true;
|
||||
path = [ pkgs.alacritty.terminfo ];
|
||||
environment.WEECHAT_HOME = "/var/lib/weechat";
|
||||
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
|
||||
preStop = "${tmux} kill-session -t IM";
|
||||
serviceConfig = {
|
||||
User = "weechat";
|
||||
RemainAfterExit = true;
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
|
||||
users.groups.weechat = {};
|
||||
users.extraUsers.weechat = {
|
||||
useDefaultShell = true;
|
||||
openssh.authorizedKeys.keys = kieran.sshKeys pkgs ++ [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC+KVDmYYH7mA8v81e9O3swXm3ZVYY9t4HP65ud61uXy weechat_android@heym"
|
||||
];
|
||||
createHome = true;
|
||||
group = "weechat";
|
||||
home = "/var/lib/weechat";
|
||||
isSystemUser = true;
|
||||
packages = [ pkgs.tmux ];
|
||||
};
|
||||
}
|
||||
49
configs/wifi.nix
Normal file
49
configs/wifi.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
userControlled.enable = true;
|
||||
networks = {
|
||||
"Aether" = {
|
||||
pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
|
||||
priority = 10;
|
||||
};
|
||||
"Asoziales Netzwerk" = {
|
||||
pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6";
|
||||
priority = 10;
|
||||
};
|
||||
"Libertarian WiFi" = {
|
||||
pskRaw = "e9beaae6ffa55d10e80b8a2e7d997411d676a3cc6f1f29d0b080391f04555050";
|
||||
priority = 9;
|
||||
};
|
||||
"EasyBox-927376".pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22";
|
||||
"FlixBus Wi-Fi" = { };
|
||||
"FlixBus" = { };
|
||||
"FlixTrain" = { };
|
||||
"BVG Wi-Fi" = { };
|
||||
"wannseeforum" = { }; # login via curl -XPOST http://WannseeLancom.intern.:80/authen/login/ -d userid=$USER_ID -d password=$PASSWORD
|
||||
"Hotel_Krone" = { }; # login: http://192.168.10.1/
|
||||
"Ni/Schukajlow".pskRaw = "ffc47f6829da59c48aea878a32252223303f5c47a3859edc90971ffc63346781";
|
||||
"WIFIonICE" = { }; # login: http://10.101.64.10/
|
||||
"WLAN-914742".psk = "67647139648174545446";
|
||||
"KDG-CEAA4".psk = "PBkBSmejcvM4";
|
||||
"KDG-4ECF7".psk = "Gdbwh7afw2Bx";
|
||||
"WLAN-XVMU6T".pskRaw = "46ea807283255a3d7029233bd79c18837df582666c007c86a8d591f65fae17cc";
|
||||
"c-base-public" = { };
|
||||
"discord".psk = "baraustrinken";
|
||||
"GoOnline".psk = "airbnbguest";
|
||||
"security-by-obscurity".psk = "44629828256481964386";
|
||||
"Mayflower".psk = "Fr31EsLan";
|
||||
"Born11".psk = "56LMVLbw840EGNWk0RYRqvgicx3FSO";
|
||||
"FactoryCommunityGuest".psk = "Factory4ever";
|
||||
"krebs".psk = "aidsballs";
|
||||
"b-base".pskRaw = "44040369a63d5bce4576637e8d34aeb3ed3d178011386decb99da473418e9861";
|
||||
"c-base".pskRaw = "1355ccb287407bcd0caa4a7a399367c28b1e11bf5da34dd100d4b86ac4cafe46";
|
||||
# "o2-WLAN66".pskRaw = "9fc24da5ee0c7cf73321f5efa805370c246c4121413ea4f2373c0b7e41ec65e4";
|
||||
"Vodafone-8012".pskRaw = "45a998e3e07f83ae0b4f573535fb3ccfd808b364a22f349878ced889a6fffe2c";
|
||||
"yinyin".pskRaw = "ee85005d339df61e1e1a8484b96318513e15c46f222c3c06e8959fbc256569e7";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.wpa_supplicant_gui ];
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
suspendIfBored = false;
|
||||
|
||||
xlockModes = lib.concatStringsSep "\\n" [
|
||||
# "braid"
|
||||
"galaxy"
|
||||
# "lightning"
|
||||
# "matrix"
|
||||
"pyro2"
|
||||
"space"
|
||||
];
|
||||
my-xlock = pkgs.writers.writeDashBin "xlock" ''
|
||||
MODE=$(printf "${xlockModes}" | shuf -n 1)
|
||||
|
||||
${pkgs.xlockmore}/bin/xlock \
|
||||
-saturation 0.4 \
|
||||
-erasemode no_fade \
|
||||
+description \
|
||||
-showdate \
|
||||
-username " " \
|
||||
-password " " \
|
||||
-info " " \
|
||||
-validate "..." \
|
||||
-invalid "Computer says no." \
|
||||
-mode "$MODE"
|
||||
'';
|
||||
in {
|
||||
services.xserver.xautolock = rec {
|
||||
enable = true;
|
||||
killer =
|
||||
if suspendIfBored then "${pkgs.systemd}/bin/systemctl suspend" else null;
|
||||
locker = "${my-xlock}/bin/xlock";
|
||||
nowlocker = locker;
|
||||
enableNotifier = true;
|
||||
notifier = ''
|
||||
${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking" "in 10 seconds."'';
|
||||
};
|
||||
}
|
||||
28
deploy.nix
28
deploy.nix
@@ -1,4 +1,6 @@
|
||||
let
|
||||
inherit (import ./lib/default.nix) sshPort;
|
||||
|
||||
gitFromJson = path:
|
||||
let object = importJson path;
|
||||
in {
|
||||
@@ -17,7 +19,6 @@ let
|
||||
nixos-config.symlink = "system/configuration.nix";
|
||||
|
||||
nixpkgs.git = gitFromJson .versions/nixpkgs.json;
|
||||
nixpkgs-unstable.git = gitFromJson .versions/nixpkgs-unstable.json;
|
||||
home-manager.git = gitFromJson .versions/home-manager.json;
|
||||
stockholm.git = gitFromJson .versions/stockholm.json;
|
||||
retiolum.git = gitFromJson .versions/retiolum.json;
|
||||
@@ -30,19 +31,14 @@ let
|
||||
name = "shared";
|
||||
};
|
||||
}];
|
||||
target = "root@${address}:22022";
|
||||
target = "root@${address}:${toString sshPort}";
|
||||
};
|
||||
inherit (pkgs.krops) writeDeploy;
|
||||
in {
|
||||
scardanelli = writeDeploy "deploy-scardanelli" (regularSystem {
|
||||
path = systems/scardanelli;
|
||||
name = "scardanelli";
|
||||
address = "scardanelli.r";
|
||||
});
|
||||
homeros = writeDeploy "deploy-homeros" (regularSystem {
|
||||
path = systems/homeros;
|
||||
name = "homeros";
|
||||
address = "homeros.r";
|
||||
zaatar = writeDeploy "deploy-zaatar" (regularSystem {
|
||||
path = systems/zaatar;
|
||||
name = "zaatar";
|
||||
address = "zaatar.r";
|
||||
});
|
||||
wilde = writeDeploy "deploy-wilde" (regularSystem {
|
||||
path = systems/wilde;
|
||||
@@ -54,4 +50,14 @@ in {
|
||||
name = "toum";
|
||||
address = "toum.r";
|
||||
});
|
||||
makanek = writeDeploy "deploy-makanek" (regularSystem {
|
||||
path = systems/makanek;
|
||||
name = "makanek";
|
||||
address = "makanek.r";
|
||||
});
|
||||
manakish = writeDeploy "deploy-manakish" (regularSystem {
|
||||
path = systems/manakish;
|
||||
name = "manakish";
|
||||
address = "manakish.r";
|
||||
});
|
||||
}
|
||||
|
||||
24
dot/htoprc
24
dot/htoprc
@@ -1,24 +0,0 @@
|
||||
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||
sort_key=46
|
||||
sort_direction=1
|
||||
hide_threads=0
|
||||
hide_kernel_threads=1
|
||||
hide_userland_threads=0
|
||||
shadow_other_users=1
|
||||
show_thread_names=1
|
||||
show_program_path=1
|
||||
highlight_base_name=1
|
||||
highlight_megabytes=1
|
||||
highlight_threads=1
|
||||
tree_view=1
|
||||
header_margin=1
|
||||
detailed_cpu_time=0
|
||||
cpu_count_from_zero=0
|
||||
update_process_names=0
|
||||
account_guest_in_cpu_meter=1
|
||||
color_scheme=0
|
||||
delay=15
|
||||
left_meters=LeftCPUs2 RightCPUs2 Memory Swap
|
||||
left_meter_modes=1 1 1 1
|
||||
right_meters=Uptime Tasks LoadAverage Battery
|
||||
right_meter_modes=2 2 2 2
|
||||
@@ -1,41 +0,0 @@
|
||||
{ token }: {
|
||||
general = {
|
||||
RemoteNickFormat = "[{NOPINGNICK}] ";
|
||||
Charset = "utf-8";
|
||||
};
|
||||
telegram.kmein.Token = token;
|
||||
irc.freenode = {
|
||||
Server = "irc.freenode.net:6667";
|
||||
Nick = "tg_bridge";
|
||||
};
|
||||
gateway = [
|
||||
{
|
||||
name = "krebs-bridge";
|
||||
enable = true;
|
||||
inout = [
|
||||
{
|
||||
account = "irc.freenode";
|
||||
channel = "#krebs";
|
||||
}
|
||||
{
|
||||
account = "telegram.kmein";
|
||||
channel = "-330372458";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "myengadin-bridge";
|
||||
enable = true;
|
||||
inout = [
|
||||
{
|
||||
account = "irc.freenode";
|
||||
channel = "##myengadin";
|
||||
}
|
||||
{
|
||||
account = "telegram.kmein";
|
||||
channel = "-425759153";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
37
lib/colours/antares.nix
Normal file
37
lib/colours/antares.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
bright = "#151515";
|
||||
dark = "#000000";
|
||||
};
|
||||
red = {
|
||||
bright = "#de575c";
|
||||
dark = "#de575c";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#ebe971";
|
||||
dark = "#ebe971";
|
||||
};
|
||||
green = {
|
||||
bright = "#00b853";
|
||||
dark = "#00b853";
|
||||
};
|
||||
blue = {
|
||||
bright = "#90d0f0";
|
||||
dark = "#7fc6f0";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#cf9ffa";
|
||||
dark = "#cf9ffa";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#4ae5e8";
|
||||
dark = "#4ae5e8";
|
||||
};
|
||||
white = {
|
||||
bright = "#ffffff";
|
||||
dark = "#bbbbbb";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.dark;
|
||||
cursor = green.bright;
|
||||
}
|
||||
37
lib/colours/apprentice.nix
Normal file
37
lib/colours/apprentice.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
black = {
|
||||
bright = "#444444";
|
||||
dark = "#1c1c1c";
|
||||
};
|
||||
red = {
|
||||
bright = "#ff8700";
|
||||
dark = "#af5f5f";
|
||||
};
|
||||
green = {
|
||||
bright = "#87af87";
|
||||
dark = "#5f875f";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#ffffaf";
|
||||
dark = "#87875f";
|
||||
};
|
||||
blue = {
|
||||
bright = "#8fafd7";
|
||||
dark = "#5f87af";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#8787af";
|
||||
dark = "#5f5f87";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#5fafaf";
|
||||
dark = "#5f8787";
|
||||
};
|
||||
white = {
|
||||
bright = "#999999";
|
||||
dark = "#6c6c6c";
|
||||
};
|
||||
background = "#262626";
|
||||
foreground = "#bcbcbc";
|
||||
cursor = "#bcbcbc";
|
||||
}
|
||||
37
lib/colours/connermcd.nix
Normal file
37
lib/colours/connermcd.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
bright = "#454545";
|
||||
dark = "#222222";
|
||||
};
|
||||
red = {
|
||||
bright = "#FA8072";
|
||||
dark = "#B22222";
|
||||
};
|
||||
green = {
|
||||
bright = "#779A3E";
|
||||
dark = "#556B2F";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#DAA520";
|
||||
dark = "#B8860B";
|
||||
};
|
||||
blue = {
|
||||
bright = "#6495ED";
|
||||
dark = "#4682B4";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#DA70D6";
|
||||
dark = "#9932CC";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#B0E0E6";
|
||||
dark = "#87CEEB";
|
||||
};
|
||||
white = {
|
||||
bright = "#FFFFFF";
|
||||
dark = "#C0C0C0";
|
||||
};
|
||||
background = "#000000";
|
||||
foreground = "#AAAAAA";
|
||||
cursor = green.bright;
|
||||
}
|
||||
37
lib/colours/mac-os.nix
Normal file
37
lib/colours/mac-os.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
bright = "#818383";
|
||||
dark = "#000000";
|
||||
};
|
||||
red = {
|
||||
bright = "#fc391f";
|
||||
dark = "#c23621";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#eaec23";
|
||||
dark = "#adad27";
|
||||
};
|
||||
green = {
|
||||
bright = "#31e722";
|
||||
dark = "#25bc24";
|
||||
};
|
||||
blue = {
|
||||
bright = "#5833ff";
|
||||
dark = "#492ee1";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#f935f8";
|
||||
dark = "#d338d3";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#14f0f0";
|
||||
dark = "#33bbc8";
|
||||
};
|
||||
white = {
|
||||
bright = "#e9ebeb";
|
||||
dark = "#cbcccd";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.dark;
|
||||
cursor = green.bright;
|
||||
}
|
||||
37
lib/colours/owickstrom-dark.nix
Normal file
37
lib/colours/owickstrom-dark.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
bright = "#4b4b4b";
|
||||
dark = "#242424";
|
||||
};
|
||||
red = {
|
||||
bright = "#fc1c18";
|
||||
dark = "#d71c15";
|
||||
};
|
||||
green = {
|
||||
bright = "#6bc219";
|
||||
dark = "#5aa513";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#fec80e";
|
||||
dark = "#fdb40c";
|
||||
};
|
||||
blue = {
|
||||
bright = "#0955ff";
|
||||
dark = "#063b8c";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#fb0050";
|
||||
dark = "#e40038";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#3ea8fc";
|
||||
dark = "#2595e1";
|
||||
};
|
||||
white = {
|
||||
bright = "#8c00ec";
|
||||
dark = "#efefef";
|
||||
};
|
||||
background = "#181818";
|
||||
foreground = white.dark;
|
||||
cursor = "#bbbbbb";
|
||||
}
|
||||
37
lib/colours/owickstrom.nix
Normal file
37
lib/colours/owickstrom.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
bright = "#282c34";
|
||||
dark = "#282c34";
|
||||
};
|
||||
red = {
|
||||
bright = "#e06c75";
|
||||
dark = "#e06c75";
|
||||
};
|
||||
green = {
|
||||
bright = "#98c379";
|
||||
dark = "#98c379";
|
||||
};
|
||||
yellow = {
|
||||
bright = "#e5c07b";
|
||||
dark = "#e5c07b";
|
||||
};
|
||||
blue = {
|
||||
bright = "#61afef";
|
||||
dark = "#61afef";
|
||||
};
|
||||
magenta = {
|
||||
bright = "#c678dd";
|
||||
dark = "#c678dd";
|
||||
};
|
||||
cyan = {
|
||||
bright = "#56b6c2";
|
||||
dark = "#56b6c2";
|
||||
};
|
||||
white = {
|
||||
bright = "#dcdfe4";
|
||||
dark = "#dcdfe4";
|
||||
};
|
||||
background = black.dark;
|
||||
foreground = white.bright;
|
||||
cursor = "#a3b3cc";
|
||||
}
|
||||
37
lib/colours/solarized-dark.nix
Normal file
37
lib/colours/solarized-dark.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
dark = "#073642";
|
||||
bright = "#002b36";
|
||||
};
|
||||
red = {
|
||||
dark = "#dc322f";
|
||||
bright = "#cb4b16";
|
||||
};
|
||||
yellow = {
|
||||
dark = "#b58900";
|
||||
bright = "#657b83";
|
||||
};
|
||||
green = {
|
||||
dark = "#859900";
|
||||
bright = "#586e75";
|
||||
};
|
||||
blue = {
|
||||
dark = "#268bd2";
|
||||
bright = "#839496";
|
||||
};
|
||||
magenta = {
|
||||
dark = "#d33682";
|
||||
bright = "#6c71c4";
|
||||
};
|
||||
cyan = {
|
||||
dark = "#2aa198";
|
||||
bright = "#93a1a1";
|
||||
};
|
||||
white = {
|
||||
dark = "#eee8d5";
|
||||
bright = "#fdf6e3";
|
||||
};
|
||||
background = black.bright;
|
||||
foreground = blue.bright;
|
||||
cursor = cyan.bright;
|
||||
}
|
||||
37
lib/colours/solarized-light.nix
Normal file
37
lib/colours/solarized-light.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
rec {
|
||||
black = {
|
||||
dark = "#073642";
|
||||
bright = "#002b36";
|
||||
};
|
||||
red = {
|
||||
dark = "#dc322f";
|
||||
bright = "#cb4b16";
|
||||
};
|
||||
yellow = {
|
||||
dark = "#b58900";
|
||||
bright = "#657b83";
|
||||
};
|
||||
green = {
|
||||
dark = "#859900";
|
||||
bright = "#586e75";
|
||||
};
|
||||
blue = {
|
||||
dark = "#268bd2";
|
||||
bright = "#839496";
|
||||
};
|
||||
magenta = {
|
||||
dark = "#d33682";
|
||||
bright = "#6c71c4";
|
||||
};
|
||||
cyan = {
|
||||
dark = "#2aa198";
|
||||
bright = "#93a1a1";
|
||||
};
|
||||
white = {
|
||||
dark = "#eee8d5";
|
||||
bright = "#fdf6e3";
|
||||
};
|
||||
background = white.bright;
|
||||
foreground = yellow.bright;
|
||||
cursor = green.bright;
|
||||
}
|
||||
5
lib/default-applications.nix
Normal file
5
lib/default-applications.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
pkgs: rec {
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
browser = "${pkgs.brave}/bin/brave";
|
||||
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
|
||||
}
|
||||
@@ -1,12 +1,75 @@
|
||||
{
|
||||
localAddresses = {
|
||||
toum = "192.168.178.24";
|
||||
homeros = "192.168.178.22";
|
||||
wilde = "192.168.178.32";
|
||||
android = "192.168.178.35";
|
||||
|
||||
tradfri = "192.168.178.28";
|
||||
officejet = "192.168.178.27";
|
||||
fritzbox = "192.168.178.1";
|
||||
rec {
|
||||
nixpkgs-src = builtins.fetchGit {
|
||||
url = "https://github.com/NixOS/nixpkgs";
|
||||
rev = "f3042e30785437f6cb2d99b15625b962fb96799f";
|
||||
};
|
||||
nixpkgs-unstable = import nixpkgs-src { config.allowUnfree = true; };
|
||||
|
||||
sshPort = 22022;
|
||||
|
||||
colours = import ./colours/mac-os.nix;
|
||||
|
||||
theme = pkgs: {
|
||||
gtk = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome3.gnome-themes-extra;
|
||||
};
|
||||
icon = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome3.adwaita-icon-theme;
|
||||
};
|
||||
cursor = {
|
||||
name = "capitaine-cursors-white";
|
||||
package = pkgs.capitaine-cursors;
|
||||
};
|
||||
};
|
||||
|
||||
defaultApplications = import ./default-applications.nix;
|
||||
|
||||
localAddresses = import ./local-network.nix;
|
||||
|
||||
kieran = {
|
||||
github = "kmein";
|
||||
email = "kmein@posteo.de";
|
||||
name = "Kierán Meinhardt";
|
||||
sshKeys = pkgs: pkgs.lib.strings.splitString "\n" (pkgs.lib.strings.fileContents (pkgs.fetchurl {
|
||||
url = "https://github.com/kmein.keys";
|
||||
sha256 = "09c6ny0rmpid1m0pc1wsmb3wyy9g721lf4kv55i4lrp42b3i2d5b";
|
||||
}));
|
||||
};
|
||||
|
||||
syncthing.devices = {
|
||||
wilde.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
|
||||
heym.id = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
|
||||
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||
toum.id = "CBJQXFF-FMFGWFU-2J6FMPR-SRDTSGX-7NHOYOH-CQCABKF-KQJMRJC-SDE24Q4";
|
||||
};
|
||||
|
||||
ignorePaths = [
|
||||
"*~"
|
||||
".stack-work/"
|
||||
"__pycache__/"
|
||||
".mypy_cache/"
|
||||
"*.py[co]"
|
||||
"*.o"
|
||||
"*.hi"
|
||||
"*.aux"
|
||||
"*.bbl"
|
||||
"*.bcf"
|
||||
"*.blg"
|
||||
"*.fdb_latexmk"
|
||||
"*.fls"
|
||||
"*.out"
|
||||
"*.run.xml"
|
||||
"*.toc"
|
||||
"*.bbl"
|
||||
"*.class"
|
||||
"*.dyn_hi"
|
||||
"*.dyn_o"
|
||||
"dist/"
|
||||
".envrc"
|
||||
".direnv/"
|
||||
"dist-newstyle/"
|
||||
".history"
|
||||
];
|
||||
}
|
||||
|
||||
1913
lib/hot-rotation/lyrik.nix
Normal file
1913
lib/hot-rotation/lyrik.nix
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
{ pkgs, wifi-interface, colours, batteryBlock }:
|
||||
{ pkgs, wirelessInterface, colours, batteryName }:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
|
||||
@@ -33,7 +33,7 @@ in {
|
||||
good_bg = colours.background;
|
||||
idle_bg = colours.background;
|
||||
info_bg = colours.background;
|
||||
separator = "* ";
|
||||
separator = "/ ";
|
||||
separator_bg = "auto";
|
||||
separator_fg = colours.black.bright;
|
||||
};
|
||||
@@ -89,18 +89,6 @@ in {
|
||||
}"
|
||||
'';
|
||||
}
|
||||
{
|
||||
block = "custom";
|
||||
interval = 30;
|
||||
command = pkgs.writers.writeDash "rss-new" ''
|
||||
${pkgs.newsboat}/bin/newsboat --execute=print-unread | ${pkgs.gawk}/bin/awk '{ print "📰 " $1 }'
|
||||
'';
|
||||
on_click = pkgs.writers.writeDash "rss-update" ''
|
||||
${pkgs.libnotify}/bin/notify-send --app-name=" Newsboat" "Updating feeds." \
|
||||
&& ${pkgs.newsboat}/bin/newsboat --execute=reload \
|
||||
&& ${pkgs.libnotify}/bin/notify-send --app-name=" Newsboat" "Feeds updated."
|
||||
'';
|
||||
}
|
||||
{
|
||||
block = "custom";
|
||||
interval = 30;
|
||||
@@ -114,7 +102,7 @@ in {
|
||||
}
|
||||
{
|
||||
block = "net";
|
||||
device = wifi-interface;
|
||||
device = wirelessInterface;
|
||||
speed_up = false;
|
||||
speed_down = false;
|
||||
signal_strength = true;
|
||||
@@ -122,7 +110,7 @@ in {
|
||||
}
|
||||
{
|
||||
block = "battery";
|
||||
device = batteryBlock;
|
||||
device = batteryName;
|
||||
}
|
||||
{
|
||||
block = "sound";
|
||||
11
lib/local-network.nix
Normal file
11
lib/local-network.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
toum = "192.168.178.24";
|
||||
zaatar = "192.168.178.21";
|
||||
wilde = "192.168.178.32";
|
||||
android = "192.168.178.35";
|
||||
manakish = "192.168.178.29";
|
||||
|
||||
tradfri = "192.168.178.28";
|
||||
officejet = "192.168.178.27";
|
||||
fritzbox = "192.168.178.1";
|
||||
}
|
||||
1509
lib/streams.nix
Normal file
1509
lib/streams.nix
Normal file
File diff suppressed because it is too large
Load Diff
@@ -124,6 +124,7 @@ if has("autocmd")
|
||||
autocmd bufnewfile,bufread *.rust packadd rust-vim " | packadd deoplete-rust
|
||||
autocmd bufnewfile,bufread *.csv packadd csv-vim | set filetype=csv
|
||||
autocmd bufnewfile,bufread *.toml packadd vim-toml | set filetype=toml
|
||||
autocmd bufnewfile,bufread *.nim packadd nim-vim | set filetype=nim
|
||||
autocmd bufnewfile,bufread *.tex packadd vimtex | set filetype=tex
|
||||
autocmd bufnewfile,bufread *.ics packadd icalendar.vim | set filetype=icalendar
|
||||
autocmd bufnewfile,bufread *.ts packadd typescript-vim | set filetype=typescript
|
||||
@@ -181,7 +182,7 @@ let g:pandoc#spell#default_langs = ['en', 'de']
|
||||
|
||||
let g:ale_linters = {
|
||||
\ 'css': ['csslint'],
|
||||
\ 'haskell': ['ghc', 'cabal-ghc', 'hlint'],
|
||||
\ 'haskell': ['ghc', 'cabal-ghc', 'hlint', 'ormolu'],
|
||||
\ 'html': ['tidy', 'proselint'],
|
||||
\ 'latex': ['lacheck', 'chktex', 'proselint'],
|
||||
\ 'pandoc': ['proselint'],
|
||||
@@ -1,134 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
colourScheme = config.niveum.colours;
|
||||
|
||||
my-types.hexColour = types.strMatching "#[0-9A-Fa-f]{6}";
|
||||
my-types.colourPair = types.submodule {
|
||||
options = {
|
||||
dark = mkOption { type = my-types.hexColour; };
|
||||
bright = mkOption { type = my-types.hexColour; };
|
||||
};
|
||||
};
|
||||
my-types.theme = types.submodule {
|
||||
options = {
|
||||
name = mkOption { type = types.str; };
|
||||
package = mkOption { type = types.package; };
|
||||
};
|
||||
};
|
||||
|
||||
my-types.colourTheme = types.submodule {
|
||||
options = {
|
||||
black = mkOption { type = my-types.colourPair; };
|
||||
red = mkOption { type = my-types.colourPair; };
|
||||
green = mkOption { type = my-types.colourPair; };
|
||||
yellow = mkOption { type = my-types.colourPair; };
|
||||
blue = mkOption { type = my-types.colourPair; };
|
||||
magenta = mkOption { type = my-types.colourPair; };
|
||||
cyan = mkOption { type = my-types.colourPair; };
|
||||
white = mkOption { type = my-types.colourPair; };
|
||||
background = mkOption { type = my-types.hexColour; };
|
||||
foreground = mkOption { type = my-types.hexColour; };
|
||||
cursor = mkOption { type = my-types.hexColour; };
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.niveum = {
|
||||
applications = { fileManager = mkOption { type = types.str; }; };
|
||||
|
||||
colours = mkOption { type = my-types.colourTheme; };
|
||||
|
||||
colourPalette = mkOption {
|
||||
type = types.listOf my-types.hexColour;
|
||||
default = with config.niveum.colours; [
|
||||
black.dark
|
||||
red.dark
|
||||
green.dark
|
||||
yellow.dark
|
||||
blue.dark
|
||||
magenta.dark
|
||||
cyan.dark
|
||||
white.dark
|
||||
black.bright
|
||||
red.bright
|
||||
green.bright
|
||||
yellow.bright
|
||||
blue.bright
|
||||
magenta.bright
|
||||
cyan.bright
|
||||
white.bright
|
||||
];
|
||||
};
|
||||
|
||||
networkInterfaces.wireless = mkOption { type = types.str; };
|
||||
|
||||
batteryBlocks.default = mkOption { type = types.str; };
|
||||
|
||||
promptColours = let
|
||||
colours16 = types.enum [
|
||||
"black"
|
||||
"red"
|
||||
"green"
|
||||
"yellow"
|
||||
"blue"
|
||||
"magenta"
|
||||
"cyan"
|
||||
"white"
|
||||
];
|
||||
in {
|
||||
success = mkOption {
|
||||
type = colours16;
|
||||
default = "green";
|
||||
};
|
||||
failure = mkOption {
|
||||
type = colours16;
|
||||
default = "red";
|
||||
};
|
||||
};
|
||||
|
||||
fonts = { size = mkOption { type = types.int; }; };
|
||||
|
||||
user = {
|
||||
github = mkOption { type = types.str; };
|
||||
name = mkOption { type = types.str; };
|
||||
email = mkOption { type = types.strMatching ".+@.+\\..+"; };
|
||||
};
|
||||
|
||||
ignore = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [
|
||||
"*~"
|
||||
".stack-work/"
|
||||
"__pycache__/"
|
||||
".mypy_cache/"
|
||||
"*.py[co]"
|
||||
"*.o"
|
||||
"*.hi"
|
||||
"*.aux"
|
||||
"*.bbl"
|
||||
"*.bcf"
|
||||
"*.blg"
|
||||
"*.fdb_latexmk"
|
||||
"*.fls"
|
||||
"*.out"
|
||||
"*.run.xml"
|
||||
"*.toc"
|
||||
"*.bbl"
|
||||
"*.class"
|
||||
"*.dyn_hi"
|
||||
"*.dyn_o"
|
||||
"dist/"
|
||||
".envrc"
|
||||
".direnv/"
|
||||
"dist-newstyle/"
|
||||
".history"
|
||||
];
|
||||
};
|
||||
|
||||
theme = {
|
||||
gtk = mkOption { type = my-types.theme; };
|
||||
icon = mkOption { type = my-types.theme; };
|
||||
cursor = mkOption { type = my-types.theme; };
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -5,17 +5,24 @@ in {
|
||||
options.niveum.dropbox = { enable = mkEnableOption "Dropbox"; };
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.dropbox-cli ];
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 17500 ];
|
||||
allowedUDPPorts = [ 17500 ];
|
||||
};
|
||||
|
||||
systemd.user.services.dropbox = {
|
||||
description = "Dropbox synchronisation service";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
path = [ pkgs.dropbox-cli ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
PIDFile = "%h/.dropbox/dropbox.pid";
|
||||
Restart = "always";
|
||||
ExecStart = "${pkgs.dropbox-cli}/bin/dropbox start";
|
||||
ExecStop = "${pkgs.dropbox-cli}/bin/dropbox stop";
|
||||
ExecStart = "${pkgs.dropbox.out}/bin/dropbox";
|
||||
ExecReload = "${pkgs.coreutils.out}/bin/kill -HUP $MAINPID";
|
||||
KillMode = "control-group"; # upstream recommends process
|
||||
Restart = "on-failure";
|
||||
PrivateTmp = true;
|
||||
ProtectSystem = "full";
|
||||
Nice = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
96
modules/mpd-fm.nix
Normal file
96
modules/mpd-fm.nix
Normal file
@@ -0,0 +1,96 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
mpd-fm = pkgs.callPackage <niveum/packages/MPD.FM> {};
|
||||
cfg = config.services.mpd-fm;
|
||||
in {
|
||||
imports = [];
|
||||
|
||||
options.services.mpd-fm = {
|
||||
enable = mkEnableOption "MPD.FM, an MPD web UI for radio streams";
|
||||
|
||||
webPort = mkOption {
|
||||
type = types.port;
|
||||
default = 4200;
|
||||
};
|
||||
|
||||
stations = mkOption {
|
||||
default = [];
|
||||
type = types.listOf (types.submodule {
|
||||
options = {
|
||||
id = mkOption {
|
||||
type = types.int;
|
||||
description = "A unique identifier of the station";
|
||||
};
|
||||
station = mkOption {
|
||||
type = types.str;
|
||||
description = "Name of the station that should be displayed";
|
||||
};
|
||||
desc = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
description = "Short description of the station (optional)";
|
||||
};
|
||||
logo = mkOption {
|
||||
type = types.str;
|
||||
description = "URL to a logo of the station (any size)";
|
||||
};
|
||||
stream = mkOption {
|
||||
type = types.str;
|
||||
description = "URL to the stream of the radio station (in a format supported by MPD such as MP3, OGG, ...)";
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
stationsFile = mkOption {
|
||||
type = types.path;
|
||||
default = pkgs.writeText "stations.json" (builtins.toJSON cfg.stations);
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = mpd-fm;
|
||||
};
|
||||
|
||||
mpd = {
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
default = "localhost";
|
||||
description = "The host where MPD is listening.";
|
||||
example = "localhost";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = config.services.mpd.network.port;
|
||||
description = "The port where MPD is listening.";
|
||||
example = 6600;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.extraUsers.mpd-fm.isSystemUser = true;
|
||||
# ref https://github.com/florianheinemann/MPD.FM/blob/9d037cf87597b26ae2f10ba9feea48946ad6cc68/service/MPD.FM.service
|
||||
systemd.services.mpd-fm = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "mpd.service" ];
|
||||
description = "MPD.FM – an MPD web radio player web GUI";
|
||||
script = "${cfg.package}/libexec/mpd.fm/deps/mpd.fm/bin/www";
|
||||
environment = {
|
||||
NODE_ENV = "production";
|
||||
MPD_HOST = cfg.mpd.host;
|
||||
MPD_PORT = toString cfg.mpd.port;
|
||||
PORT = toString cfg.webPort;
|
||||
STATION_FILE = cfg.stationsFile;
|
||||
};
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
StandardOutput = "syslog";
|
||||
StandardError = "syslog";
|
||||
SyslogIdentifier = "mpd-fm";
|
||||
User = "mpd-fm";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,18 +1,12 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
netname = "retiolum";
|
||||
cfg = config.networking.retiolum;
|
||||
|
||||
retiolum = pkgs.fetchFromGitHub {
|
||||
owner = "krebs";
|
||||
repo = netname;
|
||||
rev = "76e8de36d4ac06bcfaf551946aa2f6a41d9e6555";
|
||||
sha256 = "0yhmmvg6gm5yxs1gzszl19bs6y302yjg81a7sckfglwzcql3q0wf";
|
||||
};
|
||||
in {
|
||||
imports = [ "${(import <niveum/lib>).nixpkgs-src}/nixos/modules/services/networking/tinc.nix" ];
|
||||
disabledModules = [ "services/networking/tinc.nix" ];
|
||||
|
||||
options = {
|
||||
networking.retiolum.ipv4 = mkOption {
|
||||
type = types.str;
|
||||
@@ -39,22 +33,19 @@ in {
|
||||
|
||||
services.tinc.networks.${netname} = {
|
||||
name = cfg.nodename;
|
||||
hosts = builtins.mapAttrs
|
||||
(name: _: builtins.readFile "${<retiolum/hosts>}/${name}")
|
||||
(builtins.readDir <retiolum/hosts>);
|
||||
rsaPrivateKeyFile = toString <system-secrets/retiolum.key>;
|
||||
extraConfig = ''
|
||||
LocalDiscovery = yes
|
||||
AutoConnect = yes
|
||||
'';
|
||||
};
|
||||
systemd.services."tinc.${netname}" = {
|
||||
preStart = ''
|
||||
cp -R ${toString <retiolum/hosts>} /etc/tinc/retiolum/ || true
|
||||
'';
|
||||
};
|
||||
|
||||
networking.extraHosts =
|
||||
builtins.readFile (toString <retiolum/etc.hosts>);
|
||||
networking.extraHosts = builtins.readFile (toString <retiolum/etc.hosts>);
|
||||
|
||||
environment.systemPackages =
|
||||
[ config.services.tinc.networks.${netname}.package ];
|
||||
environment.systemPackages = [ config.services.tinc.networks.${netname}.package ];
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 655 ];
|
||||
|
||||
31
modules/system-dependent.nix
Normal file
31
modules/system-dependent.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.niveum = {
|
||||
wirelessInterface = mkOption { type = types.str; };
|
||||
|
||||
batteryName = mkOption { type = types.str; };
|
||||
|
||||
promptColours = let
|
||||
colours16 = types.enum [
|
||||
"black"
|
||||
"red"
|
||||
"green"
|
||||
"yellow"
|
||||
"blue"
|
||||
"magenta"
|
||||
"cyan"
|
||||
"white"
|
||||
];
|
||||
in {
|
||||
success = mkOption {
|
||||
type = colours16;
|
||||
default = "green";
|
||||
};
|
||||
failure = mkOption {
|
||||
type = colours16;
|
||||
default = "red";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user