init (cerulean template)

This commit is contained in:
do butterflies cry? 2026-03-25 22:55:15 -07:00
commit 1b7b1e66f0
Signed by untrusted user: cry
GPG key ID: F68745A836CA0412
65 changed files with 5597 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/result

2
README.md Normal file
View file

@ -0,0 +1,2 @@
## UniverseBow has a flake now??
(she's so cool)

123
bak/configuration.nix Normal file
View file

@ -0,0 +1,123 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# networking.hostName = "nixos"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# services.pulseaudio.enable = true;
# OR
# services.pipewire = {
# enable = true;
# pulse.enable = true;
# };
# Enable touchpad support (enabled default in most desktopManager).
# services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
# users.users.alice = {
# isNormalUser = true;
# extraGroups = [ "wheel" ]; # Enable sudo for the user.
# packages = with pkgs; [
# tree
# ];
# };
# programs.firefox.enable = true;
# List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options).
# environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
# ];
# 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;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "25.11"; # Did you read the comment?
}

16
bak/flake.nix Normal file
View file

@ -0,0 +1,16 @@
{
inputs = {
# This is pointing to an unstable release.
# If you prefer a stable release instead, you can this to the latest number shown here: https://nixos.org/download
# i.e. nixos-24.11
# Use `nix flake update` to update the flake to the latest revision of the chosen release channel.
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs@{ self, nixpkgs, ... }: {
# NOTE: 'nixos' is the default hostname
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
modules = [ ./configuration.nix ];
};
};
}

View file

@ -0,0 +1,33 @@
# 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 = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c959876c-805c-4433-bb36-67eb13924c62";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8CC6-6102";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/091b5706-ba96-44b9-89b7-9aa7e85b8221"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

1420
flake.lock generated Normal file

File diff suppressed because it is too large Load diff

77
flake.nix Normal file
View file

@ -0,0 +1,77 @@
{
description = "uni uses nix now!!";
inputs = {
systems.url = "github:nix-systems/default-linux";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
cerulean = {
url = "github:cry128/cerulean/refactor/snowflake";
inputs = {
systems.follows = "systems";
nixpkgs.follows = "nixpkgs";
};
};
grub2-themes = {
url = "github:vinceliuice/grub2-themes";
inputs.nixpkgs.follows = "nixpkgs";
};
sddm-silent = {
url = "github:uiriansan/SilentSDDM";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/Hyprland";
inputs = {
nixpkgs.follows = "nixpkgs-unstable";
systems.follows = "systems";
};
};
awww = {
url = "git+https://codeberg.org/LGFae/awww";
inputs.nixpkgs.follows = "nixpkgs";
};
nixcats.url = "github:BirdeeHub/nixCats-nvim";
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
nixcord = {
url = "github:FlameFlag/nixcord";
inputs.nixpkgs.follows = "nixpkgs";
};
millennium = {
url = "github:SteamClientHomebrew/millennium?dir=packages/nix";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
wa2k = {
url = "git+https://tearforge.net/cry/wa2k.com";
inputs = {
systems.follows = "systems";
nixpkgs.follows = "nixpkgs";
};
};
};
nixConfig = {
extra-experimental-features = "pipe-operators";
};
outputs = {cerulean, ...} @ inputs:
cerulean.snow.flake inputs ./.;
}

89
groups/all/default.nix Normal file
View file

@ -0,0 +1,89 @@
{
pkgs,
lib,
...
}: {
imports = [
../../hosts/modules/core/garbage-collector.nix
];
networking = {
networkmanager.enable = true;
nftables.enable = true;
firewall = {
enable = lib.mkDefault true;
allowPing = lib.mkDefault true;
};
# Use CloudFlare's WARP+ 1.1.1.1 DNS service
nameservers = [
"1.1.1.1"
"1.0.0.1"
];
};
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 7d --keep 3";
flake = "/etc/nixos"; # sets NH_OS_FLAKE variable for you
};
nix.settings = {
# making wheel group trusted allows your user
# to import packages not signed by a trusted key
trusted-users = ["root" "@wheel"];
experimental-features = [
"nix-command"
"flakes"
"pipe-operators"
];
download-buffer-size = 524288000; # 500 MiB
};
time.timeZone = lib.mkDefault "America/Los_Angeles";
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
# Enable initrd hook for virtual console customisation
# aka cool colours when bootting yay!!
console = {
enable = true;
earlySetup = true; # initrd pre hook
keyMap = "us";
font = "Lat2-Terminus16";
# ANSI 24-bit color definitions (theme: dracula)
colors = [
"21222c"
"ff5555"
"50fa7b"
"f1fa8c"
"bd93f9"
"ff79c6"
"8be9fd"
"f8f8f2"
"6272a4"
"ff6e6e"
"69ff94"
"ffffa5"
"d6acff"
"ff92df"
"a4ffff"
"ffffff"
];
};
users.defaultUserShell = pkgs.bash;
security.sudo-rs = {
enable = true;
wheelNeedsPassword = lib.mkOverride 200 true;
};
environment.systemPackages = with pkgs; [
git
vim
wget
tree
];
}

View file

@ -0,0 +1,85 @@
{
pkgs,
lib,
config,
...
}: {
imports = [
./system.nix
./programs.nix
../../hosts/modules/bashistrans.nix
../../hosts/modules/wm/hyprland.nix
];
boot.loader.grub2-theme = {
enable = true;
# GitHub: vinceliuice/grub2-themes
theme = "whitesur"; # stylish, vimix, or whitesur
footer = true;
customResolution = "1920x1080";
};
# Set display manager (login screen)
services.displayManager = {
# sddm relies on pkgs.libsForQt5.qt5.qtgraphicaleffects
sddm = {
enable = true;
wayland.enable = ! config.services.xserver.enable; # experimental
theme = "corners";
};
defaultSession =
if config.programs.hyprland.withUWSM == true
then "hyprland-uwsm"
else "hyprland";
};
programs.fish.enable = true;
# ----- FONTS -----
fonts = {
enableDefaultPackages = true; # no clue what this line does tbh
packages = with pkgs;
[
geist-font # for my hyprlock theme
# texlive maintains a noto-emoji flake
texlivePackages.noto-emoji
]
++ builtins.filter lib.attrsets.isDerivation (
builtins.attrValues pkgs.nerd-fonts
);
# TODO: change your default fonts
fontconfig = {
defaultFonts = {
serif = ["Geist"];
sansSerif = ["Geist"];
monospace = ["Cousine"];
emoji = ["Noto Emoji"];
};
};
};
# ---- ENVIRONMENT VARIABLES ----
environment = {
sessionVariables = {
# Hint Electrons apps to use Wayland
NIXOS_OZONE_WL = "1";
XDG_DOWNLOAD_DIR = "$HOME/Downloads";
XDG_CONFIG_HOME = "$HOME/.config";
};
systemPackages = with pkgs; [
sddm-theme-corners
];
};
# ------- USERS -------
users.users.lorkan = {
isNormalUser = true;
extraGroups = ["wheel" "netdev" "docker"];
shell = pkgs.fish;
};
}

View file

@ -0,0 +1,76 @@
{pkgs, ...}: {
imports = [
../../hosts/modules/apps/sober.nix
../../hosts/modules/apps/steam.nix
];
environment.systemPackages = with pkgs; [
# Shell
bash
fish
grc # colorise command outputs
# Nix
nix-prefetch-git
nix-index
nix-unit
ns # nix-search-tv overlay
# Modern Unix Commands
tlrc
btop
eza
yazi
exiftool # for yazi
ripgrep
viddy # modern `watch` command
timg # terminal image (sixel) viewer
wormhole-rs
# Pretty necessary
git
git-filter-repo
brightnessctl
acpi
vim
powertop
usbutils
nmap
# "Standard" Unix Commands
file
wget
tree
pstree
zip
unzip
unrar-free
lz4
moreutils
man-pages
man-pages-posix
# Desktop Services
awww
bluetui
hyprpicker # color picker
hyprshot # screenshot utility
wl-clipboard # clipboard for wayland
wl-screenrec # screen recording utility
# Userland Applications
helvum
easyeffects
pavucontrol
qbittorrent # torrenting
];
services.pcscd.enable = true;
# GNUPG-Agent stores your GPG+SSH keys securely
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
}

View file

@ -0,0 +1,80 @@
{...}: {
hardware = {
graphics = {
enable = true;
enable32Bit = true;
};
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
virtualisation.docker.enable = true;
services = {
# systemd-resolved provides network name resolution
# to local processes via a D-Bus interface.
resolved = {
enable = true;
dnssec = "true";
domains = ["~."];
# Use CloudFlare's WARP+ 1.1.1.1 DNS service
fallbackDns = [
"1.1.1.1#one.one.one.one"
"1.0.0.1#one.one.one.one"
];
dnsovertls = "true";
};
# Multimedia Framework
# With backwards compatability for alsa/pulseaudio/jack
pipewire = {
enable = true;
audio.enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
# pulse.enable = true;
# jack.enable = true;
# disable X11 bell module, which plays a sound on urgency hint
extraConfig = {
pipewire."99-silent-bell.conf" = {
"context.properties" = {
"module.x11.bell" = false;
};
};
};
};
};
# allows pipewire to use the realtime scheduler for increased performance
security.rtkit.enable = true;
# ---- ENVIRONMENT VARIABLES ----
environment = {
# always install "dev" derivation outputs
extraOutputsToInstall = ["dev"];
};
documentation = {
enable = true;
doc.enable = false; # install /share/doc packages
man = {
enable = true; # install manpages
# https://discourse.nixos.org/t/slow-build-at-building-man-cache/52365/4
generateCaches = false;
};
info.enable = false; # install GNU info
dev.enable = true; # install docs intended for developers
nixos = {
enable = true; # install NixOS documentation (ie man -k nix, & nixos-help)
options.splitBuild = true;
includeAllModules = false;
};
};
}

95
homes/lorkan/default.nix Executable file
View file

@ -0,0 +1,95 @@
{pkgs, ...}: {
imports = [
./modules/cli/git.nix
./modules/cli/ssh.nix
../modules/term/foot.nix
../modules/shell/fish.nix
../modules/editor/helix.nix
../modules/editor/neovim
../modules/cli/bat.nix
../modules/cli/btop.nix
../modules/cli/hyfetch.nix
../modules/apps/firefox.nix
../modules/apps/nixcord.nix
../modules/wm/hyprland
../modules/de/mako.nix
../modules/de/waybar
];
home = {
shellAliases = {
# nix
nd = "nix develop";
rebuild = "nh os switch /etc/nixos";
trybuild = "nh os test /etc/nixos";
# shell utilities
ls = "eza --color=auto";
l = "eza -Alh --color=auto --icons=auto";
ll = "eza -lh --color=auto --icons=auto";
li = "eza --color=auto --git-ignore";
rgf = "rg --files | rg";
watch = "viddy";
};
pointerCursor = {
gtk.enable = true;
# x11.enable = true # dont enable since im on hyprland
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 16;
};
packages = with pkgs; [
# for services.gnome-keyring
gcr # provides org.gnome.keyring.SystemPrompter
seahorse # gui
fuzzel
speedtest-cli
];
};
gtk = {
enable = true;
font.name = "Victor Mono SemiBold 12";
theme = {
name = "Dracula";
package = pkgs.dracula-theme;
};
iconTheme = {
name = "kora";
package = pkgs.kora-icon-theme;
};
# TODO: use a variable to mirror this cursor size
# with the `home.pointerCurser.size`
cursorTheme = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 16;
};
};
qt = {
enable = true;
platformTheme.name = "gtk2";
style.name = "gtk2";
};
services = {
gnome-keyring.enable = true;
};
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# XXX: WARNING: DO NOT MODIFY
# XXX: WARNING: DO NOT MODIFY
# XXX: WARNING: IM DEAD SERIOUS DO NOT CHANGE THIS VALUE
# XXX: WARNING: IM DEAD SERIOUS DO NOT CHANGE THIS VALUE
home.stateVersion = "25.11"; # Did you read the comment?
}

106
homes/lorkan/modules/cli/git.nix Executable file
View file

@ -0,0 +1,106 @@
{pkgs, ...}: {
home.packages = with pkgs; [
delta # git diff viewer
];
programs = {
git = {
enable = true;
lfs.enable = true;
# signing = {
# key = "YOUR-GPG-KEY-HERE";
# format = "openpgp";
# signByDefault = true;
# };
settings = {
user.name = "UniverseBow";
user.email = "lorkandavidson@gmail.com";
alias = {
s = "status";
d = "diff";
l = "log";
c = "commit";
p = "push";
};
color.ui = true;
core.editor = "vim";
# delta diff viewer
core.pager = "delta";
interactive.diffFilter = "delta --color-only";
delta = {
navigate = true;
line-numbers = true;
side-by-side = true;
};
merge.conflictStyle = "zdiff3";
init = {
defaultBranch = "main";
};
url = {
"git@github.com:" = {
insteadOf = [
"gh:"
"github:"
];
};
"https://gitlab.com/" = {
insteadOf = [
"gl:"
"gitlab:"
];
};
"git@codeberg.org:" = {
insteadOf = [
"cb:"
"codeberg:"
];
};
"git@tearforge.net/" = {
insteadOf = [
"cry:"
"forge:"
];
};
};
};
};
lazygit = {
enable = true;
enableFishIntegration = true;
enableZshIntegration = true;
shellWrapperName = "lg";
settings = {
gui = {
useHunkModeInStagingView = false;
skipDiscardChangeWarning = false;
skipStashWarning = true;
animateExplosion = true; # FUCK YEAH
theme = {
lightTheme = false;
activeBorderColor = ["green" "bold"];
inactiveBorderColor = ["white"];
selectedLineBgColor = ["default"];
};
};
git.pagers = [
{
pager = "delta --dark --pager=never";
}
];
};
};
};
}

View file

@ -0,0 +1,10 @@
{...}: {
# set ssh profiles
# WARNING: this DOES NOT start the ssh-agent
# WARNING: for that you need to use `services.ssh-agent.enable`
programs.ssh = {
enable = true;
forwardAgent = false;
addKeysToAgent = "yes";
};
}

View file

@ -0,0 +1,8 @@
{...}: {
programs.firefox = {
enable = true;
policies = {
DefaultDownloadDirectory = "\${home}/Downloads";
};
};
}

View file

@ -0,0 +1,254 @@
{inputs, ...}: {
imports = [
inputs.nixcord.homeModules.nixcord
];
programs.nixcord = {
enable = true;
# equibop.enable = true;
discord = {
vencord.enable = false;
equicord.enable = true;
};
config = {
enabledThemes = [
"aurorastheme.css"
"base16-colors.css"
];
plugins = {
invisibleChat.enable = true;
anonymiseFileNames = {
enable = true;
anonymiseByDefault = true;
method = 0;
randomisedLength = 16;
};
betterSessions = {
backgroundCheck = true;
checkInterval = 1;
};
biggerStreamPreview.enable = true;
callTimer.enable = true;
fixYoutubeEmbeds.enable = true;
fixSpotifyEmbeds.enable = true;
tidalEmbeds.enable = true;
youtubeAdblock.enable = true;
followVoiceUser.enable = true;
friendsSince.enable = true;
ircColors = {
enable = true;
lightness = 80;
memberListColors = true;
applyColorOnlyInDms = false;
applyColorOnlyToUsersWithoutColor = false;
};
messageLogger = {
enable = true;
showEditDiffs = true;
separatedDiffs = false;
};
fakeNitro.enable = true;
ghosted.enable = false;
noF1.enable = true;
noMaskedUrlPaste.enable = true;
messageLatency = {
enable = false;
latency = -1;
showMillis = true;
};
openInApp.enable = true;
crashHandler.enable = true;
disableCallIdle.enable = true;
experiments.enable = true;
expressionCloner.enable = true;
favoriteGifSearch.enable = true;
fixImagesQuality.enable = true;
forceOwnerCrown.enable = true;
forwardAnywhere.enable = true;
spotifyCrack.enable = true;
spotifyShareCommands.enable = true;
fullUserInChatbox.enable = true;
gifPaste.enable = true;
ignoreActivities = {
enable = true;
ignorePlaying = true;
ignoreStreaming = true;
ignoreListening = true;
ignoreWatching = true;
ignoreCompeting = true;
};
imageLink.enable = true;
imageZoom.enable = true;
memberCount.enable = true;
noDevtoolsWarning.enable = true;
noUnblockToJump.enable = true;
pauseInvitesForever.enable = true;
permissionsViewer.enable = true;
pictureInPicture = {
enable = true;
loop = true;
};
platformIndicators.enable = true;
previewMessage.enable = true;
relationshipNotifier.enable = true;
revealAllSpoilers.enable = true;
serverInfo.enable = true;
serverListIndicators.enable = true;
musicControls = {
enable = true;
showSpotifyControls = true;
showSpotifyLyrics = true;
};
showHiddenChannels.enable = true;
showHiddenThings.enable = true;
showTimeoutDuration = {
enable = true;
displayStyle = "tooltip";
};
silentTyping = {
enable = true;
enabledGlobally = true;
};
startupTimings.enable = true;
typingIndicator.enable = true;
unlockedAvatarZoom = {
enable = true;
zoomMultiplier = 4.0;
};
userMessagesPronouns.enable = true;
validUser.enable = true;
validReply.enable = true;
viewIcons = {
enable = true;
format = "webp";
imgSize = "4096";
};
voiceChatDoubleClick.enable = true;
voiceDownload.enable = true;
voiceMessages = {
enable = true;
noiseSuppression = false;
echoCancellation = true;
};
volumeBooster.enable = true;
webKeybinds.enable = true;
webScreenShareFixes.enable = true;
whoReacted.enable = true;
whosWatching.enable = true;
quickReply.enable = true;
shikiCodeblocks = {
enable = true;
useDevIcon = "COLOR";
theme = "https://raw.githubusercontent.com/shikijs/textmate-grammars-themes/2d87559c7601a928b9f7e0f0dda243d2fb6d4499/packages/tm-themes/themes/kanagawa-wave.json";
};
};
};
};
programs.nixcord.config.plugins.PinDMs = {
enable = true;
canCollapseDmSection = true;
# userBasedCategoryList = {
# "1202666382760607774" = [
# {
# id = "i9dflmraztc";
# name = "🏳️‍⚧️ girlfriends!!! :3 🏳️‍⚧️";
# color = 16359423;
# collapsed = false;
# channels = [
# "1436964273162289185"
# "1436988320474206311"
# "1449837047383855119"
# "1436965652861685891"
# "1436968495190642722"
# "1465424321919975454"
# "1468324280445046824"
# ];
# }
# {
# id = "p2v1f5y9zbd";
# name = "🦋 best frens <3 🦋";
# color = 10223511;
# collapsed = false;
# channels = [
# "1436985374286155799"
# "1436965657076826222"
# "1429921297160212681"
# "1394808379381387385"
# "1433593753183977545"
# "1438254055452446881"
# "1436966389549236376"
# "1202678007026819134"
# "1437151552224624660"
# "1441906462094921789"
# "1450340272079769712"
# "1458123717124165764"
# "1436975341129306155"
# "1461885176534794427"
# "1462155159470866443"
# "1468735915076878407"
# "1461929299727749145"
# "1470963392121536657"
# ];
# }
# {
# id = "c0mg5w635j8";
# name = "🏳️‍🌈 close frens x3 🏳️‍🌈";
# color = 10780927;
# collapsed = false;
# channels = [
# "1437077103873888290"
# "1436975346338762823"
# "1437123353101205590"
# "1441516692164575283"
# "1419557866502754334"
# "1436985041203892315"
# "1438071327515742229"
# ];
# }
# {
# id = "ghjrq5el3b";
# name = "frens :3";
# color = 7334399;
# collapsed = false;
# channels = [
# "1437007154132422701"
# "1437006448948416526"
# "1446781617422209068"
# "1444723474835837103"
# "1437098569483161721"
# "1437237573146771469"
# "1436973705421914123"
# "1437135359359320125"
# "1438010723837022343"
# "1440553969461104740"
# "1437097082887475201"
# "1447222320015085740"
# "1462624704027164824"
# "1449513783893692589"
# "1463737720961634461"
# "1463000874392748249"
# "1436984534712451105"
# "1436983282582683813"
# "1437283420312047659"
# "1437089201651847315"
# "1467307140443148288"
# ];
# }
# {
# id = "zbmj00xw7d8";
# name = "goop chats";
# color = 14876549;
# collapsed = false;
# channels = [
# "1437132769141719040"
# "1445549416516681902"
# "1458849972815663209"
# ];
# }
# ];
# };
};
}

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
programs = {
obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-backgroundremoval
obs-pipewire-audio-capture
];
};
};
}

View file

@ -0,0 +1,32 @@
{
inputs,
upkgs,
system,
...
}: let
spicetifyPkgs = inputs.spicetify-nix.legacyPackages.${system};
in {
imports = [inputs.spicetify-nix.homeManagerModules.default];
programs.spicetify = {
enable = true;
enabledExtensions = with spicetifyPkgs.extensions; [
adblock
shuffle
keyboardShortcut
{
src =
(upkgs.fetchFromGitHub {
owner = "Spikerko";
repo = "spicy-lyrics";
rev = "568c83326aa6aba6ded28c95df6fcfb25cab3648";
hash = "sha256-lej93EDzGkmyrg5YMdPSqzrxlIfKsfaDBZosTvxoTNw=";
})
+ /builds;
name = "spicy-lyrics.mjs";
}
];
theme = spicetifyPkgs.themes.comfy;
colorScheme = "Sakura";
};
}

View file

@ -0,0 +1,17 @@
{
inputs,
system,
...
}: let
inherit (inputs) zen-browser;
in {
imports = [
zen-browser.homeModules.twilight
];
programs.zen-browser = {
enable = true;
package = zen-browser.packages.${system}.twilight;
# suppressXdgMigrationWarning = true;
};
}

109
homes/modules/cli/bat.nix Normal file
View file

@ -0,0 +1,109 @@
let
# Module Meta Configuration
setShellAliases = true;
supportBash = true;
supportZsh = true;
supportFish = true;
in
{
osConfig,
config,
pkgs,
lib,
username,
...
}: let
inherit
(builtins)
elemAt
;
inherit
(lib)
flip
mkIf
optional
splitString
;
cfg = config.programs.bat;
# NOTE: `<derivation>.pname` can be used instead of `<derivation>.meta.mainProgram`
# NOTE: but then `pkgs.bash` would return `"bash-interactive"` which is annoying...
shellPkg = osConfig.users.users.${username}.shell;
shell = shellPkg.meta.mainProgram;
pager =
cfg.config.pager
|> splitString " "
|> flip elemAt 0;
in {
programs.bat = {
enable = true;
config = {
# WARNING: pager must be set for this module to function
# NOTE: not sure whether to use ov/moor/viddy as my pager?
pager = "less -FR";
# theme = "Dracula";
};
};
home = {
shellAliases = mkIf setShellAliases {
bat = "prettybat";
cat = "prettybat";
diff = "batdiff";
brg = "batgrep";
man = "batman";
# watch = "batwatch"; # NOTE: using viddy instead atm
};
sessionVariables = {
PAGER = pager;
# REF: https://github.com/eth-p/bat-extras/blob/master/doc/batpipe.md
BATPIPE_ENABLE_COLOR = "true";
BATPIPE_INSIDE_LESS = "true";
BATPIPE_TERM_WIDTH = "-"; # hyphone -> auto detect
};
packages = with pkgs.bat-extras;
[
batdiff
batgrep
batman
batpipe
batwatch
prettybat
]
++ (with pkgs; [
bat
entr # required by pkgs.bat-extras.batwatch
ripgrep # required by pkgs.bat-extras.batgrep
delta # required by pkgs.bat-extras.batdiff
])
++ optional (pkgs?${pager}) pkgs.${pager};
};
# Configure the user's shell to source batpipe
# WARNING: only currently supports bash, zsh, & fish
programs = {
bash = mkIf (supportBash || shell == "bash") {
initExtra = ''
eval "$(batpipe)"
'';
};
zsh = mkIf (supportZsh || shell == "zsh") {
initContent = ''
eval "$(batpipe)"
'';
};
fish = mkIf (supportFish || shell == "fish") {
interactiveShellInit = ''
eval (batpipe)
'';
};
};
}

View file

