Compare commits
No commits in common. "916f497b84afedcccceed7cd390e8bff74d6f728" and "9c83ba684935742760f965b51eafc8213ba4fc4e" have entirely different histories.
916f497b84
...
9c83ba6849
86 changed files with 3063 additions and 4782 deletions
|
|
@ -168,7 +168,6 @@ Now, lets add a file to define your home. Create a file at `homes/x86_64-linux/<
|
||||||
dircolors = {
|
dircolors = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
enableNushellIntegration = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
70
catpuccin.omp.json
Normal file
70
catpuccin.omp.json
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
{
|
||||||
|
"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
|
||||||
|
}
|
||||||
1295
flake.lock
generated
1295
flake.lock
generated
File diff suppressed because it is too large
Load diff
42
flake.nix
42
flake.nix
|
|
@ -28,16 +28,14 @@
|
||||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
walker.url = "github:abenz1267/walker";
|
resume.url = "git+https://git.zoeys.cloud/zoey/resume";
|
||||||
|
anyrun.url = "github:anyrun-org/anyrun";
|
||||||
resume.url = "path:/home/zoey/dev/resume";
|
anyrun.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
ags.url = "github:Aylur/ags/v1";
|
ags.url = "github:Aylur/ags/v1";
|
||||||
ags.inputs.nixpkgs.follows = "nixpkgs";
|
ags.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
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";
|
pnpm2nix.url = "github:nzbr/pnpm2nix-nzbr";
|
||||||
|
|
||||||
|
|
@ -51,7 +49,7 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
blog.url = "path:/home/zoey/dev/web";
|
blog.url = "git+https://git.zoeys.cloud/zoey/web";
|
||||||
|
|
||||||
lanzaboote = {
|
lanzaboote = {
|
||||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||||
|
|
@ -100,11 +98,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
umu.url = "github:Open-Wine-Components/umu-launcher?dir=packaging/nix";
|
umu.url = "github:Open-Wine-Components/umu-launcher?dir=packaging/nix";
|
||||||
|
# umu.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
||||||
|
|
||||||
zoeycomputer = {
|
zoeycomputer = {
|
||||||
url = "path:/home/zoey/dev/zoeys.computer";
|
url = "git+https://git.zoeys.cloud/zoey/zoeys.computer";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -129,14 +128,10 @@
|
||||||
disko.url = "github:nix-community/disko";
|
disko.url = "github:nix-community/disko";
|
||||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
nix-gaming.url = "path:/home/zoey/dev/nix-gaming";
|
opnix.url = "github:brizzbuzz/opnix";
|
||||||
|
|
||||||
niri-src.url = "github:YaLTeR/niri";
|
mc-honeypot.url = "github:Duckulus/mc-honeypot";
|
||||||
niri-src.inputs.nixpkgs.follows = "nixpkgs";
|
mc-honeypot.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
niri.url = "github:sodiboo/niri-flake";
|
|
||||||
|
|
||||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {self, ...}: let
|
outputs = inputs @ {self, ...}: let
|
||||||
|
|
@ -144,10 +139,10 @@
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
overlays = with inputs; [
|
overlays = [
|
||||||
rust-overlay.overlays.default
|
inputs.rust-overlay.overlays.default
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
ghostty = ghostty.packages."x86_64-linux".default;
|
ghostty = inputs.ghostty.packages."x86_64-linux".default;
|
||||||
})
|
})
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
shadps4 = prev.shadps4.overrideAttrs {
|
shadps4 = prev.shadps4.overrideAttrs {
|
||||||
|
|
@ -161,7 +156,6 @@
|
||||||
patches = [];
|
patches = [];
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
niri.overlays.niri
|
|
||||||
];
|
];
|
||||||
|
|
||||||
snowfall = {
|
snowfall = {
|
||||||
|
|
@ -177,9 +171,10 @@
|
||||||
|
|
||||||
homes.modules = with inputs; [
|
homes.modules = with inputs; [
|
||||||
spicetify-nix.homeManagerModules.default
|
spicetify-nix.homeManagerModules.default
|
||||||
catppuccin.homeModules.default
|
catppuccin.homeManagerModules.catppuccin
|
||||||
|
anyrun.homeManagerModules.default
|
||||||
ags.homeManagerModules.default
|
ags.homeManagerModules.default
|
||||||
walker.homeManagerModules.default
|
opnix.homeManagerModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
systems.modules.nixos = with inputs; [
|
systems.modules.nixos = with inputs; [
|
||||||
|
|
@ -188,14 +183,13 @@
|
||||||
catppuccin.nixosModules.catppuccin
|
catppuccin.nixosModules.catppuccin
|
||||||
blog.nixosModule
|
blog.nixosModule
|
||||||
agenix.nixosModules.default
|
agenix.nixosModules.default
|
||||||
sops-nix.nixosModules.sops
|
|
||||||
solaar.nixosModules.default
|
solaar.nixosModules.default
|
||||||
zoeycomputer.nixosModules.default
|
zoeycomputer.nixosModules.default
|
||||||
lix-module.nixosModules.default
|
lix-module.nixosModules.default
|
||||||
mailserver.nixosModule
|
mailserver.nixosModule
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
niri.nixosModules.niri
|
mc-honeypot.nixosModules.default
|
||||||
chaotic.nixosModules.default
|
opnix.nixosModules.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
||||||
29
genkey.sh
Executable file
29
genkey.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/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}
|
||||||
|
|
@ -5,12 +5,10 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
wms.hyprland.enable = false;
|
wms.hyprland.enable = true;
|
||||||
wms.niri.enable = true;
|
|
||||||
apps = {
|
apps = {
|
||||||
web.librewolf.enable = true;
|
web.librewolf.enable = true;
|
||||||
web.zen.setDefault = true;
|
web.librewolf.setDefault = true;
|
||||||
web.zen.enable = true;
|
|
||||||
|
|
||||||
tools.git.enable = true;
|
tools.git.enable = true;
|
||||||
tools.tmux.enable = true;
|
tools.tmux.enable = true;
|
||||||
|
|
@ -26,7 +24,7 @@
|
||||||
|
|
||||||
term.kitty.enable = true;
|
term.kitty.enable = true;
|
||||||
term.foot.enable = true;
|
term.foot.enable = true;
|
||||||
term.rio.enable = true;
|
# term.rio.enable = true;
|
||||||
term.alacritty.enable = true;
|
term.alacritty.enable = true;
|
||||||
term.ghostty.enable = true;
|
term.ghostty.enable = true;
|
||||||
|
|
||||||
|
|
@ -36,12 +34,11 @@
|
||||||
mail.aerc.enable = true;
|
mail.aerc.enable = true;
|
||||||
|
|
||||||
helpers = {
|
helpers = {
|
||||||
|
rofi.enable = true;
|
||||||
waybar.enable = true;
|
waybar.enable = true;
|
||||||
swaync.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
shells.nu.enable = true;
|
|
||||||
shells.zsh.enable = true;
|
shells.zsh.enable = true;
|
||||||
|
|
||||||
rice.gtk.enable = true;
|
rice.gtk.enable = true;
|
||||||
|
|
@ -62,18 +59,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.distrobox = {
|
|
||||||
enable = true;
|
|
||||||
containers = {
|
|
||||||
proton-tkg = {
|
|
||||||
image = "archlinux";
|
|
||||||
additional_packages = "build-essential git";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
catppuccin.mako.enable = false;
|
|
||||||
|
|
||||||
# programs.pywal2.enable = true;
|
# programs.pywal2.enable = true;
|
||||||
|
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
|
|
@ -117,129 +102,118 @@
|
||||||
|
|
||||||
catppuccin.aerc.enable = true;
|
catppuccin.aerc.enable = true;
|
||||||
|
|
||||||
catppuccin.cava.enable = true;
|
|
||||||
catppuccin.fuzzel.enable = true;
|
|
||||||
catppuccin.fzf.enable = true;
|
|
||||||
|
|
||||||
work.vpn.enable = true;
|
work.vpn.enable = true;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = [
|
||||||
gimp3
|
pkgs.gimp
|
||||||
slack
|
pkgs.slack
|
||||||
|
|
||||||
monero-cli
|
pkgs.monero-cli
|
||||||
devenv
|
|
||||||
|
|
||||||
zoom-us
|
pkgs.zoom-us
|
||||||
pandoc
|
pkgs.pandoc
|
||||||
|
|
||||||
nexusmods-app-unfree
|
pkgs.prismlauncher
|
||||||
|
pkgs.obs-studio
|
||||||
|
|
||||||
prismlauncher
|
pkgs.ungoogled-chromium
|
||||||
obs-studio
|
pkgs.uutils-coreutils-noprefix
|
||||||
|
pkgs.yazi
|
||||||
|
|
||||||
(discord.override {
|
pkgs.fragments
|
||||||
withOpenASAR = true;
|
|
||||||
withVencord = true;
|
|
||||||
})
|
|
||||||
|
|
||||||
distrobox
|
|
||||||
|
|
||||||
legcord
|
|
||||||
|
|
||||||
ungoogled-chromium
|
|
||||||
uutils-coreutils-noprefix
|
|
||||||
yazi
|
|
||||||
reaper
|
|
||||||
|
|
||||||
fragments
|
|
||||||
inputs.posting.packages.${pkgs.system}.default
|
inputs.posting.packages.${pkgs.system}.default
|
||||||
|
|
||||||
heroic
|
pkgs.heroic
|
||||||
cartridges
|
pkgs.cartridges
|
||||||
|
pkgs.discord-canary
|
||||||
|
|
||||||
darktable
|
pkgs.darktable
|
||||||
|
|
||||||
thunderbird
|
pkgs.thunderbird
|
||||||
|
|
||||||
custom.nvidia-nsight
|
pkgs.custom.nvidia-nsight
|
||||||
|
|
||||||
custom.enc
|
pkgs.custom.enc
|
||||||
|
|
||||||
neural-amp-modeler-lv2
|
pkgs.nix-tree
|
||||||
|
|
||||||
nix-tree
|
|
||||||
# inputs.g2claude.packages.${pkgs.system}.default
|
# inputs.g2claude.packages.${pkgs.system}.default
|
||||||
|
|
||||||
mongodb-compass
|
pkgs.mongodb-compass
|
||||||
postman
|
pkgs.postman
|
||||||
mosh
|
pkgs.mosh
|
||||||
|
|
||||||
dconf
|
pkgs.dconf
|
||||||
wl-clipboard
|
pkgs.wl-clipboard
|
||||||
pwvucontrol
|
pkgs.pwvucontrol
|
||||||
wlogout
|
pkgs.wlogout
|
||||||
sway-audio-idle-inhibit
|
pkgs.sway-audio-idle-inhibit
|
||||||
grim
|
pkgs.grim
|
||||||
slurp
|
pkgs.slurp
|
||||||
|
|
||||||
pods
|
pkgs.pods
|
||||||
|
|
||||||
polari
|
pkgs.polari
|
||||||
|
pkgs.flare-signal
|
||||||
|
|
||||||
neovide
|
pkgs.neovide
|
||||||
|
|
||||||
nitch
|
pkgs.nitch
|
||||||
nix-output-monitor
|
pkgs.nix-output-monitor
|
||||||
fastfetch
|
pkgs.fastfetch
|
||||||
|
|
||||||
signal-desktop
|
pkgs.signal-desktop
|
||||||
flare-signal
|
|
||||||
|
|
||||||
nh
|
pkgs.nh
|
||||||
dwl
|
pkgs.dwl
|
||||||
|
|
||||||
foliate
|
pkgs.foliate
|
||||||
|
|
||||||
killall
|
pkgs.killall
|
||||||
custom.rebuild
|
pkgs.custom.rebuild
|
||||||
custom.powermenu
|
pkgs.custom.powermenu
|
||||||
|
|
||||||
parsec-bin
|
pkgs.parsec-bin
|
||||||
filezilla
|
pkgs.filezilla
|
||||||
zed-editor
|
lib.custom.nixos-stable.zed-editor
|
||||||
rmpc
|
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";
|
||||||
|
# };
|
||||||
|
# })
|
||||||
|
|
||||||
inputs.zen-browser.packages.${pkgs.system}.beta
|
inputs.zen-browser.packages.${pkgs.system}.beta
|
||||||
|
|
||||||
starfetch
|
pkgs.starfetch
|
||||||
lib.custom.nixos-stable.kiwix
|
lib.custom.nixos-stable.kiwix
|
||||||
|
|
||||||
mpc-cli
|
pkgs.mpc-cli
|
||||||
zathura
|
pkgs.zathura
|
||||||
gpgme.dev
|
pkgs.gpgme.dev
|
||||||
|
|
||||||
rofimoji
|
pkgs.rofimoji
|
||||||
renderdoc
|
pkgs.renderdoc
|
||||||
|
|
||||||
xwayland-satellite
|
pkgs.nautilus
|
||||||
|
pkgs.nautilus-python
|
||||||
|
pkgs.loupe
|
||||||
|
|
||||||
nautilus
|
pkgs.openvpn
|
||||||
nautilus-python
|
pkgs.telegram-desktop
|
||||||
loupe
|
pkgs.linux-manual
|
||||||
|
pkgs.man-pages
|
||||||
|
pkgs.man-pages-posix
|
||||||
|
|
||||||
openvpn
|
pkgs.ardour
|
||||||
linux-manual
|
|
||||||
man-pages
|
|
||||||
man-pages-posix
|
|
||||||
|
|
||||||
ardour
|
pkgs.shadps4
|
||||||
|
|
||||||
|
pkgs.audacity
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.vesktop = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zoxide = {
|
programs.zoxide = {
|
||||||
enable = true;
|
enable = true;
|
||||||
options = ["--cmd cd"];
|
options = ["--cmd cd"];
|
||||||
|
|
@ -255,29 +229,29 @@
|
||||||
|
|
||||||
programs.cava = {
|
programs.cava = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
catppuccin.enable = true;
|
||||||
general = {
|
# settings = {
|
||||||
|
# general = {
|
||||||
# bars = 2;
|
# bars = 2;
|
||||||
# channels = 2;
|
# channels = 2;
|
||||||
# mono = "no";
|
# mono = "no";
|
||||||
|
#
|
||||||
# smoothing = 0;
|
# # smoothing = 0;
|
||||||
# falloff = 0.0;
|
# # falloff = 0.0;
|
||||||
};
|
# };
|
||||||
input = {
|
# input = {
|
||||||
method = "pulse";
|
# method = "pipewire";
|
||||||
source = "alsa_output.usb-MOTU_M4_M4MA03F7DV-00.HiFi__Line1__sink.monitor";
|
# source = "alsa_input.pci-0000_0d_00.4.analog-stereo";
|
||||||
};
|
# };
|
||||||
# output = {
|
# # output = {
|
||||||
# method = "ncurses";
|
# # method = "ncurses";
|
||||||
|
# # };
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
programs.fuzzel.enable = true;
|
|
||||||
|
|
||||||
programs.btop = {
|
programs.btop = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
catppuccin.enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
update_ms = 100
|
update_ms = 100
|
||||||
vim_keys = true
|
vim_keys = true
|
||||||
|
|
@ -290,15 +264,29 @@
|
||||||
|
|
||||||
programs.fzf = {
|
programs.fzf = {
|
||||||
enable = true;
|
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 = {
|
services = {
|
||||||
gpg-agent = {
|
gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
|
pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
enableNushellIntegration = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,215 +1,32 @@
|
||||||
{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}";
|
|
||||||
|
|
||||||
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}";
|
x = c: "#${c}";
|
||||||
|
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
mono = "Iosevka";
|
mono = {
|
||||||
ui = "SF Pro Display";
|
normal = "Iosevka Bold";
|
||||||
};
|
bold = "Iosevka ExtraBold";
|
||||||
|
italic = "Iosevka Bold Italic";
|
||||||
colors = rec {
|
bold_italic = "Iosevka ExtraBold Italic";
|
||||||
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 = ./svema_26_big.jpg;
|
wallpaper = ./favs-98.png;
|
||||||
|
|
||||||
lerpColor = lerpColorFunc;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 MiB |
|
|
@ -48,43 +48,7 @@ in {
|
||||||
programs.ags = {
|
programs.ags = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Generate _colors.scss with our theme colors
|
configDir = ./cfg;
|
||||||
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;
|
extraPackages = dependencies;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -14,102 +14,100 @@ in {
|
||||||
enable = mkBoolOpt false "Enable Anyrun";
|
enable = mkBoolOpt false "Enable Anyrun";
|
||||||
};
|
};
|
||||||
|
|
||||||
config =
|
config = mkIf cfg.enable {
|
||||||
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]
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# 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]
|
|
||||||
# )
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
80
modules/home/apps/helpers/notifications/default.nix
Normal file
80
modules/home/apps/helpers/notifications/default.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
||||||
|
{
|
||||||
|
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"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
451
modules/home/apps/helpers/notifications/theme/ctp.css
Normal file
451
modules/home/apps/helpers/notifications/theme/ctp.css
Normal file
|
|
@ -0,0 +1,451 @@
|
||||||
|
* {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
@ -51,12 +51,12 @@ in {
|
||||||
inherit (config.lib.formats.rasi) mkLiteral;
|
inherit (config.lib.formats.rasi) mkLiteral;
|
||||||
in {
|
in {
|
||||||
"*" = {
|
"*" = {
|
||||||
background = colors.mantle.hex;
|
background = "#181825";
|
||||||
prompt = colors.base.hex;
|
prompt = "#1e1e2e";
|
||||||
border = colors.surface0.hex;
|
border = "#313244";
|
||||||
text = colors.text.hex;
|
text = "#cdd6f4";
|
||||||
stext = colors.surface1.hex;
|
stext = "#45475a";
|
||||||
select = colors.base.hex;
|
select = "#1e1e2e";
|
||||||
"background-color" = mkLiteral "transparent";
|
"background-color" = mkLiteral "transparent";
|
||||||
"text-color" = mkLiteral "@text";
|
"text-color" = mkLiteral "@text";
|
||||||
margin = 0;
|
margin = 0;
|
||||||
|
|
@ -143,42 +143,15 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Create the colors.rasi file with our theme colors
|
# Create the colors.rasi file
|
||||||
xdg.configFile."rofi/colors.rasi".text = ''
|
xdg.configFile."rofi/colors.rasi".text = ''
|
||||||
* {
|
* {
|
||||||
background: ${colors.mantle.hex};
|
background: #181825;
|
||||||
prompt: ${colors.base.hex};
|
prompt: #1e1e2e;
|
||||||
border: ${colors.surface0.hex};
|
border: #313244;
|
||||||
text: ${colors.text.hex};
|
text: #cdd6f4;
|
||||||
stext: ${colors.surface1.hex};
|
stext: #45475a;
|
||||||
select: ${colors.base.hex};
|
select: #1e1e2e;
|
||||||
|
|
||||||
/* 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};
|
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,366 +0,0 @@
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,611 +0,0 @@
|
||||||
{
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
#! /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
|
|
||||||
|
|
@ -15,62 +15,479 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
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 = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
systemd.target = "graphical-session.target";
|
systemd.target = "graphical-session.target";
|
||||||
style = ''
|
style = ''
|
||||||
/* Custom colors from lib/theme/default.nix */
|
* {
|
||||||
@define-color rosewater ${colors.rosewater.hex};
|
min-height: 0;
|
||||||
@define-color flamingo ${colors.flamingo.hex};
|
min-width: 0;
|
||||||
@define-color pink ${colors.pink.hex};
|
font-family: Cantarell;
|
||||||
@define-color mauve ${colors.mauve.hex};
|
font-size: 16px;
|
||||||
@define-color red ${colors.red.hex};
|
font-weight: 600;
|
||||||
@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};
|
|
||||||
|
|
||||||
${builtins.readFile ./mullvad-style.css}
|
window#waybar {
|
||||||
${builtins.readFile ./style.css}
|
transition-property: background-color;
|
||||||
'';
|
transition-duration: 0.5s;
|
||||||
settings = let
|
/* background-color: #1e1e2e; */
|
||||||
# Import the Mullvad scripts
|
/* background-color: #181825; */
|
||||||
mullvad-status = import ./mullvad-status.nix {inherit pkgs;};
|
background-color: #11111b;
|
||||||
mullvad-server-list = import ./mullvad-server-list.nix {inherit pkgs;};
|
/* background-color: rgba(24, 24, 37, 0.6); */
|
||||||
mullvad-menu = import ./mullvad-menu.nix {inherit pkgs;};
|
}
|
||||||
|
|
||||||
# Script to toggle Mullvad connection
|
#workspaces button {
|
||||||
mullvad-toggle = pkgs.writeShellScriptBin "mullvad-toggle" ''
|
padding: 0.3rem 0.6rem;
|
||||||
set -euo pipefail
|
margin: 0.4rem 0.25rem;
|
||||||
if mullvad status | grep -q "Connected"; then
|
border-radius: 6px;
|
||||||
mullvad disconnect
|
/* background-color: #181825; */
|
||||||
else
|
background-color: #1e1e2e;
|
||||||
mullvad connect
|
color: #cdd6f4;
|
||||||
fi
|
}
|
||||||
# Optional: trigger a Waybar refresh if needed, though interval should handle it
|
|
||||||
# pkill -SIGRTMIN+8 waybar
|
#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;
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
cava = pkgs.writeShellScriptBin "cava" "${builtins.readFile ./bar.sh}";
|
settings = {
|
||||||
in {
|
|
||||||
mainBar = {
|
mainBar = {
|
||||||
layer = "bottom";
|
layer = "bottom";
|
||||||
position = "top";
|
position = "top";
|
||||||
|
|
@ -80,18 +497,12 @@ in {
|
||||||
"gtk-layer-shell" = true;
|
"gtk-layer-shell" = true;
|
||||||
passthrough = false;
|
passthrough = false;
|
||||||
"fixed-center" = true;
|
"fixed-center" = true;
|
||||||
"modules-left" = ["hyprland/workspaces" "hyprland/window" "niri/workspaces" "niri/window" "network#speed" "custom/cava-system" "custom/cava-tt"];
|
"modules-left" = ["hyprland/workspaces" "hyprland/window"];
|
||||||
"modules-center" = ["mpris"];
|
"modules-center" = ["mpris"];
|
||||||
"modules-right" = [
|
"modules-right" = [
|
||||||
"cpu"
|
"cpu"
|
||||||
"memory"
|
"memory"
|
||||||
"temperature"
|
|
||||||
"custom/gpu-usage"
|
|
||||||
"custom/gpu-mem"
|
|
||||||
"custom/gpu-temp"
|
|
||||||
"pulseaudio"
|
"pulseaudio"
|
||||||
"custom/mullvad"
|
|
||||||
"custom/weather"
|
|
||||||
"clock"
|
"clock"
|
||||||
"clock#simpleclock"
|
"clock#simpleclock"
|
||||||
"tray"
|
"tray"
|
||||||
|
|
@ -100,7 +511,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
"custom/spotify" = {
|
"custom/spotify" = {
|
||||||
format = "{}";
|
format = " {}";
|
||||||
"return-type" = "json";
|
"return-type" = "json";
|
||||||
"on-click" = "playerctl -p spotify play-pause";
|
"on-click" = "playerctl -p spotify play-pause";
|
||||||
"on-click-right" = "spotifatius toggle-liked";
|
"on-click-right" = "spotifatius toggle-liked";
|
||||||
|
|
@ -108,16 +519,6 @@ in {
|
||||||
exec = "spotifatius monitor";
|
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 = {
|
mpd = {
|
||||||
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {title}";
|
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {title}";
|
||||||
"format-disconnected" = "Disconnected ";
|
"format-disconnected" = "Disconnected ";
|
||||||
|
|
@ -157,60 +558,6 @@ 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" = {
|
"hyprland/workspaces" = {
|
||||||
"on-click" = "activate";
|
"on-click" = "activate";
|
||||||
format = "{id}";
|
format = "{id}";
|
||||||
|
|
@ -225,24 +572,16 @@ in {
|
||||||
|
|
||||||
tray = {
|
tray = {
|
||||||
"show-passive-items" = true;
|
"show-passive-items" = true;
|
||||||
spacing = 2;
|
spacing = 10;
|
||||||
};
|
};
|
||||||
|
|
||||||
"clock#simpleclock" = {
|
"clock#simpleclock" = {
|
||||||
tooltip = false;
|
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 = {
|
clock = {
|
||||||
format = "{:L%a %d %b}";
|
format = " {:L%a %d %b}";
|
||||||
calendar = {
|
calendar = {
|
||||||
format = {
|
format = {
|
||||||
days = "<span weight='normal'>{}</span>";
|
days = "<span weight='normal'>{}</span>";
|
||||||
|
|
@ -259,22 +598,21 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu = {
|
cpu = {
|
||||||
format = "{usage}%";
|
format = " {usage}%";
|
||||||
tooltip = true;
|
tooltip = true;
|
||||||
interval = 1;
|
interval = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
memory = {
|
memory = {
|
||||||
interval = 1;
|
format = " {used:0.1f}Gi";
|
||||||
format = "{used:0.1f}Gi";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pulseaudio = {
|
pulseaudio = {
|
||||||
format = "{icon} {volume}%";
|
format = "{icon} {volume}%";
|
||||||
"format-muted" = "";
|
"format-muted" = " muted";
|
||||||
"format-icons" = {
|
"format-icons" = {
|
||||||
headphone = "";
|
headphone = "";
|
||||||
default = ["" ""];
|
default = [" " " " " "];
|
||||||
};
|
};
|
||||||
"on-click" = "pavucontrol";
|
"on-click" = "pavucontrol";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{pkgs}: let
|
|
||||||
script = ./mullvad-menu.sh;
|
|
||||||
in
|
|
||||||
pkgs.writeScriptBin "mullvad-menu" ''
|
|
||||||
#!${pkgs.runtimeShell}
|
|
||||||
exec ${pkgs.bash}/bin/bash ${script}
|
|
||||||
''
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
{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: "
|
|
||||||
''
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{pkgs}:
|
|
||||||
pkgs.writeShellScriptBin "mullvad-status-waybar" ''
|
|
||||||
exec ${pkgs.bash}/bin/bash ${./mullvad-status.sh} | jq -c
|
|
||||||
''
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
#!/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 human‐readable 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
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
/* Mullvad specific styles */
|
|
||||||
#custom-mullvad.connected {
|
|
||||||
color: @green;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-mullvad.disconnected {
|
|
||||||
color: @red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-mullvad {
|
|
||||||
margin: 0 8px;
|
|
||||||
padding: 0 5px;
|
|
||||||
min-width: 100px;
|
|
||||||
}
|
|
||||||
|
|
@ -1,199 +0,0 @@
|
||||||
* {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -12,56 +12,22 @@ in {
|
||||||
enable = mkBoolOpt false "Enable Alacritty Term";
|
enable = mkBoolOpt false "Enable Alacritty Term";
|
||||||
|
|
||||||
fonts = {
|
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 = {
|
normal = {
|
||||||
family = mkStringOpt "Iosevka Nerd Font Mono" "The Family of the font";
|
family = mkStringOpt "Iosevka" "The Family of the font";
|
||||||
style = mkStringOpt "SemiBold" "The Style of the font";
|
style = mkStringOpt "ExtraBold" "The Style of the font";
|
||||||
};
|
};
|
||||||
bold = {
|
bold = {
|
||||||
family = mkStringOpt "Iosevka Nerd Font Mono" "The Family of the font";
|
family = mkStringOpt "Iosevka" "The Family of the font";
|
||||||
style = mkStringOpt "Bold" "The Style of the font";
|
style = mkStringOpt "Heavy" "The Style of the font";
|
||||||
};
|
};
|
||||||
italic = {
|
italic = {
|
||||||
family = mkStringOpt "Iosevka Nerd Font Mono" "The Family of the font";
|
family = mkStringOpt "Iosevka" "The Family of the font";
|
||||||
style = mkStringOpt "SemiBold Italic" "The Style of the font";
|
style = mkStringOpt "ExtraBold Italic" "The Style of the font";
|
||||||
};
|
};
|
||||||
bold_italic = {
|
bold_italic = {
|
||||||
family = mkStringOpt "Iosevka Nerd Font Mono" "The Family of the font";
|
family = mkStringOpt "Iosevka" "The Family of the font";
|
||||||
style = mkStringOpt "Bold Italic" "The Style of the font";
|
style = mkStringOpt "Heavy 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";
|
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -71,38 +37,18 @@ in {
|
||||||
catppuccin.enable = true;
|
catppuccin.enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
colors = {
|
|
||||||
primary.background = colors.crust.hex;
|
|
||||||
};
|
|
||||||
env = {
|
|
||||||
term = "xterm-256color";
|
|
||||||
};
|
|
||||||
cursor = {
|
|
||||||
style = {
|
|
||||||
shape = "Beam";
|
|
||||||
};
|
|
||||||
vi_mode_style = {
|
|
||||||
shape = "Beam";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
window = {
|
window = {
|
||||||
# opacity = 0.95;
|
opacity = 0.95;
|
||||||
padding = {
|
padding = {
|
||||||
x = 20;
|
x = 20;
|
||||||
y = 20;
|
y = 20;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
font = {
|
font = {
|
||||||
size = 16.0;
|
normal = cfg.fonts.normal;
|
||||||
normal = fonts.mono;
|
bold = cfg.fonts.bold;
|
||||||
bold = "${fonts.mono} Bold";
|
italic = cfg.fonts.italic;
|
||||||
italic = "${fonts.mono} Italic";
|
bold_italic = cfg.fonts.bold_italic;
|
||||||
bold_italic = "${fonts.mono} Bold Italic";
|
|
||||||
|
|
||||||
offset = {
|
|
||||||
x = 0;
|
|
||||||
y = 0;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -17,34 +17,10 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
main = {
|
main = {
|
||||||
font = "${fonts.mono}:weight=bold:size=20";
|
font = "Iosevka:weight=bold:size=20";
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
alpha = "0.9";
|
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
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,17 @@ with lib.custom; let
|
||||||
in {
|
in {
|
||||||
options.apps.term.ghostty = with types; {
|
options.apps.term.ghostty = with types; {
|
||||||
enable = mkBoolOpt false "Enable Ghostty Term";
|
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 {
|
config = mkIf cfg.enable {
|
||||||
|
|
@ -17,19 +28,9 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
font-family = fonts.mono;
|
font-family = cfg.fonts.normal;
|
||||||
gtk-single-instance = true;
|
gtk-single-instance = true;
|
||||||
gtk-titlebar = false;
|
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";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
options,
|
options,
|
||||||
pkgs,
|
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
|
|
@ -11,51 +10,39 @@ with lib.custom; let
|
||||||
in {
|
in {
|
||||||
options.apps.term.kitty = with types; {
|
options.apps.term.kitty = with types; {
|
||||||
enable = mkBoolOpt false "Enable Kitty Term";
|
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 {
|
config = mkIf cfg.enable {
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
font = {
|
font = {
|
||||||
name = fonts.mono;
|
name = cfg.fonts.normal;
|
||||||
size = 16;
|
size = 14;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
bold_font ${fonts.mono} Bold Italic
|
bold_font ${cfg.fonts.bold}
|
||||||
italic_font ${fonts.mono} Italic
|
italic_font ${cfg.fonts.italic}
|
||||||
bold_italic_font ${fonts.mono} Bold Italic
|
bold_italic_font ${cfg.fonts.bold_italic}
|
||||||
|
|
||||||
shell ${lib.getExe pkgs.nushell}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
catppuccin.enable = true;
|
catppuccin.enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
window_padding_width = 20;
|
window_padding_width = 12;
|
||||||
# background_opacity = "0.9";
|
background_opacity = "0.9";
|
||||||
background = colors.crust.hex;
|
# background = "#000000";
|
||||||
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
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.rio = {
|
programs.rio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = inputs.rio-term.packages.${pkgs.system}.default;
|
||||||
settings = {
|
settings = {
|
||||||
window = {
|
window = {
|
||||||
opacity = 0.9;
|
opacity = 0.9;
|
||||||
|
|
@ -31,27 +32,27 @@ in {
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
regular = {
|
regular = {
|
||||||
family = fonts.mono;
|
family = "Iosevka";
|
||||||
style = "Normal";
|
style = "Normal";
|
||||||
weight = 400;
|
weight = 700;
|
||||||
};
|
};
|
||||||
|
|
||||||
bold = {
|
bold = {
|
||||||
family = fonts.mono;
|
family = "Iosevka";
|
||||||
style = "Normal";
|
style = "Normal";
|
||||||
weight = 700;
|
weight = 800;
|
||||||
};
|
};
|
||||||
|
|
||||||
italic = {
|
italic = {
|
||||||
family = fonts.mono;
|
family = "Iosevka";
|
||||||
style = "Italic";
|
style = "Italic";
|
||||||
weight = 400;
|
weight = 700;
|
||||||
};
|
};
|
||||||
|
|
||||||
bold-italic = {
|
bold-italic = {
|
||||||
family = fonts.mono;
|
family = "Iosevka";
|
||||||
style = "Italic";
|
style = "Italic";
|
||||||
weight = 700;
|
weight = 800;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{
|
{
|
||||||
|
options,
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
|
@ -16,12 +18,6 @@ in {
|
||||||
direnv = {
|
direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
config = {
|
|
||||||
global = {
|
|
||||||
log_format = "-";
|
|
||||||
log_filter = "^$";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
"lazyvim.plugins.extras.lang.toml",
|
"lazyvim.plugins.extras.lang.toml",
|
||||||
"lazyvim.plugins.extras.lang.json",
|
"lazyvim.plugins.extras.lang.json",
|
||||||
"lazyvim.plugins.extras.lang.clangd",
|
"lazyvim.plugins.extras.lang.clangd",
|
||||||
"lazyvim.plugins.extras.lang.rust",
|
|
||||||
"lazyvim.plugins.extras.lang.markdown",
|
"lazyvim.plugins.extras.lang.markdown",
|
||||||
"lazyvim.plugins.extras.lang.nix",
|
"lazyvim.plugins.extras.lang.nix",
|
||||||
"lazyvim.plugins.extras.lang.sql",
|
"lazyvim.plugins.extras.lang.sql",
|
||||||
|
|
@ -33,9 +32,8 @@
|
||||||
"lazyvim.plugins.extras.coding.luasnip",
|
"lazyvim.plugins.extras.coding.luasnip",
|
||||||
"lazyvim.plugins.extras.coding.blink"
|
"lazyvim.plugins.extras.coding.blink"
|
||||||
],
|
],
|
||||||
"install_version": 8,
|
|
||||||
"news": {
|
"news": {
|
||||||
"NEWS.md": "10960"
|
"NEWS.md": "6520"
|
||||||
},
|
},
|
||||||
"version": 8
|
"version": 8
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,34 @@ require("lazy").setup({
|
||||||
-- add LazyVim and import its plugins
|
-- add LazyVim and import its plugins
|
||||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||||
-- import/override with your 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" },
|
||||||
|
{ import = "plugins.extras.rust" },
|
||||||
|
-- { import = "plugins.extras.clangd" },
|
||||||
},
|
},
|
||||||
defaults = {
|
defaults = {
|
||||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,3 @@ end
|
||||||
|
|
||||||
-- in this case.
|
-- in this case.
|
||||||
vim.g.lazyvim_blink_main = true
|
vim.g.lazyvim_blink_main = true
|
||||||
|
|
||||||
vim.o.termguicolors = true
|
|
||||||
|
|
||||||
vim.g.lazyvim_python_lsp = "basedpyright"
|
|
||||||
|
|
|
||||||
|
|
@ -6,51 +6,61 @@ return {
|
||||||
news = { lazyvim = false },
|
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、
|
||||||
|
(゚、 。 7
|
||||||
|
l ~ヽ
|
||||||
|
じしf_,)ノ
|
||||||
|
]],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- {
|
||||||
|
-- "uZer/pywal16.nvim",
|
||||||
|
-- -- for local dev replace with:
|
||||||
|
-- -- dir = '~/your/path/pywal16.nvim',
|
||||||
|
-- config = function()
|
||||||
|
-- vim.cmd.colorscheme("pywal16")
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
{
|
{
|
||||||
"catppuccin",
|
"catppuccin",
|
||||||
config = function()
|
opts = {
|
||||||
require("catppuccin").setup({
|
transparent_background = true,
|
||||||
transparent_background = false,
|
|
||||||
integrations = {
|
integrations = {
|
||||||
blink_cmp = true,
|
blink_cmp = true,
|
||||||
nvimtree = true,
|
|
||||||
},
|
},
|
||||||
custom_highlights = function(colors)
|
-- color_overrides = {
|
||||||
return {
|
-- mocha = {
|
||||||
Normal = { bg = colors.crust },
|
-- base = "#000000",
|
||||||
NormalFloat = { bg = colors.crust },
|
-- mantle = "#000000",
|
||||||
|
-- crust = "#000000",
|
||||||
-- 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",
|
"f-person/git-blame.nvim",
|
||||||
|
{ "nvim-lualine/lualine.nvim", enabled = false },
|
||||||
|
{ "echasnovski/mini.statusline", opts = {} },
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
@ -66,49 +76,42 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"christoomey/vim-tmux-navigator",
|
"folke/snacks.nvim",
|
||||||
cmd = {
|
priority = 1000,
|
||||||
"TmuxNavigateLeft",
|
lazy = false,
|
||||||
"TmuxNavigateDown",
|
|
||||||
"TmuxNavigateUp",
|
|
||||||
"TmuxNavigateRight",
|
|
||||||
"TmuxNavigatePrevious",
|
|
||||||
"TmuxNavigatorProcessList",
|
|
||||||
},
|
|
||||||
keys = {
|
keys = {
|
||||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
{
|
||||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
"<leader>z",
|
||||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
function()
|
||||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
Snacks.zen()
|
||||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
end,
|
||||||
|
desc = "Toggle Zen Mode",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"m4xshen/hardtime.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
lazy = false,
|
main = "ibl",
|
||||||
dependencies = { "MunifTanjim/nui.nvim" },
|
tag = "v3.8.2",
|
||||||
opts = {},
|
---@module "ibl"
|
||||||
|
---@type ibl.config
|
||||||
|
-- opts = {
|
||||||
|
-- debounce = 100,
|
||||||
|
-- indent = { char = "|" },
|
||||||
|
-- whitespace = { highlight = "Whitespace", "NonText" },
|
||||||
|
-- },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
---@class PluginLspOpts
|
|
||||||
opts = {
|
opts = {
|
||||||
servers = {
|
servers = {
|
||||||
jinja_lsp = {},
|
emmet_ls = {},
|
||||||
emmet_ls = {
|
slang = {
|
||||||
filetypes = { "html", "jinja" },
|
|
||||||
},
|
|
||||||
somesass_ls = {},
|
|
||||||
slangd = {
|
|
||||||
settings = {
|
|
||||||
slangd = {
|
|
||||||
inlayHints = {
|
inlayHints = {
|
||||||
deducedTypes = true,
|
deducedTypes = true,
|
||||||
paramaterNames = true,
|
paramaterNames = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
|
||||||
nil_ls = {
|
nil_ls = {
|
||||||
settings = {
|
settings = {
|
||||||
["nil"] = {
|
["nil"] = {
|
||||||
|
|
@ -142,4 +145,10 @@ return {
|
||||||
require("force-cul").setup()
|
require("force-cul").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
-- {
|
||||||
|
-- "supermaven-inc/supermaven-nvim",
|
||||||
|
-- config = function()
|
||||||
|
-- require("supermaven-nvim").setup({})
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ in {
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = config.programs.zsh.enable;
|
enableZshIntegration = config.programs.zsh.enable;
|
||||||
enableNushellIntegration = config.programs.nushell.enable;
|
|
||||||
settings = {
|
settings = {
|
||||||
add_newline = false;
|
add_newline = false;
|
||||||
format = "$username$directory$git_branch$git_status$python$rust$nodejs$nix_shell$cmd_duration$line_break$character";
|
format = "$username$directory$git_branch$git_status$python$rust$nodejs$nix_shell$cmd_duration$line_break$character";
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,15 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
catppuccin.tmux = {
|
catppuccin.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
# extraConfig = ''
|
||||||
set -g @catppuccin_window_status_style "basic"
|
# set -g @catppuccin_window_status_style "basic"
|
||||||
set -g @catppuccin_status_background "#11111b"
|
# set -g @catppuccin_status_background "#000000"
|
||||||
'';
|
# '';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shell = "${lib.getExe pkgs.nushell}";
|
shell = "${pkgs.zsh}/bin/zsh";
|
||||||
historyLimit = 100000;
|
historyLimit = 100000;
|
||||||
plugins = with pkgs; [
|
plugins = with pkgs; [
|
||||||
tmuxPlugins.sensible
|
tmuxPlugins.sensible
|
||||||
|
|
@ -42,8 +42,7 @@ in {
|
||||||
set-window-option -g pane-base-index 1
|
set-window-option -g pane-base-index 1
|
||||||
set-option -g renumber-windows on
|
set-option -g renumber-windows on
|
||||||
|
|
||||||
set -g default-terminal "$TERM"
|
set -g default-terminal "tmux-256color"
|
||||||
set -ag terminal-overrides ",$TERM:Tc"
|
|
||||||
set -g allow-passthrough on
|
set -g allow-passthrough on
|
||||||
|
|
||||||
set -g status-right-length 100
|
set -g status-right-length 100
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
icon = "https://www.openstreetmap.org/favicon.ico";
|
iconUpdateURL = "https://www.openstreetmap.org/favicon.ico";
|
||||||
definedAliases = ["@openstreetmap" "@osm"];
|
definedAliases = ["@openstreetmap" "@osm"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
icon = "https://search.zoeys.computer/searx/static/themes/simple/img/favicon.svg";
|
iconUpdateURL = "https://search.zoeys.computer/searx/static/themes/simple/img/favicon.svg";
|
||||||
definedAliases = ["@searx"];
|
definedAliases = ["@searx"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
icon = "https://docs.rs/-/static/favicon.ico";
|
iconUpdateURL = "https://docs.rs/-/static/favicon.ico";
|
||||||
definedAliases = ["@docs"];
|
definedAliases = ["@docs"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -94,7 +94,7 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
icon = "https://crates.io/assets/cargo.png";
|
iconUpdateURL = "https://crates.io/assets/cargo.png";
|
||||||
definedAliases = ["@crates"];
|
definedAliases = ["@crates"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -26,8 +26,8 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
font = {
|
font = {
|
||||||
name = fonts.ui;
|
name = "Adwaita Sans";
|
||||||
size = 12;
|
size = 11;
|
||||||
};
|
};
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ in {
|
||||||
package = pkgs.swaylock-effects;
|
package = pkgs.swaylock-effects;
|
||||||
settings = with colors; {
|
settings = with colors; {
|
||||||
clock = true;
|
clock = true;
|
||||||
color = base.hex;
|
color = base;
|
||||||
font = "Work Sans";
|
font = "Work Sans";
|
||||||
image = "${wallpaper}";
|
image = "${wallpaper}";
|
||||||
show-failed-attempts = false;
|
show-failed-attempts = false;
|
||||||
|
|
@ -33,21 +33,21 @@ in {
|
||||||
inside-color = "00000000";
|
inside-color = "00000000";
|
||||||
key-hl-color = "f2cdcd";
|
key-hl-color = "f2cdcd";
|
||||||
separator-color = "00000000";
|
separator-color = "00000000";
|
||||||
text-color = text.hex;
|
text-color = text;
|
||||||
text-caps-lock-color = "";
|
text-caps-lock-color = "";
|
||||||
line-ver-color = rosewater.hex;
|
line-ver-color = love;
|
||||||
ring-ver-color = rosewater.hex;
|
ring-ver-color = rose;
|
||||||
inside-ver-color = base.hex;
|
inside-ver-color = base;
|
||||||
text-ver-color = text.hex;
|
text-ver-color = text;
|
||||||
ring-wrong-color = teal.hex;
|
ring-wrong-color = foam;
|
||||||
text-wrong-color = teal.hex;
|
text-wrong-color = foam;
|
||||||
inside-wrong-color = base.hex;
|
inside-wrong-color = base;
|
||||||
inside-clear-color = base.hex;
|
inside-clear-color = base;
|
||||||
text-clear-color = text.hex;
|
text-clear-color = text;
|
||||||
ring-clear-color = lavender.hex;
|
ring-clear-color = iris;
|
||||||
line-clear-color = base.hex;
|
line-clear-color = base;
|
||||||
line-wrong-color = base.hex;
|
line-wrong-color = base;
|
||||||
bs-hl-color = teal.hex;
|
bs-hl-color = foam;
|
||||||
line-uses-ring = false;
|
line-uses-ring = false;
|
||||||
grace = 2;
|
grace = 2;
|
||||||
grace-no-mouse = true;
|
grace-no-mouse = true;
|
||||||
|
|
|
||||||
49
modules/home/shells/fish/aliases.nix
Normal file
49
modules/home/shells/fish/aliases.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
{
|
||||||
|
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 ../../../../../";
|
||||||
|
}
|
||||||
|
|
@ -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; [
|
home.packages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,16 @@ with pkgs; {
|
||||||
untargz = "tar -xzf";
|
untargz = "tar -xzf";
|
||||||
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
|
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
|
||||||
du = getExe du-dust;
|
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\"";
|
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";
|
deploy = "nixos-rebuild switch --flake ~/nixos#pluto --target-host zoeys.computer --use-remote-sudo";
|
||||||
m = "mkdir";
|
m = "mkdir -p";
|
||||||
l = "exa -lF --time-style=long-iso --icons";
|
fcd = "cd $(find -type d | fzf)";
|
||||||
|
l = "ls -lF --time-style=long-iso --icons";
|
||||||
sc = "sudo systemctl";
|
sc = "sudo systemctl";
|
||||||
scu = "systemctl --user ";
|
scu = "systemctl --user ";
|
||||||
la = "${getExe eza} -lah --tree";
|
la = "${getExe eza} -lah --tree";
|
||||||
|
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
|
||||||
tree = "${getExe eza} --tree --icons --tree";
|
tree = "${getExe eza} --tree --icons --tree";
|
||||||
kys = "shutdown now";
|
kys = "shutdown now";
|
||||||
lv = "nvim -c \"normal '\''0\"";
|
lv = "nvim -c \"normal '\''0\"";
|
||||||
|
|
@ -34,8 +37,11 @@ with pkgs; {
|
||||||
n = "nix";
|
n = "nix";
|
||||||
r = "rebuild";
|
r = "rebuild";
|
||||||
vm = "nixos-rebuild build-vm --flake ~/nixos#earth";
|
vm = "nixos-rebuild build-vm --flake ~/nixos#earth";
|
||||||
|
mnt = "udisksctl mount -b";
|
||||||
|
umnt = "udisksctl unmount -b";
|
||||||
burn = "pkill -9";
|
burn = "pkill -9";
|
||||||
diff = "diff --color=auto";
|
diff = "diff --color=auto";
|
||||||
|
wu = "vpn disconnect -w && awsvpnclient start --config ~/Downloads/cvpn-endpoint-085400ccc19bb4a17.ovpn";
|
||||||
"v" = "nvim";
|
"v" = "nvim";
|
||||||
".." = "cd ..";
|
".." = "cd ..";
|
||||||
"..." = "cd ../../";
|
"..." = "cd ../../";
|
||||||
|
|
|
||||||
|
|
@ -17,35 +17,47 @@ in {
|
||||||
programs.nushell = {
|
programs.nushell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
# Nushell doesn't need generateCompletions like fish
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
$env.config.show_banner = false
|
|
||||||
|
|
||||||
if ('TMUX' in $env == false) {
|
|
||||||
exec tmux
|
|
||||||
}
|
|
||||||
|
|
||||||
fastfetch --config minimal
|
|
||||||
'';
|
|
||||||
|
|
||||||
extraEnv = ''
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
$env.LC_ALL = "en_US.UTF-8"
|
let-env LC_ALL = "en_US.UTF-8"
|
||||||
|
let-env SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
|
||||||
$env.SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh"
|
let-env FLAKE = "/home/zoey/nixos/"
|
||||||
$env.FLAKE = "/home/zoey/nixos/"
|
|
||||||
|
|
||||||
# FZF settings
|
# FZF settings
|
||||||
$env.FZF_PREVIEW_FILE_CMD = "head -n 10"
|
let-env FZF_PREVIEW_FILE_CMD = "head -n 10"
|
||||||
$env.FZF_PREVIEW_DIR_CMD = "ls"
|
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 {}'
|
||||||
|
}
|
||||||
|
|
||||||
|
def ff [] {
|
||||||
|
let files = (pf)
|
||||||
|
for file in $files {
|
||||||
|
let cmd = $"v ($file)"
|
||||||
|
echo $cmd
|
||||||
|
nu -c $cmd
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Nushell handles plugins differently, you might want to use modules instead
|
||||||
|
# or configure external tools directly
|
||||||
|
|
||||||
|
extraEnv = ''
|
||||||
|
# Add any environment-specific configuration here
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Import aliases (you'll need to convert fish aliases to Nushell format)
|
# Import aliases (you'll need to convert fish aliases to Nushell format)
|
||||||
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
|
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.carapace.enable = true;
|
|
||||||
programs.carapace.enableNushellIntegration = true;
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
gnumake
|
gnumake
|
||||||
comma
|
comma
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ in {
|
||||||
LC_ALL = "en_US.UTF-8";
|
LC_ALL = "en_US.UTF-8";
|
||||||
ZSH_AUTOSUGGEST_USE_ASYNC = "true";
|
ZSH_AUTOSUGGEST_USE_ASYNC = "true";
|
||||||
SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh";
|
SSH_AUTH_SOCK = "/run/user/1000/keyring/ssh";
|
||||||
NH_FLAKE = "/home/zoey/nixos/";
|
FLAKE = "/home/zoey/nixos/";
|
||||||
};
|
};
|
||||||
# zprof.enable = true;
|
# zprof.enable = true;
|
||||||
history = {
|
history = {
|
||||||
|
|
@ -33,7 +33,7 @@ in {
|
||||||
ignoreSpace = true;
|
ignoreSpace = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
initContent = let
|
initExtra = let
|
||||||
sources = with pkgs; [
|
sources = with pkgs; [
|
||||||
"${zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh"
|
"${zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh"
|
||||||
"${zsh-history}/share/zsh/init.zsh"
|
"${zsh-history}/share/zsh/init.zsh"
|
||||||
|
|
@ -77,7 +77,7 @@ in {
|
||||||
media = "/run/media/$USER";
|
media = "/run/media/$USER";
|
||||||
};
|
};
|
||||||
|
|
||||||
shellAliases = import ../aliases.nix {inherit pkgs lib config;};
|
shellAliases = import ./aliases.nix {inherit pkgs lib config;};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,10 @@ in {
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings = with colors; {
|
wayland.windowManager.hyprland.settings = with colors; {
|
||||||
exec-once = [
|
exec-once = [
|
||||||
"zen"
|
# "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"
|
||||||
"thunderbird"
|
"thunderbird"
|
||||||
"vesktop"
|
"vesktop"
|
||||||
"spotify"
|
"spotify"
|
||||||
|
|
@ -62,31 +65,20 @@ in {
|
||||||
"signal-desktop"
|
"signal-desktop"
|
||||||
];
|
];
|
||||||
|
|
||||||
# env = [
|
env = [
|
||||||
# "XDG_SESSION_TYPE,wayland"
|
"XDG_SESSION_TYPE,wayland"
|
||||||
# "XDG_SESSION_DESKTOP,Hyprland"
|
"XDG_SESSION_DESKTOP,Hyprland"
|
||||||
# "XDG_CURRENT_DESKTOP,Hyprland"
|
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||||
# ];
|
];
|
||||||
|
|
||||||
bind =
|
bind =
|
||||||
[
|
[
|
||||||
"${mod},RETURN,exec,${lib.getExe pkgs.kitty}"
|
''${mod},RETURN,exec,${lib.getExe pkgs.kitty}''
|
||||||
|
|
||||||
"${mod},D,exec,fuzzel"
|
"${mod},D,exec,rofi -show drun"
|
||||||
"${mod},Q,killactive"
|
"${mod},Q,killactive"
|
||||||
"${mod},M,exit"
|
"${mod},M,exit"
|
||||||
"${mod},P,pseudo"
|
"${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,"
|
"${mod},J,togglesplit,"
|
||||||
|
|
||||||
|
|
@ -124,13 +116,13 @@ in {
|
||||||
gaps_out = 8;
|
gaps_out = 8;
|
||||||
|
|
||||||
# border thiccness
|
# border thiccness
|
||||||
border_size = 4;
|
border_size = 2;
|
||||||
|
|
||||||
allow_tearing = true;
|
allow_tearing = true;
|
||||||
|
|
||||||
# active border color
|
# active border color
|
||||||
"col.active_border" = "${colors.lavender.rgb}";
|
"col.active_border" = "rgb(${rose})";
|
||||||
"col.inactive_border" = "${colors.base.rgb}";
|
"col.inactive_border" = "rgb(${muted})";
|
||||||
};
|
};
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
|
|
@ -146,7 +138,7 @@ in {
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
# fancy corners
|
# fancy corners
|
||||||
rounding = 0;
|
rounding = 4;
|
||||||
# blur
|
# blur
|
||||||
blur = {
|
blur = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
|
@ -199,7 +191,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
# for 10 bit color: DP-3,2560x1440@240,0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,1.0
|
# for 10 bit color: DP-3,2560x1440@240,0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,1.0
|
||||||
monitor = ["DP-1,2560x1440@240,0x0,1" "HDMI-A-1,disable"];
|
monitor = ["DP-3,2560x1440@240,0x0,1" "HDMI-A-1,disable" "DP-1,disable"];
|
||||||
|
|
||||||
layerrule = [
|
layerrule = [
|
||||||
"blur, ^(gtk-layer-shell)$"
|
"blur, ^(gtk-layer-shell)$"
|
||||||
|
|
@ -257,14 +249,14 @@ in {
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# systemd.user.services = {
|
systemd.user.services = {
|
||||||
# swaybg = mkService {
|
swaybg = mkService {
|
||||||
# Unit.Description = "Wallpaper chooser";
|
Unit.Description = "Wallpaper chooser";
|
||||||
# Service = {
|
Service = {
|
||||||
# ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
|
ExecStart = "${getExe pkgs.swaybg} -i ${wallpaper}";
|
||||||
# Restart = "always";
|
Restart = "always";
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,515 +0,0 @@
|
||||||
{
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -16,6 +16,8 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
xdg.configFile."vpn/work.ovpn" = {
|
xdg.configFile."vpn/work.ovpn" = {
|
||||||
text = ''
|
text = ''
|
||||||
|
conifg /home/zoey/cvpn-client.ovpn
|
||||||
|
|
||||||
up ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
|
up ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
|
||||||
down ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
|
down ${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -22,42 +22,100 @@ in {
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
wireplumber.enable = true;
|
wireplumber.enable = true;
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.cava-combine-inputs = {
|
# extraConfig.pipewire.adjust-sample-rate = {
|
||||||
description = "Combine MOTU M4 Line Inputs L/R for Cava";
|
# "context.properties" = {
|
||||||
|
# "default.clock.rate" = 41000;
|
||||||
|
# "default.clock.allowed-rates" = [44100];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
# Ensure this runs after pipewire-pulse is started
|
# wireplumber.extraConfig = {
|
||||||
after = ["pipewire-pulse.service"];
|
# "custom" = {
|
||||||
wants = ["pipewire-pulse.service"]; # Start pipewire-pulse if not already running
|
# "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";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
# Make it part of the default user session target
|
# wireplumber.extraScripts = {
|
||||||
wantedBy = ["default.target"];
|
# "auto-connect-tt.lua" = builtins.readFile ./auto-connect-tt.lua;
|
||||||
|
# };
|
||||||
# Service configuration details
|
# };
|
||||||
serviceConfig = {
|
#
|
||||||
Type = "oneshot"; # Run the command once and exit
|
# # PulseAudio compatibility layer configuration for 44.1kHz
|
||||||
# Use RemainAfterExit if you want the service to show as 'active' after running
|
# services.pipewire.extraConfig.pipewire-pulse."92-steam-config" = {
|
||||||
# RemainAfterExit = true;
|
# context.modules = [
|
||||||
|
# {
|
||||||
# Command to execute. Use full paths for robustness.
|
# name = "libpipewire-module-protocol-pulse";
|
||||||
# We use sh -c to run multiple commands sequentially.
|
# args = {
|
||||||
# pactl is provided by the pulseaudio package.
|
# pulse.min.req = "32/44100";
|
||||||
ExecStart = "${pkgs.writeShellScriptBin "cava-start" ''
|
# pulse.default.req = "32/44100";
|
||||||
echo "Attempting to load Cava combine modules..."
|
# pulse.min.quantum = "32/44100";
|
||||||
# Load null sink (returns non-zero if it fails AND module doesn't exist)
|
# pulse.max.quantum = "8192/44100";
|
||||||
${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)
|
# environment.sessionVariables = {
|
||||||
exit 0
|
# PIPEWIRE_LATENCY = "1024/44100";
|
||||||
''}/bin/cava-start";
|
|
||||||
|
|
||||||
# Prevent service from restarting automatically
|
|
||||||
Restart = "no";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,132 +8,15 @@
|
||||||
with lib;
|
with lib;
|
||||||
with lib.custom; let
|
with lib.custom; let
|
||||||
cfg = config.hardware.gpu-passthru;
|
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 {
|
in {
|
||||||
options.hardware.gpu-passthru = with types; {
|
options.hardware.gpu-passthru = with types; {
|
||||||
enable = mkBoolOpt false "Enable support for single gpu-passthru";
|
enable = mkBoolOpt false "Enable support for single gpu-passthru";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
boot.kernelParams = ["intel_iommu=on" "iommu=pt" "transparent_hugepage=always"];
|
boot.kernelParams = ["intel_iommu=on" "iommu=pt"];
|
||||||
boot.kernelModules = ["vfio-pci"];
|
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 = {
|
virtualisation.libvirtd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
onBoot = "ignore";
|
onBoot = "ignore";
|
||||||
|
|
@ -173,10 +56,6 @@ in {
|
||||||
in [env];
|
in [env];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.libvirtd-config = {
|
|
||||||
enable = lib.mkForce false;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.activationScripts.libvirt-hooks.text = ''
|
system.activationScripts.libvirt-hooks.text = ''
|
||||||
ln -Tfs /etc/libvirt/hooks /var/lib/libvirt/hooks
|
ln -Tfs /etc/libvirt/hooks /var/lib/libvirt/hooks
|
||||||
'';
|
'';
|
||||||
|
|
@ -234,12 +113,104 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
"libvirt/hooks/qemu.d/win10/prepare/begin/start.sh" = {
|
"libvirt/hooks/qemu.d/win10/prepare/begin/start.sh" = {
|
||||||
text = startScript;
|
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
|
||||||
|
'';
|
||||||
mode = "0755";
|
mode = "0755";
|
||||||
};
|
};
|
||||||
|
|
||||||
"libvirt/hooks/qemu.d/win10/release/end/stop.sh" = {
|
"libvirt/hooks/qemu.d/win10/release/end/stop.sh" = {
|
||||||
text = stopScript;
|
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
|
||||||
|
'';
|
||||||
mode = "0755";
|
mode = "0755";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -44,43 +44,7 @@ in {
|
||||||
nvidiaSettings = false;
|
nvidiaSettings = false;
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
# 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 = {
|
environment.variables = {
|
||||||
|
|
|
||||||
|
|
@ -15,51 +15,50 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.greetd = {
|
environment.etc."greetd/environments".text = ''
|
||||||
|
sway
|
||||||
|
'';
|
||||||
|
|
||||||
|
services = {
|
||||||
|
greetd = {
|
||||||
enable = false;
|
enable = false;
|
||||||
settings = {
|
settings = rec {
|
||||||
default_session = {
|
initial_session = {
|
||||||
command = "niri-session";
|
# command = "sway --unsupported-gpu";
|
||||||
|
command = "Hyprland";
|
||||||
user = "zoey";
|
user = "zoey";
|
||||||
};
|
};
|
||||||
|
default_session = initial_session;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
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 = {
|
programs.uwsm = {
|
||||||
waylandCompositors = {
|
enable = true;
|
||||||
|
# waylandCompositors = {
|
||||||
# "mwc" = {
|
# "mwc" = {
|
||||||
# prettyName = "MWC";
|
# prettyName = "MWC";
|
||||||
# binPath = "/run/current-system/sw/bin/mwc";
|
# binPath = "/run/current-system/sw/bin/mwc";
|
||||||
# comment = "previously owl";
|
# comment = "previously owl";
|
||||||
# };
|
# };
|
||||||
# niri = {
|
|
||||||
# prettyName = "niri";
|
|
||||||
# binPath = "/run/current-system/sw/bin/niri";
|
|
||||||
# comment = "niri";
|
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
# environment.systemPackages = [
|
# environment.systemPackages = [
|
||||||
# pkgs.custom.mwc
|
# pkgs.custom.mwc
|
||||||
# ];
|
# ];
|
||||||
|
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
withUWSM = false;
|
withUWSM = true;
|
||||||
enable = false;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.niri.enable = true;
|
programs.niri.enable = false;
|
||||||
programs.niri.package = inputs.niri-src.packages.${pkgs.system}.niri;
|
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
variables = {
|
variables = {
|
||||||
|
|
@ -79,31 +78,26 @@ in {
|
||||||
WLR_BACKEND = "wayland";
|
WLR_BACKEND = "wayland";
|
||||||
WLR_RENDERER = "wayland";
|
WLR_RENDERER = "wayland";
|
||||||
XDG_SESSION_TYPE = "wayland";
|
XDG_SESSION_TYPE = "wayland";
|
||||||
SDL_VIDEODRIVER = "wayland,x11";
|
SDL_VIDEODRIVER = "wayland";
|
||||||
XDG_CACHE_HOME = "/home/zoey/.cache";
|
XDG_CACHE_HOME = "/home/zoey/.cache";
|
||||||
CLUTTER_BACKEND = "wayland";
|
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)
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.pulseaudio.support32Bit = true;
|
hardware.pulseaudio.support32Bit = true;
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
wlr.enable = false;
|
||||||
|
config.common.default = "*";
|
||||||
extraPortals = [
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
# pkgs.xwaylandvideobridge
|
# pkgs.xwaylandvideobridge
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
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}"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
@ -27,10 +27,6 @@ in {
|
||||||
};
|
};
|
||||||
zach-pw.file = ./sec/zach-pw.age;
|
zach-pw.file = ./sec/zach-pw.age;
|
||||||
emily-pw.file = ./sec/emily-piccat.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 = {
|
mailserver = {
|
||||||
|
|
@ -41,7 +37,7 @@ in {
|
||||||
loginAccounts = {
|
loginAccounts = {
|
||||||
"zoey@zoeys.email" = {
|
"zoey@zoeys.email" = {
|
||||||
hashedPasswordFile = sec.webmaster-pw.path;
|
hashedPasswordFile = sec.webmaster-pw.path;
|
||||||
aliases = ["zoey@zoeys.cloud" "errors@zoeys.cloud" "admin@zoeys.cloud" "postmaster@zoeys.email" "abuse@zoeys.email"];
|
aliases = ["zoey@zoeys.cloud" "postmaster@zoeys.email" "abuse@zoeys.email"];
|
||||||
};
|
};
|
||||||
"hi@zoeys.computer" = {
|
"hi@zoeys.computer" = {
|
||||||
hashedPasswordFile = sec.zoeycomputer-pw.path;
|
hashedPasswordFile = sec.zoeycomputer-pw.path;
|
||||||
|
|
@ -55,13 +51,6 @@ in {
|
||||||
hashedPasswordFile = sec.emily-pw.path;
|
hashedPasswordFile = sec.emily-pw.path;
|
||||||
aliases = ["emily@pictureofcat.com"];
|
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";
|
certificateScheme = "acme-nginx";
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,7 +0,0 @@
|
||||||
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
|
|
||||||
|
|
@ -19,6 +19,24 @@ in {
|
||||||
enable = cfg.mullvad;
|
enable = cfg.mullvad;
|
||||||
package = nixos-stable.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 = {
|
services.openvpn = {
|
||||||
servers = {
|
servers = {
|
||||||
|
|
@ -30,5 +48,22 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.openvpn-work.wantedBy = lib.mkForce [];
|
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";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
modules/nixos/sites/cache/default.nix
vendored
1
modules/nixos/sites/cache/default.nix
vendored
|
|
@ -24,7 +24,6 @@ in {
|
||||||
services.nix-serve = {
|
services.nix-serve = {
|
||||||
enable = true;
|
enable = true;
|
||||||
secretKeyFile = sec.cache_key.path;
|
secretKeyFile = sec.cache_key.path;
|
||||||
port = 12024;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."cache.zoeys.computer" = {
|
services.nginx.virtualHosts."cache.zoeys.computer" = {
|
||||||
|
|
|
||||||
|
|
@ -1,107 +0,0 @@
|
||||||
{
|
|
||||||
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.
|
|
@ -1,7 +0,0 @@
|
||||||
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áop‹h°ðhç5]Ž|Új1‰_e#mDö~mvŒÈ¢osõ˜ÊRfúù’‚€’ðfëoÕ<>óÅ"RžÜêf8uuU?¯
|
|
||||||
|
|
@ -48,15 +48,48 @@ in {
|
||||||
gitlab_runner = {
|
gitlab_runner = {
|
||||||
file = ./sec/gitlab_runner.age;
|
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
|
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 = {
|
services.gitlab = {
|
||||||
enable = true;
|
enable = true;
|
||||||
databasePasswordFile = sec.gitlab_db.path;
|
databasePasswordFile = sec.gitlab_db.path;
|
||||||
|
|
@ -64,15 +97,6 @@ in {
|
||||||
port = 443;
|
port = 443;
|
||||||
https = true;
|
https = true;
|
||||||
host = cfg.domain;
|
host = cfg.domain;
|
||||||
|
|
||||||
smtp = {
|
|
||||||
enable = true;
|
|
||||||
address = "mail.zoeys.cloud";
|
|
||||||
username = "gitlab@zoeys.cloud";
|
|
||||||
passwordFile = sec.gitlab_email_pw.path;
|
|
||||||
port = 465;
|
|
||||||
};
|
|
||||||
|
|
||||||
secrets = {
|
secrets = {
|
||||||
secretFile = sec.gitlab_sec.path;
|
secretFile = sec.gitlab_sec.path;
|
||||||
otpFile = sec.gitlab_otp.path;
|
otpFile = sec.gitlab_otp.path;
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
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®ùÉ
|
|
||||||
|
|
@ -20,17 +20,17 @@ in {
|
||||||
group = "users";
|
group = "users";
|
||||||
};
|
};
|
||||||
|
|
||||||
# virtualisation.oci-containers = {
|
virtualisation.oci-containers = {
|
||||||
# containers.jellyfin-vue = {
|
containers.jellyfin-vue = {
|
||||||
# image = "ghcr.io/jellyfin/jellyfin-vue:unstable";
|
image = "ghcr.io/jellyfin/jellyfin-vue:unstable";
|
||||||
# environment = {
|
environment = {
|
||||||
# "PUBLIC_JELLYFIN_API" = "http://localhost:8096";
|
"PUBLIC_JELLYFIN_API" = "http://localhost:8096";
|
||||||
# };
|
};
|
||||||
# ports = [
|
ports = [
|
||||||
# "8065:80"
|
"8065:80"
|
||||||
# ];
|
];
|
||||||
# };
|
};
|
||||||
# };
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [8065];
|
networking.firewall.allowedTCPPorts = [8065];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,204 +0,0 @@
|
||||||
{
|
|
||||||
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.
|
|
@ -1,7 +0,0 @@
|
||||||
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.
|
|
@ -1,7 +0,0 @@
|
||||||
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.
|
|
@ -29,15 +29,15 @@ in {
|
||||||
lexend
|
lexend
|
||||||
jost
|
jost
|
||||||
dejavu_fonts
|
dejavu_fonts
|
||||||
# iosevka
|
iosevka
|
||||||
cantarell-fonts
|
cantarell-fonts
|
||||||
(iosevka.override
|
# (iosevka.override
|
||||||
{
|
# {
|
||||||
set = "Custom";
|
# set = "Custom";
|
||||||
privateBuildPlan = ''
|
# privateBuildPlan = ''
|
||||||
# [buildPlans.IosevkaCustom]
|
# [buildPlans.IosevkaCustom]
|
||||||
# family = "Iosevka"
|
# family = "Iosevka"
|
||||||
# spacing = "fontconfig-mono"
|
# spacing = "normal"
|
||||||
# serifs = "sans"
|
# serifs = "sans"
|
||||||
# noCvSs = true
|
# noCvSs = true
|
||||||
# exportGlyphNames = true
|
# exportGlyphNames = true
|
||||||
|
|
@ -49,97 +49,15 @@ in {
|
||||||
# shape = 500
|
# shape = 500
|
||||||
# menu = 5
|
# menu = 5
|
||||||
# css = "normal"
|
# 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
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
jetbrains-mono
|
jetbrains-mono
|
||||||
nerd-fonts.iosevka
|
nerd-fonts.iosevka
|
||||||
nerd-fonts.zed-mono
|
nerd-fonts.zed-mono
|
||||||
nerd-fonts.fira-code
|
|
||||||
nerd-fonts.jetbrains-mono
|
|
||||||
adwaita-fonts
|
adwaita-fonts
|
||||||
cozette
|
|
||||||
scientifica
|
|
||||||
# (nerdfonts.override {fonts = ["ZedMono" "Iosevka"];})
|
# (nerdfonts.override {fonts = ["ZedMono" "Iosevka"];})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -149,11 +67,12 @@ in {
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
monospace = [
|
monospace = [
|
||||||
fonts.mono
|
# "Pragmata Pro Mono"
|
||||||
|
"Iosevka"
|
||||||
"Noto Color Emoji"
|
"Noto Color Emoji"
|
||||||
];
|
];
|
||||||
sansSerif = [fonts.ui "Noto Color Emoji"];
|
sansSerif = ["Adwaita Sans" "Noto Color Emoji"];
|
||||||
serif = [fonts.ui "Noto Color Emoji"];
|
serif = ["Noto Serif" "Noto Color Emoji"];
|
||||||
emoji = ["Noto Color Emoji"];
|
emoji = ["Noto Color Emoji"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
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 {};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
430
packages/zen-browser-unwrapped/default.nix
Normal file
430
packages/zen-browser-unwrapped/default.nix
Normal file
|
|
@ -0,0 +1,430 @@
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
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())
|
||||||
|
}
|
||||||
66
packages/zen-browser-unwrapped/update.sh
Executable file
66
packages/zen-browser-unwrapped/update.sh
Executable file
|
|
@ -0,0 +1,66 @@
|
||||||
|
#!/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!"
|
||||||
8
packages/zen-browser/default.nix
Normal file
8
packages/zen-browser/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
wrapFirefox,
|
||||||
|
custom,
|
||||||
|
}:
|
||||||
|
wrapFirefox custom.zen-browser-unwrapped {
|
||||||
|
pname = "zen-browser";
|
||||||
|
libName = "zen";
|
||||||
|
}
|
||||||
|
|
@ -30,6 +30,11 @@
|
||||||
hardware.keyboard.qmk.enable = true;
|
hardware.keyboard.qmk.enable = true;
|
||||||
programs.nix-ld.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 = {
|
hardware.march = {
|
||||||
arch = "znver3";
|
arch = "znver3";
|
||||||
enableNativeOptimizations = true;
|
enableNativeOptimizations = true;
|
||||||
|
|
@ -37,27 +42,10 @@
|
||||||
memory.total = 32;
|
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 = {
|
specialisation = {
|
||||||
plasma6 = {
|
plasma6 = {
|
||||||
configuration = {
|
configuration = {
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.xserver.desktopManager.plasma6.enable = true;
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.xserver.displayManager.gdm.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
programs.seahorse.enable = lib.mkForce false;
|
programs.seahorse.enable = lib.mkForce false;
|
||||||
};
|
};
|
||||||
|
|
@ -74,29 +62,7 @@
|
||||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||||
};
|
};
|
||||||
programs.steam.gamescopeSession.enable = true;
|
programs.steam.gamescopeSession.enable = true;
|
||||||
# programs.gamemode = {
|
programs.gamemode.enable = true;
|
||||||
# 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;
|
ui.fonts.enable = true;
|
||||||
|
|
||||||
|
|
@ -151,28 +117,23 @@
|
||||||
# insertNameservers = ["1.1.1.1" "1.0.0.1"];
|
# insertNameservers = ["1.1.1.1" "1.0.0.1"];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.scx.enable = true;
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
services.scx.scheduler = "scx_rusty";
|
boot.kernelPatches = [
|
||||||
services.scx.package = pkgs.scx_git.full;
|
{
|
||||||
|
name = "bsb-patches";
|
||||||
boot.kernelPackages = pkgs.linuxPackages_cachyos-lto;
|
patch = pkgs.fetchpatch {
|
||||||
# CachyOS-inspired kernel parameters for better desktop responsiveness and gaming
|
url = "https://gist.githubusercontent.com/galister/08cddf10ac18929647d5fb6308df3e4b/raw/0f6417b6cb069f19d6c28b730499c07de06ec413/combined-bsb-6-10.patch";
|
||||||
boot.kernelParams = [
|
hash = "sha256-u8O4foBHhU+T3yYkguBZ14EyCKujPzHh1TwFRg6GMsA=";
|
||||||
"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"];
|
boot.supportedFilesystems = ["ntfs"];
|
||||||
|
|
||||||
services.dlna.enable = false;
|
services.dlna.enable = false;
|
||||||
|
# services.openssh = {
|
||||||
|
# enable = true;
|
||||||
|
# PasswordAuthentication = true;
|
||||||
|
# };
|
||||||
|
|
||||||
time.timeZone = "America/Detroit";
|
time.timeZone = "America/Detroit";
|
||||||
|
|
||||||
|
|
@ -189,13 +150,9 @@
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.sbctl
|
pkgs.sbctl
|
||||||
|
lib.custom.nixos-stable.vesktop
|
||||||
pkgs.mangohud
|
pkgs.mangohud
|
||||||
(pkgs.lutris.override {
|
pkgs.lutris
|
||||||
extraPkgs = pkgs: [
|
|
||||||
inputs.nix-gaming.packages.${pkgs.system}.wine-tkg-zoey
|
|
||||||
pkgs.winetricks
|
|
||||||
];
|
|
||||||
})
|
|
||||||
pkgs.bottles
|
pkgs.bottles
|
||||||
pkgs.file-roller
|
pkgs.file-roller
|
||||||
pkgs.podman-tui
|
pkgs.podman-tui
|
||||||
|
|
@ -205,17 +162,60 @@
|
||||||
pkgs.transmission_4
|
pkgs.transmission_4
|
||||||
pkgs.protonup-qt
|
pkgs.protonup-qt
|
||||||
pkgs.restic
|
pkgs.restic
|
||||||
|
inputs.opnix.packages.${system}.default
|
||||||
pkgs.qt5.qtwayland
|
pkgs.qt5.qtwayland
|
||||||
pkgs.vkBasalt # Vulkan post-processing layer for better visuals
|
(inputs.umu.packages.${system}.umu.override {
|
||||||
pkgs.goverlay # MangoHud and vkBasalt GUI configurator
|
version = inputs.umu.shortRev;
|
||||||
pkgs.cpupower-gui # CPU frequency control GUI
|
truststore = true;
|
||||||
pkgs.ananicy-cpp # Process priority daemon
|
cbor2 = true;
|
||||||
(inputs.umu.packages.${system}.umu-launcher.override {
|
|
||||||
withTruststore = true;
|
|
||||||
withDeltaUpdates = true;
|
|
||||||
})
|
})
|
||||||
inputs.agenix.packages.${system}.agenix
|
inputs.agenix.packages.${system}.agenix
|
||||||
inputs.awsvpnclient.packages.${system}.awsvpnclient
|
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;
|
programs.zsh.enable = true;
|
||||||
|
|
@ -253,7 +253,7 @@
|
||||||
services.samba = {
|
services.samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
settings = {
|
shares = {
|
||||||
"SteamLibrary" = {
|
"SteamLibrary" = {
|
||||||
path = "/mnt/bk"; # Update this path to your drive's mount point
|
path = "/mnt/bk"; # Update this path to your drive's mount point
|
||||||
browseable = true;
|
browseable = true;
|
||||||
|
|
@ -269,18 +269,6 @@
|
||||||
catppuccin.enable = true;
|
catppuccin.enable = true;
|
||||||
programs.virt-manager.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.jellyfin.enable = true;
|
||||||
sites.mealie.enable = false;
|
sites.mealie.enable = false;
|
||||||
|
|
||||||
|
|
@ -290,6 +278,7 @@
|
||||||
dockerCompat = true;
|
dockerCompat = true;
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
};
|
};
|
||||||
|
virtualisation.waydroid.enable = true;
|
||||||
hardware.gpu-passthru.enable = true;
|
hardware.gpu-passthru.enable = true;
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,9 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
config,
|
config,
|
||||||
specialArgs,
|
|
||||||
system,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -15,8 +12,6 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# nixpkgs.pkgs = lib.mkForce inputs.nixos-stable.legacyPackages.${system};
|
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = ["zoey"];
|
trusted-users = ["zoey"];
|
||||||
};
|
};
|
||||||
|
|
@ -102,8 +97,6 @@
|
||||||
minio.enable = true;
|
minio.enable = true;
|
||||||
immich.enable = true;
|
immich.enable = true;
|
||||||
polaris.enable = false;
|
polaris.enable = false;
|
||||||
sourcehut.enable = false;
|
|
||||||
forgejo.enable = true;
|
|
||||||
zoeycomputer = {
|
zoeycomputer = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "zoeys.computer";
|
domain = "zoeys.computer";
|
||||||
|
|
@ -119,8 +112,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
catppuccin.flavor = "mocha";
|
|
||||||
|
|
||||||
zmio.blog.enable = true;
|
zmio.blog.enable = true;
|
||||||
zmio.blog.domain = "zackmyers.io";
|
zmio.blog.domain = "zackmyers.io";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,17 +10,6 @@
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.optimise = {
|
|
||||||
automatic = true;
|
|
||||||
dates = ["03:45"];
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 14d";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
efiInstallAsRemovable = true;
|
efiInstallAsRemovable = true;
|
||||||
|
|
@ -75,6 +64,16 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.mc-honeypot = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
openFirewall = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
"webhook-url" = "https://discord.com/api/webhooks/1348850542398410834/1fqV4QLh4uTTuwZ0DjOczZa6gkDjsYECSlmWBwTXHWcYTHhwsE1ZLTP17z5v-vh6nn7H";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [80 443];
|
networking.firewall.allowedTCPPorts = [80 443];
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue