mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-11 15:12:40 +02:00
refactor: start i3/hyprland in home-manager instead of NixOS
This commit is contained in:
Regular → Executable
Executable
+1
@@ -0,0 +1 @@
|
||||
i3-msg exit
|
||||
@@ -261,8 +261,7 @@ exec --no-startup-id dex --autostart --environment i3
|
||||
exec --no-startup-id ~/.screenlayout/monitor.sh
|
||||
|
||||
# set wallpaper
|
||||
# exec --no-startup-id sleep 2 && nitrogen --restore
|
||||
exec --no-startup-id sleep 1 && feh --bg-fill ~/.config/wallpapers/default_wallpaper
|
||||
exec --no-startup-id sleep 1 && systemctl --user restart wallpaper.service
|
||||
|
||||
# set powersavings for display:
|
||||
exec --no-startup-id xset s 480 dpms 600 600 600
|
||||
|
||||
@@ -1,35 +1,55 @@
|
||||
{pkgs, ...}: {
|
||||
_: {
|
||||
# i3 window manager's config, based on https://github.com/endeavouros-team/endeavouros-i3wm-setup
|
||||
|
||||
imports = [
|
||||
./packages.nix
|
||||
./x11-apps.nix
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/i3/config".source = ./config;
|
||||
".config/i3/i3blocks.conf".source = ./i3blocks.conf;
|
||||
".config/i3/scripts" = {
|
||||
# NOTE:
|
||||
# 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
|
||||
xsession = {
|
||||
enable = true;
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./config;
|
||||
};
|
||||
# Path, relative to HOME, where Home Manager should write the X session script.
|
||||
# and NixOS will use it to start xorg session when system boot up
|
||||
scriptPath = ".xsession";
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"i3/i3blocks.conf".source = ./i3blocks.conf;
|
||||
"i3/scripts" = {
|
||||
source = ./scripts;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
executable = true; # make all scripts executable
|
||||
};
|
||||
".config/i3/layouts" = {
|
||||
"i3/layouts" = {
|
||||
source = ./layouts;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
# rofi is a application launcher and dmenu replacement
|
||||
".config/rofi" = {
|
||||
"rofi" = {
|
||||
source = ./rofi-conf;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".local/bin/bright" = {
|
||||
source = ./bin/bright;
|
||||
executable = true;
|
||||
};
|
||||
".local/bin/logout" = {
|
||||
source = ./bin/logout;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
# xrandr - set primary screen
|
||||
".screenlayout/monitor.sh".source = ./dual-monitor-4k-1080p.sh;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
rofi # application launcher, the same as dmenu
|
||||
dunst # notification daemon
|
||||
i3blocks # status bar
|
||||
i3lock # default i3 screen locker
|
||||
xautolock # lock screen after some time
|
||||
i3status # provide information to i3bar
|
||||
i3-gaps # i3 with gaps
|
||||
picom # transparency and shadows
|
||||
feh # set wallpaper
|
||||
xcolor # color picker
|
||||
|
||||
acpi # battery information
|
||||
arandr # screen layout manager
|
||||
dex # autostart applications
|
||||
xbindkeys # bind keys to commands
|
||||
xorg.xbacklight # control screen brightness, the same as light
|
||||
xorg.xdpyinfo # get screen information
|
||||
scrot # minimal screen capture tool, used by i3 blur lock to take a screenshot
|
||||
sysstat # get system information
|
||||
alsa-utils # provides amixer/alsamixer/...
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user