calcite: switch to greetd and gtklock

This commit is contained in:
xinyangli 2024-11-13 21:24:26 +08:00
parent f87136fc94
commit d4aaa6c4a3
Signed by: xin
SSH key fingerprint: SHA256:UU5pRTl7NiLFJbWJZa+snLylZSXIz5rgHmwjzv8v4oE
9 changed files with 261 additions and 48 deletions

View file

@ -5,38 +5,55 @@
...
}:
let
inherit (lib) mkIf mkEnableOption;
inherit (lib) mkIf mkEnableOption getExe;
cfg = config.custom-hm.gui.niri;
wallpaper = pkgs.fetchurl {
url = "https://github.com/NixOS/nixos-artwork/blob/master/wallpapers/nixos-wallpaper-catppuccin-mocha.png?raw=true";
hash = "sha256-fmKFYw2gYAYFjOv4lr8IkXPtZfE1+88yKQ4vjEcax1s=";
};
xwayland-satellite = pkgs.xwayland-satellite.overrideAttrs (drv: rec {
src = pkgs.fetchFromGitHub {
owner = "Supreeeme";
repo = "xwayland-satellite";
rev = "3e6f892d20d918479e67d1e6c90c4be824a9d4ab";
hash = "sha256-W1UUok7DPi4IXCYtc273FbVH1ifuCIcl+oO6CDqt8Dk=";
};
cargoDeps = drv.cargoDeps.overrideAttrs (
lib.const {
name = "xwayland-satellite-vendor.tar.gz";
inherit src;
outputHash = "sha256-/nK4cVgelaMtpym18RYNafPUFnMOG4uHRpVO8bOS3ow=";
}
);
});
in
{
imports = [
./themes.nix
];
options.custom-hm.gui.niri = {
enable = mkEnableOption "niri";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
xwayland-satellite
cosmic-files
];
home.pointerCursor = {
name = "Bibata-Modern-Ice";
size = 24;
package = pkgs.bibata-cursors;
gtk.enable = true;
};
gtk = {
enable = true;
theme = {
name = "Catppuccin-GTK-Dark";
package = pkgs.magnetic-catppuccin-gtk;
systemd.user.services.xwayland-satellite = {
Install = {
WantedBy = [ "graphical-session.target" ];
};
Unit = {
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${xwayland-satellite}/bin/xwayland-satellite";
Restart = "on-failure";
};
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
};
services.network-manager-applet.enable = true;
systemd.user.services.swaybg = {
Install = {
@ -52,12 +69,21 @@ in
};
};
programs.swaylock = {
custom-hm.gui.gtklock = {
enable = true;
settings = {
show-failed-attempts = true;
daemonize = true;
scaling = "fill";
config = {
gtk-theme = "Catppuccin-GTK-Dark";
# style = pkgs.writeText "gtklock-style.css" ''
# window {
# background-size: cover;
# background-repeat: no-repeat;
# background-position: center;
# }
# '';
# modules = [
# "${pkgs.gtklock-playerctl-module}/lib/gtklock/playerctl-module.so"
# "${pkgs.gtklock-userinfo-module}/lib/gtklock/userinfo-module.so"
# ];
};
};
@ -67,6 +93,10 @@ in
swayidle = {
enable = true;
timeouts = [
# {
# timeout = 300;
# command = "/run/
# }
{
timeout = 900;
command = "/run/current-system/systemd/bin/systemctl suspend";
@ -75,7 +105,7 @@ in
events = [
{
event = "lock";
command = "${pkgs.swaylock}/bin/swaylock";
command = "${getExe pkgs.gtklock}";
}
{
event = "before-sleep";