From 5e4b9ee4c07ace8bf8992b72454094ec87c807aa Mon Sep 17 00:00:00 2001 From: Jade Date: Thu, 24 Aug 2023 16:55:49 +0200 Subject: [PATCH 1/8] last commit --- flake.lock | 520 -------------------------- flake.nix | 2 +- hosts/schrottserver/configuration.nix | 2 +- hosts/schrottserver/nextcloud.nix | 2 +- hosts/schrottserver/penpot.nix | 2 +- hosts/schrottserver/vaultwarden.nix | 2 +- 6 files changed, 5 insertions(+), 525 deletions(-) delete mode 100644 flake.lock diff --git a/flake.lock b/flake.lock deleted file mode 100644 index f7a95ae..0000000 --- a/flake.lock +++ /dev/null @@ -1,520 +0,0 @@ -{ - "nodes": { - "arion": { - "inputs": { - "flake-parts": "flake-parts", - "haskell-flake": "haskell-flake", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1682181677, - "narHash": "sha256-El8WQ2ccxWwkSrjuwKNR0gD/O7vS/KLBY4Q2/nF8m1c=", - "owner": "hercules-ci", - "repo": "arion", - "rev": "6a1f03329c400327b3b2e0ed5e1efff11037ba67", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "arion", - "type": "github" - } - }, - "easymacros": { - "inputs": { - "flake-utils": "flake-utils", - "naersk": "naersk", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1662552013, - "narHash": "sha256-ENoDCKs6gKcGYa06LhCVhro0FVntcy5GBvShS+TPvMY=", - "ref": "refs/heads/main", - "rev": "43405b3bcf786513adc6534ed0e6618c458ba2cb", - "revCount": 38, - "type": "git", - "url": "https://gitlab.com/obsidianical/easymacros.git" - }, - "original": { - "type": "git", - "url": "https://gitlab.com/obsidianical/easymacros.git" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "arion", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1675933616, - "narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "47478a4a003e745402acf63be7f9a092d51b83d7", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "locked": { - "lastModified": 1656065134, - "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1678901627, - "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "flake-utils_3": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "gumseite": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1680175611, - "narHash": "sha256-0VevgW7qjE3rDSudFr/XIQrMmPowDgLO9jkM4AFkR/o=", - "ref": "refs/heads/master", - "rev": "57f43b774151e34bbf3de5f159924aca93750561", - "revCount": 2, - "type": "git", - "url": "https://gitlab.com/schrottkatze/gum-schulsachen.git" - }, - "original": { - "type": "git", - "url": "https://gitlab.com/schrottkatze/gum-schulsachen.git" - } - }, - "haskell-flake": { - "locked": { - "lastModified": 1675296942, - "narHash": "sha256-u1X1sblozi5qYEcLp1hxcyo8FfDHnRUVX3dJ/tW19jY=", - "owner": "srid", - "repo": "haskell-flake", - "rev": "c2cafce9d57bfca41794dc3b99c593155006c71e", - "type": "github" - }, - "original": { - "owner": "srid", - "ref": "0.1.0", - "repo": "haskell-flake", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1687365523, - "narHash": "sha256-2l/cPXDCDVcLNm+EvCRGJcJ9YxxyLbc2vfTah/t8Qwc=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "1fefd7bb8da0eec6755747f410fa491411a94296", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "karton": { - "inputs": { - "naersk": "naersk_2", - "nixpkgs": "nixpkgs_6", - "utils": "utils" - }, - "locked": { - "lastModified": 1683146576, - "narHash": "sha256-ZaXE/mmVWgZkfnlY56PFuuCMDyUhNtkKuLzkle6Lg8s=", - "ref": "refs/heads/master", - "rev": "5002f11bf360e4508fc73c28fa0aa0f80bf0713d", - "revCount": 188, - "type": "git", - "url": "https://gitlab.com/obsidianical/microbin.git" - }, - "original": { - "type": "git", - "url": "https://gitlab.com/obsidianical/microbin.git" - } - }, - "mac-brcm-fw": { - "flake": false, - "locked": { - "lastModified": 1668279146, - "narHash": "sha256-KP2cgNVty0t+8laUc8nxefOk8O60fw/mBt7qStSyPNA=", - "path": "/home/jade/mac-brcm-fw", - "type": "path" - }, - "original": { - "path": "./mac-brcm-fw", - "type": "path" - } - }, - "meowsite": { - "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_7" - }, - "locked": { - "lastModified": 1678920998, - "narHash": "sha256-YM7MdYYoL/Wgmg8nmMVnAm33WwzdA2JFwMHKfOxNBXs=", - "ref": "refs/heads/master", - "rev": "f40a32b22bc96b07cb78fb5751cf92d5f30b1c24", - "revCount": 11, - "type": "git", - "url": "https://gitlab.com/obsidianical/meowsite.git" - }, - "original": { - "type": "git", - "url": "https://gitlab.com/obsidianical/meowsite.git" - } - }, - "naersk": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1655042882, - "narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=", - "owner": "nix-community", - "repo": "naersk", - "rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", - "type": "github" - } - }, - "naersk_2": { - "inputs": { - "nixpkgs": "nixpkgs_5" - }, - "locked": { - "lastModified": 1671096816, - "narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=", - "owner": "nix-community", - "repo": "naersk", - "rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "naersk", - "type": "github" - } - }, - "naersk_3": { - "inputs": { - "nixpkgs": "nixpkgs_9" - }, - "locked": { - "lastModified": 1671096816, - "narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=", - "owner": "nix-community", - "repo": "naersk", - "rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "naersk", - "type": "github" - } - }, - "nixos-hardware": { - "locked": { - "lastModified": 1686944904, - "narHash": "sha256-EDJXlYJ+JQ/xPQ+4Qr2QW647O5pc1t9iiRwSL0/8fFE=", - "owner": "networkException", - "repo": "nixos-hardware", - "rev": "3d1af7f444f37b990226a44838da3b8e00d6b61e", - "type": "github" - }, - "original": { - "owner": "networkException", - "ref": "apple-t2-init", - "repo": "nixos-hardware", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1676300157, - "narHash": "sha256-1HjRzfp6LOLfcj/HJHdVKWAkX9QRAouoh6AjzJiIerU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "545c7a31e5dedea4a6d372712a18e00ce097d462", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1687288566, - "narHash": "sha256-VckkiJ88Gzdc2cstm0z5eFcrHbvkm4VjxavHBGssvZI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "b6c73c5fe53bb3afbf65e870541e0645e9145171", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.05", - "type": "indirect" - } - }, - "nixpkgs_10": { - "locked": { - "lastModified": 1675614288, - "narHash": "sha256-i3Rc/ENnz62BcrSloeVmAyPicEh4WsrEEYR+INs9TYw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d25de6654a34d99dceb02e71e6db516b3b545be6", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1656755932, - "narHash": "sha256-TGThfOxr+HjFK464+UoUE6rClp2cwxjiKvHcBVdIGSQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "660ac43ff9ab1f12e28bfb31d4719795777fe152", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1656755932, - "narHash": "sha256-TGThfOxr+HjFK464+UoUE6rClp2cwxjiKvHcBVdIGSQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "660ac43ff9ab1f12e28bfb31d4719795777fe152", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1679966490, - "narHash": "sha256-k0jV+y1jawE6w4ZvKgXDNg4+O9NNtcaWwzw8gufv0b4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5b7cd5c39befee629be284970415b6eb3b0ff000", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1677852945, - "narHash": "sha256-liiVJjkBTuBTAkRW3hrI8MbPD2ImYzwUpa7kvteiKhM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f5ffd5787786dde3a8bf648c7a1b5f78c4e01abb", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_6": { - "locked": { - "lastModified": 1677852945, - "narHash": "sha256-liiVJjkBTuBTAkRW3hrI8MbPD2ImYzwUpa7kvteiKhM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f5ffd5787786dde3a8bf648c7a1b5f78c4e01abb", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1674407282, - "narHash": "sha256-2qwc8mrPINSFdWffPK+ji6nQ9aGnnZyHSItVcYDZDlk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ab1254087f4cdf4af74b552d7fc95175d9bdbb49", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-22.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_8": { - "locked": { - "lastModified": 1686960236, - "narHash": "sha256-AYCC9rXNLpUWzD9hm+askOfpliLEC9kwAo7ITJc4HIw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "04af42f3b31dba0ef742d254456dc4c14eedac86", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "nixpkgs_9": { - "locked": { - "lastModified": 1675614288, - "narHash": "sha256-i3Rc/ENnz62BcrSloeVmAyPicEh4WsrEEYR+INs9TYw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d25de6654a34d99dceb02e71e6db516b3b545be6", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "root": { - "inputs": { - "arion": "arion", - "easymacros": "easymacros", - "gumseite": "gumseite", - "home-manager": "home-manager", - "karton": "karton", - "mac-brcm-fw": "mac-brcm-fw", - "meowsite": "meowsite", - "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_8", - "nixpkgs-stable": "nixpkgs-stable", - "wordsofgod": "wordsofgod" - } - }, - "utils": { - "locked": { - "lastModified": 1676283394, - "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "wordsofgod": { - "inputs": { - "naersk": "naersk_3", - "nixpkgs": "nixpkgs_10", - "utils": "utils_2" - }, - "locked": { - "lastModified": 1675936524, - "narHash": "sha256-cr6lknWz+2N4mq6csfdYLUBNTxB2MbaEGH8yQyk3XbA=", - "ref": "refs/heads/master", - "rev": "93c03cbe6f7bac22c7c5023d4bcba3af837ce43b", - "revCount": 8, - "type": "git", - "url": "https://gitlab.com/obsidianical/wordsofgod.git" - }, - "original": { - "type": "git", - "url": "https://gitlab.com/obsidianical/wordsofgod.git" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix index f4ba512..07c4501 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ # nixpkgs.url = "nixpkgs/nixos-22.11"; nixpkgs-stable.url = "nixpkgs/nixos-23.05"; home-manager = { - url = "github:nix-community/home-manager"; + url = "github:nix-community/home-manager/release-22.11"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-hardware.url = "github:networkException/nixos-hardware/apple-t2-init"; diff --git a/hosts/schrottserver/configuration.nix b/hosts/schrottserver/configuration.nix index a426de4..df7eb1e 100644 --- a/hosts/schrottserver/configuration.nix +++ b/hosts/schrottserver/configuration.nix @@ -30,7 +30,7 @@ }; services = { - openssh.permitRootLogin = "no"; + openssh.permitRootLogin = "without-password"; fail2ban = { enable = true; bantime-increment.enable = true; diff --git a/hosts/schrottserver/nextcloud.nix b/hosts/schrottserver/nextcloud.nix index 9f4be80..dd4e04c 100644 --- a/hosts/schrottserver/nextcloud.nix +++ b/hosts/schrottserver/nextcloud.nix @@ -7,7 +7,7 @@ dbuser = "nextcloud"; dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself dbname = "nextcloud"; - adminpassFile = "${../secret-data/nextcloud-admin-pass}"; + adminpassFile = "${../../secret-data/nextcloud-admin-pass}"; adminuser = "root"; }; package = pkgs.nextcloud25; diff --git a/hosts/schrottserver/penpot.nix b/hosts/schrottserver/penpot.nix index 865f6ec..2e7f227 100644 --- a/hosts/schrottserver/penpot.nix +++ b/hosts/schrottserver/penpot.nix @@ -33,7 +33,7 @@ "PENPOT_SMTP_HOST" = "smtp.migadu.com"; "PENPOT_SMTP_PORT" = "587"; "PENPOT_SMTP_USERNAME" = "noreply-pp@schrottkatze.de"; - "PENPOT_SMTP_PASSWORD" = "${builtins.readFile ../secret-data/penpot-smtp-pass}"; + "PENPOT_SMTP_PASSWORD" = "${builtins.readFile ../../secret-data/penpot-smtp-pass}"; "PENPOT_SMTP_TLS" = "true"; "PENPOT_SMTP_SSL" = "false"; }; diff --git a/hosts/schrottserver/vaultwarden.nix b/hosts/schrottserver/vaultwarden.nix index a581d0f..a9b4edf 100644 --- a/hosts/schrottserver/vaultwarden.nix +++ b/hosts/schrottserver/vaultwarden.nix @@ -13,7 +13,7 @@ SIGNUPS_VERIFY = true; ROCKET_LOG = "debug"; ENABLE_WAL = false; - ADMIN_TOKEN = builtins.readFile ../secret-data/vaultwarden-admin-token; + ADMIN_TOKEN = builtins.readFile ../../secret-data/vaultwarden-admin-token; DOMAIN = "https://vw.schrottkatze.de"; SMTP_TIMEOUT = 15; ROCKET_PORT = 8812; From a60f9016d16dd5b7421d98b63eb17c4185d8b3e2 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Mon, 25 Sep 2023 19:30:57 +0200 Subject: [PATCH 2/8] flake.lock: Add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Added input 'arion': 'github:hercules-ci/arion/28902d348807c494115177595f812a3e54cc913b' (2023-08-23) • Added input 'arion/flake-parts': 'github:hercules-ci/flake-parts/47478a4a003e745402acf63be7f9a092d51b83d7' (2023-02-09) • Added input 'arion/flake-parts/nixpkgs-lib': follows 'arion/nixpkgs' • Added input 'arion/haskell-flake': 'github:srid/haskell-flake/c2cafce9d57bfca41794dc3b99c593155006c71e' (2023-02-02) • Added input 'arion/hercules-ci-effects': 'github:hercules-ci/hercules-ci-effects/0a63bfa3f00a3775ea3a6722b247880f1ffe91ce' (2023-07-15) • Added input 'arion/hercules-ci-effects/flake-parts': 'github:hercules-ci/flake-parts/8e8d955c22df93dbe24f19ea04f47a74adbdc5ec' (2023-07-04) • Added input 'arion/hercules-ci-effects/flake-parts/nixpkgs-lib': 'github:NixOS/nixpkgs/4bc72cae107788bf3f24f30db2e2f685c9298dc9?dir=lib' (2023-06-29) • Added input 'arion/hercules-ci-effects/hercules-ci-agent': 'github:hercules-ci/hercules-ci-agent/367dd8cd649b57009a6502e878005a1e54ad78c5' (2023-07-05) • Added input 'arion/hercules-ci-effects/hercules-ci-agent/flake-parts': 'github:hercules-ci/flake-parts/8e8d955c22df93dbe24f19ea04f47a74adbdc5ec' (2023-07-04) • Added input 'arion/hercules-ci-effects/hercules-ci-agent/flake-parts/nixpkgs-lib': follows 'arion/hercules-ci-effects/hercules-ci-agent/nixpkgs' • Added input 'arion/hercules-ci-effects/hercules-ci-agent/haskell-flake': 'github:srid/haskell-flake/74210fa80a49f1b6f67223debdbf1494596ff9f2' (2023-05-22) • Added input 'arion/hercules-ci-effects/hercules-ci-agent/nixpkgs': 'github:NixOS/nixpkgs/0fbe93c5a7cac99f90b60bdf5f149383daaa615f' (2023-07-02) • Added input 'arion/hercules-ci-effects/nixpkgs': follows 'arion/nixpkgs' • Added input 'arion/nixpkgs': 'github:NixOS/nixpkgs/545c7a31e5dedea4a6d372712a18e00ce097d462' (2023-02-13) • Added input 'easymacros': 'git+https://gitlab.com/obsidianical/easymacros.git?ref=refs/heads/main&rev=43405b3bcf786513adc6534ed0e6618c458ba2cb' (2022-09-07) • Added input 'easymacros/flake-utils': 'github:numtide/flake-utils/bee6a7250dd1b01844a2de7e02e4df7d8a0a206c' (2022-06-24) • Added input 'easymacros/naersk': 'github:nix-community/naersk/cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f' (2022-06-12) • Added input 'easymacros/naersk/nixpkgs': 'github:NixOS/nixpkgs/660ac43ff9ab1f12e28bfb31d4719795777fe152' (2022-07-02) • Added input 'easymacros/nixpkgs': 'github:NixOS/nixpkgs/660ac43ff9ab1f12e28bfb31d4719795777fe152' (2022-07-02) • Added input 'gumseite': 'git+https://gitlab.com/schrottkatze/gum-schulsachen.git?ref=refs/heads/master&rev=57f43b774151e34bbf3de5f159924aca93750561' (2023-03-30) • Added input 'gumseite/flake-utils': 'github:numtide/flake-utils/93a2b84fc4b70d9e089d029deacc3583435c2ed6' (2023-03-15) • Added input 'gumseite/nixpkgs': 'github:NixOS/nixpkgs/5b7cd5c39befee629be284970415b6eb3b0ff000' (2023-03-28) • Added input 'home-manager': 'github:nix-community/home-manager/b372d7f8d5518aaba8a4058a453957460481afbc' (2023-05-29) • Added input 'home-manager/nixpkgs': follows 'nixpkgs' • Added input 'home-manager/utils': 'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02) • Added input 'karton': 'git+https://gitlab.com/obsidianical/microbin.git?ref=refs/heads/master&rev=5002f11bf360e4508fc73c28fa0aa0f80bf0713d' (2023-05-03) • Added input 'karton/naersk': 'github:nix-community/naersk/d998160d6a076cfe8f9741e56aeec7e267e3e114' (2022-12-15) • Added input 'karton/naersk/nixpkgs': 'github:NixOS/nixpkgs/f5ffd5787786dde3a8bf648c7a1b5f78c4e01abb' (2023-03-03) • Added input 'karton/nixpkgs': 'github:NixOS/nixpkgs/f5ffd5787786dde3a8bf648c7a1b5f78c4e01abb' (2023-03-03) • Added input 'karton/utils': 'github:numtide/flake-utils/3db36a8b464d0c4532ba1c7dda728f4576d6d073' (2023-02-13) • Added input 'mac-brcm-fw': 'path:./mac-brcm-fw?lastModified=1&narHash=sha256-ewzM8IBKNFCx73ah5rflcdx605ukRF3oTWwih2CTsvs%3D' (1970-01-01) • Added input 'meowsite': 'git+https://gitlab.com/obsidianical/meowsite.git?ref=refs/heads/master&rev=f40a32b22bc96b07cb78fb5751cf92d5f30b1c24' (2023-03-15) • Added input 'meowsite/flake-utils': 'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02) • Added input 'meowsite/nixpkgs': 'github:NixOS/nixpkgs/ab1254087f4cdf4af74b552d7fc95175d9bdbb49' (2023-01-22) • Added input 'nixos-hardware': 'github:networkException/nixos-hardware/8e28b9ee431b265d1fc74b8b819ea0816344c4a1' (2023-06-27) • Added input 'nixpkgs': 'github:NixOS/nixpkgs/e35dcc04a3853da485a396bdd332217d0ac9054f' (2023-09-22) • Added input 'nixpkgs-stable': 'github:NixOS/nixpkgs/261abe8a44a7e8392598d038d2e01f7b33cf26d0' (2023-09-24) • Added input 'wordsofgod': 'git+https://gitlab.com/obsidianical/wordsofgod.git?ref=refs/heads/master&rev=93c03cbe6f7bac22c7c5023d4bcba3af837ce43b' (2023-02-09) • Added input 'wordsofgod/naersk': 'github:nix-community/naersk/d998160d6a076cfe8f9741e56aeec7e267e3e114' (2022-12-15) • Added input 'wordsofgod/naersk/nixpkgs': 'github:NixOS/nixpkgs/d25de6654a34d99dceb02e71e6db516b3b545be6' (2023-02-05) • Added input 'wordsofgod/nixpkgs': 'github:NixOS/nixpkgs/d25de6654a34d99dceb02e71e6db516b3b545be6' (2023-02-05) • Added input 'wordsofgod/utils': 'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02) --- flake.lock | 670 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 670 insertions(+) create mode 100644 flake.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8c768e5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,670 @@ +{ + "nodes": { + "arion": { + "inputs": { + "flake-parts": "flake-parts", + "haskell-flake": "haskell-flake", + "hercules-ci-effects": "hercules-ci-effects", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1692787336, + "narHash": "sha256-WabgeYsUiMRbpb1bCT3oY6GJEciZQIf3tYD8RQAUf2c=", + "owner": "hercules-ci", + "repo": "arion", + "rev": "28902d348807c494115177595f812a3e54cc913b", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "arion", + "type": "github" + } + }, + "easymacros": { + "inputs": { + "flake-utils": "flake-utils", + "naersk": "naersk", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1662552013, + "narHash": "sha256-ENoDCKs6gKcGYa06LhCVhro0FVntcy5GBvShS+TPvMY=", + "ref": "refs/heads/main", + "rev": "43405b3bcf786513adc6534ed0e6618c458ba2cb", + "revCount": 38, + "type": "git", + "url": "https://gitlab.com/obsidianical/easymacros.git" + }, + "original": { + "type": "git", + "url": "https://gitlab.com/obsidianical/easymacros.git" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "arion", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1675933616, + "narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "47478a4a003e745402acf63be7f9a092d51b83d7", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1688466019, + "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": [ + "arion", + "hercules-ci-effects", + "hercules-ci-agent", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688466019, + "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1656065134, + "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "id": "flake-utils", + "type": "indirect" + } + }, + "flake-utils_3": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "id": "flake-utils", + "type": "indirect" + } + }, + "gumseite": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1680175611, + "narHash": "sha256-0VevgW7qjE3rDSudFr/XIQrMmPowDgLO9jkM4AFkR/o=", + "ref": "refs/heads/master", + "rev": "57f43b774151e34bbf3de5f159924aca93750561", + "revCount": 2, + "type": "git", + "url": "https://gitlab.com/schrottkatze/gum-schulsachen.git" + }, + "original": { + "type": "git", + "url": "https://gitlab.com/schrottkatze/gum-schulsachen.git" + } + }, + "haskell-flake": { + "locked": { + "lastModified": 1675296942, + "narHash": "sha256-u1X1sblozi5qYEcLp1hxcyo8FfDHnRUVX3dJ/tW19jY=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "c2cafce9d57bfca41794dc3b99c593155006c71e", + "type": "github" + }, + "original": { + "owner": "srid", + "ref": "0.1.0", + "repo": "haskell-flake", + "type": "github" + } + }, + "haskell-flake_2": { + "locked": { + "lastModified": 1684780604, + "narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2", + "type": "github" + }, + "original": { + "owner": "srid", + "ref": "0.3.0", + "repo": "haskell-flake", + "type": "github" + } + }, + "hercules-ci-agent": { + "inputs": { + "flake-parts": "flake-parts_3", + "haskell-flake": "haskell-flake_2", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1688568579, + "narHash": "sha256-ON0M56wtY/TIIGPkXDlJboAmuYwc73Hi8X9iJGtxOhM=", + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "rev": "367dd8cd649b57009a6502e878005a1e54ad78c5", + "type": "github" + }, + "original": { + "id": "hercules-ci-agent", + "type": "indirect" + } + }, + "hercules-ci-effects": { + "inputs": { + "flake-parts": "flake-parts_2", + "hercules-ci-agent": "hercules-ci-agent", + "nixpkgs": [ + "arion", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1689397210, + "narHash": "sha256-fVxZnqxMbsDkB4GzGAs/B41K0wt/e+B/fLxmTFF/S20=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "0a63bfa3f00a3775ea3a6722b247880f1ffe91ce", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1685325875, + "narHash": "sha256-tevlLIMPeVNNYPd9UgjHApAUoFAnw9iohqUyj+LPp88=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "b372d7f8d5518aaba8a4058a453957460481afbc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-22.11", + "repo": "home-manager", + "type": "github" + } + }, + "karton": { + "inputs": { + "naersk": "naersk_2", + "nixpkgs": "nixpkgs_7", + "utils": "utils_2" + }, + "locked": { + "lastModified": 1683146576, + "narHash": "sha256-ZaXE/mmVWgZkfnlY56PFuuCMDyUhNtkKuLzkle6Lg8s=", + "ref": "refs/heads/master", + "rev": "5002f11bf360e4508fc73c28fa0aa0f80bf0713d", + "revCount": 188, + "type": "git", + "url": "https://gitlab.com/obsidianical/microbin.git" + }, + "original": { + "type": "git", + "url": "https://gitlab.com/obsidianical/microbin.git" + } + }, + "mac-brcm-fw": { + "flake": false, + "locked": { + "lastModified": 1, + "narHash": "sha256-ewzM8IBKNFCx73ah5rflcdx605ukRF3oTWwih2CTsvs=", + "path": "./mac-brcm-fw", + "type": "path" + }, + "original": { + "path": "./mac-brcm-fw", + "type": "path" + } + }, + "meowsite": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_8" + }, + "locked": { + "lastModified": 1678920998, + "narHash": "sha256-YM7MdYYoL/Wgmg8nmMVnAm33WwzdA2JFwMHKfOxNBXs=", + "ref": "refs/heads/master", + "rev": "f40a32b22bc96b07cb78fb5751cf92d5f30b1c24", + "revCount": 11, + "type": "git", + "url": "https://gitlab.com/obsidianical/meowsite.git" + }, + "original": { + "type": "git", + "url": "https://gitlab.com/obsidianical/meowsite.git" + } + }, + "naersk": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1655042882, + "narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=", + "owner": "nix-community", + "repo": "naersk", + "rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, + "naersk_2": { + "inputs": { + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1671096816, + "narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=", + "owner": "nix-community", + "repo": "naersk", + "rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "naersk", + "type": "github" + } + }, + "naersk_3": { + "inputs": { + "nixpkgs": "nixpkgs_10" + }, + "locked": { + "lastModified": 1671096816, + "narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=", + "owner": "nix-community", + "repo": "naersk", + "rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "naersk", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1687903496, + "narHash": "sha256-4PPwbFM4dNqso3zBya5rgfRvnBoIbN2J7qZ2ZpRyOUc=", + "owner": "networkException", + "repo": "nixos-hardware", + "rev": "8e28b9ee431b265d1fc74b8b819ea0816344c4a1", + "type": "github" + }, + "original": { + "owner": "networkException", + "ref": "apple-t2-init", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1688322751, + "narHash": "sha256-eW62dC5f33oKZL7VWlomttbUnOTHrAbte9yNUNW8rbk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0fbe93c5a7cac99f90b60bdf5f149383daaa615f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1688049487, + "narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1695559356, + "narHash": "sha256-kXZ1pUoImD9OEbPCwpTz4tHsNTr4CIyIfXb3ocuR8sI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "261abe8a44a7e8392598d038d2e01f7b33cf26d0", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-23.05", + "type": "indirect" + } + }, + "nixpkgs_10": { + "locked": { + "lastModified": 1675614288, + "narHash": "sha256-i3Rc/ENnz62BcrSloeVmAyPicEh4WsrEEYR+INs9TYw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d25de6654a34d99dceb02e71e6db516b3b545be6", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1675614288, + "narHash": "sha256-i3Rc/ENnz62BcrSloeVmAyPicEh4WsrEEYR+INs9TYw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d25de6654a34d99dceb02e71e6db516b3b545be6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1676300157, + "narHash": "sha256-1HjRzfp6LOLfcj/HJHdVKWAkX9QRAouoh6AjzJiIerU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "545c7a31e5dedea4a6d372712a18e00ce097d462", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1656755932, + "narHash": "sha256-TGThfOxr+HjFK464+UoUE6rClp2cwxjiKvHcBVdIGSQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "660ac43ff9ab1f12e28bfb31d4719795777fe152", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1656755932, + "narHash": "sha256-TGThfOxr+HjFK464+UoUE6rClp2cwxjiKvHcBVdIGSQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "660ac43ff9ab1f12e28bfb31d4719795777fe152", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1679966490, + "narHash": "sha256-k0jV+y1jawE6w4ZvKgXDNg4+O9NNtcaWwzw8gufv0b4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5b7cd5c39befee629be284970415b6eb3b0ff000", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1677852945, + "narHash": "sha256-liiVJjkBTuBTAkRW3hrI8MbPD2ImYzwUpa7kvteiKhM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f5ffd5787786dde3a8bf648c7a1b5f78c4e01abb", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1677852945, + "narHash": "sha256-liiVJjkBTuBTAkRW3hrI8MbPD2ImYzwUpa7kvteiKhM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f5ffd5787786dde3a8bf648c7a1b5f78c4e01abb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1674407282, + "narHash": "sha256-2qwc8mrPINSFdWffPK+ji6nQ9aGnnZyHSItVcYDZDlk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ab1254087f4cdf4af74b552d7fc95175d9bdbb49", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1695360818, + "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "arion": "arion", + "easymacros": "easymacros", + "gumseite": "gumseite", + "home-manager": "home-manager", + "karton": "karton", + "mac-brcm-fw": "mac-brcm-fw", + "meowsite": "meowsite", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs_9", + "nixpkgs-stable": "nixpkgs-stable", + "wordsofgod": "wordsofgod" + } + }, + "utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { + "locked": { + "lastModified": 1676283394, + "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_3": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "wordsofgod": { + "inputs": { + "naersk": "naersk_3", + "nixpkgs": "nixpkgs_11", + "utils": "utils_3" + }, + "locked": { + "lastModified": 1675936524, + "narHash": "sha256-cr6lknWz+2N4mq6csfdYLUBNTxB2MbaEGH8yQyk3XbA=", + "ref": "refs/heads/master", + "rev": "93c03cbe6f7bac22c7c5023d4bcba3af837ce43b", + "revCount": 8, + "type": "git", + "url": "https://gitlab.com/obsidianical/wordsofgod.git" + }, + "original": { + "type": "git", + "url": "https://gitlab.com/obsidianical/wordsofgod.git" + } + } + }, + "root": "root", + "version": 7 +} From e38fd6218183df97e33b38bd9269792f71deaade Mon Sep 17 00:00:00 2001 From: Jade Date: Mon, 25 Sep 2023 19:32:00 +0200 Subject: [PATCH 3/8] Meow --- flake.lock | 0 haskell/xmonad/xmonad.hs | 305 ++++++++++++++++----------------------- 2 files changed, 121 insertions(+), 184 deletions(-) create mode 100644 flake.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e69de29 diff --git a/haskell/xmonad/xmonad.hs b/haskell/xmonad/xmonad.hs index 388ebe6..4ae9561 100644 --- a/haskell/xmonad/xmonad.hs +++ b/haskell/xmonad/xmonad.hs @@ -20,13 +20,15 @@ import qualified Data.Map as M import XMonad.Layout.Spacing import XMonad.Layout.Tabbed +import XMonad.Actions.KeyRemap + import XMonad.Prompt import XMonad.Prompt.Layout -- The preferred terminal program, which is used in a binding below and by -- certain contrib modules. -- -myTerminal = "kitty" +myTerminal = "kitty" -- Whether focus follows the mouse pointer. myFocusFollowsMouse :: Bool @@ -38,14 +40,14 @@ myClickJustFocuses = False -- Width of the window border in pixels. -- -myBorderWidth = 2 +myBorderWidth = 2 -- modMask lets you specify which modkey you want to use. The default -- is mod1Mask ("left alt"). You may also consider using mod3Mask -- ("right alt"), which does not conflict with emacs keybindings. The -- "windows key" is usually mod4Mask. -- -myModMask = mod4Mask +myModMask = mod4Mask -- The default number of workspaces (virtual screens) and their names. -- By default we use numeric strings, but any string may be used as a @@ -56,117 +58,102 @@ myModMask = mod4Mask -- -- > workspaces = ["web", "irc", "code" ] ++ map show [4..9] -- -myWorkspaces = ["comms","browser","3","4","5","6","7","8","9"] +myWorkspaces = ["comms","browser","3","4","5","6","7","8","9"] -- Border colors for unfocused and focused windows, respectively. -- myNormalBorderColor = "#3c3836" myFocusedBorderColor = "#504945" +myRemaps = KeymapTable [ ((0, xK_a), (0, xK_b)) ] + ------------------------------------------------------------------------ -- Key bindings. Add, modify or remove key bindings here. -- myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ + [ ((modm, xK_Return), spawn $ XMonad.terminal conf) + , ((modm .|. shiftMask, xK_q), kill) + -- Rotate through the available layout algorithms + , ((modm, xK_space ), sendMessage NextLayout) + -- rofiing + , ((modm, xK_d), spawn "rofi -show drun") + , ((modm .|. shiftMask, xK_e), spawn "rofi -show \"desktopctl\" -modes \"desktopctl:$(which desktopctl)\"") + , ((modm, xK_m), spawn "menu-qalc") + , ((modm, xK_i), spawn "rofimoji -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy") + -- screenshotting + -- TODO: Fix/rewrite window-screenshot.sh + , ((modm, xK_w), spawn "window-screenshot.sh") + , ((modm, xK_s), spawn "flameshot gui -c -p $HOME/Pictures/screenshots") + , ((modm, xK_a), spawn "flameshot screen -c -p $HOME/Pictures/screenshots") + , ((modm, xK_t), spawn "ocr-screenshot.sh") - [ ((modm, xK_Return), spawn $ XMonad.terminal conf) - , ((modm .|. shiftMask, xK_q), kill) - -- Rotate through the available layout algorithms - , ((modm, xK_space ), sendMessage NextLayout) - - -- rofiing - , ((modm, xK_d), spawn "rofi -show drun") - , ((modm .|. shiftMask, xK_e), spawn "rofi -show \"desktopctl\" -modes \"desktopctl:$(which desktopctl)\"") - , ((modm, xK_m), spawn "menu-qalc") - , ((modm, xK_i), spawn "rofimoji -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy") - - -- screenshotting - -- TODO: Fix/rewrite window-screenshot.sh - , ((modm, xK_w), spawn "window-screenshot.sh") - , ((modm, xK_s), spawn "flameshot gui -c -p $HOME/Pictures/screenshots") - , ((modm, xK_a), spawn "flameshot screen -c -p $HOME/Pictures/screenshots") - , ((modm, xK_t), spawn "ocr-screenshot.sh") - - -- Reset the layouts on the current workspace to default - -- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) - -- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) - -- Push window back into tiling - , ((modm .|. shiftMask, xK_space ), withFocused $ windows . W.sink) - - - -- Resize viewed windows to the correct size - , ((modm, xK_n ), refresh) - - -- Move focus to the next window - , ((modm, xK_Tab ), layoutPrompt def) - - -- Move focus - , ((modm, xK_j ), windows W.focusDown) - , ((modm, xK_k ), windows W.focusUp ) - - -- Swap the focused window with the next window - , ((modm .|. shiftMask, xK_j ), windows W.swapDown ) - , ((modm .|. shiftMask, xK_k ), windows W.swapUp ) - - -- Shrink the master area - , ((modm, xK_h ), sendMessage Shrink) - , ((modm, xK_l ), sendMessage Expand) - - -- Increment the number of windows in the master area - , ((modm , xK_comma ), sendMessage (IncMasterN 1)) - , ((modm , xK_period), sendMessage (IncMasterN (-1))) - - -- Toggle the status bar gap - -- Use this binding with avoidStruts from Hooks.ManageDocks. - -- See also the statusBar function from Hooks.DynamicLog. - -- - -- , ((modm , xK_b ), sendMessage ToggleStruts) - - --, ((modm .|. shiftMask, xK_e ), io (exitWith ExitSuccess)) - - -- Restart xmonad - --, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart") - - -- Run xmessage with a summary of the default keybindings (useful for beginners) - , ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -")) - ] - ++ - - -- - -- mod-[1..9], Switch to workspace N - -- mod-shift-[1..9], Move client to workspace N - -- - [((m .|. modm, k), windows $ f i) - | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] - , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] - ++ - - -- - -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3 - -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3 - -- - [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) - | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] - , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] + -- Reset the layouts on the current workspace to default + -- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) + -- , ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) + -- Push window back into tiling + , ((modm .|. shiftMask, xK_space ), withFocused $ windows . W.sink) + -- Resize viewed windows to the correct size + , ((modm, xK_n ), refresh) + -- Move focus to the next window + , ((modm, xK_Tab ), layoutPrompt def) + -- Move focus + , ((modm, xK_j ), windows W.focusDown) + , ((modm, xK_k ), windows W.focusUp ) + -- Swap the focused window with the next window + , ((modm .|. shiftMask, xK_j ), windows W.swapDown ) + , ((modm .|. shiftMask, xK_k ), windows W.swapUp ) + -- Shrink the master area + , ((modm, xK_h ), sendMessage Shrink) + , ((modm, xK_l ), sendMessage Expand) + -- Increment the number of windows in the master area + , ((modm , xK_comma ), sendMessage (IncMasterN 1)) + , ((modm , xK_period), sendMessage (IncMasterN (-1))) + -- Toggle the status bar gap + -- Use this binding with avoidStruts from Hooks.ManageDocks. + -- See also the statusBar function from Hooks.DynamicLog. + -- + -- , ((modm , xK_b ), sendMessage ToggleStruts) + --, ((modm .|. shiftMask, xK_e ), io (exitWith ExitSuccess)) + -- Restart xmonad + --, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart") + -- Run xmessage with a summary of the default keybindings (useful for beginners) + -- , ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -")) + ] + ++ + -- + -- mod-[1..9], Switch to workspace N + -- mod-shift-[1..9], Move client to workspace N + -- + [((m .|. modm, k), windows $ f i) + | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] + , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] + ++ + -- + -- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3 + -- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3 + -- + [((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) + | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] + , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] ------------------------------------------------------------------------ -- Mouse bindings: default actions bound to mouse events -- myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $ + -- mod-button1, Set the window to floating mode and move by dragging + [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w + >> windows W.shiftMaster)) - -- mod-button1, Set the window to floating mode and move by dragging - [ ((modm, button1), (\w -> focus w >> mouseMoveWindow w - >> windows W.shiftMaster)) + -- mod-button2, Raise the window to the top of the stack + , ((modm, button2), (\w -> focus w >> windows W.shiftMaster)) - -- mod-button2, Raise the window to the top of the stack - , ((modm, button2), (\w -> focus w >> windows W.shiftMaster)) + -- mod-button3, Set the window to floating mode and resize by dragging + , ((modm, button3), (\w -> focus w >> mouseResizeWindow w + >> windows W.shiftMaster)) - -- mod-button3, Set the window to floating mode and resize by dragging - , ((modm, button3), (\w -> focus w >> mouseResizeWindow w - >> windows W.shiftMaster)) - - -- you may also bind events to the mouse scroll wheel (button4 and button5) - ] + -- you may also bind events to the mouse scroll wheel (button4 and button5) + ] ------------------------------------------------------------------------ -- Layouts: @@ -180,16 +167,16 @@ myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $ -- which denotes layout choice. tabCfg = def - { activeColor = "#282828" - , inactiveColor = "#1d2021" - , urgentColor = "#9d0006" - , activeBorderColor = "#504945" - , inactiveBorderColor = "#3c3836" - , urgentBorderColor = "#cc241d" - , activeTextColor = "#ebdbb2" - , inactiveTextColor = "#bdae93" - , urgentTextColor = "#ebdbb2" - } + { activeColor = "#282828" + , inactiveColor = "#1d2021" + , urgentColor = "#9d0006" + , activeBorderColor = "#504945" + , inactiveBorderColor = "#3c3836" + , urgentBorderColor = "#cc241d" + , activeTextColor = "#ebdbb2" + , inactiveTextColor = "#bdae93" + , urgentTextColor = "#ebdbb2" + } myLayout = tiled ||| tabbed shrinkText tabCfg ||| Mirror tiled where -- default tiling algorithm partitions the screen into two panes @@ -220,10 +207,10 @@ myLayout = tiled ||| tabbed shrinkText tabCfg ||| Mirror tiled -- 'className' and 'resource' are used below. -- myManageHook = composeAll - [ className =? "MPlayer" --> doFloat - , className =? "Gimp" --> doFloat - , resource =? "desktop_window" --> doIgnore - , resource =? "kdesktop" --> doIgnore ] + [ className =? "MPlayer" --> doFloat + , className =? "Gimp" --> doFloat + , resource =? "desktop_window" --> doIgnore + , resource =? "kdesktop" --> doIgnore ] ------------------------------------------------------------------------ -- Event handling @@ -253,11 +240,12 @@ myLogHook = return () -- -- By default, do nothing. myStartupHook = do - spawn "pkill oneko; oneko -tofocus -tora -position +-1+5 -fg palevioletred3 -bg pink -name 'Rose the desktop kitty'" - --spawn "pkill polybar; polybar" - spawn "pkill volumeicon; volumeicon" - spawn "pkill nm-applet; nm-applet" - spawn "mullvad-vpn --background" + spawn "pkill oneko; oneko -tofocus -tora -position +-1+5 -fg palevioletred3 -bg pink -name 'Rose the desktop kitty'" + --spawn "pkill polybar; polybar" + spawn "pkill volumeicon; volumeicon" + spawn "pkill nm-applet; nm-applet" + spawn "mullvad-vpn --background" + setDefaultKeyRemap myRemaps [myRemaps] ------------------------------------------------------------------------ -- Now run xmonad with all the defaults we set up. @@ -274,74 +262,23 @@ main = xmonad $ withEasySB mySB defToggleStrutsKey defaults -- No need to modify this. -- defaults = def - -- simple stuff - { terminal = myTerminal - , focusFollowsMouse = myFocusFollowsMouse - , clickJustFocuses = myClickJustFocuses - , borderWidth = myBorderWidth - , modMask = myModMask - , workspaces = myWorkspaces - , normalBorderColor = myNormalBorderColor - , focusedBorderColor = myFocusedBorderColor - - -- key bindings - , keys = myKeys - , mouseBindings = myMouseBindings - -- hooks, layouts - , layoutHook = spacingRaw True (Border 0 0 0 0) True (Border 7 7 7 7) True $ myLayout - , manageHook = myManageHook - , handleEventHook = myEventHook - , logHook = myLogHook - , startupHook = myStartupHook - } - --- | Finally, a copy of the default bindings in simple textual tabular format. -help :: String -help = unlines ["The default modifier key is 'alt'. Default keybindings:", - "", - "-- launching and killing programs", - "mod-Shift-Enter Launch xterminal", - "mod-p Launch dmenu", - "mod-Shift-p Launch gmrun", - "mod-Shift-c Close/kill the focused window", - "mod-Space Rotate through the available layout algorithms", - "mod-Shift-Space Reset the layouts on the current workSpace to default", - "mod-n Resize/refresh viewed windows to the correct size", - "", - "-- move focus up or down the window stack", - "mod-Tab Move focus to the next window", - "mod-Shift-Tab Move focus to the previous window", - "mod-j Move focus to the next window", - "mod-k Move focus to the previous window", - "mod-m Move focus to the master window", - "", - "-- modifying the window order", - "mod-Return Swap the focused window and the master window", - "mod-Shift-j Swap the focused window with the next window", - "mod-Shift-k Swap the focused window with the previous window", - "", - "-- resizing the master/slave ratio", - "mod-h Shrink the master area", - "mod-l Expand the master area", - "", - "-- floating layer support", - "mod-t Push window back into tiling; unfloat and re-tile it", - "", - "-- increase or decrease number of windows in the master area", - "mod-comma (mod-,) Increment the number of windows in the master area", - "mod-period (mod-.) Deincrement the number of windows in the master area", - "", - "-- quit, or restart", - "mod-Shift-q Quit xmonad", - "mod-q Restart xmonad", - "mod-[1..9] Switch to workSpace N", - "", - "-- Workspaces & screens", - "mod-Shift-[1..9] Move client to workspace N", - "mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3", - "mod-Shift-{w,e,r} Move client to screen 1, 2, or 3", - "", - "-- Mouse bindings: default actions bound to mouse events", - "mod-button1 Set the window to floating mode and move by dragging", - "mod-button2 Raise the window to the top of the stack", - "mod-button3 Set the window to floating mode and resize by dragging"] + -- simple stuff + { terminal = myTerminal + , focusFollowsMouse = myFocusFollowsMouse + , clickJustFocuses = myClickJustFocuses + , borderWidth = myBorderWidth + , modMask = myModMask + , workspaces = myWorkspaces + , normalBorderColor = myNormalBorderColor + , focusedBorderColor = myFocusedBorderColor + -- key bindings + , keys = myKeys ++ buildKeyRemapBindings [emptyKeyRemap] + -- , keys = myKeys + , mouseBindings = myMouseBindings + -- hooks, layouts + , layoutHook = spacingRaw True (Border 0 0 0 0) True (Border 7 7 7 7) True $ myLayout + , manageHook = myManageHook + , handleEventHook = myEventHook + , logHook = myLogHook + , startupHook = myStartupHook + } From 8475640b1deff0add1f8df8c08a28962aaba966b Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Mon, 25 Sep 2023 19:47:23 +0200 Subject: [PATCH 4/8] remove ripgrep...? --- modules/desktop/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index ca4bd97..6770f2b 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -172,9 +172,6 @@ in with lib; { source ${pkgs.nu_scripts}/share/nu_scripts/modules/nix/nix.nu; ''; }; - programs.ripgrep = { - enable = true; - }; services.dunst = { enable = true; settings = { From 1e4e46dfd7a2135a44a6c3c5ba7ca814c7ceab82 Mon Sep 17 00:00:00 2001 From: Jade Date: Mon, 25 Sep 2023 19:47:34 +0200 Subject: [PATCH 5/8] grrr --- hosts/monosodium-glutamate-g/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/monosodium-glutamate-g/configuration.nix b/hosts/monosodium-glutamate-g/configuration.nix index dee73a9..0c0f11b 100644 --- a/hosts/monosodium-glutamate-g/configuration.nix +++ b/hosts/monosodium-glutamate-g/configuration.nix @@ -57,7 +57,7 @@ # latest linux kernel #boot.kernelPackages = pkgs.linuxPackages_latest; #boot.kernelPackages = pkgs.linux_zen_xeniafied; - boot.kernelPackages = pkgs.linuxPackages_zen; + kernelPackages = pkgs.linuxPackages_zen; # boot.kernelPatches = [ # { # name = "fomx"; From a15428963ceedaffeb990b4a6179ebcd485567d6 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Mon, 25 Sep 2023 20:11:47 +0200 Subject: [PATCH 6/8] AAAAAAAAAAAAAAAAAAAAAAAAAAAAAa --- flake.nix | 2 +- hosts/catbook-j/configuration.nix | 46 +++++++++++++++---------------- modules/desktop/default.nix | 5 ---- modules/helix.nix | 25 +++++++---------- modules/zellij.nix | 1 - 5 files changed, 34 insertions(+), 45 deletions(-) diff --git a/flake.nix b/flake.nix index 6d9d40c..c995e65 100644 --- a/flake.nix +++ b/flake.nix @@ -55,7 +55,7 @@ home-manager.useUserPackages = true; home-manager.users.jade = { nixosConfig, pkgs, ... }: { home.sessionVariables.TZ = nixosConfig.time.timeZone; - home.stateVersion = "${nixosConfig.system.stateVersion}"; + home.stateVersion = "22.11"; }; } ]; diff --git a/hosts/catbook-j/configuration.nix b/hosts/catbook-j/configuration.nix index 2db92c3..870e47c 100644 --- a/hosts/catbook-j/configuration.nix +++ b/hosts/catbook-j/configuration.nix @@ -82,31 +82,31 @@ in { }; }; - nixpkgs = { - overlays = [ - (self: super: { - linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override { - structuredExtraConfig = with lib.kernel; { - "FB" = yes; - "FRAMEBUFFER_CONSOLE" = yes; - "VGA_CONSOLE" = yes; - "VIDEO_SELECT" = yes; - LOGO = lib.mkForce yes; - LOGO_LINUX_CLUT224 = yes; - }; - ignoreConfigErrors = true; - }); - }) - ]; - }; + # nixpkgs = { + # overlays = [ + # (self: super: { + # linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override { + # structuredExtraConfig = with lib.kernel; { + # "FB" = yes; + # "FRAMEBUFFER_CONSOLE" = yes; + # "VGA_CONSOLE" = yes; + # "VIDEO_SELECT" = yes; + # LOGO = lib.mkForce yes; + # LOGO_LINUX_CLUT224 = yes; + # }; + # ignoreConfigErrors = true; + # }); + # }) + # ]; + # }; boot.kernelPackages = pkgs.linuxPackages_zen; - boot.kernelPatches = [ - { - name = "fomx"; - patch = ../../other/0001-fomx.patch; - } - ]; + # boot.kernelPatches = [ + # { + # name = "fomx"; + # patch = ../../other/0001-fomx.patch; + # } + # ]; services.xserver.displayManager.autoLogin = { enable = true; diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 6770f2b..2e439f6 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -153,17 +153,12 @@ in with lib; { notifications.x11.enable = true; notifications.test = true; }; - services.colord.enable = true; home-manager.users.jade = { pkgs, ... }: { programs.bat = { # TODO: more config enable = true; }; - programs.exa = { - # TODO: more config - enable = true; - }; programs.nushell = { enable = true; package = config.users.defaultUserShell; diff --git a/modules/helix.nix b/modules/helix.nix index bbd8cb6..737fe80 100644 --- a/modules/helix.nix +++ b/modules/helix.nix @@ -30,21 +30,16 @@ in with lib; { space."=" = ":fmt"; }; }; - languages = { - language = [ - { - name = "rust"; - } - { - name = "php"; - file-types = [ "php" ]; - language-server = { - command = "psalm"; - args = ["--language-server"]; - }; - } - ]; - }; + languages = [ + { + name = "php"; + file-types = [ "php" ]; + language-server = { + command = "psalm"; + args = ["--language-server"]; + }; + } + ]; }; }; }; diff --git a/modules/zellij.nix b/modules/zellij.nix index 71edc1a..2e45cd6 100644 --- a/modules/zellij.nix +++ b/modules/zellij.nix @@ -8,7 +8,6 @@ in with lib; { home-manager.users.jade = { pkgs, ... }: { programs.zellij = { enable = true; - enableZshIntegration = true; settings = { theme = "gruvbox-dark"; themes.gruvbox-dark = { From 224c80c420c3898af2ec977d778e50500808aac7 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sat, 21 Oct 2023 19:01:23 +0200 Subject: [PATCH 7/8] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'home-manager': 'github:nix-community/home-manager/6bba64781e4b7c1f91a733583defbd3e46b49408' (2023-10-10) → 'github:nix-community/home-manager/ae631b0b20f06f7d239d160723d228891ddb2fe0' (2023-10-20) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/f99e5f03cc0aa231ab5950a15ed02afec45ed51a' (2023-10-09) → 'github:NixOS/nixpkgs/7c9cc5a6e5d38010801741ac830a3f8fd667a7a0' (2023-10-19) • Updated input 'nixpkgs-stable': 'github:NixOS/nixpkgs/bd1cde45c77891214131cbbea5b1203e485a9d51' (2023-10-11) → 'github:NixOS/nixpkgs/679cadfdfed2b90311a247b2d6ef6dfd3d6cab73' (2023-10-20) --- flake.lock | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/flake.lock b/flake.lock index 8c768e5..b62c4ec 100644 --- a/flake.lock +++ b/flake.lock @@ -242,20 +242,18 @@ "inputs": { "nixpkgs": [ "nixpkgs" - ], - "utils": "utils" + ] }, "locked": { - "lastModified": 1685325875, - "narHash": "sha256-tevlLIMPeVNNYPd9UgjHApAUoFAnw9iohqUyj+LPp88=", + "lastModified": 1697838989, + "narHash": "sha256-hwVlO+st8vWJO6iy3/JbMHrUyY4Ak7xUSmffoWqBPUg=", "owner": "nix-community", "repo": "home-manager", - "rev": "b372d7f8d5518aaba8a4058a453957460481afbc", + "rev": "ae631b0b20f06f7d239d160723d228891ddb2fe0", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-22.11", "repo": "home-manager", "type": "github" } @@ -264,7 +262,7 @@ "inputs": { "naersk": "naersk_2", "nixpkgs": "nixpkgs_7", - "utils": "utils_2" + "utils": "utils" }, "locked": { "lastModified": 1683146576, @@ -420,11 +418,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1695559356, - "narHash": "sha256-kXZ1pUoImD9OEbPCwpTz4tHsNTr4CIyIfXb3ocuR8sI=", + "lastModified": 1697777081, + "narHash": "sha256-n2vQARhKevRGyeo+LAa8g+CdUQsdH/caNk8jnylcPhY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "261abe8a44a7e8392598d038d2e01f7b33cf26d0", + "rev": "679cadfdfed2b90311a247b2d6ef6dfd3d6cab73", "type": "github" }, "original": { @@ -571,11 +569,11 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1695360818, - "narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", + "lastModified": 1697723726, + "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", + "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", "type": "github" }, "original": { @@ -600,21 +598,6 @@ } }, "utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { "locked": { "lastModified": 1676283394, "narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=", @@ -629,7 +612,7 @@ "type": "github" } }, - "utils_3": { + "utils_2": { "locked": { "lastModified": 1667395993, "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", @@ -648,7 +631,7 @@ "inputs": { "naersk": "naersk_3", "nixpkgs": "nixpkgs_11", - "utils": "utils_3" + "utils": "utils_2" }, "locked": { "lastModified": 1675936524, From 1cd19687be5d7291915a49f0bdb3db6b3adc1473 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sat, 28 Oct 2023 22:25:06 +0200 Subject: [PATCH 8/8] lmao --- build-mac-remote.sh | 4 -- build-mac.sh | 3 - build.sh | 1 - common.nix | 7 +- flake.nix | 2 +- haskell/xmonad/xmonad.hs | 23 ++----- hosts/catbook-j/configuration.nix | 7 +- justfile | 5 ++ modules/desktop/audio.nix | 1 + modules/desktop/default.nix | 16 ++++- modules/desktop/networking.nix | 74 +++++++++++++++------- modules/helix.nix | 8 +-- modules/utils.nix | 49 ++++++++++++++ modules/zellij.nix | 21 +++++- other/config.nu | 20 +++++- other/scripts/desktop/window-screenshot.nu | 19 ++++++ other/scripts/dispatcher.nu | 19 ++++++ other/scripts/networkhooks/WIFI@DB.nu | 40 ++++++++++++ other/scripts/networkhooks/WIFIonICE.nu | 22 +++++++ other/scripts/networkhooks/ccchh.nu | 41 ++++++++++++ test.sh | 1 - 21 files changed, 315 insertions(+), 68 deletions(-) delete mode 100755 build-mac-remote.sh delete mode 100755 build-mac.sh delete mode 100755 build.sh create mode 100644 justfile create mode 100644 modules/utils.nix create mode 100644 other/scripts/desktop/window-screenshot.nu create mode 100755 other/scripts/dispatcher.nu create mode 100755 other/scripts/networkhooks/WIFI@DB.nu create mode 100644 other/scripts/networkhooks/WIFIonICE.nu create mode 100644 other/scripts/networkhooks/ccchh.nu delete mode 100755 test.sh diff --git a/build-mac-remote.sh b/build-mac-remote.sh deleted file mode 100755 index 13c6a15..0000000 --- a/build-mac-remote.sh +++ /dev/null @@ -1,4 +0,0 @@ -sudo nixos-rebuild switch --flake . \ - --impure --override-input mac-brcm-fw path:/home/jade/mac-brcm-fw \ - --build-host 192.168.178.119 --no-build-nix - diff --git a/build-mac.sh b/build-mac.sh deleted file mode 100755 index 31bbe5a..0000000 --- a/build-mac.sh +++ /dev/null @@ -1,3 +0,0 @@ -sudo nixos-rebuild switch --flake . \ - --impure --override-input mac-brcm-fw path:/home/jade/mac-brcm-fw \ - diff --git a/build.sh b/build.sh deleted file mode 100755 index 941d5cf..0000000 --- a/build.sh +++ /dev/null @@ -1 +0,0 @@ -sudo nixos-rebuild switch --flake . --impure diff --git a/common.nix b/common.nix index 423e577..c2aebb0 100644 --- a/common.nix +++ b/common.nix @@ -27,12 +27,13 @@ with builtins; environment = { systemPackages = with pkgs; [ - + nushellFull networkmanager htmlq wget git neofetch pciutils zip unzip gnutar iw btop nodejs jdk8 jdk11 jdk libsecret gh nix-prefetch-scripts fzf glab ripgrep sl lolcat appimage-run git-crypt file whois p7zip file nmap cmatrix tree - socat smartmontools + socat smartmontools mprocs + dig aria2 usbutils ]; }; @@ -101,7 +102,7 @@ with builtins; users.users.jade = { isNormalUser = true; - extraGroups = [ "wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" ]; + extraGroups = [ "wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" "wireshark" ]; packages = [ pkgs.marksman ]; diff --git a/flake.nix b/flake.nix index c995e65..a1f7382 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ # nixpkgs.url = "nixpkgs/nixos-22.11"; nixpkgs-stable.url = "nixpkgs/nixos-23.05"; home-manager = { - url = "github:nix-community/home-manager/release-22.11"; + url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-hardware.url = "github:networkException/nixos-hardware/apple-t2-init"; diff --git a/haskell/xmonad/xmonad.hs b/haskell/xmonad/xmonad.hs index 4044d80..2ec0677 100644 --- a/haskell/xmonad/xmonad.hs +++ b/haskell/xmonad/xmonad.hs @@ -13,6 +13,7 @@ import System.Exit import XMonad.Hooks.StatusBar import XMonad.Hooks.StatusBar.PP +import XMonad.Hooks.EwmhDesktops import qualified XMonad.StackSet as W import qualified Data.Map as M @@ -76,23 +77,7 @@ myRemaps = KeymapTable [ ((0, xK_a), (0, xK_b)) ] myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ [ ((modm, xK_Return), spawn $ XMonad.terminal conf) , ((modm .|. shiftMask, xK_q), kill) - -- Rotate through the available layout algorithms - , ((modm, xK_space ), sendMessage NextLayout) - -- rofiing - , ((modm, xK_d), spawn "rofi -show drun") - , ((modm .|. shiftMask, xK_e), spawn "rofi -show \"desktopctl\" -modes \"desktopctl:$(which desktopctl)\"") - , ((modm, xK_m), spawn "menu-qalc") - , ((modm, xK_i), spawn "rofimoji -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy") - -- screenshotting - -- TODO: Fix/rewrite window-screenshot.sh - , ((modm, xK_w), spawn "window-screenshot.sh") - , ((modm, xK_s), spawn "flameshot gui -c -p $HOME/Pictures/screenshots") - , ((modm, xK_a), spawn "flameshot screen -c -p $HOME/Pictures/screenshots") - , ((modm, xK_t), spawn "ocr-screenshot.sh") - - [ ((modm, xK_Return), spawn $ XMonad.terminal conf) - , ((modm .|. shiftMask, xK_q), kill) - -- Rotate through the available layout algorithms + -- -- Rotate through the available layout algorithms , ((modm, xK_space ), sendMessage NextLayout) -- rofiing @@ -105,7 +90,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ -- screenshotting -- TODO: Fix/rewrite window-screenshot.sh - , ((modm, xK_w), spawn "window-screenshot.sh") + , ((modm, xK_w), spawn "window-screenshot.nu") , ((modm, xK_s), spawn "flameshot gui -c -p $HOME/Pictures/screenshots") , ((modm, xK_a), spawn "flameshot screen -c -p $HOME/Pictures/screenshots") , ((modm, xK_t), spawn "ocr-screenshot.sh") @@ -306,7 +291,7 @@ myStartupHook = do -- Run xmonad with the settings you specify. No need to modify this. -- mySB = statusBarProp "polybar" (pure xmobarPP) -main = xmonad $ withEasySB mySB defToggleStrutsKey defaults +main = xmonad $ withEasySB mySB defToggleStrutsKey (ewmh defaults) -- A structure containing your configuration settings, overriding -- fields in the default config. Any you don't override, will diff --git a/hosts/catbook-j/configuration.nix b/hosts/catbook-j/configuration.nix index 870e47c..12aaed4 100644 --- a/hosts/catbook-j/configuration.nix +++ b/hosts/catbook-j/configuration.nix @@ -53,6 +53,11 @@ in { device = "DELL081C:00 044E:121F Mouse"; sensitivity = 255; }; + hardware.usbWwan.enable = true; + systemd.services."ModemManager".enable = true; + systemd.services."ModemManager".wants = [ "NetworkManager.service" ]; + systemd.services."ModemManager".wantedBy = [ "multi-user.target" ]; + programs.wireshark.enable = true; boot.resumeDevice = "/dev/disk/by-uuid/4f9e8afa-f8d7-40bf-b3ea-17e8e8fbb694"; boot.kernelParams = [ "resume_offset=7380652" ]; @@ -64,7 +69,7 @@ in { services.xserver.libinput.touchpad.tapping = false; - environment.systemPackages = [ pkgs.vivaldi pkgs.vivaldi-ffmpeg-codecs pkgs.plantuml ]; + environment.systemPackages = [ pkgs.vivaldi pkgs.vivaldi-ffmpeg-codecs pkgs.plantuml pkgs.mqttui pkgs.mobile-broadband-provider-info pkgs.modem-manager-gui pkgs.wireshark]; # Bootloader. boot.loader.systemd-boot.enable = true; diff --git a/justfile b/justfile new file mode 100644 index 0000000..18dab21 --- /dev/null +++ b/justfile @@ -0,0 +1,5 @@ +test: + sudo nixos-rebuild test --flake . --impure + +build: + sudo nixos-rebuild switch --flake . --impure diff --git a/modules/desktop/audio.nix b/modules/desktop/audio.nix index f015427..e61b48e 100644 --- a/modules/desktop/audio.nix +++ b/modules/desktop/audio.nix @@ -13,6 +13,7 @@ jack.enable = true; }; }; + hardware.pulseaudio.enable = pkgs.lib.mkForce false; sound.mediaKeys.enable = true; home-manager.users.jade = { pkgs, ... }: { home.packages = with pkgs; [ diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 2e439f6..563288d 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -2,6 +2,7 @@ let cfg = config.jade.desktop; + # window-screenshot = pkgs.writeTextFile "window-screenshot.nu" (builtins.readFile ../../other/scripts/desktop/window-screenshot.nu); window-screenshot = pkgs.writeShellScriptBin "window-screenshot.sh" (builtins.readFile ../../other/scripts/desktop/window-screenshot.sh); # desktop-ctl = pkgs.writeShellScriptBin "desktop-ctl.sh" (builtins.readFile ../scripts/desktop/desktop-ctl.sh); desktop-ctl = import ../../other/scripts/desktop/desktopctl.nix { inherit pkgs; }; @@ -102,10 +103,13 @@ in with lib; { desktopManager = { xterm.enable = false; + # gnome = { + # enable = true; + # }; }; displayManager = { - #defaultSession = "none+i3"; + defaultSession = "none+xmonad"; gdm.enable = true; }; @@ -187,11 +191,17 @@ in with lib; { theme = ../../other/rofi-themes/applauncher.rasi; }; home.packages = with pkgs; [ + spotifyd spotify-tui + #nushell nu_scripts direnv + just bacon + magic-wormhole-rs + yt-dlp + argyllcms displaycal @@ -201,11 +211,13 @@ in with lib; { i3lock rofimoji feh xorg.xinput arandr flameshot tesseract5 imagemagick xclip xmacro libwacom wacomtablet xorg.xev + syncplay + # categories # filemanager xfce.thunar xfce.tumbler xfce.thunar-archive-plugin gnome.file-roller # media/file viewers - vlc evince nomacs + vlc mpv evince nomacs # from environment.systemPackages cleanup font-manager xdotool xorg.xwininfo gparted librewolf firefox uhk-agent diff --git a/modules/desktop/networking.nix b/modules/desktop/networking.nix index 2c761db..7a62d05 100644 --- a/modules/desktop/networking.nix +++ b/modules/desktop/networking.nix @@ -1,34 +1,60 @@ { config, lib, pkgs, ... }: -{ +let + addNuShebang = path: builtins.concatStringsSep "\n\n" [ + "#!${pkgs.nushellFull}/bin/nu" + (builtins.readFile path) + ]; +in { config = { networking = { - networkmanager.wifi.backend = "wpa_supplicant"; - extraHosts = '' - 127.0.0.1 www.youtube.com - 127.0.0.1 www.reddit.com - 127.0.0.1 www.tiktok.com - 127.0.0.1 www.twitter.com - 127.0.0.1 www.instagram.com - 127.0.0.1 www.facebook.com - 127.0.0.1 www.snapchat.com + networkmanager = { + wifi.backend = "wpa_supplicant"; + dispatcherScripts = [ + { + type = "basic"; + source = pkgs.writeText "dispatcher" (addNuShebang ../../other/scripts/dispatcher.nu); + } + ]; + }; + hosts = { + "127.0.0.1" = [ + "www.tiktok.com" + "www.twitter.com" + "www.instagram.com" + "www.facebook.com" + "www.snapchat.com" - 127.0.0.1 youtube.com - 127.0.0.1 reddit.com - 127.0.0.1 tiktok.com - 127.0.0.1 twitter.com - 127.0.0.1 instagram.com - 127.0.0.1 facebook.com - 127.0.0.1 snapchat.com + "tiktok.com" + "twitter.com" + "instagram.com" + "facebook.com" + "snapchat.com" - 127.0.0.1 google-analytics.com - 127.0.0.1 stats.g.doubleclick.net - 127.0.0.1 googleadservices.com - 127.0.0.1 googletagmanager.com - 127.0.0.1 googletagservices.com - 127.0.0.1 googlesyndication.com - ''; + "google-analytics.com" + "stats.g.doubleclick.net" + "googleadservices.com" + "googletagmanager.com" + "googletagservices.com" + "googlesyndication.com" + ]; + "10.31.208.9" = [ + "mqtt.z9" + ]; + }; }; + environment.etc = (with builtins; ( + listToAttrs ( + map (v: { + name = "networkhooks/${v}"; + value = { + text = addNuShebang ../../other/scripts/networkhooks/${v}; + mode = "0755"; + }; + }) + (attrNames (readDir ../../other/scripts/networkhooks)) + ) + )); systemd.services."NetworkManager-wait-online".enable = false; services.mullvad-vpn.enable = true; home-manager.users.jade = { pkgs, ... }: { diff --git a/modules/helix.nix b/modules/helix.nix index 737fe80..5c61508 100644 --- a/modules/helix.nix +++ b/modules/helix.nix @@ -30,16 +30,16 @@ in with lib; { space."=" = ":fmt"; }; }; - languages = [ - { + languages = { + "php" = { name = "php"; file-types = [ "php" ]; language-server = { command = "psalm"; args = ["--language-server"]; }; - } - ]; + }; + }; }; }; }; diff --git a/modules/utils.nix b/modules/utils.nix new file mode 100644 index 0000000..566dbe4 --- /dev/null +++ b/modules/utils.nix @@ -0,0 +1,49 @@ +{ pkgs, lib }: rec { + # taken from https://github.com/NixOS/nixpkgs/blob/3650808d85dccbfa3be3d785dfd3ce33a757bd2c/pkgs/build-support/trivial-builders/default.nix#L335 + writeNuShellApplication = + { name + , text + , runtimeInputs ? [ ] + , meta ? { } + , checkPhase ? null + }: + writeTextFile { + inherit name meta; + executable = true; + destination = "/bin/${name}"; + allowSubstitutes = true; + preferLocalBuild = false; + text = '' + #!${pkgs.nushell} + '' + lib.optionalString (runtimeInputs != [ ]) '' + + $env.PATH = ($env.PATH | split row (char esep) | prepend '${lib.makeBinPath runtimeInputs}'); + '' + '' + + ${text} + ''; + + checkPhase = + # GHC (=> shellcheck) isn't supported on some platforms (such as risc-v) + # but we still want to use writeShellApplication on those platforms + if checkPhase == null then '' + runHook preCheck + + nu -c "nu-check -d $target" + + runHook postCheck + '' + else checkPhase; + }; + packageNushellApplication = + { name + , path + , runtimeInputs ? [ ] + , meta ? { } + , checkPhase ? null + }: + writeNuShellApplication { + inherit name runtimeInputs meta checkPhase; + text = builtins.readFile path; + }; +} diff --git a/modules/zellij.nix b/modules/zellij.nix index 2e45cd6..7472324 100644 --- a/modules/zellij.nix +++ b/modules/zellij.nix @@ -6,12 +6,22 @@ in with lib; { }; config = mkIf cfg.enable { home-manager.users.jade = { pkgs, ... }: { + home.file = { + zellij-forgot = { + target = ".config/zellij/plugins/zellij-forgot.wasm"; + source = builtins.fetchurl "https://github.com/karimould/zellij-forgot/releases/download/0.2.0/zellij_forgot.wasm"; + }; + monocle = { + target = ".config/zellij/plugins/monocle.wasm"; + source = builtins.fetchurl "https://github.com/imsnif/monocle/releases/download/0.37.2/monocle.wasm"; + }; + }; programs.zellij = { enable = true; settings = { theme = "gruvbox-dark"; themes.gruvbox-dark = { - fg = "#D5C4A1"; + fg = "#d5c4a1"; bg = "#282828"; black = "#3C3836"; red = "#CC241D"; @@ -20,9 +30,16 @@ in with lib; { blue = "#3C8588"; magenta = "#B16286"; cyan = "#689D6A"; - white = "#FBF1C7"; + white = "#665c54"; orange = "#D65D0E"; }; + # keybinds = { + # session = { + # "bind \"o\"" = { + # LaunchOrFocusPlugin = ["file:/home/jade/.config/zellij/plugins/monocle.wasm" { floating = true; }]; + # }; + # }; + # }; pane_frames = false; }; }; diff --git a/other/config.nu b/other/config.nu index c0a1e82..cd8e7a9 100644 --- a/other/config.nu +++ b/other/config.nu @@ -247,9 +247,21 @@ $env.config = { hooks: { pre_prompt: [{ || - let direnv = (direnv export json | from json) - let direnv = if ($direnv | length) == 1 { $direnv } else { {} } - $direnv | load-env + let direnv = (direnv export json | from json | default {}) + if ($direnv | is-empty) { + return + } + $direnv + | items {|key, value| + { + key: $key + value: (if $key in $env.ENV_CONVERSIONS { + do ($env.ENV_CONVERSIONS | get $key | get from_string) $value + } else { + $value + }) + } + } | transpose -ird | load-env }] # run before the prompt is shown pre_execution: [{ null }] # run before the repl input is run env_change: { @@ -793,3 +805,5 @@ start_zellij alias gnix = cd ~/nix-configs; alias grepo = cd ~/Documents/repos; alias wh = wormhole-rs; +alias nix-shell = nix-shell --run 'nu -li'; +alias nsp = nix-shell --run 'nu -li' -p; diff --git a/other/scripts/desktop/window-screenshot.nu b/other/scripts/desktop/window-screenshot.nu new file mode 100644 index 0000000..89785b2 --- /dev/null +++ b/other/scripts/desktop/window-screenshot.nu @@ -0,0 +1,19 @@ +#!/usr/bin/env nu + +def main [ ] { + let reg = ( + xwininfo -id (xdotool getactivewindow) + | lines + | parse '{key}: {value}' + | str trim + | get value + | echo { + x: $in.1 + y: $in.2 + w: $in.5 + h: $in.6 + } + ); + + flameshot gui --region $"($reg.w)x($reg.h)+($reg.x)+($reg.y)" -c -p ~/Pictures/screenshots +} \ No newline at end of file diff --git a/other/scripts/dispatcher.nu b/other/scripts/dispatcher.nu new file mode 100755 index 0000000..f4e9f71 --- /dev/null +++ b/other/scripts/dispatcher.nu @@ -0,0 +1,19 @@ +def main [ + interface: string + type: string +] { + $env.PATH = ($env.PATH | split row (char esep) | append '/run/current-system/sw/bin'); + + let currentnet = ( + nmcli -m tabular connection show --active + | detect columns + | first + | get name + ); + + systemd-cat echo $"($currentnet) \(($interface)): ($type)"; + + if $interface == 'wlp2s0' { + ^$"/etc/networkhooks/($currentnet).nu" $interface $type + } +} diff --git a/other/scripts/networkhooks/WIFI@DB.nu b/other/scripts/networkhooks/WIFI@DB.nu new file mode 100755 index 0000000..dd0390d --- /dev/null +++ b/other/scripts/networkhooks/WIFI@DB.nu @@ -0,0 +1,40 @@ +def main [ + interface: string + type: string +] { + if not ($type == 'up') { + exit + }; + + mullvad disconnect; + let page = http get 'http://172.0.0.1/'; + + let hotspot_ip = $page | htmlq 'input[name=uamip]' -a 'value'; + let hotspot_port = $page | htmlq 'input[name=uamport]' -a 'value'; + + let pl_data = $page + | htmlq input -a name -r input[name=button] + | lines + | wrap name + | merge ( + $page + | htmlq input -a value + | lines + | wrap value + ) + | drop 1; + + let payload = $pl_data + | each {|kv| [ + ($kv.name | url encode --all) + ($kv.value | url encode --all) ] + | str join '=' + } | str join '&'; + + let res = curl --insecure --resolve $"www.hotsplots.de:($hotspot_port):($hotspot_ip)" -H 'Content-Type: application/x-www-form-urlencoded' "https://www.hotsplots.de/auth/login.php" --data-raw $"($payload)" ; + + let url = $res | htmlq 'meta[http-equiv=refresh]' -a 'content' | parse '0;url={url}'; + + http get $url.url.0; + mullvad connect; +} diff --git a/other/scripts/networkhooks/WIFIonICE.nu b/other/scripts/networkhooks/WIFIonICE.nu new file mode 100644 index 0000000..2de9902 --- /dev/null +++ b/other/scripts/networkhooks/WIFIonICE.nu @@ -0,0 +1,22 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p curl htmlq + +# echo "Fetching cookie and CSRF token..." +# form=$(curl --silent --location --junk-session-cookies --cookie-jar /tmp/wifionice "https://login.wifionice.de/en/" --resolve login.wifionice.de:443:10.101.64.10 -i | htmlq "input") + +# keys=$(htmlq "input" --attribute "name" <<< "$form") +# values=$(htmlq "input" --attribute "value" <<< "$form") +# payload=$(paste --delimiters="=" <(echo "$keys") <(echo "$values") | tr "\n" "&") + +# echo "Payload: \"$payload\"" +# echo "POSTing payload..." + +# curl --cookie /tmp/wifionice "https://login.wifionice.de/en/" --resolve login.wifionice.de:443:10.101.64.10 -d "$payload" + +def main [ + interface: string + type: string +] { + let form = curl --silent --location --junk-session-cookies --cookie-jar /tmp/wifionice 'https://login.wifionice.de/en/' --resolve 'login.wifionice.de:443:10.101.64.10' -i | htmlq 'input'; + # TODO +} diff --git a/other/scripts/networkhooks/ccchh.nu b/other/scripts/networkhooks/ccchh.nu new file mode 100644 index 0000000..bce6e8e --- /dev/null +++ b/other/scripts/networkhooks/ccchh.nu @@ -0,0 +1,41 @@ +const wave_timeout = 15min; + +def main [ + interface: string + type: string +] { + if not ('/var/lib/ccchh-winken/last' | path exists) { + mkdir '/var/lib/ccchh-winken'; + 0 | into datetime | save '/var/lib/ccchh-winken/last' -f; + } + + let $last_waved = open '/var/lib/ccchh-winken/last' --raw | into datetime; + + if ((date now) - $last_waved) > $wave_timeout { + if $type == "up" { + mullvad disconnect; + curl mqtt://mqtt.z9/winkekatze/katz9/eye/set -d (rand-color); + curl mqtt://mqtt.z9/winkekatze/Viktoria/eye/set -d (rand-color); + curl mqtt://mqtt.z9/winkekatze/allcats -d 'wink'; + mullvad connect; + + date now | save '/var/lib/ccchh-winken/last' -f; + } + } +} + +def rand-color [] { + const colors = [ + "blue" + "cyan" + "green" + "pink" + "red" + "white" + "yellow" + ]; + + $colors | get (random integer 0..(($colors | length) - 1)) +} + + diff --git a/test.sh b/test.sh deleted file mode 100755 index f6cda85..0000000 --- a/test.sh +++ /dev/null @@ -1 +0,0 @@ -sudo nixos-rebuild test --flake . --impure