Modularize config

This commit is contained in:
2026-01-16 21:35:28 +01:00
parent 19cd15ebc5
commit dcb0ea1961
5 changed files with 102 additions and 83 deletions

View File

@@ -7,93 +7,16 @@
home.username = "avravels"; home.username = "avravels";
home.homeDirectory = "/home/avravels"; home.homeDirectory = "/home/avravels";
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
theme = "agnoster";
};
};
home.packages = with pkgs; [ home.packages = with pkgs; [
kitty
wofi wofi
]; ];
programs.kitty = {
enable = true;
settings.confirm_quit = false;
};
programs.direnv = { imports = [
enable = true; ./programs/kitty.nix
enableZshIntegration = true; ./programs/zsh.nix
nix-direnv.enable = true; ./programs/direnv.nix
}; ./wm/hyperland.nix
];
wayland.windowManager.hyprland = {
enable = true;
settings = {
### MONITOR
monitor = [
",preferred,auto,1"
];
### VARIABLES
"$mod" = "SUPER";
"$terminal" = "kitty";
"$menu" = "wofi --show drun";
### BASIC LAYOUT
general = {
layout = "dwindle";
resize_on_border = true;
};
decoration = {
rounding = 5; # increase/decrease for more/less round
};
### INPUT
input = {
kb_layout = "us";
};
### KEYBINDINGS
bind = [
# Apps
"$mod, RETURN, exec, $terminal"
"$mod, D, exec, $menu"
"$mod, Q, killactive"
"$mod, F, fullscreen"
"$mod, M, exit"
# Focus
"$mod, LEFT, movefocus, l"
"$mod, RIGHT, movefocus, r"
"$mod, UP, movefocus, u"
"$mod, DOWN, movefocus, d"
# Workspaces
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
} }

9
programs/direnv.nix Normal file
View File

@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
}

8
programs/kitty.nix Normal file
View File

@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
programs.kitty = {
enable = true;
settings.confirm_quit = false;
};
}

11
programs/zsh.nix Normal file
View File

@@ -0,0 +1,11 @@
{ pkgs, ... }:
{
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
theme = "agnoster";
};
};
}

68
wm/hyperland.nix Normal file
View File

@@ -0,0 +1,68 @@
{ pkgs, ... }:
{
wayland.windowManager.hyprland = {
enable = true;
settings = {
### MONITOR
monitor = [
",preferred,auto,1"
];
### VARIABLES
"$mod" = "SUPER";
"$terminal" = "kitty";
"$menu" = "wofi --show drun";
### BASIC LAYOUT
general = {
layout = "dwindle";
resize_on_border = true;
};
decoration = {
rounding = 5; # increase/decrease for more/less round
};
### INPUT
input = {
kb_layout = "us";
};
### KEYBINDINGS
bind = [
# Apps
"$mod, RETURN, exec, $terminal"
"$mod, D, exec, $menu"
"$mod, Q, killactive"
"$mod, F, fullscreen"
"$mod, M, exit"
# Focus
"$mod, LEFT, movefocus, l"
"$mod, RIGHT, movefocus, r"
"$mod, UP, movefocus, u"
"$mod, DOWN, movefocus, d"
# Workspaces
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
}