mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add hyprland
Add unfree
This commit is contained in:
parent
d676358f1a
commit
31ffdc94e8
18 changed files with 185 additions and 44 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
{ pkgs, lib, config, osConfig, ... }: {
|
||||
imports = [
|
||||
./terminal
|
||||
./desktop
|
||||
];
|
||||
|
||||
# Let Home Manager install and manage itself
|
||||
|
|
|
|||
12
modules/home/desktop/default.nix
Normal file
12
modules/home/desktop/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, lib, osConfig, ... }:
|
||||
let
|
||||
cfg = osConfig.mods.desktop;
|
||||
in {
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.wayland.enable {
|
||||
mods.hyprland.enable = true;
|
||||
};
|
||||
}
|
||||
45
modules/home/desktop/hyprland.nix
Normal file
45
modules/home/desktop/hyprland.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
options.mods.hyprland.enable = lib.mkEnableOption "enables hyprland";
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.enable {
|
||||
programs.waybar.enable = true;
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
# systemd.enable = true;
|
||||
settings = {
|
||||
exec-once = "${lib.getExe pkgs.waybar}";
|
||||
input = {
|
||||
kb_options = "caps:escape";
|
||||
};
|
||||
"$mod" = "SUPER";
|
||||
bind = [
|
||||
"$mod, F, exec, qutebrowser"
|
||||
"$mod, Return, exec, alacritty"
|
||||
|
||||
"$mod SHIFT, Q, killactive,"
|
||||
"$mod SHIFT, X, exit,"
|
||||
|
||||
"$mod, H, movefocus, l"
|
||||
"$mod, J, movefocus, d"
|
||||
"$mod, K, movefocus, u"
|
||||
"$mod, L, movefocus, r"
|
||||
]
|
||||
++ (builtins.concatLists (builtins.genList (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
x: let
|
||||
ws = let
|
||||
c = (x + 1) / 10;
|
||||
in
|
||||
builtins.toString (x + 1 - (c * 10));
|
||||
in [
|
||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||
]
|
||||
) 10) );
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
options = {
|
||||
mods.terminal.emulator.enable = lib.mkEnableOption "enables terminal emulator";
|
||||
};
|
||||
options.mods.terminal.emulator.enable = lib.mkEnableOption "enables terminal emulator";
|
||||
|
||||
config = lib.mkIf config.mods.terminal.emulator.enable {
|
||||
programs.alacritty.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue