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

82 Commits

Author SHA1 Message Date
1d7a432bec feat(urlwatch): no footer, tellonym 2020-11-17 14:06:13 +01:00
0e7652ff46 chore: resize fonts 2020-11-17 14:05:52 +01:00
a96c0d9ab3 feat(urlwatch): only watch dlf article 2020-11-16 21:02:23 +01:00
82bb2d9f17 feat(chrome): remove youtube recommendations 2020-11-14 13:46:20 +01:00
4fa0256095 feat: install pulsemixer pass-otp 2020-11-14 13:24:25 +01:00
2915594238 feat(urlwatch): move to makanek, watch dlf 2020-11-14 13:23:25 +01:00
cf48d89ea6 chore: update 2020-11-14 13:23:25 +01:00
37f570a979 fix(playlists): remove laut.fm lofi because its quality was killing my speakers 2020-11-12 21:26:58 +01:00
f8af039913 chore(gitea): move into own config 2020-11-11 10:18:04 +01:00
46882af11e feat: run gitea on makanek 2020-11-11 08:51:52 +01:00
2c5d2f4add chore: get stockholm from my mirror 2020-11-11 08:51:22 +01:00
bd089bd408 chore: update keys 2020-11-11 07:31:22 +01:00
fce8d15356 fix(i3, alacritty): make fonts bigger 2020-11-11 07:30:50 +01:00
acec2505e4 feat: add zramfs as swap 2020-11-10 22:17:47 +01:00
218c251d31 feat(retiolum): generate hosts from stockholm, finally add zaatar 2020-11-10 22:17:33 +01:00
8cda7861f9 feat(i3-status-rust): remove newsboat as it was blocking, change separator 2020-11-10 21:03:10 +01:00
a35c883eca feat(wifi): add o2wlan66 2020-11-10 21:01:45 +01:00
db61bc4b91 chore: RIP homeros 2020-11-09 09:40:03 +01:00
43fc9ebba2 feat(manakish): add to retiolum 2020-11-06 10:52:35 +01:00
23d60233a0 fix(zaatar): add new retiolum config 2020-11-06 10:52:35 +01:00
f2fcc3be9a chore: move tuner over from toum to zaatar 2020-11-06 10:38:43 +01:00
30e3baa335 feat(mpd): install ncmpcpp and mpc 2020-11-06 10:38:33 +01:00
616a530c64 fix(playlists): comment out di.fm, add more stations
di.fm returned 404
2020-11-06 10:38:12 +01:00
e5d437949b feat: take dropbox module from dropbox 2020-11-05 21:29:47 +01:00
80c3b143ca feat: write own urlwatch config 2020-11-05 21:29:20 +01:00
263a732580 feat(toum): add tuner website 2020-11-05 21:29:09 +01:00
c638ef93f5 feat: add manakish 2020-11-05 21:28:23 +01:00
69c2f506ae feat(moodle): open for manakish 2020-11-05 20:24:39 +01:00
db4857c86d feat(mpd): group into playlists by style 2020-11-04 08:51:55 +01:00
6668542d53 chore: clean up zigbee2mqtt config 2020-11-04 08:51:19 +01:00
561faed161 feat: add makanek to retiolum 2020-11-03 20:18:57 +01:00
36ed681e99 feat: move some non-packageworthy scripts to packages/scripts/ 2020-11-02 21:49:49 +01:00
be84688b63 feat: install dnsutils 2020-11-02 21:43:54 +01:00
de296c4e62 feat: package much-secripts and dns-sledgehammer 2020-11-02 21:43:38 +01:00
d7807ba1b9 fix(zaatar): make kiosk have german keyboard layout 2020-11-02 21:05:17 +01:00
51fba9baa6 chore(shell.nix): remove histfile setting 2020-11-02 15:44:33 +01:00
a0fb2bd819 feat(moodle): add more courses 2020-11-02 15:43:20 +01:00
a0830070f3 feat(wilde): add swapfile 2020-11-02 15:42:52 +01:00
c860529161 feat(moodle): add more courses 2020-11-02 15:42:41 +01:00
03461dcaaa fix(hu-berlin): fix sshfs mount on homeros 2020-11-01 22:05:59 +01:00
1cd7039759 feat(moodle): add homeros to sshfs share 2020-11-01 21:10:52 +01:00
af0806b766 feat(moodle-dl): add more courses 2020-11-01 21:09:07 +01:00
bd8960fd44 fix(wilde): only build on one core 2020-11-01 15:12:22 +01:00
1bc90b2e84 fix: replace libreoffice by abiword 2020-11-01 15:12:08 +01:00
d2939795ac chore: move hass to configs 2020-11-01 09:45:15 +01:00
4a4d5a148d chore: move matterbridge to configs 2020-11-01 09:44:50 +01:00
f30cfbf142 chore: simplify zigbee2mqtt config 2020-11-01 09:23:27 +01:00
15bda4721d chore: update ssh keys to add termux 2020-11-01 08:27:32 +01:00
4d610461b8 feat(toum): remove kfm user, enable login as weechat 2020-11-01 08:26:30 +01:00
eed54d1593 fix(sshfs): depend on tinc and wpa_supplicant 2020-11-01 08:25:11 +01:00
ddec0551e8 feat(zaatar): allow vt switching from cage 2020-11-01 08:22:20 +01:00
b0f2a74372 chore: update 2020-11-01 08:21:43 +01:00
65584ec52f feat(zaatar): add kiosk to audio group and remove ssh keys 2020-10-31 20:52:53 +01:00
96f5d750ef feat: run moodle-dl on toum, sshfs from wilde 2020-10-31 20:52:10 +01:00
77e97e84a9 feat(makanek): host codimd, nextcloud 2020-10-31 20:51:25 +01:00
96cb298584 feat: make fonts smaller 2020-10-31 20:50:17 +01:00
5dc561da83 chore: move module/constants.nix to lib/default.nix 2020-10-30 11:05:26 +01:00
b8c79fd21c fix(wilde): only build on two cores to still be able to use the computer while building 2020-10-30 08:09:40 +01:00
a98333a6b8 chore: reformat 2020-10-30 08:09:18 +01:00
fa5fe37610 feat(mpd): refine playlist generation 2020-10-30 08:09:00 +01:00
0be0356005 feat(git): dont automatically merge on pull 2020-10-30 08:08:20 +01:00
394615168d feat(mpd): generate streaming links 2020-10-29 08:19:52 +01:00
b6e77f77af feat(mpd): split playlists 2020-10-29 07:54:57 +01:00
d7727433fd feat(zaatar): use ublock for kiosk 2020-10-29 07:54:26 +01:00
3f02559da2 chore: curate radio stations 2020-10-28 22:39:33 +01:00
e7c801b6c4 feat(zaatar): restart kiosk browser if closed 2020-10-28 22:26:04 +01:00
3092fcda85 fix(wilde): dont generate mandb cache 2020-10-28 22:25:45 +01:00
43a1ecedac chore: clean up by removing .todo 2020-10-28 22:25:45 +01:00
da55a342e3 chore: dot -> lib 2020-10-28 22:25:45 +01:00
48fcb08427 chore: scardanelli -> zaatar 2020-10-28 22:25:24 +01:00
a0855f8bbb chore: organize
use read-made spotifyd module
move sshPort to niveum lib (used also from deploy.nix)
factor out sshd config, use from toum
factor out urlwatch
access scardanelli locally
mpd: configure webradio playlist
scardanelli: use cage for kiosk
toum: use wifi config
toum: use spacetime, dont redeclare
toum: use ssh config
2020-10-28 22:25:18 +01:00
3efb4682f2 feat(scardanelli): host media server 2020-10-28 20:29:41 +01:00
048429f593 feat: split spotify config into spotifyd 2020-10-28 20:29:01 +01:00
59cacae72e feat: interdimensional-cable 2020-10-28 20:27:36 +01:00
420245231a feat: factor out wifi config 2020-10-28 20:26:47 +01:00
2911972900 feat: factor out spacetime config 2020-10-28 20:26:47 +01:00
5efcb813f0 chore: remove nixpkgs-unstable 2020-10-28 20:25:26 +01:00
fd8f5d3a5c fix(wilde): only have 2 nix jobs as more will fill up RAM 2020-10-28 11:37:06 +01:00
3508575ebe chore: make 20.09 work 2020-10-28 11:36:46 +01:00
3741304284 feat(toum): run irc bouncer 2020-10-28 11:35:09 +01:00
6bfaf551d2 feat: generate mandb cache to use apropos and whatis 2020-10-28 11:34:36 +01:00
423cb074a0 fix(much): pin nixpkgs so much compiles with email-header 2020-10-27 21:27:12 +01:00
102 changed files with 2002 additions and 1182 deletions

