diff --git a/instances/sif/configuration.nix b/instances/sif/configuration.nix index d1e12db..bb97cd4 100644 --- a/instances/sif/configuration.nix +++ b/instances/sif/configuration.nix @@ -183,7 +183,7 @@ i18n.defaultLocale = "it_IT.UTF-8"; console = { font = "Lat2-Terminus16"; - keyMap = "it"; + keyMap = "us"; }; environment = { diff --git a/instances/sif/hm.nix b/instances/sif/hm.nix index 4c4f743..c628396 100644 --- a/instances/sif/hm.nix +++ b/instances/sif/hm.nix @@ -3,8 +3,8 @@ home = { language.base = "it_IT.UTF-8"; keyboard = { - layout = "it,us,us"; - variant = ",,colemak"; + layout = "us,us,it"; + variant = ",colemak,"; options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" diff --git a/modules/hm/hyprland.nix b/modules/hm/hyprland.nix index 836d5e4..7628ce6 100644 --- a/modules/hm/hyprland.nix +++ b/modules/hm/hyprland.nix @@ -1,4 +1,4 @@ -{ nixosConfig, lib, pkgs, ... }: +{ nixosConfig, config, lib, pkgs, ... }: with nixosConfig.nix-rice.lib; let strPalette = palette.toRgbaShortHex nixosConfig.nix-rice.rice.colorPalette; @@ -11,6 +11,7 @@ in ./nemo.nix ./waybar.nix # ./dunst.nix + ./hyprlock.nix ./swayidle.nix ./swaynotificationcenter.nix ./wl_update_background.nix @@ -168,7 +169,7 @@ in "SUPER, RETURN, exec, kitty" "SUPER, W, killactive," - "SUPER, M, exec, wl-lockscreen" + "SUPER, M, exec, ${config.programs.hyprlock.package}/bin/hyprlock" "SUPER_ALT_L, Q, exit," "SUPER, E, exec, nautilus" "SUPER, L, exec, logseq" diff --git a/modules/hm/hyprlock.nix b/modules/hm/hyprlock.nix new file mode 100644 index 0000000..bfdcb39 --- /dev/null +++ b/modules/hm/hyprlock.nix @@ -0,0 +1,66 @@ +{ nixosConfig, ... }: +with nixosConfig.nix-rice.lib; +let + strPalette = palette.toRgbaShortHex nixosConfig.nix-rice.rice.colorPalette; +in +{ + programs.hyprlock = { + enable = true; + settings = { + general = { + ignore_empty_input = true; + no_fade_in = false; + no_fade_out = false; + hide_cursor = true; + }; + + background = { + monitor = ""; + path = toString ../../wallpapers/n8ca4obsys991.png; + blur_passes = 0; + }; + + label = { + monitor = ""; + text = "󰌾 $TIME"; + color = "rgba(${strPalette.primary.foreground})"; + font_size = 25; + font_family = nixosConfig.nix-rice.rice.font.monospace.name; + rotate = 0; + position = "85, 100"; + halign = "left"; + valign = "bottom"; + }; + + input-field = { + monitor = ""; + size = "170, 30"; + outline_thickness = 2; + dots_size = 0.33; + dots_spacing = 0.15; + dots_center = true; + dots_rounding = -1; + outer_color = "rgba(${strPalette.primary.foreground})"; + inner_color = "rgba(${strPalette.primary.background})"; + font_color = "rgba(${strPalette.primary.foreground})"; + fade_on_empty = true; + fade_timeout = 1000; + placeholder_text = ""; + hide_input = false; + rounding = -1; + check_color = "rgba(${strPalette.normal.yellow})"; + fail_color = "rgba(${strPalette.normal.yellow})"; + fail_text = "Wrong password"; + fail_transition = 200; + capslock_color = -1; + numlock_color = -1; + bothlock_color = -1; + invert_numlock = false; + swap_font_color = false; + position = "60, 50"; + halign = "left"; + valign = "bottom"; + }; + }; + }; +} diff --git a/modules/hm/swayidle.nix b/modules/hm/swayidle.nix index 7ca6ee8..172b659 100644 --- a/modules/hm/swayidle.nix +++ b/modules/hm/swayidle.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { home.packages = builtins.attrValues { inherit (pkgs) brillo; }; @@ -7,11 +7,11 @@ events = [ { event = "before-sleep"; - command = "${pkgs.wl-lockscreen}/bin/wl-lockscreen"; + command = "${config.programs.hyprlock.package}/bin/hyprlock"; } { event = "lock"; - command = "${pkgs.wl-lockscreen}/bin/wl-lockscreen"; + command = "${config.programs.hyprlock.package}/bin/hyprlock"; } ]; timeouts = [ @@ -22,7 +22,7 @@ } { timeout = 120; - command = "${pkgs.brillo}/bin/brillo -e -S 0; ${pkgs.wl-lockscreen}/bin/wl-lockscreen"; + command = "${pkgs.brillo}/bin/brillo -e -S 0; ${config.programs.hyprlock.package}/bin/hyprlock"; resumeCommand = "${pkgs.brillo}/bin/brillo -e -S 100"; } ];