From 3b89836ad098644f986941eab63fbc65c3bca8ad Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 13 Feb 2024 20:20:01 +0100 Subject: [PATCH 01/14] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'arion': 'github:hercules-ci/arion/f295eabd25b7c894ab405be784e2a010f83fde55' (2023-12-30) → 'github:hercules-ci/arion/9e5caa2b4869c9094a39a7819511a88c35e35671' (2024-02-05) • Updated input 'arion/flake-parts': 'github:hercules-ci/flake-parts/34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5' (2023-12-01) → 'github:hercules-ci/flake-parts/b253292d9c0a5ead9bc98c4e9a26c6312e27d69f' (2024-02-01) • Updated input 'arion/hercules-ci-effects': 'github:hercules-ci/hercules-ci-effects/31b6cd7569191bfcd0a548575b0e2ef953ed7d09' (2023-11-26) → 'github:hercules-ci/hercules-ci-effects/d5cbf433a6ae9cae05400189a8dbc6412a03ba16' (2023-12-31) • Updated input 'arion/hercules-ci-effects/flake-parts': 'github:hercules-ci/flake-parts/c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4' (2023-10-03) → 'github:hercules-ci/flake-parts/34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5' (2023-12-01) • Updated input 'arion/nixpkgs': 'github:NixOS/nixpkgs/91050ea1e57e50388fa87a3302ba12d188ef723a' (2023-12-01) → 'github:NixOS/nixpkgs/e92b6015881907e698782c77641aa49298330223' (2024-02-02) • Updated input 'home-manager': 'github:nix-community/home-manager/c7ce343d9bf1a329056a4dd5b32ea8cc43b55e15' (2024-01-25) → 'github:nix-community/home-manager/21b078306a2ab68748abf72650db313d646cf2ca' (2024-02-11) • Updated input 'mac-brcm-fw': 'path:/home/jade/nix-configs/mac-brcm-fw?lastModified=1706552810&narHash=sha256-%2BkW8ogc6DykjMVlrr%2B3vWKs9ZUdJ9EW72LbY7k/Qvh4%3D' (2024-01-29) → 'path:/home/jade/nix-configs/mac-brcm-fw?lastModified=1701034142&narHash=sha256-%2BkW8ogc6DykjMVlrr%2B3vWKs9ZUdJ9EW72LbY7k/Qvh4%3D' (2023-11-26) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/612f97239e2cc474c13c9dafa0df378058c5ad8d' (2024-01-21) → 'github:NixOS/nixpkgs/f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8' (2024-02-11) • Updated input 'nixpkgs-stable': 'github:NixOS/nixpkgs/a77ab169a83a4175169d78684ddd2e54486ac651' (2024-01-24) → 'github:NixOS/nixpkgs/809cca784b9f72a5ad4b991e0e7bcf8890f9c3a6' (2024-02-11) --- flake.lock | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index a25a286..cdeda5d 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1703950660, - "narHash": "sha256-GgynJdQ6KngwFBd4YbMYbwesyOiMTZAFymsStE0PSfM=", + "lastModified": 1707151070, + "narHash": "sha256-jDz+459Iqn895HWnxhIPW0alIlDG7Ar1ZM0ONJysWbg=", "owner": "hercules-ci", "repo": "arion", - "rev": "f295eabd25b7c894ab405be784e2a010f83fde55", + "rev": "9e5caa2b4869c9094a39a7819511a88c35e35671", "type": "github" }, "original": { @@ -49,11 +49,11 @@ ] }, "locked": { - "lastModified": 1701473968, - "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", "type": "github" }, "original": { @@ -71,11 +71,11 @@ ] }, "locked": { - "lastModified": 1696343447, - "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", "type": "github" }, "original": { @@ -170,11 +170,11 @@ ] }, "locked": { - "lastModified": 1701009247, - "narHash": "sha256-GuX16rzRze2y7CsewJLTV6qXkXWyEwp6VCZXi8HLruU=", + "lastModified": 1704029560, + "narHash": "sha256-a4Iu7x1OP+uSYpqadOu8VCPY+MPF3+f6KIi+MAxlgyw=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "31b6cd7569191bfcd0a548575b0e2ef953ed7d09", + "rev": "d5cbf433a6ae9cae05400189a8dbc6412a03ba16", "type": "github" }, "original": { @@ -190,11 +190,11 @@ ] }, "locked": { - "lastModified": 1706221476, - "narHash": "sha256-T4b8YafVjHXvtDY8ARec1WrXO8uyyNZOpNgv9yoQy2M=", + "lastModified": 1707683400, + "narHash": "sha256-Zc+J3UO1Xpx+NL8UB6woPHyttEy9cXXtm+0uWwzuYDc=", "owner": "nix-community", "repo": "home-manager", - "rev": "c7ce343d9bf1a329056a4dd5b32ea8cc43b55e15", + "rev": "21b078306a2ab68748abf72650db313d646cf2ca", "type": "github" }, "original": { @@ -226,7 +226,7 @@ "mac-brcm-fw": { "flake": false, "locked": { - "lastModified": 1706552810, + "lastModified": 1701034142, "narHash": "sha256-+kW8ogc6DykjMVlrr+3vWKs9ZUdJ9EW72LbY7k/Qvh4=", "path": "/home/jade/nix-configs/mac-brcm-fw", "type": "path" @@ -329,11 +329,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1701436327, - "narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=", + "lastModified": 1706913249, + "narHash": "sha256-x3M7iV++CsvRXI1fpyFPduGELUckZEhSv0XWnUopAG8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "91050ea1e57e50388fa87a3302ba12d188ef723a", + "rev": "e92b6015881907e698782c77641aa49298330223", "type": "github" }, "original": { @@ -345,11 +345,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1706098335, - "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", + "lastModified": 1707650010, + "narHash": "sha256-dOhphIA4MGrH4ElNCy/OlwmN24MsnEqFjRR6+RY7jZw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", + "rev": "809cca784b9f72a5ad4b991e0e7bcf8890f9c3a6", "type": "github" }, "original": { @@ -466,11 +466,11 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1705856552, - "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", + "lastModified": 1707689078, + "narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", + "rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8", "type": "github" }, "original": { From 53a901c95e2265e082a082f5836188ac8d15eab6 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Tue, 13 Feb 2024 21:22:25 +0100 Subject: [PATCH 02/14] fix build --- common.nix | 6 +++--- hosts/catbook-j/configuration.nix | 9 +++++++++ hosts/potatobook-g/configuration.nix | 2 +- modules/desktop/default.nix | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/common.nix b/common.nix index 44987f9..921f0a7 100644 --- a/common.nix +++ b/common.nix @@ -29,8 +29,8 @@ with builtins; { environment = { systemPackages = with pkgs; [ - pynitrokey - nitrokey-app2 + # pynitrokey + # nitrokey-app2 veracrypt @@ -145,7 +145,7 @@ with builtins; { opengl.enable = true; uinput.enable = true; bluetooth.enable = true; - keyboard.uhk.enable = true; + # keyboard.uhk.enable = true; }; security.rtkit.enable = true; diff --git a/hosts/catbook-j/configuration.nix b/hosts/catbook-j/configuration.nix index 69a6e68..64b4fa6 100644 --- a/hosts/catbook-j/configuration.nix +++ b/hosts/catbook-j/configuration.nix @@ -113,6 +113,15 @@ # Enable networking networking.networkmanager.enable = true; + security.pam.services.jade.u2fAuth = true; + programs.i3lock.u2fSupport = true; + security.pam.u2f = { + enable = true; + cue = true; + control = "sufficient"; + authFile = "/home/jade/.ssh/u2f_keys"; + }; + i18n.extraLocaleSettings = { LC_ADDRESS = "de_DE.UTF-8"; LC_IDENTIFICATION = "de_DE.UTF-8"; diff --git a/hosts/potatobook-g/configuration.nix b/hosts/potatobook-g/configuration.nix index 47ef40f..28a2e87 100644 --- a/hosts/potatobook-g/configuration.nix +++ b/hosts/potatobook-g/configuration.nix @@ -98,7 +98,7 @@ }; }; - hardware.keyboard.uhk.enable = true; + # hardware.keyboard.uhk.enable = true; hardware.enableRedistributableFirmware = true; environment.systemPackages = with pkgs; [ diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 8c12059..fe7fff2 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -138,7 +138,7 @@ in xdotool xorg.xwininfo gparted - uhk-agent + # uhk-agent cool-retro-term xdg-desktop-portal-gtk virt-manager From 93c2b01aea26fe884d79624f2abecaed740eadbd Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 15 Feb 2024 18:47:38 +0100 Subject: [PATCH 03/14] flake.lock: Update --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index cdeda5d..b82f715 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1707151070, - "narHash": "sha256-jDz+459Iqn895HWnxhIPW0alIlDG7Ar1ZM0ONJysWbg=", + "lastModified": 1707923576, + "narHash": "sha256-vch1hvgoB2TEl1+0J9h5uPkTrL4zNFUxE/razagkqQQ=", "owner": "hercules-ci", "repo": "arion", - "rev": "9e5caa2b4869c9094a39a7819511a88c35e35671", + "rev": "2b1fa9a8e9e40bb8e65a677c6fdd66dae4f4676e", "type": "github" }, "original": { @@ -190,11 +190,11 @@ ] }, "locked": { - "lastModified": 1707683400, - "narHash": "sha256-Zc+J3UO1Xpx+NL8UB6woPHyttEy9cXXtm+0uWwzuYDc=", + "lastModified": 1707919853, + "narHash": "sha256-qxmBGDzutuJ/tsX4gp+Mr7fjxOZBbeT9ixhS5o4iFOw=", "owner": "nix-community", "repo": "home-manager", - "rev": "21b078306a2ab68748abf72650db313d646cf2ca", + "rev": "043ba285c6dc20f36441d48525402bcb9743c498", "type": "github" }, "original": { @@ -329,11 +329,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1706913249, - "narHash": "sha256-x3M7iV++CsvRXI1fpyFPduGELUckZEhSv0XWnUopAG8=", + "lastModified": 1707689078, + "narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e92b6015881907e698782c77641aa49298330223", + "rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8", "type": "github" }, "original": { @@ -345,11 +345,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1707650010, - "narHash": "sha256-dOhphIA4MGrH4ElNCy/OlwmN24MsnEqFjRR6+RY7jZw=", + "lastModified": 1707786466, + "narHash": "sha256-yLPfrmW87M2qt+8bAmwopJawa+MJLh3M9rUbXtpUc1o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "809cca784b9f72a5ad4b991e0e7bcf8890f9c3a6", + "rev": "01885a071465e223f8f68971f864b15829988504", "type": "github" }, "original": { From b579577978ceacbde9e9fb41a3b80e2b13035181 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 15 Feb 2024 18:48:18 +0100 Subject: [PATCH 04/14] make polybar capable of multiple batteries --- modules/desktop/polybar.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/desktop/polybar.nix b/modules/desktop/polybar.nix index a01189c..b822dd8 100644 --- a/modules/desktop/polybar.nix +++ b/modules/desktop/polybar.nix @@ -39,7 +39,7 @@ separator-foreground = "\${colors.disabled}"; font-0 = "FiraCode Nerd Font"; modules-left = "xworkspaces xwindow"; - modules-right = "memory cpu wlan battery"; + modules-right = "memory cpu wlan bat0 bat1"; cursor-click = "pointer"; cursor-scroll = "ns-resize"; enable-ipc = true; @@ -103,12 +103,9 @@ interface-type = "wireless"; label-connected = "%{F#F0C674}%{F-} %local_ip%"; }; - - "module/battery" = { + "battery-base" = { type = "internal/battery"; poll-interval = 1; - battery = "BAT0"; - adapter = "ADP1"; time-format = "%H%{F#7c6f64}:%{F#d5c4a1}%M"; label-charging = "%{F#98971a}󰚥 %{F#ebdbb2}%percentage%%%{F#d5c4a1} %time%"; format-charging = " "; @@ -131,6 +128,16 @@ "%{F#98971a}󰁹" ]; }; + "module/bat0" = { + "inherit" = "battery-base"; + battery = "BAT0"; + adapter = "ADP1"; + }; + "module/bat1" = { + "inherit" = "battery-base"; + battery = "BAT1"; + adapter = "ADP1"; + }; "settings" = { screenchange-reload = true; From 3f733a569d61c16dc4fc010b94f90f6de710dbe3 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 15 Feb 2024 18:48:43 +0100 Subject: [PATCH 05/14] fix deprecation warnings --- modules/desktop/default.nix | 6 ++++-- modules/flatpak.nix | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index fe7fff2..0340bfb 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -55,8 +55,10 @@ in xserver = { enable = true; - layout = "us"; - xkbVariant = "altgr-intl"; + xkb = { + layout = "us"; + variant = "altgr-intl"; + }; libinput = { enable = true; diff --git a/modules/flatpak.nix b/modules/flatpak.nix index cd44ac7..e3683fe 100644 --- a/modules/flatpak.nix +++ b/modules/flatpak.nix @@ -14,6 +14,8 @@ in services.flatpak.enable = true; xdg.portal = { enable = true; + # TODO + config.common.default = "*"; extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; From e7d42763e39e0261b3b37a701e681fc313094f50 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 15 Feb 2024 22:31:32 +0100 Subject: [PATCH 06/14] remove useless package --- common.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/common.nix b/common.nix index 921f0a7..d109206 100644 --- a/common.nix +++ b/common.nix @@ -153,9 +153,6 @@ with builtins; { users.users.jade = { isNormalUser = true; extraGroups = ["wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" "wireshark"]; - packages = [ - pkgs.marksman - ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOaE8TFsIazpn4OnHvHcRpOFr9FfvMaWOiEjmHsmnAoE cardno:000F_70CD7D05" ]; From dc52ae747d747ef03a636c1bde100cb8b6fdd366 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Fri, 16 Feb 2024 08:20:43 +0100 Subject: [PATCH 07/14] optimize system build command --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index 0e2ed0b..0c3044a 100644 --- a/justfile +++ b/justfile @@ -4,7 +4,7 @@ test: sudo nixos-rebuild test --flake . --impure build: - sudo nixos-rebuild switch --flake . --impure + sudo nixos-rebuild switch --flake . --impure --fast update: nix flake update --commit-lock-file From f33c9ae16134d454b984669758cb293cb04cc1cf Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Fri, 16 Feb 2024 08:21:20 +0100 Subject: [PATCH 08/14] fix custom commands and add `ed` command --- other/config.nu | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/other/config.nu b/other/config.nu index cda795c..c590b75 100644 --- a/other/config.nu +++ b/other/config.nu @@ -782,9 +782,9 @@ def start_zellij [] { start_zellij def nsp [ - program: string + ...programs: string ] { - nix shell $"nixpkgs#$program" + nix shell ...($programs | each {|it| $"nixpkgs#($it)" }) } def lcr [ @@ -806,6 +806,17 @@ def glog [ | split column "»¦«" commit subject name email date } +def ed [ + file: path + ...cmdargs: string +] { + let ext = $file | path parse | get extension; + match $ext { + "typ" => {|| zellij run --direction down -- typst watch $file --open ($cmdargs | str join ' ') } + }; + hx $file +} + alias gnix = cd ~/nix-configs; alias grepo = cd ~/Documents/repos; alias wh = wormhole-rs; From 7780fd442bcc5f5d6024af8a673d8d84c1542fd2 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Fri, 16 Feb 2024 08:21:33 +0100 Subject: [PATCH 09/14] set up kmscon --- modules/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/default.nix b/modules/default.nix index 4a225f4..ebb1252 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,4 @@ -{...}: { +{pkgs, ...}: { imports = [ ./shell ./desktop @@ -7,4 +7,17 @@ ./firewall.nix ./git.nix ]; + + services.kmscon = { + enable = true; + fonts = [ + { + name = "FiraCode Nerd Font"; + package = pkgs.nerdfonts.override {fonts = ["FiraCode"];}; + } + ]; + extraConfig = "font-size=14"; + extraOptions = "--term xterm-256color"; + hwRender = true; + }; } From 451d90a9d2306a68b8462fcde7a86c1d2b84bb8a Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sat, 17 Feb 2024 23:34:34 +0100 Subject: [PATCH 10/14] turn on ssh controlMaster option --- modules/desktop/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 0340bfb..2841c31 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -94,6 +94,10 @@ in }; home-manager.users.jade = {pkgs, ...}: { + programs.ssh = { + controlMaster = "yes"; + }; + programs.bat = { # TODO: more config enable = true; From 658dba452f0f5c0517a0b6e0320d7c263e71ab7f Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sat, 17 Feb 2024 23:36:20 +0100 Subject: [PATCH 11/14] configure firefox - reduce url repetition for addons - enable firefox sync - add new addons --- modules/desktop/firefox.nix | 118 ++++++------------------------------ 1 file changed, 18 insertions(+), 100 deletions(-) diff --git a/modules/desktop/firefox.nix b/modules/desktop/firefox.nix index 87665e3..586928b 100644 --- a/modules/desktop/firefox.nix +++ b/modules/desktop/firefox.nix @@ -17,14 +17,18 @@ }; policies = { DefaultDownloadDirectory = "\${home}/Downloads"; - Extensions.Install = [ - "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin" - "https://addons.mozilla.org/firefox/downloads/latest/tridactyl-vim" - "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17" - "https://addons.mozilla.org/firefox/downloads/latest/gruvbox-dark-theme" - "https://addons.mozilla.org/firefox/downloads/latest/torproject-snowflake" - "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager" - "https://addons.mozilla.org/firefox/downloads/latest/terms-of-service-didnt-read" + Extensions.Install = builtins.map (name: "https://addons.mozilla.org/firefox/downloads/latest/${name}") [ + "ublock-origin" + "tridactyl-vim" + "privacy-badger17" + "gruvbox-dark-theme" + "torproject-snowflake" + "bitwarden-password-manager" + "terms-of-service-didnt-read" + "shinigami-eyes" + "darkreader" + "sponsorblock" + "youtube-mrbeastify" ]; Extensions.Uninstall = [ "google@search.mozilla.org" @@ -39,95 +43,6 @@ "DisablePocket" = true; }; profiles.jade = { - bookmarks = [ - { - name = "Toolbar"; - toolbar = true; - bookmarks = [ - { - name = "Katzencafé"; - tags = ["fedi" "social"]; - keyword = "ck"; - url = "https://ck.katzen.cafe"; - } - { - name = "Mastodon.de"; - tags = ["fedi" "social"]; - keyword = "mde"; - url = "https://mastodon.de"; - } - { - name = "Nekoverse"; - tags = ["fedi" "social"]; - keyword = "neko"; - url = "https://social.nekover.se"; - } - { - name = "Katzenschmiede"; - tags = ["fedi" "git"]; - keyword = "forge"; - url = "https://forge.katzen.cafe"; - } - { - name = "Katzenwolke"; - tags = ["cloud"]; - keyword = "wolke"; - url = "https://wolke.katzen.cafe"; - } - { - name = "Penpot"; - tags = ["design"]; - keyword = "pp"; - url = "https://design.katzen.cafe"; - } - { - name = "Pad"; - tags = ["pad"]; - keyword = "pad"; - url = "https://pad.katzen.cafe"; - } - { - name = "Auth"; - tags = ["keycloak"]; - keyword = "auth"; - url = "https://auth.katzen.cafe/realms/katzen.cafe/account"; - } - { - name = "CCCHH"; - bookmarks = [ - { - name = "Website"; - url = "https://hamburg.ccc.de"; - } - { - name = "Wiki"; - url = "https://wiki.ccchh.net"; - } - { - name = "Wiki (old)"; - url = "https://wiki.hamburg.ccc.de"; - } - { - name = "Wiki (nonpublic)"; - url = "https://nonpublic.wiki.hamburg.ccc.de"; - } - { - name = "Pads"; - url = "https://pad.hamburg.ccc.de"; - } - { - name = "Cloud"; - url = "https://cloud.hamburg.ccc.de"; - } - { - name = "Club Assistant"; - url = "https://club-assistant.ccchh.net"; - } - ]; - } - ]; - } - ]; search = { force = true; default = "DuckDuckGo"; @@ -252,6 +167,7 @@ settings = { "devtools.editor.keymap" = "vim"; "devtools.toolbox.host" = "right"; + "devtools.theme" = "dark"; "webgl.disabled" = false; "image.jxl.enabled" = true; "browser.urlbar.decodeURLsOnCopy" = true; @@ -264,9 +180,11 @@ "browser.aboutwelcome.showModal" = false; "browser.aboutwelcome.enabled" = false; "browser.preferences.moreFromMozilla" = false; - "identity.fxaccounts.enabled" = false; - "browser.tabs.firefox-view" = false; - "browser.tabs.firefox-view-next" = false; + "browser.menu.showViewImageInfo" = true; + + "identity.fxaccounts.enabled" = true; + "browser.tabs.firefox-view" = true; + "browser.tabs.firefox-view-next" = true; "browser.newtabpage.activity-stream.showSponsored" = false; "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; "browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false; From 568e681f1e0cbffd03c877481e93251691548380 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sun, 18 Feb 2024 01:24:57 +0100 Subject: [PATCH 12/14] remove cinny --- modules/desktop/social.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/desktop/social.nix b/modules/desktop/social.nix index 48d656a..d494d0c 100644 --- a/modules/desktop/social.nix +++ b/modules/desktop/social.nix @@ -14,7 +14,6 @@ in home-manager.users.jade = {pkgs, ...}: { home.packages = with pkgs; [ evolutionWithPlugins - cinny-desktop signal-desktop mumble element-desktop From 6394e8d8a0e570f897e5e6791f36cd55906362e2 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sun, 18 Feb 2024 01:25:18 +0100 Subject: [PATCH 13/14] properly configure kmscon --- modules/default.nix | 16 ++--------- modules/kmscon.nix | 69 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 14 deletions(-) create mode 100644 modules/kmscon.nix diff --git a/modules/default.nix b/modules/default.nix index ebb1252..c3be46f 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{...}: { imports = [ ./shell ./desktop @@ -6,18 +6,6 @@ ./flatpak.nix ./firewall.nix ./git.nix + ./kmscon.nix ]; - - services.kmscon = { - enable = true; - fonts = [ - { - name = "FiraCode Nerd Font"; - package = pkgs.nerdfonts.override {fonts = ["FiraCode"];}; - } - ]; - extraConfig = "font-size=14"; - extraOptions = "--term xterm-256color"; - hwRender = true; - }; } diff --git a/modules/kmscon.nix b/modules/kmscon.nix new file mode 100644 index 0000000..98dac55 --- /dev/null +++ b/modules/kmscon.nix @@ -0,0 +1,69 @@ +{ + pkgs, + config, + lib, + ... +}: let + generateOptions = with builtins; ( + opts: + toString ( + attrValues ( + mapAttrs (name: value: "--${name} ${toString value}") opts + ) + ) + ); + hexLookupTable = with lib; (listToAttrs (genList (i: { + name = let + r = toHexString i; + in ( + if (stringLength r) == 1 + then "0${r}" + else r + ); + value = toString i; + }) + 256)); + hexToOpt = with lib; (color: + concatStringsSep "," [ + (getAttr (substring 1 2 (toUpper color)) hexLookupTable) + (getAttr (substring 3 2 (toUpper color)) hexLookupTable) + (getAttr (substring 5 2 (toUpper color)) hexLookupTable) + ]); +in { + services.kmscon = { + enable = true; + fonts = [ + { + name = "FiraCode Nerd Font"; + package = pkgs.nerdfonts.override {fonts = ["FiraCode"];}; + } + ]; + extraConfig = "font-size=14"; + # extraOptions = "--term xterm-256color"; + extraOptions = generateOptions { + xkb-layout = config.services.xserver.xkb.layout; + xkb-variant = config.services.xserver.xkb.variant; + + palette = "custom"; + palette-foreground = hexToOpt "#ebdbb2"; + palette-background = hexToOpt "#282828"; + palette-black = hexToOpt "#282828"; + palette-red = hexToOpt "#cc241d"; + palette-green = hexToOpt "#98971a"; + palette-yellow = hexToOpt "#d79921"; + palette-blue = hexToOpt "#458588"; + palette-magenta = hexToOpt "#b16286"; + palette-cyan = hexToOpt "#689d6a"; + palette-light-grey = hexToOpt "#a89984"; + palette-dark-grey = hexToOpt "#928374"; + palette-light-red = hexToOpt "#fb4934"; + palette-light-green = hexToOpt "#b8bb26"; + palette-light-yellow = hexToOpt "#fabd2f"; + palette-light-blue = hexToOpt "#83a598"; + palette-light-magenta = hexToOpt "#d3869b"; + palette-light-cyan = hexToOpt "#8ec07c"; + palette-white = hexToOpt "#ebdbb2"; + }; + hwRender = true; + }; +} From ac227aa76568952193248f1ace66adc718087c47 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sun, 18 Feb 2024 01:51:06 +0100 Subject: [PATCH 14/14] document kmscon functions --- modules/kmscon.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/kmscon.nix b/modules/kmscon.nix index 98dac55..4c859bd 100644 --- a/modules/kmscon.nix +++ b/modules/kmscon.nix @@ -4,6 +4,7 @@ lib, ... }: let + # generate shell command options for kmscon fom an attrset generateOptions = with builtins; ( opts: toString ( @@ -12,10 +13,12 @@ ) ) ); + # generate a hexadecimal number lookup table to get integers from them hexLookupTable = with lib; (listToAttrs (genList (i: { name = let r = toHexString i; in ( + # pad with 0 in front if only 1 digit if (stringLength r) == 1 then "0${r}" else r @@ -23,6 +26,7 @@ value = toString i; }) 256)); + # "parse" hex color strings and convert them to kmscon options hexToOpt = with lib; (color: concatStringsSep "," [ (getAttr (substring 1 2 (toUpper color)) hexLookupTable)