Initial commit 🚀

This commit is contained in:
2023-10-13 15:56:14 +02:00
commit b593cdeb3e
50 changed files with 2454 additions and 0 deletions

4
nix/lib/colors.nix Normal file
View File

@@ -0,0 +1,4 @@
{ lib, hex }:
rec {
}

0
nix/lib/default.nix Normal file
View File

View File

@@ -0,0 +1,71 @@
{ username, pkgs, ... }:
{
imports = [
./networking.nix
./packages.nix
./services.nix
./virtulization.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
nix = {
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
nixpkgs.config.allowUnfree = true;
# Set your time zone.
time.timeZone = "Europe/Brussels";
users = {
defaultUserShell = pkgs.zsh;
groups = {
"${username}" = {};
};
users.nicolaivds = {
isNormalUser = true;
# initialPassword = "gigachad";
extraGroups = ["wheel" "video" "plugdev" "${username}"];
packages = with pkgs; [
];
};
};
environment.sessionVariables = rec {
WLR_NO_HARDWARE_CURSORS = "1";
NIXOS_OZONE_WL = "1";
LIBSEAT_BACKEND = "logind";
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
# Not officially in the specification
XDG_BIN_HOME = "$HOME/.local/bin";
PATH = [
"${XDG_BIN_HOME}"
];
};
# 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. Its 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 = "23.05"; # Did you read the comment?
}

View File

@@ -0,0 +1,11 @@
{ config, lib, pkgs, inputs, ... }:
{
users.users.justinlime.extraGroups = [ "docker" ];
environment.systemPackages = with pkgs; [
docker-compose
];
virtualisation.docker = {
enable = true;
storageDriver = true;
};
}

View File

@@ -0,0 +1,13 @@
{ ... }:
{
networking = {
networkmanager.enable = true;
nameservers = [ "1.1.1.1" "1.0.0.1" ];
firewall = {
enable = true;
checkReversePath = false;
allowedTCPPorts = [ 80 443 ];
allowedUDPPorts = [];
};
};
}

View File

@@ -0,0 +1,68 @@
{ pkgs, inputs, flake_path, ... }:
{
# List packages installed in system profile
environment = {
systemPackages = with pkgs; [
age
curl
gcc
git
gnome.file-roller
pulseaudio
unzip
wireplumber
wget
wl-clipboard
zip
inputs.home-manager.packages.${pkgs.system}.home-manager
];
variables = { EDITOR = "nvim"; };
pathsToLink = [ "/share/zsh" ];
};
hardware.opengl.enable = true;
# Programs
programs = {
dconf.enable = true;
direnv.enable = true;
hyprland.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [
xfconf
thunar-volman
thunar-archive-plugin
thunar-media-tags-plugin
];
};
zsh = {
enable = true;
syntaxHighlighting.enable = true;
enableCompletion = true;
autosuggestions.enable = true;
setOptions = ["PROMPT_SUBST" "appendhistory"];
shellAliases = {
ga = "git add";
gs = "git status";
gb = "git branch";
gm = "git merge";
gpl = "git pull";
gplo = "git pull origin";
gps = "git push";
gpso = "git push origin";
gc = "git commit";
gcm = "git commit -m";
gch = "git checkout";
gchb = "git checkout -b";
gcoe = "git config user.email";
gcon = "git config user.name";
all-switch = "nix-switch && home-switch";
all-update = "nix flake update ${flake_path}# && all-switch";
vi = "nvim";
vim = "nvim";
vimdiff = "nvim -d";
};
};
};
}

View File

@@ -0,0 +1,74 @@
{ lib, pkgs, ... }:
{
# List services that you want to enable:
services = {
xserver = {
layout = "be";
xkbVariant = "nodeadkeys";
videoDrivers = ["nvidia"];
exportConfiguration = true;
#displayManager.gdm.enable = true;
};
gnome.gnome-keyring.enable = true;
spice-vdagentd.enable = true;
gvfs = {
enable = true;
package = lib.mkForce pkgs.gnome3.gvfs;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
udev.packages = with pkgs; [
via
];
printing = {
enable = true;
drivers = with pkgs; [
gutenprint
hplip
];
};
};
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [
#pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-wlr
];
};
virtualisation = {
docker.enable = true;
docker.rootless = {
enable = true;
setSocketVariable = true;
};
spiceUSBRedirection.enable = true;
libvirtd = {
enable = true;
allowedBridges = ["wlo1"];
qemu = {
swtpm.enable = true;
ovmf.enable = true;
ovmf.packages = [ pkgs.OVMFFull.fd ];
};
};
};
security = {
rtkit.enable = true;
pam.services.swaylock = { #Swaylock fix for wrong password
text = ''
auth include login
'';
};
};
}

View File

@@ -0,0 +1,29 @@
{ config, lib, pkgs, inputs, ... }:
{
users.users.nicolaivds.extraGroups = [ "kvm" "input" "libvirtd" ];
environment.systemPackages = with pkgs; [
virt-manager
virt-viewer
win-spice
win-virtio
spice
spice-gtk
spice-protocol
];
services.spice-vdagentd.enable = true;
virtualisation = {
spiceUSBRedirection.enable = true;
libvirtd = {
enable = true;
allowedBridges = ["wlo1"];
qemu = {
swtpm.enable = true;
ovmf = {
enable = true;
packages = [ pkgs.OVMFFull.fd ];
};
};
};
};
}

View File

@@ -0,0 +1,30 @@
{ pkgs, flake_path, ... }:
{
imports = [
./hardware-configuration.nix
../base
];
# System
networking.hostName = "Beast";
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
};
environment = {
systemPackages = with pkgs; [
mangohud
nvidia-vaapi-driver
egl-wayland
];
};
powerManagement = {
enable = true;
cpuFreqGovernor = "performance";
};
# Programs
programs.zsh.shellAliases.nix-switch = "nixos-rebuild switch --use-remote-sudo --flake ${flake_path}#desktop";
}

View File

@@ -0,0 +1,68 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/0b17d697-e4df-4a42-b374-57f4474c8d36";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/813C-8212";
fsType = "vfat";
};
fileSystems."/mnt/venus" =
{ device = "/dev/disk/by-uuid/dfc684ed-744d-4560-8c69-846693fb51e6";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/9304179a-f639-41bb-8819-872fc99d5166"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = {
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
opengl = {
enable = true;
# Vulkan
driSupport = true;
driSupport32Bit = true;
# VA-API
extraPackages = with pkgs; [
vaapiVdpau
libvdpau-va-gl
nvidia-vaapi-driver
];
};
nvidia = {
modesetting.enable = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
};
};
}

View File

@@ -0,0 +1,8 @@
{ ... }:
{
imports = [
./neovim.nix
./zsh.nix
./packages.nix
];
}

25
nix/users/base/neovim.nix Normal file
View File

@@ -0,0 +1,25 @@
{ inputs, pkgs, ... }:
{
home.packages = with pkgs; [
neovim
ripgrep
# Language Servers
lua-language-server # Lua
nixd # Nix
gopls # GoLang
rust-analyzer # Rust
zls # Zig
llvmPackages_15.clang-unwrapped #C, C++
python311Packages.jedi-language-server #Python
nodePackages_latest.vscode-langservers-extracted #HTML,CSS, JSON
nodePackages_latest.grammarly-languageserver #Markdown
nodePackages_latest.typescript-language-server #Javascript and Typescript
nodePackages_latest.bash-language-server #Bash
nodePackages_latest.dockerfile-language-server-nodejs #Dockerfiles
nodePackages_latest.yaml-language-server #Yaml
];
# xdg.configFile = {
# "nvim".source = "${inputs.self}/nvim";
# };
}

View File

@@ -0,0 +1,15 @@
{ pkgs, inputs, ... }:
{
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
gcc
vrrtest
websocat
roboto
fira-code
pciutils
libnotify
(nerdfonts.override { fonts = [ "RobotoMono" ]; })
];
}

29
nix/users/base/zsh.nix Normal file
View File

@@ -0,0 +1,29 @@
{ config, ... }:
{
programs.zsh = {
enable = true;
autocd = true;
enableAutosuggestions = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
dotDir = "~/.config/zsh";
history.path = "~/.config/zsh/.zsh_history";
initExtra = ''
setopt appendhistory
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
setopt PROMPT_SUBST
PROMPT='%B%F{183}%m%f%F{111}[%f%F{158}%~%f%F{111}]%f%F{111}$(parse_git_branch)%f %F{183}>%f%f%b '
if [[ "$TERM" == "dumb" ]]
then
unsetopt zle
unsetopt prompt_cr
unsetopt prompt_subst
unfunction precmd
unfunction preexec
PS1='$ '
fi
'';
};
}

View File

@@ -0,0 +1,17 @@
rec {
primary_accent_hex = "cba6f7";
secondary_accent_hex = "89b4fa";
tertiary_accent_hex = "f5f5f5";
primary_background_hex = "11111B";
secondary_background_hex = "1b1b2b";
tertiary_background_hex = "25253a";
primary_accent_rgba = "rgba(203,166,247,${opacity})";
secondary_accent_rgba = "rgba(137,180,250,${opacity})";
tertiary_accent_rgba = "rgba(245,245,245,${opacity})";
primary_background_rgba = "rgba(17,17,27,${opacity})";
secondary_background_rgba = "rgba(27,27,43,${opacity})";
tertiary_background_rgba = "rgba(37,37,58,${opacity})";
opacity = "1";
}

View File

@@ -0,0 +1,48 @@
{ inputs, username, flake_path, ... }:
let
# Variables to share accross configs
custom = {
font = "RobotoMono Nerd Font";
fontsize = "12";
primary_accent = "cba6f7";
secondary_accent= "89b4fa";
tertiary_accent = "f5f5f5";
background = "11111B";
opacity = "1";
cursor = "Numix-Cursor";
palette = import ./colors;
};
in
{
_module.args = { inherit inputs username custom; };
imports = [
./general
./programs
./themes
./wayland
];
# Let Home Manager install and mange itself
programs.home-manager.enable = true;
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfreePredicate = _: true;
home.shellAliases = {
home-switch = "home-manager switch --flake ${flake_path}#${username}";
sudo = "sudo -E";
sudopath = "sudo env PATH=$PATH";
};
# Home Manager needs a bit of information about you and the path it should manage
home.username = "${username}";
home.homeDirectory = "/home/${username}";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "23.05";
}

View File

@@ -0,0 +1,7 @@
{ ... }:
{
imports = [
../../base
./packages.nix
];
}

View File

@@ -0,0 +1,65 @@
{ pkgs, inputs, ... }:
{
#Overlays/Overrides
nixpkgs.overlays = [
(self: super: {
waybar = super.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
})
];
programs.direnv.enable = true;
#Packages
home.packages = with pkgs; [
betterbird
bottles
brave
btop
cliphist
foot
gamemode
gamescope
glibc
go
grim
hplipWithPlugin
inputs.maxfetch.packages.${pkgs.system}.default
inputs.orcaslicer.packages.${pkgs.system}.orca-slicer
libreoffice
lutris
mpv
neofetch
neovim
nix-prefetch-github
obs-studio
obs-studio-plugins.obs-pipewire-audio-capture
obs-studio-plugins.obs-vkcapture
obs-studio-plugins.wlrobs
pavucontrol
picard
playerctl
protontricks
protonup-qt
qbittorrent
remmina
slurp
steamtinkerlaunch
swayidle
swaylock-effects
swaynotificationcenter
swww
vlc
waybar
wine-wayland
winetricks
wl-clipboard
wlogout
wofi
xdg-utils
xdotool
xorg.xprop
xorg.xwininfo
];
}

View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
programs.chromium = {
enable = true;
package = pkgs.brave;
extensions = [
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
{ id = "gebbhagfogifgggkldgodflihgfeippi"; } # Return Youtube Dislike
{ id = "mnjggcdmjocbbbhaepdhchncahnbgone"; } # SponsorBlock
{ id = "bmnlcjabgnpnenekpadlanbbkooimhnj"; } # Honey
];
};
}

View File

@@ -0,0 +1,10 @@
{
imports = [
./webcord.nix
./mpd.nix
./brave.nix
./vscodium.nix
./git.nix
./sops.nix
];
}

View File

@@ -0,0 +1,69 @@
{ pkgs, config, ... }:
{
services.gpg-agent.enable = true;
programs = {
git = {
enable = true;
delta.enable = true;
includes = [
{
condition = "gitdir:${config.home.homeDirectory}/GIT/Personal/";
contents = {
user = {
name = "Nicolai Van der Storm";
email = "nicolai@nvds.be";
signingkey = "CA53B34914EFD59B";
};
gpg.program = "gpg2";
commit.gpgsign = true;
};
}
{
condition = "gitdir:${config.home.homeDirectory}/.dotfiles/";
contents = {
user = {
name = "Nicolai Van der Storm";
email = "nicolai@nvds.be";
signingkey = "CA53B34914EFD59B";
};
gpg.program = "gpg2";
commit.gpgsign = true;
};
}
];
};
gpg = {
enable = true;
homedir = "${config.xdg.configHome}/gpg";
publicKeys = [
{source = "${config.xdg.configHome}/gpg/nicolaivds_pup.gpg";}
{source = "${config.xdg.configHome}/gpg/nicolaivds.gpg";}
];
};
ssh = {
enable = true;
matchBlocks = {
# Personal git server
"git.nvds.be" = {
hostname = "git.nvds.be";
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519_personal";
};
# Github
"github.com" = {
hostname = "github.com";
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519_personal";
};
# Gitlab
"gitlab.com" = {
hostname = "gitlab.com";
identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519_personal";
};
};
};
};
}

View File

@@ -0,0 +1,23 @@
{ config, pkgs, ... }:
{
services = {
mpdris2.enable = true;
mpd = {
enable = true;
musicDirectory = "${config.home.homeDirectory}/Music/";
network.startWhenNeeded = true;
extraConfig = ''
audio_output {
type "pipewire"
name "PipeWire Sound Server"
}
'';
};
};
programs = {
ncmpcpp = {
enable = true;
package = pkgs.ncmpcpp.override { visualizerSupport = true; };
};
};
}

View File

@@ -0,0 +1,20 @@
{ inputs, lib, config, ... }:
{
imports = [
inputs.sops-nix.homeManagerModules.sops
# <sops-nix/modules/home-manager/sops.nix>
];
sops = {
age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt";
defaultSopsFile = ../secrets/secrets.yaml;
secrets = {
ssh_nicolaivds.path = "${config.home.homeDirectory}/.ssh/id_ed25519_personal";
ssh_nicolaivds_pub.path = "${config.home.homeDirectory}/.ssh/id_ed25519_personal.pub";
gpg_nicolaivds_pub.path = "${config.xdg.configHome}/gpg/nicolaivds_pup.gpg";
gpg_nicolaivds.path = "${config.xdg.configHome}/gpg/nicolaivds.gpg";
};
};
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
}

View File

@@ -0,0 +1,7 @@
{ pkgs, ... }:
{
programs.vscode = {
enable = true;
package = pkgs.vscodium;
};
}

View File

@@ -0,0 +1,19 @@
{ pkgs, lib, ... }:
let
catppuccin-mocha = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "discord";
rev = "f5e294288267ed3eca46b43cfaea63a544230906";
hash = "sha256-LlZaJ9FCQ3otEzbWT2Zv4QObc0EmxyHpQ+onuQP1p4Y=";
};
in {
home.packages = with pkgs; [
(webcord-vencord.override { webcord = webcord.override { electron_25 = electron_24;};})
];
xdg.configFile = {
"WebCord/Themes/Mocha" = {
source = "${catppuccin-mocha}/themes/mocha.theme.css";
};
};
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./gtk.nix
./qt.nix
];
}

View File

@@ -0,0 +1,37 @@
{
pkgs,
custom ? {
font = "RobotoMono Nerd Font";
fontsize = "12";
cursor = "Numix-Cursor";
},
...
}:
{
gtk = {
enable = true;
font.name = "${custom.font} ${custom.fontsize}";
iconTheme = {
name = "Papirus-Dark";
package = pkgs.catppuccin-papirus-folders;
};
cursorTheme = {
name = "${custom.cursor}";
package = pkgs.numix-cursor-theme;
};
theme = {
name = "Catppuccin-Mocha-Standard-Blue-Dark";
package = pkgs.catppuccin-gtk.override { variant="mocha"; };
};
gtk3.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
gtk4.extraConfig = {
Settings = ''
gtk-application-prefer-dark-theme=1
'';
};
};
}

View File

@@ -0,0 +1,8 @@
{ ... }:
{
qt = {
enable = true;
platformTheme = "gtk";
style.name = "gtk2";
};
}

View File

@@ -0,0 +1,10 @@
{ ... }:
{
imports = [
./hyprland.nix
./waybar.nix
./wofi.nix
./foot.nix
./wlogout.nix
];
}

View File

@@ -0,0 +1,52 @@
{
custom ? {
font = "RobotoMono Nerd Font";
fontsize = "12";
primary_accent = "cba6f7";
background = "11111B";
opacity = ".85";
},
...
}:
{
programs.foot = {
enable = true;
server.enable = true;
settings = {
main = {
term = "xterm-256color";
font = "${custom.font}:size=${custom.fontsize}";
pad = "10x5 center";
dpi-aware = "no";
};
cursor = {
color = "${custom.primary_accent} ${custom.primary_accent}";
style = "beam";
};
colors = {
alpha="${custom.opacity}";
background="${custom.palette.tertiary_background_hex}";
# background="${custom.background}";
regular0="11111B"; # black
regular1="ff5555"; # red
regular2="afffd7"; # green
regular3="f1fa8c"; # yellow
regular4="87afff"; # blue
regular5="bd93f9"; # magenta
regular6="8be9fd"; # cyan
regular7="f8f8f2"; # white
bright0="2d5b69"; # bright black
bright1="ff665c"; # bright red
bright2="84c747"; # bright green
bright3="ebc13d"; # bright yellow
bright4="58a3ff"; # bright blue
bright5="ff84cd"; # bright magenta
bright6="53d6c7"; # bright cyan
bright7="cad8d9"; # bright white
};
tweak = {
sixel = "yes";
};
};
};
}

View File

@@ -0,0 +1,228 @@
{
config,
custom ? {
fontsize = "12";
primary_accent = "cba6f7";
secondary_accent = "89b4fa";
tertiary_accent = "f5f5f5";
background = "11111B";
opacity = ".85";
cursor = "Numix-Cursor";
},
inputs,
pkgs,
...
}:
{
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
enableNvidiaPatches = true;
xwayland.enable = true;
systemd.enable = true;
settings = {
"$mainMod" = "SUPER";
monitor = [
"DP-2, 2560x1440@144, 0x0, 1"
];
exec-once = [
"waybar"
"swww init"
''swayidle -w timeout 1800 'swaylock -f -i ${config.home.homeDirectory}/photos/wallpapers/wallpaper.png' timeout 1805 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep "swaylock -f -i ${config.home.homeDirectory}/photos/wallpapers/wallpaper.png"''
"hyprctl setcursor ${custom.cursor} ${custom.fontsize}"
"wl-paste --type text --watch cliphist store &"
"wl-paste --type image --watch cliphist store &"
"swaync"
];
input = {
kb_layout = "be";
follow_mouse = 1;
force_no_accel = 1;
numlock_by_default = true;
sensitivity = 0;
};
general = {
gaps_in = 6;
gaps_out = 10;
border_size = 2;
# "col.active_border" = "rgb(${custom.primary_accent})";
"col.active_border" = "rgba(${custom.palette.tertiary_background_hex}00)";
"col.inactive_border" = "rgba(${custom.background}00)";
#allow_tearing = true;
layout = "dwindle";
};
decoration = {
rounding = 10;
shadow_ignore_window = true;
drop_shadow = true;
shadow_range = 40;
shadow_render_power = 2;
# "col.shadow" = "rgb(${custom.primary_accent})";
"col.shadow" = "rgb(${custom.background})";
"col.shadow_inactive" = "rgba(${custom.background}00)";
blur = {
enabled = false;
size = 6;
passes = 3;
new_optimizations = true;
ignore_opacity = true;
noise = 0.0117;
contrast = 1.2;
xray = false;
brightness = 1;
};
};
animations = {
enabled = true;
bezier = "overshot,0.13,0.99,0.29,1.1";
animation = [
"windows,1,6,overshot,slide"
"border,1,10,default"
"fade,1,10,default"
"workspaces,1,6,overshot,slide"
];
};
dwindle = {
pseudotile = true;
preserve_split = true;
force_split = 2;
};
master = {
new_is_master = true;
};
gestures = {
workspace_swipe = false;
};
misc = {
vfr = true;
vrr = 0;
disable_hyprland_logo = true;
disable_splash_rendering = true;
};
bind = [
# TODO: Look into using special workspace
# Exit to tty
"$mainMod SHIFT, X, exit "
# Launch
"$mainMod, RETURN, exec, foot"
"$mainMod, D, exec, wofi"
''$mainMod,P,exec,mkdir -p ${config.home.homeDirectory}/photos/screenshots; grim -t png -g "$(slurp)" ${config.home.homeDirectory}/photos/screenshots/$(date +%Y-%m-%d_%H-%m-%s).png''
"$mainMod SHIFT,N,exec, swaync-client -t -sw"
"$mainMod,X,exec, wlogout -b 4"
"$mainMod,V,exec, cliphist list | wofi -dmenu | cliphist decode | wl-paste"
# Window Options
"$mainMod SHIFT, P, pseudo"
"$mainMod, S, togglesplit"
"$mainMod, F, fullscreen"
"$mainMod, Space, togglefloating "
"$mainMod, Q, killactive"
# Focus Windows
"$mainMod, H, movefocus, l"
"$mainMod, L, movefocus, r"
"$mainMod, K, movefocus, u"
"$mainMod, J, movefocus, d"
# Move Windows
"$mainMod SHIFT,H,movewindow,l"
"$mainMod SHIFT,L,movewindow,r"
"$mainMod SHIFT,K,movewindow,u"
"$mainMod SHIFT,J,movewindow,d"
# Switch workspaces
"$mainMod, AMPERSAND, workspace, 1"
"$mainMod, EACUTE, workspace, 2"
"$mainMod, QUOTEDBL, workspace, 3"
"$mainMod, APOSTROPHE, workspace, 4"
"$mainMod, PARENLEFT, workspace, 5"
"$mainMod, SECTION, workspace, 6"
"$mainMod, EGRAVE, workspace, 7"
"$mainMod, EXCLAM, workspace, 8"
"$mainMod, CCEDILLA, workspace, 9"
"$mainMod, AGRAVE, workspace, 10"
# Switch active window to workspace
"$mainMod SHIFT, AMPERSAND, movetoworkspace, 1"
"$mainMod SHIFT, EACUTE, movetoworkspace, 2"
"$mainMod SHIFT, QUOTEDBL, movetoworkspace, 3"
"$mainMod SHIFT, APOSTROPHE, movetoworkspace, 4"
"$mainMod SHIFT, PARENLEFT, movetoworkspace, 5"
"$mainMod SHIFT, SECTION, movetoworkspace, 6"
"$mainMod SHIFT, EGRAVE, movetoworkspace, 7"
"$mainMod SHIFT, EXCLAM, movetoworkspace, 8"
"$mainMod SHIFT, CCEDILLA, movetoworkspace, 9"
"$mainMod SHIFT, AGRAVE, movetoworkspace, 10"
# Scroll workspace with mouse scrollwheel
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
];
bindm = [
# Move and resize windows with mouse too
"$mainMod, mouse:272, movewindow"
"$mainMod SHIFT, mouse:272, resizewindow"
];
bindle = [
# Volume Keys
",XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5% "
",XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5% "
];
windowrulev2 = [
# "opacity ${custom.opacity} ${custom.opacity},class:^(thunar)$"
# "opacity ${custom.opacity} ${custom.opacity},class:^(WebCord)$"
# "opacity 0.90 0.90,class:^(Brave-browser)$"
# "opacity 0.90 0.90,class:^(brave-browser)$"
# "opacity 0.90 0.90,class:^(firefox)$"
"float,class:^(pavucontrol)$"
"float,class:^(file_progress)$"
"float,class:^(confirm)$"
"float,class:^(dialog)$"
"float,class:^(download)$"
"float,class:^(notification)$"
"float,class:^(error)$"
"float,class:^(confirmreset)$"
"float,title:^(Open File)$"
"float,title:^(branchdialog)$"
"float,title:^(Confirm to replace files)$"
"float,title:^(File Operation Progress)$"
"float,title:^(mpv)$"
"float, title:^(Picture-in-Picture)$"
# Ensure tearing for specific games
# "immediate, class:^(cs2)$"
# "immediate, class:^(love)$"
# "immediate, title:^(Freesync test)$"
];
layerrule = [
"blur, waybar"
"blur, wofi"
"ignorezero, wofi"
];
};
# Submaps
extraConfig = ''
# will switch to a submap called resize
bind=$mainMod,R,submap,resize
# will start a submap called "resize"
submap=resize
# sets repeatable binds for resizing the active window
binde=,L,resizeactive,15 0
binde=,H,resizeactive,-15 0
binde=,K,resizeactive,0 -15
binde=,J,resizeactive,0 15
# use reset to go back to the global submap
bind=,escape,submap,reset
bind=$mainMod,R,submap,reset
# will reset the submap, meaning end the current one and return to the global one
submap=reset
# For tearing
env = WLR_DRM_NO_ATOMIC,1
'';
};
}

View File

@@ -0,0 +1,323 @@
{
config,
custom ? {
font = "RobotoMono Nerd Font";
fontsize = "12";
primary_accent = "cba6f7";
secondary_accent = "89b4fa";
tertiary_accent = "f5f5f5";
background = "11111B";
opacity = ".85";
cursor = "Numix-Cursor";
},
...
}:
{
programs.waybar = {
enable = true;
settings.mainBar = {
position= "top";
layer= "top";
height= 35;
margin-top= 0;
margin-bottom= 0;
margin-left= 0;
margin-right= 0;
modules-left= [
"custom/launcher"
"custom/playerctl#backward"
"custom/playerctl#play"
"custom/playerctl#foward"
"custom/playerlabel"
];
modules-center= [
"cava#left"
"hyprland/workspaces"
"cava#right"
];
modules-right= [
"tray"
"pulseaudio"
"network"
"clock"
];
clock= {
format = " {:%a, %d %b, %I:%M %p}";
tooltip= "true";
tooltip-format= "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt= " {:%d/%m}";
};
"wlr/workspaces"= {
active-only= false;
all-outputs= false;
disable-scroll= false;
on-scroll-up= "hyprctl dispatch workspace e-1";
on-scroll-down= "hyprctl dispatch workspace e+1";
format = "{name}";
on-click= "activate";
format-icons= {
urgent= "";
active= "";
default = "";
sort-by-number= true;
};
};
"cava#left" = {
framerate = 60;
autosens = 1;
bars = 18;
lower_cutoff_freq = 50;
higher_cutoff_freq = 10000;
method = "pipewire";
source = "auto";
stereo = true;
reverse = false;
bar_delimiter = 0;
monstercat = false;
waves = false;
input_delay = 2;
format-icons = [
"<span foreground='#${custom.primary_accent}'></span>"
"<span foreground='#${custom.primary_accent}'></span>"
"<span foreground='#${custom.primary_accent}'></span>"
"<span foreground='#${custom.primary_accent}'></span>"
"<span foreground='#${custom.secondary_accent}'></span>"
"<span foreground='#${custom.secondary_accent}'></span>"
"<span foreground='#${custom.secondary_accent}'></span>"
"<span foreground='#${custom.secondary_accent}'></span>"
];
};
"cava#right" = {
framerate = 60;
autosens = 1;
bars = 18;
lower_cutoff_freq = 50;
higher_cutoff_freq = 10000;
method = "pipewire";
source = "auto";
stereo = true;
reverse = false;
bar_delimiter = 0;
monstercat = false;
waves = false;
input_delay = 2;
format-icons = [
"<span foreground='#${custom.primary_accent}'></span>"
"<span foreground='#${custom.primary_accent}'></span>"
"<span foreground='#${custom.primary_accent}'></span>"
"<span foreground='#${custom.primary_accent}'></span>"
"<span foreground='#${custom.secondary_accent}'></span>"
"<span foreground='#${custom.secondary_accent}'></span>"
"<span foreground='#${custom.secondary_accent}'></span>"
"<span foreground='#${custom.secondary_accent}'></span>"
];
};
"custom/playerctl#backward"= {
format= "󰙣 ";
on-click= "playerctl previous";
on-scroll-up = "playerctl volume .05+";
on-scroll-down = "playerctl volume .05-";
};
"custom/playerctl#play"= {
format= "{icon}";
return-type= "json";
exec= "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
on-click= "playerctl play-pause";
on-scroll-up = "playerctl volume .05+";
on-scroll-down = "playerctl volume .05-";
format-icons= {
Playing = "<span>󰏥 </span>";
Paused = "<span> </span>";
Stopped = "<span> </span>";
};
};
"custom/playerctl#foward"= {
format= "󰙡 ";
on-click= "playerctl next";
on-scroll-up = "playerctl volume .05+";
on-scroll-down = "playerctl volume .05-";
};
"custom/playerlabel"= {
format= "<span>󰎈 {} 󰎈</span>";
return-type= "json";
max-length= 40;
exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
on-click= "";
};
memory= {
format= "󰍛 {}%";
format-alt= "󰍛 {used}/{total} GiB";
interval= 5;
};
cpu= {
format= "󰻠 {usage}%";
format-alt= "󰻠 {avg_frequency} GHz";
interval= 5;
};
network = {
format-wifi = " {signalStrength}%";
format-ethernet = "󰈀 100% ";
tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
format-linked = "{ifname} (No IP)";
format-disconnected = "󰖪 0% ";
};
tray= {
icon-size= 20;
spacing= 8;
};
pulseaudio= {
format= "{icon} {volume}%";
format-muted= "󰝟";
format-icons= {
default= ["󰕿" "󰖀" "󰕾"];
};
# on-scroll-up= "bash ${config.home.homeDirectory}/.scripts/volume up";
# on-scroll-down= "bash ${config.home.homeDirectory}/.scripts/volume down";
scroll-step= 5;
on-click= "pavucontrol";
};
"custom/randwall"= {
format= "󰏘";
# on-click= "bash $HOME/.config/hypr/randwall.sh";
# on-click-right= "bash $HOME/.config/hypr/wall.sh";
};
"custom/launcher"= {
format= "";
# on-click= "bash $HOME/.config/rofi/launcher.sh";
# on-click-right= "bash $HOME/.config/rofi/run.sh";
tooltip= "false";
};
};
style = ''
* {
border: none;
border-radius: 0px;
font-family: ${custom.font};
font-size: 14px;
min-height: 0;
}
window#waybar {
background: ${custom.palette.primary_background_rgba};
}
#cava.left, #cava.right {
background: #${custom.palette.tertiary_background_hex};
margin: 5px;
padding: 8px 16px;
color: #${custom.primary_accent};
}
#cava.left {
border-radius: 24px 10px 24px 10px;
}
#cava.right {
border-radius: 10px 24px 10px 24px;
}
#workspaces {
background: #${custom.palette.tertiary_background_hex};
margin: 5px 5px;
padding: 8px 5px;
border-radius: 16px;
color: #${custom.primary_accent}
}
#workspaces button {
padding: 0px 5px;
margin: 0px 3px;
border-radius: 16px;
color: transparent;
background: ${custom.palette.primary_background_rgba};
transition: all 0.3s ease-in-out;
}
#workspaces button.active {
background-color: #${custom.secondary_accent};
color: #${custom.background};
border-radius: 16px;
min-width: 50px;
background-size: 400% 400%;
transition: all 0.3s ease-in-out;
}
#workspaces button:hover {
background-color: #${custom.tertiary_accent};
color: #${custom.background};
border-radius: 16px;
min-width: 50px;
background-size: 400% 400%;
}
#tray, #pulseaudio, #network, #battery,
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward{
background: #${custom.palette.tertiary_background_hex};
font-weight: bold;
margin: 5px 0px;
}
#tray, #pulseaudio, #network, #battery{
color: #${custom.tertiary_accent};
border-radius: 10px 24px 10px 24px;
padding: 0 20px;
margin-left: 7px;
}
#clock {
color: #${custom.tertiary_accent};
background: #${custom.palette.tertiary_background_hex};
border-radius: 0px 0px 0px 40px;
padding: 10px 10px 15px 25px;
margin-left: 7px;
font-weight: bold;
font-size: 16px;
}
#custom-launcher {
color: #${custom.secondary_accent};
background: #${custom.palette.tertiary_background_hex};
border-radius: 0px 0px 40px 0px;
margin: 0px;
padding: 0px 35px 0px 15px;
font-size: 28px;
}
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.foward {
background: #${custom.palette.tertiary_background_hex};
font-size: 22px;
}
#custom-playerctl.backward:hover, #custom-playerctl.play:hover, #custom-playerctl.foward:hover{
color: #${custom.tertiary_accent};
}
#custom-playerctl.backward {
color: #${custom.primary_accent};
border-radius: 24px 0px 0px 10px;
padding-left: 16px;
margin-left: 7px;
}
#custom-playerctl.play {
color: #${custom.secondary_accent};
padding: 0 5px;
}
#custom-playerctl.foward {
color: #${custom.primary_accent};
border-radius: 0px 10px 24px 0px;
padding-right: 12px;
margin-right: 7px
}
#custom-playerlabel {
background: #${custom.palette.tertiary_background_hex};
color: #${custom.tertiary_accent};
padding: 0 20px;
border-radius: 24px 10px 24px 10px;
margin: 5px 0;
font-weight: bold;
}
#window{
background: #${custom.palette.tertiary_background_hex};
padding-left: 15px;
padding-right: 15px;
border-radius: 16px;
margin-top: 5px;
margin-bottom: 5px;
font-weight: normal;
font-style: normal;
}
'';
};
}

