mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-14 08:32:39 +02:00
refactor: start i3/hyprland in home-manager instead of NixOS
This commit is contained in:
@@ -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" = {
|
||||
|
||||
@@ -10,8 +10,9 @@ for _prs in "${_ps[@]}"; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Set wallpaper
|
||||
swaybg --output '*' --mode fill --image ~/.config/wallpapers/default_wallpaper &
|
||||
# Set wallpaper via a wallpaper.service
|
||||
# it will by start by home-manager automatically, do not need to restart it here.
|
||||
# systemctl --user restart wallpaper.service
|
||||
|
||||
# Lauch notification daemon (mako)
|
||||
~/.config/hypr/scripts/notifications &
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
waybar # the status bar
|
||||
swaybg # the wallpaper
|
||||
swayidle # the idle timeout
|
||||
swaylock # locking the screen
|
||||
wlogout # logout menu
|
||||
wl-clipboard # copying and pasting
|
||||
hyprpicker # color picker
|
||||
|
||||
wf-recorder # creen recording
|
||||
grim # taking screenshots
|
||||
slurp # selecting a region to screenshot
|
||||
# TODO replace by `flameshot gui --raw | wl-copy`
|
||||
|
||||
mako # the notification daemon, the same as dunst
|
||||
|
||||
yad # a fork of zenity, for creating dialogs
|
||||
|
||||
# audio
|
||||
alsa-utils # provides amixer/alsamixer/...
|
||||
mpd # for playing system sounds
|
||||
mpc-cli # command-line mpd client
|
||||
ncmpcpp # a mpd client with a UI
|
||||
networkmanagerapplet # provide GUI app: nm-connection-editor
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user