3
.gitignore vendored
View File

@@ -1,6 +1,5 @@
secrets.nix
result
.direnv
.envrc
.history
**/*.bak
.todo

View File

@@ -1,2 +0,0 @@
x 2020-04-27 2019-08-27 fix offlineimap password
x 2020-04-27 2019-07-09 @package fzf wrappers

View File

View File

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

View File

@@ -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
"rev": "63f299b3347aea183fc5088e4d6c4a193b334a41",
"date": "2020-11-03T23:11:32+01:00",
"path": "/nix/store/8ivnh2bjbnyl3aisb83f9z18pgwsca4l-home-manager",
"sha256": "0iksjch94wfvyq0cgwv5wq52j0dc9cavm68wka3pahhdvjlxd3js",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

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

View File

@@ -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": "3090c65041104931adda7625d37fa874b2b5c124",
"date": "2020-11-12T23:28:38+01:00",
"path": "/nix/store/24r9bgxbja9kcss0iwklbhsvc26r5km7-nixpkgs",
"sha256": "0r0gfsvvh69cy39izrgqhqlj26hxdqf37n3is6b6pma75k97axsj",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

@@ -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": "fa920e75bccc0c4e6b52904f1e6b9c1f71dc352b",
"date": "2020-11-09T10:32:11+01:00",
"path": "/nix/store/n3zq1yvwq7f3xq2crgni4841k9idgfmj-retiolum",
"sha256": "1k83p0y6xj1bb9zzsxsng5nvd82imf241d5f8krn3ffjy9a0b48g",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View File

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

View File

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

View File

@@ -6,6 +6,7 @@
# "ihlenndgcmojhcghmfjfneahoeklbjjh" # cVim
# "fpnmgdkabkmnadcjpehmlllkndpkmiak" # Wayback Machine
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
"khncfooichmfjbepaaaebmommgaepoid" # Remove YouTube Recommended Videos
];
};

View File

@@ -29,22 +29,17 @@
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";
manakish.id =
"AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
};
folders =
let syncthing-dir = "${config.users.users.me.home}/cloud/syncthing";
in {
"${syncthing-dir}/common".devices =
[ "homeros" "scardanelli" "wilde" ];
"${syncthing-dir}/common".devices = [ "wilde" "manakish" ];
"${syncthing-dir}/library".devices = lib.attrNames devices;
"${syncthing-dir}/mundoiu".devices = lib.attrNames devices;
"${syncthing-dir}/music".devices = lib.attrNames devices;

25
configs/codimd.nix Normal file
View 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.codimd = {
enable = true;
configuration = {
allowAnonymous = false;
allowGravatar = false;
db = {
dialect = "sqlite";
storage = "/var/lib/codimd/db.codimd.sqlite";
useCDN = false;
};
port = 3091;
};
};
}

View File

@@ -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,18 +16,6 @@ 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 = {
@@ -65,9 +27,7 @@ in {
};
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,7 +66,7 @@ in {
users.users.me = {
name = "kfm";
description = config.niveum.user.name;
description = kieran.name;
hashedPassword =
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
isNormalUser = true;
@@ -129,7 +82,7 @@ in {
users.users.me.extraGroups = [ "audio" ];
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ];
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer pkgs.pulsemixer ];
}
{
environment.interactiveShellInit =
@@ -172,7 +125,7 @@ in {
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";
weechat = "${pkgs.openssh}/bin/ssh weechat@toum -t screen -x weechat-screen";
where = "source ${where}";
yt =
"${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
@@ -180,50 +133,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 +163,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;
@@ -302,18 +214,17 @@ in {
./neovim.nix
./newsboat.nix
./flameshot-once.nix
./nixpkgs-unstable.nix
./packages
./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,6 +234,7 @@ in {
./version.nix
./vscode.nix
./watson.nix
./wifi.nix
./xautolock.nix
./zsh.nix
];

View File

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

View File

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

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }: {
niveum.fonts.size = 9;
fonts = {
enableDefaultFonts = true;
enableFontDir = true;

View File

@@ -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,9 @@
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";
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
View 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;";
};
}

View File

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

View File

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

View File

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

View File

@@ -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>;
@@ -28,7 +29,37 @@ in {
eduroam.auth = eduroamAuth;
};
fileSystems."/mnt/moodle" = {
device = "moodle@toum.r:/var/lib/moodle";
fsType = "fuse.sshfs";
options = [
"IdentityFile=/root/.ssh/id_rsa"
"Port=${toString sshPort}"
"_netdev"
"allow_other"
"default_permissions"
"gid=100"
"idmap=user"
# "noatime"
"noauto"
# "nodiratime"
"x-systemd.nofail"
"reconnect"
"ro"
"uid=1000"
"x-systemd.automount"
"x-systemd.device-timeout=1s"
"x-systemd.idle-timeout=1min"
"x-systemd.mount-timeout=1s"
"x-systemd.requires=tinc.retiolum.service"
"x-systemd.requires=wpa_supplicant.service"
];
};
environment.systemPackages = [
pkgs.sshfsFuse
(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

View File

@@ -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 = {
@@ -41,7 +42,7 @@ let
emoji-file = pkgs.fetchurl {
url =
"https://raw.githubusercontent.com/LukeSmithxyz/voidrice/master/.local/share/larbs/emoji";
sha256 = "09m2rgb9d5jpiy8q4jz3dw36gkpb4ng2pl7xi7ppsrzzzdvq85qk";
sha256 = "03fv69ah8msh2j6i3lm4sdkckqq8jwn1kj43j98dh0xjpzazsy46";
};
in with pkgs;
writers.writeDashBin "emoji-menu" ''
@@ -59,7 +60,7 @@ let
fi
'';
in with config.niveum; {
in {
services.xserver = {
displayManager.defaultSession = "none+i3";
windowManager.i3 = {
@@ -71,7 +72,7 @@ in with config.niveum; {
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 +134,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 +148,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;
})
}";
@@ -196,10 +196,10 @@ 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}+a" =

View File

@@ -1,5 +1,20 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib>) kieran;
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> {};
much = nixpkgs-much.haskell.lib.dontHaddock much-pkg;
tagRules = [
{
query = "to:miaengiadina-pwa@noreply.github.com AND subject:\"PR run failed\"";
@@ -42,9 +57,6 @@ let
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
@@ -107,7 +119,7 @@ in {
};
in lib.listToAttrs (map muchsyncConfig [
"wilde"
"homeros"
"manakish"
]);
programs.msmtp.enable = true;
@@ -139,7 +151,7 @@ in {
};
userName = "kieran@fysi.tech";
address = "kieran@fysi.tech";
realName = config.niveum.user.name;
realName = kieran.name;
passwordCommand = pass_ <secrets/mail/fastmail>;
};
cock = enableDefaults {
@@ -166,7 +178,7 @@ in {
primary = false;
flavor = "gmail.com";
address = "kieran.meinhardt@gmail.com";
realName = config.niveum.user.name;
realName = kieran.name;
userName = "kieran.meinhardt";
passwordCommand = pass_ <secrets/mail/gmail/kieran.meinhardt>;
folders = {
@@ -179,7 +191,7 @@ in {
primary = false;
flavor = "gmail.com";
address = "amroplay@gmail.com";
realName = config.niveum.user.name;
realName = kieran.name;
userName = "amroplay";
passwordCommand = pass_ <secrets/mail/gmail/amroplay>;
folders = {
@@ -204,14 +216,14 @@ in {
tls.enable = true;
};
address = "kieran.meinhardt@posteo.net";
realName = config.niveum.user.name;
realName = kieran.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;
realName = kieran.name;
userName = "meinhark";
passwordCommand = pass_ <secrets/eduroam/password>;
smtp = {

53
configs/matterbridge.nix Normal file
View File

@@ -0,0 +1,53 @@
{ pkgs, lib, ... }:
let
bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
config = {
general = {
RemoteNickFormat = "[{NOPINGNICK}] ";
Charset = "utf-8";
};
telegram.kmein.Token = bridgeBotToken;
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";
}
];
}
];
};
in
{
nixpkgs.overlays = [ (import <niveum/overlays/toml.nix>) ];
services.matterbridge = {
enable = true;
configPath = toString (pkgs.writeTOML config);
};
}

64
configs/moodle-dl.nix Normal file
View File

@@ -0,0 +1,64 @@
{ 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
];
download_submissions = true;
download_descriptions = false;
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);
in
{
users.extraUsers.moodle = {
isNormalUser = false;
home = "/var/lib/moodle";
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";
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";
};
}

28
configs/mpd.nix Normal file
View File

@@ -0,0 +1,28 @@
{ config, pkgs, lib, ... }:
let
playlists = import <niveum/lib/playlists.nix>;
playlistFiles = lib.mapAttrs (name: {tracks, ...}: pkgs.writeText "${name}.m3u" (builtins.concatStringsSep "\n" (map ({url, ...}: url) tracks))) playlists;
linkPlaylist = name: file: ''
ln -sfn "${toString file}" "/var/lib/mpd/playlists/${name}.m3u"
'';
linkPlaylists = lib.concatStringsSep "\n" (lib.mapAttrsToList linkPlaylist playlistFiles);
in
{
system.activationScripts.mpd-playlists = ''
rm -rf /var/lib/mpd/playlists
install -d /var/lib/mpd/playlists
${linkPlaylists}
'';
environment.systemPackages = [ pkgs.ncmpcpp pkgs.mpc_cli ];
services.mpd.enable = true;
services.ympd.enable = true;
# dont let anyone outside localhost or local network in
networking.firewall.extraCommands = let ympdPort = config.services.ympd.webPort; in ''
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${ympdPort} -s 192.168.0.0/16 -j ACCEPT
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${ympdPort} -s 127.0.0.0/8 -j ACCEPT
${pkgs.iptables}/bin/iptables -A INPUT -p tcp --dport ${ympdPort} -j DROP
'';
}

View File

@@ -22,7 +22,7 @@
environment.systemPackages = [
(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

View File

@@ -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;
addSSL = true;
};
# Ensure that postgres is running before running the setup
systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"];

View File

@@ -1,5 +0,0 @@
{ config, ... }: {
nixpkgs.config.packageOverrides = pkgs: {
unstable = import <nixpkgs-unstable> { config = config.nixpkgs.config; };
};
}

View File

@@ -33,18 +33,15 @@
# INTERNET
aria2
firefox
# tor-browser-bundle-bin
# qutebrowser
tdesktop
skypeforlinux
w3m
wget
httpie
whois
ddgr
ix
# thunderbird
nur.repos.kmein.python3Packages.instaloader
dnsutils
# mtr # my traceroute
# FILE MANAGERS
ranger
@@ -121,8 +118,11 @@
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
@@ -135,6 +135,10 @@
par
qrencode
wtf
spotify
spotify-tui
playerctl
];
}

View File

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

View File

@@ -1,5 +1,9 @@
{ pkgs, lib, config, ... }:
let
inherit (import <niveum/lib>) nixpkgs-unstable;
unstable = import nixpkgs-unstable {};
zoteroStyle = { name, sha256 }: {
name = "${name}.csl";
path = pkgs.fetchurl {
@@ -15,17 +19,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 +32,6 @@ let
name = "dic/${name}";
inherit path;
}) dicts);
scardanelli = config.networking.hostName == "scardanelli";
in {
environment.variables.STARDICT_DATA_DIR = toString (makeStardictDataDir [
{
@@ -69,8 +66,10 @@ in {
texlive.combined.scheme-full
(aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ]))
haskellPackages.pandoc-citeproc
# nur.repos.kmein.text2pdf
libreoffice
nur.repos.kmein.text2pdf
abiword
gnumeric
dia
unstable.pandoc
# proselint
asciidoctor

View File

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

View File

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

@@ -0,0 +1,7 @@
{
time.timeZone = "Europe/Berlin";
location = {
latitude = 52.517;
longitude = 13.3872;
};
}

View File

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

12
configs/spotifyd.nix Normal file
View File

@@ -0,0 +1,12 @@
{ lib, ... }:
{
services.spotifyd = {
enable = true;
config = lib.generators.toINI { } {
global = {
username = lib.strings.fileContents <secrets/spotify/username>;
password = lib.strings.fileContents <secrets/spotify/password>;
};
};
};
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

24
configs/tuner.nix Normal file
View File

@@ -0,0 +1,24 @@
{ pkgs, config, lib, ... }:
let
tunerHTML = pkgs.callPackage <niveum/packages/tuner.nix> {
playlists = import <niveum/lib/playlists.nix>;
};
in
{
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
virtualHosts.default = {
locations."= /tuner".extraConfig = ''
default_type text/html;
alias ${tunerHTML};
'';
};
};
networking.firewall.allowedTCPPorts = [ 80 ];
}

104
configs/urlwatch.nix Normal file
View File

@@ -0,0 +1,104 @@
{ 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"
];
}
{
name = "tellonym";
navigate = "https://tellonym.me/fxght.or.flxght";
filter = [
{
element-by-id = "content";
}
"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";
};
};
}

View File

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

47
configs/wifi.nix Normal file
View File

@@ -0,0 +1,47 @@
{ 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";
};
};
environment.systemPackages = [ pkgs.wpa_supplicant_gui ];
}

View File

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

View File

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

View File

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

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

View 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";
}

View 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";
}

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

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

View File

@@ -0,0 +1,5 @@
pkgs: rec {
terminal = "${pkgs.alacritty}/bin/alacritty";
browser = "${pkgs.brave}/bin/brave";
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
}

View File

@@ -1,12 +1,67 @@
{
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";
nixpkgs-unstable = builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs";
rev = "4512dac960f3833cf24cdbd742b63cb447bbdd9a";
};
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";
}));
};
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"
];
}

View File

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

355
lib/playlists.nix Normal file
View File

@@ -0,0 +1,355 @@
let
di-fm-key = builtins.readFile <secrets/di.fm/key>;
soma-fm = name: {
url = "http://ice1.somafm.com/${name}-128-aac";
provider = "soma.fm";
inherit name;
};
di-fm = name: {
url = "http://prem2.di.fm/${name}_hi?${di-fm-key}";
provider = "di.fm";
inherit name;
};
big-fm = name: {
url = "https://streams.bigfm.de/bigfm-${name}-128-aac";
provider = "big.fm";
inherit name;
};
we-are-one = name: {
url = "http://listen.${name}.fm/tunein-aac-hd-pls";
provider = "WeAreOne";
inherit name;
};
rte = name: {
url = "https://www.rte.ie/manifests/${name}.m3u8";
provider = "Raidió Teilifís Éireann";
inherit name;
};
laut-fm = name: {
url = "http://stream.laut.fm/${name}";
provider = "laut.fm";
inherit name;
};
rautemusik = name: {
url = "http://${name}-high.rautemusik.fm/";
provider = "rautemusik.fm";
inherit name;
};
radiosai = name: port: {
url = "http://stream.radiosai.net:${toString port}";
provider = "Radio Sai";
inherit name;
};
in
{
Chill = {
description = "Kühlen.";
tracks = [
{
url = "https://radio.lassul.us/radio.ogg";
name = "Radio";
provider = "lassulus";
}
{
url = "https://streamer.radio.co/s2c3cc784b/listen";
name = "Radio";
provider = "electroswing-radio.com";
}
(rautemusik "study")
(big-fm "reggaevibes")
(big-fm "sunsetlounge")
# (di-fm "ambient")
# (di-fm "chilledm")
# (di-fm "chillhop")
# (di-fm "chillntropicalhouse")
# (di-fm "chillout")
# (di-fm "chilloutdreams")
# (di-fm "chillstep")
# (di-fm "deephouse")
# (di-fm "deepprogressivehouse")
# (di-fm "downtempolounge")
# (di-fm "dub") # An emphasis on the bass and drums / DnB, delayed effects, sampled vocals and smokey Reggae inspired vibes.
# (di-fm "indiebeats") # Smooth, groovy and full of cutting-edge, fresh ideas - beats to kick back and enjoy far from the club setting.
# (di-fm "liquidtrap") # The smoother side of Trap but still packed with mechanical grooves and hip hop moods.
# (di-fm "lofihiphop")
# (di-fm "lofiloungenchill")
# (di-fm "lounge")
# (di-fm "melodicprogressive")
# (di-fm "psybient") # The psychedelic side of ambient.
# (di-fm "psychill")
# (di-fm "psydub")
# (di-fm "spacemusic") # Ambient space music for expanding minds.
# (di-fm "trap")
# (di-fm "vocalchillout")
# (di-fm "vocallounge")
(soma-fm "beatblender") # A late night blend of deep-house and downtempo chill.
(soma-fm "deepspaceone") # Deep ambient electronic, experimental and space music. For inner and outer space exploration.
(soma-fm "digitalis") # Digitally affected analog rock to calm the agitated heart.
(soma-fm "dronezone") # Served best chilled, safe with most medications. Atmospheric textures with minimal beats.
(soma-fm "fluid") # Drown in the electronic sound of instrumental hiphop, future soul and liquid trap.
(soma-fm "indiepop") # New and classic favorite indie pop tracks.
(soma-fm "lush") # Sensuous and mellow vocals, mostly female, with an electronic influence.
(soma-fm "missioncontrol") # Celebrating NASA and Space Explorers everywhere.
(soma-fm "reggae") # NEW! Reggae, Ska, Rocksteady classic and deep tracks.
(soma-fm "sf1033") # Ambient music mixed with the sounds of San Francisco public safety radio traffic.
];
};
Brennpunkt = {
description = "What focus means.";
tracks = [ # What Focus Means
(laut-fm "dnbzone")
# (di-fm "atmosphericbreaks")
# (di-fm "bigbeat") # Heavily focused on breakbeats and dusty samples. A defining 90s musical movement still going strong today.
# (di-fm "darkdnb") # Evil, gritty and twisted DnB / Drum & Bass. at 160+ BPM, hear the darkest basslines and the hardest hitting percussion.
# (di-fm "deeptech")
# (di-fm "drumandbass")
# (di-fm "drumstep") # A hybrid of half-time Dubstep and intense Drum and Bass / DnB.
# (di-fm "dubstep")
# (di-fm "dubtechno") # The beloved sounds of deep techno saturated with tape delays, heavy reverb and ice cold atmospherics.
# (di-fm "futuregarage") # 2step Garage rhythms, chunky bass line driven grooves and plenty of forward thinking innovation.
# (di-fm "jungle") # Jungle keeps the breakbeat tempos high and celebrates the diverse ideas found within urban and rave music.
# (di-fm "liquiddnb")
# (di-fm "liquiddubstep")
# (di-fm "minimal")
# (di-fm "oldschoolacid") # Acid, one of the characteristics of the TB-303, is celebrated here with the best tracks from house, techno and trance.
# (di-fm "progressive")
# (di-fm "techhouse")
# (di-fm "techno")
# (di-fm "umfradio")
(soma-fm "defcon") # Music for Hacking. The DEF CON Year-Round Channel.
(soma-fm "dubstep") # Dubstep, Dub and Deep Bass. May damage speakers at high volume.
(soma-fm "groovesalad") # A nicely chilled plate of ambient/downtempo beats and grooves.
(soma-fm "gsclassic") # The classic (early 2000s) version of a nicely chilled plate of ambient/downtempo beats and grooves.
(soma-fm "secretagent") # The soundtrack for your stylish, mysterious, dangerous life. For Spies and PIs too!
];
};
Post-Musicality = {
description = "Makes you wonder whether you are listening to music at all.";
tracks = [
(rautemusik "wackenradio")
# (di-fm "classicelectronica")
# (di-fm "darkpsytrance") # The darker form of PsyTrance, which is a sound all its own direct from Goa to your headphones.
# (di-fm "gabber") # The hardest form of techno with punishing tracks designed to drive the crowds into a sweaty frenzy.
# (di-fm "goapsy")
# (di-fm "hardtechno") # Tough as nails warehouse jams full of cold aggression, sinister structures and pounding rhythms that hit hard.
# (di-fm "progressivepsy")
# (di-fm "undergroundtechno") # From gritty Berlin streets to dark corners of Brooklyn, this is techno made by artists pushing the genre further.
(soma-fm "cliqhop") # Blips'n'beeps backed mostly w/beats. Intelligent Dance Music.
(soma-fm "metal") # From black to doom, prog to sludge, thrash to post, stoner to crossover, punk to industrial.
(we-are-one "coretime")
];
};
"Club Albrecht" = {
description = "Party!";
tracks = [
(rautemusik "club")
(rautemusik "house")
(rautemusik "bass")
(rautemusik "breakz")
(laut-fm "electro-swing")
(big-fm "dance")
(big-fm "groovenight")
(big-fm "nitroxdeep")
(big-fm "nitroxedm")
(big-fm "urbanclubbeats")
# (di-fm "00sclubhits")
# (di-fm "bassline") # Blending together elements of house music, speed garage, and techno its all about the low end frequencies.
# (di-fm "bassnjackinhouse") # From the funkiest grooves to the dirtiest beats. Hard-hitting, high energy 4/4 club cuts to move the masses.
# (di-fm "bigroomhouse") # Fusing together house elements from the past and the present - prime time music full of uplifting high energy.
# (di-fm "classiceurodance")
# (di-fm "club")
# (di-fm "clubdubstep")
# (di-fm "deepnudisco")
# (di-fm "detroithousentechno") # Where would dance music be without Detroit? The city that started it all continues to inspire and educate.
# (di-fm "discohouse")
# (di-fm "djmixes")
# (di-fm "edm")
# (di-fm "edmfestival")
# (di-fm "electrohouse")
# (di-fm "electronicpioneers") # The trailblazers, the renegades and the experimental musicians who gave early inspiration with electronic instruments.
# (di-fm "electroswing") # The combination of 1920s-1940s jazz and swing music, big band horns and modern day electro house.
# (di-fm "eurodance")
# (di-fm "funkyhouse")
# (di-fm "futurebass") # Hard basslines, booming beats and insatiable grooves. Inspired by Trap, Juke and Garage - molded together into a unique booming style.
# (di-fm "futuresynthpop") # Finest selection of futurepop and synthpop.
# (di-fm "glitchhop") # The sound of digital malfunctions, electric hum and bit rate distortions perfectly placed alongside laid-back hip hop beats.
# (di-fm "handsup") # A channel showcasing everything from hard dance, trance and happy hardcore to lift the spirits (and the arms).
# (di-fm "hardcore") # Strictly for the hardcore. These are the biggest and boldest bangers, and the hardest hitting tracks.
# (di-fm "harddance") # Concrete kicks and punching rhythms, hard dance is a tougher side of music with sharp edges and aggressive power.
# (di-fm "hardstyle") # Hard techno & hardcore. A global phenomenon with powerful kicks, distorted effects and infectious melodies.
# (di-fm "house")
# (di-fm "indiedance")
# (di-fm "jazzhouse") # One of the biggest cultural soundtracks with the infectious thump of house music. Expect sultry saxophones, trumpets, and finger snapping grooves.
# (di-fm "latinhouse") # The sounds of Salsa, Brazilian beats and Latin Jazz with the steady grooves of modern East Coast dance music.
# (di-fm "nightcore") # Pitched up vocals, happy hardcore beats, and high energy music non-stop.
# (di-fm "nudisco") # Modern disco music blending the familiar funk of the 70s and 80s with futuristic beats and up to date grooves.
# (di-fm "oldschoolhouse") # The biggest classics and secret weapons this is a true treasure chest of house tracks from back in the day.
# (di-fm "oldschoolrave") # Grab your whistles, white gloves and reach for the laser beams. This is the sound of raving when raving was new.
# (di-fm "soulfulhouse") # House music saturated with feeling full of melodies, vocals and true soul. Steady warm 4/4 vibes.
# (di-fm "summerchillhouse")
# (di-fm "tribalhouse") # The percussive side of the house and tech house scene, tribal house takes drums and puts them in the forefront.
# (di-fm "vocalhouse")
(soma-fm "poptron") # Electropop and indie dance rock with sparkle and pop.
(soma-fm "spacestation") # Tune in, turn on, space out. Spaced-out ambient and mid-tempo electronica.
(we-are-one "clubtime")
(we-are-one "hardbase")
(we-are-one "housetime")
(we-are-one "teatime")
(we-are-one "technobase")
];
};
HipHop = {
description = "";
tracks = [
(rautemusik "deutschrap-charts")
(rautemusik "deutschrap-classic")
(big-fm "deutschrap")
(big-fm "hiphop")
(big-fm "oldschool")
(big-fm "oldschooldeutsch")
(big-fm "rapfeature")
(big-fm "usrap")
# (di-fm "breaks") # Inspired by hip hop and UK rave music, breaks features broken up drum loops and creative samples, synths and fx.
(rte "pulse")
];
};
Wave = {
description = "";
tracks = [
# (di-fm "classiceurodisco") # Conceived in the European discos in the 70s, evolving through the decades into modern electronic masterpieces.
# (di-fm "electropop") # Catchy pop music blended together with vintage synthesizers and electronic instrumentation.
# (di-fm "synthwave")
(soma-fm "seventies") # Mellow album rock from the Seventies. Yacht not required.
(soma-fm "u80s") # Early 80s UK Synthpop and a bit of New Wave.
(soma-fm "vaporwaves") # All Vaporwave. All the time.
];
};
Trance = {
description = "";
tracks = [
(laut-fm "uplifting-trance-radio")
(rautemusik "trance")
# (di-fm "classictrance")
# (di-fm "classicvocaltrance")
# (di-fm "epictrance")
# (di-fm "trance")
# (di-fm "vocaltrance")
(soma-fm "thetrip") # Progressive house / trance. Tip top tunes.
(we-are-one "trancebase")
];
};
i18n = {
description = "Country and culture specific music.";
tracks = [
{
url = "http://62.210.24.124:8379/;stream.mp3"; # Gjirokastër
provider = "Alpomedia";
name = "Gjirokastër";
}
{
url = "http://iphone.live24.gr/derty1000"; # derti μόνο λαϊκά
name = "μόνο λαϊκά";
provider = "Derti";
}
{
url = "https://knr.gl/radiolivestream"; # kalaallit nunaata radioa
provider = "KNR";
name = "Kalaallit Nunaata Radioa";
}
{
provider = "VahonFM";
name = "Hindustani";
url = "http://94.23.148.11:8058/";
}
(radiosai "Asia" 8002)
(radiosai "Ameri" 8006)
(radiosai "Bhajan" 8000)
(big-fm "balkan")
(big-fm "latinbeats")
(big-fm "orient")
(big-fm "russia")
(big-fm "turkey")
(big-fm "worldbeats")
# (di-fm "russianclubhits")
(rautemusik "partyhits")
(rautemusik "volksmusik")
(rte "rnag") # Raidió na Gaeltachta
(soma-fm "bootliquor") # Americana Roots music for Cowhands, Cowpokes and Cowtippers
(soma-fm "suburbsofgoa") # Desi-influenced Asian world beats and beyond.
(soma-fm "thistle") # Exploring music from Celtic roots and branches
];
};
Out-There = {
description = "Music that is very out-there.";
tracks = [
{
url = "http://klassikr.streamabc.net/klassikradio-simulcast-mp3-hq"; # Klassikradio
name = "Klassikradio";
provider = "Klassik Radio GmbH & Co. KG";
}
# "http://stream.klassikradio.de/live/mp3-192/stream.klassikradio.de"
# (soma-fm "scanner") # San Francisco Public Safety Scanner Feed
(rautemusik "rock")
(rautemusik "12punks")
(rte "2xm") # Alternative
(rte "gold") # Oldies
(rte "lyric") # "Classical and specialist music"
(soma-fm "7soul") # Vintage soul tracks from the original 45 RPM vinyl.
(soma-fm "bagel") # What alternative rock radio should sound like. [explicit]
(soma-fm "brfm") # From the Playa to the world, for the annual Burning Man festival.
(soma-fm "covers") # Just covers. Songs you know by artists you don't. We've got you covered.
(soma-fm "folkfwd") # Indie Folk, Alt-folk and the occasional folk classics.
(soma-fm "illstreet") # Classic bachelor pad, playful exotica and vintage music of tomorrow.
(soma-fm "live") # Special Live Events and rebroadcasts of past live events
(soma-fm "sonicuniverse") # Transcending the world of jazz with eclectic, avant-garde takes on tradition.
(soma-fm "specials") # For Halloween: Dark industrial/ambient music for tortured souls.
];
};
Weihnacht = {
description = "";
tracks = [
(soma-fm "christmas") # Chilled holiday grooves and classic winter lounge tracks. (Kid and Parent safe!)
(soma-fm "jollysoul") # Where we cut right to the soul of the season.
(soma-fm "xmasinfrisko") # SomaFM's wacky and eclectic holiday mix. Not for the easily offended.
(soma-fm "xmasrocks") # Have your self an indie/alternative holiday season!
];
};
Charts = {
description = "";
tracks = [
(rautemusik "main")
(rautemusik "workout")
(rautemusik "jam")
(rautemusik "charthits")
(rautemusik "top40")
{
url = "http://185.80.220.12:8166/stream"; # "Raidió Rírá"
name = "Raidió Rí-Rá";
provider = "Conradh na Gaeilge";
}
(big-fm "charts")
(big-fm "deutschland")
(big-fm "mashup")
(rte "2fm")
];
};
Talk = {
description = "";
tracks = [
(rte "radio1")
(rte "radio1extra")
];
};
}

View File

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

View File

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

View File

@@ -1,17 +1,18 @@
{ config, pkgs, lib, ... }:
with lib;
let
stockholm-systems =
let systemsDir = <stockholm> + "/krebs/1systems";
in genAttrs
(attrNames (filterAttrs (_: value: value == "directory") (builtins.readDir systemsDir)))
(name: import <nixpkgs/nixos> {
configuration = import (systemsDir + "/${name}/config.nix");
});
hostsPackage = stockholm-systems.filebitch.config.krebs.tinc.retiolum.hostsPackage;
netname = "retiolum";
cfg = config.networking.retiolum;
retiolum = pkgs.fetchFromGitHub {
owner = "krebs";
repo = netname;
rev = "76e8de36d4ac06bcfaf551946aa2f6a41d9e6555";
sha256 = "0yhmmvg6gm5yxs1gzszl19bs6y302yjg81a7sckfglwzcql3q0wf";
};
in {
options = {
networking.retiolum.ipv4 = mkOption {
@@ -44,13 +45,20 @@ in {
AutoConnect = yes
'';
};
# environment.etc."tinc/retiolum".source = hostsPackage;
systemd.services."tinc.${netname}" = {
preStart = ''
cp -R ${toString <retiolum/hosts>} /etc/tinc/retiolum/ || true
set -eu
mkdir -p /etc/tinc/${netname}/hosts/
cp ${hostsPackage}/* /etc/tinc/${netname}/hosts/
'';
};
networking.extraHosts =
# TODO generate from stockholm
builtins.readFile (toString <retiolum/etc.hosts>);
environment.systemPackages =

View 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";
};
};
};
}

View File

@@ -1,4 +1,4 @@
{ fetchzip, symlinkJoin, lib, scardanelli ? false }:
{ fetchzip, symlinkJoin, lib }:
let
gfs-font = name: sha256:
fetchzip {
@@ -17,34 +17,21 @@ in symlinkJoin {
GFS_Baskerville = "07gx5b9b43zv74d2lay37sajd4ba2wqn3b7xzvyhn265ds9x7cxk";
GFS_Bodoni = "0jhl0728ikzha1krm01sk52nz3jzibidwmyvgidg61d87l8nbf2p";
GFS_Bodoni_Classic = "06jw2irskn75s50mgwkx08rzwqi82gpc6lgjsimsi8p81566gfrh";
GFS_Complutum =
"1q7dxs2z3yrgchd2pz9h72mjrk62kdc2mmqw8kg9q76k28f8n3p0"; # -> GFSPolyglot.otf
GFS_Complutum = "1q7dxs2z3yrgchd2pz9h72mjrk62kdc2mmqw8kg9q76k28f8n3p0"; # -> GFSPolyglot.otf
GFS_Decker = "016v1j5n9ph4i2cpmlk26pcxhp3q2fjwlaryppd5akl84dfkpncl";
GFS_Didot = "0ysvrp527wm0wxfp6wmlgmxfx7ysr5mwpmjmqp1h605cy44jblfm";
GFS_Didot_Classic = "0n5awqksvday3l3d85yhwmbmfj9bcpxivy4wpd4zrkgl7b85af2c";
GFS_Didot_Display = if scardanelli then
"0n2di2zyc76w6f8mc6hfilc2ir6igks7ldjp9fkw1gjp06330fi7"
else
"0gg5xb8jic646gz9p05ry62nk7w0k546fxp5p4vvnawmckql2dj1";
GFS_Didot_Display = "0n2di2zyc76w6f8mc6hfilc2ir6igks7ldjp9fkw1gjp06330fi7";
GFS_Elpis = "02l7wd3nbn1kpv7ghxh19k4dbvd49ijyxd6gq83gcr9vlmxcq2s2";
GFS_Gazis = "0x9iwj6pinaykrds0iw6552hf256d0dr41sipdb1jnnlr2d3bf9w";
GFS_Goschen = "1jvbn33wzq2yj0aygwy9pd2msg3wkmdp0npjzazadrmfjpnpkcy9";
GFS_NeoHellenic = "1ixm2frdc6i5lbn9h0h4gdsvsw2k4hny75q8ig4kgs28ac3dbzq3";
GFS_Olga = "0f05ng02na84x9x6yhskxqwxwyabjisyl8a0k3fiah60i620p39d";
GFS_Orpheus = if scardanelli then
"18n6fag4pyr8jdwnsz0vixf47jz4ym8mjmppc1w3k7v27cg1z9dz"
else
"1rvjpvk1fx55vyp3dyxcbww1a24rm7xv5faqs735yf6lqzpkqnax";
GFS_Orpheus_Classic = if scardanelli then
"1rqy1kf7slw56zfhbv264yzarjisnqbqydj4f7hghiknhnmdakps"
else
"0d2yzwg6albmgl1d0xhsfrmxj79r42wp712rpry567nv1ry42k0a";
GFS_Orpheus_Sans = if scardanelli then
"02rh7z8c3h3xyfi52rn47z4finizx636d05bg5g23v0l0mqs6nkg"
else
"1rdlm2kmkvi4y3ii68ik8k3w3183vvb3q2pnk04lbb0ggg9w5jdb";
GFS_Olga = "1qaxaw3ngnbr1gb1xyk5f2z647zklg6sl3bqwi28l47j9mp0f8aj";
GFS_Orpheus = "18n6fag4pyr8jdwnsz0vixf47jz4ym8mjmppc1w3k7v27cg1z9dz";
GFS_Orpheus_Classic = "1rqy1kf7slw56zfhbv264yzarjisnqbqydj4f7hghiknhnmdakps";
GFS_Orpheus_Sans = "02rh7z8c3h3xyfi52rn47z4finizx636d05bg5g23v0l0mqs6nkg";
GFS_Philostratos = "0zh3d0cn6b2fjbwnvmg379z20zh7w626w2bnj19xcazjvqkwhzx1";
GFS_Porson = "0r3snwgxkdx7h34sg3s0hr8fac3rnpllq62bk44m266hj6a80a5k";
GFS_Porson = "0c2axagkm6wxv8na2q11k6c5dmgkwx5hn9sh9qy82gbips9blnda";
GFS_Pyrsos = "0y0dv7y3n01bbhhnczflx1zcc7by56cffmr2xqixj2rd1nvchx0j";
GFS_Solomos = "1mpx9mw566awvfjdfx5sbz3wz5gbnjjw56gz30mk1lw06vxf0dxz";
GFS_Theokritos = "0haasx819x8c8yvna6pqywgi4060av2570jm34cddnz1fgnhv1b8";

View File

@@ -0,0 +1,32 @@
{ stdenv, lib, python3Packages }:
python3Packages.buildPythonApplication rec {
pname = "moodle-dl";
version = "2.1.1.1";
src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "0nv2gm4x6mfsa0wywm4xbsx6nf6hx4kb63s4lczaxb9m4ybjd45h";
};
patches = [
./readchar-version.patch
];
propagatedBuildInputs = with python3Packages; [
sentry-sdk
colorama
readchar
youtube-dl
certifi
html2text
requests
];
meta = with stdenv.lib; {
homepage = "https://github.com/C0D3D3V/Moodle-Downloader-2";
maintainers = [ maintainers.kmein ];
description = "A Moodle downloader that downloads course content fast from Moodle";
license = licenses.gpl3;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/setup.py b/setup.py
index 180139d..5582359 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ setup(
install_requires=[
'sentry_sdk>=0.13.5',
'colorama>=0.4.3',
- 'readchar>=2.0.1',
+ 'readchar>=2.0.0',
'youtube_dl>=2020.9.20',
'certifi>=2020.4.5.2',
'html2text>=2020.1.16',

23
packages/scripts/chunk-pdf Executable file
View File

@@ -0,0 +1,23 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p pdftk gnugrep
set -efu
INPUT_FILE="${2:?Pass the PDF path as second argument.}"
PAGES_PER_REPORT="${1:?Pass the chunk size as first argument.}"
if [ ! -f "$INPUT_FILE" ]; then
echo >&2 "File $INPUT_FILE does not exist."
exit 1
fi
TOTAL_PAGES="$(pdftk "$INPUT_FILE" dump_data | grep NumberOfPages | cut -f2 -d' ')"
RUNS=$((TOTAL_PAGES/PAGES_PER_REPORT))
for run in $(seq 0 "$((RUNS-1))"); do
start_page=$((run*PAGES_PER_REPORT+1))
end_page=$(((run+1)*PAGES_PER_REPORT))
output_file="chunk_$((run+1)).pdf"
echo "splitting $INPUT_FILE from $start_page to $end_page into $output_file"
pdftk "$INPUT_FILE" cat "$start_page-$end_page" output "$output_file"
done

View File

@@ -21,6 +21,26 @@ in rec {
name = "instaget";
};
dns-sledgehammer = pkgs.writers.writeDashBin "dns-sledgehammer" ''
${pkgs.coreutils}/bin/printf '%s\n' 'nameserver 1.1.1.1' 'options edns0' > /etc/resolv.conf
'';
much-scripts = pkgs.symlinkJoin {
name = "much-scripts";
paths = [
(wrapScript {
packages = [ pkgs.notmuch pkgs.msmtp pkgs.jq ];
name = "mail-send";
script = ./mail-send.sh;
})
(wrapScript {
name = "mail-kill";
script = ./mail-kill.sh;
packages = [ pkgs.notmuch ];
})
];
};
showkeys-toggle = pkgs.writers.writeDashBin "showkeys-toggle" ''
if ${pkgs.procps}/bin/pgrep screenkey; then
exec ${pkgs.procps}/bin/pkill screenkey
@@ -29,6 +49,18 @@ in rec {
fi
'';
interdimensional-cable =
let nimaid-github-io = pkgs.fetchFromGitHub {
owner = "nimaid";
repo = "nimaid.github.io";
rev = "9cb4ede215be6bb01bd2df1ef3e9689cc8c4eb9e";
sha256 = "1g47cj5an7xgmhpc09m7qim5j9rspqxvnzfy90cnlvz4pg8hil96";
};
in pkgs.writeShellScriptBin "interdimensional-cable" ''
export PATH=${lib.makeBinPath [ pkgs.mpv pkgs.jq pkgs.gnused ]}
mpv --shuffle --playlist=<(jq -r '.videos[]' ${nimaid-github-io}/tv/interdimensional_database.json | sed 's#^#https://youtu.be/#')
'';
tag = wrapScript {
packages = [ pkgs.vorbisTools pkgs.python3Packages.eyeD3 pkgs.nur.repos.kmein.opustags ];
script = "${voidrice}/.local/bin/tag";

View File

@@ -0,0 +1,20 @@
#! /bin/sh
set -efu
if ! notmuch search --exclude=false tag:deleted | tac | grep .; then
echo 'No killed mail.'
exit 1
fi
printf 'want do rm these mail? [y/N] '
read REPLY
case "$REPLY" in
y|Y) :;; # continue
*)
echo 'abort.'
exit 2
;;
esac
notmuch search --output=files --exclude=false tag:deleted | xargs -l rm -v
notmuch new

View File

@@ -0,0 +1,93 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils gnugrep gnused graphviz
#
# usage: nix-haddock-index
#
# Run this script in an environment where either NIX_GHC is set, or the ghc
# executable exists, to generate an HTML index file pointing to all Haddock
# files accessible to the respective ghc version.
#
# Additionally, an SVG dependency graph of all packages is linked at the
# bottom of the index file.
#
# Note: all files will be generated in /tmp, and won't be deleted automatically
#
set -efux
if test -z "${NIX_GHC-}"; then
NIX_GHC=$(readlink -f "$(type -P ghc)")
fi
if ! echo $NIX_GHC | grep -q '^/nix/store/'; then
printf '%s: error: unsupported GHC executable path (not in Nix store): %q\n' \
"$0" \
"$NIX_GHC" \
>&2
exit -1
fi
NIX_GHC_PREFIX=$(dirname "$(dirname "$NIX_GHC")")
NIX_GHC_DOCDIR=$NIX_GHC_PREFIX/share/doc/ghc/html
main() {
hash=$(echo $NIX_GHC_PREFIX | sed -n 's|^/nix/store/\([a-z0-9]\+\).*|\1|p')
title="Haddock index for $NIX_GHC_PREFIX"
header=$(
printf 'Haddock index for <a href="%s">%s</a>\n' \
$NIX_GHC_PREFIX \
$NIX_GHC_PREFIX \
)
suffix=${hash:+-$hash}
index_file=/tmp/haddock$suffix-index.html
svg_file=/tmp/haddock$suffix.svg
#if ! test -e $index_file; then
eval "$(
echo 'gen_index() {'
echo ' html_head'
"$NIX_GHC_PREFIX"/bin/ghc-pkg dump | sed -n '
s/^---$/ reset/p
s/^\(name\|version\):\s*\([-A-Za-z0-9_.]\+\)$/ \1=\2/p
s/^haddock-html:\s*\([-A-Za-z0-9_./]\+\)$/ haddock_html \1/p
'
echo ' html_foot'
echo '}'
)"
gen_index > $index_file
#fi
#if ! test -e $svg_file; then
"$NIX_GHC_PREFIX"/bin/ghc-pkg dot | tred | dot -Tsvg | sed '
s/<svg width="[0-9]\+pt" height="[0-9]\+pt"/<svg width="3600px" height="100%"/
' > $svg_file
#fi
echo $index_file
}
reset() {
unset name version
}
haddock_html() {
printf '<li>'
printf '<a href="%s/index.html">%s</a>' "$1" "$name-$version"
printf '</li>\n'
}
html_head() {
printf '<!doctype html>\n'
printf '<title>%s</title>\n' "$title"
printf '<link href="%s" rel="stylesheet" type="text/css">\n' \
"$NIX_GHC_DOCDIR/libraries/ocean.css"
printf '<h1>%s</h1>\n' "$header"
printf '<ul>\n'
}
html_foot() {
printf '</ul>\n'
printf '<a href="%s">graph</a>\n' "$svg_file"
}
main "$@"

64
packages/tuner.nix Normal file
View File

@@ -0,0 +1,64 @@
{ pkgs, playlists }:
let
inherit (pkgs) lib;
trackHTML = {url, provider, name}: ''
<tr>
<th>${name}</th>
<td><small>${provider}</small></td>
<td>
<audio controls>
<source src="${url}">
Your browser does not support the audio tag.
</audio>
</td>
</tr>
'';
playlistSection = name: {description, tracks}: ''
<section>
<header>
<h2 id="${lib.strings.sanitizeDerivationName name}">${name}</h2>
<p>${description}</p>
</header>
<table>
<thead>
<th>Name</th>
<th>Provider</th>
<th>Player</th>
</thead>
${builtins.concatStringsSep "\n\n" (map trackHTML tracks)}
</table>
</section>
'';
in pkgs.writeText "tuner.html" ''
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tuner</title>
<link rel="stylesheet" href="https://unpkg.com/mvp.css">
</head>
<body>
<header>
<nav>
<a href="#">Tuner</a>
<small>kmein's webradio hub</small>
<ul>
<li>
Playlists
<ul>
${builtins.concatStringsSep "\n" (lib.mapAttrsToList (name: {...}: ''<li><a href="#${lib.strings.sanitizeDerivationName name}">${name}</a></li>'') playlists)}
</ul>
</li>
</ul>
</nav>
</header>
<main>
${builtins.concatStringsSep "\n<hr/>\n" (lib.mapAttrsToList playlistSection playlists)}
</main>
<footer>
<p><small>&copy; kmein 2020</small></p>
</footer>
</body>
</html>
''

View File

@@ -10,11 +10,6 @@ let
url = "https://github.com/NixOS/nixpkgs.git";
path = toString .versions/nixpkgs.json;
};
nixpkgs-unstable = {
ref = "refs/heads/master";
url = "https://github.com/NixOS/nixpkgs.git";
path = toString .versions/nixpkgs-unstable.json;
};
home-manager = {
ref = "refs/heads/release-${release}";
url = "https://github.com/rycee/home-manager.git";
@@ -27,7 +22,7 @@ let
};
stockholm = {
ref = "refs/heads/master";
url = "https://cgit.krebsco.de/stockholm";
url = "https://github.com/kmein/stockholm";
path = toString .versions/stockholm.json;
};
retiolum = {
@@ -46,9 +41,7 @@ let
dependencies;
in pkgs.mkShell {
buildInputs = updateScripts ++ [
(pkgs.writers.writeDashBin "niveum-update"
(lib.concatStringsSep " &\n" (lib.mapAttrsToList updateCommand dependencies)))
@@ -77,8 +70,5 @@ in pkgs.mkShell {
printf "\033[1m%11s\033[0m %s\n" "$hostname" "$machine_status"
done
'')
];
shellHook = "export HISTFILE=${toString ./.history}";
}

View File

@@ -1,41 +0,0 @@
{ config, pkgs, lib, ... }: {
imports = [
<niveum/configs/default.nix>
<niveum/configs/kdeconnect.nix>
./hardware-configuration.nix
];
environment.systemPackages = [ pkgs.zeroad pkgs.minecraft ];
niveum = {
batteryBlocks.default = "BAT1";
networkInterfaces.wireless = "wlp3s0";
promptColours.success = "green";
fonts.size = lib.mkForce 11;
};
boot.loader.systemd-boot = {
enable = true;
configurationLimit = 5;
};
boot.loader.efi.canTouchEfiVariables = true;
# ref https://askubuntu.com/questions/575020/ubuntu-14-04-brightness-problem-lenovo-z500
boot.kernelParams = [ "acpi_backlight=vendor" ];
services.xserver.deviceSection = ''
Option "Backlight" "ideapad"
BusID "PCI:0:2:0"
'';
services.xserver.videoDrivers = [ "intel" ];
networking.retiolum = {
ipv4 = "10.243.2.1";
ipv6 = "42:0:3c46:53e:e63d:e62a:56ea:c705";
};
networking.hostName = "homeros";
system.stateVersion = "18.09";
}

View File

@@ -1,34 +0,0 @@
{ config, lib, pkgs, ... }: {
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
"rtsx_usb_sdmmc"
];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/83544ad3-1d23-4c2d-82bc-fafef13a996f";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/8F9E-7556";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/5ea3a65e-8fdb-45fb-ad32-3759d991a83a"; }];
# services.xserver.videoDrivers = [ "nvidia" ];
nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View File

@@ -0,0 +1,62 @@
{ config, pkgs, ... }:
let
inherit (import <niveum/lib>) kieran;
in
{
imports = [
./hardware-configuration.nix
<niveum/configs/codimd.nix>
<niveum/configs/spacetime.nix>
<niveum/configs/sshd.nix>
<niveum/configs/nextcloud.nix>
<niveum/configs/save-space.nix>
<niveum/configs/version.nix>
<niveum/configs/urlwatch.nix>
<niveum/configs/gitea.nix>
<niveum/modules/retiolum.nix>
];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
networking.useDHCP = false;
networking.interfaces.ens3.useDHCP = true;
networking.hostName = "makanek";
system.stateVersion = "20.03";
boot.loader.grub.devices = [ "/dev/sda" ];
services.openssh.enable = true;
networking.retiolum = {
ipv4 = "10.243.2.84";
ipv6 = "42:0:3c46:f7a9:1f0a:1b2b:822a:6050";
};
environment.etc."tinc/retiolum/rsa_key.priv" = {
text = builtins.readFile <system-secrets/retiolum.key>;
mode = "400";
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
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";
};
security.acme = {
acceptTerms = true;
email = kieran.email;
};
environment.systemPackages = [ pkgs.vim pkgs.git ];
}

View File

@@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
];
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "xhci_pci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9eaeaaa7-b453-4634-8a69-d416f702d3aa";
fsType = "ext4";
};
swapDevices = [ ];
zramSwap.enable = true;
nix.maxJobs = lib.mkDefault 2;
}

View File

@@ -0,0 +1,54 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
<niveum/configs/default.nix>
{
boot.extraModulePackages = with config.boot.kernelPackages; [
tp_smapi
acpi_call
];
boot.kernelModules = [ "tp_smapi" "acpi_call" ];
environment.systemPackages = [ pkgs.tpacpi-bat ];
services.tlp = {
enable = true;
settings = {
START_CHARGE_THRESH_BAT0 = 80;
STOP_CHARGE_THRESH_BAT0 = 95;
};
};
}
];
niveum = {
batteryName = "BAT0";
wirelessInterface = "wlp3s0";
promptColours.success = "cyan";
};
networking.useDHCP = false;
networking.interfaces = {
enp0s25.useDHCP = true;
wlp3s0.useDHCP = true;
wwp0s20u4i6.useDHCP = true;
};
environment.systemPackages = with pkgs; [
git vim
];
networking.retiolum = {
ipv4 = "10.243.2.85";
ipv6 = "42:0:3c46:ac99:ae36:cb8:c551:ba27";
};
networking.hostName = "manakish";
system.stateVersion = "20.09"; # Did you read the comment?
}

View File

@@ -0,0 +1,40 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ff47c479-e6d4-4cd6-93f1-9685f4018bc6";
fsType = "ext4";
};
boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/493cb228-c292-4f71-9f38-dcb3e96dec47";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D4AC-91B0";
fsType = "vfat";
};
swapDevices = [ ];
zramSwap.enable = true;
boot.loader.grub = {
enable = true;
version = 2;
efiSupport = true;
efiInstallAsRemovable = true;
device = "/dev/sda";
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View File

@@ -1,31 +0,0 @@
{ config, pkgs, ... }:
let
sshKey.rilke =
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWRcTILWzSzOAWqwBjJC97K9wKm+pfxk15L5AiTUlUMyBzVQsU+d2jUEe1rmp+kjVXL0qgNMI+eBzEAzaafUMdCPeIkMyeiOlXaYxq8NHApcZUSYV9CmzWqePj8Dlu8uexoF3TJi6tj3mmGM8BY50qkwk4mlT/5xLPPnh/HHyFmoZlj6183Z4vJRnK8UZ6x2gevVaE36lP27MikZ/MQ6/PaHJ5TNZy63rQwzKXw6ZQMx4JU22CwyZqPn1wjlGEkpJFOBKtnypURdVBsPydaZd/I7b/13FMwso2hSUoXqeV6iaeno2FWOrB3cAaFogNWKPRkEacKEE5mQOvLGGdG1Xp u0_a138@localhost";
in {
imports = [ <niveum/configs/default.nix> ./hardware-configuration.nix ];
users.users.me.openssh.authorizedKeys.keys = [ sshKey.rilke ];
niveum = {
batteryBlocks.default = "BAT1";
networkInterfaces.wireless = "wlp2s0";
promptColours.success = "yellow";
};
boot.loader.systemd-boot = {
enable = true;
configurationLimit = 5;
};
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "scardanelli";
networking.retiolum = {
ipv4 = "10.243.2.2";
ipv6 = "42:0:3c46:4007:5bce:f1bc:606b:2b18";
};
system.stateVersion = "18.09";
}

View File

@@ -1,132 +1,50 @@
{ config, pkgs, lib, ... }:
let
kmeinKeys = lib.strings.splitString "\n" (lib.strings.fileContents (pkgs.fetchurl {
url = "https://github.com/kmein.keys";
sha256 = "1b9gbpgihg7zc89ivsz0gs3najp0zg53rcknvzvkm0851fdzkryx";
}));
inherit (import <niveum/lib>) kieran;
in {
imports = [
./hardware-configuration.nix
./hass
./telegram-bots
<niveum/configs/hass>
<niveum/configs/distrobump.nix>
<niveum/configs/nixpkgs-unstable.nix>
<niveum/configs/nextcloud.nix>
<niveum/configs/spacetime.nix>
<niveum/configs/sshd.nix>
<niveum/configs/moodle-dl.nix>
<niveum/configs/save-space.nix>
<niveum/configs/wifi.nix>
<niveum/configs/tmux.nix>
<niveum/configs/version.nix>
<niveum/configs/traadfri.nix>
<niveum/configs/matterbridge.nix>
<niveum/modules/retiolum.nix>
<niveum/modules/telegram-bot.nix>
{
nixpkgs = {
overlays = [ (import <niveum/overlays/toml.nix>) ];
config.packageOverrides = pkgs: {
writeDash = pkgs.writers.writeDash;
writeDashBin = pkgs.writers.writeDashBin;
};
};
services.matterbridge = {
enable = true;
configPath = toString (pkgs.writeTOML (import <niveum/dot/matterbridge.nix> {
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
}));
};
}
{ services.keybase.enable = true; }
{
systemd.services.irc-bouncer = {
description = "IRC bouncer";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartIfChanged = false;
script = "${pkgs.tmux}/bin/tmux -2 new-session -d -s IRC ${pkgs.weechat}/bin/weechat";
preStop = "${pkgs.tmux}/bin/tmux kill-session -t IRC";
serviceConfig = {
User = "kfm";
RemainAfterExit = true;
Type = "oneshot";
};
};
services.rss-bridge.enable = true;
}
{
sound.enable = true;
hardware.pulseaudio.enable = true;
boot.loader.raspberryPi.firmwareConfig = ''
dtparam=audio=on
'';
services.weechat.enable = true;
users.extraUsers.weechat = {
useDefaultShell = true;
openssh.authorizedKeys.keys = kieran.sshKeys pkgs;
};
}
{
imports = [ <stockholm/krebs/3modules/urlwatch.nix> ];
krebs.urlwatch = {
enable = true;
onCalendar = "*-*-* 05:00:00";
sendmail.enable = false;
telegram = {
enable = true;
chatId = [ "18980945" ];
botToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
};
urls = [
# "https://michael-klonovsky.de/acta-diurna"
];
};
}
];
nix.nixPath = [ "/var/src" ];
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
networking.hostName = "toum";
time.timeZone = "Europe/Berlin";
networking.wireless = {
enable = false;
networks.Aether = {
pskRaw =
"e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
};
};
environment.variables.TERM = "linux";
environment.variables.HTOPRC = toString <niveum/dot/htoprc>;
environment.systemPackages = with pkgs; [
git vim htop wget reptyr
raspberrypi-tools
];
users.mutableUsers = false;
users.users.me = {
name = "kfm";
home = "/home/kfm";
createHome = true;
group = "users";
extraGroups = [ "wheel" ];
hashedPassword =
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
shell = pkgs.bash;
};
security.sudo.enable = true;
services.openssh = {
enable = true;
ports = [ 22022 ];
passwordAuthentication = false;
};
users.users.root.openssh.authorizedKeys.keys = kmeinKeys;
users.users.me.openssh.authorizedKeys.keys = kmeinKeys;
networking.retiolum = {
ipv4 = "10.243.2.3";

View File

@@ -9,8 +9,5 @@
};
};
swapDevices = [{
device = "/swapfile";
size = 1024;
}];
zramSwap.enable = true;
}

View File

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

View File

@@ -1,5 +1,10 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib>) nixpkgs-unstable;
unstable = import nixpkgs-unstable {
config.allowUnfree = true;
};
in
{
imports = [
<niveum/configs/default.nix>
@@ -24,14 +29,17 @@
];
niveum = {
batteryBlocks.default = "BAT0";
networkInterfaces.wireless = "wlp3s0";
batteryName = "BAT0";
wirelessInterface = "wlp3s0";
promptColours.success = "cyan";
};
virtualisation.docker.enable = lib.mkForce false;
environment.systemPackages = [ pkgs.unstable.minecraft ];
nix.buildCores = 1;
nix.maxJobs = 2;
environment.systemPackages = [ unstable.minecraft ];
boot.loader.systemd-boot = {
enable = true;

View File

@@ -6,19 +6,19 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices."luksmap".device = "/dev/disk/by-uuid/03b6abd0-e9ce-49c8-9659-a1d94f645d0f";
fileSystems."/" = {
device = "/dev/disk/by-uuid/66ced7b9-cfa7-40dd-a488-18ef91a337e0";
fsType = "ext4";
};
boot.initrd.luks.devices."luksmap".device = "/dev/disk/by-uuid/03b6abd0-e9ce-49c8-9659-a1d94f645d0f";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E1B1-1B9C";
fsType = "vfat";
};
swapDevices = [];
zramSwap.enable = true;
nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";

Some files were not shown because too many files have changed in this diff Show More