Slowly adding back Hyprland

This commit is contained in:
Tyler Kelley 2024-05-14 02:42:14 -05:00
parent 0dd51a1c57
commit 32a9191fce
6 changed files with 589 additions and 47 deletions

190
config/hyprland.nix Normal file
View File

@ -0,0 +1,190 @@
{ pkgs, config, lib, inputs, host, ... }:
let
theme = config.colorScheme.palette;
hyprplugins = inputs.hyprland-plugins.packages.${pkgs.system};
inherit (import ../hosts/${host}/variables.nix)
browser borderAnim terminal extraMonitorSettings;
in with lib; {
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = true;
plugins = [
# hyprplugins.hyprtrails
];
extraConfig = let
modifier = "SUPER";
in concatStrings [ ''
monitor=,preferred,auto,1
${extraMonitorSettings}
general {
gaps_in = 6
gaps_out = 8
border_size = 2
col.active_border = rgba(${theme.base0C}ff) rgba(${theme.base0D}ff) rgba(${theme.base0B}ff) rgba(${theme.base0E}ff) 45deg
col.inactive_border = rgba(${theme.base00}cc) rgba(${theme.base01}cc) 45deg
layout = dwindle
resize_on_border = true
}
input {
kb_layout = us
kb_options = grp:alt_shift_toggle
kb_options=caps:super
follow_mouse = 1
touchpad {
natural_scroll = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
accel_profile = flat
}
env = NIXOS_OZONE_WL, 1
env = NIXPKGS_ALLOW_UNFREE, 1
env = XDG_CURRENT_DESKTOP, Hyprland
env = XDG_SESSION_TYPE, wayland
env = XDG_SESSION_DESKTOP, Hyprland
env = GDK_BACKEND, wayland
env = CLUTTER_BACKEND, wayland
env = QT_QPA_PLATFORM, wayland
env = QT_WAYLAND_DISABLE_WINDOWDECORATION, 1
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
env = MOZ_ENABLE_WAYLAND, 1
gestures {
workspace_swipe = true
workspace_swipe_fingers = 3
}
misc {
mouse_move_enables_dpms = true
key_press_enables_dpms = false
}
animations {
enabled = yes
bezier = wind, 0.05, 0.9, 0.1, 1.05
bezier = winIn, 0.1, 1.1, 0.1, 1.1
bezier = winOut, 0.3, -0.3, 0, 1
bezier = liner, 1, 1, 1, 1
animation = windows, 1, 6, wind, slide
animation = windowsIn, 1, 6, winIn, slide
animation = windowsOut, 1, 5, winOut, slide
animation = windowsMove, 1, 5, wind, slide
animation = border, 1, 1, liner
${if borderAnim == true then ''
animation = borderangle, 1, 30, liner, loop
'' else ''
''}
animation = fade, 1, 10, default
animation = workspaces, 1, 5, wind
}
decoration {
rounding = 10
drop_shadow = false
blur {
enabled = true
size = 5
passes = 3
new_optimizations = on
ignore_opacity = on
}
}
plugin {
hyprtrails {
color = rgba(${theme.base0A}ff)
}
}
exec-once = dbus-update-activation-environment --systemd --all
exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = swww init
exec-once = waybar
exec-once = swaync
exec-once = wallsetter
exec-once = nm-applet --indicator
dwindle {
pseudotile = true
preserve_split = true
}
master {
new_is_master = true
}
bind = ${modifier},Return,exec,${terminal}
bind = ${modifier}SHIFT,Return,exec,rofi-launcher
bind = ${modifier}SHIFT,W,exec,web-search
bind = ${modifier}SHIFT,N,exec,swaync-client -rs
${if browser == "google-chrome" then ''
bind = ${modifier},W,exec,google-chrome-stable
'' else ''
bind = ${modifier},W,exec,${browser}
''}
bind = ${modifier},E,exec,emopicker9000
bind = ${modifier},S,exec,screenshootin
bind = ${modifier},D,exec,discord
bind = ${modifier},O,exec,obs
bind = ${modifier},G,exec,gimp
bind = ${modifier}SHIFT,G,exec,godot4
bind = ${modifier},T,exec,thunar
bind = ${modifier},M,exec,spotify
bind = ${modifier},Q,killactive,
bind = ${modifier},P,pseudo,
bind = ${modifier}SHIFT,I,togglesplit,
bind = ${modifier},F,fullscreen,
bind = ${modifier}SHIFT,F,togglefloating,
bind = ${modifier}SHIFT,C,exit,
bind = ${modifier}SHIFT,left,movewindow,l
bind = ${modifier}SHIFT,right,movewindow,r
bind = ${modifier}SHIFT,up,movewindow,u
bind = ${modifier}SHIFT,down,movewindow,d
bind = ${modifier}SHIFT,h,movewindow,l
bind = ${modifier}SHIFT,l,movewindow,r
bind = ${modifier}SHIFT,k,movewindow,u
bind = ${modifier}SHIFT,j,movewindow,d
bind = ${modifier},left,movefocus,l
bind = ${modifier},right,movefocus,r
bind = ${modifier},up,movefocus,u
bind = ${modifier},down,movefocus,d
bind = ${modifier},h,movefocus,l
bind = ${modifier},l,movefocus,r
bind = ${modifier},k,movefocus,u
bind = ${modifier},j,movefocus,d
bind = ${modifier},1,workspace,1
bind = ${modifier},2,workspace,2
bind = ${modifier},3,workspace,3
bind = ${modifier},4,workspace,4
bind = ${modifier},5,workspace,5
bind = ${modifier},6,workspace,6
bind = ${modifier},7,workspace,7
bind = ${modifier},8,workspace,8
bind = ${modifier},9,workspace,9
bind = ${modifier},0,workspace,10
bind = ${modifier}SHIFT,SPACE,movetoworkspace,special
bind = ${modifier},SPACE,togglespecialworkspace
bind = ${modifier}SHIFT,1,movetoworkspace,1
bind = ${modifier}SHIFT,2,movetoworkspace,2
bind = ${modifier}SHIFT,3,movetoworkspace,3
bind = ${modifier}SHIFT,4,movetoworkspace,4
bind = ${modifier}SHIFT,5,movetoworkspace,5
bind = ${modifier}SHIFT,6,movetoworkspace,6
bind = ${modifier}SHIFT,7,movetoworkspace,7
bind = ${modifier}SHIFT,8,movetoworkspace,8
bind = ${modifier}SHIFT,9,movetoworkspace,9
bind = ${modifier}SHIFT,0,movetoworkspace,10
bind = ${modifier}CONTROL,right,workspace,e+1
bind = ${modifier}CONTROL,left,workspace,e-1
bind = ${modifier},mouse_down,workspace, e+1
bind = ${modifier},mouse_up,workspace, e-1
bindm = ${modifier},mouse:272,movewindow
bindm = ${modifier},mouse:273,resizewindow
bind = ALT,Tab,cyclenext
bind = ALT,Tab,bringactivetotop
bind = ,XF86AudioRaiseVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bind = ,XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
binde = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind = ,XF86AudioPlay, exec, playerctl play-pause
bind = ,XF86AudioPause, exec, playerctl play-pause
bind = ,XF86AudioNext, exec, playerctl next
bind = ,XF86AudioPrev, exec, playerctl previous
bind = ,XF86MonBrightnessDown,exec,brightnessctl set 5%-
bind = ,XF86MonBrightnessUp,exec,brightnessctl set +5%
'' ];
};
}

319
flake.lock Normal file
View File

@ -0,0 +1,319 @@
{
"nodes": {
"base16-schemes": {
"flake": false,
"locked": {
"lastModified": 1696158499,
"narHash": "sha256-5yIHgDTPjoX/3oDEfLSQ0eJZdFL1SaCfb9d6M0RmOTM=",
"owner": "tinted-theming",
"repo": "base16-schemes",
"rev": "a9112eaae86d9dd8ee6bb9445b664fba2f94037a",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-schemes",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715486357,
"narHash": "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "44677a1c96810a8e8c4ffaeaad10c842402647c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1713612213,
"narHash": "sha256-zJboXgWNpNhKyNF8H/3UYzWkx7w00TOCGKi3cwi+tsw=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "cab4746180f210a3c1dd3d53e45c510e309e90e1",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprland": {
"inputs": {
"hyprcursor": "hyprcursor",
"hyprlang": "hyprlang",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"systems": "systems",
"xdph": "xdph"
},
"locked": {
"lastModified": 1715635266,
"narHash": "sha256-c4l89M8/x4h0VHds7IC1W8yfu27lVN4uoeY57/OmI5Q=",
"ref": "refs/heads/main",
"rev": "ba696521930059aa489ac6ffabe28553edaf2fa3",
"revCount": 4683,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
}
},
"hyprland-plugins": {
"inputs": {
"hyprland": [
"hyprland"
],
"systems": [
"hyprland-plugins",
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1715609979,
"narHash": "sha256-3v/P6UyVhQxrQfIv2/0fCO0moCyWv+4QKp6EfD+TPww=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "c2c70332a173c93b568ba41a5bb17c66db58d95e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-plugins",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
],
"systems": [
"hyprland",
"xdph",
"systems"
]
},
"locked": {
"lastModified": 1691753796,
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1713121246,
"narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1715608589,
"narHash": "sha256-vimNaLjLcoNIvBhF37GaB6PRYEvKMamY3UnDE9M5MW8=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "65c2636484e5cb00583b8a7446c3fb657f568883",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"nix-colors": {
"inputs": {
"base16-schemes": "base16-schemes",
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1707825078,
"narHash": "sha256-hTfge2J2W+42SZ7VHXkf4kjU+qzFqPeC9k66jAUBMHk=",
"owner": "misterio77",
"repo": "nix-colors",
"rev": "b01f024090d2c4fc3152cd0cf12027a7b8453ba1",
"type": "github"
},
"original": {
"owner": "misterio77",
"repo": "nix-colors",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1715534503,
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1697935651,
"narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e1e11fdbb01113d85c7f41cada9d2847660e3902",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1715534503,
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
"nix-colors": "nix-colors",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1714662532,
"narHash": "sha256-Pj2xGSYhapYbXL7sk7TTlOtCZcTfPQoL3fPbZeg7L4Y=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "1f228ba2f1f254195c0b571302b37482861abee3",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -6,7 +6,7 @@
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-colors.url = "github:misterio77/nix-colors";
hyprland.url = "github:hyprwm/Hyprland";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
@ -17,7 +17,6 @@
inputs@{
nixpkgs,
home-manager,
impermanence,
...
}:
let

View File

@ -16,6 +16,13 @@
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernel.sysctl = { "vm.max_map_count" = 2147483642; };
boot.tmp.useTmpfs = false;
boot.tmp.tmpfsSize = "30%";
# This is for OBS Virtual Cam Support - v4l2loopback setup
boot.kernelModules = [ "v4l2loopback" ];
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
networking.hostName = "${host}"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -45,19 +52,6 @@
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Cinnamon Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.cinnamon.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
@ -70,43 +64,58 @@
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
users = {
mutableUsers = true;
};
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
vim
wget
git
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
environment.variables = {
ZANEYOS_VERSION="2.0";
};
# List services that you want to enable:
# Enable the X11 windowing system.
services.xserver = {
enable = true;
displayManager.lightdm.enable = true;
desktopManager.cinnamon.enable = true;
xkb = {
layout = "us";
variant = "";
};
};
services.libinput.enable = true;
services.openssh.enable = true;
# Optimization settings and garbage collection automation
nix = {
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];

View File

@ -13,8 +13,6 @@ let
gitEmail
theme
browser
wallpaperDir
flakeDir
;
in
{
@ -30,6 +28,7 @@ in
imports = [
inputs.nix-colors.homeManagerModules.default
inputs.hyprland.homeManagerModules.default
../../config/hyprland.nix
];
# Define Settings For Xresources
@ -59,5 +58,38 @@ in
};
};
programs.bash = {
enable = true;
enableCompletion = true;
profileExtra = ''
#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
# exec Hyprland
#fi
'';
initExtra = ''
neofetch
if [ -f $HOME/.bashrc-personal ]; then
source $HOME/.bashrc-personal
fi
'';
sessionVariables = {
ZANEYOS = true;
};
shellAliases = {
sv="sudo nvim";
flake-rebuild="nh os switch --hostname ${host}";
flake-update="nh os switch --hostname ${host} --update";
gcCleanup="nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
v="nvim";
ls="lsd";
ll="lsd -l";
la="lsd -a";
lal="lsd -al";
".."="cd ..";
neofetch="neofetch --ascii ~/.config/ascii-neofetch";
};
};
programs.home-manager.enable = true;
}

View File

@ -1,11 +1,4 @@
{
userHome = "/home/${setUsername}";
flakeDir = "/home/${setUsername}/zaneyos";
wallpaperDir = "/home/${setUsername}/Pictures/Wallpapers";
screenshotDir = "/home/${setUsername}/Pictures/Screenshots";
flakePrev = "/home/${setUsername}/.zaneyos-previous";
flakeBackup = "/home/${setUsername}/.zaneyos-backup";
# Git Configuration ( For Pulling Software Repos )
gitUsername = "Tyler Kelley";
gitEmail = "tylerzanekelley@gmail.com";