feat: perf hyprland switcher and new image viewer

This commit is contained in:
2026-01-18 17:24:43 -05:00
parent 23a642f6f7
commit 0d21f85c84
9 changed files with 159 additions and 258 deletions

178
flake.lock generated
View File

@@ -26,28 +26,6 @@
"type": "github"
}
},
"elytrarides": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1759166975,
"narHash": "sha256-QEs164tIjxuprOt4H9A335ymMMXhVZCVJXWFvHutGL8=",
"owner": "k2on",
"repo": "elytrarides",
"rev": "863d3491b89b52c8193d882c8b1c4a858376b1d7",
"type": "github"
},
"original": {
"owner": "k2on",
"repo": "elytrarides",
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"nixpkgs": [
@@ -145,24 +123,6 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -236,7 +196,7 @@
"nixos-apple-silicon": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1763596466,
@@ -253,6 +213,22 @@
"type": "github"
}
},
"nixos-unstable": {
"locked": {
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1757745802,
@@ -269,39 +245,23 @@
"type": "github"
}
},
"nixpkgs-old": {
"nixpkgs-unstable": {
"locked": {
"lastModified": 1766399428,
"narHash": "sha256-vS6LSOMDOB3s+L6tqw9IGujxnmUAZQnEG+Vi640LayI=",
"lastModified": 1768661221,
"narHash": "sha256-MJwOjrIISfOpdI9x4C+5WFQXvHtOuj5mqLZ4TMEtk1M=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a6c3a6141ec1b367c58ead3f7f846c772a25f4e5",
"rev": "3327b113f2ef698d380df83fbccefad7e83d7769",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_2": {
"locked": {
"lastModified": 1766070988,
"narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=",
@@ -317,7 +277,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_3": {
"locked": {
"lastModified": 1766201043,
"narHash": "sha256-eplAP+rorKKd0gNjV3rA6+0WMzb1X1i16F5m5pASnjA=",
@@ -333,7 +293,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_4": {
"locked": {
"lastModified": 1764517877,
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
@@ -356,7 +316,7 @@
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_3"
"systems": "systems_2"
},
"locked": {
"lastModified": 1766256678,
@@ -375,7 +335,7 @@
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
@@ -408,32 +368,9 @@
"url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg"
}
},
"plasma-manager": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1754501628,
"narHash": "sha256-FExJ54tVB5iu7Dh2tLcyCSWpaV+lmUzzWKZUkemwXvo=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "cca090f8115c4172b9aef6c5299ae784bdd5e133",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "plasma-manager",
"type": "github"
}
},
"proton-pass-cli": {
"inputs": {
"nixpkgs": "nixpkgs_5"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1766050030,
@@ -452,39 +389,19 @@
"root": {
"inputs": {
"apple-fonts": "apple-fonts",
"elytrarides": "elytrarides",
"firefox-addons": "firefox-addons",
"home-manager": "home-manager",
"nixos-apple-silicon": "nixos-apple-silicon",
"nixpkgs": "nixpkgs_4",
"nixpkgs-old": "nixpkgs-old",
"nixos-unstable": "nixos-unstable",
"nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",
"plasma-manager": "plasma-manager",
"proton-pass-cli": "proton-pass-cli",
"sops-nix": "sops-nix",
"terranix": "terranix",
"unstable": "unstable",
"zen-browser": "zen-browser"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1758204348,
"narHash": "sha256-jkz/NihbcEwy1EHDv/6g0HEqkpyIWCnQ1siGrhHEtFM=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "067b3536e55341f579385ce8593cdcc9d022972b",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sf-arabic": {
"flake": false,
"locked": {
@@ -634,28 +551,13 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"terranix": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_4"
"systems": "systems_3"
},
"locked": {
"lastModified": 1749381683,
@@ -671,27 +573,11 @@
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": [
"unstable"
"nixos-unstable"
]
},
"locked": {

View File

@@ -4,9 +4,9 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.11";
nixpkgs-old.url = "github:nixos/nixpkgs?ref=nixos-25.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixos-unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixos-apple-silicon.url =
"github:nix-community/nixos-apple-silicon?ref=release-2025-11-18";
@@ -31,16 +31,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
elytrarides = {
url = "github:k2on/elytrarides";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
# IMPORTANT: we're using "libgbm" and is only available in unstable so ensure
# to have it up-to-date or simply don't specify the nixpkgs input
inputs.nixpkgs.follows = "unstable";
inputs.nixpkgs.follows = "nixos-unstable";
};
firefox-addons = {
@@ -52,15 +47,10 @@
proton-pass-cli.url = "github:yuxqiu/proton-pass-cli-nix";
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
outputs = { self, nixpkgs, unstable, nixos-apple-silicon, home-manager
, plasma-manager, nixvim, sops-nix, terranix, elytrarides, zen-browser, apple-fonts, nixpkgs-old, proton-pass-cli, firefox-addons, ... }:
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-unstable, nixos-apple-silicon, home-manager
, nixvim, sops-nix, terranix, zen-browser, apple-fonts, proton-pass-cli, firefox-addons, ... }:
let
forAllSystems = function:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed
@@ -71,7 +61,7 @@
let
system = "aarch64-linux";
pkgs = import unstable {
pkgs = import nixpkgs-unstable {
inherit system;
config = {
allowUnfree = true;
@@ -116,12 +106,11 @@
nixosConfigurations = {
max = let
system = "aarch64-linux";
pkgs-unstable = import unstable { inherit system; };
pkgs-old = import nixpkgs-old { inherit system; };
pkgs-unstable = import nixpkgs-unstable { inherit system; };
secrets = import ./secrets;
in nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit pkgs-unstable secrets zen-browser apple-fonts pkgs-old proton-pass-cli; };
specialArgs = { inherit pkgs-unstable secrets zen-browser apple-fonts proton-pass-cli; };
modules = [
./host/max/default.nix
nixos-apple-silicon.nixosModules.apple-silicon-support
@@ -130,12 +119,11 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit secrets zen-browser firefox-addons; };
home-manager.extraSpecialArgs = { inherit secrets zen-browser firefox-addons system; };
home-manager.users.max = { config, pkgs, lib, ... }: {
imports = [
sops-nix.homeManagerModules.sops
nixvim.homeModules.nixvim
plasma-manager.homeManagerModules.plasma-manager
zen-browser.homeModules.beta
./host/max/home.nix # Import your home.nix here
];
@@ -147,9 +135,9 @@
ark = let
system = "x86_64-linux";
secrets = import ./secrets;
in unstable.lib.nixosSystem {
in nixos-unstable.lib.nixosSystem {
inherit system;
specialArgs = { inherit elytrarides secrets; };
specialArgs = { inherit secrets; };
modules = [
./host/ark/default.nix
sops-nix.nixosModules.sops

View File

@@ -1,5 +1,9 @@
{ pkgs, scripts, ... }:
{
imports = [
./hyprland/performance.nix
];
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
@@ -27,6 +31,10 @@
];
settings = {
source = [
"~/.config/koonos/current/performance/hyprland.conf"
];
"$terminal" = "${pkgs.uwsm}/bin/uwsm-app -- ${pkgs.alacritty}/bin/alacritty";
"$fileManager" = "${pkgs.uwsm}/bin/uwsm-app -- ${pkgs.pcmanfm}/bin/pcmanfm";
"$browser" = "${pkgs.uwsm}/bin/uwsm-app -- zen-beta";
@@ -76,7 +84,7 @@
inactive_opacity = 1.0;
shadow = {
enabled = true;
# enabled = false;
range = 4;
render_power = 3;
color = "rgba(1a1a1aee)";
@@ -84,7 +92,7 @@
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur = {
enabled = true;
# enabled = false;
size = 3;
passes = 1;
@@ -235,8 +243,8 @@
"$mainMod SHIFT, S, movetoworkspace, special:magic"
# Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
# "$mainMod, mouse_down, workspace, e+1"
# "$mainMod, mouse_up, workspace, e-1"
];

View File

@@ -0,0 +1,37 @@
{ pkgs, lib, ... }:
let
normal = {
decoration = {
blur.enabled = true;
shadow.enabled = true;
};
misc.vfr = false;
};
battery-saver = {
decoration = {
blur.enabled = false;
shadow.enabled = false;
};
misc.vfr = true;
};
normal-file = pkgs.writeText "hyprland.conf.normal" (lib.hm.generators.toHyprconf { attrs = normal; });
battery-saver-file = pkgs.writeText "hyprland.conf.battery" (lib.hm.generators.toHyprconf { attrs = battery-saver; });
switchScript = pkgs.writeShellScriptBin "switch-config" ''
TARGET="$HOME/.config/koonos/current/performance/hyprland.conf"
if [ "$(readlink "$TARGET")" = "${normal-file}" ]; then
ln -sf ${battery-saver-file} "$TARGET"
echo "Switched to battery saver"
else
ln -sf ${normal-file} "$TARGET"
echo "Switched to normal mode"
fi
'';
in
{
home.file.".config/koonos/current/performance/hyprland.conf".source = normal-file;
home.packages = [ switchScript ];
}

View File

@@ -8,6 +8,7 @@
"modules-center": ["clock", "custom/update", "custom/screenrecording-indicator"],
"modules-right": [
"group/tray-expander",
"custom/countdown",
"bluetooth",
"network",
"pulseaudio",
@@ -43,6 +44,11 @@
"on-click-right": "xdg-terminal-exec",
"tooltip-format": ""
},
"custom/countdown": {
"exec": "echo $(( ($(date +%s) - $(date -d 'June 6, 2026' +%s)) / 86400 ))",
"format": "{} ",
"interval": 3600
},
"clock": {
"format": "{:L%A %I:%M}",
"format-alt": "{:L%d %B W%V %Y}",

View File

@@ -7,6 +7,7 @@
./home/git.nix
./home/browser.nix
./home/image-viewer.nix
../../home/common/optional/desktop/hyprland.nix

View File

@@ -1,33 +1,34 @@
{ config, pkgs, firefox-addons, ... }:
{ config, zen-browser, system, pkgs, firefox-addons, ... }:
{
xdg.mimeApps = {
xdg.mimeApps = let
value = let
browser = zen-browser.packages.${system}.beta; # or twilight
in
browser.meta.desktopFileName;
associations = builtins.listToAttrs (map (name: {
inherit name value;
}) [
"application/x-extension-shtml"
"application/x-extension-xhtml"
"application/x-extension-html"
"application/x-extension-xht"
"application/x-extension-htm"
"x-scheme-handler/unknown"
"x-scheme-handler/mailto"
"x-scheme-handler/chrome"
"x-scheme-handler/about"
"x-scheme-handler/https"
"x-scheme-handler/http"
"application/xhtml+xml"
"application/json"
"text/plain"
"text/html"
]);
in {
enable = true;
defaultApplications = {
"x-scheme-handler/http" = "zen-beta.desktop";
"x-scheme-handler/https" = "zen-beta.desktop";
"x-scheme-handler/chrome" = "zen-beta.desktop";
"text/html" = "zen-beta.desktop";
"application/x-extension-htm" = "zen-beta.desktop";
"application/x-extension-html" = "zen-beta.desktop";
"application/x-extension-shtml" = "zen-beta.desktop";
"application/xhtml+xml" = "zen-beta.desktop";
"application/x-extension-xhtml" = "zen-beta.desktop";
"application/x-extension-xht" = "zen-beta.desktop";
};
associations.added = {
"x-scheme-handler/http" = [ "zen-beta.desktop" ];
"x-scheme-handler/https" = [ "zen-beta.desktop" ];
"x-scheme-handler/chrome" = [ "zen-beta.desktop" ];
"text/html" = [ "zen-beta.desktop" ];
"application/x-extension-htm" = [ "zen-beta.desktop" ];
"application/x-extension-html" = [ "zen-beta.desktop" ];
"application/x-extension-shtml" = [ "zen-beta.desktop" ];
"application/xhtml+xml" = [ "zen-beta.desktop" ];
"application/x-extension-xhtml" = [ "zen-beta.desktop" ];
"application/x-extension-xht" = [ "zen-beta.desktop" ];
};
associations.added = associations;
defaultApplications = associations;
};
programs.zen-browser = {
@@ -139,60 +140,4 @@
];
};
};
programs.firefox = {
enable = true;
profiles = {
personal = {
id = 0;
name = "1. Personal";
isDefault = true;
settings = {
"browser.search.defaultenginename" = "ddg";
"browser.search.order.1" = "ddg";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
search = {
force = true;
default = "ddg";
order = [ "ddg" "google" ];
};
userChrome = builtins.readFile ./browser/userChrome.css;
};
work = {
id = 1;
name = "2. Work";
settings = {
"browser.search.defaultenginename" = "ddg";
"browser.search.order.1" = "ddg";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
search = {
force = true;
default = "ddg";
order = [ "ddg" "google" ];
};
userChrome = builtins.readFile ./browser/userChrome.css;
};
school = {
id = 2;
name = "3. School";
settings = {
"browser.search.defaultenginename" = "ddg";
"browser.search.order.1" = "ddg";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
search = {
force = true;
default = "ddg";
order = [ "ddg" "google" ];
};
userChrome = builtins.readFile ./browser/userChrome.css;
};
};
};
}

View File

@@ -0,0 +1,26 @@
{ pkgs, ... }:
{
xdg.desktopEntries.imv = {
name = "imv";
exec = "${pkgs.imv}/bin/imv %F";
icon = "imv";
};
xdg.mimeApps = let
value = "imv.desktop";
associations = builtins.listToAttrs (map (name: {
inherit name value;
}) [
"image/png"
"image/jpeg"
"image/gif"
"image/bmp"
"image/webp"
]);
in {
enable = true;
associations.added = associations;
defaultApplications = associations;
};
}

View File

@@ -73,6 +73,10 @@
zle -N fzf-files
bindkey '^V' fzf-files
open() {
xdg-open "$@" >/dev/null 2>&1 &
}
'';
envExtra = ''
@@ -80,7 +84,7 @@
'';
shellAliases = {
ll = "ls -la --color";
ll = "ls -alh";
v = "nvim";
vi = "nvim";
vim = "nvim";