Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91161651b0 |
9
.gitignore
vendored
@ -1,9 +0,0 @@
|
|||||||
**/node_modules/**
|
|
||||||
**/*.db
|
|
||||||
|
|
||||||
# Purchased wallpapers - not for distribution
|
|
||||||
shared/modules/services/wallpapers/**/*.jpg
|
|
||||||
shared/modules/services/wallpapers/**/*.png
|
|
||||||
shared/modules/services/wallpapers/**/*.jpeg
|
|
||||||
shared/modules/services/wallpapers/**/*.webp
|
|
||||||
shared/modules/services/wallpapers/**/*.avif
|
|
||||||
5
.ignore
@ -1,8 +1,3 @@
|
|||||||
# dotfiles/
|
# dotfiles/
|
||||||
.git/
|
.git/
|
||||||
flake.lock
|
flake.lock
|
||||||
frame12/framework-plymouth-theme/framework/progress-*
|
|
||||||
jaci/kiki-plymouth-theme/*/progress-*
|
|
||||||
|
|
||||||
*.png
|
|
||||||
*.jpeg
|
|
||||||
|
|||||||
51
AGENTS.md
@ -1,51 +0,0 @@
|
|||||||
# AGENTS.md - NixOS Flake Configuration
|
|
||||||
|
|
||||||
## Before Starting Work
|
|
||||||
|
|
||||||
Run `hostname` to identify current machine. Hostname = flake config name (e.g., `frame12` → `.#frame12`).
|
|
||||||
|
|
||||||
## Repository Structure
|
|
||||||
|
|
||||||
```
|
|
||||||
flake.nix # Defines all nixosConfigurations
|
|
||||||
<hostname>/ # Per-host configs (frame12, nate, jaci, scrappy, nate-work, luci)
|
|
||||||
default.nix # Host entry point, sets deskCfg or serverConfig
|
|
||||||
desktop-configuration.nix # Desktop systems only
|
|
||||||
modules/ # Host-specific modules (niri, home-manager, user)
|
|
||||||
nixos/hardware-configuration.nix # Auto-generated, do not edit
|
|
||||||
shared/ # Reusable modules imported by hosts
|
|
||||||
modules/ # apps/, home-manager/, services/, system/, user/
|
|
||||||
server-configuration.nix # Server base (luci uses this)
|
|
||||||
```
|
|
||||||
|
|
||||||
**Host types:**
|
|
||||||
- **Desktop** (frame12, nate, jaci, nate-work, scrappy): Use `deskCfg` options, Home Manager, Stylix theming
|
|
||||||
- **Server** (luci): Uses `serverConfig` options, minimal packages
|
|
||||||
|
|
||||||
## Build/Test Commands
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix flake check # Validate syntax
|
|
||||||
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel --dry-run
|
|
||||||
# Must be done by user, agent lacks admin privileges.
|
|
||||||
sudo nixos-rebuild test --flake .#<hostname> # Test without switching
|
|
||||||
sudo nixos-rebuild switch --flake .#<hostname> # Apply changes
|
|
||||||
```
|
|
||||||
|
|
||||||
## Key Patterns
|
|
||||||
|
|
||||||
**Configuration options:** Desktops set `deskCfg = { userName, hostName, de }`, servers set `serverConfig = { userName, hostName, hostId, ... }`
|
|
||||||
|
|
||||||
**Module structure:** Options in `options.<name>`, config in `config = lib.mkIf cfg.enable { ... }`
|
|
||||||
|
|
||||||
**Home Manager:** User config in `<host>/modules/home-manager/home.nix`, packages in `home.packages`
|
|
||||||
|
|
||||||
**Shared imports:** `../shared/modules/<path>` for reusable modules
|
|
||||||
|
|
||||||
## Code Style
|
|
||||||
|
|
||||||
- Nix expression language, 2-4 space indent
|
|
||||||
- camelCase options (`userName`), kebab-case hostnames, underscores for modules (`main_user`)
|
|
||||||
- `lib.mkOption` with types (`lib.types.str`, `lib.types.bool`), `lib.mkEnableOption` for toggles
|
|
||||||
- `lib.mkIf` for conditionals, `lib.mkMerge` for combining sets
|
|
||||||
- Minimal comments; use self-documenting option descriptions
|
|
||||||
186
CLAUDE.md
@ -1,186 +0,0 @@
|
|||||||
# CLAUDE.md
|
|
||||||
|
|
||||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
||||||
|
|
||||||
## Common Commands
|
|
||||||
|
|
||||||
### Building and Rebuilding Systems
|
|
||||||
```bash
|
|
||||||
# Rebuild NixOS configuration for current system
|
|
||||||
sudo nixos-rebuild switch --flake .
|
|
||||||
|
|
||||||
# Build for specific system
|
|
||||||
sudo nixos-rebuild switch --flake .#nate-work
|
|
||||||
sudo nixos-rebuild switch --flake .#nate
|
|
||||||
sudo nixos-rebuild switch --flake .#luci
|
|
||||||
sudo nixos-rebuild switch --flake .#jaci
|
|
||||||
sudo nixos-rebuild switch --flake .#scrappy
|
|
||||||
sudo nixos-rebuild switch --flake .#frame12
|
|
||||||
|
|
||||||
# Test configuration without switching
|
|
||||||
sudo nixos-rebuild test --flake .
|
|
||||||
|
|
||||||
# Check configuration without building
|
|
||||||
nix flake check
|
|
||||||
|
|
||||||
# Dry-run build specific host configuration (check for errors/warnings without building)
|
|
||||||
nix build .#nixosConfigurations.frame12.config.system.build.toplevel --dry-run
|
|
||||||
nix build .#nixosConfigurations.nate-work.config.system.build.toplevel --dry-run
|
|
||||||
nix build .#nixosConfigurations.nate.config.system.build.toplevel --dry-run
|
|
||||||
```
|
|
||||||
|
|
||||||
### Package Management
|
|
||||||
```bash
|
|
||||||
# Update flake inputs
|
|
||||||
nix flake update
|
|
||||||
|
|
||||||
# Run garbage collection
|
|
||||||
nix-collect-garbage -d
|
|
||||||
|
|
||||||
# Check system generations
|
|
||||||
nixos-rebuild list-generations
|
|
||||||
|
|
||||||
# Rollback to previous generation
|
|
||||||
sudo nixos-rebuild switch --rollback
|
|
||||||
```
|
|
||||||
|
|
||||||
### Home Manager
|
|
||||||
```bash
|
|
||||||
# Apply home manager configuration
|
|
||||||
home-manager switch --flake .
|
|
||||||
|
|
||||||
# For specific user configurations
|
|
||||||
home-manager switch --flake .#nate-work
|
|
||||||
```
|
|
||||||
|
|
||||||
### Window Manager Configuration Validation
|
|
||||||
```bash
|
|
||||||
# Validate niri configuration
|
|
||||||
niri validate
|
|
||||||
|
|
||||||
# Validate sway configuration (if using sway)
|
|
||||||
sway --validate
|
|
||||||
|
|
||||||
# Validate hyprland configuration (if using hyprland)
|
|
||||||
hyprctl reload # This reloads and validates the config
|
|
||||||
|
|
||||||
# Check wayland compositor logs for errors
|
|
||||||
journalctl --user -u niri -f # For niri
|
|
||||||
journalctl --user -u sway -f # For sway
|
|
||||||
journalctl --user -u hyprland -f # For hyprland
|
|
||||||
```
|
|
||||||
|
|
||||||
## Architecture Overview
|
|
||||||
|
|
||||||
This is a multi-user NixOS configuration repository using Nix flakes. The repository manages configurations for multiple machines and users across different environments.
|
|
||||||
|
|
||||||
### Repository Structure
|
|
||||||
|
|
||||||
- **flake.nix**: Main flake configuration defining all system configurations
|
|
||||||
- **{user}/**: Individual user configuration directories (nate, nate-work, luci, jaci, scrappy)
|
|
||||||
- **shared/**: Shared modules and configurations across systems
|
|
||||||
- **{user}/default.nix**: System-level configuration for each user/machine
|
|
||||||
- **{user}/desktop-configuration.nix**: Desktop environment configuration
|
|
||||||
- **{user}/modules/**: User-specific modules and configurations
|
|
||||||
- **{user}/dotfiles/**: User dotfiles and application configurations
|
|
||||||
|
|
||||||
### Key Components
|
|
||||||
|
|
||||||
#### System Configurations
|
|
||||||
Each system configuration follows this pattern:
|
|
||||||
- `default.nix`: Main system configuration with user settings, hostname, desktop environment
|
|
||||||
- `desktop-configuration.nix`: Desktop environment setup (Sway/Hyprland)
|
|
||||||
- `modules/home-manager/home.nix`: Home Manager configuration
|
|
||||||
- `nixos/hardware-configuration.nix`: Hardware-specific settings
|
|
||||||
|
|
||||||
#### Supported Desktop Environments
|
|
||||||
- **Sway**: Wayland compositor (default)
|
|
||||||
- **Hyprland**: Modern Wayland compositor
|
|
||||||
- Desktop choice configured via `deskCfg.de` option
|
|
||||||
|
|
||||||
#### User Management
|
|
||||||
- Custom `main_user` module handles user creation
|
|
||||||
- Desktop users get additional groups (video, audio, adbusers)
|
|
||||||
- Server users get minimal groups (wheel, networkmanager)
|
|
||||||
|
|
||||||
#### Package Management
|
|
||||||
- Stable packages from nixpkgs 25.05
|
|
||||||
- Unstable packages available via `nixpkgs-unstable`
|
|
||||||
- Catppuccin theme integration via catppuccin.nix
|
|
||||||
- NUR (Nix User Repository) overlay enabled
|
|
||||||
|
|
||||||
### Configuration Patterns
|
|
||||||
|
|
||||||
#### User-Specific Settings
|
|
||||||
Each user configuration defines:
|
|
||||||
```nix
|
|
||||||
{
|
|
||||||
userName = "username";
|
|
||||||
fullName = "Full Name";
|
|
||||||
email = "email@domain.com";
|
|
||||||
hostName = "hostname";
|
|
||||||
desktop = "sway" or "hyprland";
|
|
||||||
gaming = true/false;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Module System
|
|
||||||
- Custom modules in `modules/` directories
|
|
||||||
- Shared modules in `shared/modules/`
|
|
||||||
- Options defined with `lib.mkOption`
|
|
||||||
- Conditional configuration with `lib.mkIf`
|
|
||||||
|
|
||||||
#### Home Manager Integration
|
|
||||||
- Home Manager configurations in `modules/home-manager/home.nix`
|
|
||||||
- Dotfiles linked from `dotfiles/` directories
|
|
||||||
- User packages defined in `homePackages`
|
|
||||||
|
|
||||||
### Development Environment
|
|
||||||
|
|
||||||
#### Installed Development Tools
|
|
||||||
- **Editors**: Helix (default), Emacs
|
|
||||||
- **Languages**: Go, Python, Clojure, Nix
|
|
||||||
- **LSPs**: gopls, nil, bash-language-server, python-lsp-server
|
|
||||||
- **Tools**: Docker, distrobox, jq, make, cmake
|
|
||||||
- **Version Control**: Git with delta, direnv
|
|
||||||
|
|
||||||
#### Shell Configuration
|
|
||||||
- **Default Shell**: Zsh with Oh My Zsh
|
|
||||||
- **Theme**: half-life
|
|
||||||
- **Plugins**: git, ssh-agent
|
|
||||||
- **Aliases**: Modern Unix tools (lsd, bat, ripgrep, fd, fzf)
|
|
||||||
|
|
||||||
### Security and Maintenance
|
|
||||||
|
|
||||||
#### Automatic Updates
|
|
||||||
- `auto-update.nix` module for automatic system updates
|
|
||||||
- Garbage collection configured weekly
|
|
||||||
- Boot loader limited to 5 generations
|
|
||||||
- Store optimization enabled
|
|
||||||
|
|
||||||
#### Security Features
|
|
||||||
- ClamAV antivirus on work systems
|
|
||||||
- Gnome Keyring for SSH secrets
|
|
||||||
- Firewall configuration for servers
|
|
||||||
- Initial password set to "password" (should be changed)
|
|
||||||
|
|
||||||
### Server Configuration
|
|
||||||
|
|
||||||
For server deployments, use `shared/server-configuration.nix` which provides:
|
|
||||||
- SSH server option
|
|
||||||
- NFS server with configurable exports
|
|
||||||
- Syncthing for file synchronization
|
|
||||||
- Radicale CalDAV server
|
|
||||||
- Printer sharing via CUPS/Avahi
|
|
||||||
|
|
||||||
### Special Features
|
|
||||||
|
|
||||||
#### Claude Code Integration
|
|
||||||
- Work profile: `claudew` command (uses AWS Bedrock)
|
|
||||||
- Personal profile: `claudep` command (uses standard API)
|
|
||||||
- Configuration directories: `/home/nate/.claude-work` and `/home/nate/.claude-personal`
|
|
||||||
|
|
||||||
#### Catppuccin Theme
|
|
||||||
- Consistent theming across applications
|
|
||||||
- Macchiato variant with lavender accent
|
|
||||||
- GTK, Qt, and terminal theme integration
|
|
||||||
@ -1,174 +0,0 @@
|
|||||||
# Stylix Migration Work - COMPLETED
|
|
||||||
|
|
||||||
## Summary of Work Completed
|
|
||||||
|
|
||||||
### 1. Replaced Catppuccin with Stylix
|
|
||||||
- Removed `catppuccin` input from `flake.nix`
|
|
||||||
- Added `stylix` input (release-25.11 branch to match NixOS version)
|
|
||||||
- Added `stylix.nixosModules.stylix` to frame12 modules in flake.nix
|
|
||||||
- Removed catppuccin modules from nate, nate-work, and frame12 configurations
|
|
||||||
|
|
||||||
### 2. Stylix Configuration
|
|
||||||
**File: `/home/nate/nixos/frame12/default.nix`**
|
|
||||||
```nix
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
image = ./wallpaper.png;
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml";
|
|
||||||
polarity = "dark";
|
|
||||||
|
|
||||||
# System-wide cursor
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.bibata-cursors;
|
|
||||||
name = "Bibata-Modern-Classic";
|
|
||||||
size = 32;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Fonts
|
|
||||||
fonts = {
|
|
||||||
serif = { package = pkgs.lato; name = "Lato"; };
|
|
||||||
sansSerif = { package = pkgs.lato; name = "Lato"; };
|
|
||||||
monospace = { package = pkgs.maple-mono.NF; name = "Maple Mono NF"; };
|
|
||||||
emoji = { package = pkgs.noto-fonts-color-emoji; name = "Noto Color Emoji"; };
|
|
||||||
sizes = {
|
|
||||||
applications = 12;
|
|
||||||
desktop = 10;
|
|
||||||
popups = 10;
|
|
||||||
terminal = 11;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
targets.plymouth.enable = false; # Keep custom Framework plymouth theme
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. Stylix Auto-Enable in Home Manager
|
|
||||||
**File: `/home/nate/nixos/frame12/modules/home-manager/home.nix`**
|
|
||||||
- Enabled `stylix.autoEnable = true` for automatic theming of all programs
|
|
||||||
|
|
||||||
### 4. Programs Converted to Nix Configuration
|
|
||||||
|
|
||||||
All programs below now use `programs.<name>.enable = true` with Stylix auto-theming:
|
|
||||||
|
|
||||||
**File: `/home/nate/nixos/frame12/modules/home-manager/programs.nix`**
|
|
||||||
| Program | Status | Notes |
|
|
||||||
|---------|--------|-------|
|
|
||||||
| Ghostty | DONE | Maple Mono NF with ligatures, keybinds |
|
|
||||||
| Foot | DONE | Minimal config, Stylix handles fonts/colors |
|
|
||||||
| Helix | DONE | Full config with Colemak-DH bindings, languages, LSP |
|
|
||||||
| Bat | DONE | Simple enable |
|
|
||||||
| Fzf | DONE | With zsh integration |
|
|
||||||
| Btop | DONE | Simple enable |
|
|
||||||
| Mpv | DONE | Simple enable |
|
|
||||||
| Wofi | DONE | Simple enable |
|
|
||||||
|
|
||||||
**File: `/home/nate/nixos/shared/modules/home-manager/waybar.nix`**
|
|
||||||
| Program | Status | Notes |
|
|
||||||
|---------|--------|-------|
|
|
||||||
| Waybar | DONE | Shared module with parameterized options |
|
|
||||||
|
|
||||||
### 5. Waybar Shared Module
|
|
||||||
|
|
||||||
Created parameterized waybar module for use across multiple machines:
|
|
||||||
- **File**: `/home/nate/nixos/shared/modules/home-manager/waybar.nix`
|
|
||||||
- **Options**:
|
|
||||||
- `waybarConfig.enable` - Enable waybar with Stylix theming
|
|
||||||
- `waybarConfig.terminal` - Terminal for on-click commands (default: "ghostty")
|
|
||||||
- `waybarConfig.launcher` - App launcher command (default: "wofi --show=drun")
|
|
||||||
- `waybarConfig.fontSize` - Base font size (default: 16)
|
|
||||||
- `waybarConfig.font` - Font family (default: "Overpass Nerd Font")
|
|
||||||
- `waybarConfig.position` - Bar position: top/bottom (default: "top")
|
|
||||||
- `waybarConfig.margin` - Margin in pixels (default: 3)
|
|
||||||
- `waybarConfig.extraModulesLeft` - Additional left modules
|
|
||||||
- `waybarConfig.extraModulesRight` - Additional right modules
|
|
||||||
- `waybarConfig.windowRewriteRules` - Additional window title rewrite rules
|
|
||||||
- `waybarConfig.workspaceIcons` - Additional workspace icons
|
|
||||||
|
|
||||||
### 6. Dotfiles Deleted
|
|
||||||
|
|
||||||
| Dotfile | Status |
|
|
||||||
|---------|--------|
|
|
||||||
| `/home/nate/nixos/frame12/dotfiles/ghostty/` | DELETED |
|
|
||||||
| `/home/nate/nixos/shared/dotfiles/ghostty/` | DELETED |
|
|
||||||
| `/home/nate/nixos/shared/linked-dotfiles/helix/` | DELETED |
|
|
||||||
| `/home/nate/nixos/frame12/linked-dotfiles/waybar/` | DELETED |
|
|
||||||
|
|
||||||
### 7. Symlinks Removed
|
|
||||||
|
|
||||||
- Removed `helix` from `xdg.configFile` in home.nix
|
|
||||||
- Removed `waybar` from `xdg.configFile` in home.nix
|
|
||||||
|
|
||||||
### 8. Packages Removed from Manual Lists
|
|
||||||
|
|
||||||
**From `home.nix` home.packages:**
|
|
||||||
- helix (now programs.helix)
|
|
||||||
- ghostty (now programs.ghostty)
|
|
||||||
- bat (now programs.bat)
|
|
||||||
- fzf (now programs.fzf)
|
|
||||||
- mpv (now programs.mpv)
|
|
||||||
|
|
||||||
**From `niri_home.nix` home.packages:**
|
|
||||||
- wofi (now programs.wofi)
|
|
||||||
- waybar (now programs.waybar via waybarConfig)
|
|
||||||
|
|
||||||
**From `niri_conf.nix` environment.systemPackages:**
|
|
||||||
- foot (now programs.foot in home-manager)
|
|
||||||
- waybar (now programs.waybar via waybarConfig)
|
|
||||||
- wofi (now programs.wofi)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## File Structure After Migration
|
|
||||||
|
|
||||||
```
|
|
||||||
frame12/modules/home-manager/
|
|
||||||
├── home.nix # Main home config, imports programs.nix
|
|
||||||
└── programs.nix # All Stylix-themed program configs
|
|
||||||
|
|
||||||
frame12/modules/niri/
|
|
||||||
├── niri_home.nix # Niri home config, imports shared waybar.nix
|
|
||||||
└── niri_conf.nix # Niri system config
|
|
||||||
|
|
||||||
shared/modules/home-manager/
|
|
||||||
└── waybar.nix # Parameterized waybar module with Stylix theming
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Applications WITHOUT Direct Stylix Support
|
|
||||||
|
|
||||||
These retain manual CSS/config with catppuccin colors:
|
|
||||||
|
|
||||||
| Application | Config Location | Notes |
|
|
||||||
|-------------|-----------------|-------|
|
|
||||||
| SwayNC | `/home/nate/nixos/shared/dotfiles/swaync/` | Manual CSS with catppuccin colors |
|
|
||||||
| Niri | `/home/nate/nixos/frame12/linked-dotfiles/niri/` | Border colors are custom gradients |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Dry-run build (validates configuration)
|
|
||||||
nix build .#nixosConfigurations.frame12.config.system.build.toplevel --dry-run
|
|
||||||
|
|
||||||
# Full rebuild
|
|
||||||
sudo nixos-rebuild switch --flake .#frame12
|
|
||||||
|
|
||||||
# Validate niri config
|
|
||||||
niri validate
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Reference: Stylix Base16 Color Variables
|
|
||||||
|
|
||||||
Stylix provides these CSS variables for waybar and other GTK apps:
|
|
||||||
- `@base00` through `@base0F` - Base16 color palette
|
|
||||||
- Colors map to catppuccin-macchiato scheme
|
|
||||||
|
|
||||||
## Reference: Stylix Documentation
|
|
||||||
|
|
||||||
- Installation: https://nix-community.github.io/stylix/installation.html
|
|
||||||
- Configuration: https://nix-community.github.io/stylix/configuration.html
|
|
||||||
- Styling guide: https://nix-community.github.io/stylix/styling.html
|
|
||||||
@ -1,426 +0,0 @@
|
|||||||
# Work Tools Module Design Document
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
A modular NixOS configuration for work-specific development tools and services. This allows clean separation between personal and work machines while enabling easy reuse across multiple work systems.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Module Structure
|
|
||||||
|
|
||||||
### Proposed Location
|
|
||||||
```
|
|
||||||
shared/modules/work/work_tools.nix
|
|
||||||
```
|
|
||||||
|
|
||||||
This places it in the shared modules directory since it could be used across multiple work machines.
|
|
||||||
|
|
||||||
### Alternative Location
|
|
||||||
```
|
|
||||||
nate-work/modules/work/work_tools.nix
|
|
||||||
```
|
|
||||||
|
|
||||||
Use this if the tools are specific to a single work environment.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Module Design
|
|
||||||
|
|
||||||
### Basic Structure
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ inputs, lib, config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.work_tools = {
|
|
||||||
enable = lib.mkEnableOption "Enable work development tools and services";
|
|
||||||
|
|
||||||
enableDocker = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable Docker and related containerization tools";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableVirtualization = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable QEMU/KVM virtualization";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableGoTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable Go development toolchain";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableNodeTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable Node.js development tools";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableDatabaseTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable database clients and tools";
|
|
||||||
};
|
|
||||||
|
|
||||||
user = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Username for service configurations";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.work_tools.enable {
|
|
||||||
# Docker configuration
|
|
||||||
virtualisation.docker = lib.mkIf config.work_tools.enableDocker {
|
|
||||||
enable = true;
|
|
||||||
enableOnBoot = true;
|
|
||||||
package = unstable.docker_25;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.groups.docker.members = lib.mkIf config.work_tools.enableDocker
|
|
||||||
[ config.work_tools.user ];
|
|
||||||
|
|
||||||
# Virtualization
|
|
||||||
virtualisation.libvirtd = lib.mkIf config.work_tools.enableVirtualization {
|
|
||||||
enable = true;
|
|
||||||
qemu = {
|
|
||||||
swtpm.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.spiceUSBRedirection.enable =
|
|
||||||
lib.mkIf config.work_tools.enableVirtualization true;
|
|
||||||
|
|
||||||
users.groups.libvirtd.members = lib.mkIf config.work_tools.enableVirtualization
|
|
||||||
[ config.work_tools.user ];
|
|
||||||
|
|
||||||
programs.virt-manager.enable =
|
|
||||||
lib.mkIf config.work_tools.enableVirtualization true;
|
|
||||||
|
|
||||||
# NFS support (if needed for remote dev environments)
|
|
||||||
boot.initrd.supportedFilesystems = lib.mkIf config.work_tools.enableVirtualization
|
|
||||||
{ nfs = true; };
|
|
||||||
|
|
||||||
# System packages that don't fit into categories
|
|
||||||
environment.systemPackages = with pkgs; lib.lists.flatten [
|
|
||||||
(lib.optionals config.work_tools.enableDocker [
|
|
||||||
docker-compose
|
|
||||||
])
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Home Manager Companion Module
|
|
||||||
|
|
||||||
Create a companion home-manager module for user-level packages:
|
|
||||||
|
|
||||||
```
|
|
||||||
shared/modules/work/work_tools_home.nix
|
|
||||||
```
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{ inputs, lib, config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.work_tools_home = {
|
|
||||||
enable = lib.mkEnableOption "Enable work development tools in home";
|
|
||||||
|
|
||||||
enableGoTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable Go development toolchain";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableNodeTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable Node.js development tools";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableDatabaseTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable database clients";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableAwsTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Enable AWS CLI and related tools";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.work_tools_home.enable {
|
|
||||||
home.packages = with pkgs; lib.lists.flatten [
|
|
||||||
# Development tools
|
|
||||||
(lib.optionals config.work_tools_home.enableGoTools [
|
|
||||||
go
|
|
||||||
unstable.delve
|
|
||||||
gotools
|
|
||||||
go-tools
|
|
||||||
govulncheck
|
|
||||||
unstable.golangci-lint
|
|
||||||
go-swag
|
|
||||||
gopls
|
|
||||||
])
|
|
||||||
|
|
||||||
(lib.optionals config.work_tools_home.enableNodeTools [
|
|
||||||
nodejs_24
|
|
||||||
husky
|
|
||||||
pnpm
|
|
||||||
yarn
|
|
||||||
typescript-language-server
|
|
||||||
])
|
|
||||||
|
|
||||||
(lib.optionals config.work_tools_home.enableDatabaseTools [
|
|
||||||
mariadb
|
|
||||||
])
|
|
||||||
|
|
||||||
(lib.optionals config.work_tools_home.enableAwsTools [
|
|
||||||
awscli2
|
|
||||||
])
|
|
||||||
|
|
||||||
# General dev tools
|
|
||||||
vscode-fhs
|
|
||||||
jq
|
|
||||||
gnumake
|
|
||||||
cmake
|
|
||||||
gcc
|
|
||||||
gh
|
|
||||||
trivy
|
|
||||||
oxker # docker TUI
|
|
||||||
|
|
||||||
# Additional LSPs
|
|
||||||
yaml-language-server
|
|
||||||
ltex-ls
|
|
||||||
];
|
|
||||||
|
|
||||||
# Work-specific zsh configuration
|
|
||||||
programs.zsh.initExtra = lib.mkIf config.work_tools_home.enable ''
|
|
||||||
# Work environment variables
|
|
||||||
if [ -f ~/.vasion_env ]; then
|
|
||||||
source ~/.vasion_env
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Work functions
|
|
||||||
if [ -f ~/.config/zsh_functions.zsh ]; then
|
|
||||||
source ~/.config/zsh_functions.zsh
|
|
||||||
fi
|
|
||||||
|
|
||||||
export GOBIN=~/go/bin
|
|
||||||
export PATH=$PATH:$GOBIN
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Integration Steps
|
|
||||||
|
|
||||||
### 1. Create the module files
|
|
||||||
- [ ] Create `shared/modules/work/work_tools.nix`
|
|
||||||
- [ ] Create `shared/modules/work/work_tools_home.nix`
|
|
||||||
|
|
||||||
### 2. Import in nate-work system configuration
|
|
||||||
|
|
||||||
In `nate-work/desktop-configuration.nix`:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
imports = [
|
|
||||||
# ... existing imports
|
|
||||||
../shared/modules/work/work_tools.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
# ... existing config
|
|
||||||
|
|
||||||
work_tools = {
|
|
||||||
enable = true;
|
|
||||||
enableDocker = true;
|
|
||||||
enableVirtualization = true;
|
|
||||||
enableGoTools = true;
|
|
||||||
enableNodeTools = true;
|
|
||||||
enableDatabaseTools = true;
|
|
||||||
user = deskCfg.userName;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. Import in nate-work home-manager configuration
|
|
||||||
|
|
||||||
In `nate-work/modules/home-manager/home.nix`:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
imports = [
|
|
||||||
# ... existing imports
|
|
||||||
../../../shared/modules/work/work_tools_home.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
work_tools_home = {
|
|
||||||
enable = true;
|
|
||||||
enableGoTools = true;
|
|
||||||
enableNodeTools = true;
|
|
||||||
enableDatabaseTools = true;
|
|
||||||
enableAwsTools = true;
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
### 4. Remove work packages from nirihome.homePackages
|
|
||||||
|
|
||||||
Clean up the existing package list by removing packages now provided by work_tools_home.
|
|
||||||
|
|
||||||
### 5. Test the configuration
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Dry-run to check for errors
|
|
||||||
nix build .#nixosConfigurations.nate-work.config.system.build.toplevel --dry-run
|
|
||||||
|
|
||||||
# If successful, rebuild
|
|
||||||
sudo nixos-rebuild switch --flake .#nate-work
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Benefits
|
|
||||||
|
|
||||||
### Modularity
|
|
||||||
- Easy to enable/disable categories of tools
|
|
||||||
- Can be reused across multiple work machines
|
|
||||||
- Keeps personal configs clean
|
|
||||||
|
|
||||||
### Flexibility
|
|
||||||
- Granular control via boolean flags
|
|
||||||
- Can enable only needed tool categories
|
|
||||||
- Easy to add new tool categories
|
|
||||||
|
|
||||||
### Maintainability
|
|
||||||
- Single source of truth for work tools
|
|
||||||
- Easier to update work tooling across systems
|
|
||||||
- Clear separation of concerns
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Future Enhancements
|
|
||||||
|
|
||||||
### Additional Tool Categories
|
|
||||||
```nix
|
|
||||||
enablePythonTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable Python development tools";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableRustTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable Rust development toolchain";
|
|
||||||
};
|
|
||||||
|
|
||||||
enableCloudTools = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Enable cloud provider CLIs (Azure, GCP)";
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
### Company-Specific Customization
|
|
||||||
```nix
|
|
||||||
company = lib.mkOption {
|
|
||||||
type = lib.types.enum [ "vasion" "other" ];
|
|
||||||
default = "vasion";
|
|
||||||
description = "Company-specific tool configurations";
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
### Environment File Management
|
|
||||||
Could integrate automated setup of `.vasion_env` or similar:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
work_tools_home.envFile = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.path;
|
|
||||||
default = null;
|
|
||||||
description = "Path to work environment variables file";
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Verification Checklist
|
|
||||||
|
|
||||||
After creating the module:
|
|
||||||
|
|
||||||
- [ ] Module imports correctly in desktop-configuration.nix
|
|
||||||
- [ ] Module imports correctly in home.nix
|
|
||||||
- [ ] Options can be toggled without errors
|
|
||||||
- [ ] Docker service starts correctly
|
|
||||||
- [ ] Libvirtd service starts correctly
|
|
||||||
- [ ] Go tools are in PATH
|
|
||||||
- [ ] Node tools are in PATH
|
|
||||||
- [ ] AWS CLI works
|
|
||||||
- [ ] User is in correct groups (docker, libvirtd)
|
|
||||||
- [ ] No duplicate packages between work_tools and personal configs
|
|
||||||
- [ ] Build succeeds with `nix flake check`
|
|
||||||
- [ ] System rebuilds successfully
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Migration Path
|
|
||||||
|
|
||||||
### Current State (nate-work)
|
|
||||||
Work tools scattered across:
|
|
||||||
- `nate-work/modules/niri/niri_conf.nix` (docker, virt-manager)
|
|
||||||
- `nate-work/modules/home-manager/home.nix` (go, node, aws tools)
|
|
||||||
|
|
||||||
### Target State
|
|
||||||
Work tools consolidated in:
|
|
||||||
- `shared/modules/work/work_tools.nix` (system-level)
|
|
||||||
- `shared/modules/work/work_tools_home.nix` (user-level)
|
|
||||||
|
|
||||||
### Steps
|
|
||||||
1. Create module files
|
|
||||||
2. Import modules
|
|
||||||
3. Enable with appropriate flags
|
|
||||||
4. Remove duplicate package declarations
|
|
||||||
5. Test rebuild
|
|
||||||
6. Verify all tools still work
|
|
||||||
7. Commit changes
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Questions to Answer
|
|
||||||
|
|
||||||
Before implementing:
|
|
||||||
|
|
||||||
1. **Should this be in `shared/` or `nate-work/modules/`?**
|
|
||||||
- Recommendation: `shared/` if you might have multiple work machines
|
|
||||||
- Use `nate-work/modules/` if this is Vasion-specific
|
|
||||||
|
|
||||||
2. **Do you want separate modules per tool category?**
|
|
||||||
- Could split into: `work_docker.nix`, `work_go.nix`, etc.
|
|
||||||
- Tradeoff: More files vs. better separation
|
|
||||||
|
|
||||||
3. **Should work tools include LSPs?**
|
|
||||||
- Currently LSPs are in home.nix
|
|
||||||
- Could move to work_tools_home for consistency
|
|
||||||
|
|
||||||
4. **Do you want cloud-specific tool categories?**
|
|
||||||
- AWS tools separate from GCP/Azure?
|
|
||||||
- Or generic "cloud tools" category?
|
|
||||||
|
|
||||||
5. **Should VPN proxy module be part of work_tools?**
|
|
||||||
- Currently separate module
|
|
||||||
- Could integrate or keep separate
|
|
||||||
BIN
dotfiles/Passwords.kdbx
Normal file
86
dotfiles/helix/config.toml
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
# Theme
|
||||||
|
theme = "catppuccin_frappe"
|
||||||
|
|
||||||
|
[keys.normal]
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
n = "move_char_left" # Maps the 'a' key to the move_char_left command
|
||||||
|
i = "move_visual_line_down"
|
||||||
|
e = "move_visual_line_up"
|
||||||
|
o = "move_char_right"
|
||||||
|
|
||||||
|
C-i = "half_page_down"
|
||||||
|
C-e = "half_page_up"
|
||||||
|
|
||||||
|
# Modes
|
||||||
|
h = "insert_mode"
|
||||||
|
l = "open_below"
|
||||||
|
L = "open_above"
|
||||||
|
|
||||||
|
# Search
|
||||||
|
k = "search_next"
|
||||||
|
K = "search_prev"
|
||||||
|
|
||||||
|
|
||||||
|
C-s = ":w" # Maps Ctrl-s to the typable command :w which is an alias for :write (save file)
|
||||||
|
C-o = ":open ~/.config/helix/config.toml" # Maps Ctrl-o to opening of the helix config file
|
||||||
|
C-l = ":open ~/.config/helix/languages.toml"
|
||||||
|
|
||||||
|
[keys.normal.g]
|
||||||
|
P = "goto_previous_buffer"
|
||||||
|
N = "goto_next_buffer"
|
||||||
|
n = "goto_line_start"
|
||||||
|
o = "goto_line_end"
|
||||||
|
|
||||||
|
[keys.select]
|
||||||
|
n = "move_char_left"
|
||||||
|
i = "move_visual_line_down"
|
||||||
|
e = "move_visual_line_up"
|
||||||
|
o = "move_char_right"
|
||||||
|
|
||||||
|
[editor]
|
||||||
|
bufferline = "multiple"
|
||||||
|
auto-save = true
|
||||||
|
line-number = "relative"
|
||||||
|
cursorline = true
|
||||||
|
color-modes = true
|
||||||
|
text-width = 120
|
||||||
|
auto-format = true
|
||||||
|
|
||||||
|
[editor.statusline]
|
||||||
|
left = ["mode", "spinner", "version-control", "file-name"]
|
||||||
|
mode.normal = "Normal"
|
||||||
|
mode.insert = "Insert"
|
||||||
|
mode.select = "Select"
|
||||||
|
|
||||||
|
[editor.indent-guides]
|
||||||
|
render = true
|
||||||
|
|
||||||
|
[editor.lsp]
|
||||||
|
display-messages = true
|
||||||
|
|
||||||
|
[editor.cursor-shape]
|
||||||
|
insert = "bar"
|
||||||
|
normal = "block"
|
||||||
|
select = "underline"
|
||||||
|
|
||||||
|
[editor.file-picker]
|
||||||
|
hidden = false
|
||||||
|
|
||||||
|
[editor.whitespace.render]
|
||||||
|
space = "all"
|
||||||
|
tab = "all"
|
||||||
|
tabpad = "all"
|
||||||
|
newline = "none"
|
||||||
|
nbsp = "none"
|
||||||
|
|
||||||
|
[editor.whitespace.characters]
|
||||||
|
space = "·"
|
||||||
|
tab = "⇀"
|
||||||
|
tabpad = " "
|
||||||
|
|
||||||
|
|
||||||
|
#w = "move_line_up" # Maps the 'w' key move_line_up
|
||||||
|
#"C-S-esc" = "extend_line" # Maps Ctrl-Shift-Escape to extend_line
|
||||||
|
#g = { a = "code_action" } # Maps `ga` to show possible code actions
|
||||||
|
#"ret" = ["open_below", "normal_mode"] # Maps the enter key to open_below then re-enter normal mode
|
||||||
@ -259,7 +259,7 @@ command = "lua-language-server"
|
|||||||
# diagnostics.enable = true
|
# diagnostics.enable = true
|
||||||
|
|
||||||
[language.markdown]
|
[language.markdown]
|
||||||
filetypes = ["md", "markdown"]
|
filetype = ["md", "markdown"]
|
||||||
roots = [".git", ".hg"]
|
roots = [".git", ".hg"]
|
||||||
command = "vscode-markdown-language-server"
|
command = "vscode-markdown-language-server"
|
||||||
args = ["--stdio"]
|
args = ["--stdio"]
|
||||||
@ -28,9 +28,9 @@ set-option global startup_info_version 30000000
|
|||||||
set-option global tabstop 4
|
set-option global tabstop 4
|
||||||
set-option global indentwidth 4
|
set-option global indentwidth 4
|
||||||
set-option global scrolloff 5,3
|
set-option global scrolloff 5,3
|
||||||
declare-option str kakrc_path "~/system/nate/dotfiles/kak/kakrc"
|
declare-option str kakrc_path "~/.config/kak/kakrc"
|
||||||
declare-option str sway_conf_path "~/system/nate/dotfiles/sway/config.d/default"
|
declare-option str sway_conf_path "~/.config/sway/config.d/default"
|
||||||
declare-option str shell_config "~/system/nate/modules/home-manager/home.nix"
|
declare-option str shell_config "~/.zshrc"
|
||||||
|
|
||||||
# plug "catppuccin/kakoune" theme config %{
|
# plug "catppuccin/kakoune" theme config %{
|
||||||
# colorscheme catppuccin_macchiato
|
# colorscheme catppuccin_macchiato
|
||||||
@ -56,20 +56,6 @@ hook global FocusOut .* %{ try %{
|
|||||||
hook global BufWritePost .* %{ evaluate-commands 'git update-diff' }
|
hook global BufWritePost .* %{ evaluate-commands 'git update-diff' }
|
||||||
hook global BufReload .* %{ evaluate-commands 'git update-diff' }
|
hook global BufReload .* %{ evaluate-commands 'git update-diff' }
|
||||||
|
|
||||||
# Color Render in Echo Area
|
|
||||||
hook global WinSetOption filetype=kak %{ hook global NormalIdle .* %{
|
|
||||||
evaluate-commands -save-regs 'a' %{ try %{
|
|
||||||
execute-keys -draft <a-i>w"ay
|
|
||||||
evaluate-commands %sh{ (
|
|
||||||
color="${kak_reg_a}"
|
|
||||||
inverted_color=$(echo "${color}" | perl -pe 'tr/0123456789abcdefABCDEF/fedcba9876543210543210/')
|
|
||||||
printf "%s\n" "evaluate-commands -client $kak_client %{ try %{
|
|
||||||
echo -markup %{{rgb:${inverted_color},rgb:${color}+b} #${color} }
|
|
||||||
}}" | kak -p $kak_session
|
|
||||||
) >/dev/null 2>&1 </dev/null & }
|
|
||||||
}}
|
|
||||||
}}
|
|
||||||
|
|
||||||
# Add default,red and bold style to these regex matches
|
# Add default,red and bold style to these regex matches
|
||||||
add-highlighter global/ regex \b(TODO|FIXME|XXX|NOTE)\b 0:default,red+rb
|
add-highlighter global/ regex \b(TODO|FIXME|XXX|NOTE)\b 0:default,red+rb
|
||||||
|
|
||||||
@ -105,7 +91,6 @@ map global normal <c-S> <a-S> -docstring 'select first and last character of ea
|
|||||||
map global normal '<c-;>' '<a-;>' -docstring 'flip direction of each selection'
|
map global normal '<c-;>' '<a-;>' -docstring 'flip direction of each selection'
|
||||||
map global normal <c-:> <a-:> -docstring 'ensure selections are in forward direction (cursor then anchor)'
|
map global normal <c-:> <a-:> -docstring 'ensure selections are in forward direction (cursor then anchor)'
|
||||||
map global normal <c-,> <a-,> -docstring 'clear the main selection'
|
map global normal <c-,> <a-,> -docstring 'clear the main selection'
|
||||||
map global normal <c-.> <a-.> -docstring 'Repeat last object or f/t selection'
|
|
||||||
|
|
||||||
# Scrolling remap
|
# Scrolling remap
|
||||||
map global normal <c-e> <pageup> -docstring 'Scroll screen up'
|
map global normal <c-e> <pageup> -docstring 'Scroll screen up'
|
||||||
@ -259,17 +244,9 @@ plug "alexherbo2/auto-pairs.kak" %{
|
|||||||
enable-auto-pairs
|
enable-auto-pairs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
plug "https://github.com/h-youhei/kakoune-surround"
|
plug "https://github.com/h-youhei/kakoune-surround"
|
||||||
|
|
||||||
map global normal <c-m> ':surround<ret>'
|
map global normal <c-m> ':surround<ret>'
|
||||||
|
|
||||||
# Custom scripts
|
# Custom scripts
|
||||||
|
source "~/.config/kak/rc/fzf_git.kak"
|
||||||
# evaluate-commands %sh{
|
|
||||||
# for file in ~/.config/kak/rc/*.kak; do
|
|
||||||
# printf "source %s\n" $file
|
|
||||||
# done
|
|
||||||
# }
|
|
||||||
|
|
||||||
# source "~/.config/kak/rc/"
|
|
||||||
@ -1,19 +1,19 @@
|
|||||||
font=Overpass Nerd Font 20
|
font=UbuntuMono 12.5
|
||||||
|
|
||||||
background-color=#24273a
|
background-color=#404552
|
||||||
text-color=#cad3f5
|
text-color=#e5e9f0
|
||||||
width=630
|
width=315
|
||||||
height=400
|
height=200
|
||||||
padding=10
|
padding=10
|
||||||
margin=20
|
margin=10
|
||||||
progress-color=over #eceff480
|
progress-color=over #eceff480
|
||||||
icon-path=/usr/share/icons/Arc-X-D
|
icon-path=/usr/share/icons/Arc-X-D
|
||||||
max-icon-size=140
|
max-icon-size=70
|
||||||
layer=overlay
|
layer=overlay
|
||||||
|
|
||||||
border-size=5
|
border-size=5
|
||||||
border-radius=8
|
border-radius=0
|
||||||
border-color=#b7bdf8
|
border-color=#5294e2
|
||||||
|
|
||||||
default-timeout=5000
|
default-timeout=5000
|
||||||
|
|
||||||
1
dotfiles/sway/background.pid
Normal file
@ -0,0 +1 @@
|
|||||||
|
7376
|
||||||
@ -14,14 +14,13 @@ for_window [class="Telegram"] focus
|
|||||||
|
|
||||||
for_window [app_id="xed"] focus
|
for_window [app_id="xed"] focus
|
||||||
|
|
||||||
# default keepass main window to scratch
|
|
||||||
for_window [app_id="org.keepassxc.KeePassXC"] $floating_window
|
|
||||||
for_window [app_id="org.keepassxc.KeePassXC" title="KeePassXC"] move to scratchpad #, scratchpad show # default to show
|
|
||||||
|
|
||||||
# set floating (nontiling) for apps needing it:
|
# set floating (nontiling)for apps needing it:
|
||||||
for_window [class="Yad" instance="yad"] floating enable
|
for_window [class="Yad" instance="yad"] floating enable
|
||||||
for_window [app_id="yad"] floating enable
|
for_window [app_id="yad"] floating enable
|
||||||
for_window [app_id="blueman-manager"] floating enable, resize set width 40 ppt height 30 ppt
|
for_window [app_id="blueman-manager"] floating enable, resize set width 40 ppt height 30 ppt
|
||||||
|
for_window [app_id="mobile"] floating enable, resize set width 200 ppt height 400 ppt
|
||||||
|
|
||||||
|
|
||||||
# set floating (nontiling) for special apps:
|
# set floating (nontiling) for special apps:
|
||||||
for_window [class="Xsane" instance="xsane"] floating enable
|
for_window [class="Xsane" instance="xsane"] floating enable
|
||||||
@ -30,7 +29,6 @@ for_window [class="qt5ct" instance="qt5ct"] floating enable, resize set width 60
|
|||||||
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
|
for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable
|
||||||
for_window [app_id="pamac-manager"] floating enable, resize set width 80 ppt height 70 ppt
|
for_window [app_id="pamac-manager"] floating enable, resize set width 80 ppt height 70 ppt
|
||||||
for_window [class="Lxappearance"] floating enable, resize set width 60 ppt height 50 ppt
|
for_window [class="Lxappearance"] floating enable, resize set width 60 ppt height 50 ppt
|
||||||
for_window [class="steam" title="^((?!Steam$).)*"] floating enable
|
|
||||||
|
|
||||||
# set floating for window roles
|
# set floating for window roles
|
||||||
for_window [window_role="pop-up"] floating enable
|
for_window [window_role="pop-up"] floating enable
|
||||||
@ -1,5 +1,5 @@
|
|||||||
# Auth with polkit-gnome:
|
# Auth with polkit-gnome:
|
||||||
exec lxqt-policykit-agent
|
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
|
|
||||||
# Desktop notifications
|
# Desktop notifications
|
||||||
exec mako
|
exec mako
|
||||||
@ -145,8 +145,8 @@ exec swayidle -w\
|
|||||||
# Move focus to the parent container
|
# Move focus to the parent container
|
||||||
bindsym $mod+a focus parent
|
bindsym $mod+a focus parent
|
||||||
|
|
||||||
# bindsym $mod+g exec ~/.config/sway/scripts/scale.sh inc
|
bindsym $mod+g exec ~/.config/sway/scripts/scale.sh inc
|
||||||
# bindsym $mod+m exec ~/.config/sway/scripts/scale.sh dec
|
bindsym $mod+m exec ~/.config/sway/scripts/scale.sh dec
|
||||||
|
|
||||||
#
|
#
|
||||||
# Scratchpad:
|
# Scratchpad:
|
||||||
@ -225,7 +225,7 @@ bindsym $mod+r mode "resize"
|
|||||||
#
|
#
|
||||||
# Screenshots
|
# Screenshots
|
||||||
#
|
#
|
||||||
bindsym $mod+Shift+p exec ~/.config/sway/scripts/screenshot.sh clipboard
|
bindsym $mod+Shift+p exec /usr/share/sway/scripts/grimshot --notify save output
|
||||||
bindsym $mod+p exec ~/.config/sway/scripts/screenshot.sh
|
bindsym $mod+p exec ~/.config/sway/scripts/screenshot.sh
|
||||||
#
|
#
|
||||||
# Keybindings List
|
# Keybindings List
|
||||||
@ -9,5 +9,4 @@
|
|||||||
# Wacom Tablet - Example
|
# Wacom Tablet - Example
|
||||||
# input "1386:884:Wacom_Intuos_S_Pad" map_to_output HDMI-A-1
|
# input "1386:884:Wacom_Intuos_S_Pad" map_to_output HDMI-A-1
|
||||||
# input "1386:884:Wacom_Intuos_S_Pen" map_to_output HDMI-A-1
|
# input "1386:884:Wacom_Intuos_S_Pen" map_to_output HDMI-A-1
|
||||||
output DP-3 resolution 3840x2160@240.084Hz position 0,0
|
output * adaptive_sync on
|
||||||
output * adaptive_sync off
|
|
||||||
@ -41,8 +41,8 @@ font pango:Overpass Nerd Font 12
|
|||||||
smart_borders on
|
smart_borders on
|
||||||
|
|
||||||
# Set wallpaper:
|
# Set wallpaper:
|
||||||
exec_always swaybg -i /home/nate/.config/sway/wallpapers/nix-black-4k.png
|
#exec_always swaybg -i /home/nate/.config/sway/wallpapers/ign-0000.png
|
||||||
# exec_always /home/nate/.config/sway/scripts/background.sh
|
exec_always /home/nate/.config/sway/scripts/background.sh
|
||||||
|
|
||||||
# Title format for windows
|
# Title format for windows
|
||||||
for_window [shell="xdg_shell"] title_format "%title (%app_id)"
|
for_window [shell="xdg_shell"] title_format "%title (%app_id)"
|
||||||
@ -71,28 +71,31 @@ bar {
|
|||||||
swaybar_command waybar
|
swaybar_command waybar
|
||||||
}
|
}
|
||||||
|
|
||||||
set $opacity 0.8
|
set $opacity 0.88
|
||||||
set $floating_window floating enable, resize set width 1030 height 710, opacity 1.0
|
set $floating_window floating enable, resize set width 1030 height 710, opacity 1.0
|
||||||
|
|
||||||
for_window {
|
for_window {
|
||||||
[class=".*"] opacity 1.0
|
[class=".*"] opacity $opacity
|
||||||
[app_id=".*"] opacity 1.0
|
[app_id=".*"] opacity $opacity
|
||||||
[app_id="foot"] opacity $opacity
|
[app_id="firefox"] opacity 1.0
|
||||||
[app_id="thunar"] opacity $opacity
|
[app_id="corectrl"] opacity 1.0
|
||||||
|
[app_id="org.keepassxc.KeePassXC"] $floating_window, move to scratchpad, sratchpad show, opacity 1.0
|
||||||
|
[app_id="pavucontrol"] opacity 1.0
|
||||||
|
[app_id="oversteer"] opacity 1.0
|
||||||
|
|
||||||
# Steam
|
|
||||||
[class="steam_app.*"] inhibit_idle fullscreen; floating enable; border none opacity 1.0
|
[class="steam_app.*"] inhibit_idle fullscreen; floating enable; border none opacity 1.0
|
||||||
[class="steam"] opacity 1.0
|
[class="steam"] opacity 1.0
|
||||||
|
[class="leagueclientux.exe"] opacity 1.0
|
||||||
|
[class="obsidian"] opacity 1.0
|
||||||
|
|
||||||
|
[title="(?:Open|Save|Save New|Open a) (?:File|Folder|As|Scene As)"] $floating_window
|
||||||
# Godot windows
|
# Godot windows
|
||||||
|
[title="(?:Godot)"] opacity 1.0
|
||||||
[title="(?:Create New|Select Frames|project.godot|node)"] $floating_window
|
[title="(?:Create New|Select Frames|project.godot|node)"] $floating_window
|
||||||
[title="(?:Create Folder|Node Configuration|Warning|Please Confirm)"] $floating_window, resize set height 200
|
[title="(?:Create Folder|Node Configuration|Warning|Please Confirm)"] $floating_window, resize set height 200
|
||||||
|
|
||||||
# Aseprite
|
# Aseprite
|
||||||
[title="(?:Aseprite)"] opacity 1.0
|
[title="(?:Aseprite)"] opacity 1.0
|
||||||
|
|
||||||
# Floating windows
|
|
||||||
[title="(?:Open|Save|Save New|Open a) (?:File|Folder|As|Scene As)"] $floating_window
|
|
||||||
[window_role="pop-up"] $floating_window
|
[window_role="pop-up"] $floating_window
|
||||||
[window_role="bubble"] $floating_window
|
[window_role="bubble"] $floating_window
|
||||||
[window_role="task_dialog"] $floating_window
|
[window_role="task_dialog"] $floating_window
|
||||||
1
dotfiles/sway/scripts/background.pid
Normal file
@ -0,0 +1 @@
|
|||||||
|
4639
|
||||||
30
dotfiles/sway/scripts/background.sh
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
PID_FILE="background.pid"
|
||||||
|
WP_LOC="/home/nate/.config/sway/wallpapers"
|
||||||
|
PREV_WP=""
|
||||||
|
NEW_WP=$(ls $WP_LOC | sort -R | tail -n 1)
|
||||||
|
transition[0]="any"
|
||||||
|
transition[1]="wave"
|
||||||
|
transition[2]="outer"
|
||||||
|
transition[3]="wipe"
|
||||||
|
transition[4]="center"
|
||||||
|
size=${#transition[@]}
|
||||||
|
|
||||||
|
swww kill
|
||||||
|
|
||||||
|
swww init
|
||||||
|
|
||||||
|
# echo $(pgrep -f background.sh) > $PID_FILE
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
while [[ $PREV_WP == $NEW_WP ]]
|
||||||
|
do
|
||||||
|
NEW_WP=$(ls $WP_LOC | sort -R | tail -n 1)
|
||||||
|
done
|
||||||
|
index=$(($RANDOM % $size))
|
||||||
|
#echo "Picked $WP_LOC/$NEW_WP with effect ${transition[$index]}"
|
||||||
|
swww img $WP_LOC/$NEW_WP --transition-type ${transition[$index]}
|
||||||
|
PREV_WP=$NEW_WP
|
||||||
|
sleep 120
|
||||||
|
done
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
# usage: import-gsettings
|
# usage: import-gsettings
|
||||||
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
|
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/bash
|
||||||
|
|
||||||
SCALE_FILE="scale.txt"
|
SCALE_FILE="scale.txt"
|
||||||
DIRNAME="/tmp/$(ls /tmp | grep scale.sh | head -n 1)"
|
DIRNAME="/tmp/$(ls /tmp | grep scale.sh | head -n 1)"
|
||||||
18
dotfiles/sway/scripts/screenshot.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
entries="Active Screen Output Area Window"
|
||||||
|
|
||||||
|
selected=$(printf '%s\n' $entries | wofi --style=$HOME/.config/wofi/style.widgets.css --conf=$HOME/.config/wofi/config.screenshot | awk '{print tolower($1)}')
|
||||||
|
|
||||||
|
case $selected in
|
||||||
|
active)
|
||||||
|
/usr/share/sway/scripts/grimshot --notify save active;;
|
||||||
|
screen)
|
||||||
|
/usr/share/sway/scripts/grimshot --notify save screen;;
|
||||||
|
output)
|
||||||
|
/usr/share/sway/scripts/grimshot --notify save output;;
|
||||||
|
area)
|
||||||
|
/usr/share/sway/scripts/grimshot --notify save area;;
|
||||||
|
window)
|
||||||
|
/usr/share/sway/scripts/grimshot --notify save window;;
|
||||||
|
esac
|
||||||
15
dotfiles/sway/scripts/weather.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
LOC="$1"
|
||||||
|
# HTML encode string as %20
|
||||||
|
LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC")
|
||||||
|
content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=NewYork°=C")
|
||||||
|
ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' )
|
||||||
|
# echo $ICON
|
||||||
|
TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g')
|
||||||
|
TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g')
|
||||||
|
CLASS=$(echo $content | jq .skytext)
|
||||||
|
echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP $LOC'", "class": '$CLASS' }'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 221 KiB After Width: | Height: | Size: 221 KiB |
|
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 772 KiB After Width: | Height: | Size: 772 KiB |
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 344 KiB After Width: | Height: | Size: 344 KiB |
|
Before Width: | Height: | Size: 591 KiB After Width: | Height: | Size: 591 KiB |
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 138 KiB |
@ -2,27 +2,21 @@
|
|||||||
{
|
{
|
||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "top",
|
"position": "top",
|
||||||
"margin-top": 3,
|
"margin-top": 8,
|
||||||
"margin-left": 10,
|
"margin-left": 10,
|
||||||
"margin-right": 10,
|
"margin-right": 10,
|
||||||
"margin-bottom": 3,
|
"margin-bottom": 8,
|
||||||
|
|
||||||
// If height property would be not present, it'd be calculated dynamically
|
// If height property would be not present, it'd be calculated dynamically
|
||||||
"height": 60,
|
"height": 30,
|
||||||
|
|
||||||
"modules-left": [
|
"modules-left": [
|
||||||
"custom/launcher",
|
"custom/launcher",
|
||||||
"hyprland/workspaces"
|
"sway/workspaces",
|
||||||
// "hyprland/submap",
|
"sway/mode",
|
||||||
],
|
],
|
||||||
|
|
||||||
"modules-center": [
|
"modules-center": [
|
||||||
"custom/signal",
|
|
||||||
"custom/steam",
|
|
||||||
"custom/spotify",
|
|
||||||
"custom/firefox",
|
|
||||||
"custom/slack",
|
|
||||||
"custom/files",
|
|
||||||
],
|
],
|
||||||
|
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
@ -31,11 +25,12 @@
|
|||||||
"memory",
|
"memory",
|
||||||
"cpu",
|
"cpu",
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
|
"custom/spotify",
|
||||||
"custom/keyboard-layout",
|
"custom/keyboard-layout",
|
||||||
"battery",
|
"battery",
|
||||||
//"custom/PBPbattery",
|
//"custom/PBPbattery",
|
||||||
// "backlight#icon",
|
"backlight#icon",
|
||||||
// "backlight#value",
|
"backlight#value",
|
||||||
"clock",
|
"clock",
|
||||||
"tray",
|
"tray",
|
||||||
//"custom/weather",
|
//"custom/weather",
|
||||||
@ -85,7 +80,7 @@
|
|||||||
"warning": 70,
|
"warning": 70,
|
||||||
"critical": 90,
|
"critical": 90,
|
||||||
},
|
},
|
||||||
"on-click": "foot -e 'htop'",
|
"on-click": "xfce4-terminal -e 'htop'",
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/keyboard-layout": {
|
"custom/keyboard-layout": {
|
||||||
@ -102,7 +97,7 @@
|
|||||||
"memory": {
|
"memory": {
|
||||||
"interval": 5,
|
"interval": 5,
|
||||||
"format": " {}%", // Icon: memory
|
"format": " {}%", // Icon: memory
|
||||||
"on-click": "foot -e 'htop'",
|
"on-click": "xfce4-terminal -e 'htop'",
|
||||||
"states": {
|
"states": {
|
||||||
"warning": 70,
|
"warning": 70,
|
||||||
"critical": 90
|
"critical": 90
|
||||||
@ -115,7 +110,7 @@
|
|||||||
"format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
|
"format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
|
||||||
"format-disconnected": "⚠ Disconnected",
|
"format-disconnected": "⚠ Disconnected",
|
||||||
"tooltip-format": "{ifname}: {ipaddr}",
|
"tooltip-format": "{ifname}: {ipaddr}",
|
||||||
"on-click": "foot -e 'nmtui'",
|
"on-click": "xfce4-terminal -e 'nmtui'",
|
||||||
},
|
},
|
||||||
"network#vpn": {
|
"network#vpn": {
|
||||||
"interface": "tun0",
|
"interface": "tun0",
|
||||||
@ -124,45 +119,46 @@
|
|||||||
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
|
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
|
||||||
},
|
},
|
||||||
|
|
||||||
// "hyprland/submap": {
|
"sway/mode": {
|
||||||
// "format": "{}",
|
"format": "{}",
|
||||||
// "tooltip": false
|
"tooltip": false
|
||||||
// },
|
},
|
||||||
|
|
||||||
// "sway/window": {
|
"sway/window": {
|
||||||
// "format": "{}",
|
"format": "{}",
|
||||||
// "max-length": 120
|
"max-length": 120
|
||||||
// },
|
},
|
||||||
|
|
||||||
"hyprland/workspaces": {
|
"sway/workspaces": {
|
||||||
// "disable-scroll": true,
|
"disable-scroll": true,
|
||||||
// "disable-markup" : false,
|
"disable-markup" : false,
|
||||||
// "all-outputs": true,
|
"all-outputs": true,
|
||||||
"format": " {icon} "
|
"format": " {icon} ",
|
||||||
// "format-icons": {
|
//"format":"{icon}",
|
||||||
// "1": "",
|
"format-icons": {
|
||||||
// "2": "",
|
"1": "",
|
||||||
// "3": "",
|
"2": "",
|
||||||
// "4": "",
|
"3": "",
|
||||||
// }
|
"4": "",
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
"scroll-step": 1, // %, can be a float
|
"scroll-step": 1, // %, can be a float
|
||||||
"format": "{volume}% {icon}",
|
"format": "{volume}% {icon}",
|
||||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||||
"format-bluetooth-muted": " {icon} {format_source}",
|
"format-bluetooth-muted": " {icon} {format_source}",
|
||||||
"format-muted": " {format_source}",
|
"format-muted": "婢 {format_source}",
|
||||||
"format-source": "{volume}% ",
|
"format-source": "{volume}% ",
|
||||||
"format-source-muted": "",
|
"format-source-muted": "",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
"headphone": "",
|
"headphone": "",
|
||||||
"hands-free": "",
|
"hands-free": "וֹ",
|
||||||
"headset": "",
|
"headset": " ",
|
||||||
"phone": "",
|
"phone": "",
|
||||||
"portable": "",
|
"portable": "",
|
||||||
"car": "",
|
"car": "",
|
||||||
"default": [""]
|
"default": [""]
|
||||||
},
|
},
|
||||||
"on-click": "pavucontrol",
|
"on-click": "pavucontrol",
|
||||||
"on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +2%",
|
"on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +2%",
|
||||||
@ -177,12 +173,6 @@
|
|||||||
"interval": 600,
|
"interval": 600,
|
||||||
},
|
},
|
||||||
|
|
||||||
// "custom/temp": {
|
|
||||||
// "exec": "notify-send \"temp thing\"",
|
|
||||||
// "interval": "once",
|
|
||||||
// "signal": 8,
|
|
||||||
// },
|
|
||||||
|
|
||||||
"tray": {
|
"tray": {
|
||||||
"icon-size": 18,
|
"icon-size": 18,
|
||||||
"spacing":10,
|
"spacing":10,
|
||||||
@ -201,56 +191,30 @@
|
|||||||
"on-scroll-up": "brightnessctl -c backlight set +1%"
|
"on-scroll-up": "brightnessctl -c backlight set +1%"
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/signal": {
|
"custom/firefox": {
|
||||||
"format": " ",
|
"format": " ",
|
||||||
"on-click": "exec signal",
|
"on-click": "exec firefox",
|
||||||
"tooltip": false,
|
"tooltip": false
|
||||||
},
|
|
||||||
|
|
||||||
"custom/steam": {
|
|
||||||
"format": " ",
|
|
||||||
"on-click": "exec steam",
|
|
||||||
"tooltip": false,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/spotify": {
|
"custom/spotify": {
|
||||||
"format": " ",
|
"format": " ",
|
||||||
"on-click": "foot -e 'ncspot'",
|
"on-click": "xfce4-terminal -e 'ncspot'",
|
||||||
"tooltip": false,
|
"tooltip": false
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/firefox": {
|
"custom/terminal": {
|
||||||
"format": " ",
|
"format": " ",
|
||||||
"on-click": "exec firefox",
|
"on-click": "exec xfce4-terminal",
|
||||||
"tooltip": false,
|
"tooltip": false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
"custom/slack": {
|
|
||||||
"format": " ",
|
|
||||||
"on-click": "slack",
|
|
||||||
"tooltip": false,
|
|
||||||
"exec if": "pgrep slack"
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
"custom/files": {
|
"custom/files": {
|
||||||
"format": " ",
|
"format": " ",
|
||||||
"on-click": "exec thunar",
|
"on-click": "exec thunar",
|
||||||
"tooltip": false,
|
"tooltip": false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
// "custom/pomo": {
|
|
||||||
// "format": " {} ",
|
|
||||||
// "exec": "/home/nate/source/pomozoro/zig-out/bin/pomozoro",
|
|
||||||
// "return-type": "json",
|
|
||||||
// "on-click": "echo 's' > ~/.local/share/pomozoro/pomopipe",
|
|
||||||
// "on-click-right": "echo 'p' > ~/.local/share/pomozoro/pomopipe",
|
|
||||||
// "on-click-middle": "echo 'r' > ~/.local/share/pomozoro/pomopipe",
|
|
||||||
// // "signal": 8,
|
|
||||||
// },
|
|
||||||
|
|
||||||
"custom/launcher": {
|
"custom/launcher": {
|
||||||
"format":" ",
|
"format":" ",
|
||||||
"on-click": "exec wofi -c ~/.config/wofi/config -I",
|
"on-click": "exec wofi -c ~/.config/wofi/config -I",
|
||||||
21
dotfiles/waybar/scripts/PBPbattery.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
#simple Shellscript for waybar/i3blocks/polybar on Pinebook pro
|
||||||
|
#05012020 geri123@gmx.net Gerhard S.
|
||||||
|
|
||||||
|
PERCENT=$(cat /sys/class/power_supply/cw2015-battery/capacity)
|
||||||
|
STATUS=$(cat /sys/class/power_supply/cw2015-battery/status)
|
||||||
|
case $((
|
||||||
|
$PERCENT >= 0 && $PERCENT <= 20 ? 1 :
|
||||||
|
$PERCENT > 20 && $PERCENT <= 40 ? 2 :
|
||||||
|
$PERCENT > 40 && $PERCENT <= 60 ? 3 :
|
||||||
|
$PERCENT > 60 && $PERCENT <= 80 ? 4 : 5)) in
|
||||||
|
#
|
||||||
|
(1) echo $STATUS:"":$PERCENT%;;
|
||||||
|
(2) echo $STATUS:"":$PERCENT%;;
|
||||||
|
(3) echo $STATUS:"":$PERCENT%;;
|
||||||
|
(4) echo $STATUS:"":$PERCENT%;;
|
||||||
|
(5) echo $STATUS:"":$PERCENT%;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/bash
|
||||||
|
|
||||||
entries="Default Colemak"
|
entries="Default Colemak"
|
||||||
|
|
||||||
2
dotfiles/waybar/scripts/keyhint.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
yad --title="EndeavourOS Sway-WM keybindings:" --no-buttons --geometry=400x345-15-400 --list --column=key: --column=description: --column=command: "ESC" "close this app" "" "=" "modkey" "(set mod Mod4)" "+enter" "Terminal" "(xfce4-terminal)" "+d" "Application Menu" "(wofi)" "+p" "Activities" "(wofi)" "+o" "" "Open Broswer" "+n" "" "Open Files" "+q" "close focused app" "(kill)" "[Shift]+Print-key" "screenshot" "(grim)" "+Shift+e" "power-menu" "(wofi)" "+t" "open keybinding helper" "full list"
|
||||||
13
dotfiles/waybar/scripts/weather.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
LOC="$1"
|
||||||
|
# HTML encode string as %20
|
||||||
|
LOCATION=$(sed -e "s/ /%20/g" <<<"$LOC")
|
||||||
|
content=$(curl -sS "https://thisdavej.azurewebsites.net/api/weather/current?loc=$LOCATION°=C")
|
||||||
|
ICON=$(curl -s 'https://wttr.in/?format=1' | sed 's/[+0-9a-cA-Z°-]//g' )
|
||||||
|
# echo $ICON
|
||||||
|
TEMP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)"' | sed 's/"//g')
|
||||||
|
TOOLTIP=$(echo $content | jq -r '. | "\(.temperature)°\(.degType)\n\(.skytext)"' | sed 's/"//g')
|
||||||
|
CLASS=$(echo $content | jq .skytext)
|
||||||
|
echo '{"text": "'$TEMP'", "tooltip": "'$ICON $TOOLTIP $LOC'", "class": '$CLASS' }'
|
||||||
|
|
||||||
219
dotfiles/waybar/style.css
Normal file
@ -0,0 +1,219 @@
|
|||||||
|
/* =============================================================================
|
||||||
|
*
|
||||||
|
* Waybar configuration
|
||||||
|
*
|
||||||
|
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
|
||||||
|
*
|
||||||
|
* =========================================================================== */
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Keyframes
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
Nordic Color Scheme
|
||||||
|
*/
|
||||||
|
@define-color nord2 #434c5e;
|
||||||
|
@define-color nord3 #4c566a;
|
||||||
|
@define-color nord4 #d8dee9;
|
||||||
|
@define-color nord8 #88c0d0;
|
||||||
|
@define-color nord9 #81a1c1;
|
||||||
|
@define-color nord_cyan #8fbcbb;
|
||||||
|
@define-color nord_orange #d08770;
|
||||||
|
@define-color nord_red #bf616a;
|
||||||
|
@define-color nord_green #a3be8c;
|
||||||
|
@define-color nord_yellow #ebcb8b;
|
||||||
|
|
||||||
|
@keyframes blink-warning {
|
||||||
|
70% {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: white;
|
||||||
|
background-color: @nord_orange;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink-critical {
|
||||||
|
70% {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: white;
|
||||||
|
background-color: @nord_red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Base styles
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* Reset all styles */
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
margin: 1px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The whole bar */
|
||||||
|
#waybar {
|
||||||
|
background: transparent;
|
||||||
|
color: @nord4;
|
||||||
|
background-color: @nord3;
|
||||||
|
font-family: Overpass Nerd Font;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Every modules */
|
||||||
|
#battery,
|
||||||
|
#clock,
|
||||||
|
#backlight,
|
||||||
|
#cpu,
|
||||||
|
#custom-keyboard-layout,
|
||||||
|
#memory,
|
||||||
|
#mode,
|
||||||
|
#custom-weather,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#temperature,
|
||||||
|
#tray,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#custom-PBPbattery {
|
||||||
|
padding:0.5rem 0.6rem;
|
||||||
|
margin: 1px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Modules styles
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: @nord_orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: @nord_red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning.discharging {
|
||||||
|
animation-name: blink-warning;
|
||||||
|
animation-duration: 3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical.discharging {
|
||||||
|
animation-name: blink-critical;
|
||||||
|
animation-duration: 2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu.warning {
|
||||||
|
color: @nord_orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu.critical {
|
||||||
|
color: @nord_red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory.warning {
|
||||||
|
color: @nord_orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory.critical {
|
||||||
|
color: @nord_red;
|
||||||
|
animation-name: blink-critical;
|
||||||
|
animation-duration: 2s;
|
||||||
|
padding-left:5px;
|
||||||
|
padding-right:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background: @nord8;
|
||||||
|
border-bottom: 3px transparent;
|
||||||
|
color:white;
|
||||||
|
margin-left: 5px;
|
||||||
|
padding: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network.disconnected {
|
||||||
|
color: @nord_orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
padding-top:6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
|
||||||
|
color: @nord_cyan;
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature.critical {
|
||||||
|
color: @nord_red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
font-size:13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
border-bottom: 3px solid transparent;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
padding:0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-launcher {
|
||||||
|
color: @nord9;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-spotify {
|
||||||
|
color: @nord_green;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
border-bottom: 3px solid @nord_green;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
padding-left:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
border-color: @nord2;
|
||||||
|
color: @nord_yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-power {
|
||||||
|
margin-left:15px;
|
||||||
|
margin-right:15px;
|
||||||
|
font-size:15px;
|
||||||
|
color: @nord_orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-launcher {
|
||||||
|
font-size:15px;
|
||||||
|
margin-left:15px;
|
||||||
|
margin-right:10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#backlight.icon {
|
||||||
|
padding-right:1px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
416
flake.lock
generated
@ -1,166 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"base16": {
|
|
||||||
"inputs": {
|
|
||||||
"fromYaml": "fromYaml"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1755819240,
|
|
||||||
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
|
|
||||||
"owner": "SenchoPens",
|
|
||||||
"repo": "base16.nix",
|
|
||||||
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "SenchoPens",
|
|
||||||
"repo": "base16.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"base16-fish": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1765809053,
|
|
||||||
"narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=",
|
|
||||||
"owner": "tomyun",
|
|
||||||
"repo": "base16-fish",
|
|
||||||
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tomyun",
|
|
||||||
"repo": "base16-fish",
|
|
||||||
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"base16-helix": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1760703920,
|
|
||||||
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-helix",
|
|
||||||
"rev": "d646af9b7d14bff08824538164af99d0c521b185",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-helix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"base16-vim": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1732806396,
|
|
||||||
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-vim",
|
|
||||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-vim",
|
|
||||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"firefox-gnome-theme": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1764873433,
|
|
||||||
"narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=",
|
|
||||||
"owner": "rafaelmardojai",
|
|
||||||
"repo": "firefox-gnome-theme",
|
|
||||||
"rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "rafaelmardojai",
|
|
||||||
"repo": "firefox-gnome-theme",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": [
|
|
||||||
"nur",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733312601,
|
|
||||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-parts_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs-lib": [
|
|
||||||
"stylix",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767609335,
|
|
||||||
"narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"rev": "250481aafeb741edfe23d29195671c19b36b6dca",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "flake-parts",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fromYaml": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731966426,
|
|
||||||
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
|
|
||||||
"owner": "SenchoPens",
|
|
||||||
"repo": "fromYaml",
|
|
||||||
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "SenchoPens",
|
|
||||||
"repo": "fromYaml",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gnome-shell": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"host": "gitlab.gnome.org",
|
|
||||||
"lastModified": 1767737596,
|
|
||||||
"narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=",
|
|
||||||
"owner": "GNOME",
|
|
||||||
"repo": "gnome-shell",
|
|
||||||
"rev": "ef02db02bf0ff342734d525b5767814770d85b49",
|
|
||||||
"type": "gitlab"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"host": "gitlab.gnome.org",
|
|
||||||
"owner": "GNOME",
|
|
||||||
"ref": "gnome-49",
|
|
||||||
"repo": "gnome-shell",
|
|
||||||
"type": "gitlab"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -168,59 +7,46 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770260404,
|
"lastModified": 1702735279,
|
||||||
"narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=",
|
"narHash": "sha256-SztEzDOE/6bDNnWWvnRbSHPVrgewLwdSei1sxoZFejM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b",
|
"rev": "e9b9ecef4295a835ab073814f100498716b05a96",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-25.11",
|
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nix-ld": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770631810,
|
"lastModified": 1701153607,
|
||||||
"narHash": "sha256-b7iK/x+zOXbjhRqa+XBlYla4zFvPZyU5Ln2HJkiSnzc=",
|
"narHash": "sha256-h+odOVyiGmEERMECoFOj5P7FPiMR8IPRzroFA4sKivg=",
|
||||||
"owner": "NixOS",
|
"owner": "Mic92",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nix-ld",
|
||||||
"rev": "2889685785848de940375bf7fea5e7c5a3c8d502",
|
"rev": "bf5aa84a713c31d95b4307e442e966d6c7fd7ae7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "Mic92",
|
||||||
"ref": "master",
|
"repo": "nix-ld",
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771208521,
|
"lastModified": 1702312524,
|
||||||
"narHash": "sha256-X01Q3DgSpjeBpapoGA4rzKOn25qdKxbPnxHeMLNoHTU=",
|
"narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fa56d7d6de78f5a7f997b0ea2bc6efd5868ad9e8",
|
"rev": "a9bf124c46ef298113270b1f84a164865987a91c",
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-25.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1771008912,
|
|
||||||
"narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a82ccc39b39b621151d6732718e3e250109076fa",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -230,78 +56,29 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770562336,
|
"lastModified": 1702346276,
|
||||||
"narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=",
|
"narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d6c71932130818840fc8fe9509cf50be8c64634f",
|
"rev": "cf28ee258fd5f9a52de6b9865cdb93a1f96d09b7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-23.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"noctalia": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs-unstable"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1770781953,
|
|
||||||
"narHash": "sha256-yrIjM7EGTJsSp3E5UfypzJIIt2AviE59V3Wy1uQJrxg=",
|
|
||||||
"owner": "noctalia-dev",
|
|
||||||
"repo": "noctalia-shell",
|
|
||||||
"rev": "17138ca7c042da096b9c8c9422de4ed4e2f91bcd",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "noctalia-dev",
|
|
||||||
"repo": "noctalia-shell",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": "nixpkgs_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770671471,
|
"lastModified": 1702770334,
|
||||||
"narHash": "sha256-XpSArPAk0WwHVB3Lj4/J9eFUTWhjhL9KXSIOPelCENY=",
|
"narHash": "sha256-MVILxIF9ZVIk0f9w3yYZpy8auwxgey0MFzdoIFFvQNU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "2a64dca9f90414d5cf6d5c49c30aff09dcb709de",
|
"rev": "1d37444620523278aa163bb9e30104f5d1152061",
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "NUR",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur_2": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-parts": [
|
|
||||||
"stylix",
|
|
||||||
"flake-parts"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"stylix",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767886815,
|
|
||||||
"narHash": "sha256-pB2BBv6X9cVGydEV/9Y8+uGCvuYJAlsprs1v1QHjccA=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "NUR",
|
|
||||||
"rev": "4ff84374d77ff62e2e13a46c33bfeb73590f9fef",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -313,143 +90,10 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nix-ld": "nix-ld",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"noctalia": "noctalia",
|
"nur": "nur"
|
||||||
"nur": "nur",
|
|
||||||
"stylix": "stylix"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stylix": {
|
|
||||||
"inputs": {
|
|
||||||
"base16": "base16",
|
|
||||||
"base16-fish": "base16-fish",
|
|
||||||
"base16-helix": "base16-helix",
|
|
||||||
"base16-vim": "base16-vim",
|
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
|
||||||
"flake-parts": "flake-parts_2",
|
|
||||||
"gnome-shell": "gnome-shell",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nur": "nur_2",
|
|
||||||
"systems": "systems",
|
|
||||||
"tinted-foot": "tinted-foot",
|
|
||||||
"tinted-kitty": "tinted-kitty",
|
|
||||||
"tinted-schemes": "tinted-schemes",
|
|
||||||
"tinted-tmux": "tinted-tmux",
|
|
||||||
"tinted-zed": "tinted-zed"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1770308890,
|
|
||||||
"narHash": "sha256-7bx8Bn9B2g/loBaz+uLwdKI2rUW+RhDPyP/MqAgvrxU=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "stylix",
|
|
||||||
"rev": "7e7fa955abac04a8e118b1cedf930a8fd41c34a6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "release-25.11",
|
|
||||||
"repo": "stylix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tinted-foot": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1726913040,
|
|
||||||
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "tinted-foot",
|
|
||||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "tinted-foot",
|
|
||||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tinted-kitty": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1735730497,
|
|
||||||
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "tinted-kitty",
|
|
||||||
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "tinted-kitty",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tinted-schemes": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767817087,
|
|
||||||
"narHash": "sha256-eGE8OYoK6HzhJt/7bOiNV2cx01IdIrHL7gXgjkHRdNo=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "schemes",
|
|
||||||
"rev": "bd99656235aab343e3d597bf196df9bc67429507",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "schemes",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tinted-tmux": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767489635,
|
|
||||||
"narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "tinted-tmux",
|
|
||||||
"rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "tinted-tmux",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tinted-zed": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767488740,
|
|
||||||
"narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=",
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-zed",
|
|
||||||
"rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "tinted-theming",
|
|
||||||
"repo": "base16-zed",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
157
flake.nix
@ -2,146 +2,71 @@
|
|||||||
description = "NixOS system flake.";
|
description = "NixOS system flake.";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
home-manager = {
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||||
url = "github:nix-community/home-manager/release-25.11";
|
|
||||||
|
nix-ld = {
|
||||||
|
url = "github:Mic92/nix-ld";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# bonus inputs
|
|
||||||
stylix = {
|
|
||||||
url = "github:nix-community/stylix/release-25.11";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
nur.url = "github:nix-community/NUR";
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
||||||
noctalia = {
|
|
||||||
url = "github:noctalia-dev/noctalia-shell";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, stylix, nur, home-manager, nixos-hardware, noctalia, ... } @ inputs:
|
nur.url = "github:nix-community/NUR";
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# firefox-addons = {
|
||||||
|
# url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||||
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, nixpkgs-stable, nix-ld, nur, home-manager, ... } @ inputs:
|
||||||
let
|
let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
userName = "nate";
|
||||||
|
fullName = "Nate Anderson";
|
||||||
|
email = "n8r@tuta.io";
|
||||||
|
hostName = "winmax";
|
||||||
|
desktop = "sway";
|
||||||
|
gaming = true;
|
||||||
timeZone = "America/Denver";
|
timeZone = "America/Denver";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
unstablePkgs = import nixpkgs-unstable { system = system; config = { allowUnfree = true; }; };
|
stablePkgs = nixpkgs-stable.legacyPackages.${system};
|
||||||
|
|
||||||
# pkgs23 = import nixpkgs-23 { system = system; config = { allowUnfree = true; }; };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
luci = nixpkgs.lib.nixosSystem {
|
nixServer = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = { inherit inputs; };
|
||||||
inherit inputs outputs timeZone system;
|
|
||||||
};
|
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.nixosModules.home-manager {
|
# nixpkgs.overlays = [ nur.overlay ];
|
||||||
home-manager.useGlobalPkgs = true;
|
./nixos/server_configuration.nix
|
||||||
home-manager.useUserPackages = true;
|
inputs.home-manager.nixosModules.default
|
||||||
home-manager.users.luci = import ./luci/modules/home-manager/home.nix;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit inputs outputs;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
./luci/default.nix
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nate = nixpkgs.lib.nixosSystem {
|
nixDesktop = nixpkgs.lib.nixosSystem {
|
||||||
# Pass args to desktop configuration
|
# Pass args to desktop configuration
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs outputs timeZone system;
|
inherit inputs outputs userName hostName desktop timeZone gaming system;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
stylix.nixosModules.stylix
|
./nixos/desktop_configuration.nix
|
||||||
|
# Setup nix-ld
|
||||||
|
nix-ld.nixosModules.nix-ld
|
||||||
# Setup home manager
|
# Setup home manager
|
||||||
inputs.home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.nate = import ./nate/modules/home-manager/home.nix;
|
home-manager.users.${userName} = import ./modules/home-manager/home.nix;
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = {
|
||||||
inherit inputs outputs unstablePkgs;
|
inherit inputs outputs userName fullName email hostName desktop gaming;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
./nate/default.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
nate-work = nixpkgs.lib.nixosSystem {
|
|
||||||
# Pass args to desktop configuration
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs outputs timeZone system;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
# Setup home manager
|
|
||||||
inputs.home-manager.nixosModules.home-manager {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.nate = import ./nate-work/modules/home-manager/home.nix;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit inputs outputs unstablePkgs;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
./nate-work/default.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
jaci = nixpkgs.lib.nixosSystem {
|
|
||||||
# Pass args to desktop configuration
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs outputs timeZone system;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
# Setup home manager
|
|
||||||
inputs.home-manager.nixosModules.home-manager {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.jaci = import ./jaci/modules/home-manager/home.nix;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit inputs outputs unstablePkgs;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
./jaci/default.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# DEPRECATED: scrappy system is no longer in use
|
|
||||||
# scrappy = nixpkgs.lib.nixosSystem {
|
|
||||||
# # Pass args to desktop configuration
|
|
||||||
# specialArgs = {
|
|
||||||
# inherit inputs outputs timeZone system;
|
|
||||||
# };
|
|
||||||
# modules = [
|
|
||||||
# # Setup home manager
|
|
||||||
# inputs.home-manager.nixosModules.home-manager {
|
|
||||||
# home-manager.useGlobalPkgs = true;
|
|
||||||
# home-manager.useUserPackages = true;
|
|
||||||
# home-manager.users.scrappy = import ./scrappy/modules/home-manager/home.nix;
|
|
||||||
# home-manager.extraSpecialArgs = {
|
|
||||||
# inherit inputs outputs unstablePkgs;
|
|
||||||
# };
|
|
||||||
# }
|
|
||||||
# ./scrappy/default.nix
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
frame12 = nixpkgs.lib.nixosSystem {
|
|
||||||
# Pass args to desktop configuration
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs outputs timeZone system;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
# Setup home manager
|
|
||||||
inputs.home-manager.nixosModules.home-manager {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.nate = import ./frame12/modules/home-manager/home.nix;
|
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit inputs outputs unstablePkgs;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
./frame12/default.nix
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
{ config, lib, inputs, outputs, pkgs, system, timeZone, ... }:
|
|
||||||
let
|
|
||||||
userName = "nate";
|
|
||||||
fullName = "Nate Anderson";
|
|
||||||
email = "n8r@tuta.io";
|
|
||||||
hostName = "frame12";
|
|
||||||
desktop = "niri";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
inputs.nixos-hardware.nixosModules.framework-12-13th-gen-intel
|
|
||||||
./desktop-configuration.nix
|
|
||||||
./nixos/hardware-configuration.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
deskCfg = {
|
|
||||||
userName = userName;
|
|
||||||
hostName = hostName;
|
|
||||||
fullName = fullName;
|
|
||||||
de = desktop;
|
|
||||||
flakePath = "/home/${userName}/nixos";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Limit the number of generations to keep
|
|
||||||
boot.loader.systemd-boot.configurationLimit = 5;
|
|
||||||
|
|
||||||
# Systemd initrd for Plymouth and faster boot
|
|
||||||
boot.initrd.systemd.enable = true;
|
|
||||||
|
|
||||||
# Perform garbage collection weekly to maintain low disk usage
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "weekly";
|
|
||||||
options = "--delete-older-than 14d";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Optimize storage
|
|
||||||
# You can also manually optimize the store via:
|
|
||||||
# nix-store --optimise
|
|
||||||
# Refer to the following link for more details:
|
|
||||||
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
|
|
||||||
nix.settings.auto-optimise-store = true;
|
|
||||||
}
|
|
||||||
@ -1,226 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
pkgs,
|
|
||||||
timeZone,
|
|
||||||
system,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
supportedDesktops = [ "niri" ];
|
|
||||||
supportedDesktopsStr = lib.strings.concatStringsSep ", " supportedDesktops;
|
|
||||||
deskCfg = config.deskCfg;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.deskCfg = {
|
|
||||||
de = lib.mkOption {
|
|
||||||
default = "";
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Desktop Environment";
|
|
||||||
};
|
|
||||||
userName = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Main username for system";
|
|
||||||
};
|
|
||||||
hostName = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Hostname for system";
|
|
||||||
};
|
|
||||||
fullName = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "User";
|
|
||||||
description = "Full display name for the user";
|
|
||||||
};
|
|
||||||
flakePath = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Absolute path to the NixOS flake configuration directory";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
../shared/modules/user/main_user.nix
|
|
||||||
modules/niri/niri_conf.nix
|
|
||||||
modules/colemak-ec.nix
|
|
||||||
../shared/modules/system/power_manager.nix
|
|
||||||
../shared/modules/system/noctalia-system.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion = builtins.elem deskCfg.de supportedDesktops;
|
|
||||||
message = "Unsupported desktop environment: ${deskCfg.de}\nSupported DE's: ${supportedDesktopsStr}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Stylix theming
|
|
||||||
stylix = {
|
|
||||||
enable = true;
|
|
||||||
# image = ./wallpaper.png;
|
|
||||||
|
|
||||||
# Check with `nix build nixpkgs#base16-schemes && ls result/share/themes`
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/kimber.yaml";
|
|
||||||
polarity = "dark";
|
|
||||||
|
|
||||||
# System-wide cursor
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.bibata-cursors;
|
|
||||||
name = "Bibata-Modern-Classic";
|
|
||||||
size = 32;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Fonts
|
|
||||||
fonts = {
|
|
||||||
serif = {
|
|
||||||
package = pkgs.lato;
|
|
||||||
name = "Lato";
|
|
||||||
};
|
|
||||||
sansSerif = {
|
|
||||||
package = pkgs.lato;
|
|
||||||
name = "Lato";
|
|
||||||
};
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.maple-mono.NF;
|
|
||||||
name = "Maple Mono NF";
|
|
||||||
};
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-color-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
sizes = {
|
|
||||||
applications = 14;
|
|
||||||
desktop = 12;
|
|
||||||
popups = 12;
|
|
||||||
terminal = 16;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Icon theme for tray applets (nm-applet, etc.)
|
|
||||||
iconTheme = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.papirus-icon-theme;
|
|
||||||
light = "Papirus-Light";
|
|
||||||
dark = "Papirus-Dark";
|
|
||||||
};
|
|
||||||
|
|
||||||
targets = {
|
|
||||||
# Keep custom Framework plymouth theme
|
|
||||||
plymouth.enable = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
inputs.nur.overlays.default
|
|
||||||
];
|
|
||||||
|
|
||||||
# Intel graphics acceleration
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
|
|
||||||
# Enable flakes feature
|
|
||||||
nix.settings.experimental-features = [
|
|
||||||
"nix-command"
|
|
||||||
"flakes"
|
|
||||||
];
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
plymouth = {
|
|
||||||
enable = true;
|
|
||||||
theme = "framework";
|
|
||||||
themePackages = [
|
|
||||||
(pkgs.runCommand "plymouth-framework-theme" { } ''
|
|
||||||
mkdir -p $out/share/plymouth/themes/framework
|
|
||||||
cp -r ${./framework-plymouth-theme/framework}/* $out/share/plymouth/themes/framework/
|
|
||||||
substituteInPlace $out/share/plymouth/themes/framework/framework.plymouth \
|
|
||||||
--replace-fail "@IMAGEDIR@" "$out/share/plymouth/themes/framework"
|
|
||||||
# substituteInPlace $out/share/plymouth/themes/framework/framework.script \
|
|
||||||
# --replace-fail "@IMAGEDIR@" "$out/share/plymouth/themes/framework"
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable "Silent Boot"
|
|
||||||
consoleLogLevel = 0;
|
|
||||||
initrd.verbose = false;
|
|
||||||
kernelParams = [
|
|
||||||
"quiet"
|
|
||||||
"splash"
|
|
||||||
"boot.shell_on_fail"
|
|
||||||
"loglevel=3"
|
|
||||||
"rd.systemd.show_status=false"
|
|
||||||
"rd.udev.log_level=3"
|
|
||||||
"udev.log_priority=3"
|
|
||||||
];
|
|
||||||
# Hide the OS choice for bootloaders.
|
|
||||||
# It's still possible to open the bootloader list by pressing any key
|
|
||||||
# It will just not appear on screen unless a key is pressed
|
|
||||||
loader.timeout = 1;
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
# Use latest kernel packages
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
};
|
|
||||||
networking.hostName = deskCfg.hostName; # Define your hostname.
|
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
||||||
networking.wireless.iwd.enable = true;
|
|
||||||
|
|
||||||
time.timeZone = timeZone;
|
|
||||||
|
|
||||||
main_user = {
|
|
||||||
enable = true;
|
|
||||||
userName = deskCfg.userName;
|
|
||||||
fullName = deskCfg.fullName;
|
|
||||||
isDesktopUser = true;
|
|
||||||
extraGroups = [ "corectrl" "dialout" "docker" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
power_manager = {
|
|
||||||
enable = true;
|
|
||||||
backend = "power-profiles-daemon"; # Required for Noctalia power profile widget
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable Noctalia shell system services
|
|
||||||
noctaliaSystem.enable = true;
|
|
||||||
|
|
||||||
niriwm = {
|
|
||||||
enable = true;
|
|
||||||
useNonFree = true;
|
|
||||||
user = deskCfg.userName;
|
|
||||||
systemPackages = with pkgs; [
|
|
||||||
libreoffice
|
|
||||||
rpi-imager
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
cryptsetup
|
|
||||||
cage
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.niri.enable = true;
|
|
||||||
# For electron apps in wayland
|
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
|
||||||
|
|
||||||
# auto write colemak-dh to keyboard ec
|
|
||||||
colemakEc.enable = true;
|
|
||||||
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = rec {
|
|
||||||
initial_session = {
|
|
||||||
command = "${pkgs.niri}/bin/niri-session";
|
|
||||||
user = "nate";
|
|
||||||
};
|
|
||||||
default_session = initial_session;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# For yubioath desktop
|
|
||||||
services.pcscd.enable = true;
|
|
||||||
system.stateVersion = "25.05"; # Did you read the comment?
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,224 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""
|
|
||||||
Dump the full Framework EC keyboard matrix.
|
|
||||||
Reads all matrix positions and prints those with non-zero scancodes.
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
sudo python3 dump-matrix.py
|
|
||||||
# or on NixOS:
|
|
||||||
# nix-shell -p python3 --run 'sudo python3 dump-matrix.py'
|
|
||||||
"""
|
|
||||||
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
# PS/2 Scan Code Set 2 -> Key name mapping
|
|
||||||
SCANCODE_NAMES = {
|
|
||||||
0x00: "(none)",
|
|
||||||
0x01: "F9",
|
|
||||||
0x03: "F5",
|
|
||||||
0x04: "F3",
|
|
||||||
0x05: "F1",
|
|
||||||
0x06: "F2",
|
|
||||||
0x07: "F12",
|
|
||||||
0x09: "F10",
|
|
||||||
0x0A: "F8",
|
|
||||||
0x0B: "F6",
|
|
||||||
0x0C: "F4",
|
|
||||||
0x0D: "Tab",
|
|
||||||
0x0E: "`",
|
|
||||||
0x11: "L Alt",
|
|
||||||
0x12: "L Shift",
|
|
||||||
0x14: "L Ctrl",
|
|
||||||
0x15: "q",
|
|
||||||
0x16: "1",
|
|
||||||
0x1A: "z",
|
|
||||||
0x1B: "s",
|
|
||||||
0x1C: "a",
|
|
||||||
0x1D: "w",
|
|
||||||
0x1E: "2",
|
|
||||||
0x21: "c",
|
|
||||||
0x22: "x",
|
|
||||||
0x23: "d",
|
|
||||||
0x24: "e",
|
|
||||||
0x25: "4",
|
|
||||||
0x26: "3",
|
|
||||||
0x29: "Space",
|
|
||||||
0x2A: "v",
|
|
||||||
0x2B: "f",
|
|
||||||
0x2C: "t",
|
|
||||||
0x2D: "r",
|
|
||||||
0x2E: "5",
|
|
||||||
0x31: "n",
|
|
||||||
0x32: "b",
|
|
||||||
0x33: "h",
|
|
||||||
0x34: "g",
|
|
||||||
0x35: "y",
|
|
||||||
0x36: "6",
|
|
||||||
0x3A: "m",
|
|
||||||
0x3B: "j",
|
|
||||||
0x3C: "u",
|
|
||||||
0x3D: "7",
|
|
||||||
0x3E: "8",
|
|
||||||
0x41: ",",
|
|
||||||
0x42: "k",
|
|
||||||
0x43: "i",
|
|
||||||
0x44: "o",
|
|
||||||
0x45: "0",
|
|
||||||
0x46: "9",
|
|
||||||
0x49: ".",
|
|
||||||
0x4A: "/",
|
|
||||||
0x4B: "l",
|
|
||||||
0x4C: ";",
|
|
||||||
0x4D: "p",
|
|
||||||
0x4E: "-",
|
|
||||||
0x52: "'",
|
|
||||||
0x54: "[",
|
|
||||||
0x55: "=",
|
|
||||||
0x58: "Caps Lock",
|
|
||||||
0x59: "R Shift",
|
|
||||||
0x5A: "Enter",
|
|
||||||
0x5B: "]",
|
|
||||||
0x5D: "\\",
|
|
||||||
0x66: "Backspace",
|
|
||||||
0x69: "KP 1",
|
|
||||||
0x6B: "KP 4",
|
|
||||||
0x6C: "KP 7",
|
|
||||||
0x70: "KP 0",
|
|
||||||
0x71: "KP .",
|
|
||||||
0x72: "KP 2",
|
|
||||||
0x73: "KP 5",
|
|
||||||
0x74: "KP 6",
|
|
||||||
0x75: "KP 8",
|
|
||||||
0x76: "Esc",
|
|
||||||
0x77: "Num Lock",
|
|
||||||
0x78: "F11",
|
|
||||||
0x79: "KP +",
|
|
||||||
0x7A: "KP 3",
|
|
||||||
0x7B: "KP -",
|
|
||||||
0x7C: "KP *",
|
|
||||||
0x7D: "KP 9",
|
|
||||||
0x7E: "Scroll Lock",
|
|
||||||
0x83: "F7",
|
|
||||||
0xFF: "Fn",
|
|
||||||
# Extended keys (E0 prefix) - stored as 16-bit values
|
|
||||||
0xE011: "R Alt",
|
|
||||||
0xE014: "R Ctrl",
|
|
||||||
0xE01F: "L GUI",
|
|
||||||
0xE027: "R GUI",
|
|
||||||
0xE02F: "Apps/Menu",
|
|
||||||
0xE04A: "KP /",
|
|
||||||
0xE05A: "KP Enter",
|
|
||||||
0xE069: "End",
|
|
||||||
0xE06B: "Left Arrow",
|
|
||||||
0xE06C: "Home",
|
|
||||||
0xE070: "Insert",
|
|
||||||
0xE071: "Delete",
|
|
||||||
0xE072: "Down Arrow",
|
|
||||||
0xE074: "Right Arrow",
|
|
||||||
0xE075: "Up Arrow",
|
|
||||||
0xE07A: "Page Down",
|
|
||||||
0xE07D: "Page Up",
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def get_scancode_name(code):
|
|
||||||
if code in SCANCODE_NAMES:
|
|
||||||
return SCANCODE_NAMES[code]
|
|
||||||
return f"unknown"
|
|
||||||
|
|
||||||
|
|
||||||
def read_matrix_position(row, col):
|
|
||||||
"""Read the scancode at a given matrix position. Returns the 16-bit scancode."""
|
|
||||||
col_hex = format(col, 'x')
|
|
||||||
cmd = f"ectool raw 0x3E0C d1,d0,b{row:x},b{col_hex},w0"
|
|
||||||
try:
|
|
||||||
result = subprocess.run(
|
|
||||||
cmd.split(),
|
|
||||||
capture_output=True, text=True, timeout=5
|
|
||||||
)
|
|
||||||
output = result.stdout + result.stderr
|
|
||||||
# Parse the response bytes. Look for the "Read XXX bytes" line and
|
|
||||||
# then parse the hex dump that follows.
|
|
||||||
lines = output.strip().split('\n')
|
|
||||||
response_bytes = []
|
|
||||||
reading = False
|
|
||||||
for line in lines:
|
|
||||||
if "Read" in line and "bytes" in line:
|
|
||||||
reading = True
|
|
||||||
continue
|
|
||||||
if reading and '|' in line:
|
|
||||||
# Extract hex bytes before the |
|
|
||||||
hex_part = line.split('|')[0].strip()
|
|
||||||
for byte_str in hex_part.split():
|
|
||||||
if len(byte_str) == 2:
|
|
||||||
try:
|
|
||||||
response_bytes.append(int(byte_str, 16))
|
|
||||||
except ValueError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Scancode is at bytes 10-11 (little-endian 16-bit)
|
|
||||||
if len(response_bytes) >= 12:
|
|
||||||
scancode = response_bytes[10] | (response_bytes[11] << 8)
|
|
||||||
return scancode
|
|
||||||
return None
|
|
||||||
except (subprocess.TimeoutExpired, Exception) as e:
|
|
||||||
print(f" Error reading ({row},{col:x}): {e}", file=sys.stderr)
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
if subprocess.os.geteuid() != 0:
|
|
||||||
print("This script must be run as root (sudo).", file=sys.stderr)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Scan a wide range: rows 0-15, cols 0-15
|
|
||||||
# This covers well beyond the assumed 8x12 matrix
|
|
||||||
max_row = 16
|
|
||||||
max_col = 16
|
|
||||||
|
|
||||||
print(f"Scanning matrix positions ({max_row} rows x {max_col} cols)...")
|
|
||||||
print(f"{'Pos':>8} {'Scancode':>10} Key")
|
|
||||||
print("-" * 40)
|
|
||||||
|
|
||||||
found = []
|
|
||||||
for row in range(max_row):
|
|
||||||
for col in range(max_col):
|
|
||||||
scancode = read_matrix_position(row, col)
|
|
||||||
if scancode is not None and scancode != 0:
|
|
||||||
name = get_scancode_name(scancode)
|
|
||||||
label = f"({row:x},{col:x})"
|
|
||||||
sc_str = f"{scancode:04x}" if scancode > 0xFF else f"{scancode:02x}"
|
|
||||||
print(f"{label:>8} {sc_str:>10} {name}")
|
|
||||||
found.append((row, col, scancode, name))
|
|
||||||
# Print progress on stderr
|
|
||||||
print(f"\r Scanning ({row:x},{col:x})... ", end='', file=sys.stderr, flush=True)
|
|
||||||
|
|
||||||
print("\r ", file=sys.stderr)
|
|
||||||
print("-" * 40)
|
|
||||||
print(f"Found {len(found)} mapped positions.")
|
|
||||||
|
|
||||||
# Print a visual grid
|
|
||||||
print("\n=== Matrix Grid ===")
|
|
||||||
print(f"{'':>6}", end='')
|
|
||||||
for col in range(max_col):
|
|
||||||
print(f" {col:x} ", end='')
|
|
||||||
print()
|
|
||||||
|
|
||||||
for row in range(max_row):
|
|
||||||
print(f" {row:x} ", end='')
|
|
||||||
for col in range(max_col):
|
|
||||||
match = None
|
|
||||||
for r, c, sc, name in found:
|
|
||||||
if r == row and c == col:
|
|
||||||
match = name
|
|
||||||
break
|
|
||||||
if match:
|
|
||||||
print(f" {match:>6}", end='')
|
|
||||||
else:
|
|
||||||
print(f" .", end='')
|
|
||||||
print()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2021 Kupke
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
# Framework Plymouth Theme
|
|
||||||
|
|
||||||
Theme with animated Framework logo. Inspiration from [KDE Splashscreen](https://github.com/NL-TCH/Frame.Work_SplashScreen-KDE).
|
|
||||||
|
|
||||||
Artwork credit to sniss https://community.frame.work/t/framework-fan-art/6626/39
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Copy the `framework` folder to your Plymouth theme folder (in Fedora, it's `/usr/share/plymouth/themes/`).
|
|
||||||
|
|
||||||
To see if it's in the right spot, you can run `plymouth-set-default-theme -l`
|
|
||||||
|
|
||||||
To set the theme, execute this command:
|
|
||||||
```
|
|
||||||
sudo plymouth-set-default-theme framework -R
|
|
||||||
```
|
|
||||||
|
|
||||||
## Distro Logo
|
|
||||||
|
|
||||||
If you want to add your distro logo to the boot animation screen, insert it as `watermark.png`
|
|
||||||
|
|
||||||
You should be able to reuse your distro's watermark image from one of your existing themes. Fedora image included for reference; just rename `fedora_watermark.png` to `watermark.png` and move it into the `framework` folder.
|
|
||||||
|
|
||||||
@ -1,95 +0,0 @@
|
|||||||
# Plymouth Scripting Reference
|
|
||||||
|
|
||||||
Quick reference for Plymouth theme scripting. Based on Charlie Brej's Plymouth Theme Guide.
|
|
||||||
|
|
||||||
## Refresh Rate
|
|
||||||
|
|
||||||
The `refresh_callback` function is called **50 times per second** (50 FPS) unless the system is busy.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
progress = 0;
|
|
||||||
fun refresh_callback() {
|
|
||||||
progress++;
|
|
||||||
// Called 50x/second - use progress to control animation timing
|
|
||||||
}
|
|
||||||
Plymouth.SetRefreshFunction(refresh_callback);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Animation Timing
|
|
||||||
|
|
||||||
To control animation speed, divide progress by a factor:
|
|
||||||
|
|
||||||
| Divisor | Frame Rate | 100-frame animation duration |
|
|
||||||
|---------|------------|------------------------------|
|
|
||||||
| 1 | 50 FPS | 2 seconds |
|
|
||||||
| 2 | 25 FPS | 4 seconds |
|
|
||||||
| 3 | ~17 FPS | 6 seconds |
|
|
||||||
| 5 | 10 FPS | 10 seconds |
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Advance 1 frame per refresh (fastest)
|
|
||||||
sprite.SetImage(images[progress % frame_count]);
|
|
||||||
|
|
||||||
// Advance 1 frame every N refreshes (slower)
|
|
||||||
sprite.SetImage(images[Math.Int(progress / N) % frame_count]);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Core Objects
|
|
||||||
|
|
||||||
### Image
|
|
||||||
```javascript
|
|
||||||
img = Image("file.png"); // Load PNG image
|
|
||||||
img.GetWidth(); // Get dimensions
|
|
||||||
img.GetHeight();
|
|
||||||
img.Scale(width, height); // Returns new scaled image
|
|
||||||
img.Rotate(radians); // Returns new rotated image
|
|
||||||
Image.Text("text", r, g, b); // Create text image (RGB 0-1)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Sprite
|
|
||||||
```javascript
|
|
||||||
sprite = Sprite(); // Empty sprite
|
|
||||||
sprite = Sprite(image); // Sprite with image
|
|
||||||
sprite.SetImage(image); // Change image
|
|
||||||
sprite.SetPosition(x, y, z); // Set position (z = layer)
|
|
||||||
sprite.SetX(x); sprite.SetY(y); sprite.SetZ(z);
|
|
||||||
sprite.SetOpacity(0.0 - 1.0); // 0 = invisible, 1 = solid
|
|
||||||
```
|
|
||||||
|
|
||||||
### Window
|
|
||||||
```javascript
|
|
||||||
Window.GetWidth(); // Screen width
|
|
||||||
Window.GetHeight(); // Screen height
|
|
||||||
Window.GetX(); // Window X offset
|
|
||||||
Window.GetY(); // Window Y offset
|
|
||||||
```
|
|
||||||
|
|
||||||
### Math
|
|
||||||
```javascript
|
|
||||||
Math.Int(n); // Floor to integer
|
|
||||||
Math.Sin(radians);
|
|
||||||
Math.Cos(radians);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Callbacks
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
Plymouth.SetRefreshFunction(callback); // Called 50x/second
|
|
||||||
Plymouth.SetDisplayPasswordFunction(callback); // LUKS password prompt
|
|
||||||
Plymouth.SetDisplayQuestionFunction(callback); // Question prompt
|
|
||||||
Plymouth.SetDisplayNormalFunction(callback); // Return to normal
|
|
||||||
Plymouth.SetMessageFunction(callback); // System messages
|
|
||||||
```
|
|
||||||
|
|
||||||
## Z-Index Guidelines
|
|
||||||
|
|
||||||
- Background: -10000
|
|
||||||
- Default: 0
|
|
||||||
- Password dialog: 10000 (don't exceed)
|
|
||||||
|
|
||||||
## Resources
|
|
||||||
|
|
||||||
- [Plymouth Theme Guide Part 1](http://brej.org/blog/?p=158) - Setup and viewing
|
|
||||||
- [Plymouth Theme Guide Part 2](http://brej.org/blog/?p=174) - Sprites and images
|
|
||||||
- [Plymouth Theme Guide Part 3](http://brej.org/blog/?p=197) - Animation
|
|
||||||
- [Plymouth Theme Guide Part 4](http://brej.org/blog/?p=238) - Advanced topics
|
|
||||||
|
Before Width: | Height: | Size: 616 B |
|
Before Width: | Height: | Size: 960 B |
|
Before Width: | Height: | Size: 8.8 KiB |
@ -1,8 +0,0 @@
|
|||||||
[Plymouth Theme]
|
|
||||||
Name=Framework
|
|
||||||
Description=Theme with animated Framework logo.
|
|
||||||
ModuleName=script
|
|
||||||
|
|
||||||
[script]
|
|
||||||
ImageDir=@IMAGEDIR@
|
|
||||||
ScriptFile=@IMAGEDIR@/framework.script
|
|
||||||
@ -1,112 +0,0 @@
|
|||||||
// Framework Plymouth Theme Script
|
|
||||||
// Adapted from adi1090x plymouth-themes template
|
|
||||||
// Original artwork credit: sniss https://community.frame.work/t/framework-fan-art/6626/39
|
|
||||||
// Scripting reference: ../SCRIPTING.md
|
|
||||||
|
|
||||||
// Screen size
|
|
||||||
screen.w = Window.GetWidth(0);
|
|
||||||
screen.h = Window.GetHeight(0);
|
|
||||||
screen.half.w = Window.GetWidth(0) / 2;
|
|
||||||
screen.half.h = Window.GetHeight(0) / 2;
|
|
||||||
|
|
||||||
// Question prompt
|
|
||||||
question = null;
|
|
||||||
answer = null;
|
|
||||||
|
|
||||||
// Message
|
|
||||||
message = null;
|
|
||||||
|
|
||||||
// Password prompt
|
|
||||||
bullets = null;
|
|
||||||
prompt = null;
|
|
||||||
bullet.image = Image.Text("*", 1, 1, 1);
|
|
||||||
|
|
||||||
// Flow
|
|
||||||
state.status = "play";
|
|
||||||
state.time = 0.0;
|
|
||||||
|
|
||||||
//--------------------------------- Refresh (Logo animation) --------------------------
|
|
||||||
|
|
||||||
// Frame count: 232 frames (0-231)
|
|
||||||
frame_count = 232;
|
|
||||||
|
|
||||||
// Load all animation frames
|
|
||||||
for (i = 0; i < frame_count; i++)
|
|
||||||
frame_image[i] = Image("progress-" + i + ".png");
|
|
||||||
frame_sprite = Sprite();
|
|
||||||
|
|
||||||
// Set image position (centered)
|
|
||||||
frame_sprite.SetX(Window.GetX() + (Window.GetWidth(0) / 2 - frame_image[0].GetWidth() / 2));
|
|
||||||
frame_sprite.SetY(Window.GetY() + (Window.GetHeight(0) / 2 - frame_image[0].GetHeight() / 2));
|
|
||||||
|
|
||||||
progress = 0;
|
|
||||||
|
|
||||||
fun refresh_callback ()
|
|
||||||
{
|
|
||||||
// At 50 FPS refresh rate, advance 1 frame per refresh for ~4.6s full animation
|
|
||||||
// (232 frames / 50 FPS = 4.64 seconds, ~3x faster than previous divisor of 3)
|
|
||||||
frame_sprite.SetImage(frame_image[progress % frame_count]);
|
|
||||||
progress++;
|
|
||||||
}
|
|
||||||
|
|
||||||
Plymouth.SetRefreshFunction (refresh_callback);
|
|
||||||
|
|
||||||
//------------------------------------- Question prompt -------------------------------
|
|
||||||
fun DisplayQuestionCallback(prompt, entry) {
|
|
||||||
question = null;
|
|
||||||
answer = null;
|
|
||||||
|
|
||||||
if (entry == "")
|
|
||||||
entry = "<answer>";
|
|
||||||
|
|
||||||
question.image = Image.Text(prompt, 1, 1, 1);
|
|
||||||
question.sprite = Sprite(question.image);
|
|
||||||
question.sprite.SetX(screen.half.w - question.image.GetWidth() / 2);
|
|
||||||
question.sprite.SetY(screen.h - 4 * question.image.GetHeight());
|
|
||||||
|
|
||||||
answer.image = Image.Text(entry, 1, 1, 1);
|
|
||||||
answer.sprite = Sprite(answer.image);
|
|
||||||
answer.sprite.SetX(screen.half.w - answer.image.GetWidth() / 2);
|
|
||||||
answer.sprite.SetY(screen.h - 2 * answer.image.GetHeight());
|
|
||||||
}
|
|
||||||
Plymouth.SetDisplayQuestionFunction(DisplayQuestionCallback);
|
|
||||||
|
|
||||||
//------------------------------------- Password prompt (LUKS) ------------------------
|
|
||||||
fun DisplayPasswordCallback(nil, bulletCount) {
|
|
||||||
state.status = "pause";
|
|
||||||
totalWidth = bulletCount * bullet.image.GetWidth();
|
|
||||||
startPos = screen.half.w - totalWidth / 2;
|
|
||||||
|
|
||||||
prompt.image = Image.Text("Enter Password", 1, 1, 1);
|
|
||||||
prompt.sprite = Sprite(prompt.image);
|
|
||||||
prompt.sprite.SetX(screen.half.w - prompt.image.GetWidth() / 2);
|
|
||||||
prompt.sprite.SetY(screen.h - 4 * prompt.image.GetHeight());
|
|
||||||
|
|
||||||
// Clear all bullets (user might hit backspace)
|
|
||||||
bullets = null;
|
|
||||||
for (i = 0; i < bulletCount; i++) {
|
|
||||||
bullets[i].sprite = Sprite(bullet.image);
|
|
||||||
bullets[i].sprite.SetX(startPos + i * bullet.image.GetWidth());
|
|
||||||
bullets[i].sprite.SetY(screen.h - 2 * bullet.image.GetHeight());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Plymouth.SetDisplayPasswordFunction(DisplayPasswordCallback);
|
|
||||||
|
|
||||||
//--------------------------- Normal display (unset all text) ----------------------
|
|
||||||
fun DisplayNormalCallback() {
|
|
||||||
state.status = "play";
|
|
||||||
bullets = null;
|
|
||||||
prompt = null;
|
|
||||||
message = null;
|
|
||||||
question = null;
|
|
||||||
answer = null;
|
|
||||||
}
|
|
||||||
Plymouth.SetDisplayNormalFunction(DisplayNormalCallback);
|
|
||||||
|
|
||||||
//----------------------------------------- Message --------------------------------
|
|
||||||
fun MessageCallback(text) {
|
|
||||||
message.image = Image.Text(text, 1, 1, 1);
|
|
||||||
message.sprite = Sprite(message.image);
|
|
||||||
message.sprite.SetPosition(screen.half.w - message.image.GetWidth() / 2, message.image.GetHeight());
|
|
||||||
}
|
|
||||||
Plymouth.SetMessageFunction(MessageCallback);
|
|
||||||
|
Before Width: | Height: | Size: 946 B |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |