small update

This commit is contained in:
Bloxx12 2025-07-13 22:51:22 +02:00
commit b1490ec9a8
Signed by: faukah
SSH key fingerprint: SHA256:Uj2AXqvtdCA4hn5Hq0ZonhIAyUqI1q4w2sMG3Z1TH7E
100 changed files with 187 additions and 1695 deletions

View file

@ -1,7 +0,0 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
in {
options.modules.system.networking = {
nftbles.enable = mkEnableOption "Nftables firewall";
};
}

View file

@ -5,35 +5,11 @@
}: let
inherit (builtins) elemAt;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) enum listOf str nullOr bool oneOf;
inherit (lib.types) enum listOf str nullOr bool;
inherit (lib.lists) elem;
inherit (config.modules.system) systemType;
in {
imports = [
# configuration options for nixos activation scripts
# ./activation.nix
# boot/impermanence mounts
# ./boot.nix
# ./impermanence.nix
# network and overall hardening
./networking
# ./security.nix
# ./encryption.nix
# filesystems
# ./fs.nix
# package and program related options
# ./services
./programs
# monitor configuration
./monitors.nix
];
options.modules.system = {
mainUser = mkOption {
type = enum config.modules.system.users;

View file

@ -1,8 +0,0 @@
_: {
imports = [
./system.nix
./xdg.nix
./git.nix
./users.nix
];
}

View file

@ -1,7 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
}

View file

@ -1,22 +0,0 @@
{pkgs, ...}: {
imports = [
./hardware.nix
./wayland.nix
# ./media.nix
];
# These are some standard packages I want to have installed on every system, regardless of type or use case.
environment.systemPackages = builtins.attrValues {
inherit
(pkgs)
calc # Calculator device
# coreutils-full # All of the GNU coreutils
curl # I sometimes need to curl stuff
git # take a guess
inetutils # internet stuff I need/want on every system.
wget
unzip # zipping and unzipping stuff
zip
util-linux
;
};
}

View file

@ -1,15 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
# These are packages I only need in wayland environments, nowhere else.
environment.systemPackages = builtins.attrValues {
inherit
(pkgs)
wl-clipboard
grimblast
;
};
}

View file

@ -1,6 +0,0 @@
_: {
imports = [
./nh.nix
# ./beets.nix
];
}

View file

@ -0,0 +1,7 @@
_: {
programs.zoxide = {
enable = true;
enableFishIntegration = true;
enableBashIntegration = true;
};
}

View file

@ -201,7 +201,9 @@ in {
# NoScript
"doojmbjmlfjjnbmnoijecmcbfeoakpjm"
# KeePassXC-Browser
"oboonakemofpalcgghocfoadofidjkkk"
# "oboonakemofpalcgghocfoadofidjkkk"
# Bitwarden Password Manager
"nngceckbapebfimnlniiiahkandclblb"
# Catppuccin Mocha
"bkkmolkhemgaeaeggcmfbghljjjoofoh"
# Dark Reader

View file

@ -1,10 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
environment.systemPackages = builtins.attrValues {
inherit (pkgs) fuzzel;
};
}

View file

@ -20,55 +20,44 @@
else "none";
ghostty-settings = {
font-family = "JetBrainsMonoNerdFont";
font-family-bold = "JetBrainsMonoNerdFontBold";
font-family-italic = "JetBrainsMonoNerdFontItalic";
font-family-bold-italic = "JetBrainsMonoNerdFontBoldItalic";
font-size = 14;
font-family = "JetBrainsMonoNerdFont";
# font-style-bold = JetBrainsMono NF Regular;
# font-style-bold-italic = JetBrainsMono NF Italic;
window-padding-x = 8;
window-padding-y = 8;
background-opacity = 0.85;
app-notifications = "no-clipboard-copy";
background-opacity = 0.75;
bold-is-bright = "true";
confirm-close-surface = "false";
cursor-style-blink = "false";
gtk-single-instance = "true";
gtk-tabs-location = "bottom";
gtk-wide-tabs = false;
window-padding-balance = true;
window-decoration = "none";
theme = slug;
resize-overlay-duration = "0s";
cursor-style-blink = "false";
confirm-close-surface = "false";
mouse-hide-while-typing = "true";
window-theme = "ghostty";
bold-is-bright = "true";
term = "xterm-256color";
app-notifications = "no-clipboard-copy";
resize-overlay-duration = "0s";
shell-integration-features = "cursor,sudo,no-title";
# window-padding-y = 10;
term = "xterm-256color";
theme = slug;
window-decoration = "none";
window-padding-balance = true;
window-padding-x = 8;
window-padding-y = 8;
window-theme = "ghostty";
cursor-style = "block";
# Whether to automatically copy selected text to the clipboard. true will prefer to copy to the selection clipboard, otherwise it will copy to the system clipboard.
# The value clipboard will always copy text to the selection clipboard as well as the system clipboard.
copy-on-select = "clipboard";
inherit shell-integration;
command = getExe package;
};
settingsFile = pkgs.writeText "config" <| concatStringsSep "\n" <| mapAttrsToList (name: value: "${name} = ${toString value}") ghostty-settings;
ghostty = pkgs.ghostty.overrideAttrs (_: {
preBuild = ''
shopt -s globstar
sed -i 's/^const xev = @import("xev");$/const xev = @import("xev").Epoll;/' **/*.zig
shopt -u globstar
'';
});
ghostty-wrapped = pkgs.symlinkJoin {
name = "ghostty-wrapped";
paths = [ghostty];
paths = [pkgs.ghostty];
nativeBuildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/ghostty --add-flags "--config-file=${settingsFile}"

View file

@ -1,9 +0,0 @@
_: {
imports = [
./foot.nix
./steam.nix
# ./schizofox.nix
./minecraft.nix
./miniflux.nix
];
}

View file

@ -1,117 +0,0 @@
{
config,
inputs,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (builtins) listToAttrs;
cfg = config.modules.programs.schizofox;
in {
options.modules.programs.schizofox.enable = mkEnableOption "Schizofox browser";
imports = [
inputs.schizofox.nixosModules.default
];
config = mkIf cfg.enable {
programs.schizofox = {
enable = true;
theme = {
font = "Lexend";
colors = {
background-darker = "181825";
background = "1e1e2e";
foreground = "cdd6f4";
};
};
security = {
sanitizeOnShutdown.enable = true;
sandbox.enable = true;
noSessionRestore = true;
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
};
misc = {
drm.enable = true;
disableWebgl = false;
bookmarks = [
{
Title = "Noogle";
URL = "https://noogle.dev";
Placement = "toolbar";
}
{
Title = "Nixpkgs Manual";
URL = "https://nixos.org/manual/nixpkgs/stable";
Placement = "toolbar";
}
];
};
extensions = {
simplefox.enable = true;
darkreader.enable = true;
enableDefaultExtensions = true;
enableExtraExtensions = true;
extraExtensions = let
extensions = [
{
id = "{c2c003ee-bd69-42a2-b0e9-6f34222cb046}";
name = "auto-tab-discard";
}
{
id = "{a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad}";
name = "refined-github-";
}
{
id = "sponsorBlocker@ajay.app";
name = "sponsorblock";
}
{
id = "{446900e4-71c2-419f-a6a7-df9c091e268b}";
name = "bitwarden-password-manager";
}
{
id = "{74145f27-f039-47ce-a470-a662b129930a}";
name = "clearurls";
}
{
id = "{b86e4813-687a-43e6-ab65-0bde4ab75758}";
name = "localcdn-fork-of-decentraleyes";
}
{
id = "smart-referer@meh.paranoid.pk";
name = "smart-referer";
}
{
id = "skipredirect@sblask";
name = "skip-redirect";
}
{
id = "7esoorv3@alefvanoon.anonaddy.me";
name = "libredirect";
}
{
id = "DontFuckWithPaste@raim.ist";
name = "dont-fuck-with-paste";
}
];
mappedExtensions =
map (extension: {
name = extension.id;
value = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${extension.name}/latest.xpi";
};
})
extensions;
in
listToAttrs mappedExtensions;
};
};
};
}

View file

@ -10,8 +10,8 @@
# We want direnv to load in our nix dev shells
loadInNixShell = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableBashIntegration = false;
enableFishIntegration = false;
};
};
}

View file

@ -1,3 +0,0 @@
_: {
imports = [./direnv.nix ./nix-index.nix];
}

View file

@ -1,3 +0,0 @@
_: {
imports = [./btop.nix];
}

View file

@ -1,22 +0,0 @@
--- a/zellij-server/src/panes/grid.rs
+++ b/zellij-server/src/panes/grid.rs
@@ -271,7 +271,7 @@ fn subtract_isize_from_usize(u: usize, i: isize) -> usize {
macro_rules! dump_screen {
($lines:expr) => {{
let mut is_first = true;
- let mut buf = "".to_owned();
+ let mut buf = String::with_capacity($lines.iter().map(|l| l.len()).sum());
for line in &$lines {
if line.is_canonical && !is_first {
@@ -280,8 +280,7 @@ macro_rules! dump_screen {
let s: String = (&line.columns).into_iter().map(|x| x.character).collect();
// Replace the spaces at the end of the line. Sometimes, the lines are
// collected with spaces until the end of the panel.
- let re = Regex::new("([^ ])[ ]*$").unwrap();
- buf.push_str(&(re.replace(&s, "${1}")));
+ buf.push_str(&s.trim_end_matches(' '));
is_first = false;
}
buf

View file

@ -26,23 +26,6 @@ in {
ExecStart = "${getExe' pkgs.owncloud-client "owncloud"}";
Restart = "always";
RestartSec = 30;
# User = "cr";
# Group = "cr";
# Keyringmode = "shared";
# DevicePolicy = "closed";
# PrivateDevices = true;
# PrivateTmp = true;
# ProtectClock = true;
# ProtectControlGroups = true;
# ProtectControlGroup = true;
# ProtectKernelLogs = true;
# ProtectKernelModules = true;
# ProtectKernelTunables = true;
# ProtectSystem = "strict";
# SystemCallFilter = "~@clock @cpu-emulation @debug @obsolete @module @mount @raw-io @reboot @swap @privileged";
};
};
};

View file

@ -1,39 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.system.services.plausible;
port = 4030;
domain = "analytics.copeberg.org";
in {
options.modules.system.services.plausible.enable = mkEnableOption "Plausible, an analytics service";
config = mkIf cfg.enable {
services.plausible = {
enable = true;
server = {
baseUrl = "http://${domain}";
secretKeybaseFile = "/run/secrets/plausible-secret-key-base";
disableRegistration = false;
};
database.postgres = {
dbname = "plausible";
};
};
services.nginx = {
enable = true;
virtualHosts.${domain} = {
addSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
};
};
};
};
}

View file

@ -1,119 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
inherit (builtins) toString;
cfg = config.modules.services.searxng;
port = 4021;
in {
options.modules.services.searxng.enable = mkEnableOption "SearXNG, a private search engine";
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [port];
services = {
nginx.enable = true;
searx = {
enable = true;
package = pkgs.searxng;
environmentFile = "/srv/data/searxng/super_secret_file";
settings = {
general = {
name = "Copesearch";
privacypolicy_url = false;
debug = false;
enable_metrics = false;
};
search = {
safe_search = 1;
formats = ["html" "json" "rss"];
autocomplete = "google"; # "dbpedia", "duckduckgo", "google", "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off by default
default_lang = "en";
};
ui = {
query_in_title = true;
theme_args.simple_style = "dark"; # auto, dark, light
results_on_new_tab = false;
};
server = {
inherit port;
limiter = false;
image_proxy = false;
# taken from https://github.com/searx/searx/issues/715
default_http_headers = {
X-Content-Type-Options = "nosniff";
X-XSS-Protection = "1; mode=block";
X-Download-Options = "noopen";
X-Robots-Tag = "noindex, nofollow";
Referrer-Policy = "no-referrer";
};
};
# shamelessly stolen from NotAShelf
engines = [
{
name = "wikipedia";
engine = "wikipedia";
shortcut = "w";
base_url = "https://wikipedia.org/";
}
{
name = "duckduckgo";
engine = "duckduckgo";
shortcut = "ddg";
}
{
name = "google";
engine = "google";
shortcut = "g";
use_mobile_ui = false;
}
{
name = "archwiki";
engine = "archlinux";
shortcut = "aw";
}
{
name = "github";
engine = "github";
categories = "it";
shortcut = "gh";
}
{
name = "nixpkgs";
shortcut = "nx";
engine = "elasticsearch";
categories = "dev,nix";
base_url = "https://nixos-search-5886075189.us-east-1.bonsaisearch.net:443";
index = "latest-31-nixos-unstable";
query_type = "match";
}
];
};
};
nginx.virtualHosts."search.copeberg.org" = {
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
extraConfig = ''
access_log /dev/null;
error_log /dev/null;
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
'';
quic = true;
forceSSL = true;
enableACME = true;
};
};
};
}

View file

@ -0,0 +1,17 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (config.modules.system) isGraphical;
in {
# TODO: setup
services.spotifyd = mkIf isGraphical {
enable = true;
settings = {
};
config = {
};
};
}

View file

@ -96,7 +96,7 @@ in {
symbols-only
;
inherit fancy-iosevka;
# inherit fancy-iosevka;
};
fontDir = {
# Whether to create a directory with links to all fonts in

View file

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

View file

@ -20,9 +20,9 @@ Singleton {
}
readonly property QtObject border: QtObject {
readonly property int thickness: 8
readonly property int thickness: 0
readonly property color color: "#1e1e2e"
readonly property int rounding: 25
readonly property int rounding: 0
}
readonly property QtObject catppuccin: QtObject {

View file

@ -1,3 +0,0 @@
_: {
imports = [./intel.nix];
}

View file

@ -0,0 +1,3 @@
_: {
services.irqbalance.enable = true;
}

View file

@ -1,10 +0,0 @@
_: {
imports = [
./bluetooth.nix
./keyboard
./graphics.nix
./power.nix
];
services.irqbalance.enable = true;
}

View file

@ -1,14 +0,0 @@
{config, ...}: let
machine-id = builtins.substring 0 23 (builtins.hashString "sha256" config.networking.hostName);
in {
system = {
# faster rebuilds
# switch = {
# enable = false;
# };
# My state version.
stateVersion = "23.11";
};
environment.etc."machine-id".text = "${machine-id}\n";
}

View file

@ -10,8 +10,6 @@
inherit (lib.modules) mkForce;
in {
imports = [
./documentation.nix # nixos documentation
./nixpkgs.nix # global nixpkgs configuration
inputs.determinate.nixosModules.default
];

View file

@ -1,11 +1,6 @@
{config, ...}: let
inherit (config.modules.other.system) username;
in {
imports = [
./networkmanager.nix
./dns.nix
./firewall.nix
];
networking = {
enableIPv6 = true;

View file

@ -1,8 +1,4 @@
{pkgs, ...}: {
imports = [
./sudo.nix
];
security = {
polkit = {
enable = true;

View file

@ -66,6 +66,7 @@ layout {
default-column-width {
proportion 0.5
}
background-color "transparent"
}
// xwayland stuff
spawn-at-startup "xwayland-satellite"
@ -91,27 +92,8 @@ overview {
zoom 0.65
backdrop-color "#777777"
}
workspace "main"
workspace "scratch"
workspace "browser"
workspace "social"
workspace "keepassxc"
workspace "infra"
workspace "multimedia"
animations {
// off
}
// Open the Firefox picture-in-picture player as floating by default.
window-rule {
match app-id="librewolf$" title="^Picture-in-Picture$"
open-floating true
open-on-workspace "browser"
}
window-rule {
match app-id="org.keepassxc.KeePassXC"
block-out-from "screen-capture"
open-on-workspace "keepassxc"
}
window-rule {
match app-id="unset"
@ -125,20 +107,14 @@ window-rule {
match app-id="org.freedesktop.impl.portal.desktop.kde"
open-floating true
}
window-rule {
draw-border-with-background false
}
// Fix discord screencasting
debug {
wait-for-frame-completion-in-pipewire
}
// Always focus the KeePassXC-Browser unlock dialog.
//
// This dialog opens parented to the KeePassXC window rather than the browser,
// so it doesn't get auto-focused by default.
window-rule {
match app-id="^org\\.keepassxc\\.KeePassXC$" title="^KeePassXC - Browser Access Request$"
match app-id="^org\\.keepassxc\\.KeePassXC$" title="^Unlock Database - KeePassXC$"
open-focused true
}
hotkey-overlay {
skip-at-startup
}
@ -151,9 +127,6 @@ binds {
Mod+Shift+Slash {
show-hotkey-overlay
}
// Mod+Return {
// spawn "foot"
// }
Mod+Return {
spawn "ghostty"
}
@ -402,9 +375,6 @@ binds {
Mod+C {
center-column
}
Mod+X {
focus-workspace "keepassxc"
}
Mod+Minus {
set-column-width "-10%"
}
@ -437,9 +407,13 @@ binds {
Ctrl+Print {
screenshot-screen
}
Alt+Print {
screenshot
// Alt+Print {
// spawn "sh" "-c" ""
// }
Mod+T {
screenshot
}
// "$mainMod, T, exec, ${getExe pkgs.grimblast} save area - | ${getExe pkgs.tesseract} - - | ${getExe' pkgs.wl-clipboard "wl-copy"}"
Mod+Escape allow-inhibiting=false {
toggle-keyboard-shortcuts-inhibit
}

View file

@ -45,7 +45,13 @@ in {
environment.etc."niri/config.kdl".source = ./config.kdl;
environment.systemPackages = builtins.attrValues {
inherit (pkgs) xwayland-satellite avizo playerctl;
inherit
(pkgs)
xwayland-satellite
avizo
playerctl
wl-clipboard
;
};
};
}

View file

@ -4,14 +4,9 @@
pkgs,
...
}: let
inherit (lib.modules) mkForce mkIf;
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
inherit (lib.lists) optional;
in {
imports = [
./variables.nix
];
xdg.portal = {
enable = true;
# Sets environment variable NIXOS_XDG_OPEN_USE_PORTAL to 1.
@ -48,8 +43,7 @@ in {
"org.freedesktop.impl.portal.FileChooser" = ["kde"];
};
};
configPackages = [
# pkgs.niri
];
};
environment.variables = {
};
}

View file

@ -9,7 +9,7 @@
cfg = config.modules.wms.wayland;
in {
options.modules.wms.wayland.enable = mkEnableOption "wayland";
config = mkIf cfg.enable {
config = mkIf true {
environment.variables = {
NIXOS_OZONE_WL = "1";
__GL_GSYNC_ALLOWED = "0";

View file

@ -1,125 +0,0 @@
{
inputs,
lib,
pkgs,
...
}: let
inherit (builtins) map genList toString;
inherit (lib.meta) getExe getExe';
in {
programs.hyprland.settings = {
# Keybinds
bind =
# workspaces
# split-workspace is because of the split-workspace plugin
map (
i: let
mod = a: b: a - (b * (a / b));
key = toString (mod i 10);
workspace = toString i;
in "$mainMod, ${key}, split:workspace, ${workspace}"
) (genList (i: i + 1) 10)
# split-movetoworkspacesilent
++ map (
i: let
mod = a: b: a - (b * (a / b));
key = toString (mod i 10);
workspace = toString i;
in "$mainMod SHIFT, ${key}, split:movetoworkspacesilent, ${workspace}"
) (genList (i: i + 1) 10)
++ [
"$mainMod, RETURN, exec, foot"
"$mainMod, Q, killactive"
"$mainMod, F, fullscreen, 0"
"$mainMod, D, exec, ${getExe' inputs.quickshell.packages.${pkgs.stdenv.system}.default "quickshell"} msg launcher open"
"$mainMod, SPACE, togglefloating, active"
"$mainMod ALT, L, exec, ${getExe pkgs.hyprlock}"
# Screenshotting
"$mainMod, S, exec, ${getExe pkgs.grimblast} copy area" # only copy
"$mainMod SHIFT, S, exec, ${getExe pkgs.grimblast} save area - | ${getExe pkgs.satty} -f -" # edit with satty
# Extract text from screen
"$mainMod, T, exec, ${getExe pkgs.grimblast} save area - | ${getExe pkgs.tesseract} - - | ${getExe' pkgs.wl-clipboard "wl-copy"}"
# File manager
"$mainMod, E, exec, ${pkgs.xfce.thunar}/bin/thunar"
# Toggle the three different special workspaces.
"$mainMod, N, togglespecialworkspace, nixos"
"$mainMod, X, togglespecialworkspace, keepassxc"
"$mainMod, V, togglespecialworkspace, audio"
# Reload hyprland
"$mainMod, R, exec, ${getExe' pkgs.hyprland "hyprctl"} reload"
# Grab rouge windows, which may persist after disconnecting a monitor.
"$mainMod, G, split:grabroguewindows"
# Restart waybar
"$mainMod CONTROL, B, exec, ${pkgs.procps}/bin/pkill waybar || ${getExe pkgs.waybar}"
"$mainMod CONTROL, Q, exec, ${pkgs.procps}/bin/pkill quickshell || ${getExe' inputs.quickshell.packages.${pkgs.stdenv.system}.default "quickshell"}"
];
binde = [
# window focus
"$mainMod, H, movefocus, l"
"$mainMod, J, movefocus, d"
"$mainMod, K, movefocus, u"
"$mainMod, L, movefocus, r"
# Move Windows
"$mainMod SHIFT, H, movewindow, l"
"$mainMod SHIFT, J, movewindow, d"
"$mainMod SHIFT, K, movewindow, u"
"$mainMod SHIFT, L, movewindow, r"
];
# Media controls
bindl = let
volumectl = getExe' pkgs.avizo "volumectl";
playerctl = getExe pkgs.playerctl;
play-pause = "${playerctl} play-pause";
stop = "${playerctl} stop";
prev = "${playerctl} previous";
next = "${playerctl} next";
toggle-mute = "${volumectl} toggle-mute";
toggle-mic-mute = "${volumectl} toggle-mute";
in [
", XF86AudioMedia, exec, ${play-pause}"
", XF86AudioPlay, exec, ${play-pause}"
", XF86AudioStop, exec, ${stop}"
", XF86AudioPrev, exec, ${prev}"
", XF86AudioNext, exec, ${next}"
", XF86AudioMute, exec, ${toggle-mute}"
", XF86AudioMicMute, exec, ${toggle-mic-mute}"
];
# locked + repeat
bindle = let
volumectl = getExe' pkgs.avizo "volumectl";
lightctl = getExe' pkgs.avizo "lightctl";
volume_up = "${volumectl} -u up";
volume_down = "${volumectl} -u down";
brightness_up = "${lightctl} up";
brightness_down = "${lightctl} down";
in [
", XF86AudioRaiseVolume, exec, ${volume_up}"
", XF86AudioLowerVolume, exec, ${volume_down}"
", XF86MonBrightnessUp, exec, ${brightness_up}"
", XF86MonBrightnessDown, exec, ${brightness_down}"
];
# Mouse settings
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
# Some more movement-related settings
binds = {
pass_mouse_when_bound = false;
movefocus_cycles_fullscreen = false;
};
};
}

View file

@ -1,70 +0,0 @@
_: {
programs.hyprland.settings = {
#Decoration settings
decoration = {
rounding = 10;
rounding_power = 3;
blur = {
enabled = true;
xray = true;
size = 3;
passes = 2;
};
};
# Bezier curves for aninmations.
# Generate your own at https://www.cssportal.com/css-cubic-bezier-generator/
bezier = [
"dupa, 0.1, 0.9, 0.1, 1.05"
];
# Hyprland anomations, using the above bezier curves
animations = {
enabled = true;
};
animation = [
"windows, 1, 4, dupa, popin"
"windowsOut, 1, 4, dupa, slide"
"border, 1, 15, default"
"fade, 1, 10, default"
"workspaces, 1, 5, dupa, slidevert"
];
cursor = {
hide_on_key_press = true;
no_hardware_cursors = true;
};
misc = {
enable_swallow = true;
swallow_regex = "foot";
focus_on_activate = true;
vrr = 1;
vfr = true;
animate_manual_resizes = false;
animate_mouse_windowdragging = false;
force_default_wallpaper = 0;
};
# Window rules for some programs.
windowrulev2 = [
"float, class:^(Tor Browser)$"
"float, class:^(mpv)$"
"float, class:^(imv)$"
"float, title:^(Picture-in-Picture)$"
"float, title:^(.*)(Choose User Profile)(.*)$"
"float, title:^(blob:null/)(.*)$"
"float, class:^(xdg-desktop-portal-gtk)$"
"float, class:^(code), title: ^(Open*)"
"size 70% 70%, class:^(code), title: ^(Open*)"
"center, class: ^(code), title: ^(Open*)"
"float, class:^(org.keepassxc.KeePassXC)$"
];
layerrule = [
"blur, shell:launcher"
"ignorezero, shell:launcher"
"animation popin 90%, shell:launcher"
];
};
}

View file

@ -1,36 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}: let
# inherit (config.modules.style) cursor;
inherit (lib.meta) getExe getExe';
in {
programs.hyprland.settings = {
# Hyprland settings
# Programs which get executed at Hyprland start.
exec-once = [
"uwsm finalize"
"hyprctl setcursor BreezeX-RosePine-Linux 32"
"hyprctl seterror disable"
"[workspace special:keepassxc; silent;tile] ${pkgs.keepassxc}/bin/keepassxc"
"[workspace special:audio; silent;tile] ${pkgs.pwvucontrol}/bin/pwvucontrol"
"${pkgs.swww}/bin/swww-daemon"
"${pkgs.avizo}/bin/avizo-service"
"${pkgs.wlsunset}/bin/wlsunset -S 06:00 -s 20:00"
"${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent"
"hyprctl dispatch split-workspace 1"
"${getExe pkgs.hyprlock}"
"${getExe' inputs.quickshell.packages.${pkgs.stdenv.system}.default "quickshell"}"
];
};
}

View file

@ -1,58 +0,0 @@
{
config,
inputs,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.options) mkOption;
inherit (lib.types) bool;
cfg = config.modules.desktops.hyprland;
in {
imports = [
./binds.nix
./decorations.nix
./exec.nix
./settings.nix
./workspaces.nix
inputs.hyprland.nixosModules.default
];
options.modules.desktops.hyprland = {
enable = mkOption {
type = bool;
default = false;
description = ''
Whether to enable Hyprland wayland compositor.
'';
};
};
config = mkIf cfg.enable {
programs.hyprland = {
enable = true;
xwayland.enable = true;
package = pkgs.hyprland;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
plugins = [
pkgs.hyprlandPlugins.hyprsplit
];
withUWSM = true;
};
# xdg Portal
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-hyprland
];
config = {
common.default = ["*"];
hyprland.default = ["gtk" "hyprland"];
};
};
};
}

View file

@ -1,89 +0,0 @@
{
config,
lib,
...
}: let
inherit (builtins) toString;
inherit (lib.attrsets) mapAttrsToList;
inherit (config.modules.style.colorScheme) colors;
inherit (config.modules.system.hardware) monitors;
in {
config = {
programs.hyprland = {
settings = {
# Hyprland settings
"$mainMod" = "SUPER";
# Monitor config
# Thanks Poz for inspiration, using an attrSet is actually much smarter
# than using a normal list.
monitor =
mapAttrsToList (
name: m: let
w = toString m.resolution.x;
h = toString m.resolution.y;
refreshRate = toString m.refreshRate;
x = toString m.position.x;
y = toString m.position.y;
scale = toString m.scale;
in "${name},${w}x${h}@${refreshRate},${x}x${y},${scale}"
)
monitors;
# Input settings
input = {
kb_layout = "us,ru";
kb_variant = ",phonetic_winkeys";
kb_options = "grp:rctrl_rshift_toggle, compose:102";
follow_mouse = true;
repeat_rate = 60;
repeat_delay = 200;
touchpad = {
disable_while_typing = true;
};
};
gestures = {
workspace_swipe = true;
};
general = {
layout = "dwindle";
gaps_in = 0;
gaps_out = 0;
border_size = 2;
"col.active_border" = "0xff${colors.base07}";
no_border_on_floating = true;
};
# No annoying startup errors
debug.suppress_errors = true;
ecosystem.no_update_news = true;
plugin = {
hyprsplit = {
num_workspaces = 10;
persistent_workspaces = true;
};
dynamic-cursors = {
enabled = true;
mode = "rotate";
rotate = {
length = 20;
offset = 0.0;
};
threshhold = 2;
shake.enabled = false;
};
};
};
};
};
}

View file

@ -1,48 +0,0 @@
{
config,
lib,
...
}: let
inherit (builtins) map genList attrNames toString;
inherit (lib.lists) imap0 flatten;
inherit (lib.strings) optionalString;
inherit (config.modules.system.hardware) monitors;
in {
programs.hyprland.settings = {
# INFO: This is a custom function to map all of my monitors to workspaces.
# Since I use split-monitor-workspaces, I map 10 workspaces to each monitor
# and set the first one to be the default one.
# To be able to use this for a varying amount of monitors we do some nasty trickery.
# This was inspired by jacekpoz, whose configuration is linked in this project's README.md.
workspace =
(
# We use imap0 insted of map because imap0 starts indexing at zero as oppsed to one with map.
(imap0 (monitorIndex: monitorName: (
map (
i: let
# we define our own modulo operation for this,
# since only the first workspace on each monitor is the default workspace.
mod = a: b: a - (b * (a / b));
workspace = toString i;
isDefault = (mod i 10) == 1; # 11, 21, 31, ...
in "${workspace}, monitor:${monitorName}${optionalString isDefault ", default:true"}"
)
# we generate a list of 10 elements for each monitor. We have to add 1 each time since genList starts indexing at 0.
# also, we add the monitorIndex * 10 to get 10 workspaces for each individual monitor.
(genList (i: i + 1 + (10 * monitorIndex)) 10)
))
# our attrSet of different monitors
(attrNames monitors))
# We're creating several lists of workspace assignments, one for each monitor,
# and have to merge them into one big list.
|> flatten
)
# These are my two special workspaces
++ [
"special:nixos, decorate:false"
"special:keepassxc, decorate:false"
"special:audio, decorate:false"
];
};
}

View file

@ -1,7 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
}