View File

@@ -0,0 +1,33 @@
{ config, ... }:
{
programs.wlogout = {
enable = true;
layout = [
{
label = "lock";
# action = "waylock -f -i ${config.home.homeDirectory}/photos/wallpapers/wallpaper.png";
action = "swaylock";
text = "lock";
keybind = "l";
}
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
keybind = "s";
}
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
keybind = "r";
}
{
label = "logout";
action = "loginctl terminate-user $USER";
text = "Log out";
keybind = "e";
}
];
};
}

View File

@@ -0,0 +1,55 @@
{
custom ? {
font = "RobotoMono Nerd Font";
primary_accent = "cba6f7";
secondary_accent = "89b4fa";
tertiary_accent = "f5f5f5";
background = "11111B";
opacity = "1";
},
...
}:
{
programs.wofi = {
enable = true;
settings = {
allow_images = true;
width = "25%";
hide_scroll = true;
term = "foot";
show = "drun";
};
style =''
* {
font-family: ${custom.font},monospace;
font-weight: bold;
}
#window {
border-radius: 40px;
background: ${custom.palette.primary_background_rgba}
}
#input {
border-radius: 100px;
margin: 20px;
padding: 15px 25px;
background: ${custom.palette.tertiary_background_rgba};
color: #${custom.tertiary_accent};
}
#outer-box {
font-weight: bold;
font-size: 14px;
}
#entry {
margin: 10px 80px;
padding: 20px 20px;
border-radius: 200px;
}
#entry:selected{
background-color:#${custom.primary_accent};
color: #${custom.background};
}
#entry:hover {
}
'';
};
}