Initial NixOS flake config
This commit is contained in:
@@ -0,0 +1,436 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
hyprlandPkg = pkgs.hyprland;
|
||||
hyprlandPortalPkg = pkgs.xdg-desktop-portal-hyprland;
|
||||
wordreaper = pkgs.callPackage ../../packages/wordreaper.nix { };
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./defenk-ca.nix
|
||||
./ssh-scripts.nix
|
||||
./hyprland.nix # Modularized Hyprland config
|
||||
];
|
||||
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.blake = { pkgs, ... }: {
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
size = 12.0;
|
||||
};
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
touch_scroll_multiplier = "5.0";
|
||||
background_opacity = "0.85";
|
||||
window_padding_width = 4;
|
||||
cursor_trail = 1;
|
||||
dynamic_background_opacity = true;
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
bold_italic_font = "auto";
|
||||
};
|
||||
extraConfig = ''
|
||||
include current-theme.conf
|
||||
'';
|
||||
};
|
||||
|
||||
services.easyeffects.enable = true;
|
||||
};
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" "exfat" ];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = false;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
devices = [ "nodev" ];
|
||||
useOSProber = false;
|
||||
copyKernels = true;
|
||||
theme = pkgs.fetchFromGitHub {
|
||||
owner = "Lxtharia";
|
||||
repo = "minegrub-theme";
|
||||
rev = "main";
|
||||
hash = "sha256-GvlAAIpM/iZtl/EtI+LTzEsQ2qlUkex9i4xRUZXmadM=";
|
||||
} + "/minegrub";# The theme files are inside the 'minegrub' folder of the repo
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nixos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
networking.firewall.allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
services.tailscale.enable = true;
|
||||
services.tailscale.extraSetFlags = [ "--operator=blake" ];
|
||||
networking.firewall.trustedInterfaces = [ "tailscale0" "waydroid0" ];
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.defaultSession = "hyprland-uwsm";
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
environment.shellAliases = {
|
||||
conf = "vim /home/blake/nixos-config/hosts/nixos/configuration.nix";
|
||||
nix-guide = "vim /home/blake/nixos-config/README.md";
|
||||
hypr = "vim /home/blake/nixos-config/hosts/nixos/hyprland.nix";
|
||||
rebuild = "sudo nixos-rebuild switch --flake '/home/blake/nixos-config#nixos'";
|
||||
ls = "eza";
|
||||
la = "eza --all";
|
||||
ll = "eza --long --icons";
|
||||
};
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
options = "caps:escape";
|
||||
};
|
||||
console.useXkbConfig = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
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;
|
||||
|
||||
#wireplumber.extraConfig = {
|
||||
# "10-bluez" = {
|
||||
# "monitor.bluez.properties" = {
|
||||
# "bluez5.enable-sbc-xq" = true;
|
||||
# "bluez5.enable-msbc" = true;
|
||||
# "bluez5.enable-hw-volume" = true;
|
||||
# "bluez5.roles" = [ "a2dp_sink" "a2dp_source" "headset_head_unit" "headset_audio_gateway" ];
|
||||
# };
|
||||
# };
|
||||
# "11-bluetooth-policy" = {
|
||||
# "monitor.bluez.rules" = [
|
||||
# {
|
||||
# matches = [
|
||||
# { "device.name" = "~bluez_card.3C_B0_ED_D2_F1_6C"; }
|
||||
# ];
|
||||
# actions = {
|
||||
# update-props = {
|
||||
# "bluez5.codecs" = [ "aac" "sbc" "sbc_xq" ];
|
||||
# "bluez5.default-codec" = "aac";
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
#};
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.blake = {
|
||||
isNormalUser = true;
|
||||
description = "Blake";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" ];
|
||||
packages = with pkgs; [
|
||||
kdePackages.kate
|
||||
];
|
||||
};
|
||||
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
# Allow NixOS to run the upstream browser and desktop-control helpers Hermes uses.
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
libx11
|
||||
libxi
|
||||
libxkbcommon
|
||||
];
|
||||
programs.kdeconnect.enable = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.waydroid.enable = true;
|
||||
# Persistent local Windows VM support. QEMU supplies UEFI; swtpm provides
|
||||
# the TPM 2.0 Windows 11 expects; SPICE handles display, clipboard, and USB.
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu.swtpm.enable = true;
|
||||
};
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
wordreaper
|
||||
freetube
|
||||
(wordlists.override { lists = [ rockyou ]; })
|
||||
appimage-run
|
||||
rpi-imager
|
||||
exiftool
|
||||
nodejs_22
|
||||
zfs
|
||||
hyprpaper
|
||||
nwg-displays
|
||||
spotify
|
||||
obsidian
|
||||
nh
|
||||
vim
|
||||
openvpn
|
||||
prusa-slicer
|
||||
wget
|
||||
brave
|
||||
git
|
||||
fcrackzip
|
||||
gcc
|
||||
gnumake
|
||||
nmap
|
||||
cmake
|
||||
pkg-config
|
||||
expat
|
||||
hyprland-protocols
|
||||
codex
|
||||
cewl
|
||||
openconnect
|
||||
chromium
|
||||
ipscan
|
||||
volatility3
|
||||
wireguard-tools
|
||||
wl-clicker
|
||||
hyprcursor
|
||||
libglvnd
|
||||
ripgrep
|
||||
fd
|
||||
gocryptfs
|
||||
neovim
|
||||
pciutils
|
||||
ghidra
|
||||
vscodium
|
||||
vesktop
|
||||
jellyfin-media-player
|
||||
unzip
|
||||
aircrack-ng
|
||||
openssl
|
||||
rustscan
|
||||
inetutils
|
||||
libarchive
|
||||
btop
|
||||
kdePackages.gwenview
|
||||
lmstudio
|
||||
samba
|
||||
kubectl
|
||||
thc-hydra
|
||||
rockyou
|
||||
metasploit
|
||||
foundry
|
||||
pipx
|
||||
file
|
||||
binutils
|
||||
binwalk
|
||||
sleuthkit
|
||||
autopsy
|
||||
tldr
|
||||
# kitty
|
||||
kittysay
|
||||
oh-my-zsh
|
||||
oh-my-posh
|
||||
fzf
|
||||
eza
|
||||
ntfs3g
|
||||
gobuster
|
||||
exfatprogs
|
||||
p7zip
|
||||
extundelete
|
||||
testdisk
|
||||
sage
|
||||
hashid
|
||||
hashcat
|
||||
john
|
||||
(ophcrack.overrideAttrs (old: {
|
||||
buildInputs = (old.buildInputs or []) ++ [ expat ];
|
||||
}))
|
||||
chntpw
|
||||
qbittorrent
|
||||
vlc
|
||||
flatpak
|
||||
openlinkhub
|
||||
proton-vpn
|
||||
wl-clipboard
|
||||
grim
|
||||
slurp
|
||||
ncdu
|
||||
fw-fanctrl
|
||||
nvtopPackages.full
|
||||
wireshark
|
||||
taskwarrior3
|
||||
noctalia-shell
|
||||
codex
|
||||
quickshell
|
||||
hyprshell
|
||||
udiskie
|
||||
hyprpolkitagent
|
||||
vicinae
|
||||
kdePackages.dolphin
|
||||
qutebrowser
|
||||
playerctl
|
||||
brightnessctl
|
||||
libnotify
|
||||
jq
|
||||
libreoffice-still
|
||||
sendme
|
||||
typst
|
||||
zathura
|
||||
tinymist
|
||||
steghide
|
||||
hexedit
|
||||
stegseek
|
||||
tmux
|
||||
(python3.withPackages(ps: with ps; [
|
||||
web3
|
||||
pycryptodome
|
||||
pwntools
|
||||
requests
|
||||
tqdm
|
||||
pynput
|
||||
keyboard
|
||||
]))
|
||||
];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
services.blueman.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
services.fprintd.tod.enable = true;
|
||||
services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix;
|
||||
security.pam.services.sudo.fprintAuth = true;
|
||||
security.pam.services.polkit-1.fprintAuth = true;
|
||||
security.pam.services.sddm.fprintAuth = false;
|
||||
# Allow fprintd to disable USB persist for Goodix sensors
|
||||
systemd.services.fprintd.serviceConfig = {
|
||||
ProtectKernelTunables = false;
|
||||
ReadWritePaths = [ "/sys/bus/usb/devices" ];
|
||||
};
|
||||
|
||||
services.flatpak.enable = true;
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = hyprlandPkg;
|
||||
portalPackage = hyprlandPortalPkg;
|
||||
withUWSM = true;
|
||||
};
|
||||
xdg.portal.config.common.default = "*";
|
||||
# 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;
|
||||
# };
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
hardware.ckb-next = {
|
||||
enable = true;
|
||||
package = pkgs.ckb-next.overrideAttrs (old: {
|
||||
cmakeFlags = (old.cmakeFlags or [ ]) ++ [ "-DUSE_DBUS_MENU=0" ];
|
||||
});
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "26.05"; # Did you read the comment?
|
||||
#oh-my-zsh = {
|
||||
# enable = true;
|
||||
#}
|
||||
# KWallet Auto-unlock
|
||||
security.pam.services.sddm.enableKwallet = true;
|
||||
security.pam.services.login.fprintAuth = false;
|
||||
security.pam.services.hyprland.enableKwallet = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
environment.variables = {
|
||||
ZDOTDIR = "$HOME/.config/zsh";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/wordlists" = {
|
||||
device = "/dev/disk/by-label/wordlists";
|
||||
fsType = "ext4";
|
||||
options = [ "nofail" "x-systemd.automount" "x-systemd.device-timeout=5" ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
# Trust the DEFENK VPN's private root certificate system-wide.
|
||||
security.pki.certificateFiles = [ ./root_ca.crt ];
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# Hardware configuration for Corsair MP600 PRO LPX 2 TB NVMe (A5JQB34902JR7K)
|
||||
# Generated during migration from Framework 250 GB Expansion Card.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "uas" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# LUKS on NVMe Partition 2
|
||||
boot.initrd.luks.devices."cryptroot" = {
|
||||
device = "/dev/disk/by-uuid/ea31deed-6dbf-4420-ab6b-dd076193f50b";
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
|
||||
# Hibernation resume device
|
||||
boot.resumeDevice = "/dev/vg_nixos/swap";
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/vg_nixos/root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/12CE-A600";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/vg_nixos/swap"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,417 @@
|
||||
-- Phase 1 Hyprland Lua migration for Blake.
|
||||
-- Target: Hyprland v0.56.x
|
||||
-- Intent: preserve the current daily-use workflow while moving off hyprlang.
|
||||
|
||||
local HOME = os.getenv("HOME") or "/home/blake"
|
||||
local XDG_CONFIG_HOME = os.getenv("XDG_CONFIG_HOME") or (HOME .. "/.config")
|
||||
|
||||
local mainMod = "SUPER"
|
||||
local terminal = "kitty"
|
||||
local fileManager = "dolphin"
|
||||
local browser = "qutebrowser"
|
||||
local email = "thunderbird"
|
||||
local menu = "noctalia-shell ipc call launcher toggle"
|
||||
local ipc = "noctalia-shell ipc"
|
||||
local legacyMonitorFile = XDG_CONFIG_HOME .. "/hypr/monitors.conf"
|
||||
|
||||
local function load_monitor_rules(path)
|
||||
local handle = io.open(path, "r")
|
||||
if not handle then
|
||||
hl.monitor({
|
||||
output = "",
|
||||
mode = "preferred",
|
||||
position = "auto",
|
||||
scale = "auto",
|
||||
})
|
||||
return
|
||||
end
|
||||
|
||||
local loaded = 0
|
||||
for line in handle:lines() do
|
||||
local rule = line:match("^monitor=(.+)$")
|
||||
if rule then
|
||||
local output, mode, position, scale = rule:match("^([^,]+),([^,]+),([^,]+),([^,]+)$")
|
||||
if output and mode and position and scale then
|
||||
hl.monitor({
|
||||
output = output,
|
||||
mode = mode,
|
||||
position = position,
|
||||
scale = scale,
|
||||
})
|
||||
loaded = loaded + 1
|
||||
else
|
||||
local mon, keyword, value = rule:match("^([^,]+),([^,]+),(.+)$")
|
||||
if mon and keyword == "transform" and tonumber(value) then
|
||||
hl.monitor({
|
||||
output = mon,
|
||||
transform = tonumber(value),
|
||||
})
|
||||
loaded = loaded + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
handle:close()
|
||||
|
||||
if loaded == 0 then
|
||||
hl.monitor({
|
||||
output = "",
|
||||
mode = "preferred",
|
||||
position = "auto",
|
||||
scale = "auto",
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
local function bind_exec(keys, command, opts)
|
||||
hl.bind(keys, hl.dsp.exec_cmd(command), opts)
|
||||
end
|
||||
|
||||
hl.env("XCURSOR_SIZE", "24")
|
||||
hl.env("HYPRCURSOR_SIZE", "24")
|
||||
hl.env("XCURSOR_THEME", "breeze_cursors")
|
||||
hl.env("HYPRCURSOR_THEME", "breeze_cursors")
|
||||
-- Prefer Wayland automatically for Electron applications while retaining
|
||||
-- XWayland as a fallback for applications that need it.
|
||||
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
|
||||
|
||||
load_monitor_rules(legacyMonitorFile)
|
||||
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 3,
|
||||
gaps_out = 1,
|
||||
border_size = 1,
|
||||
col = {
|
||||
active_border = "rgb(ffb3b2)",
|
||||
inactive_border = "rgb(181212)",
|
||||
},
|
||||
resize_on_border = true,
|
||||
allow_tearing = false,
|
||||
layout = "dwindle",
|
||||
},
|
||||
|
||||
decoration = {
|
||||
rounding = 3,
|
||||
active_opacity = 1.0,
|
||||
inactive_opacity = 0.9,
|
||||
shadow = {
|
||||
enabled = true,
|
||||
range = 4,
|
||||
render_power = 3,
|
||||
color = "rgba(1a1a1aee)",
|
||||
},
|
||||
blur = {
|
||||
enabled = true,
|
||||
size = 3,
|
||||
passes = 1,
|
||||
vibrancy = 0.1696,
|
||||
},
|
||||
},
|
||||
|
||||
animations = {
|
||||
enabled = true,
|
||||
},
|
||||
|
||||
dwindle = {
|
||||
preserve_split = true,
|
||||
},
|
||||
|
||||
master = {
|
||||
new_status = "master",
|
||||
},
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0,
|
||||
disable_hyprland_logo = false,
|
||||
},
|
||||
|
||||
input = {
|
||||
kb_layout = "us",
|
||||
kb_options = "caps:escape",
|
||||
follow_mouse = 1,
|
||||
sensitivity = 0,
|
||||
accel_profile = "flat",
|
||||
scroll_factor = 0.35,
|
||||
touchpad = {
|
||||
natural_scroll = false,
|
||||
scroll_factor = 0.15,
|
||||
},
|
||||
},
|
||||
|
||||
xwayland = {
|
||||
force_zero_scaling = true,
|
||||
},
|
||||
})
|
||||
|
||||
hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } })
|
||||
hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } })
|
||||
hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } })
|
||||
hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1 } } })
|
||||
hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1 } } })
|
||||
|
||||
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
|
||||
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "windows", enabled = true, speed = 4.79, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, bezier = "easeOutQuint", style = "popin 87%" })
|
||||
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" })
|
||||
hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" })
|
||||
hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" })
|
||||
hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" })
|
||||
hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" })
|
||||
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
|
||||
hl.animation({ leaf = "workspaces", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||
hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" })
|
||||
|
||||
hl.gesture({
|
||||
fingers = 3,
|
||||
direction = "horizontal",
|
||||
action = "workspace",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "special-discord",
|
||||
match = { class = "^(vesktop)$" },
|
||||
workspace = "special:discord",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "special-obsidian",
|
||||
match = { class = "^(obsidian)$" },
|
||||
workspace = "special:obsidian",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "special-spotify",
|
||||
-- Spotify has used both lowercase and title-case X11 window classes.
|
||||
match = { class = "^([Ss]potify)$" },
|
||||
workspace = "special:spotify",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "special-email",
|
||||
match = { class = "^([Tt]hunderbird)$" },
|
||||
workspace = "special:email",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "suppress-maximize",
|
||||
match = { class = ".*" },
|
||||
suppress_event = "maximize",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "hyprland-run",
|
||||
match = { class = "^(hyprland-run)$" },
|
||||
float = true,
|
||||
move = "20 monitor_h-120",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "calc-term",
|
||||
match = { class = "^(calc-term)$" },
|
||||
float = true,
|
||||
pseudo = true,
|
||||
center = true,
|
||||
size = "40% 40%",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "btop-popup",
|
||||
match = { class = "^(btop)$" },
|
||||
float = true,
|
||||
size = "90% 80%",
|
||||
dim_around = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "popup-term",
|
||||
match = { class = "^(popup-term)$" },
|
||||
float = true,
|
||||
size = "90% 80%",
|
||||
dim_around = true,
|
||||
opacity = "0.9 0.8",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "kitty-opacity",
|
||||
match = { class = "^(kitty)$" },
|
||||
opacity = "1.0 1.0",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "xwayland-drag-fix",
|
||||
match = {
|
||||
class = "^$",
|
||||
title = "^$",
|
||||
xwayland = true,
|
||||
float = true,
|
||||
fullscreen = false,
|
||||
pin = false,
|
||||
},
|
||||
no_focus = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "picture-in-picture",
|
||||
match = { title = "^(Picture in picture)$" },
|
||||
float = true,
|
||||
pin = true,
|
||||
center = true,
|
||||
keep_aspect_ratio = true,
|
||||
persistent_size = true,
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "privacy-browsers-float",
|
||||
match = { class = "^(Tor Browser|Mullvad Browser)$" },
|
||||
float = true,
|
||||
center = true,
|
||||
fullscreen_state = "0 0",
|
||||
suppress_event = "maximize",
|
||||
})
|
||||
|
||||
hl.window_rule({
|
||||
name = "noctalia-settings",
|
||||
match = {
|
||||
class = "^dev.noctalia.Noctalia$",
|
||||
initial_title = "^Noctalia Settings$",
|
||||
},
|
||||
float = true,
|
||||
center = true,
|
||||
size = "50% 80%",
|
||||
})
|
||||
|
||||
hl.on("hyprland.start", function()
|
||||
-- Noctalia owns the wallpaper layer and restores its saved wallpaper.
|
||||
-- Starting Hyprpaper too creates a competing background with a different
|
||||
-- fit mode after each login.
|
||||
hl.exec_cmd("systemctl --user start hyprpolkitagent")
|
||||
hl.exec_cmd("udiskie")
|
||||
hl.exec_cmd("hyprpm reload -n")
|
||||
hl.exec_cmd("kdeconnectd")
|
||||
hl.exec_cmd("hyprshell run &")
|
||||
hl.exec_cmd("vesktop -m --user-agent-os windows")
|
||||
hl.exec_cmd("noctalia-shell")
|
||||
hl.exec_cmd("hyprctl setcursor breeze_cursors 24")
|
||||
end)
|
||||
|
||||
hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd(terminal))
|
||||
-- Tap the left Super key to open Hyprshell's overview. Triggering on release
|
||||
-- leaves Super free to act as a modifier for bindings such as Super+Q.
|
||||
hl.bind("SUPER + SUPER_L", hl.dsp.exec_cmd("hyprshell socat '\"OpenOverview\"'"), { release = true })
|
||||
hl.bind(mainMod .. " + CTRL + S", hl.dsp.exec_cmd("grim -g \"$(slurp)\" - | wl-copy"))
|
||||
hl.bind("ALT + Q", hl.dsp.exec_cmd(terminal .. " --class popup-term"))
|
||||
hl.bind(mainMod .. " + W", hl.dsp.exec_cmd(terminal .. " --class popup-term"))
|
||||
hl.bind(mainMod .. " + C", hl.dsp.window.close())
|
||||
hl.bind(mainMod .. " + SHIFT + CTRL + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit"))
|
||||
hl.bind(mainMod .. " + P", hl.dsp.window.pin())
|
||||
hl.bind(mainMod .. " + SHIFT + P", hl.dsp.window.float({ action = "toggle" }))
|
||||
hl.bind(mainMod .. " + SHIFT + BACKSLASH", hl.dsp.window.float({ action = "toggle" }))
|
||||
hl.bind(mainMod .. " + BACKSLASH", hl.dsp.layout("togglesplit"))
|
||||
hl.bind(mainMod .. " + CTRL + BACKSLASH", hl.dsp.window.pseudo())
|
||||
hl.bind(mainMod .. " + Return", hl.dsp.window.fullscreen({ mode = "maximized", action = "toggle" }))
|
||||
hl.bind(mainMod .. " + SHIFT + Return", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }))
|
||||
|
||||
hl.bind(mainMod .. " + H", hl.dsp.focus({ direction = "left" }))
|
||||
hl.bind(mainMod .. " + L", hl.dsp.focus({ direction = "right" }))
|
||||
hl.bind(mainMod .. " + K", hl.dsp.focus({ direction = "up" }))
|
||||
hl.bind(mainMod .. " + J", hl.dsp.focus({ direction = "down" }))
|
||||
|
||||
hl.bind(mainMod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" }))
|
||||
hl.bind(mainMod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" }))
|
||||
hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" }))
|
||||
hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" }))
|
||||
|
||||
for i = 1, 10 do
|
||||
local key = tostring(i % 10)
|
||||
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i }))
|
||||
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
|
||||
end
|
||||
|
||||
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))
|
||||
bind_exec(mainMod .. " + D", "hyprctl clients | grep -iq \"vesktop\" && hyprctl dispatch 'hl.dsp.workspace.toggle_special(\"discord\")' || vesktop --user-agent-os windows")
|
||||
bind_exec(mainMod .. " + S", "hyprctl clients | grep -iq \"spotify\" && hyprctl dispatch 'hl.dsp.workspace.toggle_special(\"spotify\")' || spotify")
|
||||
bind_exec(mainMod .. " + E", "hyprctl clients | grep -iq \"thunderbird\" && hyprctl dispatch 'hl.dsp.workspace.toggle_special(\"email\")' || " .. email)
|
||||
hl.bind(mainMod .. " + SHIFT + O", hl.dsp.workspace.toggle_special("obsidian"))
|
||||
bind_exec(mainMod .. " + N", "obsidian")
|
||||
bind_exec("ALT + E", email)
|
||||
bind_exec(mainMod .. " + B", "brave")
|
||||
bind_exec(mainMod .. " + SHIFT + F", browser)
|
||||
bind_exec(mainMod .. " + SHIFT + Q", browser)
|
||||
bind_exec(mainMod .. " + SPACE", "playerctl play-pause")
|
||||
bind_exec("ALT_L + C", ipc .. " call clipper openPanel")
|
||||
bind_exec("SUPER + escape", "kitty --class btop -o \"confirm_os_window_close 0\" btop")
|
||||
bind_exec("CTRL + SHIFT + ESCAPE", "btop")
|
||||
bind_exec(mainMod .. " + comma", ipc .. " call controlCenter toggle")
|
||||
bind_exec(mainMod .. " + period", ipc .. " call settings toggle")
|
||||
bind_exec("PRINT", "hyprshot -m active -m window --output-folder ~/screenshot")
|
||||
bind_exec("SHIFT + PRINT", "hyprshot -m region --output-folder ~/screenshots")
|
||||
bind_exec("ALT + PRINT", "hyprshot -m active -m output --output-folder ~/screenshots")
|
||||
hl.bind(mainMod .. " + M", hl.dsp.submap("quick-settings"))
|
||||
hl.bind(mainMod .. " + O", hl.dsp.submap("open-apps"))
|
||||
bind_exec(mainMod .. " + CTRL + L", ipc .. " lockScreen lock")
|
||||
|
||||
hl.bind(mainMod .. " + right", hl.dsp.window.resize({ x = 20, y = 0, relative = true }), { repeating = true })
|
||||
hl.bind(mainMod .. " + left", hl.dsp.window.resize({ x = -20, y = 0, relative = true }), { repeating = true })
|
||||
hl.bind(mainMod .. " + up", hl.dsp.window.resize({ x = 0, y = -20, relative = true }), { repeating = true })
|
||||
hl.bind(mainMod .. " + down", hl.dsp.window.resize({ x = 0, y = 20, relative = true }), { repeating = true })
|
||||
|
||||
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag())
|
||||
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize())
|
||||
|
||||
bind_exec("XF86AudioRaiseVolume", "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+", { locked = true, repeating = true })
|
||||
bind_exec("XF86AudioLowerVolume", "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-", { locked = true, repeating = true })
|
||||
bind_exec("XF86AudioMute", "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", { locked = true, repeating = true })
|
||||
bind_exec("XF86AudioMicMute", "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", { locked = true, repeating = true })
|
||||
bind_exec("XF86MonBrightnessUp", "brightnessctl -e4 -n2 set 5%+", { locked = true, repeating = true })
|
||||
bind_exec("XF86MonBrightnessDown", "brightnessctl -e4 -n2 set 5%-", { locked = true, repeating = true })
|
||||
bind_exec("XF86AudioNext", "playerctl next", { locked = true })
|
||||
bind_exec("XF86AudioPause", "playerctl play-pause", { locked = true })
|
||||
bind_exec("XF86AudioPlay", "playerctl play-pause", { locked = true })
|
||||
bind_exec("XF86AudioPrev", "playerctl previous", { locked = true })
|
||||
bind_exec("ALT + mouse:274", "playerctl play-pause")
|
||||
|
||||
hl.define_submap("quick-settings", function()
|
||||
bind_exec("V", "protonvpn-app")
|
||||
bind_exec("S", ipc .. " settings toggle")
|
||||
bind_exec("C", ipc .. " plugin:clipper togglePanel")
|
||||
bind_exec("P", ipc .. " sessionMenu toggle")
|
||||
bind_exec(mainMod .. " + L", ipc .. " sessionMenu toggle")
|
||||
bind_exec("T", ipc .. " systemMonitor toggle")
|
||||
bind_exec("M", ipc .. " controlCenter toggle")
|
||||
bind_exec("D", ipc .. " notifications toggleDND")
|
||||
bind_exec("A", ipc .. " notifications dismissAll")
|
||||
bind_exec("N", ipc .. " notifications toggleHistory")
|
||||
hl.bind("L", hl.dsp.submap("layouts"))
|
||||
bind_exec("SHIFT + B", ipc .. " bar toggle")
|
||||
bind_exec("B", ipc .. " bluetooth togglePanel")
|
||||
bind_exec("W", ipc .. " network togglePanel")
|
||||
bind_exec("SHIFT + W", ipc .. " wifi toggle")
|
||||
hl.bind("catchall", hl.dsp.submap("reset"))
|
||||
end)
|
||||
|
||||
hl.define_submap("open-apps", function()
|
||||
bind_exec("S", "spotify")
|
||||
bind_exec("D", "vesktop --user-agent-os windows")
|
||||
bind_exec("F", "firefox")
|
||||
bind_exec("Q", browser)
|
||||
bind_exec("M", "feishin")
|
||||
bind_exec("O", "obsidian")
|
||||
bind_exec("T", email)
|
||||
bind_exec("R", "calibre")
|
||||
bind_exec("E", "darktable")
|
||||
hl.bind("catchall", hl.dsp.submap("reset"))
|
||||
end)
|
||||
|
||||
hl.define_submap("layouts", function()
|
||||
hl.bind("D", hl.dsp.exec_cmd("hyprctl keyword general:layout dwindle"))
|
||||
hl.bind("M", hl.dsp.exec_cmd("hyprctl keyword general:layout master"))
|
||||
hl.bind("catchall", hl.dsp.submap("reset"))
|
||||
end)
|
||||
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.blake = { pkgs, ... }: {
|
||||
# Hyprland itself is configured system-wide and reads this Lua file directly.
|
||||
# Do not also enable Home Manager's Hyprland module: it manages a separate
|
||||
# hyprland.conf, whose backup collision can abort the entire activation and
|
||||
# leave this managed Lua file on an old generation.
|
||||
xdg.configFile."hypr/hyprland.lua".source = ./hyprland.lua;
|
||||
xdg.configFile."hypr/hyprpaper.conf".source = ./hyprpaper.conf;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
# Hyprpaper 0.8+ uses wallpaper blocks. An empty monitor is the fallback for
|
||||
# every output, including any monitor connected after the session starts.
|
||||
splash = false
|
||||
|
||||
wallpaper {
|
||||
monitor =
|
||||
path = /home/blake/Pictures/wallpapers/david-lucy-cyberpunk-edgerunners-4k.png
|
||||
fit_mode = fill
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIBozCCAUmgAwIBAgIQTmqi6SxFTi+jy3sapgsmmzAKBggqhkjOPQQDAjAwMRIw
|
||||
EAYDVQQKEwlERUZFTksgQ0ExGjAYBgNVBAMTEURFRkVOSyBDQSBSb290IENBMB4X
|
||||
DTI2MDkxNjE3MzEyNFoXDTM2MDkxMzE3MzEyNFowMDESMBAGA1UEChMJREVGRU5L
|
||||
IENBMRowGAYDVQQDExFERUZFTksgQ0EgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqG
|
||||
SM49AwEHA0IABMzLyHUtVhIIPy6OeWOJMR1jH3jYw/vwefiYwE1S6G92G8JputjR
|
||||
FOOv+5j2idwasByS3SuZO15eHOUds71f5L2jRTBDMA4GA1UdDwEB/wQEAwIBBjAS
|
||||
BgNVHRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBQBpUPPcsPgryaPFTysw9XScNKw
|
||||
jDAKBggqhkjOPQQDAgNIADBFAiEAvUYQqfHRdNwulLeJ7wk0/6jPGN4P4VsNAGwy
|
||||
lxgceawCIHHrCXGaTnvl5/NaWXHZMeNfWBcThKDFDDbFc+tmFx+/
|
||||
-----END CERTIFICATE-----
|
||||
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellScriptBin "chucksrocks" "ssh -i /home/blake/.ssh/id_ed25519 cstilson@chucksrocks.com \"$@\"")
|
||||
(pkgs.writeShellScriptBin "CrimsonHat" "ssh blake@68.62.154.204 -p 30232 \"$@\"")
|
||||
(pkgs.writeShellScriptBin "jellyfin" "ssh -J blake@riverrooks.dev:1215 -L 8265:localhost:8265 -L 8080:localhost:8080 blake@10.99.186.147 -p 1215 \"$@\"")
|
||||
(pkgs.writeShellScriptBin "RiverServer" "ssh blake@riverrooks.dev -p 1215 \"$@\"")
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user