diff --git a/flake.lock b/flake.lock index 446391e..a3279d3 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,32 @@ { "nodes": { + "affinity-nix": { + "inputs": { + "elemental-wine-source": "elemental-wine-source", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-wine": "nixpkgs-wine", + "on-linux": "on-linux", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1762586244, + "narHash": "sha256-po6o2DqL4WcTzKR3xGf2djajkKNipeQEFVPiaSwjGmg=", + "owner": "mrshmllow", + "repo": "affinity-nix", + "rev": "a71b769b0a5d53b15ea9df0f5ed37280f82575e3", + "type": "github" + }, + "original": { + "owner": "mrshmllow", + "repo": "affinity-nix", + "type": "github" + } + }, "auto-cpufreq": { "inputs": { "nixpkgs": [ @@ -88,6 +115,25 @@ "type": "github" } }, + "elemental-wine-source": { + "flake": false, + "locked": { + "host": "gitlab.winehq.org", + "lastModified": 1722747031, + "narHash": "sha256-XVhz9p2kgFBoJ376vg8OaFXxcMEjAe9AK1hk0I1rb1Q=", + "owner": "ElementalWarrior", + "repo": "wine", + "rev": "a7c9b19e1a26cf49c63a7c19189a3e2bbe2c6ac2", + "type": "gitlab" + }, + "original": { + "host": "gitlab.winehq.org", + "owner": "ElementalWarrior", + "ref": "affinity-photo3-wine9.13-part3", + "repo": "wine", + "type": "gitlab" + } + }, "firefox-addons": { "inputs": { "nixpkgs": [ @@ -126,7 +172,54 @@ "type": "github" } }, + "flake-compat": { + "locked": { + "lastModified": 1751685974, + "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", + "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/flake-compat/archive/549f2762aebeff29a2e5ece7a7dc0f955281a1d1.tar.gz?rev=549f2762aebeff29a2e5ece7a7dc0f955281a1d1" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/flake-compat/archive/main.tar.gz" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1760948891, + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixpkgs" @@ -162,6 +255,48 @@ "type": "github" } }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1762868777, + "narHash": "sha256-QqS72GvguP56oKDNUckWUPNJHjsdeuXh5RyoKz0wJ+E=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "c5c3147730384576196fb5da048a6e45dee10d56", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "gnome-shell": { "flake": false, "locked": { @@ -248,6 +383,37 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1754788789, + "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs-wine": { + "locked": { + "lastModified": 1735834308, + "narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6df24922a1400241dae323af55f30e4318a6ca65", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "6df24922a1400241dae323af55f30e4318a6ca65", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": [ @@ -272,6 +438,22 @@ "type": "github" } }, + "on-linux": { + "flake": false, + "locked": { + "lastModified": 1761925232, + "narHash": "sha256-OaSqV9bTTpui4QtmiFszOaInJEyAmL469VQL6lU0lwA=", + "owner": "seapear", + "repo": "AffinityOnLinux", + "rev": "3cb7cdf8bfc56b630d91355e416616ba3835453c", + "type": "github" + }, + "original": { + "owner": "seapear", + "repo": "AffinityOnLinux", + "type": "github" + } + }, "prismlauncher-cracked": { "inputs": { "libnbtplusplus": "libnbtplusplus", @@ -295,6 +477,7 @@ }, "root": { "inputs": { + "affinity-nix": "affinity-nix", "auto-cpufreq": "auto-cpufreq", "firefox-addons": "firefox-addons", "home-manager": "home-manager", @@ -311,7 +494,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" @@ -433,6 +616,26 @@ "repo": "base16-zed", "type": "github" } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1761311587, + "narHash": "sha256-Msq86cR5SjozQGCnC6H8C+0cD4rnx91BPltZ9KK613Y=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "2eddae033e4e74bf581c2d1dfa101f9033dbd2dc", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 39f96fb..89c4c7f 100644 --- a/flake.nix +++ b/flake.nix @@ -36,6 +36,18 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + affinity-nix = { + url = "github:mrshmllow/affinity-nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + treefmt-nix.inputs.nixpkgs.follows = "nixpkgs"; + git-hooks.inputs = { + nixpkgs.follows = "nixpkgs"; + gitignore.inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + }; + nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest"; }; diff --git a/modules/core/packages/multimedia.nix b/modules/core/packages/multimedia.nix index 44674ca..0df5f2c 100644 --- a/modules/core/packages/multimedia.nix +++ b/modules/core/packages/multimedia.nix @@ -1,11 +1,17 @@ -{ pkgs, ... }: +{ + pkgs, + inputs, + system, + ... +}: { environment.systemPackages = with pkgs; [ # Video & image processing ffmpeg ffmpegthumbnailer mpv - gimp3 + # gimp3 + inputs.affinity-nix.packages.${system}.v3 eog kdePackages.kdenlive # Audio diff --git a/modules/home/bash-aliases.nix b/modules/home/bash-aliases.nix index 0c5de0a..818d0b3 100644 --- a/modules/home/bash-aliases.nix +++ b/modules/home/bash-aliases.nix @@ -19,14 +19,13 @@ f8 = "uv run flake8 ."; bbr = "bun --bun run"; mkgidf = "git add . --intent-to-add . && git diff > git-diff.txt"; - snano = "sudo nano"; zed = "MANGOHUD=0 /home/${username}/.local/bin/zed"; # System aliases - flush-codium = "sudo killall codium && sudo rm -rf ~/.config/VSCodium/Cache && sudo rm -rf ~/.config/VSCodium/CachedData"; + # flush-codium = "sudo killall codium && sudo rm -rf ~/.config/VSCodium/Cache && sudo rm -rf ~/.config/VSCodium/CachedData"; kys = "shutdown now"; ookla = "speedtest"; - snala = "sudo nala"; + hypr-cli = "hyprctl clients"; # Navigation aliases "~" = "cd ~"; @@ -112,7 +111,8 @@ fc = "fortune | cowsay"; # Network aliases - ssh-server = "kssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver"; + kssh-server = "kssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver"; + ssh-server = "ssh garand_plg@192.168.1.156 -i ~/.ssh/hp-t640-homeserver"; }; }; } diff --git a/modules/home/hyprland/binds.nix b/modules/home/hyprland/binds.nix index b1d744b..87dfefa 100644 --- a/modules/home/hyprland/binds.nix +++ b/modules/home/hyprland/binds.nix @@ -13,7 +13,7 @@ in "$modifier, B, exec, bitwarden" "$modifier, C, exec, chromium" "$modifier, D, exec, vesktop" - "$modifier, G, exec, gimp" + "$modifier, G, exec, affinity-v3" "$modifier, I, exec, iotas" "$modifier, L, exec, logseq" "$modifier, M, exec, plexamp" diff --git a/modules/home/hyprland/windowrules.nix b/modules/home/hyprland/windowrules.nix index 8974f05..360b9bc 100644 --- a/modules/home/hyprland/windowrules.nix +++ b/modules/home/hyprland/windowrules.nix @@ -1,17 +1,14 @@ -{ host, ... }: -let - inherit (import ../../../hosts/${host}/variables.nix) - extraMonitorSettings - ; -in -{ +_: { wayland.windowManager.hyprland = { settings = { windowrule = [ + # XWayland specific rules #"noblur, xwayland:1" # Helps prevent odd borders/shadows for xwayland apps # downside it can impact other xwayland apps # This rule is a template for a more targeted approach "noblur, class:^(\bresolve\b)$, xwayland:1" # Window rule for just resolve + + # Application tags "tag +file-manager, class:^([Tt]hunar|org.gnome.Nautilus|[Pp]cmanfm-qt)$" "tag +terminal, class:^(com.mitchellh.ghostty|org.wezfurlong.wezterm|Alacritty|kitty|kitty-dropterm)$" "tag +browser, class:^(Brave-browser(-beta|-dev|-unstable)?)$" @@ -39,15 +36,21 @@ in "tag +settings, class:(xdg-desktop-portal-gtk)" "tag +settings, class:(.blueman-manager-wrapped)" "tag +settings, class:(nwg-displays)" + + # Position and movement rules "move 72% 7%,title:^(Picture-in-Picture)$" "center, class:^([Ff]erdium)$" - "float, class:^([Ww]aypaper)$" "center, class:^(pavucontrol|org.pulseaudio.pavucontrol|com.saivert.pwvucontrol)$" "center, class:([Tt]hunar), title:negative:(.*[Tt]hunar.*)" "center, title:^(Authentication Required)$" + + # Idle inhibit rules "idleinhibit fullscreen, class:^(*)$" "idleinhibit fullscreen, title:^(*)$" "idleinhibit fullscreen, fullscreen:1" + + # Float rules + "float, class:^([Ww]aypaper)$" "float, tag:settings*" "float, class:^([Ff]erdium)$" "float, title:^(Picture-in-Picture)$" @@ -61,10 +64,17 @@ in "float, initialTitle:(Add Folder to Workspace)" "float, initialTitle:(Open Files)" "float, initialTitle:(wants to save)" + + # Size rules "size 70% 60%, initialTitle:(Open Files)" "size 70% 60%, initialTitle:(Add Folder to Workspace)" "size 70% 70%, tag:settings*" "size 60% 70%, class:^([Ff]erdium)$" + + # Tile rules + "tile, class:^(affinity.exe)$" + + # Opacity rules "opacity 1.0 1.0, tag:browser*" "opacity 0.9 0.8, tag:projects*" "opacity 0.94 0.86, tag:im*" @@ -74,8 +84,12 @@ in "opacity 0.8 0.7, class:^(gedit|org.gnome.TextEditor|mousepad)$" "opacity 0.9 0.8, class:^(seahorse)$ # gnome-keyring gui" "opacity 0.95 0.75, title:^(Picture-in-Picture)$" + + # Picture-in-Picture specific rules "pin, title:^(Picture-in-Picture)$" "keepaspectratio, title:^(Picture-in-Picture)$" + + # Games specific rules "noblur, tag:games*" "fullscreen, tag:games*" ]; diff --git a/modules/home/zed.nix b/modules/home/zed.nix index 77dfa2b..f365d48 100644 --- a/modules/home/zed.nix +++ b/modules/home/zed.nix @@ -41,7 +41,7 @@ diagnostics = false; metrics = false; }; - icon_theme = "VSCode Icons (Dark)"; + icon_theme = "VSCode Icons for Zed (Dark)"; ui_font_size = 16; buffer_font_size = 15; theme = {