From 03b7aa9bf0347e0fe5645fe5660d907a5c6945e1 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Mon, 18 Mar 2024 13:15:13 +0100 Subject: [PATCH] WIP: add hypridle --- common/hypridle.nix | 8 ++ common/hyprland.nix | 1 + flake.lock | 213 ++++++-------------------------------------- flake.nix | 9 +- 4 files changed, 39 insertions(+), 192 deletions(-) create mode 100644 common/hypridle.nix diff --git a/common/hypridle.nix b/common/hypridle.nix new file mode 100644 index 0000000..a0538b8 --- /dev/null +++ b/common/hypridle.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + options.services.hypridle = { + enable = true; + # TODO: find commands to turn on/off monitors + }; +} diff --git a/common/hyprland.nix b/common/hyprland.nix index 637d1d4..b3b6435 100644 --- a/common/hyprland.nix +++ b/common/hyprland.nix @@ -6,6 +6,7 @@ ./kitty.nix ./waybar.nix ./wofi.nix + ./hypridle.nix ]; home.packages = with pkgs; [ hyprland diff --git a/flake.lock b/flake.lock index b4a2206..32f0950 100644 --- a/flake.lock +++ b/flake.lock @@ -131,7 +131,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1701680307, @@ -149,7 +149,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_4" + "systems": "systems_3" }, "locked": { "lastModified": 1701680307, @@ -228,121 +228,41 @@ "type": "github" } }, - "hyprcursor": { + "hypridle": { "inputs": { "hyprlang": "hyprlang", "nixpkgs": [ - "hyprland", "nixpkgs" ], - "systems": [ - "hyprland", - "systems" - ] + "systems": "systems" }, "locked": { - "lastModified": 1710257359, - "narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=", + "lastModified": 1710180874, + "narHash": "sha256-ZSn3wXQuRz36Ta/L+UCFKuUVG6QpwK2QmRkPjpQprU4=", "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974", + "repo": "hypridle", + "rev": "4395339a2dc410bcf49f3e24f9ed3024fdb25b0a", "type": "github" }, "original": { "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "hyprcursor": "hyprcursor", - "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang_2", - "nixpkgs": "nixpkgs", - "systems": "systems_2", - "wlroots": "wlroots", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1710735304, - "narHash": "sha256-U8JPTqW1CG3q7gQheidY5w/D7V6oNmwbyNkoVE7tiCM=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "7587cadd0a4e94c9ba42c00307854052798cf9b2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1691753796, - "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", + "repo": "hypridle", "type": "github" } }, "hyprlang": { "inputs": { "nixpkgs": [ - "hyprland", - "hyprcursor", + "hypridle", "nixpkgs" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprlang_2": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" ] }, "locked": { - "lastModified": 1709914708, - "narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=", + "lastModified": 1708212860, + "narHash": "sha256-nW3Zrhh9RJcMTvOcXAaKADnJM/g6tDf3121lJtTHnYo=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2", + "rev": "11d5ccda071c153dfdc18ef65338956a51cef96a", "type": "github" }, "original": { @@ -393,15 +313,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1710272261, - "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", - "owner": "NixOS", + "lastModified": 1710631334, + "narHash": "sha256-rL5LSYd85kplL5othxK5lmAtjyMOBg390sGBTb3LRMM=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", + "rev": "c75037bbf9093a2acb617804ee46320d6d1fea5a", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -422,22 +342,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1710631334, - "narHash": "sha256-rL5LSYd85kplL5othxK5lmAtjyMOBg390sGBTb3LRMM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "c75037bbf9093a2acb617804ee46320d6d1fea5a", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { "devshell": "devshell", @@ -497,9 +401,9 @@ "automapaper": "automapaper", "disko": "disko", "home-manager": "home-manager", - "hyprland": "hyprland", + "hypridle": "hypridle", "nix-colors": "nix-colors", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "nixvim": "nixvim" } }, @@ -520,16 +424,16 @@ }, "systems_2": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -547,73 +451,6 @@ "repo": "default", "type": "github" } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "wlroots": { - "flake": false, - "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1709983277, - "narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", - "type": "gitlab" - }, - "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b", - "type": "gitlab" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1709299639, - "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "2d2fb547178ec025da643db57d40a971507b82fe", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 291d114..2956059 100644 --- a/flake.nix +++ b/flake.nix @@ -25,9 +25,9 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland = { - url = "github:hyprwm/Hyprland"; - # inputs.nixpkgs.follows = "nixpkgs"; + hypridle = { + url = "github:hyprwm/hypridle"; + inputs.nixpkgs.follows = "nixpkgs"; }; disko = { @@ -37,7 +37,7 @@ }; - outputs = { self, nixpkgs, nix-colors, automapaper, disko, ... }@inputs: + outputs = { self, nixpkgs, nix-colors, automapaper, disko, hypridle, ... }@inputs: { nixosConfigurations = { default = nixpkgs.lib.nixosSystem { @@ -45,6 +45,7 @@ inherit inputs; inherit nix-colors; inherit automapaper; + inherit hypridle; }; modules = [ ./hosts/default/configuration.nix