From 8f8615eeaeb3627d2bc853664804dbd500acea3f Mon Sep 17 00:00:00 2001 From: fleaz Date: Wed, 12 Mar 2025 19:33:42 +0100 Subject: [PATCH 1/5] neovim: Added nvim-surround plugin --- home-manager/modules/neovim.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/home-manager/modules/neovim.nix b/home-manager/modules/neovim.nix index 741a5d9..962f730 100644 --- a/home-manager/modules/neovim.nix +++ b/home-manager/modules/neovim.nix @@ -76,6 +76,9 @@ # indentation lines indent-blankline-nvim + + # Add/change surrounding characters + nvim-surround ]; extraConfig = '' @@ -177,6 +180,7 @@ nnoremap fg Telescope live_grep lua << EOF + require("nvim-surround").setup({}) require("ibl").setup{ indent = { char = "▏" }; } From e19b89e47d85a28a818fe22918fac1ba00ccb3b6 Mon Sep 17 00:00:00 2001 From: fleaz Date: Fri, 28 Mar 2025 18:43:20 +0100 Subject: [PATCH 2/5] machines/smithers: Added battery warning via keyboard blinking --- machines/smithers/batterylight.nix | 32 +++++++++++++++++++++++++++++ machines/smithers/configuration.nix | 1 + 2 files changed, 33 insertions(+) create mode 100644 machines/smithers/batterylight.nix diff --git a/machines/smithers/batterylight.nix b/machines/smithers/batterylight.nix new file mode 100644 index 0000000..687dcf4 --- /dev/null +++ b/machines/smithers/batterylight.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: +{ + systemd.timers."batterylight" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "5m"; + OnUnitActiveSec = "5m"; + Unit = "batterylight.service"; + }; + }; + + systemd.services."batterylight" = { + script = '' + STATUS=`cat /sys/bus/acpi/drivers/battery/PNP0C0A:00/power_supply/BAT1/status` + PERCENT=`cat /sys/bus/acpi/drivers/battery/PNP0C0A:00/power_supply/BAT1/capacity` + if [[ $STATUS == "Discharging" && $PERCENT -lt 10 ]]; then + for i in `seq 0 3`; do + ${pkgs.framework-tool}/bin/framework_tool --kblight 0 + sleep 0.2 + ${pkgs.framework-tool}/bin/framework_tool --kblight 100 + sleep 0.2 + ${pkgs.framework-tool}/bin/framework_tool --kblight 0 + sleep 0.2 + done + fi + ''; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + }; +} diff --git a/machines/smithers/configuration.nix b/machines/smithers/configuration.nix index 15ead57..2520852 100644 --- a/machines/smithers/configuration.nix +++ b/machines/smithers/configuration.nix @@ -6,6 +6,7 @@ ./hardware-configuration.nix ../../roles/all.nix ../../roles/laptop.nix + ./batterylight.nix # import hardware specific settings From 88bb7d2c8c94422f039eda767ac34a1484dffff4 Mon Sep 17 00:00:00 2001 From: fleaz Date: Wed, 2 Apr 2025 21:43:15 +0200 Subject: [PATCH 3/5] remove insomnia --- home-manager/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/home-manager/default.nix b/home-manager/default.nix index f92a6d9..b98b7bd 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -99,7 +99,6 @@ in htop xdg-utils moreutils - insomnia mumble inkscape guvcview From 17ec3de38639ae3ed4d6063fc29f33efda4514a5 Mon Sep 17 00:00:00 2001 From: fleaz Date: Wed, 2 Apr 2025 21:44:58 +0200 Subject: [PATCH 4/5] ain't nobody got space and time for nerdfonts... --- modules/fonts.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/fonts.nix b/modules/fonts.nix index 014ed5b..28ec566 100644 --- a/modules/fonts.nix +++ b/modules/fonts.nix @@ -13,7 +13,6 @@ enableDefaultPackages = true; fontDir.enable = true; packages = with pkgs; [ - nerdfonts dejavu_fonts fira-code ]; From 6866f72031c381c0aff46b3ba01d3021133a1377 Mon Sep 17 00:00:00 2001 From: fleaz Date: Wed, 2 Apr 2025 21:59:35 +0200 Subject: [PATCH 5/5] modules/lix: Use unstable/lix instead of compiling it myself --- modules/lix.nix | 18 ++++-------------- overlay | 2 +- secrets | 2 +- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/modules/lix.nix b/modules/lix.nix index 34d1103..8264140 100644 --- a/modules/lix.nix +++ b/modules/lix.nix @@ -1,16 +1,6 @@ let - module = fetchTarball { - name = "source"; - url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0.tar.gz"; - sha256 = "sha256-YMLrcBpf0TR5r/eaqm8lxzFPap2TxCor0ZGcK3a7+b8="; - }; - lixSrc = fetchTarball { - name = "source"; - url = "https://git.lix.systems/lix-project/lix/archive/2.92.0.tar.gz"; - sha256 = "sha256-CCKIAE84dzkrnlxJCKFyffAxP3yfsOAbdvydUGqq24g="; - }; + unstable = import { }; in -# This is the core of the code you need; it is an exercise to the -# reader to write the sources in a nicer way, or by using npins or -# similar pinning tools. -import "${module}/module.nix" { lix = lixSrc; } +{ + nix.package = unstable.lix; +} diff --git a/overlay b/overlay index 62209bc..7fc5447 160000 --- a/overlay +++ b/overlay @@ -1 +1 @@ -Subproject commit 62209bcff29f6d2d1a643870b643d6c9d2577d5f +Subproject commit 7fc544758f1004ca7e193acc4a8d0ee784e585a9 diff --git a/secrets b/secrets index b5be703..0073a1e 160000 --- a/secrets +++ b/secrets @@ -1 +1 @@ -Subproject commit b5be7037c16f25899be906029de9dc9cb6f79ff8 +Subproject commit 0073a1ebe983e942b7a9513ef33ad29c6ac8d6ac