Here’s a complete NixOS + Home-Manager setup that gives you a “minimalist cyberpunk-Tokyo, ultra‐dark, flow‐state” desktop with Hyprland, Waybar, Alacritty, Mako, Ly, Fuzzel and automatic LazyVim on first rebuild.
Directory layout (place everything under /etc/nixos/):
code Copy code
/etc/nixos/
├── configuration.nix
├── hyprland.conf
├── waybar/
│ ├── config
│ └── style.css
├── mako/
│ └── config
└── home.nix
—————————————————————————————————————
/etc/nixos/configuration.nix
nix Copy code
{ config, pkgs, lib, ... }:
let
hyprlandConf = builtins.readFile ./hyprland.conf;
waybarConf = builtins.readFile ./waybar/config;
waybarCss = builtins.readFile ./waybar/style.css;
makoConf = builtins.readFile ./mako/config;
in
{
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
# --- boot & locale ---
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "cyberpunk-tokyo";
time.timeZone = "Asia/Tokyo";
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us";
# --- disable X, enable Wayland & Hyprland ---
services.xserver.enable = false;
services.wayland.enable = true;
services.hyprland = {
enable = true;
package = pkgs.hyprland;
extraConfig = hyprlandConf;
};
# --- Waybar ---
services.waybar = {
enable = true;
package = pkgs.waybar;
extraConfig = waybarConf;
extraCss = waybarCss;
};
# --- notifications via Mako ---
services.mako = {
enable = true;
extraConfig = makoConf;
};
# --- display manager: Ly ---
services.xserver.displayManager.ly.enable = true;
# --- audio: PipeWire ---
sound.enable = true;
hardware.pulseaudio.enable = false;
hardware.pipewire.enable = true;
hardware.enableAllFirmware = true;
# --- system packages (Fuzzel launcher) ---
environment.systemPackages = with pkgs; [
fuzzel
];
# --- Home Manager for user "alice" ---
services.home-manager.enable = true;
services.home-manager.users.alice = {
imports = [ ./home.nix ];
};
}
/etc/nixos/hyprland.conf
conf Copy code
# ~/.config/hypr/hyprland.conf
general {
# performance & style
dpi = 96
vsync = opengl
smooth_scroll = false
}
# keybinds
bind = SUPER + Return, exec alacritty
bind = SUPER + d, exec fuzzel
bind = SUPER + q, close
bind = SUPER + SHIFT + q, kill
bind = SUPER + TAB, dispatch workspace next
bind = SUPER + SHIFT + TAB, dispatch workspace prev
# windows
windowrule = floating, windowtype:popup
windowrule = floating, windowclass:Waybar
windowrule = floating, windowclass:Fuzzel
# cursor
cursor_inactive_timeout_ms = 2000
/etc/nixos/waybar/config
json5 Copy code
{
"layer": "top",
"position": "top",
"height": 30,
"modules-left": ["workspace", "window"],
"modules-center": ["clock"],
"modules-right": ["pulseaudio", "battery", "network"]
}
/etc/nixos/waybar/style.css
css Copy code
* {
font-family: "JetBrains Mono", monospace;
font-size: 12px;
background: #1a1b26;
color: #c0caf5;
}
#pulseaudio, #battery, #network {
padding: 0 10px;
}
#pulseaudio .icon { color: #ff1aff; }
#battery .icon { color: #00eaff; }
#network .icon { color: #7aa2f7; }
#clock {
color: #ebcb8b;
}
/etc/nixos/mako/config
conf Copy code
font Iosevka Term 10
timeout 5000
margin 10
padding 10
width 300
location top-right
max-icon-size 24
sort none
format "%a %s"
background-color = #1a1b26
text-color = #c0caf5
urgent-background-color = #ff1aff
/etc/nixos/home.nix (Home-Manager for user “alice”)
nix Copy code
{ config, pkgs, lib, ... }:
let
homeDir = "/home/alice";
in
{
home.username = "alice";
home.homeDirectory = homeDir;
# --- Launcher: Fuzzel (redundant, but gives per-user settings) ---
programs.fuzzel = {
enable = true;
package = pkgs.fuzzel;
settings = {
window = { width = 400; height = 200; };
position = "center";
colors = {
normal = "#1a1b26";
highlight = "#7aa2f7";
};
transparency = 0.03;
};
};
# --- Terminal: Alacritty ---
programs.alacritty = {
enable = true;
settings = {
font = {
normal = { family = "JetBrains Mono"; style = "Regular"; };
size = 12.0;
};
colors = {
primary = { background = "#1a1b26"; foreground = "#c0caf5"; };
normal = {
black = "#1a1b26";
red = "#f7768e";
green = "#9ece6a";
yellow = "#e0af68";
blue = "#7aa2f7";
magenta = "#bb9af7";
cyan = "#7dcfff";
white = "#a9b1d6";
};
bright = {
black = "#545c7e";
red = "#f7768e";
green = "#9ece6a";
yellow = "#e0af68";
blue = "#7aa2f7";
magenta = "#bb9af7";
cyan = "#7dcfff";
white = "#c0caf5";
};
};
window = { padding = { x = 8; y = 8; }; opacity = 0.90; };
draw_bold_text_with_bright_colors = false;
hide_cursor_when_typing = false;
};
};
# --- Neovim + LazyVim ---
programs.neovim = {
enable = true;
package = pkgs.neovim; # or neovimStable
};
# auto‐clone LazyVim on first `home-manager switch`
home.activation.lazyvim = {
text = lib.trimString ''
if [ ! -d "${homeDir}/.config/nvim" ]; then
git clone --depth 1 https://github.com/LazyVim/LazyVim.git \
${homeDir}/.config/nvim
fi
'';
deps = [ config.home.file."${homeDir}/.config/nvim" ];
};
# ensure hyprland is your session (Ly picks it up automatically)
xsession.windowManager.command = "hyprland";
}
—————————————————————————————————————
How to apply:
Copy all files into /etc/nixos/… as shown above.
Edit services.home-manager.users.alice (and home.username) to your actual user.
sudo nixos-rebuild switch
Log in via Ly, pick the “Hyprland” session.
On first login, Home-Manager will auto‐clone LazyVim into ~/.config/nvim.
Enjoy your ultra-dark, neon-accented, flow-state–ready Cyberpunk Tokyo desktop! 🚀✨