calcite: switch to niri
This commit is contained in:
parent
62ca7ce8af
commit
3b393a74f5
10 changed files with 473 additions and 123 deletions
88
modules/home-manager/gui/niri.nix
Normal file
88
modules/home-manager/gui/niri.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
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=";
|
||||
};
|
||||
in
|
||||
{
|
||||
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;
|
||||
};
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
};
|
||||
services.network-manager-applet.enable = true;
|
||||
|
||||
systemd.user.services.swaybg = {
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
Unit = {
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${lib.getExe pkgs.swaybg} -i ${wallpaper} -m fill";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
show-failed-attempts = true;
|
||||
daemonize = true;
|
||||
scaling = "fill";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.swayidle.Unit.After = [ "graphical-session.target" ];
|
||||
|
||||
services = {
|
||||
swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 900;
|
||||
command = "/run/current-system/systemd/bin/systemctl suspend";
|
||||
}
|
||||
];
|
||||
events = [
|
||||
{
|
||||
event = "lock";
|
||||
command = "${pkgs.swaylock}/bin/swaylock";
|
||||
}
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "/run/current-system/systemd/bin/loginctl lock-session";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue