From dd5b0e6ce6a33fb89d305aba22e7d2b1850167cd Mon Sep 17 00:00:00 2001 From: kurogeek Date: Thu, 12 Mar 2026 17:19:29 +0700 Subject: [PATCH] mob next [ci-skip] [ci skip] [skip ci] lastFile:flake.lock --- flake.lock | 24 +++++++++++++++++++ flake.nix | 5 ++++ .../clan/home-profiles/home-user/emmie.nix | 17 +++++++++++++ 3 files changed, 46 insertions(+) diff --git a/flake.lock b/flake.lock index f0111c9..d10be92 100644 --- a/flake.lock +++ b/flake.lock @@ -221,6 +221,29 @@ "type": "github" } }, + "plasma-manager": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772361940, + "narHash": "sha256-B1Cz+ydL1iaOnGlwOFld/C8lBECPtzhiy/pP93/CuyY=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "a4b33606111c9c5dcd10009042bb710307174f51", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, "root": { "inputs": { "clan-core": "clan-core", @@ -230,6 +253,7 @@ "import-tree": "import-tree", "liminix": "liminix", "nixpkgs": "nixpkgs", + "plasma-manager": "plasma-manager", "treefmt-nix": "treefmt-nix" } }, diff --git a/flake.nix b/flake.nix index 0797eb8..2894a35 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,11 @@ inputs.nixpkgs.follows = "nixpkgs"; url = "github:nix-community/home-manager"; }; + plasma-manager = { + url = "github:nix-community/plasma-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; import-tree.url = "github:vic/import-tree"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; treefmt-nix = { diff --git a/modules/clan/home-profiles/home-user/emmie.nix b/modules/clan/home-profiles/home-user/emmie.nix index a511c59..47c95a1 100644 --- a/modules/clan/home-profiles/home-user/emmie.nix +++ b/modules/clan/home-profiles/home-user/emmie.nix @@ -67,9 +67,12 @@ osConfig, pkgs, lib, + inputs, ... }: { + imports = [ inputs.plasma-manager.homeModules.plasma-manager ]; + home = { homeDirectory = lib.mkForce "/home/${username}"; stateVersion = osConfig.system.stateVersion; @@ -88,6 +91,20 @@ programs.chromium.package = pkgs.brave; programs.home-manager.enable = true; services.syncthing.tray.enable = osConfig.services.syncthing.enable; + programs.plasma.powerdevil = { + AC = { + autoSuspend.action = "shutDown"; + autoSuspend.idleTimeout = 1800; + }; + battery = { + autoSuspend.action = "shutDown"; + autoSuspend.idleTimeout = 1800; + }; + lowBattery = { + autoSuspend.action = "shutDown"; + autoSuspend.idleTimeout = 1800; + }; + }; }; home-manager.extraSpecialArgs = { inherit inputs;