@ -0,0 +1,79 @@
{config, ...}: {
programs.btop = {
enable = true;
settings = {
# Theming
color_theme = "dracula";
theme_background = true;
truecolor = true;
force_tty = false;
vim_keys = false; # allow vim keybindings
# Units
clock_format = "%I:%M %p, %b %d";
temp_scale = "celsius";
base_10_sizes = false; # use KB or KiB
# UI
background_update = true;
update_ms = 100;
rounded_corners = false;
graph_symbol = "braille"; # braille/block/tty
graph_symbol_cpu = "default";
graph_symbol_mem = "default";
graph_symbol_net = "default";
graph_symbol_proc = "default";
# Processes Window
proc_left = true; # show on left side of window
proc_colors = true;
proc_gradient = true;
proc_per_core = false; # false: % of ALL cores
proc_mem_bytes = false; # show mem usage as %
proc_sorting = "cpu lazy";
proc_filter_kernel = false; # hide kernel child processes
proc_tree = false;
# CPU Window
cpu_bottom = false; # display at bottom of window
show_uptime = true;
show_cpu_freq = true;
check_temp = true; # show cpu temp
show_coretemp = true; # show temp per core
cpu_graph_upper = "total"; # upper graph shows total CPU usage
cpu_graph_lower = "user"; # lower graph shows user's CPU usage
cpu_invert_lower = true;
cpu_single_graph = false; # disable lower graph
show_gpu_info = "Off"; # Auto/On/Off
gpu_mirror_graph = false; # horizontally mirror gpu graph
# Memory Window
mem_below_net = false; # show below net window
mem_graphs = true; # show graphs not meters
show_swap = true; # show swap memory usage
# Disks Subwindow
show_disks = true; # split mem box to show disk info
swap_disk = true; # show swap memory as disk
show_io_stat = true;
io_graph_combined = false; # combine read/write stats
io_mode = true; # show io stat as graph
use_fstab = true; # read disk list from /etc/fstab
only_physical = false; # ignore non-physical disks
# Network Window
net_iface = ""; # default network interface to monitor
net_auto = true; # overrides net_download/net_upload (below)
net_sync = false; # sync download/upload graph scales
net_download = 100; # max download speed graphed
net_upload = 100; # max upload speed graphed
# Battery
show_battery = true;
selected_battery = "Auto";
show_battery_watts = true;
# Other
log_level = "WARNING"; # ERROR/WARNING/INFO/DEBUG
};
};
}

View file

@ -0,0 +1,26 @@
{pkgs, ...}: {
home.packages = with pkgs; [
neofetch
];
programs.hyfetch = {
enable = true;
settings = {
backend = "neofetch";
args = null;
distro = null;
preset = "transgender";
pride_month_disable = false;
custom_ascii_path = null;
mode = "rgb";
light_dark = "light";
auto_detect_light_dark = true;
lightness = 0.65;
color_align = {
mode = "horizontal";
};
};
};
}

55
homes/modules/de/mako.nix Normal file
View file

@ -0,0 +1,55 @@
{...}: let
dracula = rec {
background = "#282A36";
border = cyan;
cyan = "#8BE9FD";
yellow = "#F1FA8C";
red = "#FF5555";
};
theme = dracula;
in {
# notification daemon for Wayland
services.mako = {
enable = true;
settings = {
actions = true;
# output = ""; # screen to display on
anchor = "top-right";
layer = "overlay";
sort = "-time";
height = 100;
width = 300;
margin = 50;
background-color = theme.background;
border-color = theme.border;
border-radius = 20;
border-size = 4;
font = "monospace 10";
markup = true;
icons = true;
max-icon-size = 64;
default-timeout = 5000;
ignore-timeout = false;
"actionable=true" = {
anchor = "top-right";
};
"urgency=low" = {
border-color = theme.border;
};
"urgency=normal" = {
border-color = theme.yellow;
};
"urgency=high" = {
default-timeout = 0;
border-color = theme.red;
};
};
};
}

View file

@ -0,0 +1,19 @@
@define-color colorbg #26233a;
@define-color colorfg #eb6f92;
@define-color color00 #26233a; /* black (Overlay) */
@define-color color01 #eb6f92; /* red (Love) */
@define-color color02 #9ccfd8; /* green (Foam) */
@define-color color03 #f6c177; /* yellow (Gold) */
@define-color color04 #31748f; /* blue (Pine) */
@define-color color05 #c4a7e7; /* magenta (Iris) */
@define-color color06 #ebbcba; /* cyan (Rose) */
@define-color color07 #e0def4; /* white (Text) */
@define-color color08 #47435d; /* bright black (lighter Overlay) */
@define-color color09 #ff98ba; /* bright red (lighter Love) */
@define-color color10 #c5f9ff; /* bright green (lighter Foam) */
@define-color color11 #ffeb9e; /* bright yellow (lighter Gold) */
@define-color color12 #5b9ab7; /* bright blue (lighter Pine) */
@define-color color13 #eed0ff; /* bright magenta (lighter Iris) */
@define-color color14 #ffe5e3; /* bright cyan (lighter Rose) */
@define-color color15 #fefcff; /* bright white (lighter Text) */

View file

@ -0,0 +1,101 @@
{upkgs, ...}: {
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
# modules-left = ["hyprland/workspaces" "wlr/taskbar" "custom/media"];
modules-left = ["hyprland/workspaces" "wlr/taskbar"];
modules-center = ["clock"];
modules-right = ["cpu" "memory" "network" "pulseaudio" "privacy" "tray"];
# left
"hyprland/workspaces" = {
format = "{id}";
};
"ext/workspaces" = {
# not enabled yet, hyprland and mango need two different configs ;-;
format = "{id}";
ignore-hidden = true;
on-click = "activate";
};
"wlr/taskbar" = {
format = "{icon}";
icon-size = 12;
};
# "custom/media" = {
# exec = "auroramedia";
# return-type = "json";
# escape = true;
# restart-interval = 1;
# };
# center
"clock" = {
format = "{:%Y %b %a %d %H:%M:%S}";
interval = 1;
tooltip = false;
};
# right
"cpu" = {
format = " {usage}%";
interval = 1;
};
"memory" = {
format = " {used:0.1f} / {total:0.1f} GiB";
interval = 1;
};
"network" = {
format = "{bandwidthUpBytes} {bandwidthDownBytes} {ifname}";
format-wifi = " {bandwidthUpBytes} {bandwidthDownBytes} ";
format-ethernet = "󰈀 {bandwidthUpBytes} {bandwidthDownBytes} ";
format-disconnected = "no internet ~ rawr! ~ x3"; # empty format hides module
interval = 1;
max-length = 32;
};
"pulseaudio" = {
format = "{icon} {volume}%";
format-muted = " {volume}%";
format-icons = {
default = [
""
""
""
];
};
"scroll-step" = 5;
};
"privacy" = {
icon-size = 12;
icon-spacing = 5;
transition-duration = 200;
modules = [
{
type = "screenshare";
tooltip = true;
tooltip-icon-size = 12;
}
{
type = "audio-in";
tooltip = true;
tooltip-icon-size = 12;
}
];
};
"tray" = {
icon-size = 12;
spacing = 10;
# fixes spotify not showing up when "close button should minimize the Spotify window" is false
show-passive-items = true;
};
};
};
style =
builtins.readFile ./colors.css
+ builtins.readFile ./style.css;
};
}

View file

@ -0,0 +1,164 @@
* {
border: none;
border-radius: 0;
font-family: 'GeistMono Nerd Font';
font-size: 15px;
font-weight: bold;
min-height: 10px;
}
window#waybar {
background: rgba(0, 0, 0, 0);
}
/*
adds a margin around the edge of the taskbar, surrounding the modules,
spacing it out from the edge of the screen and windows below
*/
window#waybar > box {
margin: 0px 12px;
}
tooltip {
background: @colorbg;
color: @colorfg;
opacity: 0.9;
padding: 4px;
border-radius: 12px;
border: 1px solid @color01;
}
tooltip label {
background: rgba(0, 0, 0, 0);
color: @colorfg;
}
#clock,
#memory,
#network,
#workspaces,
#taskbar,
#cpu,
#pulseaudio,
#privacy,
#tray,
#custom-media {
background: @colorbg;
color: @colorfg;
opacity: 0.9;
padding: 4px 16px;
border-radius: 32px;
border: 1px solid @color01;
}
/*
left-side modules
*/
#workspaces,
#taskbar,
#custom-media {
margin: 4px 4px 4px 0px;
}
/*
center modules
*/
#clock {
margin: 4px 0px 4px 0px;
}
/*
right-side modules
*/
#memory,
#network,
#cpu,
#pulseaudio,
#tray,
#privacy {
margin: 4px 0px 4px 4px;
}
#workspaces,
#taskbar {
padding: 0px;
}
#taskbar.empty {
opacity: 0;
padding: 0px;
margin: 0px;
border: none;
}
#tray.empty {
opacity: 0;
padding: 0;
margin: 0;
border: none;
}
/*
connects the workspace and taskbar together :3
*/
/*
#workspaces {
margin: 4px 0px 4px 12px;
padding: 0px 8px 0px 0px;
border-radius: 100px 0px 0px 100px;
border-width: 1px 0px 1px 1px;
}
#taskbar {
margin: 4px 0px 4px 0px;
padding: 0px 0px 0px 8px;
border-radius: 0px 100px 100px 0px;
}
*/
#cpu {
margin: 4px 0 4px 0;
border-radius: 32px 0px 0px 32px;
}
#memory {
margin: 4px 0 4px 0;
border-radius: 0px;
border-width: 1px 0px 1px 0px;
}
#network {
margin: 4px 0 4px 0;
border-radius: 0px 32px 32px 0px;
}
#workspaces button {
padding: 2px 4px;
border-radius: 32px;
color: @colorfg;
}
#workspaces button:hover {
background: @colorfg;
color: @colorbg;
opacity: 0.8;
}
#workspaces button.active {
background: @colorfg;
color: @colorbg;
}
#taskbar button {
padding: 2px 4px;
border-radius: 32px;
color: @colorfg;
}
#taskbar button:hover {
background: @colorfg;
color: @colorbg;
opacity: 0.8;
}
#taskbar button.active {
background: @colorfg;
color: @colorbg;
}
/*
icons in each button on the taskbar to correct
for them not being properly centred sometimes :3
*/
#taskbar button box image {
padding-left: 2px;
}

164
homes/modules/editor/helix.nix Executable file
View file

@ -0,0 +1,164 @@
{pkgs, ...}: let
lsps = {
bash-language-server = {
pkg = pkgs.bash-language-server;
cmd = "bash-language-server";
};
# TODO: once upgraded past Nix-24.07 this line won't be necessary (I think)
# helix will support nixd by default
# SOURCE: https://github.com/nix-community/nixd/blob/main/nixd/docs/editor-setup.md#Helix
nixd = {
pkg = pkgs.nixd;
cmd = "nixd";
};
ty = {
pkg = pkgs.ty; # DEBUG: upkgs.ty;
cmd = "ty";
};
};
in {
home.packages =
lsps
|> builtins.attrValues
|> map (lsp: lsp.pkg);
# REF: https://docs.helix-editor.com/editor.html
programs.helix = {
enable = true;
settings = {
theme = "dracula";
editor = {
line-number = "absolute";
popup-border = "all";
scroll-lines = 3;
color-modes = true; # colour the mode indicator depending on mode
shell = ["bash" "-c"];
auto-format = true;
auto-completion = true; # enable popup for autocomplete
completion-timeout = 250; # time before completions display
preview-completion-insert = true;
completion-trigger-len = 2; # min word length to trigger completions
completion-replace = true; # completions replace entire word
indent-heuristic = "tree-sitter"; # how indentation is computed
middle-click-paste = true;
insert-final-newline = true; # append newline to file on write
gutters = [
"diagnostics"
"spacer"
"line-numbers"
"spacer"
"diff"
];
whitespace = {
render = {
space = "none"; # "all"
tab = "none"; #"all"
nbsp = "none";
nnbsp = "none";
newline = "none";
};
characters = {
space = "·";
nbsp = "";
nnbsp = "";
tab = "";
newline = "";
tabpad = "·"; # Tabs will look like "→···" (depending on tab width)
};
};
indent-guides = {
render = true;
character = ""; # ""
skip-levels = 1;
};
lsp = {
enable = true;
auto-signature-help = true; # hints for function parameters
display-inlay-hints = true; # inline hints
snippets = true;
};
cursor-shape = {
normal = "block";
insert = "bar";
select = "block";
};
file-picker = {
hidden = true; # show hidden files
follow-symlinks = true;
deduplicate-links = true;
git-ignore = true; # dont read .gitignore files
ignore = true; # use .ignore for helix instead of .gitignore
};
statusline = {
left = [
"mode"
"spacer"
"version-control"
"spinner"
];
center = [
"file-name"
"read-only-indicator"
"file-modification-indicator"
];
right = [
"position"
"total-line-numbers"
"file-encoding"
"file-line-ending"
"file-type"
];
separator = "|";
mode.normal = "NORMAL";
mode.insert = "INSERT";
mode.select = "SELECT";
};
};
};
languages = {
language = [
{
name = "nix";
indent = {
tab-width = 2;
unit = " ";
};
block-comment-tokens = {
start = "/*";
end = "*/";
};
auto-format = true;
formatter.command = "${pkgs.alejandra}/bin/alejandra";
language-servers = ["nixd"];
}
{
name = "python";
indent = {
tab-width = 4;
unit = " ";
};
auto-format = true;
rulers = [80];
language-servers = ["ty"];
}
];
language-server =
lsps
|> builtins.mapAttrs (_: lsp: {command = "${lsp.pkg}/bin/${lsp.cmd}";});
};
};
}

