Compare commits

...

10 commits

Author SHA1 Message Date
916f497b84
cleanup 2025-05-20 11:09:14 -04:00
0f9ffb552d
fix: libvirt hooks getting deleted at boot
god nixos is so fucking cool
2025-05-20 11:06:40 -04:00
caf9810290
move to nushell 2025-05-19 18:28:46 -04:00
fdd9dd20ae
updates 2025-05-09 18:43:27 -04:00
dd60fce00f
updates :3 2025-05-06 20:02:36 -04:00
825f05c50a
some changes 2025-04-27 11:11:51 -04:00
2d25c605b7
more waybar tweaks 2025-04-07 22:56:59 -04:00
d5af82bb9b
waybar updates 2025-04-07 15:36:47 -04:00
b5542e492f
stuff and things 2025-04-07 13:07:15 -04:00
fe357582a6
updates 2025-03-23 16:50:28 -04:00
86 changed files with 4764 additions and 3045 deletions

View file

@ -168,6 +168,7 @@ Now, lets add a file to define your home. Create a file at `homes/x86_64-linux/<
dircolors = {
enable = true;
enableZshIntegration = true;
enableNushellIntegration = true;
};
};

View file

@ -1,70 +0,0 @@
{
"palette": {
"os": "#ACB0BE",
"pink": "#F5BDE6",
"lavender": "#B7BDF8",
"blue": "#8AADF4",
"wight": "#FFFFFF",
"text": "#494D64"
},
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "p:blue",
"foreground": "p:wight",
"powerline_symbol": "\ue0b4",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": "{{.Icon}} ",
"type": "os"
},
{
"background": "p:blue",
"foreground": "p:text",
"powerline_symbol": "\ue0b4",
"style": "diamond",
"template": "{{ .UserName }}@{{ .HostName }}",
"type": "session"
},
{
"background": "p:pink",
"foreground": "p:text",
"properties": {
"folder_icon": "..\ue5fe..",
"home_icon": "~",
"style": "agnoster_short"
},
"powerline_symbol": "\ue0b4",
"style": "powerline",
"template": " {{ .Path }}",
"type": "path"
},
{
"background": "p:lavender",
"foreground": "p:text",
"style": "powerline",
"properties": {
"branch_icon": "\ue725 ",
"cherry_pick_icon": "\ue29b ",
"commit_icon": "\uf417 ",
"fetch_status": false,
"fetch_upstream_icon": false,
"merge_icon": "\ue727 ",
"no_commits_icon": "\uf0c3 ",
"rebase_icon": "\ue728 ",
"revert_icon": "\uf0e2 ",
"tag_icon": "\uf412 "
},
"powerline_symbol": "\ue0b4",
"template": " {{ .HEAD }}",
"type": "git"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 2
}

1259
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -28,14 +28,16 @@
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
resume.url = "git+https://git.zoeys.cloud/zoey/resume";
anyrun.url = "github:anyrun-org/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs";
walker.url = "github:abenz1267/walker";
resume.url = "path:/home/zoey/dev/resume";
ags.url = "github:Aylur/ags/v1";
ags.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.darwin.follows = "";
# to replace with sops-nix
sops-nix.url = "github:Mic92/sops-nix";
pnpm2nix.url = "github:nzbr/pnpm2nix-nzbr";
@ -49,7 +51,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
blog.url = "git+https://git.zoeys.cloud/zoey/web";
blog.url = "path:/home/zoey/dev/web";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
@ -98,12 +100,11 @@
};
umu.url = "github:Open-Wine-Components/umu-launcher?dir=packaging/nix";
# umu.inputs.nixpkgs.follows = "nixpkgs";
zen-browser.url = "github:0xc000022070/zen-browser-flake";
zoeycomputer = {
url = "git+https://git.zoeys.cloud/zoey/zoeys.computer";
url = "path:/home/zoey/dev/zoeys.computer";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -128,10 +129,14 @@
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
opnix.url = "github:brizzbuzz/opnix";
nix-gaming.url = "path:/home/zoey/dev/nix-gaming";
mc-honeypot.url = "github:Duckulus/mc-honeypot";
mc-honeypot.inputs.nixpkgs.follows = "nixpkgs";
niri-src.url = "github:YaLTeR/niri";
niri-src.inputs.nixpkgs.follows = "nixpkgs";
niri.url = "github:sodiboo/niri-flake";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
};
outputs = inputs @ {self, ...}: let
@ -139,10 +144,10 @@
inherit inputs;
src = ./.;
overlays = [
inputs.rust-overlay.overlays.default
overlays = with inputs; [
rust-overlay.overlays.default
(final: prev: {
ghostty = inputs.ghostty.packages."x86_64-linux".default;
ghostty = ghostty.packages."x86_64-linux".default;
})
(final: prev: {
shadps4 = prev.shadps4.overrideAttrs {
@ -156,6 +161,7 @@
patches = [];
};
})
niri.overlays.niri
];
snowfall = {
@ -171,10 +177,9 @@
homes.modules = with inputs; [
spicetify-nix.homeManagerModules.default
catppuccin.homeManagerModules.catppuccin
anyrun.homeManagerModules.default
catppuccin.homeModules.default
ags.homeManagerModules.default
opnix.homeManagerModules.default
walker.homeManagerModules.default
];
systems.modules.nixos = with inputs; [
@ -183,13 +188,14 @@
catppuccin.nixosModules.catppuccin
blog.nixosModule
agenix.nixosModules.default
sops-nix.nixosModules.sops
solaar.nixosModules.default
zoeycomputer.nixosModules.default
lix-module.nixosModules.default
mailserver.nixosModule
disko.nixosModules.disko
mc-honeypot.nixosModules.default
opnix.nixosModules.default
niri.nixosModules.niri
chaotic.nixosModules.default
];
};
in

View file

@ -1,29 +0,0 @@
#!/usr/bin/env bash
# Generate client keys
wg genkey | tee client-private.key | wg pubkey >client-public.key
# Get the keys
CLIENT_PRIVATE_KEY=$(cat client-private.key)
CLIENT_PUBLIC_KEY=$(cat client-public.key)
SERVER_PUBLIC_KEY=$(sudo cat /home/zoey/wg-keys/private | wg pubkey)
# Your server's public IP
SERVER_IP="66.227.177.15"
# Create the client configuration
cat >wg0-client.conf <<EOF
[Interface]
PrivateKey = ${CLIENT_PRIVATE_KEY}
Address = 10.100.0.2/24
DNS = 1.1.1.1
[Peer]
PublicKey = ${SERVER_PUBLIC_KEY}
Endpoint = ${SERVER_IP}:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 25
EOF
echo "Client Public Key (add this to your server config):"
echo ${CLIENT_PUBLIC_KEY}

View file

@ -5,10 +5,12 @@
lib,
...
}: {
wms.hyprland.enable = true;
wms.hyprland.enable = false;
wms.niri.enable = true;
apps = {
web.librewolf.enable = true;
web.librewolf.setDefault = true;
web.zen.setDefault = true;
web.zen.enable = true;
tools.git.enable = true;
tools.tmux.enable = true;
@ -24,7 +26,7 @@
term.kitty.enable = true;
term.foot.enable = true;
# term.rio.enable = true;
term.rio.enable = true;
term.alacritty.enable = true;
term.ghostty.enable = true;
@ -34,11 +36,12 @@
mail.aerc.enable = true;
helpers = {
rofi.enable = true;
waybar.enable = true;
swaync.enable = true;
};
};
shells.nu.enable = true;
shells.zsh.enable = true;
rice.gtk.enable = true;
@ -59,6 +62,18 @@
};
};
programs.distrobox = {
enable = true;
containers = {
proton-tkg = {
image = "archlinux";
additional_packages = "build-essential git";
};
};
};
catppuccin.mako.enable = false;
# programs.pywal2.enable = true;
xdg.mimeApps = {
@ -102,118 +117,129 @@
catppuccin.aerc.enable = true;
catppuccin.cava.enable = true;
catppuccin.fuzzel.enable = true;
catppuccin.fzf.enable = true;
work.vpn.enable = true;
home.packages = [
pkgs.gimp
pkgs.slack
home.packages = with pkgs; [
gimp3
slack
pkgs.monero-cli
monero-cli
devenv
pkgs.zoom-us
pkgs.pandoc
zoom-us
pandoc
pkgs.prismlauncher
pkgs.obs-studio
nexusmods-app-unfree
pkgs.ungoogled-chromium
pkgs.uutils-coreutils-noprefix
pkgs.yazi
prismlauncher
obs-studio
pkgs.fragments
(discord.override {
withOpenASAR = true;
withVencord = true;
})
distrobox
legcord
ungoogled-chromium
uutils-coreutils-noprefix
yazi
reaper
fragments
inputs.posting.packages.${pkgs.system}.default
pkgs.heroic
pkgs.cartridges
pkgs.discord-canary
heroic
cartridges
pkgs.darktable
darktable
pkgs.thunderbird
thunderbird
pkgs.custom.nvidia-nsight
custom.nvidia-nsight
pkgs.custom.enc
custom.enc
pkgs.nix-tree
neural-amp-modeler-lv2
nix-tree
# inputs.g2claude.packages.${pkgs.system}.default
pkgs.mongodb-compass
pkgs.postman
pkgs.mosh
mongodb-compass
postman
mosh
pkgs.dconf
pkgs.wl-clipboard
pkgs.pwvucontrol
pkgs.wlogout
pkgs.sway-audio-idle-inhibit
pkgs.grim
pkgs.slurp
dconf
wl-clipboard
pwvucontrol
wlogout
sway-audio-idle-inhibit
grim
slurp
pkgs.pods
pods
pkgs.polari
pkgs.flare-signal
polari
pkgs.neovide
neovide
pkgs.nitch
pkgs.nix-output-monitor
pkgs.fastfetch
nitch
nix-output-monitor
fastfetch
pkgs.signal-desktop
signal-desktop
flare-signal
pkgs.nh
pkgs.dwl
nh
dwl
pkgs.foliate
foliate
pkgs.killall
pkgs.custom.rebuild
pkgs.custom.powermenu
killall
custom.rebuild
custom.powermenu
pkgs.parsec-bin
pkgs.filezilla
lib.custom.nixos-stable.zed-editor
pkgs.rmpc
# (inputs.zen-browser.packages.${pkgs.system}.twilight.overrideAttrs {
# version = "1.7.7t";
# src = builtins.fetchTarball {
# url = "https://github.com/zen-browser/desktop/releases/download/twilight/zen.linux-x86_64.tar.xz";
# sha256 = "sha256:1wgkqdfny6bqwmpka6knrjzsidpm3v5kiijkmszg7wiisl47lgal";
# };
# })
parsec-bin
filezilla
zed-editor
rmpc
inputs.zen-browser.packages.${pkgs.system}.beta
pkgs.starfetch
starfetch
lib.custom.nixos-stable.kiwix
pkgs.mpc-cli
pkgs.zathura
pkgs.gpgme.dev
mpc-cli
zathura
gpgme.dev
pkgs.rofimoji
pkgs.renderdoc
rofimoji
renderdoc
pkgs.nautilus
pkgs.nautilus-python
pkgs.loupe
xwayland-satellite
pkgs.openvpn
pkgs.telegram-desktop
pkgs.linux-manual
pkgs.man-pages
pkgs.man-pages-posix
nautilus
nautilus-python
loupe
pkgs.ardour
openvpn
linux-manual
man-pages
man-pages-posix
pkgs.shadps4
pkgs.audacity
ardour
];
programs.vesktop = {
enable = true;
};
programs.zoxide = {
enable = true;
options = ["--cmd cd"];
@ -229,29 +255,29 @@
programs.cava = {
enable = true;
catppuccin.enable = true;
# settings = {
# general = {
# bars = 2;
# channels = 2;
# mono = "no";
#
# # smoothing = 0;
# # falloff = 0.0;
# };
# input = {
# method = "pipewire";
# source = "alsa_input.pci-0000_0d_00.4.analog-stereo";
# };
# # output = {
# # method = "ncurses";
# # };
# };
settings = {
general = {
# bars = 2;
# channels = 2;
# mono = "no";
# smoothing = 0;
# falloff = 0.0;
};
input = {
method = "pulse";
source = "alsa_output.usb-MOTU_M4_M4MA03F7DV-00.HiFi__Line1__sink.monitor";
};
# output = {
# method = "ncurses";
# };
};
};
programs.fuzzel.enable = true;
programs.btop = {
enable = true;
catppuccin.enable = true;
extraConfig = ''
update_ms = 100
vim_keys = true
@ -264,29 +290,15 @@
programs.fzf = {
enable = true;
catppuccin.enable = true;
};
# systemd.user.services.xwaylandvideobridge = {
# Unit = {
# Description = "Tool to make it easy to stream wayland windows and screens to exisiting applications running under Xwayland";
# };
# Service = {
# Type = "simple";
# ExecStart = lib.getExe pkgs.xwaylandvideobridge;
# Restart = "on-failure";
# };
# Install = {
# WantedBy = ["default.target"];
# };
# };
services = {
gpg-agent = {
enable = true;
pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
enableSshSupport = true;
enableZshIntegration = true;
enableNushellIntegration = true;
};
};

View file

@ -1,32 +1,215 @@
{
x = c: "#${c}";
{lib}: let
hexCharToInt = char: let
charCode = lib.strings.charToInt char;
zeroCode = lib.strings.charToInt "0";
nineCode = lib.strings.charToInt "9";
aCode = lib.strings.charToInt "a";
fCode = lib.strings.charToInt "f";
ACode = lib.strings.charToInt "A";
FCode = lib.strings.charToInt "F";
in
if charCode >= zeroCode && charCode <= nineCode
then charCode - zeroCode
else if charCode >= aCode && charCode <= fCode
then charCode - aCode + 10
else if charCode >= ACode && charCode <= FCode
then charCode - ACode + 10
else builtins.throw "Invalid hex character: ${builtins.toString char}";
colors = {
"base" = "191724";
"surface" = "1f1d2e";
"overlay" = "26233a";
"muted" = "6e6a86";
"subtle" = "6e6a86";
"text" = "e0def4";
"love" = "eb6f92";
"gold" = "f6c177";
"rose" = "ebbcba";
"pine" = "31748f";
"foam" = "9ccfd8";
"iris" = "c4a7e7";
"highlightlow" = "21202e";
"highlightmed" = "403d52";
"highlighthigh" = "524f67";
hexCompToInt = hexComp: let
trimmedStr = lib.strings.removePrefix "0x" hexComp;
chars = lib.strings.stringToCharacters trimmedStr;
op = acc: char: (acc * 16) + (hexCharToInt char);
in
if trimmedStr == ""
then 0
else builtins.foldl' op 0 chars;
intCompToHex = intComp: let
clampedInt = lib.max 0 (lib.min 255 (builtins.floor (intComp + 0.5)));
hexString = lib.trivial.toHexString clampedInt;
in
lib.strings.fixedWidthString 2 "0" hexString;
hexToRgb = hexColor: let
hex = lib.strings.removePrefix "#" hexColor;
in {
r = hexCompToInt (lib.strings.substring 0 2 hex);
g = hexCompToInt (lib.strings.substring 2 2 hex);
b = hexCompToInt (lib.strings.substring 4 2 hex);
};
rgbToHex = rgbColor: "#${intCompToHex rgbColor.r}${intCompToHex rgbColor.g}${intCompToHex rgbColor.b}";
/**
* Linearly interpolates between two hex colors.
*
* @param color1Hex - The starting color hex string (e.g., "#RRGGBB").
* @param color2Hex - The ending color hex string (e.g., "#RRGGBB").
* @param t - The interpolation factor (float, typically 0.0 to 1.0).
* @return The blended color as a hex string "#RRGGBB".
*/
lerpColorFunc = color1Hex: color2Hex: t: let
rgb1 = hexToRgb color1Hex;
rgb2 = hexToRgb color2Hex;
lerpedR = (rgb1.r * (1.0 - t)) + (rgb2.r * t);
lerpedG = (rgb1.g * (1.0 - t)) + (rgb2.g * t);
lerpedB = (rgb1.b * (1.0 - t)) + (rgb2.b * t);
resultRgb = {
r = lerpedR;
g = lerpedG;
b = lerpedB;
};
in
rgbToHex resultRgb;
in {
x = c: "#${c}";
fonts = {
mono = {
normal = "Iosevka Bold";
bold = "Iosevka ExtraBold";
italic = "Iosevka Bold Italic";
bold_italic = "Iosevka ExtraBold Italic";
mono = "Iosevka";
ui = "SF Pro Display";
};
colors = rec {
bg = crust;
fg = text;
primary = red;
rosewater = {
hex = "#f5e0dc";
rgb = "rgb(245, 224, 220)";
hsl = "hsl(10, 56%, 91%)";
};
flamingo = {
hex = "#f2cdcd";
rgb = "rgb(242, 205, 205)";
hsl = "hsl(0, 59%, 88%)";
};
pink = {
hex = "#f5c2e7";
rgb = "rgb(245, 194, 231)";
hsl = "hsl(316, 72%, 86%)";
};
mauve = {
hex = "#cba6f7";
rgb = "rgb(203, 166, 247)";
hsl = "hsl(267, 84%, 81%)";
};
red = {
hex = "#f38ba8";
rgb = "rgb(243, 139, 168)";
hsl = "hsl(343, 81%, 75%)";
};
maroon = {
hex = "#eba0ac";
rgb = "rgb(235, 160, 172)";
hsl = "hsl(350, 65%, 77%)";
};
peach = {
hex = "#fab387";
rgb = "rgb(250, 179, 135)";
hsl = "hsl(25, 92%, 75%)";
};
yellow = {
hex = "#f9e2af";
rgb = "rgb(249, 226, 175)";
hsl = "hsl(41, 86%, 83%)";
};
green = {
hex = "#a6e3a1";
rgb = "rgb(166, 227, 161)";
hsl = "hsl(115, 54%, 76%)";
};
teal = {
hex = "#94e2d5";
rgb = "rgb(148, 226, 213)";
hsl = "hsl(170, 57%, 73%)";
};
sky = {
hex = "#89dceb";
rgb = "rgb(137, 220, 235)";
hsl = "hsl(190, 71%, 73%)";
};
sapphire = {
hex = "#74c7ec";
rgb = "rgb(116, 199, 236)";
hsl = "hsl(200, 77%, 69%)";
};
blue = {
hex = "#89b4fa";
rgb = "rgb(137, 180, 250)";
hsl = "hsl(217, 91%, 76%)";
};
lavender = {
hex = "#b4befe";
rgb = "rgb(180, 190, 254)";
hsl = "hsl(232, 97%, 85%)";
};
text = {
hex = "#cdd6f4";
rgb = "rgb(205, 214, 244)";
hsl = "hsl(226, 64%, 88%)";
};
subtext1 = {
hex = "#bac2de";
rgb = "rgb(186, 194, 222)";
hsl = "hsl(227, 36%, 80%)";
};
subtext0 = {
hex = "#a6adc8";
rgb = "rgb(166, 173, 200)";
hsl = "hsl(228, 26%, 72%)";
};
overlay2 = {
hex = "#9399b2";
rgb = "rgb(147, 153, 178)";
hsl = "hsl(228, 19%, 64%)";
};
overlay1 = {
hex = "#7f849c";
rgb = "rgb(127, 132, 156)";
hsl = "hsl(230, 15%, 55%)";
};
overlay0 = {
hex = "#6c7086";
rgb = "rgb(108, 112, 134)";
hsl = "hsl(232, 11%, 47%)";
};
surface2 = {
hex = "#585b70";
rgb = "rgb(88, 91, 112)";
hsl = "hsl(233, 12%, 39%)";
};
surface1 = {
hex = "#45475a";
rgb = "rgb(69, 71, 90)";
hsl = "hsl(234, 13%, 31%)";
};
surface0 = {
hex = "#313244";
rgb = "rgb(49, 50, 68)";
hsl = "hsl(237, 16%, 23%)";
};
base = {
hex = "#1e1e2e";
rgb = "rgb(30, 30, 46)";
hsl = "hsl(240, 21%, 15%)";
};
mantle = {
hex = "#181825";
rgb = "rgb(24, 24, 37)";
hsl = "hsl(240, 21%, 12%)";
};
crust = {
hex = "#11111b";
rgb = "rgb(17, 17, 27)";
hsl = "hsl(240, 23%, 9%)";
};
};
wallpaper = ./favs-98.png;
wallpaper = ./svema_26_big.jpg;
lerpColor = lerpColorFunc;
}

BIN
lib/theme/svema_26_big.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

BIN
lib/theme/wall4p.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

BIN
lib/theme/wallp.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

View file

@ -48,7 +48,43 @@ in {
programs.ags = {
enable = true;
configDir = ./cfg;
# Generate _colors.scss with our theme colors
configDir = pkgs.runCommand "ags-config" {} ''
cp -r ${./cfg} $out
chmod -R +w $out
cat > $out/scss/_colors.scss << EOF
/* Generated from lib/theme/default.nix */
$rosewater: ${colors.rosewater.hex};
$flamingo: ${colors.flamingo.hex};
$pink: ${colors.pink.hex};
$mauve: ${colors.mauve.hex};
$red: ${colors.red.hex};
$maroon: ${colors.maroon.hex};
$peach: ${colors.peach.hex};
$yellow: ${colors.yellow.hex};
$green: ${colors.green.hex};
$teal: ${colors.teal.hex};
$sky: ${colors.sky.hex};
$sapphire: ${colors.sapphire.hex};
$blue: ${colors.blue.hex};
$lavender: ${colors.lavender.hex};
$text: ${colors.text.hex};
$subtext1: ${colors.subtext1.hex};
$subtext0: ${colors.subtext0.hex};
$overlay2: ${colors.overlay2.hex};
$overlay1: ${colors.overlay1.hex};
$overlay0: ${colors.overlay0.hex};
$surface2: ${colors.surface2.hex};
$surface1: ${colors.surface1.hex};
$surface0: ${colors.surface0.hex};
$base: ${colors.base.hex};
$mantle: ${colors.mantle.hex};
$crust: ${colors.crust.hex};
/* Default accent color */
$accent: ${colors.sapphire.hex};
EOF
'';
extraPackages = dependencies;
};

View file

@ -14,100 +14,102 @@ in {
enable = mkBoolOpt false "Enable Anyrun";
};
config = mkIf cfg.enable {
programs.anyrun = {
enable = true;
config = {
plugins = [
inputs.anyrun.packages.${pkgs.system}.applications
inputs.anyrun.packages.${pkgs.system}.shell
inputs.anyrun.packages.${pkgs.system}.websearch
inputs.anyrun.packages.${pkgs.system}.rink
inputs.anyrun.packages.${pkgs.system}.stdin
];
x = {fraction = 0.5;};
y = {absolute = 0;};
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = true;
closeOnClick = true;
showResultsImmediately = false;
maxEntries = null;
};
extraCss = ''
*{
all: unset;
color: #cdd6f4;
font-family: "JetBrainsMono Nerd Font";
font-weight: bold;
}
#window{
background-color: transparent;
}
#entry{
background-color: #1e1e2e;
border-radius: 15px;
border: 3px solid #11111b;
font-size: 16px;
margin-top: 10px;
padding: 1px 15px;
}
#match {
margin-bottom: 2px;
margin-top: 2px;
padding: 1px 15px;
}
#match-desc{
color: #bac2de;
font-size: 12px;
font-weight: normal;
}
#match:selected {
background: #313244;
border-radius: 15px;
}
#plugin{
background-color: #1e1e2e;
border-radius: 15px;
border: 3px solid #11111b;
margin-top:10px;
padding: 10px 1px;
}
#plugin > *{
all:unset;
}
'';
extraConfigFiles."applications.ron".text = ''
Config(
desktop_actions: false,
max_entries: 5,
terminal: Some("Kitty"),
)
'';
extraConfigFiles."shell.ron".text = ''
Config(
prefix: ">",
)
'';
extraConfigFiles."websearch.ron".text = ''
Config(
prefix: "",
// Options: Google, Ecosia, Bing, DuckDuckGo, Custom
//
// Custom engines can be defined as such:
// Custom(
// name: "Searx",
// url: "searx.be/?q={}",
// )
//
// NOTE: `{}` is replaced by the search query and `https://` is automatically added in front.
engines: [DuckDuckGo]
)
'';
config =
mkIf cfg.enable {
};
};
# programs.anyrun = {
# enable = true;
# config = {
# plugins = [
# inputs.anyrun.packages.${pkgs.system}.applications
# inputs.anyrun.packages.${pkgs.system}.shell
# inputs.anyrun.packages.${pkgs.system}.websearch
# inputs.anyrun.packages.${pkgs.system}.rink
# inputs.anyrun.packages.${pkgs.system}.stdin
# ];
# x = {fraction = 0.5;};
# y = {absolute = 0;};
# hideIcons = false;
# ignoreExclusiveZones = false;
# layer = "overlay";
# hidePluginInfo = true;
# closeOnClick = true;
# showResultsImmediately = false;
# maxEntries = null;
# };
# extraCss = ''
# *{
# all: unset;
# color: #cdd6f4;
# font-family: "JetBrainsMono Nerd Font";
# font-weight: bold;
# }
# #window{
# background-color: transparent;
# }
# #entry{
# background-color: #1e1e2e;
# border-radius: 15px;
# border: 3px solid #11111b;
# font-size: 16px;
# margin-top: 10px;
# padding: 1px 15px;
# }
# #match {
# margin-bottom: 2px;
# margin-top: 2px;
# padding: 1px 15px;
# }
# #match-desc{
# color: #bac2de;
# font-size: 12px;
# font-weight: normal;
# }
# #match:selected {
# background: #313244;
# border-radius: 15px;
# }
# #plugin{
# background-color: #1e1e2e;
# border-radius: 15px;
# border: 3px solid #11111b;
# margin-top:10px;
# padding: 10px 1px;
# }
# #plugin > *{
# all:unset;
# }
# '';
#
# extraConfigFiles."applications.ron".text = ''
# Config(
# desktop_actions: false,
# max_entries: 5,
# terminal: Some("Kitty"),
# )
# '';
#
# extraConfigFiles."shell.ron".text = ''
# Config(
# prefix: ">",
# )
# '';
#
# extraConfigFiles."websearch.ron".text = ''
# Config(
# prefix: "",
# // Options: Google, Ecosia, Bing, DuckDuckGo, Custom
# //
# // Custom engines can be defined as such:
# // Custom(
# // name: "Searx",
# // url: "searx.be/?q={}",
# // )
# //
# // NOTE: `{}` is replaced by the search query and `https://` is automatically added in front.
# engines: [DuckDuckGo]
# )
# '';
# };
# };
}

View file

@ -1,80 +0,0 @@
{
options,
config,
lib,
inputs,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.helpers.snc;
in {
options.apps.helpers.snc = with types; {
enable = mkBoolOpt false "Enable Sway Notification Center";
};
config = mkIf cfg.enable {
home = {
packages = with pkgs; [swaynotificationcenter];
# Copy the theme file to the correct location
file.".config/swaync/style.css".source = ./theme/ctp.css;
# Create default config file
file.".config/swaync/config.json".text = builtins.toJSON {
"$schema" = "/etc/xdg/swaync/configSchema.json";
"positionX" = "right";
"positionY" = "top";
"layer" = "overlay";
"control-center-margin-top" = 0;
"control-center-margin-bottom" = 0;
"control-center-margin-right" = 0;
"control-center-margin-left" = 0;
"notification-icon-size" = 64;
"notification-body-image-height" = 100;
"notification-body-image-width" = 200;
"timeout" = 10;
"timeout-low" = 5;
"timeout-critical" = 0;
"fit-to-screen" = true;
"control-center-width" = 500;
"notification-window-width" = 500;
"keyboard-shortcuts" = true;
"image-visibility" = "when-available";
"transition-time" = 200;
"hide-on-clear" = false;
"hide-on-action" = true;
"script-fail-notify" = true;
"scripts" = {};
"notification-visibility" = {};
"widgets" = [
"title"
"dnd"
"notifications"
];
};
};
# Add systemd user service
systemd.user.services.swaync = {
Unit = {
Description = "Sway Notification Center";
PartOf = ["graphical-session.target"];
After = ["graphical-session.target"];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.swaynotificationcenter}/bin/swaync";
ExecReload = "${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config";
Restart = "always";
RestartSec = 3;
};
Install = {
WantedBy = ["graphical-session.target"];
};
};
};
}

View file

@ -1,451 +0,0 @@
* {
all: unset;
font-size: 14px;
font-family: "Iosevka";
transition: 200ms;
}
trough highlight {
background: #cdd6f4;
}
scale trough {
margin: 0rem 1rem;
background-color: #313244;
min-height: 8px;
min-width: 70px;
}
slider {
background-color: #89b4fa;
}
.floating-notifications.background .notification-row .notification-background {
box-shadow:
0 0 8px 0 rgba(0, 0, 0, 0.8),
inset 0 0 0 1px #313244;
border-radius: 12.6px;
margin: 18px;
background-color: #1e1e2e;
color: #cdd6f4;
padding: 0;
}
.floating-notifications.background
.notification-row
.notification-background
.notification {
padding: 7px;
border-radius: 12.6px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification.critical {
box-shadow: inset 0 0 7px 0 #f38ba8;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: #cdd6f4;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.time {
color: #a6adc8;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.body {
color: #cdd6f4;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 7px;
color: #cdd6f4;
background-color: #313244;
box-shadow: inset 0 0 0 1px #45475a;
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #313244;
color: #cdd6f4;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.floating-notifications.background
.notification-row
.notification-background
.close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #1e1e2e;
background-color: #f38ba8;
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:hover {
background-color: #eba0ac;
color: #1e1e2e;
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:active {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center {
box-shadow:
0 0 8px 0 rgba(0, 0, 0, 0.8),
inset 0 0 0 1px #313244;
border-radius: 12.6px;
margin: 18px;
background-color: #1e1e2e;
color: #cdd6f4;
padding: 14px;
}
.control-center .widget-title > label {
color: #cdd6f4;
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
color: #cdd6f4;
background-color: #313244;
box-shadow: inset 0 0 0 1px #45475a;
padding: 8px;
}
.control-center .widget-title button:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #585b70;
color: #cdd6f4;
}
.control-center .widget-title button:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #1e1e2e;
}
.control-center .notification-row .notification-background {
border-radius: 7px;
color: #cdd6f4;
background-color: #313244;
box-shadow: inset 0 0 0 1px #45475a;
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center
.notification-row
.notification-background
.notification.critical {
box-shadow: inset 0 0 7px 0 #f38ba8;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: #cdd6f4;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.time {
color: #a6adc8;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.body {
color: #cdd6f4;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 7px;
color: #cdd6f4;
background-color: #11111b;
box-shadow: inset 0 0 0 1px #45475a;
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #313244;
color: #cdd6f4;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #1e1e2e;
background-color: #eba0ac;
}
.close-button {
border-radius: 6.3px;
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center
.notification-row
.notification-background
.close-button:active {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center .notification-row .notification-background:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #7f849c;
color: #cdd6f4;
}
.control-center .notification-row .notification-background:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.notification.critical progress {
background-color: #f38ba8;
}
.notification.low progress,
.notification.normal progress {
background-color: #89b4fa;
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: #313244;
border: 1px solid #45475a;
box-shadow: none;
}
.control-center-dnd:checked {
background: #313244;
}
.control-center-dnd slider {
background: #45475a;
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: #313244;
border: 1px solid #45475a;
box-shadow: none;
}
.widget-dnd > switch:checked {
background: #313244;
}
.widget-dnd > switch slider {
background: #45475a;
border-radius: 8px;
border: 1px solid #6c7086;
}
.widget-mpris .widget-mpris-player {
background: #313244;
padding: 7px;
}
.widget-mpris .widget-mpris-title {
font-size: 1.2rem;
}
.widget-mpris .widget-mpris-subtitle {
font-size: 0.8rem;
}
.widget-menubar > box > .menu-button-bar > button > label {
font-size: 3rem;
padding: 0.5rem 2rem;
}
.widget-menubar > box > .menu-button-bar > :last-child {
color: #f38ba8;
}
.power-buttons button:hover,
.powermode-buttons button:hover,
.screenshot-buttons button:hover {
background: #313244;
}
.control-center .widget-label > label {
color: #cdd6f4;
font-size: 2rem;
}
.widget-buttons-grid {
padding-top: 1rem;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-size: 2.5rem;
}
.widget-volume {
padding-top: 1rem;
}
.widget-volume label {
font-size: 1.5rem;
color: #74c7ec;
}
.widget-volume trough highlight {
background: #74c7ec;
}
.widget-backlight trough highlight {
background: #f9e2af;
}
.widget-backlight label {
font-size: 1.5rem;
color: #f9e2af;
}
.widget-backlight .KB {
padding-bottom: 1rem;
}
.image {
padding-right: 0.5rem;
}

View file

@ -51,12 +51,12 @@ in {
inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
background = "#181825";
prompt = "#1e1e2e";
border = "#313244";
text = "#cdd6f4";
stext = "#45475a";
select = "#1e1e2e";
background = colors.mantle.hex;
prompt = colors.base.hex;
border = colors.surface0.hex;
text = colors.text.hex;
stext = colors.surface1.hex;
select = colors.base.hex;
"background-color" = mkLiteral "transparent";
"text-color" = mkLiteral "@text";
margin = 0;
@ -143,15 +143,42 @@ in {
};
};
# Create the colors.rasi file
# Create the colors.rasi file with our theme colors
xdg.configFile."rofi/colors.rasi".text = ''
* {
background: #181825;
prompt: #1e1e2e;
border: #313244;
text: #cdd6f4;
stext: #45475a;
select: #1e1e2e;
background: ${colors.mantle.hex};
prompt: ${colors.base.hex};
border: ${colors.surface0.hex};
text: ${colors.text.hex};
stext: ${colors.surface1.hex};
select: ${colors.base.hex};
/* Full color palette */
rosewater: ${colors.rosewater.hex};
flamingo: ${colors.flamingo.hex};
pink: ${colors.pink.hex};
mauve: ${colors.mauve.hex};
red: ${colors.red.hex};
maroon: ${colors.maroon.hex};
peach: ${colors.peach.hex};
yellow: ${colors.yellow.hex};
green: ${colors.green.hex};
teal: ${colors.teal.hex};
sky: ${colors.sky.hex};
sapphire: ${colors.sapphire.hex};
blue: ${colors.blue.hex};
lavender: ${colors.lavender.hex};
subtext0: ${colors.subtext0.hex};
subtext1: ${colors.subtext1.hex};
overlay0: ${colors.overlay0.hex};
overlay1: ${colors.overlay1.hex};
overlay2: ${colors.overlay2.hex};
surface0: ${colors.surface0.hex};
surface1: ${colors.surface1.hex};
surface2: ${colors.surface2.hex};
base: ${colors.base.hex};
mantle: ${colors.mantle.hex};
crust: ${colors.crust.hex};
}
'';

View file

@ -0,0 +1,366 @@
{
options,
config,
lib,
inputs,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.helpers.swaync;
in {
options.apps.helpers.swaync = with types; {
enable = mkBoolOpt false "Enable SwayNC";
};
config = mkIf cfg.enable {
services.swaync = {
enable = true;
style = lib.mkForce ''
* {
all: unset;
font-size: 14px;
font-family: "Adwaita Sans", "JetBrains Mono Nerd Font";
transition: 200ms;
}
trough highlight {
background: ${colors.text.hex};
}
scale trough {
margin: 0rem 1rem;
background-color: ${colors.surface0.hex};
min-height: 8px;
min-width: 70px;
}
slider {
background-color: ${colors.blue.hex};
}
.floating-notifications.background .notification-row .notification-background {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px ${colors.surface0.hex};
border-radius: 12.6px;
margin: 18px;
background-color: ${colors.base.hex};
color: ${colors.text.hex};
padding: 0;
}
.floating-notifications.background .notification-row .notification-background .notification {
padding: 7px;
border-radius: 12.6px;
}
.floating-notifications.background .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 ${colors.red.hex};
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .summary {
color: ${colors.text.hex};
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .time {
color: ${colors.subtext0.hex};
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .body {
color: ${colors.text.hex};
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: ${colors.text.hex};
background-color: ${colors.surface0.hex};
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.surface0.hex};
color: ${colors.text.hex};
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.sky.hex};
color: ${colors.text.hex};
}
.floating-notifications.background .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: ${colors.base.hex};
background-color: ${colors.red.hex};
}
.floating-notifications.background .notification-row .notification-background .close-button:hover {
background-color: ${colors.maroon.hex};
color: ${colors.base.hex};
}
.floating-notifications.background .notification-row .notification-background .close-button:active {
background-color: ${colors.red.hex};
color: ${colors.base.hex};
}
.control-center {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px ${colors.surface0.hex};
border-radius: 12.6px;
margin: 18px;
background-color: ${colors.base.hex};
color: ${colors.text.hex};
padding: 14px;
}
.control-center .widget-title > label {
color: ${colors.text.hex};
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
color: ${colors.text.hex};
background-color: ${colors.surface0.hex};
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
padding: 8px;
}
.control-center .widget-title button:hover {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.surface2.hex};
color: ${colors.text.hex};
}
.control-center .widget-title button:active {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.sky.hex};
color: ${colors.base.hex};
}
.control-center .notification-row .notification-background {
border-radius: 7px;
color: ${colors.text.hex};
background-color: ${colors.surface0.hex};
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 ${colors.red.hex};
}
.control-center .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.control-center .notification-row .notification-background .notification .notification-content .summary {
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background .notification .notification-content .time {
color: ${colors.subtext0.hex};
}
.control-center .notification-row .notification-background .notification .notification-content .body {
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: ${colors.text.hex};
background-color: ${colors.crust.hex};
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
margin: 7px;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.surface0.hex};
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.sky.hex};
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: ${colors.base.hex};
background-color: ${colors.maroon.hex};
}
.close-button {
border-radius: 6.3px;
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: ${colors.red.hex};
color: ${colors.base.hex};
}
.control-center .notification-row .notification-background .close-button:active {
background-color: ${colors.red.hex};
color: ${colors.base.hex};
}
.control-center .notification-row .notification-background:hover {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.overlay1.hex};
color: ${colors.text.hex};
}
.control-center .notification-row .notification-background:active {
box-shadow: inset 0 0 0 1px ${colors.surface1.hex};
background-color: ${colors.sky.hex};
color: ${colors.text.hex};
}
.notification.critical progress {
background-color: ${colors.red.hex};
}
.notification.low progress,
.notification.normal progress {
background-color: ${colors.blue.hex};
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: ${colors.surface0.hex};
border: 1px solid ${colors.surface1.hex};
box-shadow: none;
}
.control-center-dnd:checked {
background: ${colors.surface0.hex};
}
.control-center-dnd slider {
background: ${colors.surface1.hex};
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: ${colors.surface0.hex};
border: 1px solid ${colors.surface1.hex};
box-shadow: none;
}
.widget-dnd > switch:checked {
background: ${colors.surface0.hex};
}
.widget-dnd > switch slider {
background: ${colors.surface1.hex};
border-radius: 8px;
border: 1px solid ${colors.overlay0.hex};
}
.widget-mpris .widget-mpris-player .widget-mpd {
background: ${colors.surface0.hex};
padding: 7px;
}
.widget-mpris .widget-mpris-title .widget-mpd .widget-mpd-title {
font-size: 1.2rem;
}
.widget-mpris .widget-mpris-subtitle .widget-mpd .widget-mpd-subtitle {
font-size: 0.8rem;
}
.widget-menubar > box > .menu-button-bar > button > label {
font-size: 3rem;
padding: 0.5rem 2rem;
}
.widget-menubar > box > .menu-button-bar > :last-child {
color: ${colors.red.hex};
}
.power-buttons button:hover,
.powermode-buttons button:hover,
.screenshot-buttons button:hover {
background: ${colors.surface0.hex};
}
.control-center .widget-label > label {
color: ${colors.text.hex};
font-size: 2rem;
}
.widget-buttons-grid {
padding-top: 1rem;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-size: 2.5rem;
}
.widget-volume {
padding-top: 1rem;
}
.widget-volume label {
font-size: 1.5rem;
color: ${colors.sky.hex};
}
.widget-volume trough highlight {
background: ${colors.sky.hex};
}
.widget-backlight trough highlight {
background: ${colors.yellow.hex};
}
.widget-backlight label {
font-size: 1.5rem;
color: ${colors.yellow.hex};
}
.widget-backlight .KB {
padding-bottom: 1rem;
}
.image {
padding-right: 0.5rem;
}
'';
};
};
}

View file

@ -0,0 +1,611 @@
{
config,
lib,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.helpers.walker;
in {
options.apps.helpers.walker = with types; {
enable = mkBoolOpt false "Enable Walker";
};
config = mkIf cfg.enable {
programs.walker = {
enable = true;
runAsService = true;
theme = {
layout = {
ui = {
anchors = {
bottom = true;
left = true;
right = true;
top = true;
};
window = {
h_align = "fill";
v_align = "fill";
box = {
h_align = "center";
width = 450;
bar = {
orientation = "horizontal";
position = "end";
entry = {
h_align = "fill";
h_expand = true;
icon = {
h_align = "center";
h_expand = true;
pixel_size = 24;
theme = "";
};
};
};
margins = {
top = 450;
};
ai_scroll = {
name = "aiScroll";
h_align = "fill";
v_align = "fill";
max_height = 300;
min_width = 400;
height = 300;
width = 400;
margins = {
top = 8;
};
list = {
name = "aiList";
orientation = "vertical";
width = 400;
spacing = 10;
item = {
name = "aiItem";
h_align = "fill";
v_align = "fill";
x_align = 0;
y_align = 0;
wrap = true;
};
};
};
scroll = {
list = {
marker_color = "#1BFFE1";
max_height = 300;
max_width = 400;
min_width = 400;
width = 400;
item = {
activation_label = {
h_align = "fill";
v_align = "fill";
width = 20;
x_align = 0.5;
y_align = 0.5;
};
icon = {
pixel_size = 26;
theme = "";
};
};
margins = {
top = 8;
};
};
};
search = {
prompt = {
name = "prompt";
icon = "edit-find";
theme = "";
pixel_size = 18;
h_align = "center";
v_align = "center";
};
clear = {
name = "clear";
icon = "edit-clear";
theme = "";
pixel_size = 18;
h_align = "center";
v_align = "center";
};
input = {
h_align = "fill";
h_expand = true;
icons = true;
};
spinner = {
hide = true;
};
};
};
};
};
};
style = ''
@define-color foreground ${colors.fg.hex}; /* text */
@define-color background ${colors.bg.hex}; /* base */
@define-color cursor ${colors.primary.hex}; /* rosewater */
@define-color color0 ${colors.surface0.hex}; /* surface0 */
@define-color color1 ${colors.red.hex}; /* red */
@define-color color2 ${colors.green.hex}; /* green */
@define-color color3 ${colors.yellow.hex}; /* yellow */
@define-color color4 ${colors.blue.hex}; /* blue */
@define-color color5 ${colors.pink.hex}; /* pink */
@define-color color6 ${colors.teal.hex}; /* teal */
@define-color color7 ${colors.subtext1.hex}; /* subtext1 */
@define-color color8 ${colors.surface1.hex}; /* surface1 */
@define-color color9 ${colors.red.hex}; /* red */
@define-color color10 ${colors.green.hex}; /* green */
@define-color color11 ${colors.yellow.hex}; /* yellow */
@define-color color12 ${colors.blue.hex}; /* blue */
@define-color color13 ${colors.pink.hex}; /* pink */
@define-color color14 ${colors.teal.hex}; /* teal */
@define-color color15 ${colors.subtext0.hex}; /* subtext0 */
#window,
#box,
#aiScroll,
#aiList,
#search,
#password,
#input,
#prompt,
#clear,
#typeahead,
#list,
child,
scrollbar,
slider,
#item,
#text,
#label,
#bar,
#sub,
#activationlabel {
all: unset;
}
#cfgerr {
background: rgba(255, 0, 0, 0.4);
margin-top: 20px;
padding: 8px;
font-size: 1.2em;
}
#window {
color: @foreground;
}
#box {
border-radius: 2px;
background: @background;
padding: 32px;
border: 1px solid lighter(@background);
box-shadow:
0 19px 38px rgba(0, 0, 0, 0.3),
0 15px 12px rgba(0, 0, 0, 0.22);
}
#search {
box-shadow:
0 1px 3px rgba(0, 0, 0, 0.1),
0 1px 2px rgba(0, 0, 0, 0.22);
background: lighter(@background);
padding: 8px;
}
#prompt {
margin-left: 4px;
margin-right: 12px;
color: @foreground;
opacity: 0.2;
}
#clear {
color: @foreground;
opacity: 0.8;
}
#password,
#input,
#typeahead {
border-radius: 2px;
}
#input {
background: none;
}
#password {
}
#spinner {
padding: 8px;
}
#typeahead {
color: @foreground;
opacity: 0.8;
}
#input placeholder {
opacity: 0.5;
}
#list {
}
child {
padding: 8px;
border-radius: 2px;
}
child:selected,
child:hover {
background: alpha(@color1, 0.4);
}
#item {
}
#icon {
margin-right: 8px;
}
#text {
}
#label {
font-weight: 500;
}
#sub {
opacity: 0.5;
font-size: 0.8em;
}
#activationlabel {
}
#bar {
}
.barentry {
}
.activation #activationlabel {
}
.activation #text,
.activation #icon,
.activation #search {
opacity: 0.5;
}
.aiItem {
padding: 10px;
border-radius: 2px;
color: @foreground;
background: @background;
}
.aiItem.user {
padding-left: 0;
padding-right: 0;
}
.aiItem.assistant {
background: lighter(@background);
}
'';
};
config = {
app_launch_prefix = "";
terminal_title_flag = "";
locale = "";
close_when_open = false;
theme = "nixos";
monitor = "";
hotreload_theme = false;
as_window = false;
timeout = 0;
disable_click_to_close = false;
force_keyboard_focus = false;
keys = {
accept_typeahead = ["tab"];
trigger_labels = "lalt";
next = ["down"];
prev = ["up"];
close = ["esc"];
remove_from_history = ["shift backspace"];
resume_query = ["ctrl r"];
toggle_exact_search = ["ctrl m"];
activation_modifiers = {
keep_open = "shift";
alternate = "alt";
};
ai = {
clear_session = ["ctrl x"];
copy_last_response = ["ctrl c"];
resume_session = ["ctrl r"];
run_last_response = ["ctrl e"];
};
};
events = {
on_activate = "";
on_selection = "";
on_exit = "";
on_launch = "";
on_query_change = "";
};
list = {
dynamic_sub = true;
keyboard_scroll_style = "emacs";
max_entries = 50;
show_initial_entries = true;
single_click = true;
visibility_threshold = 20;
placeholder = "No Results";
};
search = {
argument_delimiter = "#";
placeholder = "Search...";
delay = 0;
resume_last_query = false;
};
activation_mode = {
labels = "jkl;asdf";
};
builtins = {
applications = {
weight = 5;
name = "applications";
placeholder = "Applications";
prioritize_new = true;
hide_actions_with_empty_query = true;
context_aware = true;
refresh = true;
show_sub_when_single = true;
show_icon_when_single = true;
show_generic = true;
history = true;
actions = {
enabled = true;
hide_category = false;
hide_without_query = true;
};
};
bookmarks = {
weight = 5;
placeholder = "Bookmarks";
name = "bookmarks";
icon = "bookmark";
switcher_only = true;
entries = [
{
label = "Walker";
url = "https://github.com/abenz1267/walker";
keywords = ["walker" "github"];
}
];
};
xdph_picker = {
hidden = true;
weight = 5;
placeholder = "Screen/Window Picker";
show_sub_when_single = true;
name = "xdphpicker";
switcher_only = true;
};
ai = {
weight = 5;
placeholder = "AI";
name = "ai";
icon = "help-browser";
switcher_only = true;
show_sub_when_single = true;
anthropic = {
prompts = [
{
model = "claude-3-7-sonnet-20250219";
temperature = 1;
max_tokens = 1000;
label = "General Assistant";
prompt = "You are a helpful general assistant. Keep your answers short and precise.";
}
];
};
};
calc = {
require_number = true;
weight = 5;
name = "calc";
icon = "accessories-calculator";
placeholder = "Calculator";
min_chars = 4;
};
windows = {
weight = 5;
icon = "view-restore";
name = "windows";
placeholder = "Windows";
show_icon_when_single = true;
};
clipboard = {
always_put_new_on_top = true;
exec = "wl-copy";
weight = 5;
name = "clipboard";
avoid_line_breaks = true;
placeholder = "Clipboard";
image_height = 300;
max_entries = 10;
switcher_only = true;
};
commands = {
weight = 5;
icon = "utilities-terminal";
switcher_only = true;
name = "commands";
placeholder = "Commands";
};
custom_commands = {
weight = 5;
icon = "utilities-terminal";
name = "custom_commands";
placeholder = "Custom Commands";
};
emojis = {
exec = "wl-copy";
weight = 5;
name = "emojis";
placeholder = "Emojis";
switcher_only = true;
history = true;
typeahead = true;
show_unqualified = false;
};
symbols = {
after_copy = "";
weight = 5;
name = "symbols";
placeholder = "Symbols";
switcher_only = true;
history = true;
typeahead = true;
};
finder = {
use_fd = false;
fd_flags = "--ignore-vcs --type file";
weight = 5;
icon = "file";
name = "finder";
placeholder = "Finder";
switcher_only = true;
ignore_gitignore = true;
refresh = true;
concurrency = 8;
show_icon_when_single = true;
preview_images = false;
};
runner = {
eager_loading = true;
weight = 5;
icon = "utilities-terminal";
name = "runner";
placeholder = "Runner";
typeahead = true;
history = true;
generic_entry = false;
refresh = true;
use_fd = false;
};
ssh = {
weight = 5;
icon = "preferences-system-network";
name = "ssh";
placeholder = "SSH";
switcher_only = true;
history = true;
refresh = true;
};
switcher = {
weight = 5;
name = "switcher";
placeholder = "Switcher";
prefix = "/";
};
websearch = {
keep_selection = true;
weight = 5;
icon = "applications-internet";
name = "websearch";
placeholder = "Websearch";
entries = [
{
name = "searx";
url = "https://search.zoeys.cloud/searx/search?q=%TERM%";
}
];
};
dmenu = {
hidden = true;
weight = 5;
name = "dmenu";
placeholder = "Dmenu";
switcher_only = true;
show_icon_when_single = true;
};
translation = {
delay = 1000;
weight = 5;
name = "translation";
icon = "accessories-dictionary";
placeholder = "Translation";
switcher_only = true;
provider = "googlefree";
};
};
};
};
};
}

View file

@ -0,0 +1,83 @@
#! /bin/bash
# --- Configuration ---
bar="▁▂▃▄▅▆▇█"
# Number of bars Cava should output
num_bars=8
# Max height for ASCII output (should match length of bar string - 1)
ascii_max_range=$((${#bar} - 1))
# Temporary config file path (using PID $$ for uniqueness)
config_file="/tmp/polybar_cava_config_$$"
# --- Argument Handling ---
if [ $# -lt 1 ]; then
# Print error message to stderr
echo "Error: Please provide the PulseAudio source name as an argument." >&2
echo "Usage: $0 <cava_pulse_source_name>" >&2
echo "Example: $0 alsa_output.pci-0000_00_1f.3.analog-stereo.monitor" >&2
echo "You can find source names using: pactl list sources | grep 'Name:'" >&2
exit 1
fi
# Assign the first argument to the pulse_source variable
pulse_source="$1"
# --- Functions ---
# Function to clean up the temporary config file on exit
cleanup() {
rm -f "$config_file"
}
# --- Main Script ---
# Set trap to call cleanup function on script exit (including Ctrl+C)
trap cleanup EXIT
# Build the sed dictionary string to replace numbers with bar characters
dict="s/;//g;"
i=0
# Use modern arithmetic expansion and loop condition
while ((i < ${#bar})); do
# Safely append to the dictionary string
dict="${dict}s/$i/${bar:$i:1}/g;"
# Use modern arithmetic increment
((i++))
done
# Create the Cava configuration file using printf for safety
# Note: Using the pulse_source variable passed as an argument
printf '%s\n' "
[general]
bars = $num_bars
sleep_timer = 10
[input]
method = pulse
source = \"$pulse_source\"
[output]
method = raw
raw_target = /dev/stdout
data_format = ascii
channels = mono
mono_option = average
ascii_max_range = $ascii_max_range
[smoothing]
noise_reduction = 25
" >"$config_file" || {
echo "Error: Failed to write Cava config." >&2
exit 1
} # Exit if write fails
# Run Cava with the generated config and process its output
# Use 'exec cava' if you don't need the script to do anything after cava finishes
cava -p "$config_file" | while IFS= read -r line; do
# Translate numbers to bars using sed
echo "$line" | sed "$dict"
done
# The trap will handle cleanup automatically here
# If 'exec cava' was used above, this part is unreachable
exit 0

View file

@ -15,479 +15,62 @@ in {
};
config = mkIf cfg.enable {
services.swaync = {
enable = true;
style = lib.mkForce ''
* {
all: unset;
font-size: 14px;
font-family: "Adwaita Sans", "JetBrains Mono Nerd Font";
transition: 200ms;
}
trough highlight {
background: #cad3f5;
}
scale trough {
margin: 0rem 1rem;
background-color: #363a4f;
min-height: 8px;
min-width: 70px;
}
slider {
background-color: #8aadf4;
}
.floating-notifications.background .notification-row .notification-background {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #363a4f;
border-radius: 12.6px;
margin: 18px;
background-color: #24273a;
color: #cad3f5;
padding: 0;
}
.floating-notifications.background .notification-row .notification-background .notification {
padding: 7px;
border-radius: 12.6px;
}
.floating-notifications.background .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 #ed8796;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .summary {
color: #cad3f5;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .time {
color: #a5adcb;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .body {
color: #cad3f5;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: #cad3f5;
background-color: #363a4f;
box-shadow: inset 0 0 0 1px #494d64;
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #363a4f;
color: #cad3f5;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #7dc4e4;
color: #cad3f5;
}
.floating-notifications.background .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #24273a;
background-color: #ed8796;
}
.floating-notifications.background .notification-row .notification-background .close-button:hover {
background-color: #ee99a0;
color: #24273a;
}
.floating-notifications.background .notification-row .notification-background .close-button:active {
background-color: #ed8796;
color: #24273a;
}
.control-center {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #363a4f;
border-radius: 12.6px;
margin: 18px;
background-color: #24273a;
color: #cad3f5;
padding: 14px;
}
.control-center .widget-title > label {
color: #cad3f5;
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
color: #cad3f5;
background-color: #363a4f;
box-shadow: inset 0 0 0 1px #494d64;
padding: 8px;
}
.control-center .widget-title button:hover {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #5b6078;
color: #cad3f5;
}
.control-center .widget-title button:active {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #7dc4e4;
color: #24273a;
}
.control-center .notification-row .notification-background {
border-radius: 7px;
color: #cad3f5;
background-color: #363a4f;
box-shadow: inset 0 0 0 1px #494d64;
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 #ed8796;
}
.control-center .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.control-center .notification-row .notification-background .notification .notification-content .summary {
color: #cad3f5;
}
.control-center .notification-row .notification-background .notification .notification-content .time {
color: #a5adcb;
}
.control-center .notification-row .notification-background .notification .notification-content .body {
color: #cad3f5;
}
.control-center .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: #cad3f5;
background-color: #181926;
box-shadow: inset 0 0 0 1px #494d64;
margin: 7px;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #363a4f;
color: #cad3f5;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #7dc4e4;
color: #cad3f5;
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #24273a;
background-color: #ee99a0;
}
.close-button {
border-radius: 6.3px;
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: #ed8796;
color: #24273a;
}
.control-center .notification-row .notification-background .close-button:active {
background-color: #ed8796;
color: #24273a;
}
.control-center .notification-row .notification-background:hover {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #8087a2;
color: #cad3f5;
}
.control-center .notification-row .notification-background:active {
box-shadow: inset 0 0 0 1px #494d64;
background-color: #7dc4e4;
color: #cad3f5;
}
.notification.critical progress {
background-color: #ed8796;
}
.notification.low progress,
.notification.normal progress {
background-color: #8aadf4;
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: #363a4f;
border: 1px solid #494d64;
box-shadow: none;
}
.control-center-dnd:checked {
background: #363a4f;
}
.control-center-dnd slider {
background: #494d64;
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: #363a4f;
border: 1px solid #494d64;
box-shadow: none;
}
.widget-dnd > switch:checked {
background: #363a4f;
}
.widget-dnd > switch slider {
background: #494d64;
border-radius: 8px;
border: 1px solid #6e738d;
}
.widget-mpris .widget-mpris-player .widget-mpd {
background: #363a4f;
padding: 7px;
}
.widget-mpris .widget-mpris-title .widget-mpd .widget-mpd-title {
font-size: 1.2rem;
}
.widget-mpris .widget-mpris-subtitle .widget-mpd .widget-mpd-subtitle {
font-size: 0.8rem;
}
.widget-menubar > box > .menu-button-bar > button > label {
font-size: 3rem;
padding: 0.5rem 2rem;
}
.widget-menubar > box > .menu-button-bar > :last-child {
color: #ed8796;
}
.power-buttons button:hover,
.powermode-buttons button:hover,
.screenshot-buttons button:hover {
background: #363a4f;
}
.control-center .widget-label > label {
color: #cad3f5;
font-size: 2rem;
}
.widget-buttons-grid {
padding-top: 1rem;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-size: 2.5rem;
}
.widget-volume {
padding-top: 1rem;
}
.widget-volume label {
font-size: 1.5rem;
color: #7dc4e4;
}
.widget-volume trough highlight {
background: #7dc4e4;
}
.widget-backlight trough highlight {
background: #eed49f;
}
.widget-backlight label {
font-size: 1.5rem;
color: #eed49f;
}
.widget-backlight .KB {
padding-bottom: 1rem;
}
.image {
padding-right: 0.5rem;
}
'';
};
programs.waybar = {
enable = true;
systemd.enable = true;
systemd.target = "graphical-session.target";
style = ''
* {
min-height: 0;
min-width: 0;
font-family: Cantarell;
font-size: 16px;
font-weight: 600;
}
/* Custom colors from lib/theme/default.nix */
@define-color rosewater ${colors.rosewater.hex};
@define-color flamingo ${colors.flamingo.hex};
@define-color pink ${colors.pink.hex};
@define-color mauve ${colors.mauve.hex};
@define-color red ${colors.red.hex};
@define-color maroon ${colors.maroon.hex};
@define-color peach ${colors.peach.hex};
@define-color yellow ${colors.yellow.hex};
@define-color green ${colors.green.hex};
@define-color teal ${colors.teal.hex};
@define-color sky ${colors.sky.hex};
@define-color sapphire ${colors.sapphire.hex};
@define-color blue ${colors.blue.hex};
@define-color lavender ${colors.lavender.hex};
@define-color text ${colors.text.hex};
@define-color subtext1 ${colors.subtext1.hex};
@define-color subtext0 ${colors.subtext0.hex};
@define-color overlay2 ${colors.overlay2.hex};
@define-color overlay1 ${colors.overlay1.hex};
@define-color overlay0 ${colors.overlay0.hex};
@define-color surface2 ${colors.surface2.hex};
@define-color surface1 ${colors.surface1.hex};
@define-color surface0 ${colors.surface0.hex};
@define-color base ${colors.base.hex};
@define-color mantle ${colors.mantle.hex};
@define-color crust ${colors.crust.hex};
window#waybar {
transition-property: background-color;
transition-duration: 0.5s;
/* background-color: #1e1e2e; */
/* background-color: #181825; */
background-color: #11111b;
/* background-color: rgba(24, 24, 37, 0.6); */
}
#workspaces button {
padding: 0.3rem 0.6rem;
margin: 0.4rem 0.25rem;
border-radius: 6px;
/* background-color: #181825; */
background-color: #1e1e2e;
color: #cdd6f4;
}
#workspaces button:hover {
color: #1e1e2e;
background-color: #cdd6f4;
}
#workspaces button.active {
background-color: #1e1e2e;
color: #89b4fa;
}
#workspaces button.urgent {
background-color: #1e1e2e;
color: #f38ba8;
}
#clock,
#pulseaudio,
#custom-logo,
#custom-power,
#custom-spotify,
#custom-notification,
#cpu,
#tray,
#memory,
#window,
#mpd
#mpris {
padding: 0.3rem 0.6rem;
margin: 0.4rem 0.25rem;
border-radius: 6px;
/* background-color: #181825; */
background-color: #1e1e2e;
}
#mpris.playing {
color: #a6e3a1;
}
#mpris.paused {
color: #9399b2;
}
#custom-sep {
padding: 0px;
color: #585b70;
}
window#waybar.empty #window {
background-color: transparent;
}
#cpu {
color: #94e2d5;
}
#memory {
color: #cba6f7;
}
#clock {
color: #74c7ec;
}
#clock.simpleclock {
color: #89b4fa;
}
#window {
color: #cdd6f4;
}
#pulseaudio {
color: #b4befe;
}
#pulseaudio.muted {
color: #a6adc8;
}
#custom-logo {
color: #89b4fa;
}
#custom-power {
color: #f38ba8;
}
tooltip {
background-color: #181825;
border: 2px solid #89b4fa;
}
${builtins.readFile ./mullvad-style.css}
${builtins.readFile ./style.css}
'';
settings = let
# Import the Mullvad scripts
mullvad-status = import ./mullvad-status.nix {inherit pkgs;};
mullvad-server-list = import ./mullvad-server-list.nix {inherit pkgs;};
mullvad-menu = import ./mullvad-menu.nix {inherit pkgs;};
settings = {
# Script to toggle Mullvad connection
mullvad-toggle = pkgs.writeShellScriptBin "mullvad-toggle" ''
set -euo pipefail
if mullvad status | grep -q "Connected"; then
mullvad disconnect
else
mullvad connect
fi
# Optional: trigger a Waybar refresh if needed, though interval should handle it
# pkill -SIGRTMIN+8 waybar
'';
cava = pkgs.writeShellScriptBin "cava" "${builtins.readFile ./bar.sh}";
in {
mainBar = {
layer = "bottom";
position = "top";
@ -497,12 +80,18 @@ in {
"gtk-layer-shell" = true;
passthrough = false;
"fixed-center" = true;
"modules-left" = ["hyprland/workspaces" "hyprland/window"];
"modules-left" = ["hyprland/workspaces" "hyprland/window" "niri/workspaces" "niri/window" "network#speed" "custom/cava-system" "custom/cava-tt"];
"modules-center" = ["mpris"];
"modules-right" = [
"cpu"
"memory"
"temperature"
"custom/gpu-usage"
"custom/gpu-mem"
"custom/gpu-temp"
"pulseaudio"
"custom/mullvad"
"custom/weather"
"clock"
"clock#simpleclock"
"tray"
@ -511,7 +100,7 @@ in {
];
"custom/spotify" = {
format = " {}";
format = "{}";
"return-type" = "json";
"on-click" = "playerctl -p spotify play-pause";
"on-click-right" = "spotifatius toggle-liked";
@ -519,6 +108,16 @@ in {
exec = "spotifatius monitor";
};
"custom/mullvad" = {
format = "{}";
return-type = "json";
interval = 1;
exec = "${mullvad-status}/bin/mullvad-status-waybar";
"on-click" = "${mullvad-toggle}/bin/mullvad-toggle";
"on-click-right" = "${mullvad-menu}/bin/mullvad-menu";
tooltip = true;
};
mpd = {
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {title}";
"format-disconnected" = "Disconnected ";
@ -558,6 +157,60 @@ in {
};
};
"custom/cava-system" = {
format = "{}";
exec = "${cava}/bin/cava alsa_output.usb-MOTU_M4_M4MA03F7DV-00.HiFi__Line1__sink.monitor";
};
"custom/cava-tt" = {
format = "{}";
exec = "${cava}/bin/cava cava-line-in.monitor";
};
"custom/weather" = {
"format" = "{}°F";
interval = 3600;
exec = "${lib.getExe pkgs.wttrbar} --location 'Holland,MI' --fahrenheit --mph";
return-type = "json";
};
"custom/gpu-temp" = {
interval = 10;
exec = "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits";
format = "{}°C ";
tooltip = false;
};
"custom/gpu-mem" = {
interval = 10;
exec = "nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits | awk '{printf \"%.1f\", $1/1024}'";
format = "{}Gi";
tooltip = false;
};
"custom/gpu-usage" = {
interval = 2;
exec = "nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits";
format = "{}%";
tooltip = false;
};
"network#speed" = {
interval = 1;
format = "{ifname}%%";
format-wifi = " {bandwidthDownBytes} {bandwidthUpBytes}";
format-ethernet = " {bandwidthDownBytes} {bandwidthUpBytes}";
format-disconnected = "󰌙";
tooltip-format = "{ipaddr}";
format-linked = "󰈁 {ifname} (No IP)";
tooltip-format-wifi = "{essid} {icon} {signalStrength}%";
tooltip-format-ethernet = "{ifname} 󰌘";
tooltip-format-disconnected = "󰌙 Disconnected";
max-length = 22;
min-length = 20;
format-icons = ["󰤯" "󰤟" "󰤢" "󰤥" "󰤨"];
};
"hyprland/workspaces" = {
"on-click" = "activate";
format = "{id}";
@ -572,16 +225,24 @@ in {
tray = {
"show-passive-items" = true;
spacing = 10;
spacing = 2;
};
"clock#simpleclock" = {
tooltip = false;
format = " {:%H:%M}";
format = "{:%H:%M}";
};
"temperature" = {
hwmon-path-abs = "/sys/devices/platform/asus-ec-sensors/hwmon/hwmon3";
input_filename = "temp2_input";
critical-threshold = 70;
format = "{temperatureC}°C ";
format-critical = "󰸁 {temperatureC}°C";
};
clock = {
format = " {:L%a %d %b}";
format = "{:L%a %d %b}";
calendar = {
format = {
days = "<span weight='normal'>{}</span>";
@ -598,21 +259,22 @@ in {
};
cpu = {
format = " {usage}%";
format = "{usage}%";
tooltip = true;
interval = 1;
};
memory = {
format = " {used:0.1f}Gi";
interval = 1;
format = "{used:0.1f}Gi";
};
pulseaudio = {
format = "{icon} {volume}%";
"format-muted" = " muted";
format = "{icon} {volume}%";
"format-muted" = "";
"format-icons" = {
headphone = "";
default = [" " " " " "];
default = ["" ""];
};
"on-click" = "pavucontrol";
};

View file

@ -0,0 +1,7 @@
{pkgs}: let
script = ./mullvad-menu.sh;
in
pkgs.writeScriptBin "mullvad-menu" ''
#!${pkgs.runtimeShell}
exec ${pkgs.bash}/bin/bash ${script}
''

View file

@ -0,0 +1,126 @@
#!/usr/bin/env bash
set -euo pipefail
# Helper: pick a relay (country [city] [hostname]) via fuzzel + jq
pick_relay() {
local api="$API_RESPONSE"
local country_list country_sel country_code
local city_list city_sel city_code loc_key
local host_list host_sel
# Build "Country Name (cc)" array
mapfile -t country_list < <(
jq -r '
.locations
| to_entries[]
| "\(.value.country) (\(.key|split("-")[0]))"
' <<<"$api" | sort -u
)
country_sel=$(printf '%s\n' "${country_list[@]}" |
fuzzel --dmenu --prompt="Select country:")
[[ -z "$country_sel" ]] && return 1
country_code=$(grep -oP '(?<=\()[^)]+(?=\))' <<<"$country_sel")
# Build "City Name (ccc)" array for that country
mapfile -t city_list < <(
jq -r --arg cc "$country_code" '
.locations
| to_entries[]
| select(.key|startswith("\($cc)-"))
| "\(.value.city) (\(.key|split("-")[1]))"
' <<<"$api" | sort -u
)
if ((${#city_list[@]})); then
city_sel=$(printf '%s\n' "${city_list[@]}" |
fuzzel --dmenu --prompt="Select city in $country_sel:")
[[ -z "$city_sel" ]] && return 1
city_code=$(grep -oP '(?<=\()[^)]+(?=\))' <<<"$city_sel")
loc_key="$country_code-$city_code"
fi
# Optional hostname picker
mapfile -t host_list < <(
jq -r --arg loc "${loc_key:-}" '
( .openvpn.relays[]
, .wireguard.relays[]
, .bridge.relays[] )
| select(.location == $loc)
| .hostname
' <<<"$api" | sort -u
)
if ((${#host_list[@]})); then
host_sel=$(printf '%s\n' "${host_list[@]}" |
fuzzel --dmenu --prompt="Select hostname (optional):")
# if they pick a hostname, we switch to pure-hostname mode
[[ -n "$host_sel" ]] && {
RELAY_CMD_ARGS=("$host_sel")
return 0
}
fi
# Assemble country [city]
RELAY_CMD_ARGS=("$country_code")
[[ -n "${city_code-}" ]] && RELAY_CMD_ARGS+=("$city_code")
return 0
}
# Ensure mullvad CLI exists
if ! command -v mullvad >/dev/null 2>&1; then
echo "Mullvad CLI not found" | fuzzel --dmenu
exit 1
fi
# Fetch status and API once
STATUS_RAW=$(mullvad status 2>/dev/null || echo "Disconnected")
API_RESPONSE=$(curl -s "https://api.mullvad.net/app/v1/relays")
# Determine state and current relay (if any)
if [[ $STATUS_RAW == Connecting* ]]; then
STATE=Connecting
elif grep -q "^Connected" <<<"$STATUS_RAW"; then
STATE=Connected
else
STATE=Disconnected
fi
# Try to parse the current relay hostname for Connected/Connecting
if [[ $STATE != Disconnected ]]; then
CURRENT_RELAY=$(grep -E 'Relay:' <<<"$STATUS_RAW" |
sed -E 's/.*Relay:[[:space:]]*//')
fi
# Main menu
case $STATE in
Connected | Connecting)
# Offer Disconnect or Change Location
CHOICE=$(printf "Disconnect\nChange Location" |
fuzzel --dmenu --prompt="$STATE ${CURRENT_RELAY:-}")
case "$CHOICE" in
Disconnect)
mullvad disconnect
;;
"Change Location")
if pick_relay; then
mullvad relay set location "${RELAY_CMD_ARGS[@]}"
fi
;;
esac
;;
Disconnected)
# Offer Connect or Connect to Location
CHOICE=$(printf "Connect\nConnect to Location" |
fuzzel --dmenu --prompt="Disconnected")
case "$CHOICE" in
Connect)
mullvad connect
;;
"Connect to Location")
if pick_relay; then
mullvad relay set location "${RELAY_CMD_ARGS[@]}"
mullvad connect
fi
;;
esac
;;
esac

View file

@ -0,0 +1,57 @@
{pkgs}:
pkgs.writeShellScriptBin "mullvad-server-list" ''
#!${pkgs.runtimeShell}
set -euo pipefail
# Check if mullvad is installed
if ! command -v mullvad >/dev/null 2>&1; then
echo "Mullvad CLI not found" | fuzzel --dmenu
exit 1
fi
# Get the list of countries
COUNTRIES=$(mullvad relay list | grep -E "^[[:space:]]+[[:alpha:]]" | sed 's/^[[:space:]]*//g')
# If no argument is provided, show the list of countries
if [ $# -eq 0 ]; then
echo "$COUNTRIES" | sort | fuzzel --dmenu --prompt="Select country: "
exit 0
fi
COUNTRY="$1"
# If country is provided but no city, show cities for that country
if [ $# -eq 1 ]; then
CITIES=$(mullvad relay list | grep -A 100 "^[[:space:]]*$COUNTRY" | grep -E "^[[:space:]]{4}[[:alpha:]]" | sed 's/^[[:space:]]*//g' | head -n $(mullvad relay list | grep -A 100 "^[[:space:]]*$COUNTRY" | grep -E "^[[:space:]]{4}[[:alpha:]]" | wc -l))
if [ -z "$CITIES" ]; then
# If no cities found, show servers for this country
SERVERS=$(mullvad relay list | grep -A 100 "^[[:space:]]*$COUNTRY" | grep -E "^[[:space:]]{8}[a-z0-9]+" | sed 's/^[[:space:]]*//g' | cut -d' ' -f1-2)
echo "$SERVERS" | fuzzel --dmenu --prompt="Select server in $COUNTRY: "
else
echo "$CITIES" | fuzzel --dmenu --prompt="Select city in $COUNTRY: "
fi
exit 0
fi
# If both country and city are provided, show servers in that city
CITY="$2"
SERVERS=$(mullvad relay list | grep -A 100 "^[[:space:]]*$COUNTRY" | grep -A 100 "^[[:space:]]*$CITY" | grep -E "^[[:space:]]{8}[a-z0-9]+" | sed 's/^[[:space:]]*//g')
# Extract server information and load (where available)
SERVER_INFO=""
while read -r server; do
# Get server details
SERVER_NAME=$(echo "$server" | awk '{print $1}')
SERVER_TYPE=$(echo "$server" | awk '{print $2}')
# Get server load if available (using 'mullvad relay list --location all')
LOAD_INFO=$(mullvad relay list --location all | grep "$SERVER_NAME" | grep -o '[0-9]\+%' || echo "N/A")
# Add server with load info to the list
SERVER_INFO="${SERVER_INFO}${SERVER_NAME} (${SERVER_TYPE}) - Load: ${LOAD_INFO}"$'\n'
done <<< "$SERVERS"
# Display the server list with load information
echo "$SERVER_INFO" | grep -v "^$" | fuzzel --dmenu --prompt="Select server in $CITY: "
''

View file

@ -0,0 +1,4 @@
{pkgs}:
pkgs.writeShellScriptBin "mullvad-status-waybar" ''
exec ${pkgs.bash}/bin/bash ${./mullvad-status.sh} | jq -c
''

View file

@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -euo pipefail
# Get status (fall back to “Disconnected” on error)
STATUS=$(mullvad status 2>/dev/null || echo "Disconnected")
if echo "$STATUS" | grep -q "^Connected"; then
# Extract relay hostname
SERVER=$(echo "$STATUS" |
sed -n 's/^[[:space:]]*Relay:[[:space:]]*//p' |
sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
# Grab the entire Visible location line (location + IPs)
FULL_LOC=$(echo "$STATUS" |
sed -n 's/^[[:space:]]*Visible location:[[:space:]]*//p')
# Split off the humanreadable location (before first dot)
LOCATION=${FULL_LOC%%.*}
# The part after the first “. ” is the IP info
IPS=${FULL_LOC#*. }
TOOLTIP="Connected via ${SERVER} (${IPS})"
# Emit JSON for Waybar
echo '{"text": "'"${LOCATION}"'"
, "tooltip": "'"${TOOLTIP}"'"
, "class": "connected"
}'
else
echo '{"text": "Disconnected"
, "tooltip": "Mullvad: Disconnected"
, "class": "disconnected"
}'
fi

View file

@ -0,0 +1,14 @@
/* Mullvad specific styles */
#custom-mullvad.connected {
color: @green;
}
#custom-mullvad.disconnected {
color: @red;
}
#custom-mullvad {
margin: 0 8px;
padding: 0 5px;
min-width: 100px;
}

View file

@ -0,0 +1,199 @@
* {
font-family: Iosevka Nerd Font, monospace;
min-height: 14px;
font-size: 14px;
border: none;
border-radius: 6px;
padding: 4px;
margin: 0;
box-shadow: none;
text-shadow: none;
background-color: transparent;
}
window#waybar {
padding: 8px;
background-color: @crust;
}
#custom-cava-system, #custom-cava-tt {
color: @mauve;
border-left: 0px;
border-right: 0px;
padding: 6px;
font-family: 'bargraph';
background: @base;
margin: 0px 2px;
}
#window {
padding: 0px 8px 0px 8px;
background-color: @base;
}
#cpu {
color: @green;
padding: 0px 12px;
background: @base;
margin-left: 1px;
border-radius: 6px 0 0 6px;
}
#memory {
color: @green;
padding: 0px 12px;
background: @base;
margin: 0;
border-radius: 0;
}
#temperature {
color: @green;
padding: 0px 12px;
background: @base;
margin-right: 1px;
border-radius: 0 6px 6px 0;
}
#custom-gpu-temp {
padding: 0px 12px;
margin-right: 2px;
color: @blue;
background: @base;
border-radius: 0 6px 6px 0;
}
#custom-gpu-mem {
padding: 0px 12px;
margin: 0;
color: @blue;
background: @base;
border-radius: 0;
}
#custom-gpu-usage {
padding: 0px 12px;
margin-left: 1px;
color: @blue;
background: @base;
border-radius: 6px 0 0 6px;
}
#tray {
background: @base;
padding: 4px;
}
/* General Styling */
tooltip,
menu,
#workspaces,
#clock,
#pulseaudio,
#backlight,
#bluetooth,
#network,
#battery,
#custom-power,
#custom-notification,
#custom-mullvad,
#custom-weather {
background: @base;
padding: 8px 8px;
margin-left: 1px;
margin-right: 1px;
border-radius: 6px;
}
#custom-mullvad,
#custom-notification {
padding-left: 12px;
padding-right: 18px;
}
#custom-power {
color: @red;
padding-left: 12px;
padding-right: 18px;
}
#workspaces {
background: @base;
margin: 0;
margin-left: 3px;
padding: 0;
font-weight: bold;
font-style: normal;
opacity: 1;
font-size: 16px;
color: @surface0;
border-radius: 6px;
}
#workspaces button {
padding: 0px 5px;
margin: 3px;
border-radius: 6px;
border: none;
transition: all 0.3s ease-in-out;
opacity: 0.4;
}
#workspaces button.active {
color: @base;
background: @mauve;
min-width: 20px;
opacity: 1;
}
#workspaces button:hover {
color: @text;
background: @mantle;
opacity: 1;
animation: none;
}
#clock {
padding: 0 15px;
color: @lavender;
border-radius: 6px;
}
#custom-launcher {
font-size: 18px;
transition: none;
padding: 0px 10px;
margin-right: 2px;
background: @base;
color: @sky;
border-radius: 0 6px 6px 0;
}
#pulseaudio {
padding: 0 8px;
margin-right: 1px;
color: @yellow;
border-radius: 6px 6px;
}
#bluetooth,
#network {
color: @mauve;
border-radius: 6px;
margin: 0 1px;
}
#network.speed {
background: @base;
padding: 0px 6px;
min-width: 10px;
color: @teal;
border-radius: 6px;
}
#network {
min-width: 30px;
padding: 0 7px 0 2px;
border-radius: 6px;
}

View file

@ -12,22 +12,56 @@ in {
enable = mkBoolOpt false "Enable Alacritty Term";
fonts = {
# normal = {
# family = mkStringOpt "Cozette" "The Family of the font";
# # style = mkStringOpt "ExtraBold" "The Style of the font";
# };
# bold = {
# family = mkStringOpt "Cozette" "The Family of the font";
# # style = mkStringOpt "Heavy" "The Style of the font";
# };
# italic = {
# family = mkStringOpt "Cozette" "The Family of the font";
# # style = mkStringOpt "ExtraBold Italic" "The Style of the font";
# };
# bold_italic = {
# family = mkStringOpt "Cozette" "The Family of the font";
# # style = mkStringOpt "Heavy Italic" "The Style of the font";
# };
normal = {
family = mkStringOpt "Iosevka" "The Family of the font";
style = mkStringOpt "ExtraBold" "The Style of the font";
family = mkStringOpt "Iosevka Nerd Font Mono" "The Family of the font";
style = mkStringOpt "SemiBold" "The Style of the font";
};
bold = {
family = mkStringOpt "Iosevka" "The Family of the font";
style = mkStringOpt "Heavy" "The Style of the font";
family = mkStringOpt "Iosevka Nerd Font Mono" "The Family of the font";
style = mkStringOpt "Bold" "The Style of the font";
};
italic = {
family = mkStringOpt "Iosevka" "The Family of the font";
style = mkStringOpt "ExtraBold Italic" "The Style of the font";
family = mkStringOpt "Iosevka Nerd Font Mono" "The Family of the font";
style = mkStringOpt "SemiBold Italic" "The Style of the font";
};
bold_italic = {
family = mkStringOpt "Iosevka" "The Family of the font";
style = mkStringOpt "Heavy Italic" "The Style of the font";
family = mkStringOpt "Iosevka Nerd Font Mono" "The Family of the font";
style = mkStringOpt "Bold Italic" "The Style of the font";
};
# normal = {
# family = mkStringOpt "PragmataPro" "The Family of the font";
# # style = mkStringOpt "" "The Style of the font";
# };
# bold = {
# family = mkStringOpt "PragmataPro" "The Family of the font";
# style = mkStringOpt "Bold" "The Style of the font";
# };
# italic = {
# family = mkStringOpt "PragmataPro" "The Family of the font";
# style = mkStringOpt "Italic" "The Style of the font";
# };
# bold_italic = {
# family = mkStringOpt "PragmataPro" "The Family of the font";
# style = mkStringOpt "Bold Italic" "The Style of the font";
# };
};
};
@ -37,18 +71,38 @@ in {
catppuccin.enable = true;
settings = {
colors = {
primary.background = colors.crust.hex;
};
env = {
term = "xterm-256color";
};
cursor = {
style = {
shape = "Beam";
};
vi_mode_style = {
shape = "Beam";
};
};
window = {
opacity = 0.95;
# opacity = 0.95;
padding = {
x = 20;
y = 20;
};
};
font = {
normal = cfg.fonts.normal;
bold = cfg.fonts.bold;
italic = cfg.fonts.italic;
bold_italic = cfg.fonts.bold_italic;
size = 16.0;
normal = fonts.mono;
bold = "${fonts.mono} Bold";
italic = "${fonts.mono} Italic";
bold_italic = "${fonts.mono} Bold Italic";
offset = {
x = 0;
y = 0;
};
};
};
};

View file

@ -17,10 +17,34 @@ in {
enable = true;
settings = {
main = {
font = "Iosevka:weight=bold:size=20";
font = "${fonts.mono}:weight=bold:size=20";
};
colors = {
alpha = "0.9";
# Custom colors from lib/theme/default.nix
foreground = "${colors.text.hex}";
background = "${colors.crust.hex}";
# Normal colors
regular0 = "${colors.surface1.hex}"; # black
regular1 = "${colors.red.hex}"; # red
regular2 = "${colors.green.hex}"; # green
regular3 = "${colors.yellow.hex}"; # yellow
regular4 = "${colors.blue.hex}"; # blue
regular5 = "${colors.mauve.hex}"; # magenta
regular6 = "${colors.teal.hex}"; # cyan
regular7 = "${colors.text.hex}"; # white
# Bright colors
bright0 = "${colors.surface2.hex}"; # bright black
bright1 = "${colors.red.hex}"; # bright red
bright2 = "${colors.green.hex}"; # bright green
bright3 = "${colors.yellow.hex}"; # bright yellow
bright4 = "${colors.blue.hex}"; # bright blue
bright5 = "${colors.mauve.hex}"; # bright magenta
bright6 = "${colors.teal.hex}"; # bright cyan
bright7 = "${colors.text.hex}"; # bright white
};
};
};

View file

@ -10,17 +10,6 @@ with lib.custom; let
in {
options.apps.term.ghostty = with types; {
enable = mkBoolOpt false "Enable Ghostty Term";
fonts = {
# normal = mkStringOpt "JetBrainsMonoNL Nerd Font Mono Bold" "Normal Font";
# bold = mkStringOpt "JetBrainsMonoNL Nerd Font Mono ExtraBold" "Bold Font";
# italic = mkStringOpt "JetBrainsMonoNL Nerd Font Mono Bold Italic" "Italic Font";
# bold_italic = mkStringOpt "JetBrainsMonoNL Nerd Font Mono ExtraBold Italic" "Bold Italic Font";
normal = mkStringOpt "Pragmata Pro Mono" "Normal Font";
bold = mkStringOpt "Iosevka ExtraBold" "Bold Font";
italic = mkStringOpt "Iosevka Bold Italic" "Italic Font";
bold_italic = mkStringOpt "Iosevka ExtraBold Italic" "Bold Italic Font";
};
};
config = mkIf cfg.enable {
@ -28,9 +17,19 @@ in {
enable = true;
settings = {
font-family = cfg.fonts.normal;
font-family = fonts.mono;
gtk-single-instance = true;
gtk-titlebar = false;
background = colors.crust.hex;
window-padding-x = 20;
window-padding-y = 20;
window-padding-balance = true;
font-style = "SemiBold";
font-style-bold = "Bold";
font-style-italic = "SemiBold Italic";
font-style-bold-italic = "Bold Italic";
};
};
};

View file

@ -1,5 +1,6 @@
{
options,
pkgs,
config,
lib,
...
@ -10,39 +11,51 @@ with lib.custom; let
in {
options.apps.term.kitty = with types; {
enable = mkBoolOpt false "Enable Kitty Term";
fonts = {
normal = mkStringOpt "JetBrainsMonoNL Nerd Font Mono Bold" "Normal Font";
bold = mkStringOpt "JetBrainsMonoNL Nerd Font Mono ExtraBold" "Bold Font";
italic = mkStringOpt "JetBrainsMonoNL Nerd Font Mono Bold Italic" "Italic Font";
bold_italic = mkStringOpt "JetBrainsMonoNL Nerd Font Mono ExtraBold Italic" "Bold Italic Font";
# normal = mkStringOpt "Iosevka Bold" "Normal Font";
# bold = mkStringOpt "Iosevka ExtraBold" "Bold Font";
# italic = mkStringOpt "Iosevka Bold Italic" "Italic Font";
# bold_italic = mkStringOpt "Iosevka ExtraBold Italic" "Bold Italic Font";
};
};
config = mkIf cfg.enable {
programs.kitty = {
enable = true;
font = {
name = cfg.fonts.normal;
size = 14;
name = fonts.mono;
size = 16;
};
extraConfig = ''
bold_font ${cfg.fonts.bold}
italic_font ${cfg.fonts.italic}
bold_italic_font ${cfg.fonts.bold_italic}
bold_font ${fonts.mono} Bold Italic
italic_font ${fonts.mono} Italic
bold_italic_font ${fonts.mono} Bold Italic
shell ${lib.getExe pkgs.nushell}
'';
catppuccin.enable = true;
settings = {
window_padding_width = 12;
background_opacity = "0.9";
# background = "#000000";
window_padding_width = 20;
# background_opacity = "0.9";
background = colors.crust.hex;
foreground = colors.text.hex;
# Normal colors
color0 = colors.surface1.hex; # black
color1 = colors.red.hex; # red
color2 = colors.green.hex; # green
color3 = colors.yellow.hex; # yellow
color4 = colors.blue.hex; # blue
color5 = colors.mauve.hex; # magenta
color6 = colors.teal.hex; # cyan
color7 = colors.text.hex; # white
# Bright colors
color8 = colors.surface2.hex; # bright black
color9 = colors.red.hex; # bright red
color10 = colors.green.hex; # bright green
color11 = colors.yellow.hex; # bright yellow
color12 = colors.blue.hex; # bright blue
color13 = colors.mauve.hex; # bright magenta
color14 = colors.teal.hex; # bright cyan
color15 = colors.text.hex; # bright white
};
};
};

View file

@ -16,7 +16,6 @@ in {
config = mkIf cfg.enable {
programs.rio = {
enable = true;
package = inputs.rio-term.packages.${pkgs.system}.default;
settings = {
window = {
opacity = 0.9;
@ -32,27 +31,27 @@ in {
fonts = {
regular = {
family = "Iosevka";
family = fonts.mono;
style = "Normal";
weight = 700;
weight = 400;
};
bold = {
family = "Iosevka";
family = fonts.mono;
style = "Normal";
weight = 800;
};
italic = {
family = "Iosevka";
style = "Italic";
weight = 700;
};
bold-italic = {
family = "Iosevka";
italic = {
family = fonts.mono;
style = "Italic";
weight = 800;
weight = 400;
};
bold-italic = {
family = fonts.mono;
style = "Italic";
weight = 700;
};
};
};

View file

@ -1,8 +1,6 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
@ -18,6 +16,12 @@ in {
direnv = {
enable = true;
nix-direnv.enable = true;
config = {
global = {
log_format = "-";
log_filter = "^$";
};
};
};
};
home.sessionVariables = {

View file

@ -14,6 +14,7 @@
"lazyvim.plugins.extras.lang.toml",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.clangd",
"lazyvim.plugins.extras.lang.rust",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.nix",
"lazyvim.plugins.extras.lang.sql",
@ -32,8 +33,9 @@
"lazyvim.plugins.extras.coding.luasnip",
"lazyvim.plugins.extras.coding.blink"
],
"install_version": 8,
"news": {
"NEWS.md": "6520"
"NEWS.md": "10960"
},
"version": 8
}

View file

@ -3,34 +3,7 @@ require("lazy").setup({
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins
-- { import = "lazyvim.plugins.extras.lang.rust" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.lang.astro" },
-- { import = "lazyvim.plugins.extras.lang.git" },
-- { import = "lazyvim.plugins.extras.lang.docker" },
-- { import = "lazyvim.plugins.extras.lang.clangd" },
-- { import = "lazyvim.plugins.extras.lang.cmake" },
-- { import = "lazyvim.plugins.extras.lang.haskell" },
-- { import = "lazyvim.plugins.extras.lang.java" },
-- { import = "lazyvim.plugins.extras.lang.markdown" },
-- { import = "lazyvim.plugins.extras.lang.nix" },
-- { import = "lazyvim.plugins.extras.lang.sql" },
-- { import = "lazyvim.plugins.extras.lang.svelte" },
-- { import = "lazyvim.plugins.extras.lang.tailwind" },
-- { import = "lazyvim.plugins.extras.lang.tex" },
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.toml" },
-- { import = "lazyvim.plugins.extras.lang.angular" },
--
-- { import = "lazyvim.plugins.extras.formatting.prettier" },
--
-- { import = "lazyvim.plugins.extras.coding.luasnip" },
-- { import = "lazyvim.plugins.extras.coding.yanky" },
--
-- { import = "lazyvim.plugins.extras.dap.core" },
{ import = "plugins" },
{ import = "plugins.extras.rust" },
-- { import = "plugins.extras.clangd" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.

View file

@ -9,3 +9,7 @@ end
-- in this case.
vim.g.lazyvim_blink_main = true
vim.o.termguicolors = true
vim.g.lazyvim_python_lsp = "basedpyright"

View file

@ -6,61 +6,51 @@ return {
news = { lazyvim = false },
},
},
{
"drewxs/ash.nvim",
lazy = false,
priority = 1000,
},
{
"dgox16/oldworld.nvim",
lazy = false,
priority = 1000,
},
{
"snacks.nvim",
opts = {
scroll = {
enabled = false,
},
dashboard = {
preset = {
header = [[
l
l ~
f_,)
]],
},
},
},
},
-- {
-- "uZer/pywal16.nvim",
-- -- for local dev replace with:
-- -- dir = '~/your/path/pywal16.nvim',
-- config = function()
-- vim.cmd.colorscheme("pywal16")
-- end,
-- },
{
"catppuccin",
opts = {
transparent_background = true,
integrations = {
blink_cmp = true,
},
-- color_overrides = {
-- mocha = {
-- base = "#000000",
-- mantle = "#000000",
-- crust = "#000000",
-- },
-- },
},
config = function()
require("catppuccin").setup({
transparent_background = false,
integrations = {
blink_cmp = true,
nvimtree = true,
},
custom_highlights = function(colors)
return {
Normal = { bg = colors.crust },
NormalFloat = { bg = colors.crust },
-- Completion menu (nvim-cmp)
Pmenu = { bg = colors.crust },
PmenuSel = { bg = colors.surface0 },
CmpItemAbbr = { bg = colors.crust },
CmpItemAbbrMatch = { bg = colors.crust },
-- Tabs
TabLine = { bg = colors.crust },
TabLineFill = { bg = colors.crust },
TabLineSel = { bg = colors.crust },
-- Status line
StatusLine = { bg = colors.crust },
StatusLineNC = { bg = colors.crust },
-- Line numbers
LineNr = { bg = colors.crust },
SignColumn = { bg = colors.crust },
}
end,
color_overrides = {
mocha = {
base = "#11111b",
mantle = "#11111b",
crust = "#11111b",
},
},
})
end,
},
"f-person/git-blame.nvim",
{ "nvim-lualine/lualine.nvim", enabled = false },
{ "echasnovski/mini.statusline", opts = {} },
{
"stevearc/conform.nvim",
opts = {
@ -76,40 +66,47 @@ return {
},
},
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
"christoomey/vim-tmux-navigator",
cmd = {
"TmuxNavigateLeft",
"TmuxNavigateDown",
"TmuxNavigateUp",
"TmuxNavigateRight",
"TmuxNavigatePrevious",
"TmuxNavigatorProcessList",
},
keys = {
{
"<leader>z",
function()
Snacks.zen()
end,
desc = "Toggle Zen Mode",
},
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
},
},
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
tag = "v3.8.2",
---@module "ibl"
---@type ibl.config
-- opts = {
-- debounce = 100,
-- indent = { char = "|" },
-- whitespace = { highlight = "Whitespace", "NonText" },
-- },
"m4xshen/hardtime.nvim",
lazy = false,
dependencies = { "MunifTanjim/nui.nvim" },
opts = {},
},
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
servers = {
emmet_ls = {},
slang = {
inlayHints = {
deducedTypes = true,
paramaterNames = true,
jinja_lsp = {},
emmet_ls = {
filetypes = { "html", "jinja" },
},
somesass_ls = {},
slangd = {
settings = {
slangd = {
inlayHints = {
deducedTypes = true,
paramaterNames = true,
},
},
},
},
nil_ls = {
@ -145,10 +142,4 @@ return {
require("force-cul").setup()
end,
},
-- {
-- "supermaven-inc/supermaven-nvim",
-- config = function()
-- require("supermaven-nvim").setup({})
-- end,
-- },
}

View file

@ -16,6 +16,7 @@ in {
programs.starship = {
enable = true;
enableZshIntegration = config.programs.zsh.enable;
enableNushellIntegration = config.programs.nushell.enable;
settings = {
add_newline = false;
format = "$username$directory$git_branch$git_status$python$rust$nodejs$nix_shell$cmd_duration$line_break$character";

View file

@ -16,15 +16,15 @@ in {
config = mkIf cfg.enable {
catppuccin.tmux = {
enable = true;
# extraConfig = ''
# set -g @catppuccin_window_status_style "basic"
# set -g @catppuccin_status_background "#000000"
# '';
extraConfig = ''
set -g @catppuccin_window_status_style "basic"
set -g @catppuccin_status_background "#11111b"
'';
};
programs.tmux = {
enable = true;
shell = "${pkgs.zsh}/bin/zsh";
shell = "${lib.getExe pkgs.nushell}";
historyLimit = 100000;
plugins = with pkgs; [
tmuxPlugins.sensible
@ -42,7 +42,8 @@ in {
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
set -g default-terminal "tmux-256color"
set -g default-terminal "$TERM"
set -ag terminal-overrides ",$TERM:Tc"
set -g allow-passthrough on
set -g status-right-length 100

View file

@ -61,7 +61,7 @@ in {
}
];
iconUpdateURL = "https://www.openstreetmap.org/favicon.ico";
icon = "https://www.openstreetmap.org/favicon.ico";
definedAliases = ["@openstreetmap" "@osm"];
};
@ -72,7 +72,7 @@ in {
}
];
iconUpdateURL = "https://search.zoeys.computer/searx/static/themes/simple/img/favicon.svg";
icon = "https://search.zoeys.computer/searx/static/themes/simple/img/favicon.svg";
definedAliases = ["@searx"];
};
@ -83,7 +83,7 @@ in {
}
];
iconUpdateURL = "https://docs.rs/-/static/favicon.ico";
icon = "https://docs.rs/-/static/favicon.ico";
definedAliases = ["@docs"];
};
@ -94,7 +94,7 @@ in {
}
];
iconUpdateURL = "https://crates.io/assets/cargo.png";
icon = "https://crates.io/assets/cargo.png";
definedAliases = ["@crates"];
};
};

View file

@ -0,0 +1,24 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.apps.web.zen;
in {
options.apps.web.zen = with types; {
enable = mkBoolOpt false "Enable or disable zen";
setDefault = mkBoolOpt false "Set zen as default browser";
};
config = mkIf cfg.enable {
xdg.mimeApps.defaultApplications = mkIf cfg.setDefault {
"text/html" = "zen-beta.desktop";
"x-scheme-handler/http" = "zen-beta.desktop";
"x-scheme-handler/https" = "zen-beta.desktop";
};
};
}

View file

@ -26,8 +26,8 @@ in {
enable = true;
font = {
name = "Adwaita Sans";
size = 11;
name = fonts.ui;
size = 12;
};
theme = {

View file

@ -21,7 +21,7 @@ in {
package = pkgs.swaylock-effects;
settings = with colors; {
clock = true;
color = base;
color = base.hex;
font = "Work Sans";
image = "${wallpaper}";
show-failed-attempts = false;
@ -33,21 +33,21 @@ in {
inside-color = "00000000";
key-hl-color = "f2cdcd";
separator-color = "00000000";
text-color = text;
text-color = text.hex;
text-caps-lock-color = "";
line-ver-color = love;
ring-ver-color = rose;
inside-ver-color = base;
text-ver-color = text;
ring-wrong-color = foam;
text-wrong-color = foam;
inside-wrong-color = base;
inside-clear-color = base;
text-clear-color = text;
ring-clear-color = iris;
line-clear-color = base;
line-wrong-color = base;
bs-hl-color = foam;
line-ver-color = rosewater.hex;
ring-ver-color = rosewater.hex;
inside-ver-color = base.hex;
text-ver-color = text.hex;
ring-wrong-color = teal.hex;
text-wrong-color = teal.hex;
inside-wrong-color = base.hex;
inside-clear-color = base.hex;
text-clear-color = text.hex;
ring-clear-color = lavender.hex;
line-clear-color = base.hex;
line-wrong-color = base.hex;
bs-hl-color = teal.hex;
line-uses-ring = false;
grace = 2;
grace-no-mouse = true;

View file

@ -1,49 +0,0 @@
{
pkgs,
lib,
config,
...
}:
with lib;
with pkgs; {
ytmp3 = ''
${getExe yt-dlp} -x --continue --add-metadata --embed-thumbnail --audio-format mp3 --audio-quality 0 --metadata-from-title="%(artist)s - %(title)s" --prefer-ffmpeg -o "%(title)s.%(ext)s"'';
cat = "${getExe bat} --style=plain";
vpn = "mullvad";
uuid = "cat /proc/sys/kernel/random/uuid";
grep = getExe ripgrep;
fzf = getExe skim;
untar = "tar -xvf";
untargz = "tar -xzf";
du = getExe du-dust;
ps = getExe procs;
lb = "pw-loopback -C \"alsa_input.pci-0000_0d_00.4.analog-stereo\" -P \"Scarlett Solo (3rd Gen.) Headphones / Line 1-2\"";
deploy = "nixos-rebuild switch --flake ~/nixos#pluto --target-host zoeys.computer --use-remote-sudo";
m = "mkdir -p";
fcd = "cd $(find -type d | fzf)";
l = "ls -lF --time-style=long-iso --icons";
sc = "sudo systemctl";
scu = "systemctl --user ";
la = "${getExe eza} -lah --tree";
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
tree = "${getExe eza} --tree --icons --tree";
kys = "shutdown now";
gpl = "curl https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE";
agpl = "curl https://www.gnu.org/licenses/agpl-3.0.txt -o LICENSE";
tsm = "transmission-remote";
g = "git";
n = "nix";
r = "rebuild";
vm = "nixos-rebuild build-vm --flake ~/nixos#earth";
mnt = "udisksctl mount -b";
umnt = "udisksctl unmount -b";
burn = "pkill -9";
diff = "diff --color=auto";
wu = "vpn disconnect -w && awsvpnclient start --config ~/Downloads/cvpn-endpoint-085400ccc19bb4a17.ovpn";
"v" = "nvim";
".." = "cd ..";
"..." = "cd ../../";
"...." = "cd ../../../";
"....." = "cd ../../../../";
"......" = "cd ../../../../../";
}

View file

@ -66,7 +66,7 @@ in {
'';
};
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
shellAliases = import ../aliases.nix {inherit pkgs lib config;};
};
home.packages = with pkgs; [

View file

@ -17,16 +17,13 @@ with pkgs; {
untargz = "tar -xzf";
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
du = getExe du-dust;
ps = getExe procs;
lb = "pw-loopback -C \"alsa_input.pci-0000_0d_00.4.analog-stereo\" -P \"Scarlett Solo (3rd Gen.) Headphones / Line 1-2\"";
deploy = "nixos-rebuild switch --flake ~/nixos#pluto --target-host zoeys.computer --use-remote-sudo";
m = "mkdir -p";
fcd = "cd $(find -type d | fzf)";
l = "ls -lF --time-style=long-iso --icons";
m = "mkdir";
l = "exa -lF --time-style=long-iso --icons";
sc = "sudo systemctl";
scu = "systemctl --user ";
la = "${getExe eza} -lah --tree";
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
tree = "${getExe eza} --tree --icons --tree";
kys = "shutdown now";
lv = "nvim -c \"normal '\''0\"";
@ -37,11 +34,8 @@ with pkgs; {
n = "nix";
r = "rebuild";
vm = "nixos-rebuild build-vm --flake ~/nixos#earth";
mnt = "udisksctl mount -b";
umnt = "udisksctl unmount -b";
burn = "pkill -9";
diff = "diff --color=auto";
wu = "vpn disconnect -w && awsvpnclient start --config ~/Downloads/cvpn-endpoint-085400ccc19bb4a17.ovpn";
"v" = "nvim";
".." = "cd ..";
"..." = "cd ../../";

View file

@ -17,47 +17,35 @@ in {
programs.nushell = {
enable = true;
# Nushell doesn't need generateCompletions like fish
extraConfig = ''
# Environment variables
let-env LC_ALL = "en_US.UTF-8"
let-env SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
let-env FLAKE = "/home/zoey/nixos/"
$env.config.show_banner = false
# FZF settings
let-env FZF_PREVIEW_FILE_CMD = "head -n 10"
let-env FZF_PREVIEW_DIR_CMD = "ls"
def pf [] {
fzf --bind ctrl-y:preview-up,ctrl-e:preview-down \
--bind ctrl-b:preview-page-up,ctrl-f:preview-page-down \
--bind ctrl-u:preview-half-page-up,ctrl-d:preview-half-page-down \
--bind ctrl-k:up,ctrl-j:down \
--preview='bat --style=numbers --color=always --line-range :100 {}'
if ('TMUX' in $env == false) {
exec tmux
}
def ff [] {
let files = (pf)
for file in $files {
let cmd = $"v ($file)"
echo $cmd
nu -c $cmd
}
}
fastfetch --config minimal
'';
# Nushell handles plugins differently, you might want to use modules instead
# or configure external tools directly
extraEnv = ''
# Add any environment-specific configuration here
# Environment variables
$env.LC_ALL = "en_US.UTF-8"
$env.SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
$env.FLAKE = "/home/zoey/nixos/"
# FZF settings
$env.FZF_PREVIEW_FILE_CMD = "head -n 10"
$env.FZF_PREVIEW_DIR_CMD = "ls"
'';
# Import aliases (you'll need to convert fish aliases to Nushell format)
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
};
programs.carapace.enable = true;
programs.carapace.enableNushellIntegration = true;
home.packages = with pkgs; [
gnumake
comma

View file

@ -22,7 +22,7 @@ in {
LC_ALL = "en_US.UTF-8";
ZSH_AUTOSUGGEST_USE_ASYNC = "true";
SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh";
FLAKE = "/home/zoey/nixos/";
NH_FLAKE = "/home/zoey/nixos/";
};
# zprof.enable = true;
history = {
@ -33,7 +33,7 @@ in {
ignoreSpace = true;
};
initExtra = let
initContent = let
sources = with pkgs; [
"${zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh"
"${zsh-history}/share/zsh/init.zsh"
@ -77,7 +77,7 @@ in {
media = "/run/media/$USER";
};
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
shellAliases = import ../aliases.nix {inherit pkgs lib config;};
};
home.packages = with pkgs; [

View file

@ -54,10 +54,7 @@ in {
wayland.windowManager.hyprland.settings = with colors; {
exec-once = [
# "pw-loopback -C \"alsa_input.pci-0000_0d_00.4.analog-stereo\" -P \"Scarlett Solo (3rd Gen.) Headphones / Line 1-2\""
# "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
# "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"librewolf"
"zen"
"thunderbird"
"vesktop"
"spotify"
@ -65,20 +62,31 @@ in {
"signal-desktop"
];
env = [
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"XDG_CURRENT_DESKTOP,Hyprland"
];
# env = [
# "XDG_SESSION_TYPE,wayland"
# "XDG_SESSION_DESKTOP,Hyprland"
# "XDG_CURRENT_DESKTOP,Hyprland"
# ];
bind =
[
''${mod},RETURN,exec,${lib.getExe pkgs.kitty}''
"${mod},RETURN,exec,${lib.getExe pkgs.kitty}"
"${mod},D,exec,rofi -show drun"
"${mod},D,exec,fuzzel"
"${mod},Q,killactive"
"${mod},M,exit"
"${mod},P,pseudo"
"${mod},Z,exec,${pkgs.writeShellScriptBin "zen-launcher" ''
ZEN_RESULT=$(${inputs.hyprland.packages.${pkgs.system}.default}/bin/hyprctl clients -j | ${lib.getExe pkgs.jq} '.[] | select(.class | contains("zen"))')
if [ -z "$ZEN_RESULT" ]; then
${lib.getExe inputs.zen-browser.packages.${pkgs.system}.beta} &
disown
else
ZEN_WORKSPACE=$(echo "$ZEN_RESULT" | ${lib.getExe pkgs.jq} '.workspace.id')
${pkgs.hyprland}/bin/hyprctl dispatch workspace "$ZEN_WORKSPACE"
fi
''}/bin/zen-launcher"
"${mod},J,togglesplit,"
@ -116,13 +124,13 @@ in {
gaps_out = 8;
# border thiccness
border_size = 2;
border_size = 4;
allow_tearing = true;
# active border color
"col.active_border" = "rgb(${rose})";
"col.inactive_border" = "rgb(${muted})";
"col.active_border" = "${colors.lavender.rgb}";
"col.inactive_border" = "${colors.base.rgb}";
};
input = {
@ -138,7 +146,7 @@ in {
decoration = {
# fancy corners
rounding = 4;
rounding = 0;
# blur
blur = {
enabled = true;
@ -191,7 +199,7 @@ in {
};
# for 10 bit color: DP-3,2560x1440@240,0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,1.0
monitor = ["DP-3,2560x1440@240,0x0,1" "HDMI-A-1,disable" "DP-1,disable"];
monitor = ["DP-1,2560x1440@240,0x0,1" "HDMI-A-1,disable"];
layerrule = [
"blur, ^(gtk-layer-shell)$"
@ -249,14 +257,14 @@ in {
# };
# };
systemd.user.services = {
swaybg = mkService {
Unit.Description = "Wallpaper chooser";
Service = {
ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
Restart = "always";
};
};
};
# systemd.user.services = {
# swaybg = mkService {
# Unit.Description = "Wallpaper chooser";
# Service = {
# ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
# Restart = "always";
# };
# };
# };
};
}

View file

@ -0,0 +1,515 @@
{
lib,
config,
pkgs,
inputs,
...
}:
with lib;
with lib.custom; let
cfg = config.wms.niri;
mkService = recursiveUpdate {
Unit.PartOf = ["graphical-session.target"];
Unit.After = ["graphical-session.target"];
Install.WantedBy = ["graphical-session.target"];
};
actions = config.lib.niri.actions;
niri = "${config.programs.niri.package}/bin/niri";
mkColor = color: {inherit color;};
mkGradient = from: to: {
angle ? 180,
relative-to ? "window",
in' ? null,
}: {
gradient = {inherit from to angle relative-to in';};
};
spawnSlackOnWeekday = pkgs.writeShellScriptBin "spawn-slack-on-weekday" ''
# Get the day of the week (1=Monday, ..., 7=Sunday)
DAY_OF_WEEK=$(${pkgs.coreutils}/bin/date +%u)
# Check if it's a weekday (between 1 and 5 inclusive)
if [ "$DAY_OF_WEEK" -ge 1 ] && [ "$DAY_OF_WEEK" -le 5 ]; then
# Execute Slack. Use the full path for robustness.
# Ensure pkgs.slack is available (e.g., via environment.systemPackages)
exec ${pkgs.slack}/bin/slack
fi
# Exit successfully if not a weekday or after exec replaces the process
exit 0
'';
in {
options.wms.niri = with types; {
enable = mkBoolOpt false "Enable niri";
};
config = mkIf cfg.enable {
programs.niri = {
package = pkgs.niri;
settings = {
# Input device configuration
input = {
keyboard = {
# xkb settings are empty in KDL, using defaults/empty strings
xkb = {
rules = "";
model = "";
layout = "";
variant = "";
options = null; # Or "" if you prefer explicit empty
};
};
touchpad = {
enable = true; # Not explicitly 'off' in KDL
tap = true;
dwt = false; # Commented out in KDL
dwtp = false; # Commented out in KDL
natural-scroll = true;
# accel-speed = 0.2; # Commented out
# accel-profile = "flat"; # Commented out
# scroll-method = "two-finger"; # Commented out
disabled-on-external-mouse = true;
};
mouse = {
enable = true; # Not explicitly 'off' in KDL
natural-scroll = false; # Commented out in KDL
accel-speed = 0.2;
accel-profile = "flat";
# scroll-method = "no-scroll"; # Commented out
};
trackpoint = {
enable = true; # Not explicitly 'off' in KDL
natural-scroll = false; # Commented out
# accel-speed = 0.2; # Commented out
# accel-profile = "flat"; # Commented out
# scroll-method = "on-button-down"; # Commented out
# scroll-button = 273; # Commented out
middle-emulation = false; # Commented out
};
warp-mouse-to-focus = true;
focus-follows-mouse = {
enable = false; # Commented out in KDL
# max-scroll-amount = "0%"; # Only relevant if enabled
};
};
# Output configuration
outputs."DP-1" = {
enable = true; # Not explicitly 'off'
mode = {
width = 2560;
height = 1440;
refresh = 239.972;
};
scale = 1;
transform = {
# "normal"
rotation = 0;
flipped = false;
};
position = {
x = 0;
y = 0;
};
};
# Environment variables
environment = {
DISPLAY = ":0"; # for applications using xwayland-satillite
};
hotkey-overlay = {
skip-at-startup = true;
};
# Layout settings
layout = {
gaps = 16;
center-focused-column = "never";
preset-column-widths = [
{proportion = 0.33333;}
{proportion = 0.5;}
{proportion = 0.66667;}
# { fixed = 1920; } # Example if needed
];
# preset-window-heights = []; # Empty in KDL
default-column-width = {proportion = 0.5;};
# default-column-width = {}; # Alternative from KDL comments
focus-ring = {
enable = true; # Not explicitly 'off'
width = 4;
active = mkGradient colors.blue.hex colors.sky.hex {angle = 45;};
# active = mkColor "#7fc8ff"; # Alternative solid color from KDL
inactive = mkGradient colors.surface1.hex colors.surface2.hex {
angle = 45;
relative-to = "workspace-view";
};
# inactive = mkColor "#505050"; # Alternative solid color from KDL
};
border = {
enable = true; # Explicitly 'off' in KDL
width = 0;
active = mkColor colors.blue.hex;
inactive = mkColor colors.base.hex;
# active-gradient = ... # Commented out in KDL
# inactive-gradient = ... # Commented out in KDL
};
struts = {
# left = 64; # Commented out
# right = 64; # Commented out
# top = 64; # Commented out
# bottom = 64; # Commented out
};
};
# Spawn processes at startup
spawn-at-startup = [
{command = ["xwayland-satellite"];}
{command = ["${pkgs.writeShellScriptBin "thunderbird-delayed" ''sleep 5; thunderbird''}/bin/thunderbird-delayed"];}
{command = ["${pkgs.writeShellScriptBin "zen-delayed" ''sleep 5; zen''}/bin/zen-delayed"];}
{command = ["vesktop"];}
{command = ["spotify"];}
{command = ["${spawnSlackOnWeekday}/bin/spawn-slack-on-weekday"];}
];
# Prefer server-side decorations
prefer-no-csd = true;
# Screenshot path
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
# screenshot-path = null; # Alternative from KDL comments
# Animation settings
animations = {
enable = true; # Not explicitly 'off'
# slowdown = 3.0; # Commented out
# Individual animation settings can be added here if needed
};
debug = {
wait-for-frame-completion-in-pipewire = [];
};
layer-rules = [
{
matches = [
{namespace = "notifications$";}
];
block-out-from = "screen-capture";
}
];
# Window rules
window-rules = [
# Password manager rule (example from KDL comments)
{
matches = [
{app-id = "^org\\.keepassxc\\.KeePassXC$";}
{app-id = "^org\\.gnome\\.World\\.Secrets$";}
{app-id = "^1Password$";}
{app-id = "^thunderbird$";}
{app-id = "^signal$";}
{app-id = "^vesktop$";}
{app-id = "^slack$";}
];
block-out-from = "screen-capture";
}
# Rounded corners rule (example from KDL comments)
{
# No matches means apply to all windows
geometry-corner-radius = {
top-left = 12.0;
top-right = 12.0;
bottom-left = 12.0;
bottom-right = 12.0;
};
clip-to-geometry = true;
}
# Window cast target rule
{
matches = [{is-window-cast-target = true;}];
focus-ring = {
active = mkColor colors.red.hex;
inactive = mkColor (lerpColor colors.red.hex colors.base.hex 0.5);
};
shadow = {
# Only color is specified in KDL rule
color = "#7d0d2d70";
};
tab-indicator = {
active = mkColor colors.red.hex;
inactive = mkColor (lerpColor colors.red.hex colors.base.hex 0.5);
};
}
# fix steam popups holy fuck they're annoying
{
matches = [
{app-id = "^steam$";}
];
excludes = [{title = "^Steam$";}];
open-floating = true;
open-focused = false;
default-floating-position = {
relative-to = "bottom-right";
x = 16;
y = 16;
};
}
{
matches = [
{
at-startup = true;
app-id = "^zen$";
}
];
open-maximized = true;
open-on-workspace = "browser";
}
{
matches = [
{
at-startup = true;
app-id = "^spotify$";
}
{
at-startup = true;
app-id = "^vesktop$";
}
];
open-on-workspace = "chat";
}
{
matches = [
{
at-startup = true;
app-id = "^Slack$";
}
{
at-startup = true;
app-id = "^thunderbird$";
}
];
open-on-workspace = "work";
}
];
workspaces."01-browser" = {
name = "browser";
};
workspaces."02-code" = {
name = "code";
};
workspaces."03-chat" = {
name = "chat";
};
workspaces."04-work" = {
name = "work";
};
# Keybindings
binds =
{
"Mod+Shift+Slash" = {action = actions.show-hotkey-overlay;};
"Mod+Return" = {action = actions.spawn "kitty";};
"Mod+D" = {action = actions.spawn "fuzzel";};
"Super+Alt+L" = {action = actions.spawn "swaylock";};
# "Mod+T" = { action = actions.spawn "bash" "-c" "notify-send hello && exec alacritty"; };
# "Mod+S" = {action = actions.set-dynamic-cast-window;};
#
# "Mod+Shift+S" = {action = actions.set-dynamic-cast-monitor;};
#
# "Mod+Z" = {action = actions.clear-dynamic-cast-target;};
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = actions.spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
};
"XF86AudioMute" = {
allow-when-locked = true;
action = actions.spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
};
"XF86AudioMicMute" = {
allow-when-locked = true;
action =
actions.spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
};
"Mod+Q" = {action = actions.close-window;};
"Mod+Left" = {action = actions.focus-column-left;};
"Mod+Down" = {action = actions.focus-window-down;};
"Mod+Up" = {action = actions.focus-window-up;};
"Mod+Right" = {action = actions.focus-column-right;};
"Mod+H" = {action = actions.focus-column-left;};
"Mod+J" = {action = actions.focus-window-down;};
"Mod+K" = {action = actions.focus-window-up;};
"Mod+L" = {action = actions.focus-column-right;};
"Mod+Ctrl+Left" = {action = actions.move-column-left;};
"Mod+Ctrl+Down" = {action = actions.move-window-down;};
"Mod+Ctrl+Up" = {action = actions.move-window-up;};
"Mod+Ctrl+Right" = {action = actions.move-column-right;};
"Mod+Ctrl+H" = {action = actions.move-column-left;};
"Mod+Ctrl+J" = {action = actions.move-window-down;};
"Mod+Ctrl+K" = {action = actions.move-window-up;};
"Mod+Ctrl+L" = {action = actions.move-column-right;};
# Alternative commands (commented out in KDL)
# "Mod+J" = { action = actions.focus-window-or-workspace-down; };
# "Mod+K" = { action = actions.focus-window-or-workspace-up; };
# "Mod+Ctrl+J" = { action = actions.move-window-down-or-to-workspace-down; };
# "Mod+Ctrl+K" = { action = actions.move-window-up-or-to-workspace-up; };
"Mod+Home" = {action = actions.focus-column-first;};
"Mod+End" = {action = actions.focus-column-last;};
"Mod+Ctrl+Home" = {action = actions.move-column-to-first;};
"Mod+Ctrl+End" = {action = actions.move-column-to-last;};
"Mod+Shift+Left" = {action = actions.focus-monitor-left;};
"Mod+Shift+Down" = {action = actions.focus-monitor-down;};
"Mod+Shift+Up" = {action = actions.focus-monitor-up;};
"Mod+Shift+Right" = {action = actions.focus-monitor-right;};
"Mod+Shift+H" = {action = actions.focus-monitor-left;};
"Mod+Shift+J" = {action = actions.focus-workspace-down;};
"Mod+Shift+K" = {action = actions.focus-workspace-up;};
"Mod+Shift+L" = {action = actions.focus-monitor-right;};
"Mod+Ctrl+Shift+F" = {action = actions.toggle-windowed-fullscreen;};
"Mod+Shift+Ctrl+Left" = {action = actions.move-column-to-monitor-left;};
"Mod+Shift+Ctrl+Down" = {action = actions.move-column-to-monitor-down;};
"Mod+Shift+Ctrl+Up" = {action = actions.move-column-to-monitor-up;};
"Mod+Shift+Ctrl+Right" = {action = actions.move-column-to-monitor-right;};
"Mod+Shift+Ctrl+H" = {action = actions.move-column-to-monitor-left;};
"Mod+Shift+Ctrl+J" = {action = actions.move-column-to-monitor-down;};
"Mod+Shift+Ctrl+K" = {action = actions.move-column-to-monitor-up;};
"Mod+Shift+Ctrl+L" = {action = actions.move-column-to-monitor-right;};
"Mod+Page_Down" = {action = actions.focus-workspace-down;};
"Mod+Page_Up" = {action = actions.focus-workspace-up;};
"Mod+U" = {action = actions.focus-workspace-down;};
"Mod+I" = {action = actions.focus-workspace-up;};
"Mod+Ctrl+Page_Down" = {action = actions.move-column-to-workspace-down;};
"Mod+Ctrl+Page_Up" = {action = actions.move-column-to-workspace-up;};
"Mod+Ctrl+U" = {action = actions.move-column-to-workspace-down;};
"Mod+Ctrl+I" = {action = actions.move-column-to-workspace-up;};
"Mod+Shift+Page_Down" = {action = actions.move-workspace-down;};
"Mod+Shift+Page_Up" = {action = actions.move-workspace-up;};
"Mod+Shift+U" = {action = actions.move-workspace-down;};
"Mod+Shift+I" = {action = actions.move-workspace-up;};
"Mod+WheelScrollDown" = {
cooldown-ms = 150;
action = actions.focus-workspace-down;
};
"Mod+WheelScrollUp" = {
cooldown-ms = 150;
action = actions.focus-workspace-up;
};
"Mod+Ctrl+WheelScrollDown" = {
cooldown-ms = 150;
action = actions.move-column-to-workspace-down;
};
"Mod+Ctrl+WheelScrollUp" = {
cooldown-ms = 150;
action = actions.move-column-to-workspace-up;
};
"Mod+WheelScrollRight" = {action = actions.focus-column-right;};
"Mod+WheelScrollLeft" = {action = actions.focus-column-left;};
"Mod+Ctrl+WheelScrollRight" = {action = actions.move-column-right;};
"Mod+Ctrl+WheelScrollLeft" = {action = actions.move-column-left;};
"Mod+Shift+WheelScrollDown" = {action = actions.focus-column-right;};
"Mod+Shift+WheelScrollUp" = {action = actions.focus-column-left;};
"Mod+Ctrl+Shift+WheelScrollDown" = {action = actions.move-column-right;};
"Mod+Ctrl+Shift+WheelScrollUp" = {action = actions.move-column-left;};
"Mod+Comma" = {action = actions.consume-window-into-column;};
"Mod+Period" = {action = actions.expel-window-from-column;};
"Mod+BracketLeft" = {action = actions.consume-or-expel-window-left;};
"Mod+BracketRight" = {action = actions.consume-or-expel-window-right;};
"Mod+R" = {action = actions.switch-preset-column-width;};
"Mod+Shift+R" = {action = actions.switch-preset-window-height;};
"Mod+Ctrl+R" = {action = actions.reset-window-height;};
"Mod+F" = {action = actions.maximize-column;};
"Mod+Shift+F" = {action = actions.fullscreen-window;};
"Mod+C" = {action = actions.center-column;};
"Mod+Ctrl+F" = {action = actions.expand-column-to-available-width;};
"Mod+V" = {action = actions.toggle-window-floating;};
"Mod+Minus" = {action = actions.set-column-width "-10%";};
"Mod+Equal" = {action = actions.set-column-width "+10%";};
"Mod+Shift+Minus" = {action = actions.set-window-height "-10%";};
"Mod+Shift+Equal" = {action = actions.set-window-height "+10%";};
"Print" = {action = actions.screenshot {};}; # Empty attrset for default args
"Mod+Shift+E" = {action = actions.quit {};}; # Default: no skip-confirmation
"Ctrl+Alt+Delete" = {action = actions.quit {};};
"Mod+Shift+P" = {action = actions.power-off-monitors;};
}
// lib.attrsets.listToAttrs (builtins.concatMap (i:
with actions; [
{
name = "Mod+${toString i}";
value.action = focus-workspace i;
}
# FIXME: use this action directly untril sodiboo/niri-flake#1018 is fixed.
{
name = "Mod+Shift+${toString i}";
value.action = spawn [niri "msg" "action" "move-column-to-workspace" (toString i)];
}
]) (lib.range 1 9));
};
};
systemd.user.services = {
swaybg = mkService {
Unit.Description = "Wallpaper Chooser";
Service = {
ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
Restart = "always";
};
};
};
};
}

View file

@ -16,8 +16,6 @@ in {
config = mkIf cfg.enable {
xdg.configFile."vpn/work.ovpn" = {
text = ''
conifg /home/zoey/cvpn-client.ovpn
up ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
down ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
'';

View file

@ -13,7 +13,7 @@ in {
};
config = mkIf cfg.enable {
hardware.pulseaudio.enable = false;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
@ -22,100 +22,42 @@ in {
pulse.enable = true;
wireplumber.enable = true;
jack.enable = true;
};
# extraConfig.pipewire.adjust-sample-rate = {
# "context.properties" = {
# "default.clock.rate" = 41000;
# "default.clock.allowed-rates" = [44100];
# };
# };
systemd.user.services.cava-combine-inputs = {
description = "Combine MOTU M4 Line Inputs L/R for Cava";
# wireplumber.extraConfig = {
# "custom" = {
# "monitor.alsa.rules" = [
# {
# matches = [
# {
# "node.name" = "alsa_output.usb-Focusrite_Scarlett_Solo_USB_Y76P5M4160A866-00.HiFi__Line1__sink";
# }
# ];
# actions = {
# update-props = {
# "audio.format" = "S32LE";
# "audio.rate" = 192000;
# "api.alsa.period-size" = 1024;
# };
# };
# }
# {
# matches = [
# {
# "node.name" = "alsa_input.pci-0000_0d_00.4.analog-stereo";
# }
# ];
# actions = {
# update-props = {
# "audio.format" = "S32LE";
# "audio.rate" = 192000;
# "api.alsa.period-size" = 1024;
# };
# };
# }
# {
# matches = [
# {
# "node.name" = "~alsa_output.*";
# }
# ];
# actions = {
# update-props = {
# "api.alsa.period-size" = 1024;
# "api.alsa.headroom" = 8192;
# };
# };
# }
# ];
# };
#
# "99-connect-tt" = {
# "wireplumber.components" = [
# {
# name = "auto-connect-tt.lua";
# type = "script/lua";
# provides = "custom.connect-tt";
# }
# ];
#
# "wireplumber.profiles" = {
# main = {
# "custom.connect-tt" = "required";
# };
# };
# };
# };
# Ensure this runs after pipewire-pulse is started
after = ["pipewire-pulse.service"];
wants = ["pipewire-pulse.service"]; # Start pipewire-pulse if not already running
# wireplumber.extraScripts = {
# "auto-connect-tt.lua" = builtins.readFile ./auto-connect-tt.lua;
# };
# };
#
# # PulseAudio compatibility layer configuration for 44.1kHz
# services.pipewire.extraConfig.pipewire-pulse."92-steam-config" = {
# context.modules = [
# {
# name = "libpipewire-module-protocol-pulse";
# args = {
# pulse.min.req = "32/44100";
# pulse.default.req = "32/44100";
# pulse.min.quantum = "32/44100";
# pulse.max.quantum = "8192/44100";
# };
# }
# ];
# };
#
# environment.sessionVariables = {
# PIPEWIRE_LATENCY = "1024/44100";
# Make it part of the default user session target
wantedBy = ["default.target"];
# Service configuration details
serviceConfig = {
Type = "oneshot"; # Run the command once and exit
# Use RemainAfterExit if you want the service to show as 'active' after running
# RemainAfterExit = true;
# Command to execute. Use full paths for robustness.
# We use sh -c to run multiple commands sequentially.
# pactl is provided by the pulseaudio package.
ExecStart = "${pkgs.writeShellScriptBin "cava-start" ''
echo "Attempting to load Cava combine modules..."
# Load null sink (returns non-zero if it fails AND module doesn't exist)
${pkgs.pulseaudio}/bin/pactl load-module module-null-sink sink_name=cava-line-in sink_properties=device.description="Cava_Combined_LineIn"
# Load loopbacks (returns non-zero on failure)
${pkgs.pulseaudio}/bin/pactl load-module module-loopback source="alsa_input.usb-MOTU_M4_M4MA03F7DV-00.HiFi__Line3__source" sink=cava-line-in latency_msec=10
${pkgs.pulseaudio}/bin/pactl load-module module-loopback source="alsa_input.usb-MOTU_M4_M4MA03F7DV-00.HiFi__Line4__source" sink=cava-line-in latency_msec=10
echo "Finished loading Cava combine modules (ignore errors if already loaded)."
# Exit successfully even if modules were already loaded (pactl might return 0)
exit 0
''}/bin/cava-start";
# Prevent service from restarting automatically
Restart = "no";
};
};
};
}

View file

@ -8,15 +8,132 @@
with lib;
with lib.custom; let
cfg = config.hardware.gpu-passthru;
startScript = ''
#!/run/current-system/sw/bin/bash
# Debugging
exec 19>/home/zoey/Desktop/startlogfile
BASH_XTRACEFD=19
set -x
# Load variables we defined
source "/etc/libvirt/hooks/kvm.conf"
# Change to performance governor
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
# Isolate host to core 0
systemctl set-property --runtime -- user.slice AllowedCPUs=0-8
systemctl set-property --runtime -- system.slice AllowedCPUs=0-8
systemctl set-property --runtime -- init.scope AllowedCPUs=0-8
# disable vpn
mullvad disconnect -w
# Logout
# source "/home/owner/Desktop/Sync/Files/Tools/logout.sh"
# Stop display manager
systemctl stop display-manager.service
killall gdm-wayland-session
killall niri
killall niri-session
# Unbind VTconsoles
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
# Unbind EFI Framebuffer
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
# Avoid race condition
sleep 5
# Unload NVIDIA kernel modules
modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia
# Detach GPU devices from host
virsh nodedev-detach $VIRSH_GPU_VIDEO
virsh nodedev-detach $VIRSH_GPU_AUDIO
# Load vfio module
modprobe vfio-pci
'';
stopScript = ''
#!/run/current-system/sw/bin/bash
# Debugging
exec 19>/home/zoey/Desktop/stoplogfile
BASH_XTRACEFD=19
set -x
# Load variables we defined
source "/etc/libvirt/hooks/kvm.conf"
# Unload vfio module
modprobe -r vfio-pci
# Attach GPU devices from host
virsh nodedev-reattach $VIRSH_GPU_VIDEO
virsh nodedev-reattach $VIRSH_GPU_AUDIO
# Read nvidia x config
nvidia-xconfig --query-gpu-info > /dev/null 2>&1
# Load NVIDIA kernel modules
modprobe nvidia_drm nvidia_modeset nvidia_uvm nvidia
# Avoid race condition
sleep 5
# Bind EFI Framebuffer
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/bind
# Bind VTconsoles
echo 1 > /sys/class/vtconsole/vtcon0/bind
echo 1 > /sys/class/vtconsole/vtcon1/bind
# Start display manager
systemctl start display-manager.service
# Return host to all cores
systemctl set-property --runtime -- user.slice AllowedCPUs=0-31
systemctl set-property --runtime -- system.slice AllowedCPUs=0-31
systemctl set-property --runtime -- init.scope AllowedCPUs=0-31
# Change to powersave governor
echo powersave | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
'';
in {
options.hardware.gpu-passthru = with types; {
enable = mkBoolOpt false "Enable support for single gpu-passthru";
};
config = mkIf cfg.enable {
boot.kernelParams = ["intel_iommu=on" "iommu=pt"];
boot.kernelParams = ["intel_iommu=on" "iommu=pt" "transparent_hugepage=always"];
boot.kernelModules = ["vfio-pci"];
# CachyOS-inspired system performance tweaks
boot.kernel.sysctl = {
# Virtual memory tweaks
"vm.swappiness" = 10;
"vm.dirty_background_ratio" = 5;
"vm.dirty_ratio" = 10;
"vm.vfs_cache_pressure" = 50;
"vm.max_map_count" = 16777216;
# Network optimizations
"net.core.netdev_max_backlog" = 16384;
"net.ipv4.tcp_fastopen" = 3;
"net.ipv4.tcp_max_syn_backlog" = 8192;
"net.core.somaxconn" = 8192;
# IO scheduler optimizations
"kernel.sched_autogroup_enabled" = 0;
};
virtualisation.libvirtd = {
enable = true;
onBoot = "ignore";
@ -56,6 +173,10 @@ in {
in [env];
};
systemd.services.libvirtd-config = {
enable = lib.mkForce false;
};
system.activationScripts.libvirt-hooks.text = ''
ln -Tfs /etc/libvirt/hooks /var/lib/libvirt/hooks
'';
@ -113,104 +234,12 @@ in {
};
"libvirt/hooks/qemu.d/win10/prepare/begin/start.sh" = {
text = ''
#!/run/current-system/sw/bin/bash
# Debugging
exec 19>/home/zoey/Desktop/startlogfile
BASH_XTRACEFD=19
set -x
# Load variables we defined
source "/etc/libvirt/hooks/kvm.conf"
# Change to performance governor
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
# Isolate host to core 0
systemctl set-property --runtime -- user.slice AllowedCPUs=0-8
systemctl set-property --runtime -- system.slice AllowedCPUs=0-8
systemctl set-property --runtime -- init.scope AllowedCPUs=0-8
# disable vpn
mullvad disconnect -w
# Logout
# source "/home/owner/Desktop/Sync/Files/Tools/logout.sh"
# Stop display manager
systemctl stop display-manager.service
killall gdm-wayland-session
# Unbind VTconsoles
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
# Unbind EFI Framebuffer
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
# Avoid race condition
sleep 5
# Unload NVIDIA kernel modules
modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia
# Detach GPU devices from host
virsh nodedev-detach $VIRSH_GPU_VIDEO
virsh nodedev-detach $VIRSH_GPU_AUDIO
# Load vfio module
modprobe vfio-pci
'';
text = startScript;
mode = "0755";
};
"libvirt/hooks/qemu.d/win10/release/end/stop.sh" = {
text = ''
#!/run/current-system/sw/bin/bash
# Debugging
exec 19>/home/zoey/Desktop/stoplogfile
BASH_XTRACEFD=19
set -x
# Load variables we defined
source "/etc/libvirt/hooks/kvm.conf"
# Unload vfio module
modprobe -r vfio-pci
# Attach GPU devices from host
virsh nodedev-reattach $VIRSH_GPU_VIDEO
virsh nodedev-reattach $VIRSH_GPU_AUDIO
# Read nvidia x config
nvidia-xconfig --query-gpu-info > /dev/null 2>&1
# Load NVIDIA kernel modules
modprobe nvidia_drm nvidia_modeset nvidia_uvm nvidia
# Avoid race condition
sleep 5
# Bind EFI Framebuffer
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/bind
# Bind VTconsoles
echo 1 > /sys/class/vtconsole/vtcon0/bind
echo 1 > /sys/class/vtconsole/vtcon1/bind
# Start display manager
systemctl start display-manager.service
# Return host to all cores
systemctl set-property --runtime -- user.slice AllowedCPUs=0-31
systemctl set-property --runtime -- system.slice AllowedCPUs=0-31
systemctl set-property --runtime -- init.scope AllowedCPUs=0-31
# Change to powersave governor
echo powersave | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
'';
text = stopScript;
mode = "0755";
};
};

View file

@ -44,7 +44,43 @@ in {
nvidiaSettings = false;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.beta;
package = config.boot.kernelPackages.nvidiaPackages.stable;
# package = config.boot.kernelPackages.nvidiaPackages.beta.overrideAttrs {
# patchesOpen = with pkgs; [
# (fetchpatch {
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0001-Enable-atomic-kernel-modesetting-by-default.patch";
# hash = "sha256-tvdm8nxxXslPUun33zj1kkYZOiWKK3F4nwcCkdzPW9s=";
# })
# (fetchpatch {
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0002-Add-IBT-support.patch";
# hash = "sha256-JUT8FwBhyRhOWxwET7Zw/xkIl8g6UCLMXSTofr0OuSg=";
# })
# (fetchpatch {
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0003-Kbuild-Convert-EXTRA_CFLAGS-to-ccflags-y.patch";
# hash = "sha256-W+yyiK6TpEs9IACMr/0V7EIP++u7MPOfa9ko3w8Gqtc=";
# })
# (fetchpatch {
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0004-kernel-open-nvidia-Use-new-timer-functions-for-6.15.patch";
# hash = "sha256-T3SY2O6Pmc8BA0oana5xGGDhBxCizwmRqMyPvgF3j8A=";
# })
# (fetchpatch {
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0005-nvidia-uvm-Use-__iowrite64_hi_lo.patch";
# hash = "sha256-T8BNr1H1vgEQoKB0S5cqcbq6fSQxiDK9bb/MCvMtzTI";
# })
# (fetchpatch {
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0006-nvidia-uvm-Use-page_pgmap.patch";
# hash = "sha256-YucFZ2Z7YSgUiah82uLOmd4Z/c5YLOXxzEZNO6ZvQQg=";
# })
# (fetchpatch {
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0007-nvidia-uvm-Convert-make_device_exclusive_range-to-ma.patch";
# hash = "sha256-AehV7D+yYBmE8FWsUiagnjB8V7S8RJSTNcVMwZIgw/I=";
# })
# (fetchpatch {
# url = "https://raw.githubusercontent.com/CachyOS/kernel-patches/master/6.14/misc/nvidia/0008-kbuild-Add-workaround-for-GCC-15-Compilation.patch";
# hash = "sha256-HrYBiAFy62Jll+ceVnGuJKGKDoaRObjAGIYa+yrAogA=";
# })
# ];
# };
};
environment.variables = {

View file

@ -15,35 +15,35 @@ in {
};
config = mkIf cfg.enable {
environment.etc."greetd/environments".text = ''
sway
'';
services = {
greetd = {
enable = false;
settings = rec {
initial_session = {
# command = "sway --unsupported-gpu";
command = "Hyprland";
user = "zoey";
};
default_session = initial_session;
services.greetd = {
enable = false;
settings = {
default_session = {
command = "niri-session";
user = "zoey";
};
};
};
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.wayland = true;
# services.displayManager.sddm.enable = true;
# services.displayManager.sddm.package = lib.mkForce pkgs.kdePackages.sddm;
programs.uwsm = {
enable = true;
# waylandCompositors = {
# "mwc" = {
# prettyName = "MWC";
# binPath = "/run/current-system/sw/bin/mwc";
# comment = "previously owl";
# };
# };
waylandCompositors = {
# "mwc" = {
# prettyName = "MWC";
# binPath = "/run/current-system/sw/bin/mwc";
# comment = "previously owl";
# };
# niri = {
# prettyName = "niri";
# binPath = "/run/current-system/sw/bin/niri";
# comment = "niri";
# };
};
};
# environment.systemPackages = [
@ -51,14 +51,15 @@ in {
# ];
programs.hyprland = {
withUWSM = true;
enable = true;
withUWSM = false;
enable = false;
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
};
programs.niri.enable = false;
programs.niri.enable = true;
programs.niri.package = inputs.niri-src.packages.${pkgs.system}.niri;
environment = {
variables = {
@ -78,26 +79,31 @@ in {
WLR_BACKEND = "wayland";
WLR_RENDERER = "wayland";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
SDL_VIDEODRIVER = "wayland,x11";
XDG_CACHE_HOME = "/home/zoey/.cache";
CLUTTER_BACKEND = "wayland";
DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
# # CachyOS-inspired Nvidia optimizations for gaming
# __GL_THREADED_OPTIMIZATIONS = "1";
# __GL_SHADER_DISK_CACHE = "1";
# __GL_SHADER_DISK_CACHE_SIZE = "1000000000";
# __GL_MaxFramesAllowed = "1"; # Reduces input latency
# __GL_YIELD = "USLEEP"; # Better CPU usage when GPU-bound
# DXVK_ASYNC = "1";
# DXVK_FRAME_RATE = "0"; # No frame rate cap from DXVK
# PROTON_ENABLE_NVAPI = "1";
# PROTON_HIDE_NVIDIA_GPU = "0";
# WINE_FULLSCREEN_FSR = "1"; # Enable FSR upscaling for Wine/Proton games
# MANGOHUD = "1"; # Enable MangoHud by default
# MANGOHUD_CONFIG = "cpu_temp,gpu_temp,vram,ram,position=top-left,height=500,font_size=20";
};
loginShellInit = ''
dbus-update-activation-environment --systemd DISPLAY
eval $(gnome-keyring-daemon --start --components=ssh,secrets)
eval $(ssh-agent)
'';
};
hardware.pulseaudio.support32Bit = true;
services.pulseaudio.support32Bit = true;
xdg.portal = {
enable = true;
wlr.enable = false;
config.common.default = "*";
extraPortals = [
pkgs.xdg-desktop-portal-gtk
# pkgs.xwaylandvideobridge
];
};

View file

@ -0,0 +1,23 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.services.gdm-monitors;
montiorsXmlContent = builtins.readFile ./monitors.xml;
monitorsConfig = pkgs.writeText "gdm_monitors.xml" montiorsXmlContent;
in {
options.services.gdm-monitors = with types; {
enable = mkBoolOpt false "Enable Monitors config for GDM";
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"L+ /run/gdm/.config/monitors.xml - - - - ${monitorsConfig}"
];
};
}

View file

@ -0,0 +1,24 @@
<monitors version="2">
<configuration>
<layoutmode>physical</layoutmode>
<logicalmonitor>
<x>0</x>
<y>0</y>
<scale>1</scale>
<primary>yes</primary>
<monitor>
<monitorspec>
<connector>DP-1</connector>
<vendor>AUS</vendor>
<product>PG27AQDM</product>
<serial>R5LMRS022182</serial>
</monitorspec>
<mode>
<width>2560</width>
<height>1440</height>
<rate>239.972</rate>
</mode>
</monitor>
</logicalmonitor>
</configuration>
</monitors>

View file

@ -27,6 +27,10 @@ in {
};
zach-pw.file = ./sec/zach-pw.age;
emily-pw.file = ./sec/emily-piccat.age;
smtp-password.file = ./sec/smtpPassword.age;
gitlab-email-pw-hashed.file = ./sec/gitlab-email-pw-hashed.age;
};
mailserver = {
@ -37,7 +41,7 @@ in {
loginAccounts = {
"zoey@zoeys.email" = {
hashedPasswordFile = sec.webmaster-pw.path;
aliases = ["zoey@zoeys.cloud" "postmaster@zoeys.email" "abuse@zoeys.email"];
aliases = ["zoey@zoeys.cloud" "errors@zoeys.cloud" "admin@zoeys.cloud" "postmaster@zoeys.email" "abuse@zoeys.email"];
};
"hi@zoeys.computer" = {
hashedPasswordFile = sec.zoeycomputer-pw.path;
@ -51,6 +55,13 @@ in {
hashedPasswordFile = sec.emily-pw.path;
aliases = ["emily@pictureofcat.com"];
};
"gitlab@zoeys.cloud" = {
hashedPasswordFile = sec.gitlab-email-pw-hashed.path;
aliases = ["noreply@zoeys.cloud"];
};
"no-reply@code.zoeys.cloud" = {
hashedPasswordFile = sec.smtp-password.path;
};
};
certificateScheme = "acme-nginx";

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 CtmR6w 5VDFuttJ1VBYa4fBxMv/Ws96h3lQMtDtt4kift5TggY
iHhoBRnhFOG7AYWAWcgEbX0ABUNgIWHHUpterkkMunc
-> ssh-ed25519 +be3hg zpo9T3n1X5PipJjEgOqgSJSwhIZu19rLcQP3zPILWRM
SJp+lVPB997tCMucqfGgqXOougiSoMoGMd/tozTTT0Q
--- /uEWB/Q4G4hy0t+hEIeID0Ymqy+qGrnrK5AgwPhs82Y
ýýI?è¢<C3A8>.þ_Q}lïÐ3/˳¨Û3æ<33>9 8J ®KÔÅ™aJ:ký*-Š;5Ê%Ô7£y

View file

@ -19,24 +19,6 @@ in {
enable = cfg.mullvad;
package = nixos-stable.mullvad;
};
#
# # Create a specific network namespace for VPN traffic
# systemd.services.mullvad-daemon = {
# serviceConfig = {
# NetworkNamespacePath = "/run/netns/mullvad";
# };
# };
#
# # Configure transmission to use Mullvad's SOCKS5 proxy
# # Configure transmission to use the Mullvad network namespace
# systemd.services.transmission = mkIf config.services.transmission.enable {
# serviceConfig = {
# NetworkNamespacePath = "/run/netns/mullvad";
# };
# # Make sure Mullvad is running before transmission starts
# requires = ["mullvad-daemon.service"];
# after = ["mullvad-daemon.service"];
# };
services.openvpn = {
servers = {
@ -48,22 +30,5 @@ in {
};
systemd.services.openvpn-work.wantedBy = lib.mkForce [];
# # Add necessary networking tools
# environment.systemPackages = with pkgs; [
# iproute2 # for ip netns commands
# ];
#
# # Setup network namespace
# systemd.services.setup-mullvad-netns = {
# description = "Setup Mullvad Network Namespace";
# before = ["mullvad-daemon.service"];
# serviceConfig = {
# Type = "oneshot";
# RemainAfterExit = true;
# ExecStart = "${pkgs.iproute2}/bin/ip netns add mullvad";
# ExecStop = "${pkgs.iproute2}/bin/ip netns delete mullvad";
# };
# };
};
}

View file

@ -24,6 +24,7 @@ in {
services.nix-serve = {
enable = true;
secretKeyFile = sec.cache_key.path;
port = 12024;
};
services.nginx.virtualHosts."cache.zoeys.computer" = {

View file

@ -0,0 +1,107 @@
{
lib,
config,
pkgs,
inputs,
...
}:
with lib;
with lib.custom; let
cfg = config.sites.forgejo;
frg = config.services.forgejo;
srv = frg.settings.server;
in {
options.sites.forgejo = with types; {
enable = mkBoolOpt false "Enable Forgejo site";
domain = mkStringOpt "code.zoeys.cloud" "The domain for the site";
};
config = mkIf cfg.enable {
services.nginx.virtualHosts.${frg.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
};
catppuccin.forgejo.enable = true;
services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances.default = {
enable = true;
name = "monolith";
url = "https://code.zoeys.cloud";
# Obtaining the path to the runner token file may differ
# tokenFile should be in format TOKEN=<secret>, since it's EnvironmentFile for systemd
tokenFile = config.age.secrets.forgejo-runner-token.path;
labels = [
"ubuntu-latest:docker://node:16-bullseye"
"ubuntu-22.04:docker://node:16-bullseye"
"ubuntu-20.04:docker://node:16-bullseye"
"ubuntu-18.04:docker://node:16-buster"
## optionally provide native execution on the host:
# "native:host"
];
};
};
services.forgejo = {
enable = true;
database.type = "postgres";
lfs.enable = true;
settings = {
server = {
DOMAIN = cfg.domain;
ROOT_URL = "https://${srv.DOMAIN}";
HTTP_PORT = 7201;
};
service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
mailer = {
ENABLED = true;
SMTP_ADDR = "mail.zoeys.cloud";
FROM = "no-reply@${srv.DOMAIN}";
USER = "no-reply@${srv.DOMAIN}";
};
};
secrets = {
mailer = {
PASSWD = config.age.secrets.forgejo-mailer-password.path;
};
};
};
systemd.services.forgejo.preStart = let
adminCmd = "${lib.getExe frg.package} admin user";
pwd = config.age.secrets.forgejo-pw;
user = "zoey";
in ''
${adminCmd} create --admin --email "hi@zoeys.computer" --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true'';
age.secrets = {
forgejo-mailer-password = {
file = ../sourcehut/sec/smtpPassword.age;
mode = "400";
owner = "forgejo";
};
forgejo-pw = {
file = ./forgejoPw.age;
mode = "400";
owner = "forgejo";
};
forgejo-runner-token = {
file = ./forgejoRunner.age;
mode = "400";
owner = "forgejo";
};
};
};
}

Binary file not shown.

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 CtmR6w oShhq0zXjjMoDW0+AZx/ro5x3XZ/Smf//Han2rZdA0o
ucJn5M9x66gxKPmkVg1E4F/PsZ7rBTA8MlUAbmIC+2s
-> ssh-ed25519 RMNffg GBNcFhRuZyme2t/yrWDS/lrQzpm1wHUkAhjLz86ZG3I
bpsZdqqP205zT9F7Ca5jtCn/qfKcI/gTxANQOPLWnnA
--- JbJQpU8FaE6TPHMyX4SmDQLEI8b67SaFG73nUc+Ud3s
"'Åx<C385>táoph°ðhç5]Ž|Új1‰_e#mDö~mvŒÈ¢o˜ÊRfúùðfëoÕ<>óÅ"RžÜêf8uuU?¯

View file

@ -48,48 +48,15 @@ in {
gitlab_runner = {
file = ./sec/gitlab_runner.age;
};
gitlab_email_pw = {
file = ./sec/gitlab-email-pw.age;
owner = user;
group = group;
};
};
boot.kernel.sysctl."net.ipv4.ip_forward" = true; # 1
services.gitlab-runner = {
enable = true;
services = {
nix = with lib; {
authenticationTokenConfigFile = sec.gitlab_runner.path;
dockerImage = "alpine";
dockerVolumes = [
"/nix/store:/nix/store:ro"
"/nix/var/nix/db:/nix/var/nix/db:ro"
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
];
dockerDisableCache = true;
preBuildScript = pkgs.writeScript "setup-container" ''
mkdir -p -m 0755 /nix/var/log/nix/drvs
mkdir -p -m 0755 /nix/var/nix/gcroots
mkdir -p -m 0755 /nix/var/nix/profiles
mkdir -p -m 0755 /nix/var/nix/temproots
mkdir -p -m 0755 /nix/var/nix/userpool
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
mkdir -p -m 0700 "$HOME/.nix-defexpr"
. ${pkgs.nix}/etc/profile.d/nix-daemon.sh
${pkgs.nix}/bin/nix-channel --add https://nixos.org/channels/nixos-24.11 nixpkgs # 3
${pkgs.nix}/bin/nix-channel --update nixpkgs
${pkgs.nix}/bin/nix-env -i ${concatStringsSep " " (with pkgs; [nix cacert git openssh])}
'';
environmentVariables = {
ENV = "/etc/profile";
USER = "root";
NIX_REMOTE = "daemon";
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
};
};
};
};
services.gitlab = {
enable = true;
databasePasswordFile = sec.gitlab_db.path;
@ -97,6 +64,15 @@ in {
port = 443;
https = true;
host = cfg.domain;
smtp = {
enable = true;
address = "mail.zoeys.cloud";
username = "gitlab@zoeys.cloud";
passwordFile = sec.gitlab_email_pw.path;
port = 465;
};
secrets = {
secretFile = sec.gitlab_sec.path;
otpFile = sec.gitlab_otp.path;

View file

@ -0,0 +1,8 @@
age-encryption.org/v1
-> ssh-ed25519 CtmR6w wfPgH83/+qjITFELir/Q/zjH+wjlgrU+HNC5eOsFhg8
orHZwCQOmlK9TFHOEOb/K2FszXoMbQfwHdYAbKIOnR0
-> ssh-ed25519 RMNffg E7mah8eqt9cDw2SKQTah25M4j/iIWhPHtrtmJpSPDgo
eeoo3cfoiVh8xF9TVy9cKUlAw6NBhMg1iFs8JlpquPA
--- NB2RNduULAMPoBmfRByWGL1hdK5/b5kDe4vnzdW1Hb0
±¶Hú"y£“«=Ùúñ,”î«ÐµÎè5|V0âý´1´²qA³sNIÜÉ—R£qè¤NY!§Œl×®bÚ\LG·®e{En'™£ó<C2A3>Í”ØFh<B+sŽ¥Ìޝš£v»ñc©Œèeˆ¶Ø4Û+ K÷…].<2E>¦9éü<1D>k\ý(ž’ÿÈ?¯çPÎk~Yy¤
¥ˆ•!€w®ùÉ

View file

@ -20,17 +20,17 @@ in {
group = "users";
};
virtualisation.oci-containers = {
containers.jellyfin-vue = {
image = "ghcr.io/jellyfin/jellyfin-vue:unstable";
environment = {
"PUBLIC_JELLYFIN_API" = "http://localhost:8096";
};
ports = [
"8065:80"
];
};
};
# virtualisation.oci-containers = {
# containers.jellyfin-vue = {
# image = "ghcr.io/jellyfin/jellyfin-vue:unstable";
# environment = {
# "PUBLIC_JELLYFIN_API" = "http://localhost:8096";
# };
# ports = [
# "8065:80"
# ];
# };
# };
networking.firewall.allowedTCPPorts = [8065];
};

View file

@ -0,0 +1,204 @@
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.sites.sourcehut;
srhtCfg = config.services.sourcehut;
fqdn = "zoeys.cloud";
sec = config.age.secrets;
sourcehutGroup = "sourcehut-secrets";
mkSrhtBindOverrides = serviceNames:
lib.listToAttrs (map (name: {
name = name;
value = {
serviceConfig.BindReadOnlyPaths = lib.mkMerge ["/run/agenix"];
};
})
serviceNames);
metaServices = lib.mkIf srhtCfg.meta.enable (mkSrhtBindOverrides [
"metasrht" # Main web service
"metashrt-daily"
"metasrht-api" # API service
"metasrht-webhooks" # Webhook worker
]);
gitServices = lib.mkIf srhtCfg.git.enable (mkSrhtBindOverrides [
"gitsrht" # Main web service
"gitsrht-api" # API service
"gitsrht-periodic" # Timer service
"gitsrht-webhooks" # Webhook worker
"gitsrht-fcgiwrap" # FCGIWrap for git http backend (might need access if hooks use secrets)
]);
manServices = lib.mkIf srhtCfg.man.enable (mkSrhtBindOverrides [
"mansrht" # Main web service
# Add others if man gains sub-services
]);
in {
options.sites.sourcehut = with types; {
enable = mkBoolOpt false "Enable SRHT";
};
config = mkIf cfg.enable {
users.groups.sourcehut-secrets = {};
users.users.metasrht.extraGroups = ["sourcehut-secrets"];
users.users.gitsrht.extraGroups = ["sourcehut-secrets"];
systemd.services = lib.mkMerge [
metaServices
gitServices
];
age.secrets = {
network-key = {
file = ./sec/networkKey.age;
owner = "root";
group = sourcehutGroup;
mode = "0440";
};
service-key = {
file = ./sec/serviceKey.age;
owner = "root";
group = sourcehutGroup;
mode = "0440";
};
webhook-key = {
file = ./sec/webhookKey.age;
owner = "root";
group = sourcehutGroup;
mode = "0440";
};
smtp-password = {
file = ./sec/smtpPassword.age;
owner = "root";
group = sourcehutGroup;
mode = "0440";
};
pgp-pub-key = {
file = ./sec/pgpPubKey.age;
owner = "root";
group = sourcehutGroup;
mode = "0440"; # Or 0444 if it needs to be world-readable, but 0440 is safer
};
pgp-priv-key = {
file = ./sec/pgpPrivKey.age;
owner = "root";
group = sourcehutGroup;
mode = "0440"; # Private key needs strict permissions
};
git-client-secret = {
file = ./sec/gitClientSecret.age;
owner = "root";
group = sourcehutGroup;
mode = "0440";
};
man-client-secret = {
file = ./sec/gitClientSecret.age;
owner = "root";
group = sourcehutGroup;
mode = "0440";
};
};
services.sourcehut = {
enable = true;
git.enable = true;
git.redis.host = "redis://localhost:6379?db=0";
man.enable = true;
man.redis.host = "redis://localhost:6379?db=0";
meta.enable = true;
meta.redis.host = "redis://localhost:6379?db=0";
# todo.enable = true;
# paste.enable = true;
# lists.enable = true;
nginx.enable = true;
postgresql.enable = true;
redis.enable = true;
postfix.enable = false;
settings = {
"sr.ht" = {
environment = "production";
global-domain = fqdn;
origin = "https://${fqdn}";
owner-email = "admin@${fqdn}";
owner-name = "zoey";
site-name = "zoey's cloud";
network-key = sec.network-key.path;
service-key = sec.service-key.path;
};
webhooks = {
private-key = sec.webhook-key.path;
};
"git.sr.ht" = {
oauth-client-id = "bdd69307-d8b9-4f02-b079-2a1055c3e865";
oauth-client-secret = sec.git-client-secret.path;
};
"man.sr.ht" = {
oauth-client-id = "9c64aac1-51cb-48f0-9ff8-a2af377dd38e";
oauth-client-secret = sec.man-client-secret.path;
};
mail = {
smtp-host = "mail.zoeys.email";
smtp-port = 465;
smtp-user = "srht@${fqdn}";
smtp-password = sec.smtp-password.path;
smtp-from = "no-reply@${fqdn}";
smtp-ssl = true;
pgp-pubkey = sec.pgp-pub-key.path;
pgp-privkey = sec.pgp-priv-key.path;
pgp-key-id = "0xD82899ACCD75CC48";
error-to = "errors@${fqdn}";
error-from = "sourcehut-errors@${fqdn}";
};
"meta.sr.ht::settings" = {
registration = true;
};
};
};
security.acme.certs."${fqdn}".extraDomainNames = [
"meta.${fqdn}"
"man.${fqdn}"
"git.${fqdn}"
];
services.nginx = {
virtualHosts = {
"${fqdn}".enableACME = true;
"meta.${fqdn}".enableACME = true;
"man.${fqdn}".enableACME = true;
"git.${fqdn}".enableACME = true;
};
};
};
}

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 CtmR6w sWwNYqQ3g9UMu35p8kvAXj4uEy35g0///7gpHFO69zs
1lQ0r74sGR+K/ynikwClNB5UZ3ZD1fTpxSdJE5Dk0nM
-> ssh-ed25519 RMNffg vqaQVHXN7yjv10wz2xZCpJ6O7fqXaNYCPqKEdufkdCc
FLFvodvpQGPYbjv8yoyjHE2+a+YyZkBGZZbOx33GpRo
--- H3zEDss69sqnW3LM5GlWR11xx9E8u04/id6jlZqNgfg
J^s=†ÕYЭ_ÂŒü¤/À ÉȤ¸Ziýþ#?Lu—œ”Ú3Ñ~vH¢c9^î™Cù‡²…²üuŸ»ßÚp[ÉcúCS<43>Sv¹S

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 CtmR6w ExpktzFWkofB1qmGIexwu0UAnUeGzQIeeEMHiZNXQkY
YDNPPLtB8N7A0NB0VwVkQAN3DNeknLo3rv+WdcUdLD0
-> ssh-ed25519 RMNffg GFHzl2/nPuIVH4RzUnbUl/LHFmkXQ+pPUGuQzcEZi3o
Z6iMUjgD0K7LCYWV0qZMbyzWmUsbhp0anr3niecdyPs
--- wjP9Fn9/VIrsgwbTVZv/vzbEskwMKmQbHohtNyfF02w
Ýžsý§zš‡<EFBFBD> ÍKQŽÐäb #&™ÖTÆ3v/<2F>ÂÐg¨Õ¨%ë½fõî›\^œj²QÜqh

Binary file not shown.

View file

@ -29,35 +29,117 @@ in {
lexend
jost
dejavu_fonts
iosevka
# iosevka
cantarell-fonts
# (iosevka.override
# {
# set = "Custom";
# privateBuildPlan = ''
# [buildPlans.IosevkaCustom]
# family = "Iosevka"
# spacing = "normal"
# serifs = "sans"
# noCvSs = true
# exportGlyphNames = true
#
# [buildPlans.IosevkaCustom.variants]
# inherits = "ss08"
#
# [buildPlans.IosevkaCustom.widths.Normal]
# shape = 500
# menu = 5
# css = "normal"
# '';
# })
(iosevka.override
{
set = "Custom";
privateBuildPlan = ''
# [buildPlans.IosevkaCustom]
# family = "Iosevka"
# spacing = "fontconfig-mono"
# serifs = "sans"
# noCvSs = true
# exportGlyphNames = true
#
# [buildPlans.IosevkaCustom.variants]
# inherits = "ss08"
#
# [buildPlans.IosevkaCustom.widths.Normal]
# shape = 500
# menu = 5
# css = "normal"
#
# [buildPlans.IosevkaCustom.widths.Extended]
# shape = 600
# menu = 7
# css = "expanded"
[buildPlans.IosevkaCustom]
family = "Iosevka"
spacing = "normal"
serifs = "sans"
noCvSs = true
exportGlyphNames = true
[buildPlans.IosevkaCustom.variants.design]
one = "base-flat-top-serif"
two = "straight-neck-serifless"
four = "closed-serifless"
five = "oblique-arched-serifless"
six = "closed-contour"
seven = "bend-serifless"
eight = "crossing-asymmetric"
nine = "closed-contour"
zero = "oval-dotted"
capital-d = "more-rounded-serifless"
capital-g = "toothless-corner-serifless-hooked"
a = "double-storey-serifless"
g = "double-storey"
i = "hooky"
l = "serifed-semi-tailed"
r = "hookless-serifless"
t = "bent-hook-short-neck"
w = "straight-flat-top-serifless"
y = "straight-turn-serifless"
capital-eszet = "rounded-serifless"
long-s = "bent-hook-middle-serifed"
eszet = "longs-s-lig-serifless"
lower-lambda = "straight-turn"
lower-tau = "short-tailed"
lower-phi = "straight"
partial-derivative = "closed-contour"
cyrl-capital-u = "straight-turn-serifless"
cyrl-u = "straight-turn-serifless"
cyrl-ef = "split-serifless"
asterisk = "penta-low"
caret = "high"
guillemet = "straight"
number-sign = "slanted"
dollar = "open"
cent = "through-cap"
bar = "force-upright"
micro-sign = "tailed-serifless"
lig-ltgteq = "slanted"
lig-neq = "more-slanted-dotted"
lig-equal-chain = "without-notch"
lig-hyphen-chain = "without-notch"
lig-plus-chain = "with-notch"
[buildPlans.IosevkaCustom.weights.Regular]
shape = 400
menu = 400
css = 400
[buildPlans.IosevkaCustom.weights.Bold]
shape = 700
menu = 700
css = 700
[buildPlans.IosevkaCustom.slopes.Upright]
angle = 0
shape = "upright"
menu = "upright"
css = "normal"
[buildPlans.IosevkaCustom.slopes.Italic]
angle = 9.4
shape = "italic"
menu = "italic"
css = "italic"
'';
})
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
jetbrains-mono
nerd-fonts.iosevka
nerd-fonts.zed-mono
nerd-fonts.fira-code
nerd-fonts.jetbrains-mono
adwaita-fonts
cozette
scientifica
# (nerdfonts.override {fonts = ["ZedMono" "Iosevka"];})
];
@ -67,12 +149,11 @@ in {
fontconfig = {
defaultFonts = {
monospace = [
# "Pragmata Pro Mono"
"Iosevka"
fonts.mono
"Noto Color Emoji"
];
sansSerif = ["Adwaita Sans" "Noto Color Emoji"];
serif = ["Noto Serif" "Noto Color Emoji"];
sansSerif = [fonts.ui "Noto Color Emoji"];
serif = [fonts.ui "Noto Color Emoji"];
emoji = ["Noto Color Emoji"];
};
};

View file

@ -0,0 +1,23 @@
self: super: {
nixosModules =
super.nixosModules
// {
libvirtd = {
config,
lib,
pkgs,
...
} @ args: let
originalModule = import super.nixosModules.libvirtd args;
in
lib.mkMerge [
originalModule
{
config = lib.mkIf config.virtualisation.libvirtd.enable {
virtualisation.libvirtd.hooks = lib.mkForce {};
};
}
];
};
}

View file

@ -1,430 +0,0 @@
{
buildNpmPackage,
buildPackages,
fetchFromGitHub,
fetchurl,
lib,
overrideCC,
stdenv,
# build time
autoconf,
cargo,
dump_syms,
git,
gnum4,
nodejs,
patchelf,
pkg-config,
pkgsBuildBuild,
pkgsCross,
python3,
runCommand,
rsync,
rustc,
rust-cbindgen,
rustPlatform,
unzip,
vips,
wrapGAppsHook3,
writeShellScript,
# runtime
alsa-lib,
atk,
cairo,
cups,
dbus,
dbus-glib,
ffmpeg,
fontconfig,
freetype,
gdk-pixbuf,
gtk3,
glib,
icu73,
jemalloc,
libGL,
libGLU,
libdrm,
libevent,
libffi,
libglvnd,
libjack2,
libjpeg,
libkrb5,
libnotify,
libpng,
libpulseaudio,
libstartup_notification,
libva,
libvpx,
libwebp,
libxkbcommon,
libxml2,
makeWrapper,
mesa,
nasm,
nspr,
nss_latest,
pango,
pciutils,
pipewire,
sndio,
udev,
xcb-util-cursor,
xorg,
zlib,
# Generic changes the compatibility mode of the final binaries.
#
# Enabling generic will make the browser compatible with more devices at the
# cost of disabling hardware-specific optimizations. It is highly recommended
# to leave `generic` disabled.
generic ? false,
debugBuild ? false,
# On 32bit platforms, we disable adding "-g" for easier linking.
enableDebugSymbols ? !stdenv.hostPlatform.is32bit,
alsaSupport ? stdenv.hostPlatform.isLinux,
ffmpegSupport ? true,
gssSupport ? true,
jackSupport ? stdenv.hostPlatform.isLinux,
jemallocSupport ? !stdenv.hostPlatform.isMusl,
pipewireSupport ? waylandSupport && webrtcSupport,
pulseaudioSupport ? stdenv.hostPlatform.isLinux,
sndioSupport ? stdenv.hostPlatform.isLinux,
waylandSupport ? true,
privacySupport ? false,
# WARNING: NEVER set any of the options below to `true` by default.
# Set to `!privacySupport` or `false`.
crashreporterSupport ? !privacySupport && !stdenv.hostPlatform.isRiscV && !stdenv.hostPlatform.isMusl,
geolocationSupport ? !privacySupport,
webrtcSupport ? !privacySupport,
}: let
surfer = buildNpmPackage {
pname = "surfer";
version = "1.5.0";
src = fetchFromGitHub {
owner = "zen-browser";
repo = "surfer";
rev = "50af7094ede6e9f0910f010c531f8447876a6464";
hash = "sha256-wmAWg6hoICNHfoXJifYFHmyFQS6H22u3GSuRW4alexw=";
};
patches = [./surfer-dont-check-update.patch];
npmDepsHash = "sha256-p0RVqn0Yfe0jxBcBa/hYj5g9XSVMFhnnZT+au+bMs18=";
makeCacheWritable = true;
SHARP_IGNORE_GLOBAL_LIBVIPS = false;
nativeBuildInputs = [pkg-config];
buildInputs = [vips];
};
llvmPackages0 = rustc.llvmPackages;
llvmPackagesBuildBuild0 = pkgsBuildBuild.rustc.llvmPackages;
llvmPackages = llvmPackages0.override {
bootBintoolsNoLibc = null;
bootBintools = null;
};
llvmPackagesBuildBuild = llvmPackagesBuildBuild0.override {
bootBintoolsNoLibc = null;
bootBintools = null;
};
buildStdenv = overrideCC llvmPackages.stdenv (
llvmPackages.stdenv.cc.override {bintools = buildPackages.rustc.llvmPackages.bintools;}
);
inherit (pkgsCross) wasi32;
wasiSysRoot = runCommand "wasi-sysroot" {} ''
mkdir -p "$out"/lib/wasm32-wasi
for lib in ${wasi32.llvmPackages.libcxx}/lib/*; do
ln -s "$lib" "$out"/lib/wasm32-wasi
done
'';
firefox-l10n = fetchFromGitHub {
owner = "mozilla-l10n";
repo = "firefox-l10n";
rev = "9d639cd79d6b73081fadb3474dd7d73b89732e7b";
hash = "sha256-+2JCaPp+c2BRM60xFCeY0pixIyo2a3rpTPaSt1kTfDw=";
};
in
buildStdenv.mkDerivation (finalAttrs: {
pname = "zen-browser-unwrapped";
version = "1.0.2-b.0";
src = fetchFromGitHub {
owner = "zen-browser";
repo = "desktop";
rev = "df4ea8794f957c8e409adef9b2c3325be710c626";
hash = "sha256-vPe/hTJozJdCbq5GK87MGBh+Nybs8et+6ukm0Fdz3uA=";
fetchSubmodules = true;
};
# DO NOT UPDATE THE FIREFOX VERSION MANUALLY!
#
# Both `firefoxVersion` and `firefoxSrc` are managed by the `update.sh` script.
# The Firefox version is specified by `zen-browser` in the `surfer.json` file.
#
# We need to manually set the version here to avoid IFD.
firefoxVersion = "133.0.3";
firefoxSrc = fetchurl {
url = "mirror://mozilla/firefox/releases/${finalAttrs.firefoxVersion}/source/firefox-${finalAttrs.firefoxVersion}.source.tar.xz";
hash = "sha256-8TSlQgIAuwOrRg+dKGdQfA7bIiznP69AZM2+oCoKyhs=";
};
SURFER_COMPAT = generic;
nativeBuildInputs =
[
autoconf
cargo
git
gnum4
llvmPackagesBuildBuild.bintools
makeWrapper
nasm
nodejs
pkg-config
python3
rsync
rust-cbindgen
rustPlatform.bindgenHook
rustc
surfer
unzip
wrapGAppsHook3
xorg.xvfb
]
++ lib.optionals crashreporterSupport [
dump_syms
patchelf
];
buildInputs =
[
atk
cairo
cups
dbus
dbus-glib
ffmpeg
fontconfig
freetype
gdk-pixbuf
gtk3
glib
icu73
libGL
libGLU
libevent
libffi
libglvnd
libjpeg
libnotify
libpng
libstartup_notification
libva
libvpx
libwebp
libxml2
mesa
nspr
nss_latest
pango
pciutils
pipewire
udev
xcb-util-cursor
xorg.libX11
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXft
xorg.libXi
xorg.libXrender
xorg.libXt
xorg.libXtst
xorg.pixman
xorg.xorgproto
xorg.libxcb
xorg.libXrandr
xorg.libXcomposite
xorg.libXfixes
xorg.libXScrnSaver
zlib
]
++ lib.optional alsaSupport alsa-lib
++ lib.optional jackSupport libjack2
++ lib.optional pulseaudioSupport libpulseaudio
++ lib.optional sndioSupport sndio
++ lib.optional gssSupport libkrb5
++ lib.optional jemallocSupport jemalloc
++ lib.optionals waylandSupport [
libdrm
libxkbcommon
];
configureFlags =
[
"--disable-bootstrap"
"--disable-updater"
"--enable-default-toolkit=cairo-gtk3${lib.optionalString waylandSupport "-wayland"}"
"--enable-system-pixman"
"--with-distribution-id=org.nixos"
"--with-libclang-path=${llvmPackagesBuildBuild.libclang.lib}/lib"
"--with-system-ffi"
"--with-system-icu"
"--with-system-jpeg"
"--with-system-libevent"
"--with-system-libvpx"
"--with-system-nspr"
"--with-system-nss"
"--with-system-png" # needs APNG support
"--with-system-webp"
"--with-system-zlib"
"--with-wasi-sysroot=${wasiSysRoot}"
"--host=${buildStdenv.buildPlatform.config}"
"--target=${buildStdenv.hostPlatform.config}"
(lib.enableFeature alsaSupport "alsa")
(lib.enableFeature ffmpegSupport "ffmpeg")
(lib.enableFeature geolocationSupport "necko-wifi")
(lib.enableFeature gssSupport "negotiateauth")
(lib.enableFeature jackSupport "jack")
(lib.enableFeature jemallocSupport "jemalloc")
(lib.enableFeature pulseaudioSupport "pulseaudio")
(lib.enableFeature sndioSupport "sndio")
(lib.enableFeature webrtcSupport "webrtc")
# --enable-release adds -ffunction-sections & LTO that require a big amount
# of RAM, and the 32-bit memory space cannot handle that linking
(lib.enableFeature (!debugBuild && !stdenv.hostPlatform.is32bit) "release")
(lib.enableFeature enableDebugSymbols "debug-symbols")
]
++ lib.optional stdenv.hostPlatform.isAarch "--disable-wasm-avx";
configureScript = writeShellScript "configureMozconfig" (
(lib.optionalString stdenv.hostPlatform.isAarch ''
echo "ac_add_options --with-libclang-path=/usr/lib64" >> ./configs/linux/mozconfig
# linux mozconfig
sed -i 's/x86-\(64\|64-v3\)/native/g' ./configs/linux/mozconfig
sed -i 's/x86_64-pc-linux/aarch64-linux-gnu/g' ./configs/linux/mozconfig
# eme/widevine must be disabled on arm64 (thx google)
sed -i '/--enable-eme/s/^/# /' ./configs/common/mozconfig
sed -i 's/-msse3//g' ./configs/linux/mozconfig
sed -i 's/-mssse3//g' ./configs/linux/mozconfig
sed -i 's/-msse4.1//g' ./configs/linux/mozconfig
sed -i 's/-msse4.2//g' ./configs/linux/mozconfig
sed -i 's/-mavx2//g' ./configs/linux/mozconfig
sed -i 's/-mavx//g' ./configs/linux/mozconfig
sed -i 's/-mfma//g' ./configs/linux/mozconfig
sed -i 's/-maes//g' ./configs/linux/mozconfig
sed -i 's/-mpopcnt//g' ./configs/linux/mozconfig
sed -i 's/-mpclmul//g' ./configs/linux/mozconfig
sed -i 's/+avx2//g' ./configs/linux/mozconfig
sed -i 's/+sse4.1//g' ./configs/linux/mozconfig
'')
+ ''
for flag in $@; do
echo "ac_add_options $flag" >> mozconfig
done
''
);
# To the person reading this wondering what is going on here, this is what
# happens when a build process relies on Git. Normally you would use `fetchgit`
# with `leaveDotGit = true`, however that leads to reproducibility issues, so
# instead we create our own Git repo with a single commit.
#
# `surfer` (the build tool made for zen-browser) uses git to read the latest
# HEAD commit, `git apply`, and likely a few other operations.
preConfigure = ''
export HOME="$TMPDIR"
git config --global user.email "nixbld@localhost"
git config --global user.name "nixbld"
git init
git add --all
git commit -m 'nixpkgs'
export LLVM_PROFDATA=llvm-profdata
export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
export WASM_CC=${wasi32.stdenv.cc}/bin/${wasi32.stdenv.cc.targetPrefix}cc
export WASM_CXX=${wasi32.stdenv.cc}/bin/${wasi32.stdenv.cc.targetPrefix}c++
export ZEN_RELEASE=1
surfer ci --brand beta --display-version ${finalAttrs.version}
install -D ${finalAttrs.firefoxSrc} .surfer/engine/firefox-${finalAttrs.firefoxVersion}.source.tar.xz
surfer download
surfer import
patchShebangs engine/mach engine/build engine/tools
'';
preBuild = ''
cp -r ${firefox-l10n} l10n/firefox-l10n
for lang in $(cat ./l10n/supported-languages); do
rsync -av --progress l10n/firefox-l10n/"$lang"/ l10n/"$lang" --exclude .git
done
sh scripts/copy-language-pack.sh en-US
for lang in $(cat ./l10n/supported-languages); do
sh scripts/copy-language-pack.sh "$lang"
done
Xvfb :2 -screen 0 1024x768x24 &
export DISPLAY=:2
'';
buildPhase = ''
runHook preBuild
surfer build
runHook postBuild
'';
preInstall = ''
cd engine/obj-*
'';
meta = {
mainProgram = "zen";
description = "Firefox based browser with a focus on privacy and customization";
homepage = "https://www.zen-browser.app/";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [
matthewpi
titaniumtown
];
platforms = [
"aarch64-linux"
"x86_64-linux"
];
};
enableParallelBuilding = true;
requiredSystemFeatures = ["big-parallel"];
passthru = {
updateScript = ./update.sh;
# These values are used by `wrapFirefox`.
# ref; `pkgs/applications/networking/browsers/firefox/wrapper.nix'
binaryName = finalAttrs.meta.mainProgram;
inherit alsaSupport;
inherit jackSupport;
inherit pipewireSupport;
inherit sndioSupport;
inherit nspr;
inherit ffmpegSupport;
inherit gssSupport;
inherit gtk3;
inherit wasiSysRoot;
};
})

View file

@ -1,19 +0,0 @@
diff --git a/src/index.ts b/src/index.ts
index 3d41389..f6bfb95 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -19,7 +19,6 @@ import { resolve } from 'node:path'
import { errorHandler, config as configInited, versionFormatter } from './utils'
import { commands } from './cmds'
import { BIN_NAME, ENGINE_DIR } from './constants'
-import { updateCheck } from './middleware/update-check'
import { registerCommand } from './middleware/register-command'
import { log } from './log'
@@ -83,7 +82,6 @@ async function middleware(command: commander.Command) {
// If the program is verbose, store that fact within the logger
log.isDebug = program.opts().verbose
- await updateCheck()
registerCommand(command.name())
}

View file

@ -1,66 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts nix-prefetch-git nix-prefetch-github
# Define the package file
PACKAGE_FILE="default.nix"
# Function to get the latest version of zen-browser/desktop
get_latest_version() {
curl --silent "https://api.github.com/repos/zen-browser/desktop/releases" |
jq -r '[.[] | select(.prerelease==false)][0].tag_name'
}
# Get the latest version
latest_version=$(get_latest_version)
if [ -z "$latest_version" ] || [ "$latest_version" == "null" ]; then
echo "Failed to get the latest version."
exit 1
fi
echo "Latest version: $latest_version"
# Update the 'version' variable in the Nix expression
sed -i "/pname = \"zen-browser-unwrapped\";/,/version = \".*\";/s/version = \".*\";/version = \"$latest_version\";/" "$PACKAGE_FILE"
# Fetch the new 'src' hash
echo "Fetching new source hash..."
src_info=$(nix-prefetch-github zen-browser desktop --rev "$latest_version" --fetch-submodules)
src_hash=$(echo "$src_info" | jq -r .sha256)
echo "New source hash: $src_hash"
# Update 'rev' and 'hash' in the 'src' fetchFromGitHub
sed -i "/src = fetchFromGitHub {/,/};/{
/owner = \"zen-browser\";/,/};/{
s/rev = \".*\";/rev = \"$latest_version\";/
s/hash = \".*\";/hash = \"$src_hash\";/
}
}" "$PACKAGE_FILE"
# Clone the repository to extract 'firefoxVersion'
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
git clone --depth 1 --branch "$latest_version" https://github.com/zen-browser/desktop.git "$tmpdir"
# Extract 'firefoxVersion' from 'surfer.json'
firefoxVersion=$(jq --raw-output '.version.version' "$tmpdir/surfer.json")
echo "Firefox version: $firefoxVersion"
# Update the 'firefoxVersion' in the Nix expression
sed -i "s/firefoxVersion = \".*\";/firefoxVersion = \"$firefoxVersion\";/" "$PACKAGE_FILE"
# Fetch the new 'firefoxSrc' hash
firefox_url="mirror://mozilla/firefox/releases/$firefoxVersion/source/firefox-$firefoxVersion.source.tar.xz"
echo "Fetching Firefox source hash..."
firefox_hash=$(nix-prefetch-url --unpack "$firefox_url")
echo "Firefox source hash: $firefox_hash"
# Update the 'firefoxSrc' hash in the Nix expression
sed -i "/firefoxSrc = fetchurl {/,/};/{
s/hash = \".*\";/hash = \"$firefox_hash\";/
}" "$PACKAGE_FILE"
echo "Update complete!"

View file

@ -1,8 +0,0 @@
{
wrapFirefox,
custom,
}:
wrapFirefox custom.zen-browser-unwrapped {
pname = "zen-browser";
libName = "zen";
}

View file

@ -30,11 +30,6 @@
hardware.keyboard.qmk.enable = true;
programs.nix-ld.enable = true;
# services.monero.mining.enable = true;
# services.monero.enable = true;
# services.monero.mining.address = "485XKPKG38bSJBUa4SPenAEFt8Wgj2hWC97PNBpFHniwNXnDNZ9xar5hHb6qLQeyK2Kk3Fw2cxxPSLjgyqr5CxXAUkUsDDx";
# services.monero.mining.threads = 4;
hardware.march = {
arch = "znver3";
enableNativeOptimizations = true;
@ -42,10 +37,27 @@
memory.total = 32;
};
# CachyOS-inspired additional native optimizations
nixpkgs.config.packageOverrides = pkgs: {
# Override performance-critical packages with native optimizations
steam = pkgs.steam.override {
extraPkgs = pkgs:
with pkgs; [
libva
mesa
vulkan-loader
];
};
};
services.gdm-monitors.enable = true;
specialisation = {
plasma6 = {
configuration = {
services.xserver.desktopManager.plasma6.enable = true;
services.desktopManager.plasma6.enable = true;
services.displayManager.sddm.enable = true;
services.xserver.displayManager.gdm.enable = lib.mkForce false;
programs.seahorse.enable = lib.mkForce false;
};
@ -62,7 +74,29 @@
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
programs.steam.gamescopeSession.enable = true;
programs.gamemode.enable = true;
# programs.gamemode = {
# enable = true;
# settings = {
# general = {
# renice = 10; # Higher process priority for games
# ioprio = 0; # Highest I/O priority
# inhibit_screensaver = 1; # Prevent screensaver
# };
#
# gpu = {
# gpu_device = 0; # GPU device index to use
# apply_gpu_optimisations = 1; # Apply GPU optimizations
# gpu_core_clock_mhz = 0; # Don't override core clock
# gpu_mem_clock_mhz = 0; # Don't override memory clock
# gpu_powermizer_mode = 1; # Maximum performance mode
# };
#
# custom = {
# start = "${pkgs.libnotify}/bin/notify-send 'GameMode enabled' 'System optimizations activated'";
# end = "${pkgs.libnotify}/bin/notify-send 'GameMode disabled' 'System returned to normal'";
# };
# };
# };
ui.fonts.enable = true;
@ -117,23 +151,28 @@
# insertNameservers = ["1.1.1.1" "1.0.0.1"];
};
boot.kernelPackages = pkgs.linuxPackages_zen;
boot.kernelPatches = [
{
name = "bsb-patches";
patch = pkgs.fetchpatch {
url = "https://gist.githubusercontent.com/galister/08cddf10ac18929647d5fb6308df3e4b/raw/0f6417b6cb069f19d6c28b730499c07de06ec413/combined-bsb-6-10.patch";
hash = "sha256-u8O4foBHhU+T3yYkguBZ14EyCKujPzHh1TwFRg6GMsA=";
};
}
services.scx.enable = true;
services.scx.scheduler = "scx_rusty";
services.scx.package = pkgs.scx_git.full;
boot.kernelPackages = pkgs.linuxPackages_cachyos-lto;
# CachyOS-inspired kernel parameters for better desktop responsiveness and gaming
boot.kernelParams = [
"nowatchdog"
"preempt=full"
"threadirqs"
"tsc=reliable"
"clocksource=tsc"
"preempt=voluntary"
"futex.futex2_interface=1" # Better Wine/Proton compatibility
"NVreg_UsePageAttributeTable=1" # Improved GPU memory management
"io_uring.sqpoll=2" # Modern I/O scheduler polling
"transparent_hugepage=madvise" # Better memory management
"elevator=bfq" # Better I/O scheduling for gaming
];
boot.supportedFilesystems = ["ntfs"];
services.dlna.enable = false;
# services.openssh = {
# enable = true;
# PasswordAuthentication = true;
# };
time.timeZone = "America/Detroit";
@ -150,9 +189,13 @@
environment.systemPackages = [
pkgs.sbctl
lib.custom.nixos-stable.vesktop
pkgs.mangohud
pkgs.lutris
(pkgs.lutris.override {
extraPkgs = pkgs: [
inputs.nix-gaming.packages.${pkgs.system}.wine-tkg-zoey
pkgs.winetricks
];
})
pkgs.bottles
pkgs.file-roller
pkgs.podman-tui
@ -162,60 +205,17 @@
pkgs.transmission_4
pkgs.protonup-qt
pkgs.restic
inputs.opnix.packages.${system}.default
pkgs.qt5.qtwayland
(inputs.umu.packages.${system}.umu.override {
version = inputs.umu.shortRev;
truststore = true;
cbor2 = true;
pkgs.vkBasalt # Vulkan post-processing layer for better visuals
pkgs.goverlay # MangoHud and vkBasalt GUI configurator
pkgs.cpupower-gui # CPU frequency control GUI
pkgs.ananicy-cpp # Process priority daemon
(inputs.umu.packages.${system}.umu-launcher.override {
withTruststore = true;
withDeltaUpdates = true;
})
inputs.agenix.packages.${system}.agenix
inputs.awsvpnclient.packages.${system}.awsvpnclient
pkgs.nautilus-python
(pkgs.writeTextFile {
name = "nautilus-open-kitty-here";
destination = "/share/nautilus-python/extensions/open-kitty-here.py";
text = ''
import os
import gi
gi.require_version('Nautilus', '3.0')
from gi.repository import Nautilus, GObject
class OpenKittyTerminalExtension(GObject.GObject, Nautilus.MenuProvider):
def __init__(self):
pass
def menu_activate_cb(self, menu, file):
if file.is_directory():
path = file.get_location().get_path()
else:
path = file.get_parent_location().get_path()
os.system(f'kitty --directory "{path}" &')
def get_file_items(self, window, files):
if len(files) != 1:
return
file = files[0]
item = Nautilus.MenuItem(
name='OpenKittyTerminalExtension::OpenKitty',
label='Open in Kitty',
tip='Opens Kitty terminal in this location'
)
item.connect('activate', self.menu_activate_cb, file)
return [item]
def get_background_items(self, window, file):
item = Nautilus.MenuItem(
name='OpenKittyTerminalExtension::OpenKitty',
label='Open in Kitty',
tip='Opens Kitty terminal in this location'
)
item.connect('activate', self.menu_activate_cb, file)
return [item]
'';
})
];
programs.zsh.enable = true;
@ -253,7 +253,7 @@
services.samba = {
enable = true;
openFirewall = true;
shares = {
settings = {
"SteamLibrary" = {
path = "/mnt/bk"; # Update this path to your drive's mount point
browseable = true;
@ -269,6 +269,18 @@
catppuccin.enable = true;
programs.virt-manager.enable = true;
# Enable Ananicy for automatic process priority management
services.ananicy = {
enable = true;
package = pkgs.ananicy-cpp;
rulesProvider = pkgs.ananicy-rules-cachyos;
};
# CPU frequency governor always set to performance for desktop
powerManagement.cpuFreqGovernor = "performance";
systemd.services.NetworkManager-wait-online.enable = false;
sites.jellyfin.enable = true;
sites.mealie.enable = false;
@ -278,7 +290,6 @@
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
virtualisation.waydroid.enable = true;
hardware.gpu-passthru.enable = true;
system.stateVersion = "24.05";

View file

@ -2,9 +2,12 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
lib,
pkgs,
inputs,
config,
specialArgs,
system,
...
}: {
imports = [
@ -12,6 +15,8 @@
./hardware-configuration.nix
];
# nixpkgs.pkgs = lib.mkForce inputs.nixos-stable.legacyPackages.${system};
nix.settings = {
trusted-users = ["zoey"];
};
@ -97,6 +102,8 @@
minio.enable = true;
immich.enable = true;
polaris.enable = false;
sourcehut.enable = false;
forgejo.enable = true;
zoeycomputer = {
enable = true;
domain = "zoeys.computer";
@ -112,6 +119,8 @@
};
};
catppuccin.flavor = "mocha";
zmio.blog.enable = true;
zmio.blog.domain = "zackmyers.io";

View file

@ -10,6 +10,17 @@
./disk-config.nix
];
nix.optimise = {
automatic = true;
dates = ["03:45"];
};
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 14d";
};
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
@ -64,16 +75,6 @@
};
};
services.mc-honeypot = {
enable = true;
openFirewall = true;
settings = {
"webhook-url" = "https://discord.com/api/webhooks/1348850542398410834/1fqV4QLh4uTTuwZ0DjOczZa6gkDjsYECSlmWBwTXHWcYTHhwsE1ZLTP17z5v-vh6nn7H";
};
};
networking.firewall.allowedTCPPorts = [80 443];
system.stateVersion = "24.05";