Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions config/hyprland/hypridle.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,29 @@ listener {
on-resume = brightnessctl -r
}

# Lock screen after 5 minutes
# Lock screen after 5 minutes (only on battery)
listener {
timeout = 300
on-timeout = loginctl lock-session
on-timeout = bash -c 'cat /sys/class/power_supply/AC*/online | grep -q 0 && loginctl lock-session'

@cubic-dev-ai cubic-dev-ai Bot Mar 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Battery detection checks for “any offline AC input” instead of “no AC input online,” which can trigger battery-only lock behavior while plugged in on multi-input systems.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At config/hyprland/hypridle.conf, line 25:

<comment>Battery detection checks for “any offline AC input” instead of “no AC input online,” which can trigger battery-only lock behavior while plugged in on multi-input systems.</comment>

<file context>
@@ -19,16 +19,29 @@ listener {
 listener {
     timeout = 300
-    on-timeout = loginctl lock-session
+    on-timeout = bash -c 'cat /sys/class/power_supply/AC*/online | grep -q 0 && loginctl lock-session'
 }
 
</file context>
Suggested change
on-timeout = bash -c 'cat /sys/class/power_supply/AC*/online | grep -q 0 && loginctl lock-session'
on-timeout = bash -c '! grep -q 1 /sys/class/power_supply/AC*/online && loginctl lock-session'
Fix with Cubic

}

# Turn off display after 5.5 minutes
# Lock screen after 10 minutes (only on AC)
listener {
timeout = 600
on-timeout = bash -c 'cat /sys/class/power_supply/AC*/online | grep -q 1 && loginctl lock-session'
}

# Turn off display after 5.5 minutes (only on battery)
listener {
timeout = 330
on-timeout = hyprctl dispatch dpms off
on-timeout = bash -c 'cat /sys/class/power_supply/AC*/online | grep -q 0 && hyprctl dispatch dpms off'
on-resume = hyprctl dispatch dpms on
}

# Turn off display after 10.5 minutes (only on AC)
listener {
timeout = 630
on-timeout = bash -c 'cat /sys/class/power_supply/AC*/online | grep -q 1 && hyprctl dispatch dpms off'
on-resume = hyprctl dispatch dpms on
}

Expand Down
6 changes: 3 additions & 3 deletions home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
}:
let
hmConfig = import ../config { inherit inputs; };
packages = import ./packages { inherit pkgs inputs; };
misc = import ./misc;
modules = import ./modules;
nix = import ./nix;
packages = import ./packages { inherit pkgs inputs; };
programs = import ./programs {
inherit config lib pkgs;
sources = { };
Expand All @@ -22,8 +22,8 @@ in
{
imports =
hmConfig
++ misc
++ modules
++ nix
++ programs
++ services
++ [
Expand Down
3 changes: 0 additions & 3 deletions home-manager/misc/default.nix

This file was deleted.

10 changes: 0 additions & 10 deletions home-manager/misc/nix/default.nix

This file was deleted.

3 changes: 3 additions & 0 deletions home-manager/nix/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[
./nix.nix
]
37 changes: 37 additions & 0 deletions home-manager/nix/nix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
lib,
pkgs,
inputs,
...
}:
{
nix = {
package = lib.mkDefault pkgs.lixPackageSets.latest.lix;
enable = true;
registry.nixpkgs.flake = inputs.nixpkgs;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
use-xdg-base-directories = true;
substituters = [
"https://cache.nixos.org"
"https://cache.garnix.io"
"https://cloudtide.cachix.org"
"https://nix-community.cachix.org"
"https://yazi.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"cloudtide.cachix.org-1:9NZ1Mah2+u8cd/CmVffFV23z5uFNpZSrhfgTt5fuN/4="
"yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k="
];
};
gc = {
automatic = true;
};
};
}
13 changes: 6 additions & 7 deletions named-hosts/matic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,19 @@ inputs.nixpkgs.lib.nixosSystem {
zlib
];

# Nix settings
# NixOS-level nix settings (complements home-manager nix/)

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment still refers to home-manager misc/nix, but this PR flattens that to home-manager/nix. Updating the comment will avoid confusion when tracking where nix.conf settings come from.

Suggested change
# NixOS-level nix settings (complements home-manager nix/)
# NixOS-level nix settings (complements home-manager/nix)

Copilot uses AI. Check for mistakes.
nix = {
channel.enable = false;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
nix-path = lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";

Copilot AI Mar 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

experimental-features (flakes + nix-command) was removed from this host’s NixOS nix.settings. Other NixOS configs in this repo still explicitly set these (e.g. hosts/nixos/default.nix), and without them nixos-rebuild --flake / flake-based nix commands can fail depending on the Nix version. Consider restoring nix.settings.experimental-features = [ "nix-command" "flakes" ]; here (or explicitly switching the system nix.package to one where flakes are enabled by default).

Suggested change
nix-path = lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";
nix-path = lib.mkForce "nixpkgs=/etc/nix/inputs/nixpkgs";
experimental-features = [ "nix-command" "flakes" ];

Copilot uses AI. Check for mistakes.
trusted-users = [
"root"
username
"@wheel"
"root"
];
};
package = pkgs.nixVersions.stable;
};
environment.etc."nix/inputs/nixpkgs".source = "${inputs.nixpkgs}";

system.stateVersion = "24.11";
}
Expand Down
1 change: 1 addition & 0 deletions nix-darwin/config/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"com.apple.screensaver" = {
askForPassword = true;
askForPasswordDelay = 0;
idleTime = 600;
};
"com.apple.screencapture" = {
location = "~/Desktop";
Expand Down
Loading