From fd3af8a1f63f5e1a6b21e29ecbb5ec71c78a2246 Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Tue, 20 Feb 2024 00:51:01 +0100 Subject: [PATCH] Update docs and remove slambda references --- README.md | 29 +++++-- flake.lock | 21 ----- flake.nix | 4 - home/features/neovim/default.nix | 3 +- hosts/nixos/common/global/default.nix | 1 - .../common/optional/services/slambda.nix | 85 ------------------- hosts/nixos/lapetus/default.nix | 2 +- hosts/nixos/tethys/default.nix | 1 - 8 files changed, 22 insertions(+), 124 deletions(-) delete mode 100644 hosts/nixos/common/optional/services/slambda.nix diff --git a/README.md b/README.md index 38a91b3..e45c004 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,10 @@ In case you are not familiar with nix/nixos, this is a collection of configurati ## Features this repository includes: -- Consistent base16 theming using [stylix](https://github.com/danth/stylix) -- [sops-nix](https://github.com/Mic92/sops-nix) based secret management - Sets up all the apps I use — including git, neovim, fish, tmux, starship, hyprland, anyrun, discord, zathura, wezterm & much more. +- Sets up my entire homelab — including zfs-based [impermanence](https://grahamc.com/blog/erase-your-darlings), automatic let's-encrypt certificates, tailscale, syncthing, vaultwarden, whoogle, pounce, calico, smos, intray & more. +- Consistent base16 theming using [stylix](https://github.com/danth/stylix) +- Declarative secret management using [sops-nix](https://github.com/Mic92/sops-nix) The current state of this repo is a refactor of my old, messy nixos config, based on the structure of [this template](https://github.com/Misterio77/nix-starter-configs). @@ -16,9 +17,10 @@ The current state of this repo is a refactor of my old, messy nixos config, base This repo's structure is based on the concept of hosts - individual machines configured by me. I'm naming each host based on things in space/mythology (_they are the same picture_). The hosts I have right now are: -- [tethys](./hosts/nixos/tethys/) - my personal laptop -- [lapetus](./hosts/nixos/lapetus/) - older laptop running as a server -- [euporie](./hosts/nixos/euporie/) - barebones host for testing things insdie a VM +- [tethys](./hosts/nixos/tethys/) — my personal laptop +- [lapetus](./hosts/nixos/lapetus/) — older laptop running as a server +- [euporie](./hosts/nixos/euporie/) — barebones host for testing things insdie a VM +- enceladus — my android phone. Although not configured using nix, this name gets referenced in some places ## File structure @@ -54,10 +56,14 @@ Here's some things you might want to check out: - [Home-manager](https://github.com/nix-community/home-manager) — manage user configuration using nix - [Impernanence](https://github.com/nix-community/impermanence) — see the article about [erasing your darlings](https://grahamc.com/blog/erase-your-darlings) - [Sops-nix](https://github.com/Mic92/sops-nix) — secret management -- [Slambda](https://github.com/Mateiadrielrafael/slambda) — custom keyboard chording utility - [disko](https://github.com/nix-community/disko) — format disks using nix - [zfs](https://openzfs.org/wiki/Main_Page) — filesystem +### Input handling + +- [kanta](https://github.com/jtroo/kanata) — software-level keyboard layout customizer. One of the few such programs with support for chording +- [opentabletdriver](https://opentabletdriver.net/) + ### Graphical - [Stylix](https://github.com/danth/stylix) — base16 module for nix @@ -76,6 +82,7 @@ Here's some things you might want to check out: - [Firefox](https://www.mozilla.org/en-US/firefox/) — web browser - [Tesseract](https://github.com/tesseract-ocr/tesseract) — OCR engine - [Obsidian](https://obsidian.md/) — note taking software +- [Bitwarden](https://bitwarden.com/) — client for self-hosted password manager ### Terminal @@ -89,11 +96,10 @@ Here's some things you might want to check out: - [Fish](https://fishshell.com/) — user friendly shell - [Starship](https://starship.rs/) — shell prompt - [Ranger](https://github.com/ranger/ranger) — file manager -- [GPG](https://gnupg.org/) + [pass](https://www.passwordstore.org/) - [Catgirl](https://git.causal.agency/catgirl/about/) — irc client - Self management: - - [Smos](https://github.com/NorfairKing/smos) — A comprehensive self-management System. - - [Intray](https://github.com/NorfairKing/intray) — GTD capture tool. + - [Smos](https://github.com/NorfairKing/smos) — selfhosted comprehensive self-management System + - [Intray](https://github.com/NorfairKing/intray) — selfhosted GTD capture tool ### Services @@ -102,11 +108,16 @@ Most services are served over [tailscale](https://tailscale.com/), using certifi - [Syncthing](https://syncthing.net/) — file synchronization - [Whoogle](https://github.com/benbusby/whoogle-search#manual-docker) — search engine - [Pounce](https://git.causal.agency/pounce/about/) & [calico](https://git.causal.agency/pounce/about/calico.1) — irc bouncer +- [Vaultwarden](https://github.com/dani-garcia/vaultwarden/) — password manager +- [Smos](https://github.com/NorfairKing/smos) — a comprehensive self-management System. +- [Intray](https://github.com/NorfairKing/intray) — GTD capture tool. ## Hall of fame Includes links to stuff which used to be in the previous section but is not used anymore. Only created this section in June 2023, so stuff I used earlier might not be here. Sorted with the most recently dropped things at the top. +- [Slambda](https://github.com/Mateiadrielrafael/slambda) — custom keyboard chording utility. I retired the project in favour of [kanta](https://github.com/jtroo/kanata) +- [GPG](https://gnupg.org/) + [pass](https://www.passwordstore.org/) — I switched to [vaultwarden](https://github.com/dani-garcia/vaultwarden/) - [Agenix](https://github.com/ryantm/agenix) & [homeage](https://github.com/jordanisaacs/homeage) — I switched to [sops-nix](https://github.com/Mic92/sops-nix) - [Mind.nvim](https://github.com/phaazon/mind.nvim) — self management tree editor. The project got archived, so I switched to [Smos](https://github.com/NorfairKing/smos). - [Null-ls](https://github.com/jose-elias-alvarez/null-ls.nvim) — general purpose neovim LSP. The project got archived, so I switched to [formatter.nvim](https://github.com/mhartington/formatter.nvim). diff --git a/flake.lock b/flake.lock index aaaf6f9..1039aca 100644 --- a/flake.lock +++ b/flake.lock @@ -2548,7 +2548,6 @@ "nixpkgs-wayland": "nixpkgs-wayland", "nur": "nur", "rosepine-base16": "rosepine-base16", - "slambda": "slambda", "smos": "smos", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix", @@ -2745,26 +2744,6 @@ "type": "github" } }, - "slambda": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1684623545, - "narHash": "sha256-aoGWkm9rxqIXuTHelBNpRje/AsG27wZHNjGNaKgvhPU=", - "owner": "Mateiadrielrafael", - "repo": "slambda", - "rev": "93e3a98c57044e7900980019da349b20edb6a938", - "type": "github" - }, - "original": { - "owner": "Mateiadrielrafael", - "repo": "slambda", - "type": "github" - } - }, "smos": { "inputs": { "autodocodec": "autodocodec_2", diff --git a/flake.nix b/flake.nix index cdb2c19..b9185e0 100644 --- a/flake.nix +++ b/flake.nix @@ -92,10 +92,6 @@ # Spotify client with theming support spicetify-nix.url = "github:the-argus/spicetify-nix"; spicetify-nix.inputs.nixpkgs.follows = "nixpkgs"; - - # Keyboard configuration (to be replaced by kanata at some point) - slambda.url = "github:Mateiadrielrafael/slambda"; - slambda.inputs.nixpkgs.follows = "nixpkgs"; # }}} # {{{ Theming # Grub2 themes diff --git a/home/features/neovim/default.nix b/home/features/neovim/default.nix index 8deece5..6cfc43d 100644 --- a/home/features/neovim/default.nix +++ b/home/features/neovim/default.nix @@ -102,8 +102,7 @@ let (unmap "Q") # }}} # {{{ Chords - # Different chords get remapped to f-keys by my slambda config. - # See [my slambda config](../../../hosts/nixos/common/optional/services/slambda.nix) for details. + # Different chords get remapped to f-keys by my [my kaanta config](../../../hosts/nixos/common/optional/services/kanata.nix). # # Exit insert mode using *jk* (keymap "iv" "" "" "Exit insert mode") diff --git a/hosts/nixos/common/global/default.nix b/hosts/nixos/common/global/default.nix index 9e5e074..cf5086d 100644 --- a/hosts/nixos/common/global/default.nix +++ b/hosts/nixos/common/global/default.nix @@ -8,7 +8,6 @@ let inputs.disko.nixosModules.default inputs.stylix.nixosModules.stylix inputs.nur.nixosModules.nur - inputs.slambda.nixosModule inputs.sops-nix.nixosModules.sops # }}} # {{{ global configuration diff --git a/hosts/nixos/common/optional/services/slambda.nix b/hosts/nixos/common/optional/services/slambda.nix deleted file mode 100644 index 7e242a0..0000000 --- a/hosts/nixos/common/optional/services/slambda.nix +++ /dev/null @@ -1,85 +0,0 @@ -let - chord = from: to: { inherit from to; }; - unmap = from: chord from [ ]; - # I want my brackets to be aligned - sem = "semicolon"; - commonChords = [ - # {{{ Modifiers - # {{{ right - (chord [ "l" "n" ] [ "rightmeta" ]) - (chord [ "k" "l" ] [ "rightshift" ]) - (chord [ "j" "l" ] [ "rightctrl" ]) - (chord [ "l" sem ] [ "rightalt" ]) - (chord [ "j" "k" "l" ] [ "rightctrl" "rightshift" ]) - (chord [ "k" "l" sem ] [ "rightalt" "rightshift" ]) - (chord [ "j" "k" "l" sem ] [ "rightalt" "rightctrl" "rightshift" ]) - (unmap [ "rightshift" ]) - (unmap [ "rightctrl" ]) - (unmap [ "rightalt" ]) - (unmap [ "rightmeta" ]) - # }}} - # {{{ left - (chord [ "s" "d" ] [ "leftshift" ]) - (chord [ "s" "f" ] [ "leftctrl" ]) - (chord [ "s" "a" ] [ "leftalt" ]) - (chord [ "s" "d" "f" ] [ "leftctrl" "leftshift" ]) - (chord [ "a" "s" "d" ] [ "leftalt" "leftshift" ]) - (chord [ "a" "s" "d" "f" ] [ "leftalt" "leftctrl" "leftshift" ]) - (unmap [ "leftalt" ]) - (unmap [ "leftctrl" ]) - # (unmap [ "leftshift" ]) # Useful for touhou - # }}} - # }}} - # {{{ Other special keys - (chord [ "g" "h" ] [ "backspace" ]) - (chord [ "n" "v" ] [ "backslash" ]) - (chord [ "d" "f" ] [ "tab" ]) - (chord [ "e" "f" ] [ "enter" ]) - (chord [ "q" "w" ] [ "esc" ]) - (unmap [ "backspace" ]) - (unmap [ "enter" ]) - (unmap [ "tab" ]) - (unmap [ "esc" ]) - (unmap [ "backslash" ]) - # }}} - # {{{ Tmux - (chord [ "a" "n" "k" "l" ] [ "leftctrl" "a" "n" ]) # Next tab in tmux - (chord [ "a" "j" "l" ] [ "leftctrl" "a" ]) # Tmux leader - # }}} - # {{{ WM keybinds - (chord [ "n" "l" "q" ] [ "leftmeta" "1" ]) - (chord [ "n" "l" "w" ] [ "leftmeta" "2" ]) - (chord [ "n" "l" "e" ] [ "leftmeta" "3" ]) - (chord [ "n" "l" "r" ] [ "leftmeta" "4" ]) - (chord [ "n" "l" "a" ] [ "leftmeta" "5" ]) - (chord [ "n" "l" "s" ] [ "leftmeta" "6" ]) - (chord [ "n" "l" "d" ] [ "leftmeta" "7" ]) - (chord [ "n" "l" "f" ] [ "leftmeta" "8" ]) - (chord [ "n" "l" "z" ] [ "leftmeta" "9" ]) - (chord [ "n" "l" "x" ] [ "leftmeta" "0" ]) - (chord [ "n" "k" "l" ] [ "leftmeta" "p" ]) - # }}} - # {{{ Handled by vim - (chord [ "j" "k" ] [ "f10" ]) - (chord [ "c" "p" ] [ "f11" ]) - (chord [ "j" "i" ] [ "f12" ]) - # }}} - ]; -in -{ - services.slambda = { - enable = true; - - keyboards.keychronK6 = { - delay = 30; - device = "/dev/input/by-id/usb-Keychron_Keychron_K6-event-kbd"; - chords = commonChords; - }; - - keyboards.tethysLaptop = { - delay = 30; - device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd"; - chords = commonChords; - }; - }; -} diff --git a/hosts/nixos/lapetus/default.nix b/hosts/nixos/lapetus/default.nix index cac8a7b..1463b73 100644 --- a/hosts/nixos/lapetus/default.nix +++ b/hosts/nixos/lapetus/default.nix @@ -2,7 +2,7 @@ imports = [ ../common/global ../common/users/adrielus.nix - ../common/optional/services/slambda.nix + ../common/optional/services/kanata.nix ./services/syncthing.nix ./services/whoogle.nix diff --git a/hosts/nixos/tethys/default.nix b/hosts/nixos/tethys/default.nix index 3dd731e..14dd2c8 100644 --- a/hosts/nixos/tethys/default.nix +++ b/hosts/nixos/tethys/default.nix @@ -8,7 +8,6 @@ ../common/optional/greetd.nix ../common/optional/quietboot.nix ../common/optional/desktop/steam.nix - # ../common/optional/services/slambda.nix ../common/optional/services/kanata.nix ../common/optional/desktop/xdg-portal.nix ../common/optional/wayland/hyprland.nix