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 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 = "▏" }; } 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 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 ]; 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