Turn monitor off when suspending or shutdown after 9pm
This commit is contained in:
parent
04e890ce58
commit
6e5b414ec8
4 changed files with 46 additions and 30 deletions
56
flake.lock
generated
56
flake.lock
generated
|
@ -69,11 +69,11 @@
|
|||
"firefox-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733270341,
|
||||
"narHash": "sha256-Q8W1YlsZmxhUaXLOJhPCeEzKqaqmspT9VKYZxn5Kh40=",
|
||||
"lastModified": 1734969791,
|
||||
"narHash": "sha256-A9PxLienMYJ/WUvqFie9qXrNC2MeRRYw7TG/q7DRjZg=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"rev": "aa9b67045fcdec7ae045b36d7a41b36b3463b842",
|
||||
"rev": "92f4890bd150fc9d97b61b3583680c0524a8cafe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -175,11 +175,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733873195,
|
||||
"narHash": "sha256-dTosiZ3sZ/NKoLKQ++v8nZdEHya0eTNEsaizNp+MUPM=",
|
||||
"lastModified": 1734944412,
|
||||
"narHash": "sha256-36QfCAl8V6nMIRUCgiC79VriJPUXXkHuR8zQA1vAtSU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f26aa4b76fb7606127032d33ac73d7d507d82758",
|
||||
"rev": "8264bfe3a064d704c57df91e34b795b6ac7bad9e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -215,11 +215,11 @@
|
|||
"umu": "umu"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733821969,
|
||||
"narHash": "sha256-JYAnT6hfRXdBNRCmhZa3XPFv19zbWXi8DDcY9AeNiQI=",
|
||||
"lastModified": 1734831989,
|
||||
"narHash": "sha256-YrMVnLkWxV+qmN9ZuUo00yYJFtU1r4L5ho8l3X3ScHA=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "89887483a47f9e7e849d43e5992f9da54b3e8e0e",
|
||||
"rev": "e45e2276facb9218c119e68c45efd2f9e79d292d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -230,11 +230,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1733212471,
|
||||
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
|
||||
"lastModified": 1734649271,
|
||||
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
|
||||
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -258,11 +258,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1733376361,
|
||||
"narHash": "sha256-aLJxoTDDSqB+/3orsulE6/qdlX6MzDLIITLZqdgMpqo=",
|
||||
"lastModified": 1734435836,
|
||||
"narHash": "sha256-kMBQ5PRiFLagltK0sH+08aiNt3zGERC2297iB6vrvlU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "929116e316068c7318c54eb4d827f7d9756d5e9c",
|
||||
"rev": "4989a246d7a390a859852baddb1013f825435cee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -274,11 +274,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1733759999,
|
||||
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
|
||||
"lastModified": 1734649271,
|
||||
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
|
||||
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -312,11 +312,11 @@
|
|||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733919521,
|
||||
"narHash": "sha256-/UkFfezRLg/MA6q5GXCAJMGl2EWESWor+PT+xnWylnU=",
|
||||
"lastModified": 1734968544,
|
||||
"narHash": "sha256-kunOyFwo2gBEC/x4GbvOY0f34b4usonII902vxNWBo0=",
|
||||
"owner": "wamserma",
|
||||
"repo": "flake-programs-sqlite",
|
||||
"rev": "0da17397073b149cca1e96e217d5952b7221c198",
|
||||
"rev": "5953ae011a587a6e08b340fc866e61aae2edb571",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -353,11 +353,11 @@
|
|||
"tinted-tmux": "tinted-tmux"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733858997,
|
||||
"narHash": "sha256-PMZdRUZQlouWgHFCFW8ANDFL6fUjZ67KAEaqRXwRwvc=",
|
||||
"lastModified": 1734885904,
|
||||
"narHash": "sha256-NxA4JnLuXyle2/nUKDbW8vORwSd+Z20limIl7DhlZbs=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "bc25f3d69d3bb54548b772d7c2771e65cc37dc10",
|
||||
"rev": "4d87b96ceca38532f39c1b7efd8a9235bfcee3d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -440,11 +440,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "packaging/nix",
|
||||
"lastModified": 1733509971,
|
||||
"narHash": "sha256-LZIrb7HNWyLMU+dSI4fhbo2dMzJbbKKFWwYOpJwVXKE=",
|
||||
"lastModified": 1734207213,
|
||||
"narHash": "sha256-5CZPAeKm24Y1BKnN8Md3HUViCMCs7AVghRC+05Bdlkk=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "562e3900eebde0fb276dd2f425c097c8b44ccb92",
|
||||
"revCount": 865,
|
||||
"rev": "6189d0d9fd062e89a375db20aeae1d1c009e9833",
|
||||
"revCount": 869,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
hardware.i2c.enable = true;
|
||||
environment.systemPackages = with pkgs.gnomeExtensions; [
|
||||
caffeine
|
||||
open-bar
|
||||
|
|
17
modules/common-desktop/monitor.nix
Normal file
17
modules/common-desktop/monitor.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
hardware.i2c.enable = true;
|
||||
systemd.services.monitor = {
|
||||
script = "if [[ $(${pkgs.coreutils}/bin/date +%H) -ge 20 ]]; then ${lib.meta.getExe pkgs.ddcutil} setvcp D6 05; fi";
|
||||
wantedBy = ["suspend.target" "shutdown.target"];
|
||||
before = ["suspend.target" "shutdown.target"];
|
||||
|
||||
serviceConfig = {
|
||||
StopWhenUnneeded = true;
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -13,7 +13,6 @@
|
|||
heroic
|
||||
aspell
|
||||
muzika
|
||||
ddcutil
|
||||
fractal
|
||||
killall
|
||||
ripgrep
|
||||
|
@ -29,6 +28,7 @@
|
|||
protontricks
|
||||
prismlauncher
|
||||
android-studio
|
||||
nexusmods-app-unfree
|
||||
nodePackages_latest.pnpm
|
||||
hunspellDicts.en_CA-large
|
||||
inputs.nix-gaming.packages.${system}.wine-ge
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue