From 04ad07459e7ae6b92d18a927709fe0bc0878509a Mon Sep 17 00:00:00 2001 From: Liam Malone Date: Thu, 23 May 2024 13:34:57 +0100 Subject: [PATCH] updates --- flake.lock | 114 +++++++++++++++-------------------- flake.nix | 2 +- hosts/default/home.nix | 17 +++--- modules/desktop/hyprland.nix | 107 ++++++++++++++++++-------------- 4 files changed, 119 insertions(+), 121 deletions(-) diff --git a/flake.lock b/flake.lock index bc8c56c..b853807 100644 --- a/flake.lock +++ b/flake.lock @@ -88,11 +88,11 @@ "zls": "zls" }, "locked": { - "lastModified": 1715104037, - "narHash": "sha256-WHJUTRRCtmpTB32o8W30uLgLuVVI9j3hANhQcB1GXZk=", + "lastModified": 1716408918, + "narHash": "sha256-OGcTrigpdkXOesNmoKJZ/3m6gEvfoqFStPbI8ZFbZZs=", "ref": "refs/heads/main", - "rev": "4dd3b107c67513d6642481eb648fd65ed5c080f7", - "revCount": 6069, + "rev": "51b6bf46bf4f2302591ae854097e140ee2fcbe1a", + "revCount": 6175, "type": "git", "url": "ssh://git@github.com/mitchellh/ghostty.git" }, @@ -130,11 +130,11 @@ ] }, "locked": { - "lastModified": 1714679908, - "narHash": "sha256-KzcXzDvDJjX34en8f3Zimm396x6idbt+cu4tWDVS2FI=", + "lastModified": 1716457508, + "narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=", "owner": "nix-community", "repo": "home-manager", - "rev": "9036fe9ef8e15a819fa76f47a8b1f287903fb848", + "rev": "850cb322046ef1a268449cf1ceda5fd24d930b05", "type": "github" }, "original": { @@ -159,11 +159,11 @@ ] }, "locked": { - "lastModified": 1713612213, - "narHash": "sha256-zJboXgWNpNhKyNF8H/3UYzWkx7w00TOCGKi3cwi+tsw=", + "lastModified": 1716327911, + "narHash": "sha256-PI+wygItS/TKzi4gEAROvKTUzTx9GT+PGBttS/IOA/Q=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "cab4746180f210a3c1dd3d53e45c510e309e90e1", + "rev": "27ca640abeef2d425b5dbecf804f5eb622cef56d", "type": "github" }, "original": { @@ -181,11 +181,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1713472482, - "narHash": "sha256-7Ft5WZTMIjXOGgRCf31DZBwK6RK8xkeKlD5vFXz3gII=", + "lastModified": 1716309977, + "narHash": "sha256-4jDQIcMDSFOOMBxVTEiC6Ck1vdc0kAFvv+StxnnE59Q=", "owner": "hyprwm", "repo": "hypridle", - "rev": "7cff4581a3753154fc5b41f39a098fad49b777b1", + "rev": "cb169c4e06cec9b4349e3668427e729d22328a54", "type": "github" }, "original": { @@ -197,26 +197,26 @@ "hyprland": { "inputs": { "hyprcursor": "hyprcursor", - "hyprland-protocols": "hyprland-protocols", "hyprlang": "hyprlang_2", "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": "nixpkgs", "systems": "systems_4", - "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1714700359, - "narHash": "sha256-y5ecarXckRPV+K6cmfcWs/RiyvZbNZDkA5su9gEQ/6I=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "387127b12ab5df8f8f40e8da7d76f47636562cab", - "type": "github" + "lastModified": 1716465152, + "narHash": "sha256-5kspSEWu9qNNhGmTorSAIA7ociJpy0UpeDh/uZ9nwnY=", + "ref": "refs/heads/main", + "rev": "df80fbf70650dfb0d96381a1d86d30811cf516f4", + "revCount": 4730, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" }, "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" } }, "hyprland-plugins": { @@ -231,11 +231,11 @@ ] }, "locked": { - "lastModified": 1714613493, - "narHash": "sha256-OhEh+iBiDRMnMNTWz5cHhfg+63+F71DKM2Xj9a21rw0=", + "lastModified": 1715722806, + "narHash": "sha256-KrSLG2H3KGELxTFdiBhv8U6D53Q3UsJsQO+KgEabsNA=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "18daf37b7c4e6e51ca2bf8953ce4cff1c38ca725", + "rev": "c28d1011f4868c1a1ee80b10d9ee79900686df82", "type": "github" }, "original": { @@ -248,10 +248,12 @@ "inputs": { "nixpkgs": [ "hyprland", + "xdph", "nixpkgs" ], "systems": [ "hyprland", + "xdph", "systems" ] }, @@ -303,11 +305,11 @@ ] }, "locked": { - "lastModified": 1713121246, - "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", + "lastModified": 1715791527, + "narHash": "sha256-HhQ4zvGHrRjR63ltySSeg+x+0jb0lepiutWdnFhLRoo=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", + "rev": "969cb076e5b76f2e823aeca1937a3e1f159812ee", "type": "github" }, "original": { @@ -347,11 +349,11 @@ "systems": "systems_6" }, "locked": { - "lastModified": 1714659497, - "narHash": "sha256-CJH9xc2y0AU+2GQSg2dubcPep/iIwb5f/cr2+0LGBWY=", + "lastModified": 1716461934, + "narHash": "sha256-5j/GfBVkgqGTlEA7s/6CBn0pKK6ohXQi38lkKeno/mA=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "9cca0dbb45941e13322ff95796f486676f061c6e", + "rev": "972c1c27e6b057e5e891b6ae9f5b2c83bac1e087", "type": "github" }, "original": { @@ -372,11 +374,11 @@ ] }, "locked": { - "lastModified": 1714589749, - "narHash": "sha256-zzkb5vc4n/YI5KHrMie7oMZlgCKxs7zm/ybVXNL02Z0=", + "lastModified": 1716058375, + "narHash": "sha256-CwjWoVnBZE5SBpRx9dgSQGCr4Goxyfcyv3zZbOhVqzk=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "c8c2151c607a036ddfc790f5f70237ab984266aa", + "rev": "3afed4364790aebe0426077631af1e164a9650cc", "type": "github" }, "original": { @@ -399,11 +401,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1714253743, - "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", + "lastModified": 1716330097, + "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", + "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2", "type": "github" }, "original": { @@ -447,11 +449,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1714635257, - "narHash": "sha256-4cPymbty65RvF1DWQfc+Bc8B233A1BWxJnNULJKQ1EY=", + "lastModified": 1716330097, + "narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "63c3a29ca82437c87573e4c6919b09a24ea61b0f", + "rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2", "type": "github" }, "original": { @@ -562,29 +564,9 @@ "type": "github" } }, - "wlroots": { - "flake": false, - "locked": { - "lastModified": 1713731601, - "narHash": "sha256-bdcKdtLkusvv85DNuJsajZLFeq7bXp+x5AGP1Sd4wD8=", - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea", - "type": "github" - } - }, "xdph": { "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], + "hyprland-protocols": "hyprland-protocols", "hyprlang": [ "hyprland", "hyprlang" @@ -599,11 +581,11 @@ ] }, "locked": { - "lastModified": 1714060055, - "narHash": "sha256-j43TS9wv9luaAlpxcxw0sjxkbcc2mGANVR2RYgo3RCw=", + "lastModified": 1716290197, + "narHash": "sha256-1u9Exrc7yx9qtES2brDh7/DDZ8w8ap1nboIOAtCgeuM=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "0fe840441e43da12cd7865ed9aa8cdc35a8da85a", + "rev": "91e48d6acd8a5a611d26f925e51559ab743bc438", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a9e8fd4..7b92040 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland.url = "github:hyprwm/Hyprland"; + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; diff --git a/hosts/default/home.nix b/hosts/default/home.nix index 2c72275..8f83714 100644 --- a/hosts/default/home.nix +++ b/hosts/default/home.nix @@ -50,7 +50,6 @@ libsForQt5.polkit-kde-agent libtool libreoffice - minecraft mpv fastfetch networkmanagerapplet @@ -63,12 +62,14 @@ prismlauncher qbittorrent signal-desktop - swayidle swww texliveFull thunderbird tree wev + wl-clipboard + wl-copy + wl-paste xdg-user-dirs # etcher ## Currently Uses Electron-19 -- which is marked EOL ]; @@ -160,10 +161,10 @@ recursive = true; source = ../../modules/old_configs/river; }; - "swaylock" = { - recursive = true; - source = ../../modules/old_configs/swaylock; - }; + # "swaylock" = { + # recursive = true; + # source = ../../modules/old_configs/swaylock; + # }; "waybar" = { recursive = true; source = ../../modules/old_configs/waybar; @@ -237,7 +238,7 @@ obs-studio = { enable = true; }; - swaylock.enable = true; + # swaylock.enable = true; waybar = { enable = true; systemd.enable = true; @@ -270,6 +271,6 @@ enableSshSupport = true; }; nextcloud-client.enable = true; - swayidle.enable = true; + # swayidle.enable = true; }; } diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 2841208..5636abd 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -9,14 +9,14 @@ { imports = with inputs; [ - hypridle.homeManagerModules.default - hyprlock.homeManagerModules.default - #hyprpaper.homeManagerModules.default + # hypridle.homeManagerModules.default + # hyprlock.homeManagerModules.default + # hyprpaper.homeManagerModules.default ]; home.packages = with pkgs; [ hyprpicker - # hyprlock - # hypridle + hyprlock + hypridle ]; wayland.windowManager.hyprland = { package = inputs.hyprland.packages.${pkgs.system}.hyprland; @@ -34,7 +34,7 @@ settings = { monitor = [ "eDP-1,1920x1080@60,0x0,1" - "HDMI-A-1,1920x1080@60,auto,1,mirror, eDP-1 " + "HDMI-A-1,2550x1440@144,auto,1,mirror,eDP-1 " ",preferred,auto,1,mirror,eDP-1" ]; exec-once = [ @@ -49,7 +49,7 @@ "XDG_CURRENT_DESKTOP,Hyprland" "XDG_SESSION_TYPE,wayland" "XDG_SESSION_DESKTOP,Hyprland" - "QT_QPA_PLATFORM,Hyprland" + "QT_QPA_PLATFORM,Hyprland;xcb" ]; input = { kb_layout = "us"; @@ -169,6 +169,8 @@ # used for screenshots "$screenshotarea" = "hyprctl keyword animation 'fadeOut,0,0,default'; grimblast --notify copy area; hyprctl keyword animation 'fadeOut,1,4,default'"; + # for locking screen + "$lock" = "${pkgs.systemd}/bin/loginctl lock-session;${pkgs.hyprlock}/bin/hyprlock"; bind = [ # "$mainMod, grave, hyprexpo:expo, toggle" # can be: toggle, off/disable or on/enable @@ -339,64 +341,77 @@ lib.inputMethod.fcitx5.waylandFrontend = true; programs.hyprlock = { enable = true; - general = { }; - backgrounds = [ + settings = { + general = { + disable_loading_bar = true; + hide_cursor = true; + no_fade_in = false; + grace = 10; + }; + background = [ + { + path = "/home/liamm/pictures/desert.png"; + blur_passes = 2; + blur_size = 8; + } + ]; + input-field = [ { - path = "/home/liamm/pictures/desert.png"; + # size = "200, 50"; + outline_thickness = 3; + outer_color = "#fe0b00"; + inner_color = "#0c0c0c"; + font_color = "#efefef"; + check_color = "#0eff0d"; + fail_color = "#ff009e"; + capslock_color = "#bb00ee"; + placeholder_text = "Input Password..."; + fail_text = "$FAIL ($ATTEMPTS)"; } - ]; - input-fields = [ - { - outline_thickness = 2; - outer_color = "#fe0b00"; - inner_color = "#0c0c0c"; - font_color = "#efefef"; - check_color = "#0eff0d"; - fail_color = "#ff009e"; - capslock_color = "#bb00ee"; - placeholder_text = "Input Password..."; - fail_text = "$FAIL ($ATTEMPTS)"; - } - ]; - labels = [ - { - text = "$TIME"; - color = ""; - font_size = 28; - font_family = builtins.head osConfig.fonts.fontconfig.defaultFonts.sansSerif; - } - ]; + ]; + label = [ + { + text = "$TIME"; + text_align = "center"; + color = ""; + font_size = 28; + font_family = builtins.head osConfig.fonts.fontconfig.defaultFonts.sansSerif; + } + ]; + }; }; - services = { - hypridle = { - enable = true; - lockCmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; # avoid starting multiple sessions - beforeSleepCmd = "${pkgs.systemd}/bin/loginctl lock-session"; # lock before suspend. - afterSleepCmd = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; # to avoid having to hit key twice to turn on display + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; # avoid starting multiple sessions + before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session"; # lock before suspend. + after_sleep_cmd = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; # to avoid having to hit key twice to turn on display + }; listeners = [ { timeout = 120; - onTimeout = "${pkgs.brightnessctl}/bin/brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor. - onResume = "${pkgs.brightnessctl}/bin/brightnessctl -r"; # monitor backlight restor. + on-timeout = "${pkgs.brightnessctl}/bin/brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor. + on-resume = "${pkgs.brightnessctl}/bin/brightnessctl -r"; # monitor backlight restor. } { timeout = 120; - onTimeout = "${pkgs.brightnessctl}/bin/brightnessctl -sd rgb:kbd_backlight set 0"; # turn off keyboard backlight. - onResume = "${pkgs.brightnessctl}/bin/brightnessctl -rd rgb:kbd_backlight"; # turn on keyboard backlight. + on-timeout = "${pkgs.brightnessctl}/bin/brightnessctl -sd rgb:kbd_backlight set 0"; # turn off keyboard backlight. + on-resume = "${pkgs.brightnessctl}/bin/brightnessctl -rd rgb:kbd_backlight"; # turn on keyboard backlight. } { timeout = 180; - onTimeout = "${pkgs.systemd}/bin/loginctl lock-session"; # lock screen when timeout has passed + on-timeout = "${pkgs.systemd}/bin/loginctl lock-session"; # lock screen when timeout has passed } { timeout = 300; - onTimeout = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; # screen off when timeout has passed - onResume = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired. + on-timeout = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; # screen off when timeout has passed + on-resume = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired. } { timeout = 300; - onTimeout = "${pkgs.systemd}/bin/systemctl suspend"; # suspend pc + on-timeout = "${pkgs.systemd}/bin/systemctl suspend"; # suspend pc } ]; };