Add structure for home-manager to nix
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -41,24 +42,6 @@
|
|||||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.hyprland-config = {
|
|
||||||
description = "Hyprland config synchronization.";
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = ''
|
|
||||||
HYPR="$HOME/.config/hypr"
|
|
||||||
if [ ! -d "$HYPR/.git" ]; then
|
|
||||||
git clone ssh://git@git.nichkara.eu/dotfiles/hypr.git "$HYPR"
|
|
||||||
else
|
|
||||||
git -C "$HYPR" pull --ff-only
|
|
||||||
fi
|
|
||||||
CONF="$HOME/.config"
|
|
||||||
$HYPR/pure_setup.sh
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
wantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
powerManagement.enable = false;
|
powerManagement.enable = false;
|
||||||
|
|||||||
26
home-manager.nix
Normal file
26
home-manager.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
home-manager = builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
(import "${home-manager}/nixos")
|
||||||
|
./home/hypr/hyprland.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.nichkara.isNormalUser = true;
|
||||||
|
home-manager.users.nichkara = { pkgs, ... }: {
|
||||||
|
home.packages = [ pkgs.atool pkgs.httpie ];
|
||||||
|
home.username = "nichkara";
|
||||||
|
home.homeDirectory = "/home/nichkara";
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# The state version is required and should stay at the version you
|
||||||
|
# originally installed.
|
||||||
|
home.stateVersion = "25.05";
|
||||||
|
};
|
||||||
|
home-manager.backupFileExtension = "backup";
|
||||||
|
}
|
||||||
124
home/hypr/config/keymaps.nix
Normal file
124
home/hypr/config/keymaps.nix
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
settings = {
|
||||||
|
|
||||||
|
"$terminal" = "kitty";
|
||||||
|
"$fileManager" = "dolphin";
|
||||||
|
"$menu" = "rofi -show drun -show-icons";
|
||||||
|
"$editor" = "kate";
|
||||||
|
"$browser" = "vivaldi";
|
||||||
|
|
||||||
|
"$mainMod" = "SUPER";
|
||||||
|
|
||||||
|
bind = [
|
||||||
|
"$mainMod, Q, exec, kitty"
|
||||||
|
"$mainMod, E, exec, $fileManager"
|
||||||
|
"$mainMod, K, exec, $editor"
|
||||||
|
"$mainMod, B, exec, $browser"
|
||||||
|
"$mainMod, S, exec, $menu"
|
||||||
|
"$mainMod ALT, E, exec, dolphin /run/media/skadi/Volume/Dokumente"
|
||||||
|
|
||||||
|
# Util
|
||||||
|
"$mainMod, C, killactive,"
|
||||||
|
"$mainMod, M, exit,"
|
||||||
|
"$mainMod, V, togglefloating,"
|
||||||
|
"$mainMod, P, pseudo" #dwindle
|
||||||
|
"$mainMod, J, togglesplit" #dwindle
|
||||||
|
"$mainMod, L, exec, ~/.config/home-manager/hypr/wallpaper.sh"
|
||||||
|
"$mainMod, H, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy"
|
||||||
|
|
||||||
|
", PRINT, exec, hyprshot -m region"
|
||||||
|
"$mainMod, PRINT, exec, hyprshot -m window"
|
||||||
|
|
||||||
|
# Move focus with mainMod + arrow keys
|
||||||
|
"$mainMod, left, movefocus, l"
|
||||||
|
"$mainMod, right, movefocus, r"
|
||||||
|
"$mainMod, up, movefocus, u"
|
||||||
|
"$mainMod, down, movefocus, d"
|
||||||
|
|
||||||
|
# Switch workspaces with mainMod + [0-9]
|
||||||
|
"$mainMod, 1, workspace, 1"
|
||||||
|
"$mainMod, 2, workspace, 2"
|
||||||
|
"$mainMod, 3, workspace, 3"
|
||||||
|
"$mainMod, 4, workspace, 4"
|
||||||
|
"$mainMod, 5, workspace, 5"
|
||||||
|
"$mainMod, 6, workspace, 6"
|
||||||
|
"$mainMod, 7, workspace, 7"
|
||||||
|
"$mainMod, 8, workspace, 8"
|
||||||
|
"$mainMod, 9, workspace, 9"
|
||||||
|
"$mainMod, 0, workspace, 10"
|
||||||
|
|
||||||
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
|
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||||
|
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||||
|
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||||
|
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||||
|
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||||
|
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||||
|
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||||
|
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||||
|
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||||
|
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||||
|
|
||||||
|
# Scroll through existing workspaces with mainMod + scroll
|
||||||
|
"$mainMod, mouse_down, workspace, e+1"
|
||||||
|
"$mainMod, mouse_up, workspace, e-1"
|
||||||
|
];
|
||||||
|
|
||||||
|
#mouse keys
|
||||||
|
bindm = [
|
||||||
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
"$mainMod, mouse:272, movewindow"
|
||||||
|
"$mainMod, mouse:273, resizewindow"
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
#laptop keys
|
||||||
|
bindl = [
|
||||||
|
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
|
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
|
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Submaps
|
||||||
|
extraConfig = ''
|
||||||
|
# Resize
|
||||||
|
|
||||||
|
bind = ALT, R, submap, Resize
|
||||||
|
submap = Resize
|
||||||
|
binde = , right, resizeactive, 10 0
|
||||||
|
binde = , left, resizeactive, -10 0
|
||||||
|
binde = , up, resizeactive, 0 -10
|
||||||
|
binde = , down, resizeactive, 0 10
|
||||||
|
# escape the submap
|
||||||
|
bind = , escape, submap, reset
|
||||||
|
submap = reset
|
||||||
|
|
||||||
|
# Move
|
||||||
|
|
||||||
|
bind = ALT, T, submap, Move
|
||||||
|
submap = Move
|
||||||
|
bindm = , mouse:272, movewindow
|
||||||
|
bindm = , mouse:273, resizewindow
|
||||||
|
bind = , escape, submap, reset
|
||||||
|
submap = reset
|
||||||
|
|
||||||
|
# Close
|
||||||
|
|
||||||
|
bind = ALT, Z, submap, Close
|
||||||
|
submap = Close
|
||||||
|
bind = , C, killactive,
|
||||||
|
bind = , escape, submap, reset
|
||||||
|
submap = reset
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
6
home/hypr/hyprland.nix
Normal file
6
home/hypr/hyprland.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user