chore: hyprland keybindings and moving hm in separate file

This commit is contained in:
Nydragon 2024-06-25 20:06:41 +02:00
parent 4d88e3c115
commit 561b2b4a46
No known key found for this signature in database
GPG key ID: 14AA30A865EA1209
8 changed files with 102 additions and 54 deletions

View file

@ -12,7 +12,10 @@ lib.mkIf osConfig.programs.hyprland.enable {
settings = {
"$mod" = "SUPER";
monitor = ",preferred,auto,auto";
monitor = [
"DP-2,1920x1080@144, 1920x0, 1"
"HDMI-A-1,1920x1080@60, 0x0, 1"
];
general = {
gaps_in = 5;
@ -94,9 +97,11 @@ lib.mkIf osConfig.programs.hyprland.enable {
bind =
[
"$mod, D, exec, rofi -config ${config.home.homeDirectory}/.config/rofi/config.rasi -show combi -automatic-save-to-history"
"$mod, E, exec, ${pkgs.gnome.nautilus}/bin/nautilus"
"$mod, Return, exec, ${pkgs.alacritty}/bin/alacritty"
"$mod SHIFT, Q, killactive,"
"$mod SHIFT, P, exec, rofi -show -p -modi p:rofi-power-menu"
"$mod SHIFT, C, exec, hyprctl reload"
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
@ -105,7 +110,8 @@ lib.mkIf osConfig.programs.hyprland.enable {
# Example special workspace (scratchpad)
"$mod, S, togglespecialworkspace, magic"
"$mod SHIFT, S, movetoworkspace, special:magic"
"$mod, X, fullscreen, 1"
"$mod, F, fullscreen, 0"
"$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
]
++ (

View file

@ -1,23 +1,17 @@
{
config,
pkgs,
lib,
inputs,
system,
username,
hostname,
...
}:
let
stateVersion = "24.05";
homeDirectory = "/home/${username}";
in
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.home-manager
../../modules
./home.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -41,43 +35,7 @@ in
fish.enable = true;
firefox.enable = true;
thunderbird.enable = true;
};
home-manager.backupFileExtension = "backup";
home-manager.users.${username} = {
imports = [
../../home/firefox
../../home/fish
../../home/neovim
../../home/thunderbird
../../home/git
../../home/rofi
../../home/sway/swaync
../../home/sway/waybar
../../home/hyprland
];
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
home = {
inherit stateVersion;
inherit username;
inherit homeDirectory;
packages =
let
scripts = import ../../home/scripts/list.nix { inherit pkgs; };
programs = with pkgs; [
keepassxc
nextcloud-client
cliphist
];
in
programs ++ scripts;
};
hyprland.enable = true;
};
users = {
@ -94,21 +52,23 @@ in
shell = pkgs.fish;
};
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
services.gnome.gnome-keyring.enable = true;
environment.systemPackages = with pkgs; [
fish
git
firefox
htop
alacritty
eza
bat
kdeconnect
swaynotificationcenter
pipewire
wireplumber
];
system.stateVersion = stateVersion;
system.stateVersion = "24.05";
}

View file

@ -4,7 +4,6 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:

77
hosts/brontes/home.nix Normal file
View file

@ -0,0 +1,77 @@
{
pkgs,
stateVersion,
username,
config,
...
}:
{
home-manager.users.${username} = {
imports = [
../../home/firefox
../../home/fish
../../home/neovim
../../home/thunderbird
../../home/git
../../home/rofi
../../home/sway/swaync
../../home/sway/waybar
../../home/hyprland
];
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
services.blueman-applet.enable = true;
home = {
stateVersion = config.system.stateVersion;
inherit username;
packages =
let
scripts = import ../../home/scripts/list.nix { inherit pkgs; };
programs = with pkgs; [
keepassxc
nextcloud-client
cliphist
digikam
fragments
element-desktop
libreoffice
loupe
gnome.seahorse
gimp
vlc
thunderbird
keepassxc
gnome.nautilus
rofi-power-menu
lollypop
protonmail-bridge-gui
varia
signal-desktop
calibre
alacritty
# CLI tools
delta
fzf
jhead
fdupes
exiftool
sshfs
zip
unzip
lazygit
fd
ripgrep
];
in
programs ++ scripts;
};
};
}

View file

@ -11,5 +11,6 @@
./programs/lazygit.nix
./programs/steam.nix
./programs/hyprland.nix
./home-manager.nix
];
}

5
modules/home-manager.nix Normal file
View file

@ -0,0 +1,5 @@
{
home-manager = {
backupFileExtension = "backup";
};
}

View file

@ -1 +1 @@
{ programs.hyprland.enable = true; }
{ lib, config, ... }: lib.mkIf config.programs.hyprland.enable { }

View file

@ -4,7 +4,7 @@
lib,
...
}:
lib.mkIf config.programs.firefox.enable {
lib.mkIf config.programs.sway.enable {
programs.sway = {
wrapperFeatures.gtk = true;
extraPackages = with pkgs; [