View file

@ -0,0 +1,236 @@
# TODO: look into changing to this:
# https://github.com/BirdeeHub/nix-wrapper-modules
{
inputs,
lib,
...
}: let
inherit
(inputs.nixcats)
utils
;
in {
imports = [
inputs.nixcats.homeModule
];
nixCats = {
enable = true;
nixpkgs_version = inputs.nixpkgs-unstable;
addOverlays =
[
(utils.standardPluginOverlay inputs)
]
++ lib.optional (builtins.pathExists ./overlays.nix) ./overlays.nix;
# see the packageDefinitions below.
# This says which of those to install.
packageNames = ["cryvim"];
luaPath = ./.;
# NOTE: the .replace vs .merge options are for modules based on existing configurations,
# NOTE: they refer to how multiple categoryDefinitions get merged together by the module.
# NOTE: for useage of this section, refer to :h nixCats.flake.outputs.categories
categoryDefinitions.replace = {
pkgs,
settings,
categories,
extra,
name,
mkNvimPlugin,
...
} @ packageDef: {
lspsAndRuntimeDeps = with pkgs; {
general = [
ripgrep
fd
];
treesitter = [
tree-sitter
];
lang = {
lua = [
lua-language-server
stylua
];
nix = [
nil
nix-doc # TODO: i forgot what this is for
nixfmt
];
rust = [
rust-analyzer
rustfmt
];
zig = [
zls
];
elixir = [
elixir-ls
];
gleam = [
gleam
];
haskell = [
haskell-language-server
ormolu
];
java = [
jdt-language-server
javaPackages.compiler.openjdk17
javaPackages.compiler.openjdk21
];
protobuf = [
protols
buf
];
};
};
startupPlugins = with pkgs.vimPlugins; {
general = [
lze
plenary-nvim
nvim-notify
nvim-web-devicons
base16-nvim
mini-nvim
];
treesitter = [
nvim-treesitter-textobjects
nvim-treesitter.withAllGrammars
];
};
optionalPlugins = with pkgs.vimPlugins; {
general = [
];
ui = [
dressing-nvim
];
qol = [
undotree
mini-hipatterns
];
telescope = [
telescope-nvim
telescope-fzf-native-nvim
telescope-ui-select-nvim
];
fyler = [
fyler-nvim
];
lsp = [
nvim-lspconfig
];
completion = [
blink-cmp
nvim-cmp
luasnip
friendly-snippets
cmp_luasnip
cmp-buffer
cmp-path
cmp-nvim-lua
cmp-nvim-lsp
cmp-cmdline
cmp-nvim-lsp-signature-help
cmp-cmdline-history
lspkind-nvim
];
format = [
conform-nvim
];
comment = [
comment-nvim
];
lang = {
java = [
nvim-jdtls
];
};
};
# shared libraries to be added to nvim runtime's LD_LIBRARY_PATH
sharedLibraries = {
general = with pkgs; [
# libgit2
];
};
environmentVariables = {
lang = {
rust.lsp = {
# it literally won't see the rust-analyzer provided to it
RUST_ANALYZER_CMD = "${pkgs.rust-analyzer}/bin/rust-analyzer";
};
elixir.lsp = {
ELIXIR_LS_CMD = "${pkgs.elixir-ls}/scripts/language_server.sh";
};
java.lsp = {
JAVA_HOME = "${pkgs.javaPackages.compiler.openjdk17}";
OPENJDK_17 = "${pkgs.javaPackages.compiler.openjdk17}";
OPENJDK_21 = "${pkgs.javaPackages.compiler.openjdk21}";
};
};
};
extraWrapperArgs = {};
# lists of the functions you would have passed to
# python.withPackages or lua.withPackages
# get the path to this python environment
# in your lua config via
# vim.g.python3_host_prog
# or run from nvim terminal via :!<packagename>-python3
extraPython3Packages = {};
# populates $LUA_PATH and $LUA_CPATH
extraLuaPackages = {};
};
# REF: :help nixCats.flake.outputs.packageDefinitions
packageDefinitions.replace = {
# these are the names of your packages
# you can include as many as you wish.
cryvim = {pkgs, ...}: {
# they contain a settings set defined above
# REF: :help nixCats.flake.outputs.settings
settings = {
wrapRc = true;
aliases = [
"ce"
];
};
# and a set of categories that you want
# (and other information to pass to lua)
categories = {
general = true;
ui = true;
qol = true;
telescope = true;
fyler = true;
lsp = true;
completion = true;
treesitter = true;
format = true;
comment = true;
lang = {
lua = true;
nix = true;
rust = true;
zig = true;
elixir = true;
gleam = true;
haskell = true;
java = true;
protobuf = true;
};
};
};
};
};
}

View file

@ -0,0 +1,9 @@
vim.g.mapleader = " "
vim.opt.termguicolors = true -- use terminal colors
vim.opt.relativenumber = true
vim.opt.wrap = false
vim.opt.colorcolumn = "80"
require("plugins")
require("lsp")

View file

@ -0,0 +1,66 @@
local M = {}
function M.on_attach(_, bufnr)
-- we create a function that lets us more easily define mappings specific
-- for LSP related items. It sets the mode, buffer and description for us each time.
local nmap = function(keys, func, desc)
if desc then
desc = "LSP: " .. desc
end
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
end
nmap("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
nmap("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
nmap("gd", vim.lsp.buf.definition, "[G]oto [D]efinition")
-- NOTE: why are these functions that call the telescope builtin?
-- because otherwise they would load telescope eagerly when this is defined.
-- due to us using the on_require handler to make sure it is available.
if nixCats("general.telescope") then
nmap("gr", function()
require("telescope.builtin").lsp_references()
end, "[G]oto [R]eferences")
nmap("gI", function()
require("telescope.builtin").lsp_implementations()
end, "[G]oto [I]mplementation")
nmap("<leader>ds", function()
require("telescope.builtin").lsp_document_symbols()
end, "[D]ocument [S]ymbols")
nmap("<leader>ws", function()
require("telescope.builtin").lsp_dynamic_workspace_symbols()
end, "[W]orkspace [S]ymbols")
nmap("<leader>dd", "<cmd>Telescope diagnostics bufnr=0<CR>", "[D]ocument [D]iagnostics")
nmap("<leader>wd", "<cmd>Telescope diagnostics<CR>", "[W]orkspace [D]iagnostics")
end -- TODO: someone who knows the builtin versions of these to do instead help me out please.
nmap("<leader>D", vim.lsp.buf.type_definition, "Type [D]efinition")
nmap("<leader>e", vim.diagnostic.open_float, "Show [E]rror")
-- See `:help K` for why this keymap
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
-- Lesser used LSP functionality
nmap("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
nmap("<leader>wa", vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder")
nmap("<leader>wr", vim.lsp.buf.remove_workspace_folder, "[W]orkspace [R]emove Folder")
nmap("<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, "[W]orkspace [L]ist Folders")
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
vim.lsp.buf.format()
end, { desc = "Format current buffer with LSP" })
end
function M.get(server_name)
local capabilities = require("blink.cmp").get_lsp_capabilities()
return capabilities
end
return M

View file

@ -0,0 +1,103 @@
return {
{
"friendly-snippets",
dep_of = { "blink.cmp" },
},
{
"blink.cmp",
event = { "InsertEnter", "CmdlineEnter" },
on_require = "blink",
load = function(name)
vim.cmd.packadd(name)
end,
after = function(plugin)
local blink = require("blink.cmp")
blink.setup({
keymap = {
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
["<C-e>"] = { "hide", "fallback" },
["<C-y>"] = { "select_and_accept", "fallback" },
["<C-k>"] = { "select_prev", "fallback_to_mappings" },
["<C-j>"] = { "select_next", "fallback_to_mappings" },
["<Up>"] = { "select_prev", "fallback" },
["<Down>"] = { "select_next", "fallback" },
["<C-b>"] = { "scroll_documentation_up", "fallback" },
["<C-f>"] = { "scroll_documentation_down", "fallback" },
["<Tab>"] = { "snippet_forward", "fallback" },
["<S-Tab>"] = { "snippet_backward", "fallback" },
["<C-S-k>"] = { "show_signature", "hide_signature", "fallback" },
},
appearance = {
nerd_font_variant = "mono",
},
sources = {
default = { "lsp", "path", "snippets", "buffer" },
providers = {
lsp = {
name = "LSP",
module = "blink.cmp.sources.lsp",
enabled = true,
},
path = {
name = "Path",
module = "blink.cmp.sources.path",
enabled = true,
},
snippets = {
name = "Snippets",
module = "blink.cmp.sources.snippets",
enabled = true,
},
buffer = {
name = "Buffer",
module = "blink.cmp.sources.buffer",
enabled = true,
},
},
},
completion = {
accept = {
auto_brackets = {
enabled = true,
},
},
menu = {
border = "rounded",
max_height = 12,
scrolloff = 2,
draw = {
columns = {
{ "kind_icon", gap = 1 },
{ "label", "label_description", gap = 1 },
},
},
},
documentation = {
auto_show = false,
window = {
border = "rounded",
},
},
},
signature = {
enabled = true,
window = {
border = "rounded",
},
},
})
end,
},
}

View file

@ -0,0 +1,20 @@
vim.api.nvim_create_autocmd("FileType", {
pattern = { "lua", "nix", "gleam" },
callback = function()
vim.opt_local.shiftwidth = 2
vim.opt_local.tabstop = 2
vim.opt_local.expandtab = true
end,
})
vim.api.nvim_create_autocmd("User", {
pattern = "TelescopePreviewerLoaded",
callback = function(args)
local ft = args.data.filetype
if vim.tbl_contains({ "lua", "nix", "gleam", "rust" }, ft) then
vim.bo.shiftwidth = 2
vim.bo.tabstop = 2
vim.bo.expandtab = true
end
end,
})

View file

@ -0,0 +1,6 @@
require("lze").load({
{ import = "lsp.completion" },
})
require("lsp.indentation")
require("lsp.lsp")

View file

@ -0,0 +1,134 @@
local servers = {}
servers.lua_ls = {
settings = {
Lua = {
formatters = {
ignoreComments = false,
},
signatureHelp = { enable = true },
diagnostics = {
globals = { "nixCats", "vim" },
-- disable = { 'missing-fields' },
},
workspace = {
-- make the server aware of the neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
checkThirdParty = false,
},
},
telemetry = { enabled = false },
},
}
servers.nil_ls = {
settings = {},
}
local rust_analyzer_cmd = os.getenv("RUST_ANALYZER_CMD")
servers.rust_analyzer = {
cmd = { rust_analyzer_cmd },
settings = {
server = {
-- For debugging rust-analyzer, to see log location do :LspInfo in neovim
-- extraEnv = { {["RA_LOG"]="project_model=debug"} },
},
cargo = {
allFeatures = false,
allTargets = false,
buildScripts = { enable = true },
target = "x86_64-unknown-linux-gnu",
},
diagnostics = {
enable = true,
},
},
}
servers.zls = {
settings = {},
}
local elixir_ls_cmd = os.getenv("ELIXIR_LS_CMD")
servers.elixirls = {
cmd = { elixir_ls_cmd },
settings = {},
}
servers.gleam = {
settings = {},
}
servers.hls = {
settings = {},
}
local java_home = os.getenv("JAVA_HOME")
servers.jdtls = {
settings = {
java = {
contentProvider = { preferred = "fernflower" },
configuration = {
runtimes = {
{
name = "OpenJDK 17",
path = os.getenv("OPENJDK_17"),
},
{
name = "OpenJDK 21",
path = os.getenv("OPENJDK_21"),
},
},
},
},
},
}
servers.protols = {
settings = {},
}
-- Taken from nixCats example:
-- If you were to comment out this autocommand
-- and instead pass the on attach function directly to
-- nvim-lspconfig, it would do the same thing.
-- come to think of it, it might be better because then lspconfig doesnt have to be called before lsp attach?
-- but you would still end up triggering on a FileType event anyway, so, it makes little difference.
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("nixCats-lsp-attach", { clear = true }),
callback = function(event)
require("lsp.capabilities").on_attach(vim.lsp.get_client_by_id(event.data.client_id), event.buf)
end,
})
require("lze").load({
{
"nvim-lspconfig",
event = "FileType",
after = function(plugin)
-- Just register configs, don't enable yet
for server_name, cfg in pairs(servers) do
vim.lsp.config(server_name, {
capabilities = require("lsp.capabilities").get(server_name),
settings = (cfg or {}).settings,
filetypes = (cfg or {}).filetypes,
cmd = (cfg or {}).cmd,
root_pattern = (cfg or {}).root_pattern,
})
end
-- Enable on-demand per filetype
for server_name, cfg in pairs(servers) do
local filetypes = cfg.filetypes or vim.lsp.config[server_name].filetypes
if filetypes then
vim.api.nvim_create_autocmd("FileType", {
pattern = filetypes,
callback = function()
vim.lsp.enable(server_name)
end,
})
end
end
end,
},
})

View file

@ -0,0 +1,23 @@
return {
{
"comment.nvim",
event = { "BufReadPost", "BufNewFile" },
after = function(plugin)
require("Comment").setup({
toggler = {
line = "<leader>cc",
block = "<leader>bc",
},
opleader = {
line = "<leader>c",
block = "<leader>b",
},
extra = {
above = "<leader>c<S-o>",
below = "<leader>co",
eol = "<leader>cA",
},
})
end,
},
}

View file

@ -0,0 +1,5 @@
return {
{
"dressing.nvim",
},
}

View file

@ -0,0 +1,34 @@
-- docs -> https://github.com/stevearc/conform.nvim
return {
{
"conform.nvim",
enabled = nixCats("format") or false,
keys = {
{ "<leader>p", desc = "Format File (pretty :3)" },
},
after = function(plugin)
local conform = require("conform")
conform.setup({
formatters_by_ft = {
lua = nixCats("lang.lua") and { "stylua" } or nil,
nix = nixCats("lang.nix") and { "nixfmt" } or nil,
rust = nixCats("lang.rust") and { "rustfmt", lsp_format = "fallback" } or nil,
haskell = nixCats("lang.haskell") and { "ormolu" } or nil,
proto = nixCats("lang.protobuf") and { "buf" } or nil,
},
format_on_save = {
timeout_ms = 500,
},
})
vim.keymap.set({ "n", "v" }, "<leader>p", function()
conform.format({
lsp_fallback = false,
async = false,
timeout_ms = 1000,
})
end, { desc = "Format File (pretty :3)" })
end,
},
}

View file

@ -0,0 +1,22 @@
return {
{
"fyler.nvim",
cmd = { "Fyler" },
keys = {
{
"<leader>tf",
function()
return require("fyler").toggle({ kind = "split_right" })
end,
mode = { "n" },
desc = "Open [F]yler",
},
},
load = function(name)
vim.cmd.packadd(name)
end,
after = function(plugin)
local fyler = require("fyler").setup()
end,
},
}

View file

@ -0,0 +1,9 @@
require("lze").load({
{ import = "plugins.dressing" },
{ import = "plugins.telescope" },
{ import = "plugins.treesitter" },
{ import = "plugins.fyler" },
{ import = "plugins.mini-hipatterns" },
{ import = "plugins.format" },
{ import = "plugins.comment" },
})

View file

@ -0,0 +1,76 @@
return {
{
"mini.hipatterns",
after = function(plugin)
local hipatterns = require("mini.hipatterns")
-- Returns hex color group for matching short hex color.
--
---@param match string
---@return string
local hex_color_short = function(_, match)
local style = "fg" -- 'fg' or 'bg', for extmark_opts_inline use 'fg'
local r, g, b = match:sub(2, 2), match:sub(3, 3), match:sub(4, 4)
local hex = string.format("#%s%s%s%s%s%s", r, r, g, g, b, b)
return hipatterns.compute_hex_color_group(hex, style)
end
-- Returns hex color group for matching alpha hex color.
--
---@param match string
---@return string
local hex_color_alpha = function(_, match)
local style = "fg" -- 'fg' or 'bg', for extmark_opts_inline use 'fg'
local r, g, b = match:sub(2, 3), match:sub(4, 5), match:sub(6, 7)
local hex = string.format("#%s%s%s", r, g, b)
return hipatterns.compute_hex_color_group(hex, style)
end
-- Returns extmark opts for highlights with virtual inline text.
--
---@param data table Includes `hl_group`, `full_match` and more.
---@return table
local extmark_opts_inline = function(_, _, data)
return {
virt_text = { { "󰧞", data.hl_group } },
virt_text_pos = "inline",
right_gravity = false,
}
end
-- Returns extmark opts for highlights with virtual inline text.
--
---@param data table Includes `hl_group`, `full_match` and more.
---@return table
local extmark_opts_inline_alpha = function(_, _, data)
return {
virt_text = { { "󱡓", data.hl_group } },
virt_text_pos = "inline",
right_gravity = false,
}
end
hipatterns.setup({
highlighters = {
-- #rrggbb
hex_color = hipatterns.gen_highlighter.hex_color({
style = "inline",
inline_text = "󰧞",
}),
-- #rgb
hex_color_short = {
pattern = "#%x%x%x%f[%X]",
group = hex_color_short,
extmark_opts = extmark_opts_inline,
},
-- #rrggbbaa
hex_color_alpha = {
pattern = "#%x%x%x%x%x%x%x%x%f[%X]",
group = hex_color_alpha,
extmark_opts = extmark_opts_inline_alpha,
},
},
})
end,
},
}

View file

@ -0,0 +1,78 @@
return {
{
"telescope.nvim",
cmd = { "Telescope" },
keys = {
{
"<leader>f",
function()
return require("telescope.builtin").find_files()
end,
mode = { "n" },
desc = "Telescope search [F]iles",
},
{
"<leader>tr",
function()
return require("telescope.builtin").oldfiles()
end,
mode = { "n" },
desc = "[T]elescope search [R]ecent files",
},
{
"<leader>ts",
function()
return require("telescope.builtin").live_grep()
end,
mode = { "n" },
desc = "[T]elescope [S]earch cwd with grep",
},
{
"<leader>tw",
function()
return require("telescope.builtin").grep_string()
end,
mode = { "n" },
desc = "[T]elescope search current [W]ord",
},
{
"<leader>tk",
function()
return require("telescope.builtin").keymaps()
end,
mode = { "n" },
desc = "[T]elescope search [K]eymaps",
},
{
"<leader>tb",
function()
return require("telescope.builtin").buffers()
end,
mode = { "n" },
desc = "[T]elescope search [B]uffers",
},
},
load = function(name)
vim.cmd.packadd(name)
vim.cmd.packadd("telescope-fzf-native.nvim")
end,
after = function(plugin)
local telescope = require("telescope")
local actions = require("telescope.actions")
telescope.setup({
defaults = {
mappings = {
i = {
["<C-k>"] = actions.move_selection_previous, -- move to prev result
["<C-j>"] = actions.move_selection_next, -- move to next result
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
},
},
},
})
pcall(telescope.load_extension, "fzf")
end,
},
}

View file

@ -0,0 +1,95 @@
-- to help me write this after nvim-treesitter updated, i used:
-- https://github.com/BirdeeHub/nixCats-nvim/blob/3c9bc4d7123e1b48d92f25ba505b889af541e897/templates/example/lua/myLuaConf/plugins/treesitter.lua
return {
{
"nvim-treesitter",
lazy = false,
after = function(plugin)
--@param buf integer
--@param language string
local function treesitter_try_attach(buf, language)
--check if parser exists and load it
if not vim.treesitter.language.add(language) then
return
end
-- enables syntax highlight and other treesitter features
vim.treesitter.start(buf, language)
-- enables treesitter based folds
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
-- enables treesiter based indentation
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end
local available_parsers = require("nvim-treesitter").get_available()
vim.api.nvim_create_autocmd("FileType", {
callback = function(args)
local buf, filetype = args.buf, args.match
local language = vim.treesitter.language.get_lang(filetype)
if not language then
return
end
local installed_parsers = require("nvim-treesitter").get_installed("parsers")
if vim.tbl_contains(installed_parsers, language) then
-- enable the parser if it is installed
treesitter_try_attach(buf, language)
elseif vim.tbl_contains(available_parsers, language) then
-- if a parser is available in `nvim-treesitter` enable it after ensuring it is installed
require("nvim-treesitter").install(language):await(function()
treesitter_try_attach(buf, language)
end)
else
-- try to enable treesitter features in case the parser exists but is not available from `nvim-treesitter`
treesitter_try_attach(buf, language)
end
end,
})
end,
},
{
"nvim-treesitter-textobjects",
lazy = false,
before = function(plugin)
vim.g.no_plugin_maps = true
end,
after = function(plugin)
require("nvim-treesitter-textobjects").setup({
select = {
lookahead = true,
selection_modes = {
["@parameter.outer"] = "v", -- charwise
["@function.outer"] = "V", -- linewise
},
include_surrounding_whitespace = false,
},
})
-- keymaps
vim.keymap.set({ "x", "o" }, "am", function()
require("nvim-treesitter-textobjects.select").select_textobject("@function.outer", "textobjects")
end)
vim.keymap.set({ "x", "o" }, "im", function()
require("nvim-treesitter-textobjects.select").select_textobject("@function.inner", "textobjects")
end)
vim.keymap.set({ "x", "o" }, "ac", function()
require("nvim-treesitter-textobjects.select").select_textobject("@class.outer", "textobjects")
end)
vim.keymap.set({ "x", "o" }, "ic", function()
require("nvim-treesitter-textobjects.select").select_textobject("@class.inner", "textobjects")
end)
-- You can also use captures from other query groups like `locals.scm`
vim.keymap.set({ "x", "o" }, "as", function()
require("nvim-treesitter-textobjects.select").select_textobject("@local.scope", "locals")
end)
-- NOTE: for more textobjects options, see the following link.
-- This template is using the new `main` branch of the repo.
-- https://github.com/nvim-treesitter/nvim-treesitter-textobjects/tree/main
end,
},
}

View file

@ -0,0 +1,30 @@
{pkgs, ...}: {
# REF: https://home-manager-options.extranix.com/?query=vscode&release=release-25.05
programs.vscode = {
enable = true;
package = pkgs.vscodium;
mutableExtensionsDir = true;
profiles.default = {
enableUpdateCheck = true;
enableExtensionUpdateCheck = true;
# extension format: USER.PACKAGENAME
extensions = with pkgs.vscode-extensions; [
dracula-theme.theme-dracula
];
userSettings = {
"workbench.colorTheme" = "Dracula Theme";
};
};
};
home.file.".vscode/argv.json".text = builtins.toJSON {
password-store = "gnome-libsecret";
disable-hardware-acceleration = false;
disable-color-correct-rendering = false;
enable-crash-reporter = false;
};
}

View file

@ -0,0 +1,16 @@
{osConfig, ...}: {
assertions = [
{
assertion = !osConfig.services.gnupg.agent.enable;
message = ''
It is not recommended to enable both `homeConfig.services.ssh-agent.enable` and `osConfig.services.gnupg.agent.enable`!
'';
}
];
# enable OpenSSH private key agent
services.ssh-agent.enable = true;
# WARNING: the ssh-agent won't set this for itself...
systemd.user.sessionVariables.SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/ssh-agent";
}

View file

@ -0,0 +1,29 @@
{
config,
pkgs,
lib,
...
}: let
cfg = config.programs.elvish;
in {
options.programs.elvish = {
enable = lib.mkEnableOption "elvish";
};
config = lib.mkIf cfg.enable {
home = {
packages = with pkgs; [elvish];
file.".elvish/nix.elv".source = let
elvish-modules = pkgs.fetchFromGitHub {
owner = "zzamboni";
repo = "elvish-modules";
rev = "9005c970346ab06214b3cd3ed3e70f04f3c632ba";
hash = "sha256-/Dwtl12QzPvMoMMGoj+v3dwX2ZwFT8t/bohVy1zDE0c=";
};
in
builtins.toPath "${elvish-modules}/nix.elv";
# /${builtins.toPath elvish-modules.outPath}/nix.elv;
};
};
}

58
homes/modules/shell/fish.nix Executable file
View file

@ -0,0 +1,58 @@
{pkgs, ...}: {
programs.fish = {
enable = true;
generateCompletions = true;
interactiveShellInit = let
greetings =
[
# Official _cry64 quotes
"Do butterflies cry when they're sad?"
"I hope they do"
"I think Alice is lost..."
"I once again retreat to the sanctuary of my virtual realm"
# Unknown
"Welcome weary traveler to my shop"
# Legend of Zelda
"It's dangerous to go alone! Take this."
# ULTRAKILL
"Something wicked this way comes"
"May your L's be many... and your bitches few"
# Terraria
"What a horrible night to have a curse."
"The ancient spirits of light and dark have been released."
# Calamity
"The god of the stars rejects your offering. The ritual can only be performed at night."
"You should have just died..."
"Supreme Witch, Calamitas has killed every player!"
# Key Fairy
"A broken heart beats in fractals"
# Signalis
"Remember our promise"
]
|> map (x: "\"${x}\"")
|> builtins.concatStringsSep " ";
in ''
function rand_greet
set greetings ${greetings}
echo -n $greetings[(random 1 (count $greetings))]
end
set -g fish_greeting (rand_greet)
'';
plugins = [
{
name = "grc";
src = pkgs.fishPlugins.grc.src;
}
];
};
}

View file

@ -0,0 +1,17 @@
{...}: {
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history = {
size = 10000;
ignoreAllDups = true;
path = "$HOME/.zsh_history";
ignorePatterns = [
"rm *"
];
};
};
}

324
homes/modules/term/foot.nix Normal file
View file

@ -0,0 +1,324 @@
{pkgs, ...}: {
programs.foot = {
enable = true;
package = pkgs.foot;
server.enable = true;
settings = let
none = "\"\"";
in {
main = {
term = "foot"; # set $TERM
login-shell = "no";
title = "foot";
locked-title = "no";
font = "JetBrainsMonoNL Nerd Font:size=12";
# font-bold = "";
# font-italice = "";
# font-bold-italice = "";
# font-size-adjustment = 0.5;
# line-height = ...;
# letter-spacing = 0;
# horizontal-letter-offset = 0;
# vertical-letter-offset = 0;
# underline-offset = ...;
# underline-thickness = ...;
# strikeout-thickness = ...;
box-drawings-uses-font-glyphs = "no";
dpi-aware = "no";
gamma-correct-blending = "no";
initial-color-theme = "1";
# initial-window-size-pixels = "700x500"; # pixel COLSxROWS
initial-window-size-chars = "90x26"; # char COLSxROWS
initial-window-mode = "windowed";
pad = "32x32 center-when-maximized-and-fullscreen";
resize-by-cells = "yes";
resize-keep-grid = "yes";
resize-delay-ms = "100";
bold-text-in-bright = "no";
word-delimiters = ",`|:\"'()[]{}<>";
selection-target = "primary";
# workers = ...; # number of logical CPUs
};
# environment = {
# name = "value";
# }
security = {
osc52 = "enabled";
};
bell = {
system = "no";
urgent = "no";
notify = "no";
visual = "no";
# command = ...;
# command-focused = "no";
};
desktop-notifications = {
command = "notify-send --wait --app-name \${app-id} --icon \${app-id} --category \${category} --urgency \${urgency} --expire-time \${expire-time} --hint STRING:image-path:\${icon} --hint BOOLEAN:suppress-sound:\${muted} --hint STRING:sound-name:\${sound-name} --replace-id \${replace-id} \${action-argument} --print-id -- \${title} \${body}";
command-action-argument = "--action \${action-name=\${action-label}}";
close = none;
inhibit-when-focused = "no";
};
scrollback = {
lines = 1000;
multiplier = 1.0;
indicator-position = "relative";
indicator-format = none;
};
url = {
launch = "xdg-open \${url}";
label-letters = "sadfjklewcmpgh";
osc8-underline = "url-mode";
regex = "(((https?://|mailto:|ftp://|file:|ssh:|ssh://|git://|tel:|magnet:|ipfs://|ipns://|gemini://|gopher://|news:)|www\\.)([0-9a-zA-Z:/?#@!$&*+,;=.~_%^\\-]+|\\([]\\[\"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\\)|\\[[\\(\\)\"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\\]|\"[]\\[\\(\\)0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\"|'[]\\[\\(\\)0-9a-zA-Z:/?#@!$&*+,;=.~_%^\\-]*')+([0-9a-zA-Z/#@$&*+=~_%^\\-]|\\([]\\[\"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\\)|\\[[\\(\\)\"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\\]|\"[]\\[\\(\\)0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\"|'[]\\[\\(\\)0-9a-zA-Z:/?#@!$&*+,;=.~_%^\\-]*'))";
};
# "regex:your-fancy-name" = {
# regex = ...;
# launch = "[path to script/application] \${match}"
# };
#
# key-bindings = {
# regex-launch = "[your-fancy-name] Control+Shift+q";
# regex-copy = "[your-fancy-name] Control+Alt+shift+q";
# };
cursor = {
style = "block";
blink = "no";
# blink-rate = 500;
beam-thickness = 1.0;
# underline-thickness = ...;
};
mouse = {
hide-when-typing = "yes";
alternate-scroll-mode = "yes";
};
touch = {
long-press-delay = 400;
};
# Theme: Dracula
# REF: https://github.com/dracula/foot
colors = {
alpha = 1.0;
alpha-mode = "default"; # default/matching/all
background = "282a36";
foreground = "f8f8f2";
## Normal/regular colors (color palette 0-7)
regular0 = "21222c"; # black
regular1 = "ff5555"; # red
regular2 = "50fa7b"; # green
regular3 = "f1fa8c"; # yellow
regular4 = "bd93f9"; # blue
regular5 = "ff79c6"; # magenta
regular6 = "8be9fd"; # cyan
regular7 = "f8f8f2"; # white
## Bright colors (color palette 8-15)
bright0 = "6272a4"; # bright black
bright1 = "ff6e6e"; # bright red
bright2 = "69ff94"; # bright green
bright3 = "ffffa5"; # bright yellow
bright4 = "d6acff"; # bright blue
bright5 = "ff92df"; # bright magenta
bright6 = "a4ffff"; # bright cyan
bright7 = "ffffff"; # bright white
## Misc colors
selection-foreground = "ffffff";
selection-background = "44475a";
# jump-labels=<regular0> <regular3> # black-on-yellow
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
# search-box-no-match=<regular0> <regular1> # black-on-red
# search-box-match=<regular0> <regular3> # black-on-yellow
urls = "8be9fd";
flash = "7f7f00";
flash-alpha = 0.5;
};
# Alternative colour palette (see `man 5 foot.ini`)
colors2 = {
alpha = 1.0;
alpha-mode = "default";
background = "191724";
foreground = "e0def4";
regular0 = "26233a"; # black (Overlay)
regular1 = "eb6f92"; # red (Love)
regular2 = "9ccfd8"; # green (Foam)
regular3 = "f6c177"; # yellow (Gold)
regular4 = "31748f"; # blue (Pine)
regular5 = "c4a7e7"; # magenta (Iris)
regular6 = "ebbcba"; # cyan (Rose)
regular7 = "e0def4"; # white (Text)
bright0 = "47435d"; # bright black (lighter Overlay)
bright1 = "ff98ba"; # bright red (lighter Love)
bright2 = "c5f9ff"; # bright green (lighter Foam)
bright3 = "ffeb9e"; # bright yellow (lighter Gold)
bright4 = "5b9ab7"; # bright blue (lighter Pine)
bright5 = "eed0ff"; # bright magenta (lighter Iris)
bright6 = "ffe5e3"; # bright cyan (lighter Rose)
bright7 = "fefcff"; # bright white (lighter Text)
selection-foreground = "ffffff";
selection-background = "393553";
urls = "ebbcba"; # Rose
flash = "f6c177"; # yellow (Gold)
flash-alpha = 0.5;
cursor = "191724 e0def4";
};
# csd = {
# preferred = "server";
# size = 26;
# font = ...;
# color = ...; # foreground color
# hide-when-maximized = "no";
# border-width = 0;
# border-color = ...;
# button-width = 26;
# button-color = ...; # background color
# button-minimize-color = ...;
# button-maximize-color = ...;
# button-close-color = ...;
# };
key-bindings = {
scrollback-up-page = "Shift+Page_Up Shift+KP_Page_Up";
# scrollback-up-half-page = "none";
# scrollback-up-line = "none";
scrollback-down-page = "Shift+Page_Down Shift+KP_Page_Down";
# scrollback-down-half-page = "none";
# scrollback-down-line = "none";
# scrollback-home = "none";
# scrollback-end = "none";
clipboard-copy = "Control+Shift+c XF86Copy";
clipboard-paste = "Control+Shift+v XF86Paste";
primary-paste = "Shift+Insert";
search-start = "Control+Shift+r";
font-increase = "Control+plus Control+equal Control+KP_Add";
font-decrease = "Control+minus Control+KP_Subtract";
font-reset = "Control+0 Control+KP_0";
spawn-terminal = "Control+Shift+n";
# minimize = "none";
# maximize = "none";
# fullscreen = "none";
pipe-visible = "[sh -c \"xurls | fuzzel | xargs -r firefox\"] none";
pipe-scrollback = "[sh -c \"xurls | fuzzel | xargs -r firefox\"] none";
pipe-selected = "[xargs -r firefox] none";
pipe-command-output = "[wl-copy] none";
show-urls-launch = "Control+Shift+o";
# show-urls-copy = "none";
# show-urls-persistent = "none";
prompt-prev = "Control+Shift+z";
prompt-next = "Control+Shift+x";
unicode-input = "Control+Shift+u";
# color-theme-switch-1 = "none";
# color-theme-switch-2 = "none";
color-theme-toggle = "Control+Alt+p";
# noop = "none";
# quit = "none";
};
search-bindings = {
cancel = "Control+g Control+c Escape";
commit = "Return KP_Enter";
find-prev = "Control+r";
find-next = "Control+s";
cursor-left = "Left Control+b";
cursor-left-word = "Control+Left Mod1+b";
cursor-right = "Right Control+f";
cursor-right-word = "Control+Right Mod1+f";
cursor-home = "Home Control+a";
cursor-end = "End Control+e";
delete-prev = "BackSpace";
delete-prev-word = "Mod1+BackSpace Control+BackSpace";
delete-next = "Delete";
delete-next-word = "Mod1+d Control+Delete";
delete-to-start = "Control+u";
delete-to-end = "Control+k";
extend-char = "Shift+Right";
extend-to-word-boundary = "Control+w Control+Shift+Right";
extend-to-next-whitespace = "Control+Shift+w";
extend-line-down = "Shift+Down";
extend-backward-char = "Shift+Left";
extend-backward-to-word-boundary = "Control+Shift+Left";
# extend-backward-to-next-whitespace = "none";
extend-line-up = "Shift+Up";
clipboard-paste = "Control+v Control+Shift+v Control+y XF86Paste";
primary-paste = "Shift+Insert";
# unicode-input = "none";
scrollback-up-page = "Shift+Page_Up Shift+KP_Page_Up";
# scrollback-up-half-page = "none";
# scrollback-up-line = "none";
scrollback-down-page = "Shift+Page_Down Shift+KP_Page_Down";
# scrollback-down-half-page = "none";
# scrollback-down-line = "none";
# scrollback-home = "none";
# scrollback-end = "none";
};
url-bindings = {
cancel = "Control+g Control+c Control+d Escape";
toggle-url-visible = "t";
};
text-bindings = {
"\\x03" = "Mod4+c"; # map Super+c -> Control+c
};
mouse-bindings = {
scrollback-up-mouse = "BTN_WHEEL_BACK";
scrollback-down-mouse = "BTN_WHEEL_FORWARD";
font-increase = "Control+BTN_WHEEL_BACK";
font-decrease = "Control+BTN_WHEEL_FORWARD";
selection-override-modifiers = "Shift";
primary-paste = "BTN_MIDDLE";
select-begin = "BTN_LEFT";
select-begin-block = "Control+BTN_LEFT";
select-extend = "BTN_RIGHT";
select-extend-character-wise = "Control+BTN_RIGHT";
select-word = "BTN_LEFT-2";
select-word-whitespace = "Control+BTN_LEFT-2";
select-quote = "BTN_LEFT-3";
select-row = "BTN_LEFT-4";
};
};
};
}

View file

@ -0,0 +1,358 @@
# NOTE: hyprland must be enabled in BOTH your host config (for running hyprland)
# NOTE: and your home-manager config (for managing hyprland's config files)
{pkgs, ...}: {
home.packages = with pkgs; [
playerctl
];
wayland.windowManager.hyprland = {
enable = true;
package = null;
portalPackage = null;
xwayland.enable = true;
# systemd= {
# enable = true;
# # enable autostart of applications
# # REF: `man 8 systemd-xdg-autostart-generator`
# enableXdgAutostart = true;
# };
settings = {
"$MOD" = "SUPER";
# applications
"$editor" = "hx";
"$terminal" = "foot";
"$menu" = "fuzzel";
"$colorpicker" = "hyprpicker | head -c 7 | wl-copy";
"$screenshot_region" = "hyprshot -m region --clipboard-only";
"$screenshot_window" = "hyprshot -m window --clipboard-only";
"$cursorLock" = "~/scripts/bin/hyprland-cursor-lock";
# startup programs
exec-once = [
# TODO: make these independent of hyprland, add these to the
"mako &"
"awww-daemon &"
"waybar &"
# "wl-paste --type text --watch cliphist store"
# "wl-paste --type image --watch cliphist store"
# "wl-clip-persist --clipboard regular"
# "playerctld daemon"
];
# monitor configuration
monitor = [
"eDP-1, highres@highrr, 0x0, 1.0"
];
# .__. .___ __..___. . . .___ .___. ._. __ __.
# [__] [__ (__ | |__| [__ | | / ` (__
# | | [___ .__) | | | [___ | _|_ \__. .__)
general = {
gaps_in = 12; # margin between windows
gaps_out = 25; # margin from windows to monitor edge
gaps_workspaces = 0; # margin between workspaces (stacks with gaps_out)
# float_gaps = 0; # gaps_out but for floating windows
border_size = 4;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(00000000)";
# Enable resizing windows by clicking and dragging the border
resize_on_border = true;
# REF: https://wiki.hyprland.org/Configuring/Tearing/
allow_tearing = false;
layout = "dwindle";
snap = {
enabled = false;
window_gap = 10;
monitor_gap = 10;
border_overlap = false;
# respect_gaps = false;
};
};
decoration = {
rounding = 20;
rounding_power = 4.0; # Lp norm
border_part_of_window = true; # consider border as part of its window
# screen_shader = ...; # path to custom GLSL fragment shader
# window Transparency
active_opacity = 1.0;
inactive_opacity = 0.95;
fullscreen_opacity = 1.0; # fullscreened windows
# inactive Window Dimming
dim_inactive = false;
dim_strength = 0.5;
dim_special = 0.2;
dim_around = 0.4;
blur = {
enabled = true;
new_optimizations = true;
xray = false; # floating windows xray through tiling windows
ignore_opacity = true;
# blur Parameters
size = 8;
passes = 1;
noise = 0.0117; # default
contrast = 0.8916; # default
brightness = 0.8172; # default
vibrancy = 0.1696; # default
vibrancy_darkness = 0.0; # default
# blurring For Specific Window Types
special = false; # blur special windows
popups = false; # blur popups
popups_ignorealpha = 0.2;
input_methods = false;
input_methods_ignorealpha = 0.2;
};
shadow = {
enabled = true;
ignore_window = true; # only render at edges (not behind)
range = 3;
render_power = 1; # falloff rate
sharp = false; # aka infinite shadow.render_power
offset = "0 0"; # vec2
scale = 1.0;
color = "rgba(00000000)";
color_inactive = "rgba(000000ff)"; # defaults to shadow.color if unset
};
};
# REF: https://cubic-bezier.com
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
# REF: https://wiki.hyprland.org/Configuring/Animations
# Animation Declaration Format:
# "animation = NAME, ENABLE, SPEED, BEZIER [,STYLE]"
# NOTE: SPEED is in ds (where 1ds = 100ms)
animations = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windowsIn, 1, 4, linear, slide bottom"
"windowsOut, 1, 10, linear, popin"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 1.5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 1, 1.94, almostLinear, fade"
"workspacesIn, 1, 1.21, almostLinear, fade"
"workspacesOut, 1, 1.94, almostLinear, fade"
];
# REF: https://wiki.hyprland.org/Configuring/Dwindle-Layout
dwindle = {
# master switch for pseudotiling. enabling is bound to MOD + P in the keybinds section below
pseudotile = true;
preserve_split = true; # You probably want this
};
# REF: https://wiki.hyprland.org/Configuring/Master-Layout
master = {
new_status = "master";
};
misc = {
#force_default_wallpaper = -1; # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = true;
disable_splash_rendering = true;
enable_anr_dialog = false;
font_family = "Geist Mono";
};
input = {
# kb_layout = "us";
# kb_variant =
# kb_model =
# kb_options =
# kb_rules =
follow_mouse = 1;
sensitivity = 0; # -1.0 - 1.0, 0 means no modification
accel_profile = "flat";
force_no_accel = false; # not recommended to turn on
repeat_rate = 50;
repeat_delay = 300;
touchpad = {
natural_scroll = true;
};
};
cursor.no_hardware_cursors = true;
# standard keypress bindings
bind = [
# terminal commands
"$MOD, RETURN, exec, $terminal"
# btop
"$MOD, P, exec, bash -c \"{ hyprctl clients | rg '^\w*title: btop' &>/dev/null; } && hyprctl dispatch closewindow title:btop || $terminal -T btop btop & disown\""
"$MOD, R, exec, $menu"
# lock mouse to window (mostly, for gaming)
"$MOD, F1, exec, pkill hyprland-cursor || $cursorLock"
"$MOD, F2, exec, $colorpicker"
# screenshots
"$MOD, S, exec, $screenshot_region"
"$MOD SHIFT, S, exec, $screenshot_window"
"$MOD, F, fullscreen"
"$MOD SHIFT, F, fullscreenstate, 0 3" # fakefullscreen
"$MOD, C, killactive"
"$MOD SHIFT, Delete, exit"
# switch window
"$MOD, left, movefocus, l"
"$MOD, right, movefocus, r"
"$MOD, up, movefocus, u"
"$MOD, down, movefocus, d"
"$MOD, H, movefocus, l"
"$MOD, J, movefocus, d"
"$MOD, K, movefocus, u"
"$MOD, L, movefocus, r"
# switch workspaces
"$MOD, 1, workspace, 1"
"$MOD, 2, workspace, 2"
"$MOD, 3, workspace, 3"
"$MOD, 4, workspace, 4"
"$MOD, 5, workspace, 5"
"$MOD, 6, workspace, 6"
"$MOD, 7, workspace, 7"
"$MOD, 8, workspace, 8"
"$MOD, 9, workspace, 9"
"$MOD, 0, workspace, 10"
"$MOD SHIFT, left, workspace, e-1"
"$MOD SHIFT, right, workspace, e+1"
# move window to workspace
"$MOD SHIFT, 1, movetoworkspace, 1"
"$MOD SHIFT, 2, movetoworkspace, 2"
"$MOD SHIFT, 3, movetoworkspace, 3"
"$MOD SHIFT, 4, movetoworkspace, 4"
"$MOD SHIFT, 5, movetoworkspace, 5"
"$MOD SHIFT, 6, movetoworkspace, 6"
"$MOD SHIFT, 7, movetoworkspace, 7"
"$MOD SHIFT, 8, movetoworkspace, 8"
"$MOD SHIFT, 9, movetoworkspace, 9"
"$MOD SHIFT, 0, movetoworkspace, 10"
# move workspace to monitor
"$MOD TAB, 1, movecurrentworkspacetomonitor, DP-2"
"$MOD TAB, 2, movecurrentworkspacetomonitor, HDMA-A-1"
];
# bindings for mouse
bindm = [
"$MOD, mouse:272, movewindow"
"$MOD, mouse:273, resizewindow"
];
# bindings that work even while screen is locked
bindl = [
# WARNING: requires `pkgs.playerctl`
", XF86AudioNext, exec, playerctl next"
", XF86AudioPause, exec, playerctl play-pause"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
];
# bindings that work even while screen is locked
# and also repeat when the key is held
bindel = [
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
];
windowrule = [
# btop process manager
{
name = "terminal-manager";
"match:class" = "^(foot)$";
"match:title" = "^(btop)$";
float = true;
center = true;
size = "(monitor_w*0.65) (monitor_h*0.65)";
}
# ignore maximize requests from apps
{
name = "suppress-maximize";
suppress_event = "maximize";
"match:class" = ".*";
}
# fix some dragging issues with XWayland
{
name = "no-focus";
no_focus = "on";
"match:class" = "^$";
"match:title" = "^$";
"match:xwayland" = true;
"match:float" = true;
"match:fullscreen" = false;
"match:pin" = false;
}
# TODO: style fakefullscreen windows to clearly indicate their difference
# {
# name = "fake-fullscreen";
# }
];
# █▀▀ █▄░█ █░█   █░█ ▄▀█ █▀█
# ██▄ █░▀█ ▀▄▀   ▀▄▀ █▀█ █▀▄
env = [
"XCURSOR_THEME,Bibata-Modern-Ice"
"XCURSOR_SIZE,16"
"HYPRCURSOR_THEME,Bibata-Modern-Ice"
"HYPRCURSOR_SIZE,16"
"QT_QPA_PLATFORM,wayland"
"QT_QPA_PLATFORMTHEME,xdgdesktopportal" # makes portals work correctly
"XDG_MENU_PREFIX,arch-"
"XDG_CURRENT_DESKTOP,Hyprland"
];
};
};
}

View file

@ -0,0 +1,29 @@
{
config,
pkgs,
...
}: {
services.hypridle = {
enable = true;
settings = {
general = {
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 600;
on-timeout = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
}
{
timeout = 660;
on-timeout = "systemctl suspend";
}
];
};
};
}

View file

@ -0,0 +1,115 @@
{...}: {
programs.hyprlock = {
enable = true;
settings = {
background = {
monitor = "";
# TODO: ooni pls change this to something of your own
# path = "$HOME/downloads/wallpaper/kill-my-firstborn/astronaut-pink-blue.png";
# color = $color1
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
blur_size = 4;
blur_passes = 3; # 0 disables blurring
noise = 0.0117;
contrast = 1.3000; # Vibrant!!!
brightness = 0.8000;
vibrancy = 0.2100;
vibrancy_darkness = 0.0;
};
label = [
{
# Hours
monitor = "";
text = ''cmd[update:1000] echo "<b><big> $(date +"%H") </big></b>"'';
color = "rgb(255, 255, 255, 1)";
font_size = 112;
font_family = "Geist Mono 10";
shadow_passes = 3;
shadow_size = 4;
position = "0, 240";
halign = "center";
valign = "center";
}
{
# Minutes
monitor = "";
text = ''cmd[update:1000] echo "<b><big> $(date +"%M") </big></b>"'';
color = "rgb(255, 255, 255, 1)";
font_size = 112;
font_family = "Geist Mono 10";
shadow_passes = 3;
shadow_size = 4;
position = "0, 120";
halign = "center";
valign = "center";
}
# Today
{
monitor = "";
text = ''cmd[update:18000000] echo "<b><big> "$(date +'%A')" </big></b>"'';
color = "rgb(255, 255, 255, 1)";
font_size = 22;
font_family = "JetBrainsMono Nerd Font 10";
position = "0, 30";
halign = "center";
valign = "center";
}
# Week
{
monitor = "";
text = ''cmd[update:18000000] echo "<b> "$(date +'%d %b')" </b>"'';
color = "rgb(255, 255, 255, 1)";
font_size = 18;
font_family = "JetBrainsMono Nerd Font 10";
position = "0, 6";
halign = "center";
valign = "center";
}
{
# Degrees
monitor = "";
# get temperature in Brisbane
text = ''cmd[update:18000000] echo "<b>Feels like $(curl -s 'wttr.in/bne?format=%t' | tr -d '+')</b>"'';
color = "rgb(255, 255, 255, 1)";
font_size = 18;
font_family = "Geist Mono 10";
position = "0, 40";
halign = "center";
valign = "bottom";
}
];
input-field = {
monitor = "";
size = "300, 50";
outline_thickness = 3;
dots_size = 0.26; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.64; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
dots_rouding = -1;
rounding = 22;
outer_color = "rgb(0, 0, 0, 0)";
inner_color = "rgb(100, 114, 125, 0.1)";
font_color = "rgb(200, 200, 200)";
fade_on_empty = true;
placeholder_text = "<i>Password...</i>"; # Text rendered in the input box when it's empty.
position = "0, 120";
halign = "center";
valign = "bottom";
};
};
};
}

41
hosts/MACBOOKI9/default.nix Executable file
View file

@ -0,0 +1,41 @@
{
pkgs,
upkgs,
lib,
...
}: {
imports = [
./hardware.nix
];
networking.hostName = "MACBOOKI9";
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
efiSupport = true;
device = "nodev";
# detect other bootable systems at build-time
useOSProber = false;
};
};
# ----- SERVICES -----
services = {
# Touchpad support
libinput.enable = true;
};
# ---- SYSTEM PACKAGES -----
environment.systemPackages = with pkgs; [];
# XXX: WARNING: DO NOT MODIFY
# XXX: WARNING: DO NOT MODIFY
# XXX: WARNING: IM DEAD SERIOUS DO NOT CHANGE THIS VALUE
# XXX: WARNING: IM DEAD SERIOUS DO NOT CHANGE THIS VALUE
system.stateVersion = "25.11"; # Did you read the comment?
}

View file

@ -0,0 +1,33 @@
# 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 = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c959876c-805c-4433-bb36-67eb13924c62";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8CC6-6102";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/091b5706-ba96-44b9-89b7-9aa7e85b8221"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,12 @@
{...}: {
services.flatpak = {
enable = true;
packages = [
{
# Linux Runtime for Roblox
appId = "org.vinegarhq.Sober";
origin = "flathub";
}
];
};
}

View file

@ -0,0 +1,50 @@
{
pkgs,
upkgs,
...
}: {
nixpkgs.overlays = [
(self: super: {
lutris = super.lutris.overrideAttrs (final: prev: {
# WARNING: pkgs.mbedtls_2 is marked insecure!
# Replace pkgs.mbedtls_2 (v2.28.10) with pkgs.mbedtls (v3.6.4)
targetPkgs = pkgs: (
(builtins.filter (p: p != pkgs.mbedtls_2) (prev.targetPkgs pkgs))
++ [pkgs.mbedtls]
);
});
})
];
programs = {
steam = {
enable = true;
package = upkgs.millennium-steam;
gamescopeSession.enable = false; # .desktop entry for gamescope
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
};
gamemode.enable = true;
};
environment.systemPackages = with pkgs; [
steamcmd
mangohud
protonup-qt
# XXX: DEBUG: disable lutris
# XXX: NOTE: pkgs.lutris depends on pkgs.mbedtls_2 which is marked insecure!
# XXX: NOTE: Use the provided overlay to patch pkgs.mbedtls_2 -> pkgs.mbedtls
# lutris
bottles
];
}

View file

@ -0,0 +1,27 @@
{pkgs, ...}: {
# I want to use fish as my login shell but it always goes terrible
# cause it isn't POSIX compliant, so instead Bash is my login and
# will just exec fish (^-^)
programs = {
fish.enable = true;
bash = {
blesh.enable = false; # ble.sh replacement for GNU readline
completion.enable = true;
interactiveShellInit = ''
# help bash transition into a beautiful fish!
if [[ -z $BASH_IS_TRANS ]]
then
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
fi
# bash is trans now! (no more transitioning required)
export BASH_IS_TRANS=true
'';
};
};
}

View file

@ -0,0 +1,14 @@
{...}: {
# Optimize storage and automatic scheduled GC running
# If you want to run GC manually, use commands:
# `nix-store --optimize` for finding and eliminating redundant copies of identical store paths
# `nix-store --gc` for optimizing the nix store and removing unreferenced and obsolete store paths
# `nix-collect-garbage -d` for deleting old generations of user profiles
nix.settings.auto-optimise-store = true;
nix.optimise.automatic = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
}

View file

@ -0,0 +1,33 @@
{
inputs,
pkgs,
lib,
system,
...
}: let
hyprpkgs = inputs.hyprland.inputs.nixpkgs.legacyPackages.${system};
in {
environment.defaultPackages = with pkgs; [
hyprsunset
];
xdg.portal = {
enable = true;
wlr.enable = true;
};
programs = {
hyprland = {
enable = true;
package = inputs.hyprland.packages.${system}.hyprland;
portalPackage = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland;
xwayland.enable = true;
};
};
hardware.graphics = {
package = lib.mkForce hyprpkgs.mesa;
package32 = lib.mkForce hyprpkgs.pkgsi686Linux.mesa;
};
}

42
nixpkgs.nix Normal file
View file

@ -0,0 +1,42 @@
{inputs, ...} @ args: let
sharedOverlays = [
inputs.wa2k.overlays.default
inputs.millennium.overlays.default
(import ./overlays args)
];
in {
nixpkgs.channels = rec {
# base
base = npkgs;
# nixpkgs-stable
npkgs = {
source = inputs.nixpkgs;
overlays = [] ++ sharedOverlays;
config = {
allowUnfree = true;
allowBroken = false;
};
};
# nixpkgs-unstable
upkgs = {
source = inputs.nixpkgs-unstable;
overlays = [] ++ sharedOverlays;
config = {
allowUnfree = true;
allowBroken = false;
};
};
# nixpkgs-master
mpkgs = {
source = inputs.nixpkgs-master;
overlays = [] ++ sharedOverlays;
config = {
allowUnfree = true;
allowBroken = false;
};
};
};
}

93
overlays/default.nix Normal file
View file

@ -0,0 +1,93 @@
{
inputs,
system,
...
}: (
self: super: let
pkgs = super;
inherit
(super)
lib
;
in {
ns = pkgs.writeShellApplication {
name = "ns";
runtimeInputs = with pkgs; [
fzf
nix-search-tv
];
text = builtins.readFile "${pkgs.nix-search-tv.src}/nixpkgs.sh";
excludeShellChecks = [
# SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.
"SC2016"
];
};
sddm-theme-corners = import ../packages/sddm-theme/corners.nix {
inherit pkgs;
};
sddm-theme-sugar-dark = import ../packages/sddm-theme/sugar-dark.nix {
inherit pkgs;
};
xdg-desktop-portal-hyprland =
lib.mkIf (inputs?hyprland)
inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland;
hyprland-git =
lib.mkIf (inputs?hyprland)
(inputs.hyprland.packages.${system}.hyprland.overrideAttrs (final: prev: {
patches = let
glaze_version = inputs.hyprland.inputs.nixpkgs.legacyPackages.glaze.version;
in
prev.patches
++ [
''
diff --git a/hyprpm/CMakeLists.txt b/hyprpm/CMakeLists.txt
index 9f1318f4..7d5b8eda 100644
--- a/hyprpm/CMakeLists.txt
+++ b/hyprpm/CMakeLists.txt
@@ -11,9 +11,9 @@ set(CMAKE_CXX_STANDARD 23)
pkg_check_modules(hyprpm_deps REQUIRED IMPORTED_TARGET tomlplusplus hyprutils>=0.7.0)
-find_package(glaze 7.0.0 QUIET)
+find_package(glaze ${glaze_version} QUIET)
if (NOT glaze_FOUND)
- set(GLAZE_VERSION v7.0.0)
+ set(GLAZE_VERSION v${glaze_version})
message(STATUS "glaze dependency not found, retrieving ''${GLAZE_VERSION} with FetchContent")
include(FetchContent)
FetchContent_Declare(
''
];
}));
awww = inputs.awww.packages.${system}.awww;
prismlauncher = pkgs.prismlauncher.overrideAttrs (final: prev: {
buildInputs =
prev.buildInputs
++ (with pkgs; [
libxtst
]);
});
element-desktop = pkgs.element-desktop.overrideAttrs (final: prev: {
desktopItems = [
((builtins.elemAt prev.desktopItems 0).override {
exec = "element-desktop %u --password-store=\"gnome-libsecret\"";
})
];
});
# in wake of CVE-2022-3602/CVE-2022-3786
nginxStable = pkgs.nginxStable.override {openssl = pkgs.libressl;};
nginx = pkgs.nginx.override {openssl = pkgs.libressl;};
bottles = pkgs.bottles.override {
removeWarningPopup = true;
};
}
)

View file

@ -0,0 +1,16 @@
diff --git a/hyprpm/CMakeLists.txt b/hyprpm/CMakeLists.txt
index 9f1318f4..7d5b8eda 100644
--- a/hyprpm/CMakeLists.txt
+++ b/hyprpm/CMakeLists.txt
@@ -11,9 +11,9 @@ set(CMAKE_CXX_STANDARD 23)
pkg_check_modules(hyprpm_deps REQUIRED IMPORTED_TARGET tomlplusplus hyprutils>=0.7.0)
-find_package(glaze 7.0.0 QUIET)
+find_package(glaze 6.0.1 QUIET)
if (NOT glaze_FOUND)
- set(GLAZE_VERSION v7.0.0)
+ set(GLAZE_VERSION v6.0.1)
message(STATUS "glaze dependency not found, retrieving ${GLAZE_VERSION} with FetchContent")
include(FetchContent)
FetchContent_Declare(

3
packages/README.md Normal file
View file

@ -0,0 +1,3 @@
# /packages
This directory (`hosts/packages`) contains custom package derivations, and differs
from `hosts/modules/` which contains importable modules for your flake.

24
packages/sddm-theme/corners.nix Executable file
View file

@ -0,0 +1,24 @@
{pkgs}:
pkgs.stdenv.mkDerivation {
name = "sddm-theme-corners";
version = "1.0.0";
installPhase = ''
mkdir -p $out/share/sddm/themes
cp -ar $src/corners $out/share/sddm/themes/
'';
src = pkgs.fetchFromGitHub {
owner = "aczw";
repo = "sddm-theme-corners";
rev = "6ff0ff455261badcae36cd7d151a34479f157a3c";
sha256 = "0iiasrbl7ciyhq3z02la636as915zk9ph063ac7vm5iwny8vgwh8";
};
buildInputs = with pkgs; [
libsForQt5.qt5.qtgraphicaleffects
];
nativeBuildInputs = with pkgs; [
qt5.wrapQtAppsHook
];
}

View file

@ -0,0 +1,35 @@
{ pkgs }:
let
#image = pkgs.fetchurl {
# url = "https://";
# sha256 = "";
#};
in
pkgs.stdenv.mkDerivation {
name = "sddm-theme";
src = pkgs.fetchFromGitHub {
owner = "MarianArlt";
repo = "sddm-sugar-dark";
rev = "ceb2c455663429be03ba62d9f898c571650ef7fe";
sha256 = "0153z1kylbhc9d12nxy9vpn0spxgrhgy36wy37pk6ysq7akaqlvy";
};
# dependencies
buildInputs = with pkgs.libsForQt5; [
qt5.qtbase
qt5.qtx11extras
qt5.qtquickcontrols2
qt5.qtgraphicaleffects
qt5.wrapQtAppsHook
#libsForQt5.qt5.qtquickcontrols2
#libsForQt5.qt5.qtgraphicaleffects
];
installPhase = ''
# move necessary files
mkdir -p $out
cp -R ./* $out/
'';
# set background
#rm $out/Background.jpg
#mv ${image} $out/Background.jpg
}

29
snow.nix Normal file
View file

@ -0,0 +1,29 @@
{inputs, ...} @ args: {
nodes = {
base = inputs.nixpkgs;
homeManager = inputs.home-manager;
args = {inherit inputs;};
modules = [
inputs.sddm-silent.nixosModules.default
inputs.wa2k.nixosModules.default
];
groups = {
# group containing all your desktops
desktops = {};
};
nodes = {
# wow she's on nix :3
MACBOOKI9 = {
system = "x86_64-linux";
groups = groups: [groups.desktops];
modules = with inputs; [
grub2-themes.nixosModules.default
nix-flatpak.nixosModules.nix-flatpak
];
};
};
};
}