{ inputs, self, ... }: { flake.homeConfigurations.takamaki = inputs.home-manager.lib.homeManagerConfiguration { pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; modules = with self.homeModules; [ takamaki ]; }; flake.homeModules.takamaki = { pkgs, config, lib, ... }: { imports = with self.homeModules; [ global graphics ]; info = { rootPath = "/home/grey/flake"; hostName = "takamaki"; stateVersion = "26.11"; }; services.gpg-agent = { enable = true; extraConfig = '' pinentry-program /usr/bin/pinentry ''; }; features = { shells.zsh = { enable = true; antidote.enable = true; }; applications = { cli = { fastfetch.enable = true; }; gui = { vscode.enable = true; }; extraPackages = with pkgs; [ (writeShellScriptBin "switch-os" '' sudo efibootmgr --bootnext 0000 sudo reboot '') (writeShellScriptBin "universal-reboot" '' sudo reboot '') (writeShellScriptBin "universal-shutdown" '' sudo systemctl poweroff '') (writeShellScriptBin "increase-brightness" '' LOOP_COUNTER=0 DEVICE=$1 PRETTY_NAME=$(sudo ddccontrol dev:$DEVICE 2>&1 >/dev/null | grep -oP "/usr/share/ddccontrol-db/monitor/\K.+\.xml" | sed 's/.xml//') while RESULT=$(sudo ddccontrol -r 0x10 -W +5 dev:$DEVICE 2> /dev/null) WRITTEN=$(echo $RESULT | grep -oP "Writing.+\(\K\d{1,3}\)" | sed 's/)//') CONTROL=$(echo $RESULT | grep -oP "Control.+\+/\K\d{1,3}/100" | sed 's/\/100//') LOOP_COUNTER=$(($LOOP_COUNTER + 1)) [[ "$WRITTEN" != "$CONTROL" ]] && [ $LOOP_COUNTER -lt 10 ] do true; done noctalia msg notification-show "Set brightness to $WRITTEN for display $PRETTY_NAME" '') (writeShellScriptBin "decrease-brightness" '' LOOP_COUNTER=0 DEVICE=$1 PRETTY_NAME=$(sudo ddccontrol dev:$DEVICE 2>&1 >/dev/null | grep -oP "/usr/share/ddccontrol-db/monitor/\K.+\.xml" | sed 's/.xml//') while RESULT=$(sudo ddccontrol -r 0x10 -W -5 dev:$DEVICE 2> /dev/null) WRITTEN=$(echo $RESULT | grep -oP "Writing.+\(\K\d{1,3}\)" | sed 's/)//') CONTROL=$(echo $RESULT | grep -oP "Control.+\+/\K\d{1,3}/100" | sed 's/\/100//') LOOP_COUNTER=$(($LOOP_COUNTER + 1)) [[ "$WRITTEN" != "$CONTROL" ]] && [ $LOOP_COUNTER -lt 10 ] do true; done noctalia msg notification-show "Set brightness to $WRITTEN for display $PRETTY_NAME" '') ]; }; }; }; }