refactor: start i3/hyprland in home-manager instead of NixOS

This commit is contained in:
Ryan Yin
2023-12-23 17:23:25 +08:00
parent 82cfa4c6f7
commit 73e3707570
20 changed files with 370 additions and 134 deletions
+11 -3
View File
@@ -11,17 +11,25 @@
];
# NOTE:
# (Required) NixOS Module: enables critical components needed to run Hyprland properly
# (Optional) Home-manager module: lets you declaratively configure Hyprland
# We have to enable hyprland/i3's systemd user service in home-manager,
# so that gammastep/wallpaper-switcher's user service can be start correctly!
# they are all depending on hyprland/i3's user graphical-session
wayland.windowManager.hyprland = {
enable = true;
package = hyprland.packages.${pkgs.system}.hyprland;
settings = lib.mkForce {};
extraConfig = builtins.readFile ./hypr-conf/hyprland.conf;
# programs.grammastep need this to be enabled.
# gammastep/wallpaper-switcher need this to be enabled.
systemd.enable = true;
};
# NOTE: this executable is used by greetd to start a wayland session when system boot up
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module
home.file.".wayland-session" = {
source = "${pkgs.hyprland}/bin/Hyprland";
executable = true;
};
# hyprland configs, based on https://github.com/notwidow/hyprland
xdg.configFile = {
"hypr/mako" = {