mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-27 11:17:03 +02:00
feat: refactoring configuration with options to make it more modular
This commit is contained in:
61
home/linux/desktop/i3/i3.nix
Normal file
61
home/linux/desktop/i3/i3.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
_: {
|
||||
# i3 window manager's config, based on https://github.com/endeavouros-team/endeavouros-i3wm-setup
|
||||
|
||||
# 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 ./i3-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
|
||||
};
|
||||
"i3/layouts" = {
|
||||
source = ./layouts;
|
||||
recursive = true;
|
||||
};
|
||||
# rofi is a application launcher and dmenu replacement
|
||||
"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;
|
||||
};
|
||||
|
||||
# allow fontconfig to discover fonts and configurations installed through home.packages
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
systemd.user.sessionVariables = {
|
||||
"LIBVA_DRIVER_NAME" = "nvidia";
|
||||
"GBM_BACKEND" = "nvidia-drm";
|
||||
"__GLX_VENDOR_LIBRARY_NAME" = "nvidia";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user