aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-08-23 13:54:46 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-08-23 13:54:46 +0530
commit3f0367b09bed508021dd26fa892904bfea8528d6 (patch)
tree43d4f4b10f2ec9017c092df9be5dd5413395f584
parent3f18030ac8158d3eb50dd454c9d674a8c30ea659 (diff)
removed nix-index because it is slow as fuck + added brightness & red shifting keyboard shortcuts
-rw-r--r--flake.lock45
-rw-r--r--flake.nix2
-rw-r--r--home-manager/home.nix21
-rw-r--r--i3/config6
-rwxr-xr-xi3/red-shift.sh31
-rwxr-xr-xinstall.sh2
-rw-r--r--nixos/apps.nix4
-rw-r--r--nixos/desktop-environment.nix1
-rw-r--r--nixos/environment.nix1
9 files changed, 66 insertions, 47 deletions
diff --git a/flake.lock b/flake.lock
index d03e0cc..bd14ec0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,23 +1,5 @@
{
"nodes": {
- "greyline": {
- "inputs": {
- "nixpkgs": "nixpkgs"
- },
- "locked": {
- "lastModified": 1784713718,
- "narHash": "sha256-ar2eZLXZJEkkY0YpZiK9cEqlUisvkgpRtcezoexXC/w=",
- "owner": "FloatingComet62",
- "repo": "greyline",
- "rev": "a282e24763f5345dd3c48bd8f4c4dbf6c1f77469",
- "type": "github"
- },
- "original": {
- "owner": "FloatingComet62",
- "repo": "greyline",
- "type": "github"
- }
- },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -41,16 +23,16 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1781577229,
- "narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=",
+ "lastModified": 1784160687,
+ "narHash": "sha256-iYL/bixrb6FlHFu/gIuBYzq6c6lM5AAXsXNSWXtIgQc=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f",
+ "rev": "4382ed2b7a6839d4280a9b386db49cbc5907414d",
"type": "github"
},
"original": {
"owner": "nixos",
- "ref": "nixos-unstable",
+ "ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
@@ -71,22 +53,6 @@
"type": "github"
}
},
- "nixpkgs_2": {
- "locked": {
- "lastModified": 1784160687,
- "narHash": "sha256-iYL/bixrb6FlHFu/gIuBYzq6c6lM5AAXsXNSWXtIgQc=",
- "owner": "nixos",
- "repo": "nixpkgs",
- "rev": "4382ed2b7a6839d4280a9b386db49cbc5907414d",
- "type": "github"
- },
- "original": {
- "owner": "nixos",
- "ref": "nixos-26.05",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
"quickshell": {
"inputs": {
"nixpkgs": [
@@ -109,9 +75,8 @@
},
"root": {
"inputs": {
- "greyline": "greyline",
"home-manager": "home-manager",
- "nixpkgs": "nixpkgs_2",
+ "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"quickshell": "quickshell",
"zen-browser": "zen-browser"
diff --git a/flake.nix b/flake.nix
index b1e735e..eb4c1ed 100644
--- a/flake.nix
+++ b/flake.nix
@@ -21,7 +21,7 @@
home-manager.follows = "home-manager";
};
};
- greyline.url = "github:FloatingComet62/greyline";
+ # inputs.pi-flake.url = "github:ChauDucToan/pi-flake";
};
outputs = {
diff --git a/home-manager/home.nix b/home-manager/home.nix
index 54357ff..d4bd624 100644
--- a/home-manager/home.nix
+++ b/home-manager/home.nix
@@ -39,7 +39,7 @@ let
links = flatMerge [confFiles confDirs];
in {
- imports = [ inputs.greyline.homeManagerModules.default ];
+ # imports = [ inputs.pi-flake.homeManagerModules.default ];
xdg.configFile = links;
home.username = username;
@@ -63,4 +63,23 @@ in {
EDITOR = "nvim";
};
programs.home-manager.enable = true;
+ # programs.pi-coding-agent = {
+ # enable = true;
+ # package = inputs.pi-flake.packages.${pkgs.stdenv.hostPlatform.system}.default;
+ # mutableDir = true;
+ # models = {
+ # providers = {
+ # # my-provider = {
+ # # baseUrl = "https://api.openai.com/v1";
+ # # api = "openai-completions";
+ # # apiKey = "sk-...";
+ # # models = [{ id = "gpt-4o"; }];
+ # # };
+ # };
+ # };
+ #
+ # extensions = [
+ # "npm:pi-subagents"
+ # ];
+ # };
}
diff --git a/i3/config b/i3/config
index 98a1dd7..a60f479 100644
--- a/i3/config
+++ b/i3/config
@@ -7,6 +7,12 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
+bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set 10%+
+bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%-
+
+bindsym $mod+bracketleft exec --no-startup-id ~/.config/i3/red-shift.sh up
+bindsym $mod+bracketright exec --no-startup-id ~/.config/i3/red-shift.sh down
+
floating_modifier $mod
tiling_drag modifier titlebar
diff --git a/i3/red-shift.sh b/i3/red-shift.sh
new file mode 100755
index 0000000..bb847e6
--- /dev/null
+++ b/i3/red-shift.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+OUTPUT="eDP-1-1"
+STEP=0.1
+STATE="${XDG_RUNTIME_DIR:-/tmp}/xrandr-redshift"
+
+if [[ -f "$STATE" ]]; then
+ GAMMA=$(cat "$STATE")
+else
+ GAMMA=1.0
+fi
+
+case "$1" in
+ up)
+ GAMMA=$(awk -v g="$GAMMA" -v s="$STEP" 'BEGIN {
+ g -= s
+ if (g < 0.1) g = 0.1
+ printf "%.1f", g
+ }')
+ ;;
+ down)
+ GAMMA=$(awk -v g="$GAMMA" -v s="$STEP" 'BEGIN {
+ g += s
+ if (g > 1.0) g = 1.0
+ printf "%.1f", g
+ }')
+ ;;
+esac
+
+echo "$GAMMA" > "$STATE"
+xrandr --output "$OUTPUT" --gamma "1.0:${GAMMA}:${GAMMA}"
diff --git a/install.sh b/install.sh
index bb7e808..192e5d2 100755
--- a/install.sh
+++ b/install.sh
@@ -12,5 +12,3 @@ sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix
sudo nixos-rebuild switch --flake .#main
strfile ~/.config/fortune/showerthoughts
-
-nix-index
diff --git a/nixos/apps.nix b/nixos/apps.nix
index 29d3bbc..2c70c50 100644
--- a/nixos/apps.nix
+++ b/nixos/apps.nix
@@ -42,6 +42,6 @@
programs.thunderbird.enable = true;
- networking.firewall.allowedTCPPorts = [ 53317 41567 5173 22 ];
- networking.firewall.allowedUDPPorts = [ 53317 41567 5173 22 ];
+ networking.firewall.allowedTCPPorts = [ 53317 41567 5173 22 9600 ];
+ networking.firewall.allowedUDPPorts = [ 53317 41567 5173 22 9600 ];
}
diff --git a/nixos/desktop-environment.nix b/nixos/desktop-environment.nix
index 09fe302..9c79cd2 100644
--- a/nixos/desktop-environment.nix
+++ b/nixos/desktop-environment.nix
@@ -29,6 +29,7 @@
kitty
mesa-demos
xmodmap
+ brightnessctl
lxqt.lxqt-powermanagement
lxqt.pavucontrol-qt
diff --git a/nixos/environment.nix b/nixos/environment.nix
index c8139d0..cf9478c 100644
--- a/nixos/environment.nix
+++ b/nixos/environment.nix
@@ -82,7 +82,6 @@
x11vnc.out
];
programs.command-not-found.enable = false;
- programs.nix-index.enable = true;
fonts.packages = with pkgs; [
dejavu_fonts
nerd-fonts.jetbrains-mono