first 'working' hyperland config, no bar yet
This commit is contained in:
parent
c365ba3827
commit
0f8d4eb694
11 changed files with 639 additions and 72 deletions
|
@ -28,6 +28,7 @@ in
|
|||
settings = {
|
||||
"background_opacity" = "0.95";
|
||||
"shell" = "fish";
|
||||
"confirm_os_window_close" = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit(lib) mkIf;
|
||||
inherit(lib.wyrdgard) mkBoolOpt;
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.wyrdgard) mkBoolOpt;
|
||||
cfg = config.wyrdgard.apps.cli-apps.nixvim;
|
||||
in
|
||||
{
|
||||
options.wyrdgard.apps.cli-apps.nixvim = {
|
||||
options.wyrdgard.apps.cli-apps.nixvim = {
|
||||
enable = mkBoolOpt true "Whether to enable nixvim or not (Default true)";
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
|
@ -7,21 +6,25 @@
|
|||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard;
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.wyrdgard.apps.zen-browser;
|
||||
|
||||
zenbrowser = inputs.zen-browser.packages."${system}".default;
|
||||
in
|
||||
{
|
||||
options.wyrdgard.apps.zen-browser = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable zen browser";
|
||||
options.wyrdgard.apps.zen-browser = {
|
||||
enable = mkEnableOption "Whether or not to enable zen browser";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.zen-browser.packages."${system}".default
|
||||
environment.systemPackages = [
|
||||
zenbrowser
|
||||
];
|
||||
|
||||
environment.sessionVariables.DEFAULT_BROWSER = "${zenbrowser}/bin/zen";
|
||||
|
||||
environment.etc = {
|
||||
"1password/custom_allowed_browsers" = {
|
||||
text = ''
|
||||
|
|
|
@ -29,7 +29,7 @@ in
|
|||
};
|
||||
|
||||
apps = {
|
||||
vivaldi = enabled;
|
||||
zen-browser = enabled;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,31 +1,230 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkEnableOption
|
||||
mkOption
|
||||
mkMerge
|
||||
types
|
||||
;
|
||||
cfg = config.wyrdgard.graphical-interface.desktop-manager.hyprland;
|
||||
|
||||
cachix-url = "https://hyprland.cachix.org";
|
||||
cachix-key = "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=";
|
||||
|
||||
hyprland-package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
in
|
||||
{
|
||||
options.wyrdgard.graphical-interface.desktop-manager.hyprland = with types; {
|
||||
options.wyrdgard.graphical-interface.desktop-manager.hyprland = {
|
||||
enable = mkEnableOption "Whether to enable hyprland";
|
||||
settings = mkOption {
|
||||
type = types.attrs;
|
||||
default = { };
|
||||
description = "Additional Hyprland settings to apply.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
polkit
|
||||
xdg-desktop-portal-hyprland
|
||||
dconf
|
||||
|
||||
wl-clipboard
|
||||
wl-screenrec
|
||||
wlr-randr
|
||||
grimblast
|
||||
];
|
||||
|
||||
services.xserver = enabled;
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
package = hyprland-package;
|
||||
portalPackage =
|
||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
wyrdgard = {
|
||||
nix.extra-substituters.${cachix-url} = {
|
||||
key = cachix-key;
|
||||
};
|
||||
|
||||
home.extraOptions = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = hyprland-package;
|
||||
plugins = [ inputs.hy3.packages.${system}.hy3 ];
|
||||
settings = mkMerge [
|
||||
{
|
||||
"$mod" = "SUPER";
|
||||
|
||||
exec-once = [
|
||||
"steam"
|
||||
"discord"
|
||||
];
|
||||
|
||||
general = {
|
||||
layout = "hy3";
|
||||
gaps_in = 5;
|
||||
gaps_out = 5;
|
||||
border_size = 1;
|
||||
"col.active_border" = "rgba(88888888)";
|
||||
"col.inactive_border" = "rgba(00000088)";
|
||||
|
||||
allow_tearing = true;
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 16;
|
||||
blur = {
|
||||
enabled = true;
|
||||
brightness = 1.0;
|
||||
contrast = 1.0;
|
||||
noise = 1.0e-2;
|
||||
|
||||
vibrancy = 0.2;
|
||||
vibrancy_darkness = 0.5;
|
||||
|
||||
passes = 4;
|
||||
size = 7;
|
||||
|
||||
popups = true;
|
||||
popups_ignorealpha = 0.2;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_ignore_window = true;
|
||||
shadow_offset = "0 15";
|
||||
shadow_range = 100;
|
||||
shadow_render_power = 2;
|
||||
shadow_scale = 0.97;
|
||||
"col.shadow" = "rgba(00000055)";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"border, 1, 2, default"
|
||||
"fade, 1, 4, default"
|
||||
"windows, 1, 3, default, popin 80%"
|
||||
"workspaces, 1, 2, default, slide"
|
||||
];
|
||||
};
|
||||
|
||||
bind =
|
||||
[
|
||||
# compositor commands
|
||||
"$mod SHIFT, R, exec, hyprctl reload"
|
||||
"$mod SHIFT, Q, killactive,"
|
||||
"$mod SHIFT, E, exec, pkill Hyprland"
|
||||
|
||||
"$mod, F, fullscreen,"
|
||||
"$mod, G, togglegroup,"
|
||||
"$mod SHIFT, N, changegroupactive, f"
|
||||
"$mod SHIFT, P, changegroupactive, b"
|
||||
"$mod, R, togglesplit,"
|
||||
"$mod, T, togglefloating,"
|
||||
"$mod, P, pseudo,"
|
||||
"$mod ALT, ,resizeactive,"
|
||||
|
||||
# move focus
|
||||
"$mod, h, hy3:movefocus, l"
|
||||
"$mod, j, hy3:movefocus, d"
|
||||
"$mod, k, hy3:movefocus, u"
|
||||
"$mod, l, hy3:movefocus, r"
|
||||
"$mod, left, hy3:movefocus, l"
|
||||
"$mod, down, hy3:movefocus, d"
|
||||
"$mod, up, hy3:movefocus, u"
|
||||
"$mod, right, hy3:movefocus, r"
|
||||
|
||||
# move focus
|
||||
"$mod SHIFT, h, hy3:movewindow, l, once"
|
||||
"$mod SHIFT, j, hy3:movewindow, d, once"
|
||||
"$mod SHIFT, k, hy3:movewindow, u, once"
|
||||
"$mod SHIFT, l, hy3:movewindow, r, once"
|
||||
"$mod SHIFT, left, hy3:movewindow, l, once"
|
||||
"$mod SHIFT, down, hy3:movewindow, d, once"
|
||||
"$mod SHIFT, up, hy3:movewindow, u, once"
|
||||
"$mod SHIFT, right, hy3:movewindow, r, once"
|
||||
|
||||
#run important programs
|
||||
"$mod, Return, exec, kitty"
|
||||
"$mod, Z, exec, zen"
|
||||
# "$mod, D, exec, rofi -show combi"
|
||||
|
||||
#screenshot
|
||||
", Print, exec, grimblast copy area"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
|
||||
builtins.concatLists (
|
||||
builtins.genList (
|
||||
i:
|
||||
let
|
||||
ws = i + 1;
|
||||
in
|
||||
[
|
||||
"$mod, code:1${toString i}, workspace, ${toString ws}"
|
||||
"$mod SHIFT, code:1${toString i}, hy3:movetoworkspace, ${toString ws}"
|
||||
]
|
||||
) 9
|
||||
)
|
||||
);
|
||||
|
||||
# mouse movements
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
"$mod ALT, mouse:272, resizewindow"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
# volume
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
];
|
||||
|
||||
bindle = [
|
||||
# volume
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%-"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
|
||||
# focus change on cursor move
|
||||
follow_mouse = 1;
|
||||
accel_profile = "flat";
|
||||
};
|
||||
|
||||
plugin = {
|
||||
hy3 = {
|
||||
autotile = {
|
||||
enable = true;
|
||||
trigger_width = 800;
|
||||
trigger_height = 500;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
cfg.settings
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,14 +8,37 @@ with lib;
|
|||
with lib.wyrdgard;
|
||||
let
|
||||
cfg = config.wyrdgard.nix;
|
||||
|
||||
substituters-submodule = types.submodule (
|
||||
{ name, ... }:
|
||||
{
|
||||
options = with types; {
|
||||
key = mkOpt (nullOr str) null "The trusted public key for this substituter.";
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
options.wyrdgard.nix = with types; {
|
||||
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
|
||||
package = mkOpt package pkgs.lix "Which nix package to use.";
|
||||
|
||||
default-substituter = {
|
||||
url = mkOpt str "https://cache.nixos.org" "The url for the substituter.";
|
||||
key =
|
||||
mkOpt str "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"The trusted public key for the substituter.";
|
||||
};
|
||||
|
||||
extra-substituters = mkOpt (attrsOf substituters-submodule) { } "Extra substituters to configure.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = mapAttrsToList (name: value: {
|
||||
assertion = value.key != null;
|
||||
message = "plusultra.nix.extra-substituters.${name}.key must be set";
|
||||
}) cfg.extra-substituters;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
snowfallorg.flake
|
||||
nixfmt-rfc-style
|
||||
|
@ -43,6 +66,12 @@ in
|
|||
auto-optimise-store = true;
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
substituters = [
|
||||
cfg.default-substituter.url
|
||||
] ++ (mapAttrsToList (name: value: name) cfg.extra-substituters);
|
||||
trusted-public-keys = [
|
||||
cfg.default-substituter.key
|
||||
] ++ (mapAttrsToList (name: value: value.key) cfg.extra-substituters);
|
||||
}
|
||||
// (lib.optionalAttrs config.wyrdgard.tools.direnv.enable {
|
||||
keep-outputs = true;
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
{
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.wyrdgard) mkBoolOpt enabled;
|
||||
cfg = config.wyrdgard.submodules.basics-wsl;
|
||||
in
|
||||
{
|
||||
options.wyrdgard.submodules.basics-wsl = with types; {
|
||||
options.wyrdgard.submodules.basics-wsl = {
|
||||
enable = mkBoolOpt false "Whether or not to enable basic configuration.";
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue