diff options
-rw-r--r-- | kartei/jan/default.nix | 90 | ||||
-rw-r--r-- | kartei/lass/prism.nix | 1 | ||||
-rw-r--r-- | kartei/others/default.nix | 57 | ||||
-rw-r--r-- | krebs/2configs/cal.nix | 127 | ||||
-rw-r--r-- | krebs/2configs/reaktor2.nix | 5 | ||||
-rw-r--r-- | krebs/5pkgs/simple/vicuna-chat/default.nix | 33 | ||||
-rw-r--r-- | krebs/nixpkgs-unstable.json | 8 | ||||
-rw-r--r-- | krebs/nixpkgs.json | 8 | ||||
-rwxr-xr-x | krebs/update-nixpkgs.sh | 2 | ||||
-rw-r--r-- | lass/2configs/baseX.nix | 65 | ||||
-rw-r--r-- | lass/2configs/fetchWallpaper.nix | 2 | ||||
-rw-r--r-- | lass/2configs/fonts.nix | 14 | ||||
-rw-r--r-- | lass/2configs/realwallpaper.nix | 3 | ||||
-rw-r--r-- | lass/2configs/themes.nix | 13 | ||||
-rw-r--r-- | lass/2configs/xmonad.nix | 2 | ||||
-rw-r--r-- | lass/krops.nix | 29 | ||||
-rw-r--r-- | tv/2configs/hw/winmax2.nix | 2 | ||||
-rw-r--r-- | tv/2configs/sshd.nix | 12 |
18 files changed, 306 insertions, 167 deletions
diff --git a/kartei/jan/default.nix b/kartei/jan/default.nix new file mode 100644 index 000000000..6b90cfdc4 --- /dev/null +++ b/kartei/jan/default.nix @@ -0,0 +1,90 @@ +{ config, ... }: let + lib = import ../../lib; +in { + + users.jan = { + mail = "jan.heidbrink@posteo.de"; + }; + + hosts.toastbrot = { + owner = config.krebs.users.jan; + nets = { + retiolum = { + ip4.addr = "10.243.117.12"; + aliases = [ + "toastbrot.r" + ]; + tinc.pubkey = '' + -----BEGIN PUBLIC KEY----- + MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA12VLPJMhGSh5fQgrB6bP + 2H1eew0/7t1xr3oJ3uaTZd7UIvPQ/aA5pB9xL5s+BIBvRa5P3QFWUAVhqchsPiRc + yC4awLvo6zrUZB3pJBFiUuThx1xzmazTbRNyJ0E3Dwi2VSp3dAi5xEwHSVDSElGj + DyRrdwyLe9lKghGHgNhB01QAt1/AO3A/TBs2RS/E0kuPhVQzpo5Ae5I530Cr0pf3 + r/de1TdArIcOfnTvW7WNrdBhwLq14cfdXkZwJ2bBE9Q22FAJp5k21PW5dQ41oDuT + PYHZIH555sxifMThrUpuNHIrDtIQk6D+Km90WNf/lBGwZqQr/B5G6zSNX7d/0JbY + Hi8Ltq++Sf0XgWNir9+evGNLCBqAXdvQFrj2l7BuNywE0L2nZThnxjTxP6QLFnqO + IXY97x3p7AYcfmVFutfYqYM1HdyyehF711hhm30fdcXHsJ+GpQgGrj67+++N7g7g + fjWBGNI9EL9CyTZ/N9U3TGeoxooc1BSaAiHmaPoYaAeI0Y/W6bNrixpL3aI5X8MH + Flen2y2XEk2n+pXozPDbLAT+MZ3sWwODDYRc8zGbV2RlMvL94LHh95/JC0itdXa3 + uNRDtSnfbNe4eHw9/HMDkclhywuE+hbyq+JNNodqLwG/o1/r3GI+ggOyCdZHjF4B + 4R8QXUJiqUdcbR3WQDR5i10CAwEAAQ== + -----END PUBLIC KEY----- + ''; + }; + }; + }; + + hosts.petrosilia = { + owner = config.krebs.users.jan; + nets = { + retiolum = { + ip4.addr = "10.243.143.11"; + ip6.addr = (lib.krebs.genipv6 "retiolum" "jan" { hostName = "petrosilia"; }).address; + aliases = [ + "petrosilia.r" + ]; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIICCgKCAgEAxDumQ/06Yd3AQPSlHH9/kNngbc/tq5yBuT0ymbQGMHLL9X3pCz/f + y9GZVpQtaKm7EZ0Kj8ieaPOyG7BItH0AvTdSJV7rn4WKuKfe5E5S4E8YqsZfSu4N + IdEKVIisyBNCklXaDn6A7nxeUauwHQHuj0wOAnYKfaU+2haL+JzcFtQ1RpxDBsy1 + FbcEXO5NOhsXK4mHjtRrK1GamnCo5gvJU3w1NrfLRXteOOBsR49HhTIWvi8L4tSf + fd/mFwWayB7D0feLhWBpMPQTa5TeeQPxhgJrlIwXJiONG8GWFWNCHEjbQaCuJJWn + e37n9xCpdH867P921Ei+gyKZi9t6d+U4blrCpQzIe95t8Uv0i2c+YNt9NQL5Z119 + jt/Xhm7ccT9FeOuYsbjcO6g0BJumILEjD309vfQfWNims++vMd53q3dzxp4Kau+f + vdMyrzWiIytM+/iQmneG8XLv0b7I6FUPEahpCncZ14NqBDaKclwoJ/HfB+WZi6JV + yBVJHm9vogfzD1sLmDctHps3uJAeZHzszws8LMKdd5JxxQzVBRcrD1LKHYmmUYTU + 5gyDxnFn8ZoZ3GFVH+5v2PJgZY++/6zdDxQ9flrdt2zRaoAq2Zayn7R8sQ/ZjMXK + eR8aXgHzEL/n/9BMKs+jLu3j8xaiJX8ctnRvwSnOFjU9wQvJ7QNQHk0CAwEAAQ== + -----END RSA PUBLIC KEY----- + ''; + tinc.pubkey_ed25519 = "Rs5jdJk/YF4aXohp3isau4LHinD4VWlvSa9CcgznR+A"; + }; + }; + }; + + hosts.grill = { + owner = config.krebs.users.jan; + nets.retiolum = { + aliases = [ "grill.r" ]; + ip4.addr = "10.243.217.217"; + ip6.addr = (lib.krebs.genipv6 "retiolum" "jan" { hostName = "grill"; }).address; + tinc.pubkey = '' + -----BEGIN RSA PUBLIC KEY----- + MIICCgKCAgEAs4P6CfRcwFGCqkfv1tyTbbk2eHh08kEqxPNQ655sMKWxMhgRnRII + 1ooJW+q3zOm0P4IySvQkqPCXiynPBKG+W8vz6as4/TjMgqz45zTSZaoGsUjPS7Yg + L9qN6bLNJUhjPtyBBIX5l+WSii2RkbtcFTewY9HITPgOvu5rSiYgdz1X86BDTy0w + E6g13jwjI0D29jFAXIIfSwfvqikHmicr++3R4URPTiY7Vcg3UtIYGaKEFTPid0Da + bd47ZNWI99CI5Znzd4aJSD+0lfD6+EZb4nQ2o/VZ5RRUid9qWKHu5pbXvPrwE5uC + TWtsP1nla+zx1nDD2UHt0bJzdfz4sEFrmLHBqsdvfgAlVvVr65ZMIOO5X0fevHi4 + s3jqYPMLksimuQjHCXYcgxfBYkVPuVWqDivOV8Z60UhAop5xK9i+FV4kyTgL+qmH + 79VAy8+2Wrzda/MBVFF+0XAryBtqFgk5JtmfRKJ5rcXFy9hnugmfulOC0+XFPFbN + cNLbPR/dwON6YIg90z0wwJfPoWwzj3jKwT7YZ/pYSEl0JDgkpTzCxiBbqpJ/r8CZ + 2avRws5YMVnLcuY1IFlNLJdUZdz+41zmPizIP0dAdrwDH56AJkTukESf1Ir6G2NT + isn3pijKy4Y/EbWnJiQpEKDfNh8JW1Ryw1zvNYKYR3OAImp3DgsWmeECAwEAAQ== + -----END RSA PUBLIC KEY----- + ''; + tinc.pubkey_ed25519 = "cqfMY/8kqtuM5wIzYMNfFIc47Jx1nnfV0//SMpsO61G"; + }; + }; +} diff --git a/kartei/lass/prism.nix b/kartei/lass/prism.nix index d72b167b6..ac7974731 100644 --- a/kartei/lass/prism.nix +++ b/kartei/lass/prism.nix @@ -71,6 +71,7 @@ rec { "c.r" "p.r" "search.r" + "wallpaper.r" ]; tinc = { pubkey = '' diff --git a/kartei/others/default.nix b/kartei/others/default.nix index 5a162ea6b..68097cdf8 100644 --- a/kartei/others/default.nix +++ b/kartei/others/default.nix @@ -286,60 +286,6 @@ in { }; }; }; - toastbrot = { - owner = config.krebs.users.jan; - nets = { - retiolum = { - ip4.addr = "10.243.117.12"; - aliases = [ - "toastbrot.r" - ]; - tinc.pubkey = '' - -----BEGIN PUBLIC KEY----- - MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA12VLPJMhGSh5fQgrB6bP - 2H1eew0/7t1xr3oJ3uaTZd7UIvPQ/aA5pB9xL5s+BIBvRa5P3QFWUAVhqchsPiRc - yC4awLvo6zrUZB3pJBFiUuThx1xzmazTbRNyJ0E3Dwi2VSp3dAi5xEwHSVDSElGj - DyRrdwyLe9lKghGHgNhB01QAt1/AO3A/TBs2RS/E0kuPhVQzpo5Ae5I530Cr0pf3 - r/de1TdArIcOfnTvW7WNrdBhwLq14cfdXkZwJ2bBE9Q22FAJp5k21PW5dQ41oDuT - PYHZIH555sxifMThrUpuNHIrDtIQk6D+Km90WNf/lBGwZqQr/B5G6zSNX7d/0JbY - Hi8Ltq++Sf0XgWNir9+evGNLCBqAXdvQFrj2l7BuNywE0L2nZThnxjTxP6QLFnqO - IXY97x3p7AYcfmVFutfYqYM1HdyyehF711hhm30fdcXHsJ+GpQgGrj67+++N7g7g - fjWBGNI9EL9CyTZ/N9U3TGeoxooc1BSaAiHmaPoYaAeI0Y/W6bNrixpL3aI5X8MH - Flen2y2XEk2n+pXozPDbLAT+MZ3sWwODDYRc8zGbV2RlMvL94LHh95/JC0itdXa3 - uNRDtSnfbNe4eHw9/HMDkclhywuE+hbyq+JNNodqLwG/o1/r3GI+ggOyCdZHjF4B - 4R8QXUJiqUdcbR3WQDR5i10CAwEAAQ== - -----END PUBLIC KEY----- - ''; - }; - }; - }; - petrosilia = { - owner = config.krebs.users.jan; - nets = { - retiolum = { - ip4.addr = "10.243.143.11"; - aliases = [ - "petrosilia.r" - ]; - tinc.pubkey = '' - -----BEGIN RSA PUBLIC KEY----- - MIICCgKCAgEAxDumQ/06Yd3AQPSlHH9/kNngbc/tq5yBuT0ymbQGMHLL9X3pCz/f - y9GZVpQtaKm7EZ0Kj8ieaPOyG7BItH0AvTdSJV7rn4WKuKfe5E5S4E8YqsZfSu4N - IdEKVIisyBNCklXaDn6A7nxeUauwHQHuj0wOAnYKfaU+2haL+JzcFtQ1RpxDBsy1 - FbcEXO5NOhsXK4mHjtRrK1GamnCo5gvJU3w1NrfLRXteOOBsR49HhTIWvi8L4tSf - fd/mFwWayB7D0feLhWBpMPQTa5TeeQPxhgJrlIwXJiONG8GWFWNCHEjbQaCuJJWn - e37n9xCpdH867P921Ei+gyKZi9t6d+U4blrCpQzIe95t8Uv0i2c+YNt9NQL5Z119 - jt/Xhm7ccT9FeOuYsbjcO6g0BJumILEjD309vfQfWNims++vMd53q3dzxp4Kau+f - vdMyrzWiIytM+/iQmneG8XLv0b7I6FUPEahpCncZ14NqBDaKclwoJ/HfB+WZi6JV - yBVJHm9vogfzD1sLmDctHps3uJAeZHzszws8LMKdd5JxxQzVBRcrD1LKHYmmUYTU - 5gyDxnFn8ZoZ3GFVH+5v2PJgZY++/6zdDxQ9flrdt2zRaoAq2Zayn7R8sQ/ZjMXK - eR8aXgHzEL/n/9BMKs+jLu3j8xaiJX8ctnRvwSnOFjU9wQvJ7QNQHk0CAwEAAQ== - -----END RSA PUBLIC KEY----- - ''; - tinc.pubkey_ed25519 = "Rs5jdJk/YF4aXohp3isau4LHinD4VWlvSa9CcgznR+A"; - }; - }; - }; tpsw = { owner = config.krebs.users.ciko; # main laptop nets = { @@ -629,9 +575,6 @@ in { ilmu = { mail = "ilmu@rishi.is"; }; - jan = { - mail = "jan.heidbrink@posteo.de"; - }; jonge = { mail = "jacek.galowicz@gmail.com"; }; diff --git a/krebs/2configs/cal.nix b/krebs/2configs/cal.nix index 90093e8eb..15f0027b3 100644 --- a/krebs/2configs/cal.nix +++ b/krebs/2configs/cal.nix @@ -1,33 +1,116 @@ -{ config, lib, pkgs, ... }: -{ - users.users.testing = { - uid = pkgs.stockholm.lib.genid_uint31 "testing"; - isNormalUser = true; - openssh.authorizedKeys.keys = [ - config.krebs.users.xkey.pubkey - config.krebs.users.lass.pubkey - ]; - packages = [ - pkgs.calendar-cli - pkgs.tmux - ]; - }; +{ config, lib, pkgs, ... }: let + + setupGit = '' + export PATH=${lib.makeBinPath [ + pkgs.coreutils + pkgs.git + ]} + export GIT_SSH_COMMAND='${pkgs.openssh}/bin/ssh -i /var/lib/radicale/.ssh/id_ed25519' + repo='git@localhost:cal' + cd /var/lib/radicale/collections + if ! test -d .git; then + git init + git config user.name "radicale" + git config user.email "radicale@${config.networking.hostName}" + elif ! url=$(git config remote.origin.url); then + git remote add origin "$repo" + elif test "$url" != "$repo"; then + git remote set-url origin "$repo" + fi + cp ${pkgs.writeText "gitignore" '' + .Radicale.cache + ''} .gitignore + git add .gitignore + ''; - services.xandikos = { + pushCal = pkgs.writeDash "push_cal" '' + ${setupGit} + git fetch origin + git merge --ff-only origin/master || : + ''; + + pushCgit = pkgs.writeDash "push_cgit" '' + ${setupGit} + git push origin master + ''; + +in { + services.radicale = { enable = true; - extraOptions = [ - "--autocreate" - "--defaults" - "--current-user-principal /krebs" - "--dump-dav-xml" - ]; + rights = { + krebs = { + user = ".*"; + collection = ".*"; + permissions = "rRwW"; + }; + }; + settings = { + auth.type = "none"; + server.hosts = [ + "0.0.0.0:5232" + "[::]:5232" + ]; + storage.filesystem_folder = "/var/lib/radicale/collections"; + storage.hook = "${pkgs.writers.writeDash "radicale-hook" '' + set -efu + ${setupGit} + ${pkgs.git}/bin/git add -A + (${pkgs.git}/bin/git diff --cached --quiet || ${pkgs.git}/bin/git commit -m "Changes by \"$1\"") + ${pushCgit} + ''} %(user)s"; + }; }; services.nginx = { enable = true; virtualHosts = { - "calendar.r".locations."/".proxyPass = "http://localhost:${toString config.services.xandikos.port}/"; + "calendar.r".locations."/".proxyPass = "http://localhost:5232/"; + }; + }; + krebs.git = { + enable = true; + cgit.settings = { + root-title = "krebs repos"; + }; + rules = with pkgs.stockholm.lib.git; [ + { + user = [ + { + name = "cal"; + pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGe1jtHaNFZKmWemWQVEGVYj+s4QGJaL9WYH+wokOZie"; + } + ] ++ (lib.attrValues config.krebs.users); + repo = [ config.krebs.git.repos.cal ]; + perm = push ''refs/heads/master'' [ create merge ]; + } + ]; + repos.cal = { + public = true; + name = "cal"; + hooks = { + post-receive = '' + ${pkgs.git-hooks.irc-announce { + channel = "#xxx"; + refs = [ + "refs/heads/master" + ]; + nick = config.networking.hostName; + server = "irc.r"; + verbose = true; + }} + /run/wrappers/bin/sudo -S -u radicale ${pushCal} + ''; + }; }; }; + krebs.secret.files.calendar = { + path = "/var/lib/radicale/.ssh/id_ed25519"; + owner = { name = "radicale"; }; + source-path = "${<secrets/radicale.id_ed25519>}"; + }; + + security.sudo.extraConfig = '' + git ALL=(radicale) NOPASSWD: ${pushCal} + ''; } diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index 67c2dd4cd..45ff61baf 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -77,7 +77,7 @@ let if [ "$?" -ne 0 ]; then report_error "$response" else - if ! text=$(printf '%s' "$response" | jq -er '.item.messages[1].text'); then + if ! text=$(printf '%s' "$response" | jq -er '.item.messages[-1].text'); then echo "$_from: $(report_error "$response")" exit 0 fi @@ -85,7 +85,7 @@ let echo "$_from: $text" | fold -s -w 426 printf '%s' "$response" | - jq -r '[.item.messages[1].sourceAttributions[].seeMoreUrl] | to_entries[] | "[\(.key + 1)]: \(.value)"' + jq -r '[.item.messages[-1].sourceAttributions[].seeMoreUrl] | to_entries[] | "[\(.key + 1)]: \(.value)"' fi ''; }; @@ -158,6 +158,7 @@ let ''; }; }; + interrogate = { pattern = "^!interrogate (.*)$"; activate = "match"; diff --git a/krebs/5pkgs/simple/vicuna-chat/default.nix b/krebs/5pkgs/simple/vicuna-chat/default.nix new file mode 100644 index 000000000..11a11aabe --- /dev/null +++ b/krebs/5pkgs/simple/vicuna-chat/default.nix @@ -0,0 +1,33 @@ +{ pkgs, ... }: +pkgs.writers.writeDashBin "vicuna-chat" '' + set -efu + + export PATH=${with pkgs; lib.makeBinPath [ + coreutils + curl + jq + ]} + + CONTEXT=''${CONTEXT:-$(date -Id)} + PROMPT=$* + + if ! test -e "$CONTEXT"; then + echo -n 'null' > "$CONTEXT" + fi + + add_to_context() { + jq -rc --argjson message "$1" '. + [$message]' "$CONTEXT" > "$CONTEXT.tmp" + mv "$CONTEXT.tmp" "$CONTEXT" + } + + add_to_context "{\"role\": \"user\", \"content\": \"$PROMPT\"}" + response=$( + jq -nc --slurpfile context "$CONTEXT" '{ + model: "vicuna-13b", + messages: $context[0], + }' | + curl -Ss http://vicuna.r/v1/chat/completions -H 'Content-Type: application/json' -d @- + ) + add_to_context "$(jq -rcn --argjson response "$response" '$response.choices[0].message')" + jq -rcn --argjson response "$response" '$response.choices[0].message.content' +'' diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json index 9b4622275..ea44e0c04 100644 --- a/krebs/nixpkgs-unstable.json +++ b/krebs/nixpkgs-unstable.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "7084250df3d7f9735087d3234407f3c1fc2400e3", - "date": "2023-05-22T13:19:02+02:00", - "path": "/nix/store/zgv3fzg2lywfqdrv4mghd62s9i6zxhrw-nixpkgs", - "sha256": "0nkg8h5ix0sbjqb0gdj5124nbg2gd1nmyl1p14cvlg77fs7afld6", + "rev": "04af42f3b31dba0ef742d254456dc4c14eedac86", + "date": "2023-06-17T03:03:56+03:00", + "path": "/nix/store/5g6mwq41hn17rxrrn7rpdaxk9ca5znnb-nixpkgs", + "sha256": "130w72blrj4f08qdj2y44abfkrwhmkk9nq9zrhb9abndnpv85001", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json index d4d9cc743..bf8858cd9 100644 --- a/krebs/nixpkgs.json +++ b/krebs/nixpkgs.json @@ -1,9 +1,9 @@ { "url": "https://github.com/NixOS/nixpkgs", - "rev": "a17f99dfcb9643200b3884ca195c69ae41d7f059", - "date": "2023-05-23T18:09:00+02:00", - "path": "/nix/store/2n82i65gv1y54xj3dplkvhfyc8rs1j90-nixpkgs", - "sha256": "180ipicp351s99nvn9xvf5nzs5fzxhawfbykaijvaqj63siss13m", + "rev": "c7ff1b9b95620ce8728c0d7bd501c458e6da9e04", + "date": "2023-06-16T15:10:29+02:00", + "path": "/nix/store/q26lhs4mcd384gdljz4cnnx710f705m0-nixpkgs", + "sha256": "0bq722ick80qwg1k1zv1021b2x7mlwsxv10y999mh22gk7vdfmi7", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/krebs/update-nixpkgs.sh b/krebs/update-nixpkgs.sh index 97c069d86..465548f44 100755 --- a/krebs/update-nixpkgs.sh +++ b/krebs/update-nixpkgs.sh @@ -3,7 +3,7 @@ dir=$(dirname $0) oldrev=$(cat $dir/nixpkgs.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/') nix-shell -p nix-prefetch-git --run 'nix-prefetch-git \ --url https://github.com/NixOS/nixpkgs \ - --rev refs/heads/nixos-22.11' \ + --rev refs/heads/nixos-23.05' \ > $dir/nixpkgs.json newrev=$(cat $dir/nixpkgs.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/') git commit $dir/nixpkgs.json -m "nixpkgs: $oldrev -> $newrev" diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix index 79777429a..bb01d3dcd 100644 --- a/lass/2configs/baseX.nix +++ b/lass/2configs/baseX.nix @@ -14,6 +14,7 @@ in { ./tmux.nix ./xmonad.nix ./themes.nix + ./fonts.nix { users.users.mainUser.packages = [ pkgs.sshuttle @@ -26,15 +27,15 @@ in { options.lass.fonts = { regular = mkOption { type = types.str; - default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"; + default = "xft:Iosevka Term SS15:style=regular"; }; bold = mkOption { type = types.str; - default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"; + default = "xft:Iosevka Term SS15:style=bold"; }; italic = mkOption { type = types.str; - default = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"; + default = "xft:Iosevka Term SS15:style=italic"; }; }; config.krebs.xresources.resources.X = '' @@ -98,64 +99,8 @@ in { ${pkgs.flameshot}/bin/flameshot gui ${pkgs.klem}/bin/klem '') - ]; - - fonts = { - fontDir.enable = true; - enableGhostscriptFonts = true; - - fonts = with pkgs; [ - xorg.fontschumachermisc - inconsolata - noto-fonts - (iosevka.override { - # https://typeof.net/Iosevka/customizer - privateBuildPlan = { - family = "Iosevka"; - spacing = "term"; - serifs = "slab"; - no-ligation = true; - - variants.design = { - capital-j = "serifless"; - a = "double-storey-tailed"; - b = "toothless-corner"; - d = "toothless-corner-serifless"; - f = "flat-hook-tailed"; - g = "earless-corner"; - i = "hooky"; - j = "serifless"; - l = "tailed"; - m = "earless-corner-double-arch"; - n = "earless-corner-straight"; - p = "earless-corner"; - q = "earless-corner"; - r = "earless-corner"; - u = "toothless-rounded"; - y = "cursive-flat-hook"; - - one = "no-base-long-top-serif"; - two = "straight-neck"; - three = "flat-top"; - four = "open"; - six = "open-contour"; - seven = "straight-serifless"; - eight = "two-circles"; - nine = "open-contour"; - tilde = "low"; - asterisk = "hex-low"; - number-sign = "upright"; - at = "short"; - dollar = "open"; - percent = "dots"; - question = "corner-flat-hooked"; - }; - }; - set = "kookiefonts"; - }) - ]; - }; + ]; services.udev.extraRules = '' SUBSYSTEM=="backlight", ACTION=="add", \ diff --git a/lass/2configs/fetchWallpaper.nix b/lass/2configs/fetchWallpaper.nix index 381df494d..781dad032 100644 --- a/lass/2configs/fetchWallpaper.nix +++ b/lass/2configs/fetchWallpaper.nix @@ -5,7 +5,7 @@ let in { krebs.fetchWallpaper = { enable = true; - url = "prism/realwallpaper-krebs-stars-berlin.png"; + url = "http://wallpaper.r/realwallpaper-krebs-stars-berlin.png"; }; } diff --git a/lass/2configs/fonts.nix b/lass/2configs/fonts.nix new file mode 100644 index 000000000..3d047e513 --- /dev/null +++ b/lass/2configs/fonts.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: +{ + fonts = { + fontDir.enable = true; + enableGhostscriptFonts = true; + + fonts = with pkgs; [ + xorg.fontschumachermisc + inconsolata + noto-fonts + (iosevka-bin.override { variant = "ss15"; }) + ]; + }; +} diff --git a/lass/2configs/realwallpaper.nix b/lass/2configs/realwallpaper.nix index a82e1d010..d81642da1 100644 --- a/lass/2configs/realwallpaper.nix +++ b/lass/2configs/realwallpaper.nix @@ -19,8 +19,7 @@ in { } ''; serverAliases = [ - hostname - "${hostname}.r" + "wallpaper.r" ]; locations."/realwallpaper/".extraConfig = '' index on; diff --git a/lass/2configs/themes.nix b/lass/2configs/themes.nix index eb1a53987..e9f83deea 100644 --- a/lass/2configs/themes.nix +++ b/lass/2configs/themes.nix @@ -15,6 +15,7 @@ ${pkgs.coreutils}/bin/chown lass:users /var/theme/current_theme ${pkgs.xorg.xrdb}/bin/xrdb -merge /var/theme/config/xresources ${pkgs.procps}/bin/pkill -HUP xsettingsd + ${pkgs.glib}/bin/gsettings set org.gnome.desktop.interface gtk-theme "$(cat /var/theme/config/gtk-theme)" else echo "theme $1 not found" fi @@ -37,17 +38,25 @@ in { ]; environment.systemPackages = [ switch-theme + pkgs.dracula-theme + pkgs.gnome3.adwaita-icon-theme ]; environment.etc = { + "themes/light/gtk-theme".text = '' + Adwaita + ''; "themes/light/xsettings.conf".text = '' - Net/ThemeName "Adwaita" + Net/ThemeName "Adwaita" ''; "themes/light/xresources".text = '' *background: #ffffff *foreground: #000000 ''; + "themes/dark/gtk-theme".text = '' + Dracula + ''; "themes/dark/xsettings.conf".text = '' - Net/ThemeName "Adwaita-dark" + Net/ThemeName "Dracula" ''; "themes/dark/xresources".text = '' *background: #000000 diff --git a/lass/2configs/xmonad.nix b/lass/2configs/xmonad.nix index 1789725d1..e2d9cff5d 100644 --- a/lass/2configs/xmonad.nix +++ b/lass/2configs/xmonad.nix @@ -68,7 +68,7 @@ myTerm :: FilePath myTerm = "/run/current-system/sw/bin/alacritty" myFont :: String -myFont = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1" +myFont = "${config.lass.fonts.regular}" main :: IO () main = do diff --git a/lass/krops.nix b/lass/krops.nix index c8a5b94b7..77164310c 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -5,16 +5,33 @@ pkgs ; - source = { test }: lib.evalSource ([ (krebs-source { test = test; }) { nixos-config.symlink = "stockholm/lass/1systems/${name}/physical.nix"; - nixpkgs-unstable.git = { - url = "https://github.com/nixos/nixpkgs"; - ref = (lib.importJSON ../krebs/nixpkgs-unstable.json).rev; - shallow = true; - }; + nixpkgs = lib.mkForce (if test then { + derivation = let + rev = (lib.importJSON ../krebs/nixpkgs-unstable.json).rev; + sha256 = (lib.importJSON ../krebs/nixpkgs-unstable.json).sha256; + in '' + with import (builtins.fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz"; + sha256 = "${sha256}"; + }) {}; + pkgs.fetchFromGitHub { + owner = "nixos"; + repo = "nixpkgs"; + rev = "${rev}"; + sha256 = "${sha256}"; + } + ''; + } else { + git = { + ref = (lib.importJSON ./nixpkgs.json).rev; + url = https://github.com/NixOS/nixpkgs; + shallow = true; + }; + }); secrets = if test then { file = toString ./2configs/tests/dummy-secrets; } else { diff --git a/tv/2configs/hw/winmax2.nix b/tv/2configs/hw/winmax2.nix index 49af7611c..7b284668d 100644 --- a/tv/2configs/hw/winmax2.nix +++ b/tv/2configs/hw/winmax2.nix @@ -27,8 +27,6 @@ pkgs.rocm-opencl-runtime ]; - hardware.video.hidpi.enable = true; - networking.wireless.enable = true; networking.wireless.interfaces = [ "wlp1s0" diff --git a/tv/2configs/sshd.nix b/tv/2configs/sshd.nix index 4da8c8216..0610e3c98 100644 --- a/tv/2configs/sshd.nix +++ b/tv/2configs/sshd.nix @@ -9,11 +9,17 @@ in { tv.iptables.extra.nat.OUTPUT = [ "-o lo -p tcp --dport 11423 -j REDIRECT --to-ports 22" ]; - tv.iptables.extra4.nat.PREROUTING = [ - "-d ${cfg.host.nets.retiolum.ip4.addr} -p tcp --dport 22 -j ACCEPT" - ]; + tv.iptables.extra4.nat.PREROUTING = + map + (net: "-d ${net.ip4.addr} -p tcp --dport 22 -j ACCEPT") + (filter (net: net.ip4 != null) + [ + cfg.host.nets.retiolum + cfg.host.nets.wiregrill + ]); tv.iptables.extra6.nat.PREROUTING = [ "-d ${cfg.host.nets.retiolum.ip6.addr} -p tcp --dport 22 -j ACCEPT" + "-d ${cfg.host.nets.wiregrill.ip6.addr} -p tcp --dport 22 -j ACCEPT" ]; tv.iptables.extra.nat.PREROUTING = [ "-p tcp --dport 22 -j REDIRECT --to-ports 0" |