diff --git a/hosts/common.nix b/hosts/common.nix index 67eec7b..41c0ba1 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -1,6 +1,9 @@ { pkgs, ... }: { - imports = [ ../modules/system ]; + imports = [ + ../modules/system + ../wrappers + ]; system.stateVersion = "23.11"; diff --git a/modules/home/clipboard.nix b/modules/home/clipboard.nix deleted file mode 100644 index 4d4ea97..0000000 --- a/modules/home/clipboard.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - pkgs, - lib, - wrappers, - ... -}: -{ - options.myConfig.clipboard.enable = lib.mkEnableOption ""; - - config = lib.mkIf config.myConfig.clipboard.enable { - services.cliphist.enable = true; - - home.packages = [ - (pkgs.writeScriptBin "clipboard" '' - ${lib.getExe pkgs.cliphist} list | ${ - lib.getExe (wrappers.rofi { inherit (config.myConfig.de) theme; }) - } -dmenu -display-columns 2 | ${lib.getExe pkgs.cliphist} decode | ${lib.getExe' pkgs.wl-clipboard "wl-copy"} - '') - ]; - }; -} diff --git a/modules/home/de/default.nix b/modules/home/de/default.nix index dfe78e0..fe78fbf 100644 --- a/modules/home/de/default.nix +++ b/modules/home/de/default.nix @@ -2,7 +2,5 @@ imports = [ ./hyprland ./theme.nix - ./waybar.nix - ./hypridlelock.nix ]; } diff --git a/modules/home/de/hypridlelock.nix b/modules/home/de/hypridlelock.nix deleted file mode 100644 index 6cb4112..0000000 --- a/modules/home/de/hypridlelock.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - pkgs, - lib, - wrappers, - ... -}: -{ - options.myConfig.de.hypridlelock.enable = lib.mkEnableOption ""; - - config = lib.mkIf config.myConfig.de.hypridlelock.enable { - services.hypridle = { - enable = true; - package = wrappers.hypridle { }; - }; - }; -} diff --git a/modules/home/de/hyprland/config.nix b/modules/home/de/hyprland/config.nix deleted file mode 100644 index 39b9ec7..0000000 --- a/modules/home/de/hyprland/config.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ - config, - lib, - wrappers, - ... -}: -{ - config = lib.mkIf config.myConfig.de.hyprland.enable { - wayland.windowManager.hyprland = { - enable = true; - - settings = { - exec-once = [ "${lib.getExe wrappers.hyprpaper}" ]; - - input = { - kb_layout = "de"; - kb_variant = "nodeadkeys"; - - accel_profile = "flat"; - }; - - device = { - name = "dell0b9f:00-27c6:0d43-touchpad"; - accel_profile = "adaptive"; - disable_while_typing = true; - natural_scroll = true; - middle_button_emulation = true; - }; - - general = { - gaps_in = 5; - gaps_out = 10; - border_size = 1; - - layout = "master"; - }; - - master = { - new_is_master = false; - no_gaps_when_only = 1; - mfact = "0.5"; - }; - - decoration = { - rounding = 6; - drop_shadow = false; - }; - - animations.enabled = false; - - misc = { - disable_hyprland_logo = true; - disable_splash_rendering = true; - force_default_wallpaper = 0; - - key_press_enables_dpms = true; - }; - }; - }; - }; -} diff --git a/modules/home/de/hyprland/default.nix b/modules/home/de/hyprland/default.nix index e22d83a..b72ad68 100644 --- a/modules/home/de/hyprland/default.nix +++ b/modules/home/de/hyprland/default.nix @@ -1,16 +1,82 @@ -{ config, lib, ... }: { - imports = [ - ./config.nix - ./keybinds.nix - ]; + config, + pkgs, + lib, + wrappers, + ... +}: +{ + imports = [ ./keybinds.nix ]; options.myConfig.de.hyprland.enable = lib.mkEnableOption ""; config = lib.mkIf config.myConfig.de.hyprland.enable { - myConfig.de = { - hypridlelock.enable = true; - waybar.enable = true; + home.packages = [ + wrappers.hyprpaper + wrappers.waybar + wrappers.hyprlock + + (wrappers.rofi { inherit (config.myConfig.de) theme; }) + pkgs.cliphist + pkgs.wl-clipboard + (pkgs.writeScriptBin "clipboard" "cliphist list | rofi -dmenu -display-columns 2 | cliphist decode | wl-copy") + ]; + + wayland.windowManager.hyprland = { + enable = true; + + settings = { + exec-once = [ + "hyprpaper" + "sleep 3 && waybar" + "hypridle" + "cliphist wipe && wl-paste --watch cliphist store" + ]; + + input = { + kb_layout = "de"; + kb_variant = "nodeadkeys"; + + accel_profile = "flat"; + }; + + device = { + name = "dell0b9f:00-27c6:0d43-touchpad"; + accel_profile = "adaptive"; + disable_while_typing = true; + natural_scroll = true; + middle_button_emulation = true; + }; + + general = { + gaps_in = 5; + gaps_out = 10; + border_size = 1; + + layout = "master"; + }; + + master = { + new_is_master = false; + no_gaps_when_only = 1; + mfact = "0.5"; + }; + + decoration = { + rounding = 6; + drop_shadow = false; + }; + + animations.enabled = false; + + misc = { + disable_hyprland_logo = true; + disable_splash_rendering = true; + force_default_wallpaper = 0; + + key_press_enables_dpms = true; + }; + }; }; }; } diff --git a/modules/home/de/hyprland/keybinds.nix b/modules/home/de/hyprland/keybinds.nix index 6b250c9..0b8d3b2 100644 --- a/modules/home/de/hyprland/keybinds.nix +++ b/modules/home/de/hyprland/keybinds.nix @@ -16,7 +16,6 @@ bind = SUPER SHIFT, C, killactive, bind = SUPER SHIFT, V, togglefloating, bind = SUPER SHIFT, F, fullscreen, 0 - bind = SUPER, TAB, cyclenext, # Launch programs bind = SUPER, R, exec, rofi -show drun @@ -31,6 +30,7 @@ bind = SUPER, right, movefocus, r bind = SUPER, up, movefocus, u bind = SUPER, down, movefocus, d + bind = SUPER, TAB, cyclenext, # Move window bind = SUPER SHIFT, left, movewindow, l @@ -72,6 +72,7 @@ bindrl = SUPER CONTROL, S, exec, systemctl suspend bindrl = SUPER CONTROL, L, exec, loginctl lock-session bindrl = SUPER CONTROL, B, exec, sleep 1 && hyprctl dispatch dpms off + bind = SUPER CONTROL, R, exec, pkill waybar && hyprctl dispatch exec waybar bindl = , switch:on:Lid Switch, exec, systemctl suspend # Control media diff --git a/modules/home/de/waybar.nix b/modules/home/de/waybar.nix deleted file mode 100644 index d353584..0000000 --- a/modules/home/de/waybar.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - config, - lib, - wrappers, - ... -}: -{ - options.myConfig.de.waybar.enable = lib.mkEnableOption ""; - - config = lib.mkIf config.myConfig.de.waybar.enable { - programs.waybar = { - enable = true; - package = wrappers.waybar; - systemd.enable = true; - }; - - systemd.user.services.waybar.Unit.After = [ "sound.target" ]; - }; -} diff --git a/modules/home/default.nix b/modules/home/default.nix index 4b4bc96..07b8ec9 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -7,6 +7,5 @@ ./git.nix ./equalizer ./sops.nix - ./clipboard.nix ]; } diff --git a/users/common.nix b/users/common.nix index 4d61b46..fa73ab3 100644 --- a/users/common.nix +++ b/users/common.nix @@ -6,8 +6,7 @@ useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = { - inherit self; - inherit inputs; + inherit self inputs; }; }; diff --git a/users/seb/@inspiron.nix b/users/seb/@inspiron.nix index d34e2b4..b3f6d5b 100644 --- a/users/seb/@inspiron.nix +++ b/users/seb/@inspiron.nix @@ -1,8 +1,10 @@ -{ ... }: +{ wrappers, ... }: { imports = [ ./default.nix ]; home-manager.users.seb = { + home.packages = [ (wrappers.hypridle { lockOnSleep = true; }) ]; + myConfig.de.theme = "light"; wayland.windowManager.hyprland.settings.monitor = "eDP-1,1920x1080@60,0x0,1"; diff --git a/users/seb/@north.nix b/users/seb/@north.nix index 34ba15e..48096ed 100644 --- a/users/seb/@north.nix +++ b/users/seb/@north.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, ... }: +{ + pkgs, + lib, + wrappers, + ... +}: { imports = [ ./default.nix ]; @@ -7,6 +12,8 @@ pkgs.obs-studio pkgs.libsForQt5.kdenlive pkgs.gimp + + (wrappers.hypridle { lockOnSleep = false; }) ]; myConfig.de.theme = "dark"; diff --git a/users/seb/home.nix b/users/seb/home.nix index 9ce8efa..964b579 100644 --- a/users/seb/home.nix +++ b/users/seb/home.nix @@ -18,7 +18,6 @@ vscode.enable = true; equalizer.enable = true; sops.enable = false; - clipboard.enable = true; }; home.packages = [ @@ -40,6 +39,5 @@ wrappers.marktext wrappers.webcord (wrappers.kitty { inherit (config.myConfig.de) theme; }) - (wrappers.rofi { inherit (config.myConfig.de) theme; }) ]; }