Compare commits
8 Commits
962925e35b
...
e8f35bf283
| Author | SHA1 | Date | |
|---|---|---|---|
| e8f35bf283 | |||
| ec1e9a9b59 | |||
| f1fede7cd5 | |||
| 9d3ba797d7 | |||
| 39b190fcc3 | |||
| b8df78e935 | |||
| 425c429297 | |||
| c656cf81d2 |
@@ -1,16 +1,16 @@
|
||||
# HakaseOS
|
||||
|
||||
A modular, flake-based NixOS configuration for a single host (`hakase`). Heavily inspired by [OmarchyOS](https://omarchy.org/).
|
||||
A modular, flake-based NixOS configuration for my personal devices (`hakase` desktop and `macbook`). Heavily inspired by [OmarchyOS](https://omarchy.org/).
|
||||
|
||||
## Features
|
||||
|
||||
- **Hyprland** compositor with UWSM (systemd session management)
|
||||
- **Multi-Architecture Support**: Runs on x86_64 (Desktop) and aarch64 (Apple Silicon M1/M2)
|
||||
- **Matugen** for automatic system-wide theming from wallpaper colors
|
||||
- **Multi-monitor support** for intuitive desktop management
|
||||
- **Hardened Firefox** with custom bookmarks and new tab page
|
||||
- **Vim keybindings** throughout the system
|
||||
- **SOPS** for encrypted secrets management
|
||||
- **CachyOS kernel** via chaotic-nyx for performance optimizations
|
||||
- **CachyOS kernel** (Desktop) and **Asahi Linux** (MacBook) support
|
||||
|
||||
## 🚧 TODO
|
||||
- LUKS designed
|
||||
@@ -24,19 +24,19 @@ A modular, flake-based NixOS configuration for a single host (`hakase`). Heavily
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
.
|
||||
├── flake.nix # Flake inputs and NixOS configuration
|
||||
├── config.nix # Central configuration values
|
||||
├── flake.nix # Entry point defining hosts (hakase, macbook)
|
||||
├── config.nix # Central configuration values per host
|
||||
├── hosts/
|
||||
│ └── hakase/ # Host-specific configuration
|
||||
│ ├── hakase/ # Desktop configuration (x86_64)
|
||||
│ └── macbook/ # Laptop configuration (aarch64, Apple Silicon)
|
||||
├── modules/
|
||||
│ ├── nixos/ # System-level modules (boot, kernel, services)
|
||||
│ └── home/ # Home Manager modules
|
||||
├── home/ # Host-specific Home Manager entry points
|
||||
├── apps/ # Per-application configurations
|
||||
│ ├── hyprland/ # Hyprland window manager
|
||||
│ ├── waybar/ # Status bar
|
||||
@@ -53,14 +53,14 @@ A modular, flake-based NixOS configuration for a single host (`hakase`). Heavily
|
||||
|
||||
### Rebuild System
|
||||
|
||||
**Desktop (Hakase):**
|
||||
```bash
|
||||
sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase
|
||||
```
|
||||
|
||||
Or use the configured alias:
|
||||
|
||||
**MacBook (Asahi):**
|
||||
```bash
|
||||
update
|
||||
sudo nixos-rebuild switch --flake ~/.config/nixos/#macbook
|
||||
```
|
||||
|
||||
### Manage Secrets
|
||||
@@ -75,13 +75,11 @@ nix-shell -p sops --run "sops updatekeys secrets/secrets.yaml"
|
||||
|
||||
## Configuration
|
||||
|
||||
Central configuration values are defined in `config.nix`:
|
||||
Central configuration values are defined in `config.nix`, separated by host:
|
||||
|
||||
- `hakase` / `macbook` keys define host-specific overrides
|
||||
- `myConfig.nixos` - System settings (username, hostname, timezone)
|
||||
- `myConfig.git` - Git configuration
|
||||
- `myConfig.terminal` - Default terminal and aliases
|
||||
- `myConfig.hyprland` - Monitor configuration and wallpaper
|
||||
- `myConfig.firefox` - Bookmarks and new tab settings
|
||||
- `myConfig.hyprland` - Monitor configuration (Hz, Resolution) and wallpaper
|
||||
|
||||
## Flake Inputs
|
||||
|
||||
@@ -90,7 +88,8 @@ Central configuration values are defined in `config.nix`:
|
||||
| nixpkgs | NixOS unstable |
|
||||
| home-manager | User environment management |
|
||||
| hyprland | Wayland compositor |
|
||||
| chaotic | CachyOS kernel and packages |
|
||||
| chaotic | CachyOS kernel and packages (x86 only) |
|
||||
| apple-silicon | Asahi Linux support for NixOS (aarch64 only) |
|
||||
| sops-nix | Secrets management |
|
||||
| nixovim | Neovim configuration |
|
||||
| matugen | System-wide theming |
|
||||
@@ -99,4 +98,4 @@ Central configuration values are defined in `config.nix`:
|
||||
|
||||
## License
|
||||
|
||||
Personal configuration - use at your own discretion.
|
||||
Personal configuration - use at your own discretion.
|
||||
@@ -57,6 +57,7 @@
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
bitwarden
|
||||
tridactyl
|
||||
];
|
||||
|
||||
bookmarks = {
|
||||
|
||||
@@ -44,8 +44,6 @@
|
||||
# apps
|
||||
# "SUPER, SPACE, Open App Launcher, exec, nc -U $XDG_RUNTIME_DIR/walker/walker.sock"
|
||||
|
||||
"SUPER CTRL, I, Switch Wallpaper, exec, hakase-wallpaper-switch"
|
||||
|
||||
# TODO:
|
||||
# add text clipping from pictures
|
||||
# add screen recording
|
||||
|
||||
@@ -4,23 +4,6 @@
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
# --- POPUP RULES (Wifi, BT, Audio) ---
|
||||
"float, class:^(org\.hakase\.popup\..*)$"
|
||||
"animation slide right, class:^(org\.hakase\.popup\..*)$"
|
||||
"dimaround, class:^(org\.hakase\.popup\..*)$"
|
||||
# --- WALLPAPER PICKER ---
|
||||
"float, class:^(org\.hakase\.switch-wallpaper)$"
|
||||
"float, initialTitle:^(Wallpaper Selector)$"
|
||||
"center, class:^(org\.hakase\.switch-wallpaper)$"
|
||||
"center, initialTitle:^(Wallpaper Selector)$"
|
||||
"size 60% 60%, class:^(org\.hakase\.switch-wallpaper)$"
|
||||
"size 60% 60%, initialTitle:^(Wallpaper Selector)$"
|
||||
"dimaround, class:^(org\.hakase\.switch-wallpaper)$"
|
||||
"dimaround, initialTitle:^(Wallpaper Selector)$"
|
||||
|
||||
# --- CAVA RULES ---
|
||||
"workspace special:music silent, title:^(cava)$"
|
||||
"workspace special:music silent, initialTitle:^(cava)$"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -59,6 +59,22 @@ in {
|
||||
exec-once = [
|
||||
"uwsm app -- hyprpaper"
|
||||
];
|
||||
|
||||
bindd = [
|
||||
"SUPER CTRL, I, Switch Wallpaper, exec, hakase-wallpaper-switch"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
# --- WALLPAPER PICKER ---
|
||||
"float, class:^(org\.hakase\.switch-wallpaper)$"
|
||||
"float, initialTitle:^(Wallpaper Selector)$"
|
||||
"center, class:^(org\.hakase\.switch-wallpaper)$"
|
||||
"center, initialTitle:^(Wallpaper Selector)$"
|
||||
"size 60% 60%, class:^(org\.hakase\.switch-wallpaper)$"
|
||||
"size 60% 60%, initialTitle:^(Wallpaper Selector)$"
|
||||
"dimaround, class:^(org\.hakase\.switch-wallpaper)$"
|
||||
"dimaround, initialTitle:^(Wallpaper Selector)$"
|
||||
];
|
||||
};
|
||||
|
||||
services.hyprpaper = {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "hakase-plymouth-theme";
|
||||
version = "1.0";
|
||||
|
||||
src = ./themes/hakase;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/plymouth/themes/hakase
|
||||
cp * $out/share/plymouth/themes/hakase/
|
||||
|
||||
# Patch the .plymouth file to point to the store path
|
||||
sed -i "s@ImageDir=.*@ImageDir=$out/share/plymouth/themes/hakase@" $out/share/plymouth/themes/hakase/hakase.plymouth
|
||||
sed -i "s@ScriptFile=.*@ScriptFile=$out/share/plymouth/themes/hakase/hakase.script@" $out/share/plymouth/themes/hakase/hakase.plymouth
|
||||
'';
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 293 B |
Binary file not shown.
|
After Width: | Height: | Size: 694 B |
@@ -0,0 +1,11 @@
|
||||
[Plymouth Theme]
|
||||
Name=Omarchy
|
||||
Description=Omarchy splash screen.
|
||||
ModuleName=script
|
||||
|
||||
[script]
|
||||
ImageDir=/usr/share/plymouth/themes/omarchy
|
||||
ScriptFile=/usr/share/plymouth/themes/omarchy/omarchy.script
|
||||
ConsoleLogBackgroundColor=0x1a1b26
|
||||
MonospaceFont=Cantarell 11
|
||||
Font=Cantarell 11
|
||||
@@ -0,0 +1,257 @@
|
||||
# Omarchy Plymouth Theme Script
|
||||
|
||||
Window.SetBackgroundTopColor(0.101, 0.105, 0.149);
|
||||
Window.SetBackgroundBottomColor(0.101, 0.105, 0.149);
|
||||
|
||||
logo.image = Image("logo.png");
|
||||
logo.sprite = Sprite(logo.image);
|
||||
logo.sprite.SetX (Window.GetWidth() / 2 - logo.image.GetWidth() / 2);
|
||||
logo.sprite.SetY (Window.GetHeight() / 2 - logo.image.GetHeight() / 2);
|
||||
logo.sprite.SetOpacity (1);
|
||||
|
||||
# Use these to adjust the progress bar timing
|
||||
global.fake_progress_limit = 0.7; # Target percentage for fake progress (0.0 to 1.0)
|
||||
global.fake_progress_duration = 15.0; # Duration in seconds to reach limit
|
||||
|
||||
# Progress bar animation variables
|
||||
global.fake_progress = 0.0;
|
||||
global.real_progress = 0.0;
|
||||
global.fake_progress_active = 0; # 0 / 1 boolean
|
||||
global.animation_frame = 0;
|
||||
global.fake_progress_start_time = 0; # Track when fake progress started
|
||||
global.password_shown = 0; # Track if password dialog has been shown
|
||||
global.max_progress = 0.0; # Track the maximum progress reached to prevent backwards movement
|
||||
|
||||
fun refresh_callback ()
|
||||
{
|
||||
global.animation_frame++;
|
||||
|
||||
# Animate fake progress to limit over time with easing
|
||||
if (global.fake_progress_active == 1)
|
||||
{
|
||||
# Calculate elapsed time since start
|
||||
elapsed_time = global.animation_frame / 50.0; # Convert frames to seconds (50 FPS)
|
||||
|
||||
# Calculate linear progress ratio (0 to 1) based on time
|
||||
time_ratio = elapsed_time / global.fake_progress_duration;
|
||||
if (time_ratio > 1.0)
|
||||
time_ratio = 1.0;
|
||||
|
||||
# Apply easing curve: ease-out quadratic
|
||||
# Formula: 1 - (1 - x)^2
|
||||
eased_ratio = 1 - ((1 - time_ratio) * (1 - time_ratio));
|
||||
|
||||
# Calculate fake progress based on eased ratio
|
||||
global.fake_progress = eased_ratio * global.fake_progress_limit;
|
||||
|
||||
# Update progress bar with fake progress
|
||||
update_progress_bar(global.fake_progress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Plymouth.SetRefreshFunction (refresh_callback);
|
||||
|
||||
#----------------------------------------- Helper Functions --------------------------------
|
||||
|
||||
fun update_progress_bar(progress)
|
||||
{
|
||||
# Only update if progress is moving forward
|
||||
if (progress > global.max_progress)
|
||||
{
|
||||
global.max_progress = progress;
|
||||
width = Math.Int(progress_bar.original_image.GetWidth() * progress);
|
||||
if (width < 1) width = 1; # Ensure minimum width of 1 pixel
|
||||
|
||||
progress_bar.image = progress_bar.original_image.Scale(width, progress_bar.original_image.GetHeight());
|
||||
progress_bar.sprite.SetImage(progress_bar.image);
|
||||
}
|
||||
}
|
||||
|
||||
fun show_progress_bar()
|
||||
{
|
||||
progress_box.sprite.SetOpacity(1);
|
||||
progress_bar.sprite.SetOpacity(1);
|
||||
}
|
||||
|
||||
fun hide_progress_bar()
|
||||
{
|
||||
progress_box.sprite.SetOpacity(0);
|
||||
progress_bar.sprite.SetOpacity(0);
|
||||
}
|
||||
|
||||
fun show_password_dialog()
|
||||
{
|
||||
lock.sprite.SetOpacity(1);
|
||||
entry.sprite.SetOpacity(1);
|
||||
}
|
||||
|
||||
fun hide_password_dialog()
|
||||
{
|
||||
lock.sprite.SetOpacity(0);
|
||||
entry.sprite.SetOpacity(0);
|
||||
for (index = 0; bullet.sprites[index]; index++)
|
||||
bullet.sprites[index].SetOpacity(0);
|
||||
}
|
||||
|
||||
fun start_fake_progress()
|
||||
{
|
||||
# Don't reset if we already have progress
|
||||
if (global.max_progress == 0.0)
|
||||
{
|
||||
global.fake_progress = 0.0;
|
||||
global.real_progress = 0.0;
|
||||
update_progress_bar(0.0);
|
||||
}
|
||||
global.fake_progress_active = 1;
|
||||
global.animation_frame = 0;
|
||||
}
|
||||
|
||||
fun stop_fake_progress()
|
||||
{
|
||||
global.fake_progress_active = 0;
|
||||
}
|
||||
|
||||
#----------------------------------------- Dialogue --------------------------------
|
||||
|
||||
lock.image = Image("lock.png");
|
||||
entry.image = Image("entry.png");
|
||||
bullet.image = Image("bullet.png");
|
||||
|
||||
entry.sprite = Sprite(entry.image);
|
||||
entry.x = Window.GetWidth()/2 - entry.image.GetWidth() / 2;
|
||||
entry.y = logo.sprite.GetY() + logo.image.GetHeight() + 40;
|
||||
entry.sprite.SetPosition(entry.x, entry.y, 10001);
|
||||
entry.sprite.SetOpacity(0);
|
||||
|
||||
# Scale lock to be slightly shorter than entry field height
|
||||
# Original lock is 84x96, entry height determines scale
|
||||
lock_height = entry.image.GetHeight() * 0.8;
|
||||
lock_scale = lock_height / 96;
|
||||
lock_width = 84 * lock_scale;
|
||||
|
||||
scaled_lock = lock.image.Scale(lock_width, lock_height);
|
||||
lock.sprite = Sprite(scaled_lock);
|
||||
lock.x = entry.x - lock_width - 15;
|
||||
lock.y = entry.y + entry.image.GetHeight()/2 - lock_height/2;
|
||||
lock.sprite.SetPosition(lock.x, lock.y, 10001);
|
||||
lock.sprite.SetOpacity(0);
|
||||
|
||||
# Bullet array
|
||||
bullet.sprites = [];
|
||||
|
||||
fun display_normal_callback ()
|
||||
{
|
||||
hide_password_dialog();
|
||||
|
||||
# Get current mode
|
||||
mode = Plymouth.GetMode();
|
||||
|
||||
# Only show progress bar for boot and resume modes
|
||||
if ((mode == "boot" || mode == "resume") && global.password_shown == 1)
|
||||
{
|
||||
show_progress_bar();
|
||||
start_fake_progress();
|
||||
}
|
||||
}
|
||||
|
||||
fun display_password_callback (prompt, bullets)
|
||||
{
|
||||
global.password_shown = 1; # Mark that password dialog has been shown
|
||||
|
||||
# Reset progress when password dialog appears
|
||||
stop_fake_progress();
|
||||
hide_progress_bar();
|
||||
global.max_progress = 0.0;
|
||||
global.fake_progress = 0.0;
|
||||
global.real_progress = 0.0;
|
||||
show_password_dialog();
|
||||
|
||||
# Clear all bullets first
|
||||
for (index = 0; bullet.sprites[index]; index++)
|
||||
bullet.sprites[index].SetOpacity(0);
|
||||
|
||||
# Create and show bullets for current password (max 21)
|
||||
max_bullets = 21;
|
||||
bullets_to_show = bullets;
|
||||
if (bullets_to_show > max_bullets)
|
||||
bullets_to_show = max_bullets;
|
||||
|
||||
for (index = 0; index < bullets_to_show; index++)
|
||||
{
|
||||
if (!bullet.sprites[index])
|
||||
{
|
||||
# Scale bullet image to 7x7 pixels
|
||||
scaled_bullet = bullet.image.Scale(7, 7);
|
||||
bullet.sprites[index] = Sprite(scaled_bullet);
|
||||
bullet.x = entry.x + 20 + index * (7 + 5);
|
||||
bullet.y = entry.y + entry.image.GetHeight() / 2 - 3.5;
|
||||
bullet.sprites[index].SetPosition(bullet.x, bullet.y, 10002);
|
||||
}
|
||||
bullet.sprites[index].SetOpacity(1);
|
||||
}
|
||||
}
|
||||
|
||||
Plymouth.SetDisplayNormalFunction(display_normal_callback);
|
||||
Plymouth.SetDisplayPasswordFunction(display_password_callback);
|
||||
|
||||
#----------------------------------------- Progress Bar --------------------------------
|
||||
|
||||
progress_box.image = Image("progress_box.png");
|
||||
progress_box.sprite = Sprite(progress_box.image);
|
||||
|
||||
progress_box.x = Window.GetWidth() / 2 - progress_box.image.GetWidth() / 2;
|
||||
progress_box.y = entry.y + entry.image.GetHeight() / 2 - progress_box.image.GetHeight() / 2;
|
||||
progress_box.sprite.SetPosition(progress_box.x, progress_box.y, 0);
|
||||
progress_box.sprite.SetOpacity(0);
|
||||
|
||||
progress_bar.original_image = Image("progress_bar.png");
|
||||
progress_bar.sprite = Sprite();
|
||||
progress_bar.image = progress_bar.original_image.Scale(1, progress_bar.original_image.GetHeight());
|
||||
|
||||
progress_bar.x = Window.GetWidth() / 2 - progress_bar.original_image.GetWidth() / 2;
|
||||
progress_bar.y = progress_box.y + (progress_box.image.GetHeight() - progress_bar.original_image.GetHeight()) / 2;
|
||||
progress_bar.sprite.SetPosition(progress_bar.x, progress_bar.y, 1);
|
||||
progress_bar.sprite.SetOpacity(0);
|
||||
|
||||
fun progress_callback (duration, progress)
|
||||
{
|
||||
global.real_progress = progress;
|
||||
|
||||
# If real progress is above limit, stop fake progress and use real progress
|
||||
if (progress > global.fake_progress_limit)
|
||||
{
|
||||
stop_fake_progress();
|
||||
update_progress_bar(progress);
|
||||
}
|
||||
}
|
||||
|
||||
Plymouth.SetBootProgressFunction(progress_callback);
|
||||
|
||||
#----------------------------------------- Quit --------------------------------
|
||||
|
||||
fun quit_callback ()
|
||||
{
|
||||
logo.sprite.SetOpacity (1);
|
||||
}
|
||||
|
||||
Plymouth.SetQuitFunction(quit_callback);
|
||||
|
||||
#----------------------------------------- Message --------------------------------
|
||||
|
||||
message_sprite = Sprite();
|
||||
message_sprite.SetPosition(10, 10, 10000);
|
||||
|
||||
fun display_message_callback (text)
|
||||
{
|
||||
my_image = Image.Text(text, 1, 1, 1);
|
||||
message_sprite.SetImage(my_image);
|
||||
}
|
||||
|
||||
fun hide_message_callback (text)
|
||||
{
|
||||
message_sprite.SetOpacity(0);
|
||||
}
|
||||
|
||||
Plymouth.SetDisplayMessageFunction (display_message_callback);
|
||||
Plymouth.SetHideMessageFunction (hide_message_callback);
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 314 B |
Binary file not shown.
|
After Width: | Height: | Size: 314 B |
@@ -57,6 +57,13 @@ in {
|
||||
exec-once = [
|
||||
"uwsm app -- waybar"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
# --- POPUP RULES (Wifi, BT, Audio) ---
|
||||
"float, class:^(org\.hakase\.popup\..*)$"
|
||||
"animation slide right, class:^(org\.hakase\.popup\..*)$"
|
||||
"dimaround, class:^(org\.hakase\.popup\..*)$"
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
./style.nix
|
||||
|
||||
+84
-44
@@ -1,51 +1,91 @@
|
||||
{
|
||||
myConfig = {
|
||||
nixos = {
|
||||
username = "kenji";
|
||||
hostname = "hakase";
|
||||
timezone = "America/Chicago";
|
||||
};
|
||||
git = {
|
||||
username = "kenji";
|
||||
email = "kenji@hakase";
|
||||
defaultBranch = "master";
|
||||
};
|
||||
terminal = {
|
||||
default = "ghostty";
|
||||
aliases = {
|
||||
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase";
|
||||
hakase = {
|
||||
myConfig = {
|
||||
nixos = {
|
||||
username = "kenji";
|
||||
hostname = "hakase";
|
||||
timezone = "America/Chicago";
|
||||
};
|
||||
git = {
|
||||
username = "kenji";
|
||||
email = "kenji@hakase";
|
||||
defaultBranch = "master";
|
||||
};
|
||||
terminal = {
|
||||
default = "ghostty";
|
||||
aliases = {
|
||||
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#hakase";
|
||||
};
|
||||
};
|
||||
hyprland = {
|
||||
monitors = [
|
||||
"DP-1,highres@180,0x1080,1,bitdepth,10,cm,hdr,sdrbrightness,1.4,sdrsaturation,0.98,vrr,0"
|
||||
"DP-2, highres@165,760x0,1"
|
||||
"HDMI-A-1, highres@highrr@120, 3440x1440, 1.6"
|
||||
];
|
||||
|
||||
wallpaper = "firewatch.png";
|
||||
};
|
||||
firefox = {
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Home Manager";
|
||||
url = "https://mynixos.com/home-manager/options/programs";
|
||||
}
|
||||
{
|
||||
name = "YouTube";
|
||||
url = "https://youtube.com";
|
||||
}
|
||||
{
|
||||
name = "Nur";
|
||||
url = "https://nur.nix-community.org/repos";
|
||||
}
|
||||
];
|
||||
newtabpage = [
|
||||
{
|
||||
title = "Dashboard";
|
||||
url = "https://dash.sakamoto.dev";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
hyprland = {
|
||||
monitors = [
|
||||
"DP-1,highres@180,0x1080,1,bitdepth,10,cm,hdr,sdrbrightness,1.4,sdrsaturation,0.98,vrr,0"
|
||||
"DP-2, highres@165,760x0,1"
|
||||
"HDMI-A-1, highres@highrr@120, 3440x1440, 1.6"
|
||||
];
|
||||
};
|
||||
|
||||
wallpaper = "firewatch.png";
|
||||
};
|
||||
firefox = {
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Home Manager";
|
||||
url = "https://mynixos.com/home-manager/options/programs";
|
||||
}
|
||||
{
|
||||
name = "YouTube";
|
||||
url = "https://youtube.com";
|
||||
}
|
||||
{
|
||||
name = "Nur";
|
||||
url = "https://nur.nix-community.org/repos";
|
||||
}
|
||||
];
|
||||
newtabpage = [
|
||||
{
|
||||
title = "Dashboard";
|
||||
url = "https://dash.sakamoto.dev";
|
||||
}
|
||||
];
|
||||
macbook = {
|
||||
myConfig = {
|
||||
nixos = {
|
||||
username = "kenji";
|
||||
hostname = "macbook";
|
||||
timezone = "America/Chicago";
|
||||
};
|
||||
git = {
|
||||
username = "kenji";
|
||||
email = "kenji@macbook";
|
||||
defaultBranch = "master";
|
||||
};
|
||||
terminal = {
|
||||
default = "ghostty";
|
||||
aliases = {
|
||||
update = "sudo nixos-rebuild switch --flake ~/.config/nixos/#macbook";
|
||||
};
|
||||
};
|
||||
hyprland = {
|
||||
# M1 Pro/Max/Air screens are usually built-in eDP-1.
|
||||
# HiDPI scale 2.0 is safe for Retina.
|
||||
monitors = [
|
||||
"eDP-1, highres, auto, 2"
|
||||
];
|
||||
wallpaper = "firewatch.png";
|
||||
};
|
||||
firefox = {
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Asahi Linux";
|
||||
url = "https://asahilinux.org/";
|
||||
}
|
||||
];
|
||||
newtabpage = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Generated
+38
-1
@@ -1,5 +1,26 @@
|
||||
{
|
||||
"nodes": {
|
||||
"apple-silicon": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767637567,
|
||||
"narHash": "sha256-njwPfL5gM/KRGLJ29CbQ4nLBoEkNPMvEHBAAPOP8BZc=",
|
||||
"owner": "tpwrules",
|
||||
"repo": "nixos-apple-silicon",
|
||||
"rev": "530aa73aa9a21a078ff861b84767ae1d469715fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tpwrules",
|
||||
"repo": "nixos-apple-silicon",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"aquamarine": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
@@ -103,6 +124,21 @@
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1746162366,
|
||||
"narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1761588595,
|
||||
@@ -787,7 +823,7 @@
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
@@ -810,6 +846,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"apple-silicon": "apple-silicon",
|
||||
"chaotic": "chaotic",
|
||||
"elephant": "elephant",
|
||||
"home-manager": "home-manager_2",
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
url = "github:vicinaehq/vicinae";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
apple-silicon = {
|
||||
url = "github:tpwrules/nixos-apple-silicon";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
@@ -62,19 +66,18 @@
|
||||
chaotic,
|
||||
sops-nix,
|
||||
textfox,
|
||||
apple-silicon,
|
||||
...
|
||||
} @ inputs: let
|
||||
config = import ./config.nix;
|
||||
system = "x86_64-linux";
|
||||
args =
|
||||
{
|
||||
inherit inputs system;
|
||||
}
|
||||
// config;
|
||||
allConfig = import ./config.nix;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
hakase = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = args;
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
system = "x86_64-linux";
|
||||
} // allConfig.hakase;
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
sops-nix.nixosModules.sops
|
||||
@@ -82,6 +85,20 @@
|
||||
./hosts/hakase/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
macbook = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
system = "aarch64-linux";
|
||||
} // allConfig.macbook;
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
sops-nix.nixosModules.sops
|
||||
apple-silicon.nixosModules.apple-silicon-support
|
||||
./hosts/macbook/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../modules/home/terminal.nix
|
||||
../modules/home/apps.nix
|
||||
../modules/home/apps-optional.nix
|
||||
../modules/home/hyprland.nix
|
||||
../modules/home/waybar.nix
|
||||
../modules/home/theme.nix
|
||||
../modules/home/music.nix
|
||||
# No gaming.nix for MacBook
|
||||
inputs.walker.homeManagerModules.default
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.vicinae.homeManagerModules.default
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
};
|
||||
|
||||
home.stateVersion = "25.05";
|
||||
}
|
||||
@@ -8,5 +8,6 @@
|
||||
../../modules/nixos/default.nix
|
||||
../../modules/nixos/hyprland.nix
|
||||
../../modules/nixos/gaming.nix
|
||||
../../modules/nixos/amd.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
pkgs,
|
||||
myConfig,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/nixos/default.nix
|
||||
../../modules/nixos/hyprland.nix
|
||||
# No gaming.nix (Steam is x86 only)
|
||||
# No amd.nix
|
||||
];
|
||||
|
||||
# Apple Silicon specific hardware tweaks
|
||||
hardware.asahi = {
|
||||
# peripheralFirmwareDirectory = ./firmware; # If you have extracted firmware
|
||||
useExperimentalGPUDriver = true;
|
||||
experimentalGPUInstallMode = "replace";
|
||||
};
|
||||
|
||||
# Bootloader for Asahi is usually systemd-boot or grub, but asahi-module handles m1n1
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = false; # Asahi often prefers this false to avoid bricking nvram
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "usb_storage" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/00000000-0000-0000-0000-000000000000";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/0000-0000";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
||||
}
|
||||
+15
-6
@@ -17,14 +17,23 @@
|
||||
initrd = {
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"udev.log_priority=3"
|
||||
];
|
||||
|
||||
plymouth = {
|
||||
enable = true;
|
||||
# themePackages = [
|
||||
# (pkgs.adi1090x-plymouth-themes.override {
|
||||
# selected_themes = ["circle_hud"];
|
||||
# })
|
||||
# ];
|
||||
# theme = "circle_hud";
|
||||
themePackages = [
|
||||
(pkgs.callPackage ../../apps/plymouth/theme.nix {})
|
||||
];
|
||||
theme = "hakase";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./amd.nix
|
||||
./backlight.nix
|
||||
./boot.nix
|
||||
./fonts.nix
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = specialArgs;
|
||||
users.${myConfig.nixos.username} = import ../../home/hakase.nix;
|
||||
users.${myConfig.nixos.username} = import ../../home/${myConfig.nixos.hostname}.nix;
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
...
|
||||
}: {
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
mutableUsers = true;
|
||||
users = {
|
||||
${myConfig.nixos.username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "networkmanager" "input" "video"];
|
||||
hashedPasswordFile = config.sops.secrets.default_password.path; # FIXME: may not work!
|
||||
initialPassword = "password";
|
||||
useDefaultShell = true;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user