zenix: add hypridle and hyprlock, and format
This commit is contained in:
parent
c4abd3ddf0
commit
ce02fb7bee
11 changed files with 86 additions and 17 deletions
|
|
@ -6,10 +6,17 @@
|
||||||
}: let
|
}: let
|
||||||
modifier = config.windowManager.modifierKey;
|
modifier = config.windowManager.modifierKey;
|
||||||
menu = config.programs.menu.dmenuCommand;
|
menu = config.programs.menu.dmenuCommand;
|
||||||
|
lock_cmd = "${config.programs.hyprlock.package}/bin/hyprlock";
|
||||||
|
color = {
|
||||||
|
inherit (config.lib.stylix.colors) yellow red;
|
||||||
|
bg = config.lib.stylix.colors.base00;
|
||||||
|
fg = config.lib.stylix.colors.base07;
|
||||||
|
text = config.lib.stylix.colors.base05;
|
||||||
|
};
|
||||||
|
rgb = color: "rgb(${color})";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
(import ../utils/swaylock.nix)
|
|
||||||
(import ../utils/swayidle.nix)
|
|
||||||
(import ../utils/waybar.nix)
|
(import ../utils/waybar.nix)
|
||||||
(import ../utils/display.nix)
|
(import ../utils/display.nix)
|
||||||
];
|
];
|
||||||
|
|
@ -19,6 +26,64 @@ in {
|
||||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
before_sleep_cmd = "rbw lock";
|
||||||
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
|
ignore_dbus_inhibit = false;
|
||||||
|
lock_cmd = "pidof ${lock_cmd} || ${lock_cmd}";
|
||||||
|
};
|
||||||
|
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 300;
|
||||||
|
on-timeout = "loginctl lock-session";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1200;
|
||||||
|
on-timeout = "hyprctl dispatch dpms off";
|
||||||
|
on-resume = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprlock = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
# https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/
|
||||||
|
general = {
|
||||||
|
disable_loading_bar = true;
|
||||||
|
hide_cursor = true;
|
||||||
|
no_fade_in = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
background = [
|
||||||
|
{
|
||||||
|
path = "screenshot";
|
||||||
|
blur_passes = 3;
|
||||||
|
blur_size = 8;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
input-field = [
|
||||||
|
{
|
||||||
|
dots_center = true;
|
||||||
|
fade_on_empty = true;
|
||||||
|
outline_thickness = 5;
|
||||||
|
shadow_passes = 2;
|
||||||
|
inner_color = rgb color.bg;
|
||||||
|
outer_color = rgb color.fg;
|
||||||
|
font_color = rgb color.text;
|
||||||
|
fail_color = rgb color.red;
|
||||||
|
check_color = rgb color.yellow;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd = {
|
systemd = {
|
||||||
|
|
@ -26,7 +91,6 @@ in {
|
||||||
variables = ["--all"];
|
variables = ["--all"];
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
exec-once = ["${pkgs.swaybg}/bin/swaybg -i ${config.stylix.image} -m fill"];
|
|
||||||
input = {
|
input = {
|
||||||
touchpad = {
|
touchpad = {
|
||||||
natural_scroll = true;
|
natural_scroll = true;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
{
|
||||||
timeout = 300;
|
timeout = 300;
|
||||||
command = "${pkgs.swaylock-effects}/bin/swaylock -f";
|
command = "loginctl lock-session";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
timeout = 600;
|
timeout = 600;
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
# other
|
# other
|
||||||
nheko
|
nheko
|
||||||
|
cinny-desktop
|
||||||
brave
|
brave
|
||||||
vieb
|
vieb
|
||||||
bitwarden
|
bitwarden
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
grim = "${pkgs.grim}/bin/grim";
|
grim = "${pkgs.grim}/bin/grim";
|
||||||
slurp = "${pkgs.slurp}/bin/slurp";
|
slurp = "${pkgs.slurp}/bin/slurp";
|
||||||
amixer = "${pkgs.alsa-utils}/bin/amixer";
|
amixer = "${pkgs.alsa-utils}/bin/amixer";
|
||||||
swaybg = "${pkgs.swaybg}/bin/swaybg";
|
|
||||||
chafa = "${pkgs.chafa}/bin/chafa";
|
chafa = "${pkgs.chafa}/bin/chafa";
|
||||||
exiftool = "${pkgs.exiftool}/bin/exiftool";
|
exiftool = "${pkgs.exiftool}/bin/exiftool";
|
||||||
wc = "${pkgs.coreutils}/bin/wc";
|
wc = "${pkgs.coreutils}/bin/wc";
|
||||||
|
|
@ -25,6 +24,7 @@
|
||||||
gawk = "${pkgs.gawk}/bin/awk";
|
gawk = "${pkgs.gawk}/bin/awk";
|
||||||
hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker";
|
hyprpicker = "${pkgs.hyprpicker}/bin/hyprpicker";
|
||||||
sed = "${pkgs.gnused}/bin/sed";
|
sed = "${pkgs.gnused}/bin/sed";
|
||||||
|
lock = "${pkgs.hyprlock}/bin/hyprlock";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
programs.scripts = [
|
programs.scripts = [
|
||||||
|
|
@ -279,7 +279,7 @@ in {
|
||||||
sleep
|
sleep
|
||||||
hibernate" | ${my-deps.menu})
|
hibernate" | ${my-deps.menu})
|
||||||
case $res in
|
case $res in
|
||||||
lock) swaylock;;
|
lock) ${my-deps.lock};;
|
||||||
sleep) systemctl suspend;;
|
sleep) systemctl suspend;;
|
||||||
hibernate) systemctl hibernate;;
|
hibernate) systemctl hibernate;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
CYPRESS_INSTALL_BINARY=0;
|
CYPRESS_INSTALL_BINARY = 0;
|
||||||
CYPRESS_RUN_BINARY="${pkgs.cypress}/bin/Cypress";
|
CYPRESS_RUN_BINARY = "${pkgs.cypress}/bin/Cypress";
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk.gtk3.bookmarks = [
|
gtk.gtk3.bookmarks = [
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,3 @@ final: prev: {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ in {
|
||||||
# breaks some work projects ):<
|
# breaks some work projects ):<
|
||||||
networking.stevenblack.enable = false;
|
networking.stevenblack.enable = false;
|
||||||
|
|
||||||
nixpkgs.overlays = [ (import ../../lib/cypress.nix) ];
|
nixpkgs.overlays = [(import ../../lib/cypress.nix)];
|
||||||
|
|
||||||
services.onedrive.enable = true;
|
services.onedrive.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
inputs.nixos-cosmic.nixosModules.default
|
inputs.nixos-cosmic.nixosModules.default
|
||||||
];
|
];
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = [ "https://cosmic.cachix.org/" ];
|
substituters = ["https://cosmic.cachix.org/"];
|
||||||
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
|
trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
|
||||||
};
|
};
|
||||||
services.desktopManager.cosmic.enable = true;
|
services.desktopManager.cosmic.enable = true;
|
||||||
services.displayManager.cosmic-greeter.enable = true;
|
services.displayManager.cosmic-greeter.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
{lib, pkgs, ...}: {
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||||
builtins.elem (lib.getName pkg) [
|
builtins.elem (lib.getName pkg) [
|
||||||
"steam"
|
"steam"
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
networking.firewall.allowedTCPPorts = [4713];
|
networking.firewall.allowedTCPPorts = [4713];
|
||||||
|
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.swaylock = {};
|
||||||
|
security.pam.services.hyprlock = {};
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
systemd.user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
description = "polkit-gnome-authentication-agent-1";
|
description = "polkit-gnome-authentication-agent-1";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue