4 Commits

Author SHA1 Message Date
kenji 14fe127d33 fix(monitors): fix multi-monitor setup 2025-12-31 13:26:54 -06:00
kenji 4fa481adb8 add(cursor): added rose pine hyprcursor 2025-12-31 13:26:43 -06:00
kenji a4f2626f02 feat(hyprlock): decreased blink count 2025-12-31 13:26:25 -06:00
kenji efd8986d74 add(apps): added delfin 2025-12-31 13:26:06 -06:00
130 changed files with 854 additions and 4107 deletions
+32 -73
View File
@@ -5,15 +5,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Build Commands ## Build Commands
```bash ```bash
# Rebuild and switch to new configuration (desktop x86_64) # Rebuild and switch to new configuration
sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase
# Rebuild MacBook configuration (aarch64)
sudo nixos-rebuild switch --flake ~/.config/nixos/#macbook
# Dry-run build to check for errors without applying
sudo nixos-rebuild build --flake ~/.config/nixos/#hakase
# Manage SOPS secrets # Manage SOPS secrets
nix-shell -p sops --run "sops secrets/secrets.yaml" nix-shell -p sops --run "sops secrets/secrets.yaml"
nix-shell -p sops --run "sops updatekeys secrets/secrets.yaml" nix-shell -p sops --run "sops updatekeys secrets/secrets.yaml"
@@ -21,100 +15,65 @@ nix-shell -p sops --run "sops updatekeys secrets/secrets.yaml"
## Architecture Overview ## Architecture Overview
This is a modular, flake-based NixOS configuration supporting two hosts: `hakase` (x86_64 desktop) and `macbook` (aarch64 Apple Silicon). This is a modular, flake-based NixOS configuration for a single host (`hakase`).
### Key Entry Points ### Key Entry Points
- `flake.nix` - Declares inputs and creates both NixOS configurations (hakase, macbook) - `flake.nix` - Declares inputs and creates NixOS configuration
- `config.nix` - Central configuration values separated by host (hakase, macbook keys) - `config.nix` - Central configuration values (username, hostname, paths, theme settings, bookmarks)
- `hosts/{hakase,macbook}/configuration.nix` - Host-level entry points importing system modules - `hosts/hakase/configuration.nix` - Host-level entry point that imports system modules
- `home/hakase.nix` - Home Manager entry point for user environment (referenced from flake)
### Module Organization ### Module Organization
**Three-tier system:** **Two-tier module system:**
1. **System modules** (`modules/nixos/`) - NixOS-level settings (boot, kernel, services, hardware) - `modules/nixos/` - NixOS system-level modules (boot, kernel, services, hardware)
2. **Home Manager modules** (`modules/home/`) - User-level environment and applications - `modules/home/` - Home Manager user-level modules (imported via `home/hakase.nix`)
3. **Application configs** (`apps/`) - Per-application configuration directories with `default.nix` files
Examples: **Application configs:** Each application has its own directory in `apps/` with a `default.nix` and optional sub-modules (e.g., `apps/hyprland/hypr/*.nix` for Hyprland settings).
- `apps/hyprland/default.nix` + `apps/hyprland/hypr/*.nix` - Hyprland compositor config
- `apps/firefox/default.nix` - Browser with bookmarks and theming
- `apps/ghostty/default.nix` - Terminal emulator
- `apps/neovim/default.nix` - Editor (via nixovim external flake)
### Configuration Flow ### Configuration Flow
``` ```
flake.nix (outputs) flake.nix
hakase (x86_64-linux) nixosConfigurations.hakase
├─ hosts/hakase/configuration.nix ├─ hosts/hakase/configuration.nix
│ └─ modules/nixos/default.nix (imports system modules) │ └─ modules/nixos/default.nix (imports all system modules)
└─ home-manager └─ home-manager
└─ home/hakase.nix └─ home/hakase.nix
└─ modules/home/* (imports Home Manager modules) └─ modules/home/* → apps/*
│ └─ apps/* (application configurations)
└─ macbook (aarch64-linux)
├─ hosts/macbook/configuration.nix
│ └─ modules/nixos/default.nix
└─ Similar home-manager structure
config.nix provides myConfig via specialArgs to both configurations
``` ```
### Configuration Structure (config.nix)
The `config.nix` file defines host-specific configuration under `hakase` and `macbook` keys. Common values include:
```nix
myConfig = {
nixos = { username, hostname, timezone }
git = { username, email, defaultBranch }
theme = { mode } # "dark" or "light"
terminal = { default, font, aliases }
font = { monospace, monospaceScript, sans }
hyprland = { monitors, wallpaper, kb_options }
firefox = { bookmarks, newtabpage }
# ... more app-specific configs
}
```
To add a host-specific override, define it in the host's `myConfig` section in `config.nix`. The flake passes `allConfig.{hostname}` as specialArgs, so modules access the correct host configuration.
### Module Pattern ### Module Pattern
Modules receive standard NixOS parameters plus custom ones: Modules receive these parameters:
```nix ```nix
{ pkgs, config, lib, myConfig, inputs, system, ... }: { pkgs, config, myConfig, inputs, ... }:
``` ```
**Key patterns:** Access configuration values via `myConfig`:
- Access host config: `myConfig.nixos.username`, `myConfig.terminal.default` ```nix
- Use host-specific packages: `pkgs.unstable` (from nixpkgs), `inputs.neovim` (from flake inputs) myConfig.nixos.username # "hakase"
- Reference other modules via `config` (e.g., `config.home.homeDirectory`) myConfig.nixos.hostname # "hakase"
- Conditional logic: Check `system` or `myConfig` values myConfig.terminal.default # Terminal emulator
myConfig.hyprland.monitors # Monitor configuration
```
### Secrets Management ### Secrets Management
SOPS-encrypted secrets stored in `secrets/secrets.yaml`. Age key at `~/.config/sops/age/keys.txt`. Uses SOPS for encrypted secrets. Keys stored at `~/.config/sops/age/keys.txt`.
In modules, reference secrets via: Access secrets in modules:
```nix ```nix
config.sops.secrets.secret_name.path config.sops.secrets.secret_name.path
``` ```
## Key Technologies ## Key Technologies
- **Hyprland** with UWSM (systemd user session management) - **Hyprland** with UWSM (systemd session management)
- **Matugen** for automatic system-wide theming from wallpaper colors - **Stylix** for system-wide theming from wallpaper colors
- **Home Manager** for user environment and program configuration - **Home Manager** for user environment
- **nixovim** external flake for Neovim configuration (treesitter disabled due to read-only NixOS constraints) - **nixovim** flake for Neovim configuration
- **SOPS-Nix** for secrets encryption
- **CachyOS kernel** on hakase (x86_64), **Asahi Linux** on macbook (aarch64)
## Git Commit Convention ## Git Commit Convention
Use conventional commits with scope: `feat(scope):`, `fix(scope):`, `refactor:`, `add:`, `remove:`, `cleanup:` Use conventional commits: `feat(scope):`, `fix(scope):`, `refactor:`, `add:`, `remove:`, `cleanup:`
Common scopes: `nixos`, `home`, `apps`, `config`, `modules`, `hyprland`, `firefox`, etc.
-65
View File
@@ -1,65 +0,0 @@
# HakaseOS - NixOS Configuration
This is a modular, flake-based NixOS configuration for a single host (`hakase`). It features a custom Hyprland desktop environment, automated theming via Matugen, and strict separation of concerns using a custom `myConfig` object.
## Project Structure
* **`flake.nix`**: The entry point. Defines inputs (Hyprland, Chaotic, Home Manager, etc.) and creates the system configuration.
* **`config.nix`**: Central source of truth. Defines global variables (user details, monitor config, theme settings) exposed as `myConfig`.
* **`hosts/hakase/`**: Host-specific configuration.
* `configuration.nix`: Main system entry point.
* **`modules/`**: Reusable modules.
* `nixos/`: System-level modules (boot, hardware, services).
* `home/`: Home-manager modules (UI, apps, user services).
* **`apps/`**: Application-specific configurations. Each app has its own directory (e.g., `hyprland`, `firefox`, `ghostty`) with a `default.nix`.
* **`assets/`**: Static assets like wallpapers (`firewatch.png`).
* **`secrets/`**: Encrypted secrets managed by SOPS.
## Architecture & Conventions
### 1. The `myConfig` Object
Global configuration is not hardcoded in modules. Instead, it is defined in `config.nix` and passed to all modules via `specialArgs`.
**Usage Pattern:**
```nix
# In any module
{ pkgs, config, myConfig, ... }:
{
# Access values
home.username = myConfig.nixos.username;
}
```
### 2. Module Hierarchy
* **System**: `flake.nix` -> `hosts/hakase/configuration.nix` -> `modules/nixos/default.nix` -> `modules/nixos/*.nix`
* **User**: `modules/nixos/user.nix` (or similar) -> `home-manager` -> `home/hakase.nix` -> `modules/home/*.nix` -> `apps/*/default.nix`
### 3. Application Configuration
Do not dump config into one large file. Create a dedicated folder in `apps/<app_name>/` with a `default.nix`.
* Example: `apps/ghostty/default.nix`
## Key Commands
### System Management
* **Rebuild & Switch**:
```bash
sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase
# or alias:
update
```
### Secrets (SOPS)
* **Edit Secrets**:
```bash
nix-shell -p sops --run "sops secrets/secrets.yaml"
```
* **Update Keys**:
```bash
nix-shell -p sops --run "sops updatekeys secrets/secrets.yaml"
```
## Development Guidelines
* **Matugen**: used for theming. Templates are located in `apps/matugen/templates/`.
* **Hyprland**: Config is split into `apps/hyprland/hypr/*.nix`.
* **Formatting**: Follow existing indentation (2 spaces usually).
* **Commits**: Use Conventional Commits (e.g., `feat(hyprland): add new bind`).
+48 -92
View File
@@ -1,101 +1,57 @@
# HakaseOS # HakaseOS
HakaseOS is an opinionated NixOS configuration heavily inspired by OmarchyOS.
A modular, flake-based NixOS configuration for my personal devices (`hakase` desktop and `macbook`). Heavily inspired by [OmarchyOS](https://omarchy.org/).
## Features ## Features
* Vim keybindings
* Simple Setup
* Pre-configured Firefox
- **Hyprland** compositor with UWSM (systemd session management) ## How to Use SOPS
- **Multi-Architecture Support**: Runs on x86_64 (Desktop) and aarch64 (Apple Silicon M1/M2) SOPS is an important aspect of this operating system. Learning to use it is important for security and modularity. It is impertinent that you do not lose the `private key`, as it is irrecoverable.
- **Matugen** for automatic system-wide theming from wallpaper colors
- **Hardened Firefox** with custom bookmarks and new tab page
- **Vim keybindings** throughout the system
- **SOPS** for encrypted secrets management
- **CachyOS kernel** (Desktop) and **Asahi Linux** (MacBook) support
## 🚧 TODO To get started, follow the instructions below.
- LUKS designed 1. Create a folder.
```sh
## Screenshots mkdir -p ~/.config/sops/age
```
![Display overview](assets/example/desktop_display.png) 2. Generate a private key using `age`
```sh
![Terminal windows](assets/example/desktop_terminals.png) nix-shell -p age --run "age-keygen -o ~/.config/sops/age/keys.txt"
![Lockscreen](assets/example/lockscreen.png) ```
![Desktop Music](assets/example/desktop_music.png) **OR**
![Desktop with Hakase](assets/example/desktop_hakase.png) Use `ssh-to-age` to convert `id_ed22519` to `age`.
```sh
## Structure nix-shell -p ssh-to-age --run "ssh-to-age -private-key -i ~/.ssh/id_ed25519 > ~/.config/sops/age/keys.txt"
```
There are other ways of generating a private key. Refer to [sops-nix](https://github.com/Mic92/sops-nix).
3. Get a **public key**.
```sh
nix-shell -p age --run "age-keygen -y ~/.config/sops/age/keys.txt"
```
4. On the same directory as `flake.nix`, create `.sops.yaml` and paste the following below.
```yaml
# This example uses YAML anchors which allows reuse of multiple keys
# without having to repeat yourself.
# Also see https://github.com/Mic92/dotfiles/blob/d6114726d859df36ccaa32891c4963ae5717ef7f/nixos/.sops.yaml
# for a more complex example.
keys:
- &admin_alice 2504791468b153b8a3963cc97ba53d1919c5dfd4
- &admin_bob age12zlz6lvcdk6eqaewfylg35w0syh58sm7gh53q5vvn7hd7c6nngyseftjxl
creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *admin_alice
age:
- *admin_bob
``` ```
. Replace as according to your needs.
├── flake.nix # Entry point defining hosts (hakase, macbook) 5. Create a sops `.yaml` file.
├── config.nix # Central configuration values per host ```sh
├── hosts/ nix-shell -p sops --run "sops secrets/example.yaml"
│ ├── hakase/ # Desktop configuration (x86_64)
│ └── macbook/ # Laptop configuration (aarch64, Apple Silicon)
├── modules/
│ ├── nixos/ # System-level modules (boot, kernel, services)
│ └── home/ # Home Manager modules
├── home/ # Host-specific Home Manager entry points
├── apps/ # Per-application configurations
│ ├── hyprland/ # Hyprland window manager
│ ├── waybar/ # Status bar
│ ├── firefox/ # Browser configuration
│ ├── ghostty/ # Terminal emulator
│ ├── neovim/ # Editor (via nixovim flake)
│ ├── vicinae/ # Application launcher
│ └── ... # And many more
├── secrets/ # SOPS encrypted secrets
└── assets/ # Wallpapers and other assets
``` ```
NOTE: If you add a new host to your `.sops.yaml`, you will need to update the keys for all secrets.
## Usage ```sh
nix-shell -p sops --run "sops updatekeys secrets/example.yaml"
### Rebuild System
**Desktop (Hakase):**
```bash
sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase
``` ```
**MacBook (Asahi):**
```bash
sudo nixos-rebuild switch --flake ~/.config/nixos/#macbook
```
### Manage Secrets
```bash
# Edit secrets
nix-shell -p sops --run "sops secrets/secrets.yaml"
# Update keys
nix-shell -p sops --run "sops updatekeys secrets/secrets.yaml"
```
## Configuration
Central configuration values are defined in `config.nix`, separated by host:
- `hakase` / `macbook` keys define host-specific overrides
- `myConfig.nixos` - System settings (username, hostname, timezone)
- `myConfig.hyprland` - Monitor configuration (Hz, Resolution) and wallpaper
## Flake Inputs
| Input | Description |
|-------|-------------|
| nixpkgs | NixOS unstable |
| home-manager | User environment management |
| hyprland | Wayland compositor |
| chaotic | CachyOS kernel and packages (x86 only) |
| apple-silicon | Asahi Linux support for NixOS (aarch64 only) |
| sops-nix | Secrets management |
| nixovim | Neovim configuration |
| matugen | System-wide theming |
| vicinae | Application launcher |
| textfox | Firefox CSS theme |
## License
Personal configuration - use at your own discretion.
+3
View File
@@ -0,0 +1,3 @@
* fix: special workspace preload always loads first. Toggling it back is easy, but i'd rather create a new sh script that forces back to normal workspace.
* add: similar to omarchy-menu
* cleanup: stylix configurations and wallpaper
-12
View File
@@ -1,12 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [anki-bin];
xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/x-apkg" = "anki.desktop";
"application/x-anki-deck" = "anki.desktop";
"application/x-anki-collection" = "anki.desktop";
};
};
}
-39
View File
@@ -1,39 +0,0 @@
{pkgs, ...}: {
programs.bottom = {
enable = true;
settings = {
flags = {
rate = 1000;
hide_table_gap = true;
hide_time = true;
left_legend = true;
network_use_bytes = true;
temperature_type = "c";
mem_as_value = true;
current_usage = true;
};
row = [
{
ratio = 4;
child = [
{ type = "cpu"; }
];
}
{
ratio = 3;
child = [
{ type = "mem"; }
{ type = "net"; }
];
}
{
ratio = 3;
child = [
{ type = "temp"; }
{ type = "disk"; }
];
}
];
};
};
}
+1 -26
View File
@@ -1,35 +1,10 @@
{ {
pkgs,
lib,
myConfig,
...
}: {
# This enables the btop configuration file generation in your home directory.
# The btop package itself is now installed system-wide via modules/nixos/btop.nix
programs.btop = { programs.btop = {
enable = true; enable = true;
settings = { settings = {
vim_keys = true; vim_keys = true;
color_theme = "TTY"; color_theme = "TTY";
theme_background = false; theme_background = false;
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty cpu:0:default,mem:0:default,net:0:default,gpu0:0:default";
}; };
}; };
}
# This updates your Hyprland settings to use the btop-power wrapper.
wayland.windowManager.hyprland.settings = lib.mkMerge [
{
bindd = [
"CTRL SHIFT, Escape, Open Btop Minimal, exec, uwsm app -- xdg-terminal-exec -e btop-power -p 2"
];
}
(lib.mkIf (myConfig.btop.autostart) {
exec-once = [
"uwsm app -- xdg-terminal-exec -e btop-power -p 2"
];
windowrule = [
"match:title ^(btop)$, monitor ${myConfig.btop.monitor}"
];
})
];
}
+37 -66
View File
@@ -10,98 +10,69 @@
}; };
}; };
display = { display = {
separator = " : "; separator = " ";
}; };
modules = [ modules = [
{ "break"
type = "command"; "break"
key = " "; "title"
keyColor = "blue";
text = "splash=$(hakase-hyprlock-text-generator);echo $splash";
}
{
type = "custom";
format = "";
}
{ {
type = "os"; type = "os";
key = " 󰣇 OS"; key = "os ";
format = "{2}"; keyColor = "33";
keyColor = "red";
} }
{ {
type = "kernel"; type = "kernel";
key = " 󰌽 Kernel"; key = "kernel";
format = "{2}"; keyColor = "33";
keyColor = "red"; }
{
type = "host";
format = "{2} {1}";
key = "host ";
keyColor = "33";
} }
{ {
type = "packages"; type = "packages";
key = " 󰏗 Pkgs"; format = "{} (nix)";
keyColor = "green"; key = "pkgs ";
} keyColor = "33";
{
type = "terminal";
key = " 󰆍 Terminal";
keyColor = "yellow";
}
{
type = "wm";
key = " 󱗃 WM";
format = "{2}";
keyColor = "yellow";
}
{
type = "custom";
format = "";
}
"break"
{
type = "title";
key = " ";
format = "{6} {7} {8}";
}
{
type = "custom";
format = "";
} }
{ {
type = "cpu"; type = "cpu";
format = "{1} @ {7}"; format = " {1}";
key = " 󰻠 CPU"; key = "cpu";
keyColor = "blue"; keyColor = "33";
} }
{ {
type = "gpu"; type = "gpu";
format = "{1} {2}"; format = " {2}";
key = " 󰊴 GPU"; key = "gpu";
keyColor = "blue";
hideType = "integrated"; hideType = "integrated";
keyColor = "33";
} }
{ {
type = "memory"; type = "memory";
key = " 󰍛 Memory"; key = "memory";
keyColor = "magenta"; keyColor = "33";
} }
{ {
type = "disk"; type = "disk";
key = " 󰃭 OS Age"; key = "disk";
folders = "/"; keyColor = "33";
keyColor = "red"; folders = ["/"]; # Restricts output to only the root partition
format = "{days} days"; format = " {1} / {2} ({3})"; # Output: Used / Total (Percentage)
}
{
type = "uptime";
key = " 󰅐 Uptime";
keyColor = "red";
}
{
type = "custom";
format = "";
} }
# {
# type = "uptime";
# key = "uptime";
# keyColor = "33";
# }
"break"
{ {
type = "colors"; type = "colors";
paddingLeft = 2; paddingLeft = "2";
symbol = "circle"; symbol = "circle";
} }
"break" "break"
-5
View File
@@ -1,5 +0,0 @@
{pkgs, ...}: {
wayland.windowManager.hyprland.settings.exec-once = [
"fcitx5 -d --replace"
];
}
+35 -76
View File
@@ -4,30 +4,6 @@
inputs, inputs,
... ...
}: { }: {
wayland.windowManager.hyprland.settings = {
exec-once = [
"uwsm app -- pywalfox start"
];
bindd = [
"SUPER, W, Open Browser, exec, uwsm app -- firefox"
"SUPER, Y, Toggle YouTube, togglespecialworkspace, youtube"
"SUPER SHIFT, Y, Move to YouTube Special Workspace, movetoworkspace, special:youtube"
"SUPER, I, Toggle Jellyfin, togglespecialworkspace, jellyfin"
"SUPER SHIFT, I, Move to Jellyfin Special Workspace, movetoworkspace, special:jellyfin"
];
workspace = [
"special:youtube, on-created-empty:uwsm app -- firefox -P web-app --name youtube https://youtube.com"
"special:jellyfin, on-created-empty:uwsm app -- firefox -P web-app --name jellyfin https://watch.sakamoto.dev"
];
windowrule = [
"match:class (?i)(firefox|youtube|jellyfin), opacity 1 1"
"match:class ^(youtube)$, workspace special:youtube"
"match:class ^(jellyfin)$, workspace special:jellyfin"
];
};
imports = [ imports = [
inputs.textfox.homeManagerModules.default inputs.textfox.homeManagerModules.default
./textfox.nix ./textfox.nix
@@ -43,22 +19,8 @@
bind J tabnext bind J tabnext
bind K tabprev bind K tabprev
unbind <C-e> unbind <C-e>
" Force Tridactyl to yield new tab control to Firefox/Extensions
set newtab about:newtab
''; '';
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
};
};
programs.firefox = { programs.firefox = {
enable = true; enable = true;
languagePacks = ["en-US"]; languagePacks = ["en-US"];
@@ -68,34 +30,16 @@
]; ];
profiles = { profiles = {
youtube = import ./profiles/web-app.nix { youtube = import ./profiles/youtube.nix {inherit pkgs myConfig;};
inherit pkgs myConfig;
id = 1;
name = "YouTube";
url = "https://youtube.com";
};
jellyfin = import ./profiles/web-app.nix {
inherit pkgs myConfig;
id = 2;
name = "Jellyfin";
url = "https://watch.sakamoto.dev";
};
web-app = import ./profiles/web-app.nix {
inherit pkgs myConfig;
id = 3;
name = "web-app";
url = "about:blank";
};
hakase = { hakase = {
search.force = true; search.force = true;
isDefault = true; isDefault = true;
search.default = "ddg"; search.default = "ddg";
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
pywalfox
ublock-origin ublock-origin
bitwarden bitwarden
tridactyl tridactyl
new-tab-override # pywalfox
]; ];
bookmarks = { bookmarks = {
@@ -112,12 +56,12 @@
settings = { settings = {
# --- Privacy & Hardening --- # --- Privacy & Hardening ---
"browser.contentblocking.category" = "strict"; "browser.contentblocking.category" = "strict";
"privacy.trackingprotection.enabled" = true;
"privacy.resistFingerprinting" = true; # Note: Spoofs timezone and caps FPS to 60
"geo.enabled" = false; "geo.enabled" = false;
"media.peerconnection.enabled" = false; # Prevents WebRTC IP leaks "media.peerconnection.enabled" = false; # Prevents WebRTC IP leaks
"network.dns.disablePrefetch" = true; "network.dns.disablePrefetch" = true;
"network.prefetch-next" = false; "network.prefetch-next" = false;
"privacy.resistFingerprinting" = true; # Note: Spoofs timezone and caps FPS to 60
"privacy.trackingprotection.enabled" = true;
# --- NixOS / Hyprland Integration --- # --- NixOS / Hyprland Integration ---
"widget.use-xdg-desktop-portal.file-picker" = 1; # Use native file picker "widget.use-xdg-desktop-portal.file-picker" = 1; # Use native file picker
@@ -125,28 +69,28 @@
# --- UI & Behavior --- # --- UI & Behavior ---
"accessibility.typeaheadfind" = false; "accessibility.typeaheadfind" = false;
"browser.compactmode.show" = true; "browser.compactmode.show" = true;
"browser.formfill.enable" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.snippets" = false;
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.system.showSponsored" = false;
"browser.search.suggest.enabled" = false;
"browser.search.suggest.enabled.private" = false;
"browser.tabs.closeWindowWithLastTab" = false; "browser.tabs.closeWindowWithLastTab" = false;
"browser.topsites.contile.enabled" = false;
"browser.urlbar.showSearchSuggestionsFirst" = false;
"browser.urlbar.suggest.searches" = false;
"extensions.pocket.enabled" = false; "extensions.pocket.enabled" = false;
"extensions.screenshots.disabled" = true; "extensions.screenshots.disabled" = true;
"browser.topsites.contile.enabled" = false;
"browser.formfill.enable" = false;
"browser.search.suggest.enabled" = false;
"browser.search.suggest.enabled.private" = false;
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.showSearchSuggestionsFirst" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.snippets" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.system.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
# --- Homepage & Navigation --- # --- Homepage & Navigation ---
"browser.newtabpage.pinned" = myConfig.firefox.newtabpage;
"browser.startup.homepage" = "https://dash.sakamoto.dev"; "browser.startup.homepage" = "https://dash.sakamoto.dev";
"browser.newtabpage.pinned" = myConfig.firefox.newtabpage;
# --- DNS over HTTPS (Quad9) --- # --- DNS over HTTPS (Quad9) ---
"network.trr.mode" = 2; # Use DoH with system fallback "network.trr.mode" = 2; # Use DoH with system fallback
@@ -182,6 +126,21 @@
UrlbarInterventions = false; UrlbarInterventions = false;
WhatsNew = false; WhatsNew = false;
}; };
# ExtensionSettings = {
# "uBlock0@raymondhill.net" = {
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
# installation_mode = "force_installed";
# };
# "{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
# installation_mode = "force_installed";
# };
# "tridactyl.vim@cmcaine.co.uk" = {
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/tridactyl-vim/latest.xpi";
# installation_mode = "force_installed";
# };
# };
}; };
}; };
} }
-178
View File
@@ -1,178 +0,0 @@
{
pkgs,
myConfig,
id,
name,
url,
...
}: {
inherit id name;
# Note: This profile relies on the global tridactylrc logic in default.nix
# to dynamically set 'newtab' via the TRIDACTYL_NEWTAB environment variable.
search.force = true;
search.default = "ddg";
extensions.force = true;
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
tridactyl
new-tab-override
pywalfox
];
settings = {
# --- New Tab Override ---
"extensions.newtaboverride@agenedia.com.url" = url;
"extensions.newtaboverride@agenedia.com.type" = 1; # URL mode
# --- Privacy & Hardening ---
"browser.contentblocking.category" = "strict";
"privacy.trackingprotection.enabled" = true;
"privacy.resistFingerprinting" = true; # Note: Spoofs timezone and caps FPS to 60
"geo.enabled" = false;
"media.peerconnection.enabled" = false; # Prevents WebRTC IP leaks
"network.dns.disablePrefetch" = true;
"network.prefetch-next" = false;
# --- NixOS / Hyprland Integration ---
"widget.use-xdg-desktop-portal.file-picker" = 1; # Use native file picker
# --- UI & Behavior ---
"browser.toolbars.bookmarks.visibility" = "never";
"browser.compactmode.show" = true;
"browser.tabs.closeWindowWithLastTab" = false;
"extensions.pocket.enabled" = false;
"extensions.screenshots.disabled" = true;
"browser.topsites.contile.enabled" = false;
"browser.formfill.enable" = false;
"browser.search.suggest.enabled" = false;
"browser.search.suggest.enabled.private" = false;
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.showSearchSuggestionsFirst" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.snippets" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.system.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"extensions.autoDisableScopes" = 0; # Enable extensions by default
# --- Homepage & Navigation ---
"browser.startup.page" = 1; # Always open the homepage
"browser.startup.homepage" = url;
"browser.newtab.url" = url; # Try to set newtab to homepage
"browser.sessionstore.resume_from_crash" = false; # Always start fresh
"browser.sessionstore.max_tabs_undo" = 0; # Disable undo close tab
# --- DNS over HTTPS (Quad9) ---
"network.trr.mode" = 2; # Use DoH with system fallback
"network.trr.uri" = "https://dns.quad9.net/dns-query";
};
#
# userChrome = ''
# /* --- Autohide Entire Toolbox (Tabs + Address Bar) --- */
# /* Adapted from MrOtherGuy's autohide_main_toolbar.css */
#
# :root{
# /* Height of Tabs + Nav Bar approx 80px */
# --uc-navbar-transform: -85px;
# --uc-autohide-toolbar-delay: 0.1s;
# --uc-autohide-toolbar-duration: 200ms;
# }
# :root[uidensity="compact"]{ --uc-navbar-transform: -70px }
#
# #navigator-toolbox > div{ display: contents; }
#
# /* Apply transform to TabsToolbar AND Nav-bar */
# :root[sessionrestored] :where(#nav-bar,#PersonalToolbar,#TabsToolbar,#tab-notification-deck,.global-notificationbox,#notifications-toolbar){
# transform: translateY(var(--uc-navbar-transform))
# }
#
# :root:is([customizing],[chromehidden*="toolbar"]) :where(#nav-bar,#PersonalToolbar,#TabsToolbar,#tab-notification-deck,.global-notificationbox,#notifications-toolbar){
# transform: none !important;
# opacity: 1 !important;
# }
#
# /* Hide styles for Nav-Bar AND TabsToolbar */
# :where(#nav-bar,#TabsToolbar):not([customizing]){
# opacity: 0;
# transition: transform var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay), opacity var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay) !important;
# position: relative;
# z-index: 2;
# background-color: #1c1b22 !important; /* Solid background */
# }
#
# #navigator-toolbox,
# #sidebar-box,
# #sidebar-main,
# #sidebar-splitter,
# #tabbrowser-tabbox{
# z-index: auto !important;
# }
#
# /* Show when toolbox is focused or hovered */
# #navigator-toolbox:focus-within > .browser-toolbar,
# .browser-titlebar:hover ~ :is(#nav-bar,#PersonalToolbar,#TabsToolbar),
# #nav-bar:hover,
# #TabsToolbar:hover,
# #nav-bar:hover + #PersonalToolbar{
# transform: translateY(0);
# opacity: 1;
# transition-duration: var(--uc-autohide-toolbar-duration), var(--uc-autohide-toolbar-duration) !important;
# transition-delay: 0s !important;
# }
#
# /* Ensure popups still work (URL bar) */
# :root[sessionrestored] #urlbar[popover]{
# opacity: 0;
# pointer-events: none;
# transition: transform var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay), opacity var(--uc-autohide-toolbar-duration) ease var(--uc-autohide-toolbar-delay);
# transform: translateY(var(--uc-navbar-transform));
# }
# #mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#selection-shortcut-action-panel,#chat-shortcuts-options-panel,#tab-preview-panel)) ~ toolbox #urlbar[popover],
# .browser-titlebar:is(:hover,:focus-within) ~ #nav-bar #urlbar[popover],
# #nav-bar:is(:hover,:focus-within) #urlbar[popover],
# #urlbar-container > #urlbar[popover]:is([focused],[open]){
# opacity: 1;
# pointer-events: auto;
# transition-delay: 0ms;
# transform: translateY(0);
# }
# :where(:root[sessionrestored]) #urlbar-container > #urlbar[popover]:is([focused],[open]){
# transition-duration: 100ms;
# }
#
# /* --- CRITICAL FIX: Trigger Zone --- */
# /* Since we hide EVERYTHING, we need a hitbox at the top of the screen */
# #navigator-toolbox::after {
# content: "";
# position: fixed;
# top: 0;
# left: 0;
# width: 100%;
# height: 20px; /* Generous hit target */
# z-index: 10000;
# pointer-events: auto;
# }
#
# /* When hitbox is hovered, reveal bars */
# #navigator-toolbox:hover :where(#nav-bar,#PersonalToolbar,#TabsToolbar) {
# transform: translateY(0) !important;
# opacity: 1 !important;
# transition-delay: 0s !important;
# }
#
# /* Move up the content view to fill the gap */
# :root[sessionrestored]:not([chromehidden~="toolbar"]) > body > #browser{
# margin-top: var(--uc-navbar-transform);
# }
#
# /* Fix Titlebar and Bookmarks */
# #titlebar { appearance: none !important; }
# #PersonalToolbar { visibility: collapse !important; }
# '';
}
+120
View File
@@ -0,0 +1,120 @@
{
pkgs,
myConfig,
...
}: {
id = 1;
name = "YouTube";
search.force = true;
search.default = "ddg";
extensions.force = true;
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
tridactyl
];
settings = {
# --- Privacy & Hardening ---
"browser.contentblocking.category" = "strict";
"privacy.trackingprotection.enabled" = true;
"privacy.resistFingerprinting" = true; # Note: Spoofs timezone and caps FPS to 60
"geo.enabled" = false;
"media.peerconnection.enabled" = false; # Prevents WebRTC IP leaks
"network.dns.disablePrefetch" = true;
"network.prefetch-next" = false;
# --- NixOS / Hyprland Integration ---
"widget.use-xdg-desktop-portal.file-picker" = 1; # Use native file picker
# --- UI & Behavior ---
"browser.compactmode.show" = true;
"browser.tabs.closeWindowWithLastTab" = false;
"extensions.pocket.enabled" = false;
"extensions.screenshots.disabled" = true;
"browser.topsites.contile.enabled" = false;
"browser.formfill.enable" = false;
"browser.search.suggest.enabled" = false;
"browser.search.suggest.enabled.private" = false;
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.showSearchSuggestionsFirst" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.snippets" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = false;
"browser.newtabpage.activity-stream.section.highlights.includeDownloads" = false;
"browser.newtabpage.activity-stream.section.highlights.includeVisited" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.system.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"extensions.autoDisableScopes" = 0; # Enable extensions by default
# --- Homepage & Navigation ---
"browser.startup.homepage" = "https://youtube.com";
"browser.newtabpage.pinned" = myConfig.firefox.newtabpage;
# --- DNS over HTTPS (Quad9) ---
"network.trr.mode" = 2; # Use DoH with system fallback
"network.trr.uri" = "https://dns.quad9.net/dns-query";
};
userChrome = ''
/* --- Floating Autohide Toolbox (Tabs Only) --- */
/* Take toolbox out of the document flow so web content is 100% height */
#navigator-toolbox {
position: fixed !important;
top: 0;
left: 0;
width: 100%;
z-index: 9999 !important;
background-color: var(--toolbar-bgcolor, #1c1b22) !important;
/* Start hidden */
transform: translateY(-100%) !important;
opacity: 0 !important;
transition: transform 0.2s ease, opacity 0.2s ease !important;
}
/* Trigger zone */
#navigator-toolbox::after {
content: "";
position: absolute;
top: 100%;
left: 0;
width: 100%;
height: 10px;
z-index: 10000 !important;
}
/* Reveal when hovering */
#navigator-toolbox:hover {
transform: translateY(0) !important;
opacity: 1 !important;
}
/* --- Hide specific bars --- */
/* Hide Navigation Bar (Address Bar) COMPLETELY */
#nav-bar {
visibility: collapse !important;
height: 0px !important;
min-height: 0px !important;
padding: 0 !important;
margin: 0 !important;
}
/* Hide Bookmarks Toolbar */
#PersonalToolbar { visibility: collapse !important; }
/* Hide Titlebar */
#titlebar { appearance: none !important; }
/* Ensure TabsToolbar looks okay on its own */
#TabsToolbar {
border: none !important;
background: transparent !important;
}
'';
}
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
textfox = { textfox = {
enable = true; enable = true;
profiles = ["hakase" "web-app"]; profile = "hakase";
config = { config = {
# background = { # background = {
# color = "#123456"; # color = "#123456";
-53
View File
@@ -1,46 +1,8 @@
{ {
config, config,
pkgs, pkgs,
myConfig,
... ...
}: { }: {
home.packages = [
# TODO: will rewrite later
(pkgs.writeShellScriptBin "tte-loop" ''
trap 'printf "\e[?25h"; exit 0' INT
printf '\e[?25l'
effects=(beams binarypath blackhole bouncyballs bubbles burn colorshift crumble decrypt errorcorrect expand fireworks highlight laseretch matrix middleout orbittingvolley overflow pour print rain randomsequence rings scattered slice slide spotlights spray swarm sweep synthgrid unstable vhstape waves wipe)
while true; do
clear
cols=$(tput cols)
lines=$(tput lines)
effect="''${effects[RANDOM % ''${#effects[@]}]}"
printf '\e[?25l'
${pkgs.terminaltexteffects}/bin/tte --input-file ${config.home.homeDirectory}/.config/nixos/assets/branding.txt --anchor-canvas c --anchor-text c --canvas-width "$cols" --canvas-height "$((lines-2))" --frame-rate 120 "$effect"
printf '\e[?25l'
sleep 2
done
'')
(pkgs.writeShellScriptBin "tte-screensaver" ''
# Get all monitors
monitors=$(${pkgs.hyprland}/bin/hyprctl monitors -j | ${pkgs.jq}/bin/jq -r '.[].name')
# Launch ghostty on each monitor one at a time
for monitor in $monitors; do
${pkgs.hyprland}/bin/hyprctl dispatch focusmonitor "$monitor"
sleep 0.3
${pkgs.ghostty}/bin/ghostty --config-file=${config.home.homeDirectory}/.config/ghostty/screensaver --fullscreen -e tte-loop &
sleep 1
done
# Monitor for any input and exit when detected
${pkgs.libinput}/bin/libinput debug-events 2>/dev/null | head -n 1 >/dev/null
# Input detected, kill all screensaver instances
${pkgs.procps}/bin/pkill -f "ghostty.*tte-loop"
'')
];
home.file.".config/ghostty/screensaver".text = '' home.file.".config/ghostty/screensaver".text = ''
window-padding-x = 0 window-padding-x = 0
window-padding-y = 0 window-padding-y = 0
@@ -55,26 +17,11 @@
enableFishIntegration = true; enableFishIntegration = true;
settings = { settings = {
font-family = myConfig.terminal.font;
confirm-close-surface = false; confirm-close-surface = false;
app-notifications = false; app-notifications = false;
window-padding-x = 15; window-padding-x = 15;
window-padding-y = 15; window-padding-y = 15;
window-padding-balance = true; window-padding-balance = true;
gtk-titlebar = false;
mouse-hide-while-typing = true;
copy-on-select = "clipboard";
auto-update = "off";
}; };
}; };
wayland.windowManager.hyprland.settings.bindd = [
"SUPER, P, Toggle Preload, togglespecialworkspace, preload"
"SUPER SHIFT, P, Move to Preload Special Workspace, movetoworkspace, special:preload"
];
wayland.windowManager.hyprland.settings.exec-once = [
"[workspace special:preload silent] uwsm app -- xdg-terminal-exec"
"[workspace 1] uwsm app -- ghostty -e bash -c 'fastfetch; exec $SHELL'" # TODO: must be xdg-terminal-exec, or default user terminal
];
} }
+6 -14
View File
@@ -1,27 +1,19 @@
{pkgs, ...}: { { pkgs, ... }:
wayland.windowManager.hyprland.settings = { {
exec-once = [
"uwsm app -- hypridle"
];
};
services.hypridle = { services.hypridle = {
enable = true; enable = true;
settings = { settings = {
general = { general = {
after_sleep_cmd = "hyprctl dispatch dpms on"; after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false; ignore_dbus_inhibit = false;
lock_cmd = "hakase-hyprlock"; lock_cmd = "hyprlock";
before_sleep_cmd = "hakase-hyprlock"; # lock before suspend before_sleep_cmd = "loginctl lock-session"; # lock before suspend
}; };
listener = [ listener = [
# {
# timeout = 180; # 3min
# on-timeout = "tte-screensaver";
# }
{ {
timeout = 300; # 5min timeout = 300; # 5min
on-timeout = "hakase-hyprlock"; # lock screen when timeout has passed on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
} }
{ {
timeout = 330; # 5.5min timeout = 330; # 5.5min
@@ -29,7 +21,7 @@
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has passed on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has passed
} }
{ {
timeout = 660; timeout = 1800; # 30min
on-timeout = "systemctl suspend"; # suspend pc on-timeout = "systemctl suspend"; # suspend pc
} }
]; ];
+4 -17
View File
@@ -1,28 +1,15 @@
{ {
pkgs,
inputs,
...
}: {
imports = [ imports = [
./hypr/animation.nix
./hypr/binds.nix ./hypr/binds.nix
./hypr/exec.nix
./hypr/general.nix ./hypr/general.nix
./hypr/input.nix ./hypr/exec.nix
./hypr/layers.nix
./hypr/misc.nix
./hypr/rules.nix ./hypr/rules.nix
./hypr/animation.nix
./hypr/misc.nix
./hypr/input.nix
./scripts/movement.nix ./scripts/movement.nix
./scripts/window-rules.nix
./scripts/workspace-toggle.nix
]; ];
wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.systemd.enable = false; # for UWSM support... wayland.windowManager.hyprland.systemd.enable = false; # for UWSM support...
wayland.windowManager.hyprland.plugins = [
inputs.hyprsplit.packages.${pkgs.system}.hyprsplit
# inputs.hypr-dynamic-cursors.packages.${pkgs.system}.hypr-dynamic-cursors
# inputs.hyprspace.packages.${pkgs.system}.Hyprspace
pkgs.hyprlandPlugins.hyprbars
];
} }
+19
View File
@@ -28,5 +28,24 @@
"workspaces, 0, 0, ease" "workspaces, 0, 0, ease"
]; ];
}; };
decoration = {
rounding = 0;
shadow = {
enabled = true;
range = 2;
render_power = 3;
color = "rgba(1a1a1aee)";
};
blur = {
enabled = true;
size = 2;
passes = 2;
special = true;
brightness = 0.60;
contrast = 0.75;
};
};
}; };
} }
+34 -27
View File
@@ -1,13 +1,24 @@
{pkgs, ...}: { {pkgs, ...}: {
# TODO: implement a way to show binds, preferably use vicinae. services.swayosd.enable = true;
home.packages = [
pkgs.playerctl
];
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
binds = {
workspace_back_and_forth = true;
};
bindel = [ bindel = [
", XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise"
", XF86AudioLowerVolume, exec, swayosd-client --output-volume lower"
", XF86MonBrightnessUp, exec, ddcutil setvcp 10 + 10" ", XF86MonBrightnessUp, exec, ddcutil setvcp 10 + 10"
", XF86MonBrightnessDown, exec, ddcutil setvcp 10 - 10" ", XF86MonBrightnessDown, exec, ddcutil setvcp 10 - 10"
]; ];
bindl = [
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
", Caps_Lock, exec, swayosd-client --caps-lock"
", XF86AudioPlay, exec, playerctl play-pause && notify-send -u low -t 1000 \"Media\" \"$(playerctl status)\""
", XF86AudioPrev, exec, playerctl previous && notify-send -u low -t 1000 \"Previous Track\" \"$(playerctl metadata title)\""
", XF86AudioNext, exec, playerctl next && notify-send -u low -t 1000 \"Next Track\" \"$(playerctl metadata title)\""
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
]; # FIXME: not working
bindm = [ bindm = [
"SUPER, mouse:272, movewindow" "SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow" "SUPER, mouse:273, resizewindow"
@@ -30,7 +41,6 @@
"SUPER, K, Move focus up, movefocus, u" "SUPER, K, Move focus up, movefocus, u"
"SUPER, H, Move focus left, movefocus, l" "SUPER, H, Move focus left, movefocus, l"
"SUPER, L, Move focus right, movefocus, r" "SUPER, L, Move focus right, movefocus, r"
"SUPER, G, Switch Focus (Float/Tile), exec, hakase-focus-switch"
# move window # move window
"SUPER SHIFT, h, Move window left, movewindow, l" "SUPER SHIFT, h, Move window left, movewindow, l"
@@ -46,40 +56,37 @@
"SUPER, O, Toggle Split, layoutmsg, togglesplit" "SUPER, O, Toggle Split, layoutmsg, togglesplit"
# apps # apps
# "SUPER, SPACE, Open App Launcher, exec, nc -U $XDG_RUNTIME_DIR/walker/walker.sock" "SUPER, W, Open Browser, exec, uwsm app -- firefox" # FIXME: must be xdg-open
"SUPER, SPACE, Open App Launcher, exec, nc -U $XDG_RUNTIME_DIR/walker/walker.sock"
"SUPER, T, Toggle Steam, togglespecialworkspace, steam"
"SUPER, M, Toggle Music, togglespecialworkspace, music"
"SUPER, Y, Toggle YouTube, togglespecialworkspace, youtube"
"SUPER, P, Toggle Preload, togglespecialworkspace, preload"
"SUPER CTRL, I, Switch Wallpaper, exec, hakase-wallpaper-switch"
# TODO: "SUPER, S, Toggle Special Workspace, togglespecialworkspace, custom"
# add screen recording "SUPER + Shift, S, Move to Special Workspace, movetoworkspace, special:custom"
# Special workspace
"SUPER, U, Toggle Special Workspace, togglespecialworkspace, custom"
"SUPER SHIFT, U, Move to Special Workspace, movetoworkspace, special:custom"
# [Workspaces] Toggle between most recent workspaces # [Workspaces] Toggle between most recent workspaces
"SUPER, Tab, Cycle workspaces, workspace, previous" "SUPER, Tab, Cycle workspaces, workspace, previous"
# [Workspaces] Move to another workspace
"CTRL SHIFT, H, Move to previous workspace, split:workspace, -1"
"CTRL SHIFT, L, Move to next workspace, split:workspace, +1"
"CTRL SHIFT, K, Move to previous workspace, split:workspace, -1"
"CTRL SHIFT, J, Move to next workspace, split:workspace, +1"
# hyprspace - workspace overview
# "SUPER, E, Toggle Workspace Overview, overview:toggle"
] ]
++ ( ++ (
# Generate binds for Super + [1-5] to switch workspaces with special workspace toggle support # Generate binds for Super + [1-10] to switch workspaces
# and Super + Shift + [1-5] to move window to workspace on current monitor # and Super + Shift + [1-10] to move window to workspace
builtins.concatLists (builtins.genList ( builtins.concatLists (builtins.genList (
i: let i: let
ws = i + 1; ws = i + 1;
key = toString ws; key = toString (
if ws == 10
then 0
else ws
);
in [ in [
"SUPER, ${key}, Switch to workspace ${toString ws}, exec, workspace-toggle ${toString ws}" "SUPER, ${key}, Switch to workspace ${toString ws}, exec, hakase-workspace-switch-force ${toString ws}"
"SUPER SHIFT, ${key}, Move window to workspace ${toString ws}, split:movetoworkspace, ${toString ws}" "SUPER SHIFT, ${key}, Move window to workspace ${toString ws}, movetoworkspace, ${toString ws}"
] ]
) )
5) 10)
); );
}; };
} }
+2
View File
@@ -4,6 +4,8 @@
]; ];
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
env = [ env = [
"HYPRCURSOR_THEME,rose-pine-hyprcursor"
"HYPRCURSOR_SIZE,24"
"GUM_CONFIRM_PROMPT_FOREGROUND,6" "GUM_CONFIRM_PROMPT_FOREGROUND,6"
"GUM_CONFIRM_SELECTED_FOREGROUND,0" "GUM_CONFIRM_SELECTED_FOREGROUND,0"
"GUM_CONFIRM_SELECTED_BACKGROUND,2" "GUM_CONFIRM_SELECTED_BACKGROUND,2"
+20 -11
View File
@@ -1,22 +1,31 @@
{ {pkgs, ...}: {
pkgs,
config,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
psmisc psmisc
]; ];
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
exec = [ exec = [
# "pkill -x hyprpaper; uwsm app -- hyprpaper" # "pkill -x hyprpaper; uwsm app -- hyprpaper"
# "matugen image ${config.home.homeDirectory}/.cache/current_wallpaper" "killall -SIGUSR2 .ghostty-wrappe"
]; ];
exec-once = [ exec-once = [
# essentials "[workspace special:preload silent] uwsm app -- firefox"
"hyprpm reload -n" "[workspace special:preload silent] uwsm app -- firefox -P YouTube"
"systemctl --user start hyprpolkitagent" "[workspace special:preload silent] uwsm app -- xdg-terminal-exec"
"systemctl --user start swayosd"
# "hyprsunset -t 4500" # TODO: must be optional "uwsm app -- waybar"
"uwsm app -- hyprpaper"
"uwsm app -- elephant"
"uwsm app -- swayosd-server"
"uwsm app -- pywalfox start"
"uwsm app -- pywalfox start"
"uwsm app -- hypridle"
"walker --gapplication-service"
"sh -c 'sleep 2.5; hakase-workspace-switch-force 1'"
"[workspace 1] uwsm app -- ghostty -e bash -c 'fastfetch; exec $SHELL'"
"[workspace special:steam silent] uwsm app -- steam"
]; ];
}; };
} }
+1 -22
View File
@@ -4,31 +4,10 @@
gaps_in = 5; gaps_in = 5;
gaps_out = 15; gaps_out = 15;
layout = "dwindle"; layout = "dwindle";
allow_tearing = true;
resize_on_border = true;
};
decoration = {
rounding = 0;
active_opacity = 1;
inactive_opacity = 0.99;
shadow = {
enabled = true;
range = 2;
render_power = 3;
color = "rgba(1a1a1aee)";
};
blur = {
enabled = true;
size = 8;
passes = 2;
new_optimizations = true;
special = true;
brightness = 0.60;
contrast = 0.75;
};
}; };
monitor = myConfig.hyprland.monitors; monitor = myConfig.hyprland.monitors;
dwindle = { dwindle = {
pseudotile = true;
preserve_split = true; preserve_split = true;
smart_split = false; smart_split = false;
}; };
+2 -5
View File
@@ -1,14 +1,11 @@
{myConfig, ...}: { {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
input = { input = {
repeat_rate = 50; repeat_rate = 50;
repeat_delay = 300; repeat_delay = 300;
numlock_by_default = true;
kb_options = myConfig.hyprland.kb_options;
}; };
cursor = { cursor = {
hide_on_key_press = false; hide_on_key_press = true;
no_warps = false;
}; };
}; };
} }
-7
View File
@@ -1,7 +0,0 @@
{pkgs, ...}: {
wayland.windowManager.hyprland.settings = {
layerrule = [
"match:namespace vicinae, blur true, ignore_alpha 0.0, no_anim true"
];
};
}
+2 -43
View File
@@ -1,17 +1,13 @@
{myConfig, ...}: { {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
misc = { misc = {
disable_hyprland_logo = true; disable_hyprland_logo = true;
disable_splash_rendering = true; disable_splash_rendering = true;
focus_on_activate = true; focus_on_activate = true;
anr_missed_pings = 3; anr_missed_pings = 3;
on_focus_under_fullscreen = 1; new_window_takes_over_fullscreen = 1;
}; };
# experimental = {
# hdr = true;
# };
cursor = { cursor = {
no_hardware_cursors = true; no_hardware_cursors = true;
no_break_fs_vrr = true; no_break_fs_vrr = true;
@@ -22,42 +18,5 @@
direct_scanout = true; direct_scanout = true;
cm_enabled = true; cm_enabled = true;
}; };
plugin = {
hyprsplit = {
num_workspaces = 5;
persistent_workspaces = false;
};
dynamic-cursors = {
mode = "tilt";
shake = {
enabled = true;
threshold = 4.0;
limit = 4.0;
timeout = 200;
};
};
overview = {
# Using default settings
};
hyprbars = {
bar_height = 24;
bar_color = "$surface_container_high";
bar_text_color = "$on_surface";
bar_text_size = 0;
bar_text_font = myConfig.font.sans;
bar_button_padding = 4;
bar_padding = 8;
bar_precedence_over_border = true;
on_double_click = "hyprctl dispatch fullscreen 1";
hyprbars-button = [
"$error, 10, , hyprctl dispatch killactive"
"$tertiary, 10, , hyprctl dispatch fullscreen 1"
];
};
};
}; };
} }
+50 -5
View File
@@ -1,11 +1,56 @@
{ {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
windowrule = [
# Make all inactive windows transparent
"match:class .*, opacity 1 0.8"
"match:class firefox, match:title (?i).*bitwarden.*, no_screen_share on"
];
workspace = [ workspace = [
"special:youtube, on-created-empty:uwsm app -- firefox -P YouTube --name youtube"
"special:music, on-created-empty:hakase-music-launch"
];
windowrulev2 = [
# --- POPUP RULES (Wifi, BT, Audio) ---
"float, class:^(org\.hakase\.popup\..*)$"
"animation slide right, class:^(org\.hakase\.popup\..*)$"
"dimaround, class:^(org\.hakase\.popup\..*)$"
# --- WALLPAPER PICKER ---
"float, class:^(org\.hakase\.switch-wallpaper)$"
"float, initialTitle:^(Wallpaper Selector)$"
"center, class:^(org\.hakase\.switch-wallpaper)$"
"center, initialTitle:^(Wallpaper Selector)$"
"size 60% 60%, class:^(org\.hakase\.switch-wallpaper)$"
"size 60% 60%, initialTitle:^(Wallpaper Selector)$"
"dimaround, class:^(org\.hakase\.switch-wallpaper)$"
"dimaround, initialTitle:^(Wallpaper Selector)$"
# Prevent Firefox and Terminal from stealing focus on launch
"suppressevent activate, workspace:special:preload"
"noinitialfocus, workspace:special:preload"
# --- STEAM RULES ---
"workspace special:steam silent, class:^(steam)$"
"noinitialfocus, class:^(steam)$"
"suppressevent activate, class:^(steam)$"
# --- MUSIC RULES (Jellyfin-TUI) ---
"workspace special:music silent, title:^(jellyfin-tui)$"
"workspace special:music silent, initialTitle:^(jellyfin-tui)$"
# --- CAVA RULES ---
"workspace special:music silent, title:^(cava)$"
"workspace special:music silent, initialTitle:^(cava)$"
# --- YOUTUBE RULES ---
"workspace special:youtube, class:^(youtube)$"
# --- GAMING RULES ---
# Steam Apps, Gamescope, Lutris, Heroic, and Wine/Proton apps
"fullscreen, class:^steam_app_\d+$"
"monitor 0, class:^steam_app_\d+$"
"workspace 1, class:^steam_app_\d+$"
"fullscreen, class:^(gamescope)$"
"fullscreen, class:^(lutris)$"
"fullscreen, class:^(heroic)$"
"fullscreen, class:^wine-.*$"
"fullscreen, title:^Wine .*$"
]; ];
}; };
} }
+7 -21
View File
@@ -1,12 +1,16 @@
{pkgs, ...}: let {pkgs, ...}: let
hakase-workspace-switch-force = pkgs.writeShellScriptBin "hakase-workspace-switch-force" '' hakase-workspace-switch-force = pkgs.writeShellScriptBin "hakase-workspace-switch-force" ''
# Define binary paths to ensure they work regardless of environment PATH
HYPRCTL="${pkgs.hyprland}/bin/hyprctl" HYPRCTL="${pkgs.hyprland}/bin/hyprctl"
JQ="${pkgs.jq}/bin/jq" JQ="${pkgs.jq}/bin/jq"
# Get the special workspace name
special_workspace=$($HYPRCTL monitors -j | $JQ -r '.[] | select(.focused) | .specialWorkspace.name') special_workspace=$($HYPRCTL monitors -j | $JQ -r '.[] | select(.focused) | .specialWorkspace.name')
# Strip the "special:" prefix (Nix escape: ''${var#*:})
workspace_name=''${special_workspace#*:} workspace_name=''${special_workspace#*:}
# Get the target workspace number from argument
chosen_workspace_num=$1 chosen_workspace_num=$1
if [[ -z ''${chosen_workspace_num} ]]; then if [[ -z ''${chosen_workspace_num} ]]; then
@@ -14,11 +18,14 @@
exit 1 exit 1
fi fi
# Check if we are actually in a special workspace
if [[ "''${special_workspace}" == *"special"* ]]; then if [[ "''${special_workspace}" == *"special"* ]]; then
echo "[LOG] workspace is ''${special_workspace}" echo "[LOG] workspace is ''${special_workspace}"
# Toggle the special workspace OFF
$HYPRCTL dispatch togglespecialworkspace "''${workspace_name}" $HYPRCTL dispatch togglespecialworkspace "''${workspace_name}"
# Switch to the requested normal workspace
$HYPRCTL dispatch workspace "''${chosen_workspace_num}" $HYPRCTL dispatch workspace "''${chosen_workspace_num}"
else else
echo "[LOG] workspace is not special" echo "[LOG] workspace is not special"
@@ -28,29 +35,8 @@
exit 0 exit 0
''; '';
# TODO: revise
hakase-focus-switch = pkgs.writeShellScriptBin "hakase-focus-switch" ''
HYPRCTL="${pkgs.hyprland}/bin/hyprctl"
JQ="${pkgs.jq}/bin/jq"
workspace_id=$($HYPRCTL activeworkspace -j | $JQ '.id')
active_window=$($HYPRCTL activewindow -j)
is_floating=$(echo "$active_window" | $JQ '.floating')
if [ "$is_floating" == "true" ]; then
target_addr=$($HYPRCTL clients -j | $JQ -r --argjson ws "$workspace_id" '[.[] | select(.workspace.id == $ws and .floating == false)] | .[0].address')
else
target_addr=$($HYPRCTL clients -j | $JQ -r --argjson ws "$workspace_id" '[.[] | select(.workspace.id == $ws and .floating == true)] | .[0].address')
fi
if [ "$target_addr" != "null" ] && [ -n "$target_addr" ]; then
$HYPRCTL dispatch focuswindow address:$target_addr
fi
'';
in { in {
home.packages = [ home.packages = [
hakase-workspace-switch-force hakase-workspace-switch-force
hakase-focus-switch
]; ];
} }
-71
View File
@@ -1,71 +0,0 @@
{pkgs, ...}: let
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
jq = "${pkgs.jq}/bin/jq";
socat = "${pkgs.socat}/bin/socat";
hypr-window-rules = pkgs.writeShellScriptBin "hypr-window-rules" ''
LOG=/tmp/hypr-window-rules.log
log() { echo "[$(date +%T)] $*" >> "$LOG"; }
handle() {
local event="$1"
case "$event" in
windowtitlev2*)
local data="''${event#windowtitlev2>>}"
local addr="0x''${data%%,*}"
local title="''${data#*,}"
if echo "$title" | grep -qi "bitwarden"; then
log "bitwarden title detected: addr=$addr title=$title"
local info
info=$(${hyprctl} clients -j | ${jq} -r --arg addr "$addr" \
'.[] | select(.address == $addr) | "\(.class)|\(.floating)"')
local class="''${info%|*}"
local floating="''${info#*|}"
log " -> class=$class floating=$floating"
if [[ "$class" == "firefox" && "$floating" == "false" ]]; then
${hyprctl} dispatch togglefloating "address:$addr"
local target_w=600
local target_h=800
local mon_id
mon_id=$(${hyprctl} clients -j | ${jq} -r --arg addr "$addr" \
'.[] | select(.address == $addr) | .monitor')
local center
center=$(${hyprctl} monitors -j | ${jq} -r \
--argjson id "$mon_id" --argjson tw "$target_w" --argjson th "$target_h" \
'.[] | select(.id == $id) |
"\(.x + ((.width / .scale) - $tw) / 2 | floor)|\(.y + ((.height / .scale) - $th) / 2 | floor)"')
local cx="''${center%%|*}"
local cy="''${center#*|}"
${hyprctl} dispatch resizewindowpixel "exact $target_w $target_h, address:$addr"
${hyprctl} dispatch movewindowpixel "exact $cx $cy, address:$addr"
log " -> floated, resized to $target_w x $target_h, moved to $cx,$cy"
else
log " -> skipped (class or floating mismatch)"
fi
fi
;;
esac
}
log "started (HYPRLAND_INSTANCE_SIGNATURE=$HYPRLAND_INSTANCE_SIGNATURE)"
${socat} -u \
"UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" \
- \
| while IFS= read -r line; do handle "$line"; done
log "socat exited"
'';
in {
home.packages = [hypr-window-rules];
wayland.windowManager.hyprland.settings.exec-once = [
# FIXME: removed `hypr-window-rule` for excessive CPU usage. Reason unknown.
# "hypr-window-rules"
];
}
@@ -1,27 +0,0 @@
{pkgs, ...}: let
workspace-toggle = pkgs.writeShellScriptBin "workspace-toggle" ''
#!/usr/bin/env bash
target_workspace="$1"
# activeworkspace always returns the underlying workspace, even when a special
# workspace is open. Check the monitor's specialWorkspace field instead.
special=$(${pkgs.hyprland}/bin/hyprctl monitors -j | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .specialWorkspace.name')
if [[ -n "$special" ]]; then
${pkgs.hyprland}/bin/hyprctl dispatch togglespecialworkspace "''${special#special:}"
current=$(${pkgs.hyprland}/bin/hyprctl activeworkspace -j | ${pkgs.jq}/bin/jq -r '.id')
if [[ $current -ne $target_workspace ]]; then
${pkgs.hyprland}/bin/hyprctl dispatch focusworkspaceoncurrentmonitor "$target_workspace"
fi
else
current=$(${pkgs.hyprland}/bin/hyprctl activeworkspace -j | ${pkgs.jq}/bin/jq -r '.id')
if [[ $current -eq $target_workspace ]]; then
${pkgs.hyprland}/bin/hyprctl dispatch workspace previous
else
${pkgs.hyprland}/bin/hyprctl dispatch split:workspace "$target_workspace"
fi
fi
'';
in {
home.packages = [workspace-toggle];
}
+67 -36
View File
@@ -1,45 +1,66 @@
{ { config, pkgs, ... }:
config, let
pkgs,
myConfig,
...
}: let
cacheWallpaper = "${config.home.homeDirectory}/.cache/current_wallpaper"; cacheWallpaper = "${config.home.homeDirectory}/.cache/current_wallpaper";
clockFont = myConfig.font.monospace; clockFont = "JetBrains Mono";
scriptFont = myConfig.font.monospaceScript;
greetingConf = "${config.home.homeDirectory}/.cache/hyprlock-greeting.conf";
hakase-hyprlock = pkgs.writeShellScriptBin "hakase-hyprlock" '' typewriter = pkgs.writeShellScript "hyprlock-typewriter" ''
# Get focused monitor text="Welcome back"
monitor=$(hyprctl monitors -j | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name') state_file="/tmp/hyprlock_typewriter"
lock_pid="/tmp/hyprlock_pid"
blink_file="/tmp/hyprlock_blink"
# Generate greeting label config # Get current hyprlock PID
cat > ${greetingConf} << EOF current_pid=$(pgrep -x hyprlock | head -1)
label {
monitor = $monitor
text = cmd[update:200] hakase-hyprlock-typewriter "\$(hakase-hyprlock-text-generator)"
color = \$on_surface_variant
font_size = 120
font_family = ${clockFont} Bold
position = 0, 480
halign = center
valign = center
}
EOF
exec hyprlock "$@" # Reset if this is a new hyprlock session
if [ -f "$lock_pid" ]; then
old_pid=$(cat "$lock_pid")
if [ "$current_pid" != "$old_pid" ]; then
rm -f "$state_file" "$blink_file"
echo "$current_pid" > "$lock_pid"
fi
else
echo "$current_pid" > "$lock_pid"
fi
# Initialize position
if [ ! -f "$state_file" ]; then
echo 0 > "$state_file"
fi
pos=$(cat "$state_file")
len=''${#text}
# Increment position only if not complete
if [ "$pos" -lt "$len" ]; then
pos=$((pos + 1))
echo "$pos" > "$state_file"
echo "''${text:0:$pos}_"
else
# Blink cursor via foreground color toggle (slow blink)
if [ ! -f "$blink_file" ]; then
echo "0 0" > "$blink_file"
fi
read -r blink count < "$blink_file"
count=$((count + 1))
# Toggle every 5 updates (~600ms at 120ms interval)
if [ "$count" -ge 5 ]; then
count=0
blink=$((1 - blink))
fi
echo "$blink $count" > "$blink_file"
if [ "$blink" -eq 0 ]; then
echo "''${text}_"
else
echo "''${text}<span fgalpha=\"1\">_</span>"
fi
fi
''; '';
in { in {
imports = [
./scripts/typewriter.nix
./scripts/random-text.nix
];
home.packages = [hakase-hyprlock];
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
source = ~/.config/hypr/hyprlock-colors.conf source = ~/.config/hypr/hyprlock-colors.conf
source = ${greetingConf}
general { general {
hide_cursor = true hide_cursor = true
@@ -56,6 +77,18 @@ in {
vibrancy = 0.2 vibrancy = 0.2
} }
# Typewriter greeting (above clock)
label {
monitor =
text = cmd[update:120] ${typewriter}
color = $on_surface_variant
font_size = 24
font_family = ${clockFont}
position = 0, 200
halign = center
valign = center
}
# Hours (top) # Hours (top)
label { label {
monitor = monitor =
@@ -83,10 +116,10 @@ in {
# Date # Date
label { label {
monitor = monitor =
text = cmd[update:60000] echo "<span font_features='ss02'>$(date '+%A, %B %d')</span>" text = cmd[update:60000] date '+%A, %B %d'
color = $on_surface_variant color = $on_surface_variant
font_size = 18 font_size = 18
font_family = ${clockFont} Italic font_family = ${clockFont}
position = 0, -320 position = 0, -320
halign = center halign = center
valign = center valign = center
@@ -129,8 +162,6 @@ in {
fail_timeout = 2000 fail_timeout = 2000
fail_transition = 300 fail_transition = 300
} }
''; '';
}; };
} }
-247
View File
@@ -1,247 +0,0 @@
{pkgs, ...}: let
hakase-hyprlock-text-generator = pkgs.writeShellScriptBin "hakase-hyprlock-text-generator" ''
cache_file="''${XDG_RUNTIME_DIR:-/tmp}/hyprlock_greeting"
pid_file="''${XDG_RUNTIME_DIR:-/tmp}/hyprlock_greeting_pid"
current_pid=$(pgrep -x hyprlock | head -1)
# Pick new greeting only when hyprlock restarts
if [[ -f $pid_file && -f $cache_file ]]; then
old_pid=$(cat "$pid_file")
if [[ "$old_pid" == "$current_pid" ]]; then
cat "$cache_file"
exit 0
fi
fi
greetings=(
"Hello"
"Hola"
"Bonjour"
"Hallo"
"Ciao"
"Olá"
"Привет"
""
""
""
"مرحبا"
"שלום"
""
""
"Γειά σου"
"Merhaba"
"Xin chào"
"Cześć"
"Hej"
"Ahoj"
"Szia"
"Salut"
"Привіт"
""
""
"Jambo"
"Aloha"
"Sawubona"
"Hei"
"Hallå"
"Kamusta"
"Salam"
"Selamat"
"Saluton"
"Tere"
"Sveiki"
"Labas"
"Здраво"
"Здравей"
"Bok"
"Përshëndetje"
"Բարև"
""
"Сайн уу"
""
""
""
""
"Dia dhuit"
"Halò"
"Shwmae"
"Hoi"
"Halló"
"Kaixo"
"Bon dia"
"Ola"
"Ħello"
"ਿ "
" "
""
""
""
""
""
"Bawo"
"Ndeewo"
"Sannu"
"Iska warran"
"Kia ora"
"Bula"
"Talofa"
"Mālō e lelei"
""
""
"Yá'át'ééh"
"Allinllachu"
"Mba'éichapa"
"Salve"
"Moien"
"Apa khabar"
"Сәлем"
"Assalomu alaykum"
"Slav"
""
)
inspirations=(
"Dream Big"
"Stay True"
"Be Kind"
"Work Hard"
"Keep Going"
"Be Brave"
"Love Life"
"Stay Calm"
"Think Positive"
"Be Happy"
"No Fear"
"Have Faith"
"Trust Yourself"
"Focus Now"
"Take Action"
"Never Settle"
"Rise Up"
"Shine On"
"Stand Tall"
"Live Free"
"Just Begin"
"Create Joy"
"Stay Strong"
"Breathe Deep"
"Be Bold"
"Look Ahead"
"Move Forward"
"Aim High"
"Stay Humble"
"Find Peace"
"Do Good"
"Seek Truth"
"Love More"
"Be Yourself"
"Let Go"
"Keep Smiling"
"Stay Wild"
"Think Big"
"Be Awesome"
"Start Now"
"Enjoy Today"
"Choose Joy"
"Dream On"
"Fly High"
"Stay Focused"
"Be Fearless"
"Don't Stop"
"Make Waves"
"Be Original"
"Stay Curious"
"Be grateful"
"Keep pushing"
"Stay sharp"
"Why not?"
"Be still"
"Keep cool"
"Think twice"
"Be ready"
"Stay gold"
"Game on"
"Level up"
"Code on"
"Git commit"
"Hack on"
)
cyberpunk=(
"System: ONLINE"
"Encryption: ACTIVE"
"Access: GRANTED"
"Uptime: OPTIMAL"
"Link: ESTABLISHED"
"Protocol: SECURE"
"Daemon: WATCHING"
"Netrunner: READY"
"Signal: STRONG"
"Proxy: ENGAGED"
"Root: ACCESS"
"Kernel: PANIC"
)
yojijukugo=(
""
""
""
""
""
""
""
""
)
habits=(
"Check posture"
"Drink water"
"Shoulders down"
"Eyes off screen"
"Deep breath"
"Stretch now"
"Unclench jaw"
"Touch grass"
"Blink now"
"Stand up"
)
dev=(
"It works locally"
"Sudo please"
"Flake locked"
"Compiling..."
"Git push force"
"rm -rf /"
":q! to exit"
"Works on my machine"
"Coffee needed"
"Fixing bugs"
"Hello World"
"Null Pointer"
"Segfault"
)
# Combine all arrays
combined=(
"''${greetings[@]}"
"''${inspirations[@]}"
# "''${cyberpunk[@]}"
"''${yojijukugo[@]}"
"''${habits[@]}"
"''${dev[@]}"
)
idx=$((RANDOM % ''${#combined[@]}))
greeting="''${combined[$idx]}"
echo "$current_pid" > "$pid_file"
echo "$greeting" > "$cache_file"
echo "$greeting"
'';
in {
home.packages = [
hakase-hyprlock-text-generator
];
}
-60
View File
@@ -1,60 +0,0 @@
{pkgs, ...}: let
hakase-hyprlock-typewriter = pkgs.writeShellScriptBin "hakase-hyprlock-typewriter" ''
text="$1"
if [[ -z "$text" ]]; then
echo "Usage: $(basename "$0") [text]"
exit 1
fi
state_file="''${XDG_RUNTIME_DIR:-/tmp}/typewriter_pos"
blink_file="''${XDG_RUNTIME_DIR:-/tmp}/typewriter_blink"
pid_file="''${XDG_RUNTIME_DIR:-/tmp}/typewriter_pid"
current_pid=$(pgrep -x hyprlock | head -1)
if [[ -f $pid_file ]]; then
old_pid=$(cat $pid_file)
if [[ "''${old_pid}" != "''${current_pid}" ]]; then
rm -f "$state_file" "$blink_file"
fi
fi
echo "$current_pid" >"$pid_file"
if [[ ! -f $state_file ]]; then
echo 0 >"$state_file"
fi
if [[ ! -f $blink_file ]]; then
echo 0 >"$blink_file"
fi
len=''${#text}
letter=$(cat "$state_file")
blink=$(cat "$blink_file")
if [[ $letter -lt $len ]]; then
letter=$((letter + 1))
echo "$letter" >"$state_file"
echo "''${text:0:$letter}_"
else
# Toggle every 4 calls (at 200ms update = ~800ms blink)
if (((blink / 4) % 2 == 0)); then
echo "''${text}_"
else
echo "''${text}<span alpha=\"1%\">_</span>"
fi
fi
blink=$((blink + 1))
echo "$blink" >"$blink_file"
'';
hakase-test-hyprlock-typewriter = pkgs.writeShellScriptBin "hakase-test-hyprlock-typewriter" ''
for i in {1..10}; do
hakase-hyprlock-typewriter
done
'';
in {
home.packages = [
hakase-hyprlock-typewriter
hakase-test-hyprlock-typewriter
];
}
+6 -42
View File
@@ -5,7 +5,6 @@
myConfig, myConfig,
... ...
}: let }: let
# TODO: rewrite
wallpaperDir = "${config.home.homeDirectory}/.config/nixos/assets/Wallpapers"; wallpaperDir = "${config.home.homeDirectory}/.config/nixos/assets/Wallpapers";
defaultWallpaper = "${wallpaperDir}/${myConfig.hyprland.wallpaper}"; defaultWallpaper = "${wallpaperDir}/${myConfig.hyprland.wallpaper}";
cacheWallpaper = "${config.home.homeDirectory}/.cache/current_wallpaper"; cacheWallpaper = "${config.home.homeDirectory}/.cache/current_wallpaper";
@@ -22,24 +21,13 @@
fi fi
tmp_file=$(mktemp) tmp_file=$(mktemp)
LAST_WALLPAPER_FILE="$HOME/.cache/last_wallpaper_path" target_dir="$HOME/Pictures/Wallpapers"
if [ ! -d "$target_dir" ]; then
if [ -f "$LAST_WALLPAPER_FILE" ]; then target_dir="$HOME"
last_path=$(cat "$LAST_WALLPAPER_FILE")
if [ -f "$last_path" ]; then
yazi_target="$last_path"
fi
fi
if [ -z "$yazi_target" ]; then
yazi_target="$HOME/Pictures/Wallpapers"
if [ ! -d "$yazi_target" ]; then
yazi_target="$HOME"
fi
fi fi
# Ensure we are in a terminal that supports yazi # Ensure we are in a terminal that supports yazi
${pkgs.yazi}/bin/yazi "$yazi_target" --chooser-file="$tmp_file" ${pkgs.yazi}/bin/yazi "$target_dir" --chooser-file="$tmp_file"
if [ ! -f "$tmp_file" ]; then if [ ! -f "$tmp_file" ]; then
echo "No selection file created." echo "No selection file created."
@@ -57,42 +45,18 @@
# Persistence logic # Persistence logic
CACHE_FILE="$HOME/.cache/current_wallpaper" CACHE_FILE="$HOME/.cache/current_wallpaper"
cp "$WALLPAPER" "$CACHE_FILE" cp "$WALLPAPER" "$CACHE_FILE"
echo "$WALLPAPER" > "$HOME/.cache/last_wallpaper_path"
# Reload hyprpaper # Reload hyprpaper
${pkgs.hyprland}/bin/hyprctl hyprpaper unload all ${pkgs.hyprland}/bin/hyprctl hyprpaper unload all
${pkgs.hyprland}/bin/hyprctl hyprpaper preload "$CACHE_FILE" ${pkgs.hyprland}/bin/hyprctl hyprpaper preload "$CACHE_FILE"
${pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper ",$CACHE_FILE" ${pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper ",$CACHE_FILE"
exec matugen image "$CACHE_FILE" --source-color-index 0 exec matugen image "$CACHE_FILE"
''; '';
in { in {
wayland.windowManager.hyprland.settings = {
exec-once = [
"uwsm app -- hyprpaper"
];
bindd = [
"SUPER CTRL, I, Switch Wallpaper, exec, hakase-wallpaper-switch"
];
windowrule = [
# --- WALLPAPER PICKER ---
"match:class ^(org\.hakase\.switch-wallpaper)$, float on"
"match:initial_title ^(Wallpaper Selector)$, float on"
"match:class ^(org\.hakase\.switch-wallpaper)$, center on"
"match:initial_title ^(Wallpaper Selector)$, center on"
"match:class ^(org\.hakase\.switch-wallpaper)$, size 60% 60%"
"match:initial_title ^(Wallpaper Selector)$, size 60% 60%"
"match:class ^(org\.hakase\.switch-wallpaper)$, dim_around on"
"match:initial_title ^(Wallpaper Selector)$, dim_around on"
];
};
services.hyprpaper = { services.hyprpaper = {
enable = true; enable = true;
settings = { settings = {
splash = false;
preload = [cacheWallpaper]; preload = [cacheWallpaper];
wallpaper = [ wallpaper = [
",${cacheWallpaper}" ",${cacheWallpaper}"
@@ -117,4 +81,4 @@ in {
''; '';
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";
} }
-81
View File
@@ -1,81 +0,0 @@
{pkgs, ...}: let
# Max window size (leave room for waybar/hyprbars)
maxW = 2800;
maxH = 1100;
swayimg-wrapper = pkgs.writeShellScriptBin "swayimg-wrapper" ''
if [ -z "$1" ]; then
exec ${pkgs.swayimg}/bin/swayimg
fi
# Get image dimensions
dims=$(${pkgs.file}/bin/file -b "$1" | ${pkgs.gnugrep}/bin/grep -oP '\d+ ?x ?\d+' | head -1 | tr -d ' ')
if [ -z "$dims" ]; then
# Fallback if file doesn't report dimensions
exec ${pkgs.swayimg}/bin/swayimg "$@"
fi
imgW=$(echo "$dims" | cut -dx -f1)
imgH=$(echo "$dims" | cut -dx -f2)
# Calculate scale to fit within max bounds while preserving aspect ratio
scaleW=$(echo "scale=4; ${toString maxW} / $imgW" | ${pkgs.bc}/bin/bc)
scaleH=$(echo "scale=4; ${toString maxH} / $imgH" | ${pkgs.bc}/bin/bc)
# Use the smaller scale factor
if [ $(echo "$scaleW < $scaleH" | ${pkgs.bc}/bin/bc) -eq 1 ]; then
scale=$scaleW
else
scale=$scaleH
fi
# Only scale down, not up
if [ $(echo "$scale >= 1" | ${pkgs.bc}/bin/bc) -eq 1 ]; then
exec ${pkgs.swayimg}/bin/swayimg "$@"
fi
# Calculate new size
newW=$(echo "$imgW * $scale / 1" | ${pkgs.bc}/bin/bc)
newH=$(echo "$imgH * $scale / 1" | ${pkgs.bc}/bin/bc)
exec ${pkgs.swayimg}/bin/swayimg --size="$newW,$newH" "$@"
'';
in {
home.packages = [pkgs.swayimg swayimg-wrapper];
xdg.mimeApps = {
enable = true;
defaultApplications = {
"image/png" = "swayimg-wrapper.desktop";
"image/jpeg" = "swayimg-wrapper.desktop";
"image/gif" = "swayimg-wrapper.desktop";
"image/webp" = "swayimg-wrapper.desktop";
"image/bmp" = "swayimg-wrapper.desktop";
"image/svg+xml" = "swayimg-wrapper.desktop";
"image/tiff" = "swayimg-wrapper.desktop";
};
};
xdg.desktopEntries.swayimg-wrapper = {
name = "Swayimg";
exec = "swayimg-wrapper %f";
terminal = false;
type = "Application";
mimeType = ["image/png" "image/jpeg" "image/gif" "image/webp" "image/bmp" "image/svg+xml" "image/tiff"];
};
# swayimg config
xdg.configFile."swayimg/config".text = ''
[viewer]
scale = fit
[info]
show = no
'';
wayland.windowManager.hyprland.settings.windowrule = [
# --- IMAGE VIEWER (swayimg) ---
"match:class ^(swayimg)$, float on"
"match:class ^(swayimg)$, center on"
];
}
-75
View File
@@ -1,75 +0,0 @@
{pkgs, ...}: {
services.jellyfin-mpv-shim = {
enable = true;
package = pkgs.jellyfin-mpv-shim;
mpvConfig = {
osc = false;
osd-bar = false;
load-scripts = true;
input-vo-keyboard = true;
input-default-bindings = true;
# Automatic subtitle selection logic:
# Prefer English subtitles
slang = "eng,en";
# Prefer Japanese/Non-English audio first (if that's what you usually watch)
# or just ensure English subs are picked when audio isn't English.
sub-auto = "fuzzy";
sub-visibility = "yes";
};
mpvBindings = {
"j" = "cycle sub";
"S-j" = "cycle sub rev";
"v" = "cycle sub-visibility";
};
settings = {
use_mpv_config = false;
enable_osc = false;
menu_mouse = true;
# Shim specific auto-sub logic
# "subs-fallback" is a known good setting for the shim to handle this
subtitle_color = "#FFFFFFFF";
subtitle_size = 100;
audio_output = "hdmi";
auto_play = true;
fullscreen = true;
player_name = "hakase";
remote_kbps = 100000;
local_kbps = 1000000;
};
};
# Modern OSC + Quality scripts
home.file.".config/jellyfin-mpv-shim/scripts/uosc" = {
source = "${pkgs.mpvScripts.uosc}/share/mpv/scripts/uosc";
};
home.file.".config/jellyfin-mpv-shim/scripts/thumbfast.lua" = {
source = "${pkgs.mpvScripts.thumbfast}/share/mpv/scripts/thumbfast.lua";
};
home.file.".config/jellyfin-mpv-shim/scripts/autocrop.lua" = {
source = "${pkgs.mpvScripts.autocrop}/share/mpv/scripts/autocrop.lua";
};
home.file.".config/jellyfin-mpv-shim/fonts" = {
source = "${pkgs.mpvScripts.uosc}/share/fonts";
recursive = true;
};
wayland.windowManager.hyprland.settings = {
exec-once = [ "systemctl --user start jellyfin-mpv-shim" ];
windowrule = [
# --- JELLYFIN MPV SHIM ---
"match:class ^(jellyfin-mpv-shim)$, float on"
"match:class ^(jellyfin-mpv-shim)$, center on"
"match:class ^(jellyfin-mpv-shim)$, size 70% 70%"
"match:class ^(jellyfin-mpv-shim)$, opacity 1.0 override 1.0 override"
"match:class ^(jellyfin-mpv-shim)$, idle_inhibit focus"
"match:class ^(jellyfin-mpv-shim)$, no_blur on"
];
};
}
-1
View File
@@ -1,6 +1,5 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
# FIXME: only dark mode works. use matugen
jellyfin-tui jellyfin-tui
]; ];
} }
-5
View File
@@ -1,5 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
libreoffice-fresh
];
}
-11
View File
@@ -1,11 +0,0 @@
{
pkgs,
config,
...
}: {
home.packages = with pkgs; [
libnotify
];
services.mako.enable = true;
}
-18
View File
@@ -24,10 +24,6 @@ output_path = "~/.config/starship.toml"
input_path = "~/.config/matugen/templates/walker" input_path = "~/.config/matugen/templates/walker"
output_path = "~/.config/walker/themes/nixos/style.css" output_path = "~/.config/walker/themes/nixos/style.css"
[templates.zathura]
input_path = "~/.config/matugen/templates/zathura"
output_path = "~/.config/zathura/zathura-matugen"
[templates.pywalfox] [templates.pywalfox]
input_path = '~/.config/matugen/templates/firefox' input_path = '~/.config/matugen/templates/firefox'
output_path = '~/.cache/wal/colors.json' output_path = '~/.cache/wal/colors.json'
@@ -50,17 +46,3 @@ output_path = "~/.config/gtk-4.0/colors.css"
input_path = "~/.config/matugen/templates/hyprlock" input_path = "~/.config/matugen/templates/hyprlock"
output_path = "~/.config/hypr/hyprlock-colors.conf" output_path = "~/.config/hypr/hyprlock-colors.conf"
[templates.mako]
input_path = "~/.config/matugen/templates/mako"
output_path = "~/.config/mako/config"
post_hook = "makoctl reload"
[templates.vicinae]
input_path = "~/.config/matugen/templates/vicinae"
output_path = "~/.local/share/vicinae/themes/matugen.toml"
post_hook = "vicinae theme set matugen"
[templates.theme-switch]
input_path = "~/.config/matugen/templates/theme-switch"
output_path = "~/.config/matugen/scripts/theme-switch.sh"
post_hook = "sh ~/.config/matugen/scripts/theme-switch.sh"
+5 -362
View File
@@ -1,371 +1,26 @@
{ {
pkgs, pkgs,
inputs, inputs,
myConfig,
... ...
}: { }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
inputs.matugen.packages.${pkgs.system}.default matugen
dconf
psmisc # for killall psmisc # for killall
]; ];
home.file.".config/matugen/config.toml" = { home.file.".config/matugen/config.toml" = {
source = ./config.toml; source = ./config.toml;
}; };
# Copy static templates home.file.".config/matugen/templates" = {
home.file.".config/matugen/templates/theme-switch".text = '' source = ./templates;
#!/bin/sh recursive = true;
# Generated by Matugen
# mode will be replaced by 'dark' or 'light'
MODE="{{mode}}"
if [ "$MODE" = "dark" ]; then
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
else
${pkgs.dconf}/bin/dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'"
fi
'';
home.file.".config/matugen/templates/cava".source = ./templates/cava;
home.file.".config/matugen/templates/firefox".source = ./templates/firefox;
home.file.".config/matugen/templates/ghostty".source = ./templates/ghostty;
home.file.".config/matugen/templates/gtk3".source = ./templates/gtk3;
home.file.".config/matugen/templates/gtk4".source = ./templates/gtk4;
home.file.".config/matugen/templates/hyprland".source = ./templates/hyprland;
home.file.".config/matugen/templates/hyprlock".source = ./templates/hyprlock;
home.file.".config/matugen/templates/starship".source = ./templates/starship;
home.file.".config/matugen/templates/waybar".source = ./templates/waybar;
home.file.".config/matugen/templates/zathura".source = ./templates/zathura;
home.file.".config/matugen/templates/vicinae".text = ''
# Vicinae Matugen Theme Template
[meta]
name = "Matugen"
description = "Material You theme generated by Matugen - {{mode}} variant"
variant = "{{mode}}"
# ============================================================================
# Typography
# ============================================================================
[typography]
font_family = "${myConfig.font.monospace}"
# ============================================================================
# Core Colors
# ============================================================================
[colors.core]
accent = "{{colors.primary.default.hex}}"
accent_foreground = "{{colors.on_primary.default.hex}}"
background = "{{colors.surface.default.hex}}"
foreground = "{{colors.on_surface.default.hex}}"
secondary_background = "{{colors.surface_container.default.hex}}"
border = "{{colors.outline_variant.default.hex}}"
# ============================================================================
# Window Borders
# ============================================================================
[colors.main_window]
border = "{{colors.outline_variant.default.hex}}"
[colors.settings_window]
border = "{{colors.outline.default.hex}}"
# ============================================================================
# Accent Palette
# ============================================================================
[colors.accents]
blue = "{{colors.primary.default.hex}}"
green = "{{colors.tertiary.default.hex}}"
magenta = "{{colors.secondary.default.hex}}"
orange = { name = "{{colors.error.default.hex}}", lighter = 40 }
red = "{{colors.error.default.hex}}"
yellow = { name = "{{colors.tertiary.default.hex}}", lighter = 80 }
cyan = { name = "{{colors.primary.default.hex}}", lighter = 50 }
purple = "{{colors.secondary.default.hex}}"
# ============================================================================
# Text System
# ============================================================================
[colors.text]
default = "{{colors.on_surface.default.hex}}"
muted = "{{colors.on_surface_variant.default.hex}}"
danger = "{{colors.error.default.hex}}"
success = "{{colors.tertiary.default.hex}}"
placeholder = { name = "{{colors.on_surface_variant.default.hex}}", opacity = 0.6 }
[colors.text.selection]
background = "{{colors.primary.default.hex}}"
foreground = "{{colors.on_primary.default.hex}}"
[colors.text.links]
default = "{{colors.primary.default.hex}}"
visited = { name = "{{colors.tertiary.default.hex}}", darker = 20 }
# ============================================================================
# Input Fields
# ============================================================================
[colors.input]
border = "{{colors.outline.default.hex}}"
border_focus = "{{colors.primary.default.hex}}"
border_error = "{{colors.error.default.hex}}"
# ============================================================================
# Buttons
# ============================================================================
[colors.button.primary]
background = "{{colors.surface_container_high.default.hex}}"
foreground = "{{colors.on_surface.default.hex}}"
[colors.button.primary.hover]
background = "{{colors.surface_container_highest.default.hex}}"
[colors.button.primary.focus]
outline = "{{colors.primary.default.hex}}"
# ============================================================================
# Lists
# ============================================================================
[colors.list.item.hover]
background = { name = "{{colors.primary_container.default.hex}}", opacity = 0.25 }
foreground = "{{colors.on_surface.default.hex}}"
[colors.list.item.selection]
background = { name = "{{colors.primary_container.default.hex}}", opacity = 0.50 }
foreground = "{{colors.on_primary_container.default.hex}}"
secondary_background = "{{colors.primary_container.default.hex}}"
secondary_foreground = "{{colors.on_primary_container.default.hex}}"
# ============================================================================
# Grid Items
# ============================================================================
[colors.grid.item]
background = "{{colors.surface_container.default.hex}}"
[colors.grid.item.hover]
outline = { name = "{{colors.secondary.default.hex}}", opacity = 0.8 }
[colors.grid.item.selection]
outline = { name = "{{colors.primary.default.hex}}" }
# ============================================================================
# Scrollbars
# ============================================================================
[colors.scrollbars]
background = { name = "{{colors.primary.default.hex}}", opacity = 0.2 }
# ============================================================================
# Loading States
# ============================================================================
[colors.loading]
bar = "{{colors.primary.default.hex}}"
spinner = "{{colors.primary.default.hex}}"
'';
# Generate templates with font interpolation
home.file.".config/matugen/templates/walker".text = ''
/* @import "../../../../../../../.config/omarchy/current/theme/walker.css"; */
/* Define Matugen Colors */
@define-color text {{colors.on_surface.default.hex}};
@define-color base {{colors.surface_container.default.hex}};
@define-color border {{colors.primary.default.hex}};
@define-color selected_text {{colors.primary.default.hex}};
@define-color background {{colors.surface.default.hex}};
* {
all: unset;
}
* {
font-family: ${myConfig.font.monospace};
font-size: 18px;
color: @text;
}
scrollbar {
opacity: 0;
}
.normal-icons {
-gtk-icon-size: 16px;
}
.large-icons {
-gtk-icon-size: 32px;
}
.box-wrapper {
background: alpha(@base, 0.95);
padding: 20px;
border: 2px solid @border;
}
.preview-box {
}
.box {
}
.search-container {
background: @base;
padding: 10px;
}
.input placeholder {
opacity: 0.5;
}
.input {
}
.input:focus,
.input:active {
box-shadow: none;
outline: none;
}
.content-container {
}
.placeholder {
}
.scroll {
}
.list {
}
child,
child > * {
}
child:hover .item-box {
}
child:selected .item-box {
}
child:selected .item-box * {
color: @selected_text;
}
.item-box {
padding-left: 14px;
}
.item-text-box {
all: unset;
padding: 14px 0;
}
.item-text {
}
.item-subtext {
font-size: 0px;
min-height: 0px;
margin: 0px;
padding: 0px;
}
.item-image {
margin-right: 14px;
-gtk-icon-transform: scale(0.9);
}
.current {
font-style: italic;
}
.keybind-hints {
background: @background;
padding: 10px;
margin-top: 10px;
}
.preview {
}
'';
home.file.".config/matugen/templates/mako".text = ''
# Mako notification daemon configuration
# Generated by matugen
# Appearance
font=${myConfig.font.sans} 11
width=350
height=150
margin=10
padding=15
border-size=2
border-radius=8
# Behavior
default-timeout=5000
ignore-timeout=false
layer=overlay
anchor=top-right
# Interaction
markup=true
actions=true
# Grouping
group-by=app-name
max-visible=5
sort=-time
# Theme colors from matugen
background-color=#{{colors.surface_container_high.default.hex_stripped}}
text-color=#{{colors.on_surface.default.hex_stripped}}
border-color=#{{colors.primary.default.hex_stripped}}
progress-color=over #{{colors.primary_container.default.hex_stripped}}
[urgency=low]
border-color=#{{colors.tertiary.default.hex_stripped}}
[urgency=normal]
border-color=#{{colors.primary.default.hex_stripped}}
[urgency=high]
border-color=#{{colors.error.default.hex_stripped}}
default-timeout=0
'';
# Qt theming - follow GTK theme
qt = {
enable = true;
platformTheme.name = "gtk";
};
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme =
if myConfig.theme.mode == "dark"
then "prefer-dark"
else "prefer-light";
};
}; };
# GTK theming with adw-gtk3 and Matugen colors # GTK theming with adw-gtk3 and Matugen colors
gtk = { gtk = {
enable = true; enable = true;
theme = { theme = {
name = "adw-gtk3"; name = "adw-gtk3-dark";
package = pkgs.adw-gtk3; package = pkgs.adw-gtk3;
}; };
iconTheme = { iconTheme = {
@@ -373,19 +28,7 @@
package = pkgs.papirus-icon-theme; package = pkgs.papirus-icon-theme;
}; };
gtk3.extraCss = ''@import url("colors.css");''; gtk3.extraCss = ''@import url("colors.css");'';
gtk3.extraConfig = {
gtk-application-prefer-dark-theme =
if myConfig.theme.mode == "dark"
then 1
else 0;
};
gtk4.extraCss = ''@import url("colors.css");''; gtk4.extraCss = ''@import url("colors.css");'';
gtk4.extraConfig = {
gtk-application-prefer-dark-theme =
if myConfig.theme.mode == "dark"
then 1
else 0;
};
}; };
programs.ghostty.settings.theme = "matugen"; programs.ghostty.settings.theme = "matugen";
-16
View File
@@ -76,19 +76,3 @@
@define-color dark_3 {{colors.surface_container.default.hex}}; @define-color dark_3 {{colors.surface_container.default.hex}};
@define-color dark_4 {{colors.surface_container_high.default.hex}}; @define-color dark_4 {{colors.surface_container_high.default.hex}};
@define-color dark_5 {{colors.surface_container_highest.default.hex}}; @define-color dark_5 {{colors.surface_container_highest.default.hex}};
/* Sidebar Fixes */
.sidebar, .navigation-sidebar {
background-color: @view_bg_color;
color: @view_fg_color;
}
.sidebar list, .navigation-sidebar list {
background-color: transparent;
color: @view_fg_color;
}
filechooser .sidebar {
background-color: @view_bg_color;
color: @view_fg_color;
}
-16
View File
@@ -76,19 +76,3 @@
@define-color dark_3 {{colors.surface_container.default.hex}}; @define-color dark_3 {{colors.surface_container.default.hex}};
@define-color dark_4 {{colors.surface_container_high.default.hex}}; @define-color dark_4 {{colors.surface_container_high.default.hex}};
@define-color dark_5 {{colors.surface_container_highest.default.hex}}; @define-color dark_5 {{colors.surface_container_highest.default.hex}};
/* Sidebar Fixes */
.sidebar, .navigation-sidebar {
background-color: @view_bg_color;
color: @view_fg_color;
}
.sidebar list, .navigation-sidebar list {
background-color: transparent;
color: @view_fg_color;
}
filechooser .sidebar {
background-color: @view_bg_color;
color: @view_fg_color;
}
-42
View File
@@ -1,42 +0,0 @@
# Mako notification daemon configuration
# Generated by matugen
# Appearance
font=Sans 11
width=350
height=150
margin=10
padding=15
border-size=2
border-radius=8
# Behavior
default-timeout=5000
ignore-timeout=false
layer=overlay
anchor=top-right
# Interaction
markup=true
actions=true
# Grouping
group-by=app-name
max-visible=5
sort=-time
# Theme colors from matugen
background-color=#{{colors.surface_container_high.default.hex_stripped}}
text-color=#{{colors.on_surface.default.hex_stripped}}
border-color=#{{colors.primary.default.hex_stripped}}
progress-color=over #{{colors.primary_container.default.hex_stripped}}
[urgency=low]
border-color=#{{colors.tertiary.default.hex_stripped}}
[urgency=normal]
border-color=#{{colors.primary.default.hex_stripped}}
[urgency=high]
border-color=#{{colors.error.default.hex_stripped}}
default-timeout=0
-41
View File
@@ -1,41 +0,0 @@
set default-bg "#{{colors.surface.default.hex_stripped}}"
set default-fg "#{{colors.on_surface.default.hex_stripped}}"
set statusbar-bg "#{{colors.surface.default.hex_stripped}}"
set statusbar-fg "#{{colors.on_surface.default.hex_stripped}}"
set inputbar-bg "#{{colors.surface.default.hex_stripped}}"
set inputbar-fg "#{{colors.on_surface.default.hex_stripped}}"
set notification-bg "#{{colors.surface.default.hex_stripped}}"
set notification-fg "#{{colors.on_surface.default.hex_stripped}}"
set notification-error-bg "#{{colors.error.default.hex_stripped}}"
set notification-error-fg "#{{colors.on_error.default.hex_stripped}}"
set notification-warning-bg "#{{colors.tertiary.default.hex_stripped}}"
set notification-warning-fg "#{{colors.on_tertiary.default.hex_stripped}}"
set highlight-color "#{{colors.tertiary.default.hex_stripped}}"
set highlight-active-color "#{{colors.secondary.default.hex_stripped}}"
set completion-bg "#{{colors.surface.default.hex_stripped}}"
set completion-fg "#{{colors.on_surface.default.hex_stripped}}"
set completion-group-bg "#{{colors.surface.default.hex_stripped}}"
set completion-group-fg "#{{colors.on_surface.default.hex_stripped}}"
set completion-highlight-bg "#{{colors.on_surface.default.hex_stripped}}"
set completion-highlight-fg "#{{colors.surface.default.hex_stripped}}"
set index-bg "#{{colors.surface.default.hex_stripped}}"
set index-fg "#{{colors.on_surface.default.hex_stripped}}"
set index-active-bg "#{{colors.surface_container.default.hex_stripped}}"
set index-active-fg "#{{colors.on_surface.default.hex_stripped}}"
set render-loading-bg "#{{colors.surface.default.hex_stripped}}"
set render-loading-fg "#{{colors.on_surface.default.hex_stripped}}"
set recolor-lightcolor "#{{colors.surface.default.hex_stripped}}"
set recolor-darkcolor "#{{colors.on_surface.default.hex_stripped}}"
-39
View File
@@ -1,39 +0,0 @@
{pkgs, ...}: {
programs.mpv = {
enable = true;
scripts = with pkgs.mpvScripts; [
uosc
thumbfast
];
config = {
# uosc provides its own UI
osc = "no";
osd-bar = "no";
border = "no";
# Subtitle preferences - prefer full subtitles over forced
# slang = "eng,en,enm"; # English subtitle preference order
# subs-fallback = "default"; # Use default if preferred not found
# sub-forced-events-only = "no"; # Don't limit to forced subtitle events
};
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"video/mp4" = "mpv.desktop";
"video/mkv" = "mpv.desktop";
"video/webm" = "mpv.desktop";
"video/avi" = "mpv.desktop";
"video/x-matroska" = "mpv.desktop";
"video/quicktime" = "mpv.desktop";
};
};
wayland.windowManager.hyprland.settings.windowrule = [
# --- VIDEO PLAYER (mpv) ---
"match:class ^(mpv)$, float on"
"match:class ^(mpv)$, center on"
"match:class ^(mpv)$, size 60% 70%"
];
}
-1
View File
@@ -5,7 +5,6 @@
... ...
}: { }: {
home.packages = [ home.packages = [
# FIXME: does not dynamically update with matugen when open
inputs.nixovim.packages.${pkgs.system}.full inputs.nixovim.packages.${pkgs.system}.full
]; ];
} }
-9
View File
@@ -1,9 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
nextcloud-client
];
wayland.windowManager.hyprland.settings.exec-once = [
"uwsm app -- nextcloud --background"
];
}
-13
View File
@@ -1,13 +0,0 @@
{pkgs, ...}: {
home.packages = [
pkgs.playerctl
];
wayland.windowManager.hyprland.settings = {
bindl = [
", XF86AudioPlay, exec, playerctl play-pause && notify-send -u low -t 1000 \"Media\" \"$(playerctl status)\""
", XF86AudioPrev, exec, playerctl previous && notify-send -u low -t 1000 \"Previous Track\" \"$(playerctl metadata title)\""
", XF86AudioNext, exec, playerctl next && notify-send -u low -t 1000 \"Next Track\" \"$(playerctl metadata title)\""
];
};
}
-17
View File
@@ -1,17 +0,0 @@
{ pkgs }:
pkgs.stdenv.mkDerivation {
pname = "hakase-plymouth-theme";
version = "1.0";
src = ./themes/hakase;
installPhase = ''
mkdir -p $out/share/plymouth/themes/hakase
cp * $out/share/plymouth/themes/hakase/
# Patch the .plymouth file to point to the store path
sed -i "s@ImageDir=.*@ImageDir=$out/share/plymouth/themes/hakase@" $out/share/plymouth/themes/hakase/hakase.plymouth
sed -i "s@ScriptFile=.*@ScriptFile=$out/share/plymouth/themes/hakase/hakase.script@" $out/share/plymouth/themes/hakase/hakase.plymouth
'';
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

@@ -1,11 +0,0 @@
[Plymouth Theme]
Name=Omarchy
Description=Omarchy splash screen.
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/omarchy
ScriptFile=/usr/share/plymouth/themes/omarchy/omarchy.script
ConsoleLogBackgroundColor=0x1a1b26
MonospaceFont=Cantarell 11
Font=Cantarell 11
-257
View File
@@ -1,257 +0,0 @@
# Omarchy Plymouth Theme Script
Window.SetBackgroundTopColor(0.176, 0.067, 0.165);
Window.SetBackgroundBottomColor(0.176, 0.067, 0.165);
logo.image = Image("logo.png");
logo.sprite = Sprite(logo.image);
logo.sprite.SetX (Window.GetWidth() / 2 - logo.image.GetWidth() / 2);
logo.sprite.SetY (Window.GetHeight() / 2 - logo.image.GetHeight() / 2);
logo.sprite.SetOpacity (1);
# Use these to adjust the progress bar timing
global.fake_progress_limit = 0.7; # Target percentage for fake progress (0.0 to 1.0)
global.fake_progress_duration = 15.0; # Duration in seconds to reach limit
# Progress bar animation variables
global.fake_progress = 0.0;
global.real_progress = 0.0;
global.fake_progress_active = 0; # 0 / 1 boolean
global.animation_frame = 0;
global.fake_progress_start_time = 0; # Track when fake progress started
global.password_shown = 0; # Track if password dialog has been shown
global.max_progress = 0.0; # Track the maximum progress reached to prevent backwards movement
fun refresh_callback ()
{
global.animation_frame++;
# Animate fake progress to limit over time with easing
if (global.fake_progress_active == 1)
{
# Calculate elapsed time since start
elapsed_time = global.animation_frame / 50.0; # Convert frames to seconds (50 FPS)
# Calculate linear progress ratio (0 to 1) based on time
time_ratio = elapsed_time / global.fake_progress_duration;
if (time_ratio > 1.0)
time_ratio = 1.0;
# Apply easing curve: ease-out quadratic
# Formula: 1 - (1 - x)^2
eased_ratio = 1 - ((1 - time_ratio) * (1 - time_ratio));
# Calculate fake progress based on eased ratio
global.fake_progress = eased_ratio * global.fake_progress_limit;
# Update progress bar with fake progress
update_progress_bar(global.fake_progress);
}
}
Plymouth.SetRefreshFunction (refresh_callback);
#----------------------------------------- Helper Functions --------------------------------
fun update_progress_bar(progress)
{
# Only update if progress is moving forward
if (progress > global.max_progress)
{
global.max_progress = progress;
width = Math.Int(progress_bar.original_image.GetWidth() * progress);
if (width < 1) width = 1; # Ensure minimum width of 1 pixel
progress_bar.image = progress_bar.original_image.Scale(width, progress_bar.original_image.GetHeight());
progress_bar.sprite.SetImage(progress_bar.image);
}
}
fun show_progress_bar()
{
progress_box.sprite.SetOpacity(1);
progress_bar.sprite.SetOpacity(1);
}
fun hide_progress_bar()
{
progress_box.sprite.SetOpacity(0);
progress_bar.sprite.SetOpacity(0);
}
fun show_password_dialog()
{
lock.sprite.SetOpacity(1);
entry.sprite.SetOpacity(1);
}
fun hide_password_dialog()
{
lock.sprite.SetOpacity(0);
entry.sprite.SetOpacity(0);
for (index = 0; bullet.sprites[index]; index++)
bullet.sprites[index].SetOpacity(0);
}
fun start_fake_progress()
{
# Don't reset if we already have progress
if (global.max_progress == 0.0)
{
global.fake_progress = 0.0;
global.real_progress = 0.0;
update_progress_bar(0.0);
}
global.fake_progress_active = 1;
global.animation_frame = 0;
}
fun stop_fake_progress()
{
global.fake_progress_active = 0;
}
#----------------------------------------- Dialogue --------------------------------
lock.image = Image("lock.png");
entry.image = Image("entry.png");
bullet.image = Image("bullet.png");
entry.sprite = Sprite(entry.image);
entry.x = Window.GetWidth()/2 - entry.image.GetWidth() / 2;
entry.y = logo.sprite.GetY() + logo.image.GetHeight() + 40;
entry.sprite.SetPosition(entry.x, entry.y, 10001);
entry.sprite.SetOpacity(0);
# Scale lock to be slightly shorter than entry field height
# Original lock is 84x96, entry height determines scale
lock_height = entry.image.GetHeight() * 0.8;
lock_scale = lock_height / 96;
lock_width = 84 * lock_scale;
scaled_lock = lock.image.Scale(lock_width, lock_height);
lock.sprite = Sprite(scaled_lock);
lock.x = entry.x - lock_width - 15;
lock.y = entry.y + entry.image.GetHeight()/2 - lock_height/2;
lock.sprite.SetPosition(lock.x, lock.y, 10001);
lock.sprite.SetOpacity(0);
# Bullet array
bullet.sprites = [];
fun display_normal_callback ()
{
hide_password_dialog();
# Get current mode
mode = Plymouth.GetMode();
# Only show progress bar for boot and resume modes
if ((mode == "boot" || mode == "resume") && global.password_shown == 1)
{
show_progress_bar();
start_fake_progress();
}
}
fun display_password_callback (prompt, bullets)
{
global.password_shown = 1; # Mark that password dialog has been shown
# Reset progress when password dialog appears
stop_fake_progress();
hide_progress_bar();
global.max_progress = 0.0;
global.fake_progress = 0.0;
global.real_progress = 0.0;
show_password_dialog();
# Clear all bullets first
for (index = 0; bullet.sprites[index]; index++)
bullet.sprites[index].SetOpacity(0);
# Create and show bullets for current password (max 21)
max_bullets = 21;
bullets_to_show = bullets;
if (bullets_to_show > max_bullets)
bullets_to_show = max_bullets;
for (index = 0; index < bullets_to_show; index++)
{
if (!bullet.sprites[index])
{
# Scale bullet image to 7x7 pixels
scaled_bullet = bullet.image.Scale(7, 7);
bullet.sprites[index] = Sprite(scaled_bullet);
bullet.x = entry.x + 20 + index * (7 + 5);
bullet.y = entry.y + entry.image.GetHeight() / 2 - 3.5;
bullet.sprites[index].SetPosition(bullet.x, bullet.y, 10002);
}
bullet.sprites[index].SetOpacity(1);
}
}
Plymouth.SetDisplayNormalFunction(display_normal_callback);
Plymouth.SetDisplayPasswordFunction(display_password_callback);
#----------------------------------------- Progress Bar --------------------------------
progress_box.image = Image("progress_box.png");
progress_box.sprite = Sprite(progress_box.image);
progress_box.x = Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2;
progress_box.y = entry.y + entry.image.GetHeight() / 2 - progress_box.image.GetHeight() / 2;
progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0);
progress_box.sprite.SetOpacity(0);
progress_bar.original_image = Image("progress_bar.png");
progress_bar.sprite = Sprite();
progress_bar.image = progress_bar.original_image.Scale(1, progress_bar.original_image.GetHeight());
progress_bar.x = Window.GetWidth() / 2 - progress_bar.original_image.GetWidth() / 2;
progress_bar.y = progress_box.y + (progress_box.image.GetHeight() - progress_bar.original_image.GetHeight()) / 2;
progress_bar.sprite.SetPosition(progress_bar.x, progress_bar.y, 1);
progress_bar.sprite.SetOpacity(0);
fun progress_callback (duration, progress)
{
global.real_progress = progress;
# If real progress is above limit, stop fake progress and use real progress
if (progress > global.fake_progress_limit)
{
stop_fake_progress();
update_progress_bar(progress);
}
}
Plymouth.SetBootProgressFunction(progress_callback);
#----------------------------------------- Quit --------------------------------
fun quit_callback ()
{
logo.sprite.SetOpacity (1);
}
Plymouth.SetQuitFunction(quit_callback);
#----------------------------------------- Message --------------------------------
message_sprite = Sprite();
message_sprite.SetPosition(10, 10, 10000);
fun display_message_callback (text)
{
my_image = Image.Text(text, 1, 1, 1);
message_sprite.SetImage(my_image);
}
fun hide_message_callback (text)
{
message_sprite.SetOpacity(0);
}
Plymouth.SetDisplayMessageFunction (display_message_callback);
Plymouth.SetHideMessageFunction (hide_message_callback);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

-4
View File
@@ -1,4 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [via];
services.udev.packages = with pkgs; [via];
}
-77
View File
@@ -1,77 +0,0 @@
{pkgs, myConfig, ...}: let
# Screenshot script with swappy integration
screenshot = pkgs.writeShellScriptBin "screenshot" ''
#!/usr/bin/env bash
case "$1" in
region)
# Select region and edit
grim -g "$(slurp)" - | swappy -f -
;;
window)
# Screenshot active window
grim -g "$(hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')" - | swappy -f -
;;
screen)
# Screenshot current monitor
grim -o "$(hyprctl -j monitors | jq -r '.[] | select(.focused) | .name')" - | swappy -f -
;;
all)
# Screenshot all monitors
grim - | swappy -f -
;;
region-save)
# Quick region screenshot (save without editing and copy to clipboard)
filepath=~/Pictures/Screenshots/$(date +'%Y-%m-%d_%H-%M-%S.png')
grim -g "$(slurp)" "$filepath"
wl-copy < "$filepath"
notify-send "Screenshot saved" "Saved and copied to clipboard"
;;
ocr)
# OCR Selection
grim -g "$(slurp)" - | tesseract stdin stdout | wl-copy
notify-send "OCR" "Text extracted to clipboard"
;;
*)
echo "Usage: screenshot {region|window|screen|all|region-save|ocr}"
exit 1
;;
esac
'';
in {
home.packages = with pkgs; [
grim # Screenshot utility
slurp # Region selector
swappy # Annotation tool
jq # For window selection
wl-clipboard # For copying to clipboard
tesseract # OCR tool
screenshot # Our wrapper script
];
# Create Screenshots directory
home.file."Pictures/Screenshots/.keep".text = "";
# Swappy configuration
home.file.".config/swappy/config".text = ''
[Default]
save_dir=$HOME/Pictures/Screenshots
save_filename_format=screenshot_%Y%m%d_%H%M%S.png
show_panel=true
line_size=5
text_size=20
text_font=${myConfig.font.sans}
paint_mode=brush
early_exit=false
fill_shape=false
'';
wayland.windowManager.hyprland.settings.bindd = [
# Screenshots
"SUPER, S, Screenshot Region (with edit), exec, screenshot region"
"SUPER SHIFT, S, Screenshot Active Window, exec, screenshot window"
"SUPER ALT, S, Quick Screenshot (no edit), exec, screenshot region-save"
"SUPER ALT SHIFT, S, Screenshot Current Monitor, exec, screenshot screen"
"SUPER ALT, E, OCR Selection, exec, screenshot ocr"
];
}
-33
View File
@@ -1,33 +0,0 @@
{
pkgs,
lib,
...
}: {
services.swayosd.enable = true;
# Auto-restart swayosd on crash
systemd.user.services.swayosd = {
Unit = {
StartLimitBurst = lib.mkForce 5;
StartLimitIntervalSec = lib.mkForce 30;
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Restart = lib.mkForce "on-failure";
RestartSec = lib.mkForce "1s";
};
Install.WantedBy = [ "graphical-session.target" ];
};
wayland.windowManager.hyprland.settings = {
bindel = [
", XF86AudioRaiseVolume, exec, swayosd-client --output-volume raise"
", XF86AudioLowerVolume, exec, swayosd-client --output-volume lower"
];
bindl = [
", XF86AudioMute, exec, swayosd-client --output-volume mute-toggle"
", Caps_Lock, exec, sleep 0.1 && swayosd-client --caps-lock"
];
};
}
-5
View File
@@ -1,5 +0,0 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
ttyper
];
}
-86
View File
@@ -1,86 +0,0 @@
{
pkgs,
inputs,
...
}: let
vicinae-toggle = pkgs.writeShellScriptBin "vicinae-toggle" ''
VICINAE_BIN="${inputs.vicinae.packages.${pkgs.system}.default}/bin/vicinae"
ARGS=("$@")
if [ ''${#ARGS[@]} -eq 0 ]; then
ARGS=("toggle")
fi
if ! "$VICINAE_BIN" "''${ARGS[@]}" 2>/dev/null; then
${pkgs.systemd}/bin/systemctl --user restart vicinae || "$VICINAE_BIN" server &
sleep 0.4
exec "$VICINAE_BIN" "''${ARGS[@]}"
fi
'';
in {
services.vicinae = {
enable = true;
systemd = {
enable = true;
autoStart = true;
environment = {
USE_LAYER_SHELL = 1;
};
};
settings = {
# Escape closes window (vim-like :q behavior)
escape_key_behavior = "close_window";
pop_to_root_on_close = true;
close_on_unfocus = true;
keybinds = {
# UI shortcuts
"open-search-filter" = "control+/"; # vim search
"open-settings" = "control+,";
"toggle-action-panel" = "control+B";
# Vim-like action keybinds
"action.move-up" = "control+shift+K";
"action.move-down" = "control+shift+J";
"action.copy" = "control+Y"; # yank
"action.copy-name" = "control+shift+Y";
"action.remove" = "control+D"; # delete
"action.dangerous-remove" = "control+shift+D";
"action.edit" = "control+E";
"action.open" = "control+O";
"action.refresh" = "control+R";
"action.pin" = "control+P";
"action.new" = "control+N";
"action.save" = "control+S";
};
theme = {
light = {
name = "matugen";
icon_theme = "Papirus-Dark";
};
dark = {
name = "matugen";
icon_theme = "Papirus-Dark";
};
};
};
};
# Ensure vicinae themes directory exists for matugen output
home.file.".local/share/vicinae/themes/.keep".text = "";
home.packages = [vicinae-toggle];
wayland.windowManager.hyprland.settings = {
exec-once = [
"vicinae server"
];
bindd = [
"SUPER, SPACE, Open Vicinae, exec, vicinae-toggle"
"SUPER, period, Open Emoji Picker, exec, vicinae-toggle deeplink vicinae://launch/core/search-emojis"
"SUPER, C, Open Calculator, exec, vicinae-toggle deeplink vicinae://launch/calculator/history"
"SUPER, V, Open Clipboard History, exec, vicinae-toggle deeplink vicinae://launch/clipboard/history"
];
};
}
-6
View File
@@ -4,12 +4,6 @@
pkgs, pkgs,
... ...
}: { }: {
wayland.windowManager.hyprland.settings = {
exec-once = [
"uwsm app -- elephant"
"walker --gapplication-service"
];
};
imports = [ imports = [
# ./style.nix # ./style.nix
./layout.nix ./layout.nix
+149 -110
View File
@@ -4,82 +4,143 @@
myConfig, myConfig,
... ...
}: let }: let
# FIXME: waybar overlaps fullscreen display when restarting waybar # --- POPUP SCRIPTS ---
hakase-popup-launch = pkgs.writeShellScriptBin "hakase-popup-launch" '' hakase-launch-or-focus = pkgs.writeShellScriptBin "hakase-launch-or-focus" ''
tui_name=$1 if (($# == 0)); then
active_popup=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r '.[] | select(.class | startswith("org.hakase.")) | .class') echo "Usage: hakase-launch-or-focus [window-pattern] [launch-command]"
exit 1
fi
if [[ -z "''${tui_name}" ]]; then WINDOW_PATTERN="$1"
echo "Usage: $(basename "$0") [tui-name]" # Escaped Nix interpolation for shell default value logic
exit 1 LAUNCH_COMMAND="''${2:- \"uwsm-app -- $WINDOW_PATTERN\"}"
fi
popup_checker() { # Locate window address via hyprctl and jq
if [[ -z "$active_popup" ]]; then WINDOW_ADDRESS=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r --arg p "$WINDOW_PATTERN"
echo "no_popup" '.[] | select((.class | test("\\b" + $p + "\\b"; "i")) or (.title | test("\\b" + $p + "\\b"; "i"))) | .address' | head -n1)
elif [[ "$active_popup" != "org.hakase.popup.''${tui_name}" ]]; then
echo "different" if [[ -n $WINDOW_ADDRESS ]]; then
else # If found, focus the existing window
echo "same" ${pkgs.hyprland}/bin/hyprctl dispatch focuswindow "address:$WINDOW_ADDRESS"
else
# If not found, execute the launch command
eval exec setsid $LAUNCH_COMMAND
fi
'';
hakase-launch-tui = pkgs.writeShellScriptBin "hakase-launch-tui" ''
APP_NAME=$(basename "$1")
# Using org.hakase prefix so the focus script can find it via class name
exec setsid uwsm-app -- xdg-terminal-exec --app-id=org.hakase."$APP_NAME" -e "$@"
'';
hakase-focus-wrapper = pkgs.writeShellScriptBin "hakase-focus-wrapper" ''
APP_NAME=$(basename "$1")
WINDOW_PATTERN="org.hakase.$APP_NAME"
LAUNCH_CMD="hakase-launch-tui $*"
exec hakase-launch-or-focus "$WINDOW_PATTERN" "$LAUNCH_CMD"
'';
hakase-launch-wifi = pkgs.writeShellScriptBin "hakase-launch-wifi" ''
# Use the focus wrapper to launch or switch to Impala
exec hakase-focus-wrapper impala
'';
hakase-launch-bluetooth = pkgs.writeShellScriptBin "hakase-launch-bluetooth" ''
exec hakase-focus-wrapper bluetui
'';
hakase-launch-popup = pkgs.writeShellScriptBin "hakase-launch-popup" ''
if (($# < 3)); then
echo "Usage: hakase-launch-popup [width] [height] [command...]"
exit 1
fi
# --- ARGS & CONFIG ---
WIN_WIDTH="$1"
WIN_HEIGHT="$2"
shift 2
MARGIN=10
BAR_HEIGHT=40
# ---------------------
CMD_NAME=$(basename "$1")
TARGET_CLASS="org.hakase.popup.$CMD_NAME"
# 1. SINGLETON LOGIC: Check for ANY existing hakase popup
EXISTING_JSON=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r '.[] | select(.class | startswith("org.hakase.popup."))')
if [[ -n "$EXISTING_JSON" ]]; then
OLD_ADDR=$(echo "$EXISTING_JSON" | ${pkgs.jq}/bin/jq -r '.address')
OLD_CLASS=$(echo "$EXISTING_JSON" | ${pkgs.jq}/bin/jq -r '.class')
# Close the existing popup
${pkgs.hyprland}/bin/hyprctl dispatch closewindow "address:$OLD_ADDR"
if [[ "$OLD_CLASS" == "$TARGET_CLASS" ]]; then
exit 0
fi
sleep 0.15
fi
# 2. Calculate Geometry
MONITOR_INFO=$(${pkgs.hyprland}/bin/hyprctl monitors -j | ${pkgs.jq}/bin/jq '.[] | select(.focused == true)')
MON_X=$(echo "$MONITOR_INFO" | ${pkgs.jq}/bin/jq '.x')
MON_Y=$(echo "$MONITOR_INFO" | ${pkgs.jq}/bin/jq '.y')
MON_WIDTH=$(echo "$MONITOR_INFO" | ${pkgs.jq}/bin/jq '.width')
TARGET_X=$((MON_X + MON_WIDTH - WIN_WIDTH - MARGIN))
TARGET_Y=$((MON_Y + BAR_HEIGHT + MARGIN))
# 3. Launch with Rules
RULE="[float;pin;size $WIN_WIDTH $WIN_HEIGHT;move $TARGET_X $TARGET_Y]"
${pkgs.hyprland}/bin/hyprctl dispatch exec "$RULE xdg-terminal-exec --app-id=$TARGET_CLASS -e $@"
# 4. Background Listener (Close on Blur)
(
TIMEOUT=0
WINDOW_ADDR=""
while [[ -z "$WINDOW_ADDR" && $TIMEOUT -lt 20 ]]; do
sleep 0.1
WINDOW_ADDR=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r --arg c "$TARGET_CLASS" '.[] | select(.class == $c) | .address')
((TIMEOUT++))
done
if [[ -n "$WINDOW_ADDR" ]]; then
${pkgs.socat}/bin/socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do
if [[ "$line" == "activewindow>>"* ]]; then
NEW_FOCUS="0x$(echo "$line" | cut -d '>' -f3 | cut -d ',' -f1)"
if [[ "$WINDOW_ADDR" != "$NEW_FOCUS" ]]; then
${pkgs.hyprland}/bin/hyprctl dispatch closewindow "address:$WINDOW_ADDR"
break
fi
fi fi
} done
launch() { fi
exec ${pkgs.util-linux}/bin/setsid uwsm-app -- xdg-terminal-exec --app-id=org.hakase.popup."''${tui_name}" -e "''${tui_name}" ) &
}
focus() { exit 0
exec ${pkgs.hyprland}/bin/hyprctl dispatch focuswindow "class:org.hakase.popup.''${tui_name}" '';
}
replace() { hakase-popup-wifi = pkgs.writeShellScriptBin "hakase-popup-wifi" ''
${pkgs.hyprland}/bin/hyprctl dispatch closewindow "class:''${active_popup}" exec hakase-launch-popup 800 500 impala
sleep 0.3 '';
launch
}
run() { hakase-popup-bluetooth = pkgs.writeShellScriptBin "hakase-popup-bluetooth" ''
local status exec hakase-launch-popup 600 500 bluetui
status=$(popup_checker) '';
if [[ "$status" == "no_popup" ]]; then hakase-popup-volume = pkgs.writeShellScriptBin "hakase-popup-volume" ''
launch exec hakase-launch-popup 800 300 wiremix
elif [[ "$status" == "same" ]]; then
focus
elif [[ "$status" == "different" ]]; then
replace
fi
}
run
''; '';
in { in {
wayland.windowManager.hyprland.settings = {
exec-once = [
"uwsm app -- waybar"
];
bind = [
"SUPER, Escape, exec, hakase-popup-launch btop"
"SUPER, N, exec, hakase-popup-launch impala"
"SUPER, B, exec, hakase-popup-launch bluetui"
"SUPER, T, exec, hakase-popup-launch wiremix"
];
windowrule = [
# --- POPUP RULES (Wifi, BT, Audio) ---
"match:class ^(org\.hakase\.popup\..*)$, float on"
"match:class ^(org\.hakase\.popup\..*)$, size 900 600"
"match:class ^(org\.hakase\.popup\..*)$, center on"
"match:class ^(org\.hakase\.popup\..*)$, animation slide right"
"match:class ^(org\.hakase\.popup\..*)$, dim_around on"
];
};
imports = [ imports = [
./style.nix ./style.nix
]; ];
home.packages = [ home.packages = [
hakase-popup-launch
pkgs.jq pkgs.jq
pkgs.socat pkgs.socat
pkgs.util-linux pkgs.util-linux
@@ -87,6 +148,17 @@ in {
pkgs.impala pkgs.impala
pkgs.wiremix pkgs.wiremix
pkgs.pamixer pkgs.pamixer
hakase-launch-popup
hakase-popup-wifi
hakase-popup-bluetooth
hakase-popup-volume
hakase-launch-or-focus
hakase-launch-tui
hakase-focus-wrapper
hakase-launch-wifi
hakase-launch-bluetooth
]; ];
programs.waybar = { programs.waybar = {
@@ -116,38 +188,18 @@ in {
all-outputs = true; all-outputs = true;
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
"music" = "󰎆";
"gaming" = "󰊖";
"default" = ""; "default" = "";
"active" = "󱓻";
# Numbered workspaces 1-5
"1" = "1"; "1" = "1";
"2" = "2"; "2" = "2";
"3" = "3"; "3" = "3";
"4" = "4"; "4" = "4";
"5" = "5"; "5" = "5";
"6" = "6";
# Kanji for workspaces 6-10 "7" = "7";
"6" = "1"; "8" = "8";
"7" = "2"; "9" = "9";
"8" = "3"; "10" = "0";
"9" = "4"; "active" = "󱓻";
"10" = "5";
# Dice for workspaces 11-15
"11" = "1";
"12" = "2";
"13" = "3";
"14" = "4";
"15" = "5";
# Circled numbers for 16-20
"16" = "1";
"17" = "2";
"18" = "3";
"19" = "4";
"20" = "5";
}; };
persistent-workspaces = { persistent-workspaces = {
"1" = []; "1" = [];
@@ -155,11 +207,6 @@ in {
"3" = []; "3" = [];
"4" = []; "4" = [];
"5" = []; "5" = [];
"6" = [];
"7" = [];
"8" = [];
"9" = [];
"10" = [];
}; };
}; };
@@ -168,34 +215,26 @@ in {
show-special = true; show-special = true;
special-visible-only = true; special-visible-only = true;
all-outputs = true; all-outputs = true;
ignore-workspaces = ["^([0-9]+|gaming|music|jellyfin)$"]; ignore-workspaces = ["1" "2" "3" "4" "5" "6" "7" "8" "9" "10"];
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
"special:youtube" = "󰗃"; "special:youtube" = "󰗃";
"special:music" = "󰎆";
"special:steam" = "󰓓"; "special:steam" = "󰓓";
"special:custom" = "󱗼";
"special:preload" = "󱗼";
"special:jellyfin" = "󰟞";
"jellyfin" = "󰟞";
"youtube" = "󰗃";
"steam" = "󰓓";
"custom" = "󱗼";
"preload" = "󱗼";
"default" = "󱗼";
}; };
}; };
"custom/omarchy" = { "custom/omarchy" = {
format = ""; format = "";
on-click = "vicinae-toggle"; on-click = "omarchy-menu";
on-click-right = "hyprctl dispatch overview:toggle"; on-click-right = "xdg-terminal-exec";
tooltip-format = "Omarchy Menu\n\nSuper + Alt + Space"; tooltip-format = "Omarchy Menu\n\nSuper + Alt + Space";
}; };
"cpu" = { "cpu" = {
interval = 5; interval = 5;
format = "󰍛"; format = "󰍛";
on-click = "hakase-popup-launch btop"; on-click = "hakase-focus-wrapper btop";
on-click-right = "xdg-terminal-exec"; on-click-right = "xdg-terminal-exec";
}; };
@@ -217,7 +256,7 @@ in {
tooltip-format-disconnected = "Disconnected"; tooltip-format-disconnected = "Disconnected";
interval = 3; interval = 3;
spacing = 1; spacing = 1;
on-click = "hakase-popup-launch impala"; on-click = "hakase-popup-wifi";
}; };
"battery" = { "battery" = {
@@ -246,12 +285,12 @@ in {
format-connected = "󰂱"; format-connected = "󰂱";
format-no-controller = ""; format-no-controller = "";
tooltip-format = "Devices connected: {num_connections}"; tooltip-format = "Devices connected: {num_connections}";
on-click = "hakase-popup-launch bluetui"; on-click = "hakase-popup-bluetooth";
}; };
"pulseaudio" = { "pulseaudio" = {
format = "{icon}"; format = "{icon}";
on-click = "hakase-popup-launch wiremix "; on-click = "hakase-popup-volume";
on-click-right = "pamixer -t"; on-click-right = "pamixer -t";
tooltip-format = "Playing at {volume}%"; tooltip-format = "Playing at {volume}%";
scroll-step = 5; scroll-step = 5;
@@ -289,4 +328,4 @@ in {
}; };
}; };
}; };
} }
+2 -18
View File
@@ -1,8 +1,4 @@
{ {config, ...}: {
config,
myConfig,
...
}: {
programs.waybar = { programs.waybar = {
style = '' style = ''
@import "matugen.css"; @import "matugen.css";
@@ -13,7 +9,7 @@
border: none; border: none;
border-radius: 0; border-radius: 0;
min-height: 0; min-height: 0;
font-family: '${myConfig.font.monospace}'; font-family: 'JetBrainsMono Nerd Font';
font-size: 12px; font-size: 12px;
} }
@@ -36,18 +32,6 @@
opacity: 0.5; opacity: 0.5;
} }
/* Add spacing separator every 5 workspaces */
#workspaces button:nth-child(5),
#workspaces button:nth-child(10),
#workspaces button:nth-child(15) {
margin-right: 10px;
}
/* Separator between normal and special workspaces */
#workspaces.special {
margin-left: 12px;
}
#cpu, #cpu,
#battery, #battery,
#pulseaudio, #pulseaudio,
-5
View File
@@ -1,5 +0,0 @@
{
programs.wireshark.enable = true;
# dumpcap.enable = true;
usbmon.enable = true;
}
+4 -152
View File
@@ -1,162 +1,14 @@
{ {pkgs, ...}: {
pkgs,
myConfig,
...
}: let
# Yazi wrapper for xdg-desktop-portal-termfilechooser
# TODO: rewrite in the future
yaziWrapper = pkgs.writeShellScript "yazi-wrapper.sh" ''
if [[ "$6" == "1" ]]; then
set -x
fi
multiple="$1"
directory="$2"
save="$3"
path="$4"
out="$5"
termcmd="${pkgs.util-linux}/bin/setsid uwsm-app -- xdg-terminal-exec --app-id=org.hakase.popup.yazi -e"
cleanup() {
if [ -f "$tmpfile" ]; then
rm "$tmpfile" || :
fi
if [ "$save" = "1" ] && [ ! -s "$out" ]; then
rm "$path" || :
fi
}
trap cleanup EXIT HUP INT QUIT ABRT TERM
if [ "$save" = "1" ]; then
tmpfile=$(mktemp)
printf '%s' 'xdg-desktop-portal-termfilechooser saving files tutorial
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! === WARNING! === !!!
!!! The contents of *whatever* file you open last in !!!
!!! yazi will be *overwritten*! !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Instructions:
1) Move this file wherever you want.
2) Rename the file if needed.
3) Confirm your selection by opening the file, for
example by pressing <Enter>.
Notes:
1) This file is provided for your convenience. You can
only choose this placeholder file otherwise the save operation aborted.
2) If you quit yazi without opening a file, this file
will be removed and the save operation aborted.
' >"$path"
$termcmd ${pkgs.yazi}/bin/yazi --chooser-file="$tmpfile" "$path"
elif [ "$directory" = "1" ]; then
$termcmd ${pkgs.yazi}/bin/yazi --cwd-file="$out" "$path"
elif [ "$multiple" = "1" ]; then
$termcmd ${pkgs.yazi}/bin/yazi --chooser-file="$out" "$path"
else
$termcmd ${pkgs.yazi}/bin/yazi --chooser-file="$out" "$path"
fi
# Handle save file case
if [ "$save" = "1" ] && [ -s "$tmpfile" ]; then
selected_file=$(head -n 1 "$tmpfile")
if [ -f "$selected_file" ] && grep -qi "^xdg-desktop-portal-termfilechooser saving files tutorial" "$selected_file"; then
echo "$selected_file" >"$out"
fi
fi
'';
in {
wayland.windowManager.hyprland.settings = {
bindd = [
"SUPER, X, Open File Manager, exec, uwsm app -- yazi"
];
};
programs.yazi = { programs.yazi = {
enable = true; enable = true;
enableFishIntegration = true; enableFishIntegration = true;
settings = { settings = {
manager = { manager = {
show_hidden = false; show_hidden = true;
sort_by = "mtime"; sort_by = "natural";
sort_reverse = true; sort_dir_first = true;
sort_dir_first = false;
linemode = "size"; linemode = "size";
mouse_events = ["click" "scroll" "touch" "move" "drag"];
};
tasks = {
image_bound = [10000 10000];
};
opener = {
anki = [
{
run = "anki \"$@\"";
desc = "Open with Anki";
}
];
pdf = [
{
run = "zathura \"$@\"";
desc = "Open with Zathura";
}
{
run = "firefox \"$@\"";
desc = "Open with Firefox";
}
];
};
open = {
prepend_rules = [
{
name = "*.{apkg,colpkg}";
use = "anki";
}
{
mime = "application/pdf";
use = "pdf";
}
];
}; };
}; };
}; };
# Portal packages need to be in user profile for proper path resolution
home.packages = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-termfilechooser
];
# xdg-desktop-portal-termfilechooser configuration
xdg.configFile."xdg-desktop-portal-termfilechooser/config".text = ''
[filechooser]
cmd=${yaziWrapper}
default_dir=$HOME/Downloads
'';
# Portal routing configuration - use termfilechooser for file dialogs
xdg.configFile."xdg-desktop-portal/portals.conf".text = ''
[preferred]
default=hyprland;gtk
org.freedesktop.impl.portal.FileChooser=termfilechooser
'';
xdg.mimeApps = {
enable = true;
defaultApplications = {
"inode/directory" = "yazi.desktop";
};
};
wayland.windowManager.hyprland.settings.windowrule = [
# File picker yazi - floating, centered, smaller size
"match:class ^(org\\.hakase\\.popup\\.yazi)$, float on"
"match:class ^(org\\.hakase\\.popup\\.yazi)$, size 60% 70%"
"match:class ^(org\\.hakase\\.popup\\.yazi)$, center on"
];
} }
-38
View File
@@ -1,38 +0,0 @@
{
pkgs,
config,
lib,
...
}: {
home.packages = with pkgs; [
ocrmypdf
];
programs.zathura = {
enable = true;
options = {
selection-clipboard = "clipboard";
adjust-open = "best-fit";
pages-per-row = 1;
scroll-page-aware = "true";
scroll-full-overlap = "0.01";
scroll-step = 100;
zoom-min = 10;
recolor = true;
recolor-keephue = true;
};
extraConfig = "include ${config.home.homeDirectory}/.config/zathura/zathura-matugen";
};
home.activation.createZathuraMatugen = lib.hm.dag.entryAfter ["writeBoundary"] ''
if [ ! -f "${config.home.homeDirectory}/.config/zathura/zathura-matugen" ]; then
touch "${config.home.homeDirectory}/.config/zathura/zathura-matugen"
fi
'';
xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/pdf" = "org.pwmt.zathura.desktop";
};
};
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

@@ -0,0 +1 @@
/nix/store/yckzy9k5i7pvmlk6xjkdj4wwbfms1zpl-home-manager-files/Pictures/Wallpapers/1-Pawel-Czerwinski-Abstract-Purple-Blue.jpg
+1
View File
@@ -0,0 +1 @@
/nix/store/yckzy9k5i7pvmlk6xjkdj4wwbfms1zpl-home-manager-files/Pictures/Wallpapers/1-everforest.jpg
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 KiB

+1
View File
@@ -0,0 +1 @@
/nix/store/yckzy9k5i7pvmlk6xjkdj4wwbfms1zpl-home-manager-files/Pictures/Wallpapers/gruvbox-1.jpg
+1
View File
@@ -0,0 +1 @@
/nix/store/yckzy9k5i7pvmlk6xjkdj4wwbfms1zpl-home-manager-files/Pictures/Wallpapers/kanagawa-1.png
Binary file not shown.

After

Width:  |  Height:  |  Size: 607 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

+1
View File
@@ -0,0 +1 @@
/nix/store/yckzy9k5i7pvmlk6xjkdj4wwbfms1zpl-home-manager-files/Pictures/Wallpapers/nord-1.png
+10 -6
View File
@@ -1,6 +1,10 @@
██╗ ██╗ █████╗ ██╗ ██╗ █████╗ ███████╗███████╗ ▄▄▄
█║ ████╔══████║ ██╔╝██╔══██╗██╔════╝██╔════╝ ▄█████▄ ▄███████████▄ ▄███████ ▄███████ ▄███████ ▄█ █▄ ▄█ █▄
███████║███████║█████╔╝ ███████║███████╗█████ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
██╔══██║██╔══██║██╔═██╗ ██╔══██║╚════██║██╔══╝ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ █▀ ███ ███ ███ ███
██ ██║██║ ██║██║ ██╗██ ██║███████║███████ ██ ███ ███ ███ ███ ▄███▄▄▄███ ▄███▄▄▄██ ███ ▄███▄▄▄██████▄▄▄███
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ███ ███ ███ ███ ███ ▀███▀▀▀███ ▀███▀▀▀▀ ███ ▀▀███▀▀▀███ ▀▀▀▀▀▀███
███ ███ ███ ███ ███ ███ ███ ██████████ ███ █▄ ███ ███ ▄██ ███
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
▀█████▀ ▀█ ███ █▀ ███ █▀ ███ ███ ███████▀ ███ █▀ ▀█████▀
███ █▀
Binary file not shown.

Before

Width:  |  Height:  |  Size: 476 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

+45 -120
View File
@@ -1,127 +1,52 @@
{ {
hakase = { myConfig = {
myConfig = { nixos = {
font = { username = "kenji";
monospace = "MonoLisa"; hostname = "hakase";
monospaceScript = "MonoLisa Italic @ss02=1"; timezone = "America/Chicago";
sans = "Sans"; };
}; git = {
nixos = { username = "kenji";
username = "kenji"; email = "kenji@hakase";
hostname = "hakase"; defaultBranch = "master";
timezone = "America/Chicago"; };
}; terminal = {
git = { default = "ghostty";
username = "kenji"; aliases = {
email = "kenji@hakase"; update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase";
defaultBranch = "master";
};
theme = {
mode = "dark";
};
terminal = {
default = "ghostty";
font = "MonoLisa";
aliases = {
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase";
};
};
btop = {
autostart = true;
monitor = "HDMI-A-1";
};
hyprland = {
monitors = [
# "DP-1,highres@180,0x1080,1,vrr,1,bitdepth,10,cm,hdr,sdrbrightness,2.5"
"DP-1,highres@180,0x1080,1,vrr,0"
"DP-2, highres@165,760x0,1"
"HDMI-A-1, highres@highrr@120, 3440x1440, 1.6"
];
wallpaper = "firewatch.png";
kb_options = "";
};
wakeup = {
mouse = {
disable = true;
vendor = "3710";
product = "5406";
};
};
firefox = {
bookmarks = [
{
name = "Home Manager";
url = "https://mynixos.com/home-manager/options/programs";
}
{
name = "YouTube";
url = "https://youtube.com";
}
{
name = "Nur";
url = "https://nur.nix-community.org/repos";
}
];
newtabpage = [
{
title = "Dashboard";
url = "https://dash.sakamoto.dev";
}
];
}; };
}; };
}; hyprland = {
monitors = [
"DP-1,highres@180,0x1080,1,bitdepth,10,cm,hdr,sdrbrightness,1.4,sdrsaturation,0.98,vrr,0"
"DP-2, highres@165,760x0,1"
"HDMI-A-1, highres@highrr@120, 3440x1440, 1.6"
];
macbook = { # wallpaper = "nixos_rainbow.png";
myConfig = { wallpaper = "ai_pixel_purple.jpg"; # FIXME: redundant
font = { };
monospace = "MonoLisa"; firefox = {
monospaceScript = "MonoLisa Italic @ss02=1"; bookmarks = [
sans = "Sans"; {
}; name = "Home Manager";
nixos = { url = "https://mynixos.com/home-manager/options/programs";
username = "kenji"; }
hostname = "macbook"; {
timezone = "America/Chicago"; name = "YouTube";
}; url = "https://youtube.com";
git = { }
username = "kenji"; {
email = "kenji@macbook"; name = "Nur";
defaultBranch = "master"; url = "https://nur.nix-community.org/repos";
}; }
theme = { ];
mode = "dark"; newtabpage = [
}; {
terminal = { title = "Dashboard";
default = "ghostty"; url = "https://dash.sakamoto.dev";
font = "MonoLisa"; }
aliases = { ];
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#macbook";
};
};
btop = {
autostart = false;
monitor = "eDP-1";
};
hyprland = {
# M1 Pro/Max/Air screens are usually built-in eDP-1.
# HiDPI scale 2.0 is safe for Retina.
monitors = [
"eDP-1, highres, auto, 2"
];
wallpaper = "firewatch.png";
kb_options = "";
};
firefox = {
bookmarks = [
{
name = "Asahi Linux";
url = "https://asahilinux.org/";
}
];
newtabpage = [];
};
}; };
}; };
} }
Generated
+80 -390
View File
@@ -1,26 +1,5 @@
{ {
"nodes": { "nodes": {
"apple-silicon": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1767637567,
"narHash": "sha256-njwPfL5gM/KRGLJ29CbQ4nLBoEkNPMvEHBAAPOP8BZc=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "530aa73aa9a21a078ff861b84767ae1d469715fa",
"type": "github"
},
"original": {
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"type": "github"
}
},
"aquamarine": { "aquamarine": {
"inputs": { "inputs": {
"hyprutils": [ "hyprutils": [
@@ -41,11 +20,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778857089, "lastModified": 1765900596,
"narHash": "sha256-TclWRW2SdFeETLaiTG4BA8C8C4m/LppQEldncqyTzAQ=", "narHash": "sha256-+hn8v9jkkLP9m+o0Nm5SiEq10W0iWDSotH2XfjU45fA=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "ab2b0af63fbc9fb779d684f19149b790978be8a8", "rev": "d83c97f8f5c0aae553c1489c7d9eff3eadcadace",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -124,32 +103,17 @@
} }
}, },
"flake-compat": { "flake-compat": {
"locked": {
"lastModified": 1746162366,
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1767039857, "lastModified": 1761588595,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
"owner": "NixOS", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"type": "github" "type": "github"
} }
@@ -181,11 +145,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778716662, "lastModified": 1765835352,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "rev": "a34fae9c08a15ad73f295041fec82323541400a9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -229,24 +193,6 @@
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz" "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems_6"
},
"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"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -310,27 +256,6 @@
"type": "github" "type": "github"
} }
}, },
"hypr-dynamic-cursors": {
"inputs": {
"hyprland": [
"hyprland"
],
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1779050734,
"narHash": "sha256-uE/I8TrhVEyQJb8t+HeHNYQRv7VlwbZxXlTrMfP0x/A=",
"owner": "Virtcode",
"repo": "hypr-dynamic-cursors",
"rev": "39fe4ab66b45b011667f548d759d58e707521378",
"type": "github"
},
"original": {
"owner": "Virtcode",
"repo": "hypr-dynamic-cursors",
"type": "github"
}
},
"hyprcursor": { "hyprcursor": {
"inputs": { "inputs": {
"hyprlang": [ "hyprlang": [
@@ -347,11 +272,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1776511930, "lastModified": 1753964049,
"narHash": "sha256-fCpwFiTW0rT7oKJqr3cqHMnkwypSwQKpbtUEtxdkgrM=", "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "39435900785d0c560c6ae8777d29f28617d031ef", "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -376,11 +301,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1776426399, "lastModified": 1763733840,
"narHash": "sha256-RUESLKNikIeEq9ymGJ6nmcDXiSFQpUW1IhJ245nL3xM=", "narHash": "sha256-JnET78yl5RvpGuDQy3rCycOCkiKoLr5DN1fPhRNNMco=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprgraphics", "repo": "hyprgraphics",
"rev": "68d064434787cf1ed4a2fe257c03c5f52f33cf84", "rev": "8f1bec691b2d198c60cccabca7a94add2df4ed1a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -408,11 +333,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1779983308, "lastModified": 1766498696,
"narHash": "sha256-mvjt5EqRubXF5w1RnyLsWOduJQzHDZCjohWJz/TUvJM=", "narHash": "sha256-74qO6ynwUav+QqNhBVn/4yoBCpU6r3/eCkX/V11uL+E=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "ebc1816dfb27f1091c9713876669e092a215382d", "rev": "f7f357f15f83612078eb0919ca08b71cac01c25e",
"revCount": 7376, "revCount": 6741,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@@ -456,11 +381,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1776426575, "lastModified": 1765643131,
"narHash": "sha256-KI6nIfVihn/DPaeB5Et46Xg3dkNHrrEtUd5LBBVomB0=", "narHash": "sha256-CCGohW5EBIRy4B7vTyBMqPgsNcaNenVad/wszfddET0=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-guiutils", "repo": "hyprland-guiutils",
"rev": "a968d211048e3ed538e47b84cb3649299578f19d", "rev": "e50ae912813bdfa8372d62daf454f48d6df02297",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -469,36 +394,6 @@
"type": "github" "type": "github"
} }
}, },
"hyprland-plugins": {
"inputs": {
"hyprland": [
"hyprland"
],
"nixpkgs": [
"hyprland-plugins",
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland-plugins",
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1779209205,
"narHash": "sha256-asc7NpeB8vD66gvZeYcQkaWOs2X6Jgd29vBtP17vjxo=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "1cb37fad68dff5f5840010c314fed5809b4ee66f",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-plugins",
"type": "github"
}
},
"hyprland-protocols": { "hyprland-protocols": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -511,11 +406,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772460177, "lastModified": 1765214753,
"narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=", "narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917", "rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -540,11 +435,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777320127, "lastModified": 1764612430,
"narHash": "sha256-Qu+Wf2Bp5qUjyn2YpZNq8a7JyzTGowhT1knrwE38a9U=", "narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "090117506ddc3d7f26e650ff344d378c2ec329cc", "rev": "0d00dc118981531aa731150b6ea551ef037acddd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -553,48 +448,6 @@
"type": "github" "type": "github"
} }
}, },
"hyprspace": {
"inputs": {
"hyprland": [
"hyprland"
],
"systems": "systems_3"
},
"locked": {
"lastModified": 1775071961,
"narHash": "sha256-LXkeeH9Blr6ohS1LAsVZbkJ/EAkkMDATh5qu45hC7Zo=",
"owner": "KZDKM",
"repo": "Hyprspace",
"rev": "12ddde04f8584bf7de3151e6169918e0dda9f822",
"type": "github"
},
"original": {
"owner": "KZDKM",
"repo": "Hyprspace",
"type": "github"
}
},
"hyprsplit": {
"inputs": {
"hyprland": [
"hyprland"
],
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1779414137,
"narHash": "sha256-XpwuFhwnfwPbzImZeUWWns///UEpoKNkpl1hN90C3Ag=",
"owner": "shezdy",
"repo": "hyprsplit",
"rev": "0fc01e7930625ecb3e069f5dc8e1d61eab929f3b",
"type": "github"
},
"original": {
"owner": "shezdy",
"repo": "hyprsplit",
"type": "github"
}
},
"hyprtoolkit": { "hyprtoolkit": {
"inputs": { "inputs": {
"aquamarine": [ "aquamarine": [
@@ -634,11 +487,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772462885, "lastModified": 1764592794,
"narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=", "narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprtoolkit", "repo": "hyprtoolkit",
"rev": "9af245a69fa6b286b88ddfc340afd288e00a6998", "rev": "5cfe0743f0e608e1462972303778d8a0859ee63e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -659,11 +512,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1779475241, "lastModified": 1766160771,
"narHash": "sha256-Nw4DN0A5krWNcPBvuWe5Gz2yuxsUUPiDgtu6SVPJQeU=", "narHash": "sha256-roINUGikWRqqgKrD4iotKbGj3ZKJl3hjMz5l/SyKrHw=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "3cd3972b2ee658a14d2610d8494e09259e530124", "rev": "5ac060bfcf2f12b3a6381156ebbc13826a05b09f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -684,11 +537,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777159683, "lastModified": 1763640274,
"narHash": "sha256-Jxixw6wZphUp+nHYxOKUYSckL17QMBx2d5Zp0rJHr1g=", "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwayland-scanner", "repo": "hyprwayland-scanner",
"rev": "b8632713a6beaf28b56f2a7b0ab2fb7088dbb404", "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -713,11 +566,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778410714, "lastModified": 1766253200,
"narHash": "sha256-o6RzFj4nJXaPRY7EM01siuCQeT41RfwwmcmFQqwFJJg=", "narHash": "sha256-26qPwrd3od+xoYVywSB7hC2cz9ivN46VPLlrsXyGxvE=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwire", "repo": "hyprwire",
"rev": "85148a8e612808cf5ddb25d0b3c5840f3498a7dc", "rev": "1079777525b30a947c8d657fac158e00ae85de9d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -748,27 +601,6 @@
"type": "github" "type": "github"
} }
}, },
"matugen": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_4"
},
"locked": {
"lastModified": 1780068618,
"narHash": "sha256-LFiV5gdD4MkPrzBrc3Lq966vTQGuwwXC5WkgglWz7i4=",
"owner": "InioX",
"repo": "Matugen",
"rev": "74bfe9369a46589c5048072142796343a8d74168",
"type": "github"
},
"original": {
"owner": "InioX",
"repo": "Matugen",
"type": "github"
}
},
"nix-github-actions": { "nix-github-actions": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -802,11 +634,11 @@
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1779062503, "lastModified": 1766882181,
"narHash": "sha256-CYyaA/qV6TzccHJuEwi8LE9x/rVpMAFztsymq+HYsQ8=", "narHash": "sha256-Xmu3JL68gT623ySytIOoyKqoH0tj3qhtNOnT79RRews=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "4fd264f24fdf87d701ec82e7c6a4ca3e15c1c0aa", "rev": "ddb728dae4c9d6842664395635c9d55fb65c8b56",
"revCount": 79, "revCount": 78,
"type": "git", "type": "git",
"url": "https://git.sakamoto.dev/kenji/nixovim.git" "url": "https://git.sakamoto.dev/kenji/nixovim.git"
}, },
@@ -817,16 +649,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1768127708, "lastModified": 1744536153,
"narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=", "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38", "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@@ -845,43 +677,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1778869304, "lastModified": 1766309749,
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=", "narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb", "rev": "a6531044f6d0bef691ea18d4d4ce44d0daa6e816",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"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_4": {
"locked": {
"lastModified": 1778869304,
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -898,14 +698,14 @@
"nixovim", "nixovim",
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_5" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1779023681, "lastModified": 1766443759,
"narHash": "sha256-K7RLGyiK3J6wHr/JDxXdlGF0+0DEsdBf1w9mXjSyL8I=", "narHash": "sha256-iGDhUPOPyY9NOTNHkhNzZKoz3+OlBNGg451qtvPq/Ic=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "0d05726bfb060f6559f6d64c1d427f3663dba178", "rev": "1787eeda5a2ce35bcd57dbb482718b0d897786ae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -937,7 +737,7 @@
}, },
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat",
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
@@ -945,11 +745,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778507602, "lastModified": 1765911976,
"narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", "narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", "rev": "b68b780b69702a090c8bb1b973bab13756cc7a27",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -960,23 +760,15 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"apple-silicon": "apple-silicon",
"chaotic": "chaotic", "chaotic": "chaotic",
"elephant": "elephant", "elephant": "elephant",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"hypr-dynamic-cursors": "hypr-dynamic-cursors",
"hyprland": "hyprland", "hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
"hyprspace": "hyprspace",
"hyprsplit": "hyprsplit",
"matugen": "matugen",
"nixovim": "nixovim", "nixovim": "nixovim",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_2",
"nur": "nur", "nur": "nur",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"textfox": "textfox", "textfox": "textfox",
"unlisted-fonts": "unlisted-fonts",
"vicinae": "vicinae",
"walker": "walker" "walker": "walker"
} }
}, },
@@ -1003,7 +795,7 @@
}, },
"rust-overlay_2": { "rust-overlay_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1766544144, "lastModified": 1766544144,
@@ -1026,11 +818,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777944972, "lastModified": 1766289575,
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=", "narHash": "sha256-BOKCwOQQIP4p9z8DasT5r+qjri3x7sPCOq+FTjY8Z+o=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c", "rev": "9836912e37aef546029e48c8749834735a6b9dad",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1071,16 +863,16 @@
}, },
"systems_3": { "systems_3": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1681028828,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default-linux", "repo": "default",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default-linux", "repo": "default",
"type": "github" "type": "github"
} }
}, },
@@ -1099,66 +891,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_7": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_8": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"textfox": { "textfox": {
"inputs": { "inputs": {
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
@@ -1167,11 +899,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1767427579, "lastModified": 1763730250,
"narHash": "sha256-q9aFfPohbMS6ehkQHReMeIjtld0wGiUsxlHoPRRvsp4=", "narHash": "sha256-OPlKRltdA2iIm70Nw/kWt5FnwxR1xmxC44tqGUX7Hro=",
"owner": "adriankarlen", "owner": "adriankarlen",
"repo": "textfox", "repo": "textfox",
"rev": "29c31979e5583d9367247f0af8675f88482ff481", "rev": "2f385d16abab56984b874627ca0dd4f3ca7ae4ac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1180,48 +912,6 @@
"type": "github" "type": "github"
} }
}, },
"unlisted-fonts": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1748987994,
"narHash": "sha256-13QQRwZx9tRDmL79+XBM1YaC4W68mVrVW2NCv2w25WA=",
"ref": "refs/heads/master",
"rev": "468d51f24d3dd22c543e657c359fb333ff4df726",
"revCount": 1,
"type": "git",
"url": "https://git.sakamoto.dev/kenji/nix-fonts.git"
},
"original": {
"type": "git",
"url": "https://git.sakamoto.dev/kenji/nix-fonts.git"
}
},
"vicinae": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_7"
},
"locked": {
"lastModified": 1779832601,
"narHash": "sha256-/dtn1sOTEcb/rNInzkdnK8PNIIDfQi7fEJfQEq+Is4g=",
"owner": "vicinaehq",
"repo": "vicinae",
"rev": "dc1f7d47725c68debdb31be26781a96c14bac059",
"type": "github"
},
"original": {
"owner": "vicinaehq",
"repo": "vicinae",
"type": "github"
}
},
"walker": { "walker": {
"inputs": { "inputs": {
"elephant": [ "elephant": [
@@ -1230,7 +920,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_8" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1766324177, "lastModified": 1766324177,
@@ -1274,11 +964,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1778265244, "lastModified": 1761431178,
"narHash": "sha256-8jlPtGSsv/CQY6tVVyLF4Jjd0gnS+Zbn9yk/V13A9nM=", "narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "813ea5ca9a1702a9a2d1f5836bc00172ef698968", "rev": "4b8801228ff958d028f588f0c2b911dbf32297f9",
"type": "github" "type": "github"
}, },
"original": { "original": {
+9 -61
View File
@@ -18,6 +18,7 @@
url = "github:nix-community/NUR"; url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -26,22 +27,6 @@
url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprsplit = {
url = "github:shezdy/hyprsplit";
inputs.hyprland.follows = "hyprland";
};
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
hyprspace = {
url = "github:KZDKM/Hyprspace";
inputs.hyprland.follows = "hyprland";
};
hypr-dynamic-cursors = {
url = "github:Virtcode/hypr-dynamic-cursors";
inputs.hyprland.follows = "hyprland";
};
nixovim = { nixovim = {
# FIXME: treesitter does not install automatically (disabled due to read-only problems) # FIXME: treesitter does not install automatically (disabled due to read-only problems)
url = "git+https://git.sakamoto.dev/kenji/nixovim.git"; url = "git+https://git.sakamoto.dev/kenji/nixovim.git";
@@ -56,25 +41,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.elephant.follows = "elephant"; inputs.elephant.follows = "elephant";
}; };
vicinae = {
url = "github:vicinaehq/vicinae";
inputs.nixpkgs.follows = "nixpkgs";
};
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
unlisted-fonts = {
url = "git+https://git.sakamoto.dev/kenji/nix-fonts.git";
inputs.nixpkgs.follows = "nixpkgs";
};
# TODO: unstable.nixpkgs `matugen` is stuck at v4.0.0
# may need to use `git` version first
matugen = {
url = "github:/InioX/Matugen";
inputs.nixpkgs.follows = "nixpkgs";
# ...
};
}; };
outputs = { outputs = {
@@ -85,44 +51,26 @@
chaotic, chaotic,
sops-nix, sops-nix,
textfox, textfox,
apple-silicon,
... ...
} @ inputs: let } @ inputs: let
allConfig = import ./config.nix; config = import ./config.nix;
system = "x86_64-linux";
args =
{
inherit inputs system;
}
// config;
in { in {
nixosConfigurations = { nixosConfigurations = {
hakase = nixpkgs.lib.nixosSystem { hakase = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; specialArgs = args;
specialArgs =
{
inherit inputs;
system = "x86_64-linux";
}
// allConfig.hakase;
modules = [ modules = [
inputs.matugen.nixosModules.default
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
chaotic.nixosModules.default chaotic.nixosModules.default
./hosts/hakase/configuration.nix ./hosts/hakase/configuration.nix
]; ];
}; };
macbook = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs =
{
inherit inputs;
system = "aarch64-linux";
}
// allConfig.macbook;
modules = [
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
apple-silicon.nixosModules.apple-silicon-support
./hosts/macbook/configuration.nix
];
};
}; };
}; };
} }
-2
View File
@@ -6,7 +6,6 @@
}: { }: {
imports = [ imports = [
../modules/home/terminal.nix ../modules/home/terminal.nix
# ../modules/home/flatpak.nix
../modules/home/apps.nix ../modules/home/apps.nix
../modules/home/apps-optional.nix ../modules/home/apps-optional.nix
../modules/home/hyprland.nix ../modules/home/hyprland.nix
@@ -16,7 +15,6 @@
../modules/home/music.nix ../modules/home/music.nix
inputs.walker.homeManagerModules.default inputs.walker.homeManagerModules.default
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
inputs.vicinae.homeManagerModules.default
]; ];
home.sessionVariables = { home.sessionVariables = {
-25
View File
@@ -1,25 +0,0 @@
{
pkgs,
inputs,
config,
...
}: {
imports = [
../modules/home/terminal.nix
../modules/home/apps.nix
../modules/home/apps-optional.nix
../modules/home/hyprland.nix
../modules/home/waybar.nix
../modules/home/theme.nix
../modules/home/music.nix
# No gaming.nix for MacBook
inputs.walker.homeManagerModules.default
inputs.sops-nix.homeManagerModules.sops
inputs.vicinae.homeManagerModules.default
];
home.sessionVariables = {
};
home.stateVersion = "25.05";
}
-2
View File
@@ -8,7 +8,5 @@
../../modules/nixos/default.nix ../../modules/nixos/default.nix
../../modules/nixos/hyprland.nix ../../modules/nixos/hyprland.nix
../../modules/nixos/gaming.nix ../../modules/nixos/gaming.nix
../../modules/nixos/amd.nix
../../modules/nixos/amdcpu.nix
]; ];
} }
-24
View File
@@ -1,24 +0,0 @@
{
pkgs,
myConfig,
...
}: {
imports = [
./hardware-configuration.nix
../../modules/nixos/default.nix
../../modules/nixos/hyprland.nix
# No gaming.nix (Steam is x86 only)
# No amd.nix
];
# Apple Silicon specific hardware tweaks
hardware.asahi = {
# peripheralFirmwareDirectory = ./firmware; # If you have extracted firmware
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "replace";
};
# Bootloader for Asahi is usually systemd-boot or grub, but asahi-module handles m1n1
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false; # Asahi often prefers this false to avoid bricking nvram
}
-30
View File
@@ -1,30 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "usb_storage" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0000-0000";
fsType = "vfat";
};
swapDevices = [ ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}
+1 -14
View File
@@ -1,21 +1,8 @@
{pkgs, ...}: { {
imports = [ imports = [
../../apps/btop ../../apps/btop
../../apps/bottom
../../apps/anki
../../apps/gemini
../../apps/jellyfin ../../apps/jellyfin
../../apps/tickrs ../../apps/tickrs
../../apps/claude ../../apps/claude
../../apps/delfin
../../apps/jellyfin-mpv-shim
../../apps/nextcloud
../../apps/ttyper
../../apps/libreoffice
];
home.packages = with pkgs; [
chromium
imagemagick
hidapitester
]; ];
} }
+1 -4
View File
@@ -1,11 +1,8 @@
{ {
imports = [ imports = [
../../apps/yazi ../../apps/yazi
../../apps/gemini
../../apps/firefox ../../apps/firefox
../../apps/imv
../../apps/zathura
../../apps/mpv
../../apps/mako
# ../../apps/starship # ../../apps/starship
]; ];
} }
-25
View File
@@ -1,25 +0,0 @@
{pkgs, ...}: let
flatpak-install = pkgs.writeShellScriptBin "flatpak-install" ''
flatpak install --user --bundle "$1"
echo
read -p "Press Enter to close..."
'';
in {
home.packages = [flatpak-install];
xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/vnd.flatpak" = "flatpak-bundle-installer.desktop";
};
};
xdg.desktopEntries.flatpak-bundle-installer = {
name = "Flatpak Bundle Installer";
exec = "flatpak-install %f";
terminal = true;
noDisplay = true;
type = "Application";
mimeType = ["application/vnd.flatpak"];
};
}

Some files were not shown because too many files have changed in this diff Show More