Compare commits
4 Commits
9d5a7994eb
...
99db96e449
| Author | SHA1 | Date | |
|---|---|---|---|
| 99db96e449 | |||
| fe51f1ac5b | |||
| a1089a7cac | |||
| 4d6d2b4d6f |
199
README.md
Normal file
199
README.md
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
# alo-cluster NixOS Configuration
|
||||||
|
|
||||||
|
This repository contains the NixOS configuration for a distributed cluster of machines managed as a unified flake.
|
||||||
|
|
||||||
|
## Architecture Overview
|
||||||
|
|
||||||
|
The configuration uses a **layered profile system** that enables code reuse while maintaining clear separation of concerns:
|
||||||
|
|
||||||
|
```
|
||||||
|
minimal-node # Base system (SSH, users, boot, impermanence)
|
||||||
|
↓
|
||||||
|
cluster-node # Cluster services (Consul, GlusterFS, CIFS, encryption)
|
||||||
|
↓
|
||||||
|
server-node # Server workloads (future: MySQL, PostgreSQL)
|
||||||
|
↓
|
||||||
|
workstation-node # Development tools (Docker, deploy-rs, emulation)
|
||||||
|
↓
|
||||||
|
desktop-node # GUI environment (Hyprland, Pipewire, fonts)
|
||||||
|
```
|
||||||
|
|
||||||
|
Each layer extends the previous one, inheriting all configurations. Hosts select a profile level that matches their role.
|
||||||
|
|
||||||
|
### Special Node Types
|
||||||
|
|
||||||
|
- **cloud-node**: Minimal + Consul only (cloud VPS deployments)
|
||||||
|
- **compute-node**: Cluster + Nomad worker (container orchestration)
|
||||||
|
|
||||||
|
## Directory Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
.
|
||||||
|
├── flake.nix # Main flake definition with all hosts
|
||||||
|
├── common/
|
||||||
|
│ ├── global/ # Global configs applied to all systems
|
||||||
|
│ │ ├── console.nix # Linux console colors (Solarized Dark)
|
||||||
|
│ │ ├── locale.nix # Timezone and locale settings
|
||||||
|
│ │ └── nix.nix # Nix daemon and flake configuration
|
||||||
|
│ ├── minimal-node.nix # Base layer: SSH, users, boot, impermanence
|
||||||
|
│ ├── cluster-node.nix # Cluster layer: Consul, GlusterFS, CIFS
|
||||||
|
│ ├── server-node.nix # Server layer: bare metal services (future)
|
||||||
|
│ ├── workstation-node.nix # Workstation layer: dev tools
|
||||||
|
│ ├── desktop-node.nix # Desktop layer: GUI environment
|
||||||
|
│ ├── cloud-node.nix # Cloud VPS profile
|
||||||
|
│ ├── compute-node.nix # Nomad worker profile
|
||||||
|
│ ├── base-node.nix # [DEPRECATED] Alias for cluster-node
|
||||||
|
│ └── [feature modules] # Individual feature configs
|
||||||
|
├── hosts/
|
||||||
|
│ ├── c1/ # Compute node 1
|
||||||
|
│ ├── c2/ # Compute node 2
|
||||||
|
│ ├── c3/ # Compute node 3
|
||||||
|
│ ├── alo-cloud-1/ # Cloud VPS
|
||||||
|
│ ├── chilly/ # Server node
|
||||||
|
│ ├── zippy/ # Workstation node
|
||||||
|
│ └── sparky/ # Desktop node
|
||||||
|
├── home/
|
||||||
|
│ ├── default.nix # Home-manager entry point
|
||||||
|
│ ├── profiles/ # Per-profile package sets
|
||||||
|
│ │ ├── server.nix
|
||||||
|
│ │ ├── workstation.nix
|
||||||
|
│ │ └── desktop.nix
|
||||||
|
│ ├── programs/ # Per-profile program configurations
|
||||||
|
│ │ ├── server.nix # CLI tools (fish, tmux, git, nixvim)
|
||||||
|
│ │ ├── workstation.nix # + dev tools
|
||||||
|
│ │ └── desktop.nix # + Hyprland, wofi
|
||||||
|
│ └── common/ # Shared home-manager configs
|
||||||
|
└── services/ # Nomad job definitions (not NixOS)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Profile System
|
||||||
|
|
||||||
|
### System Profiles
|
||||||
|
|
||||||
|
Profiles are automatically applied based on the `mkHost` call in `flake.nix`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
# Example: Desktop profile includes all layers up to desktop-node
|
||||||
|
mkHost "x86_64-linux" "desktop" [
|
||||||
|
./hosts/sparky
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
**Available profiles:**
|
||||||
|
- `"server"` → minimal + cluster + server
|
||||||
|
- `"workstation"` → minimal + cluster + server + workstation
|
||||||
|
- `"desktop"` → minimal + cluster + server + workstation + desktop
|
||||||
|
|
||||||
|
### Home-Manager Profiles
|
||||||
|
|
||||||
|
Home-manager automatically inherits the same profile as the system, configured in `home/default.nix`:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
imports = [ ./programs/${profile}.nix ];
|
||||||
|
home.packages = profilePkgs.${profile};
|
||||||
|
```
|
||||||
|
|
||||||
|
This ensures system and user configurations stay synchronized.
|
||||||
|
|
||||||
|
## Host Definitions
|
||||||
|
|
||||||
|
### Current Hosts
|
||||||
|
|
||||||
|
| Host | Profile | Role | Hardware |
|
||||||
|
|------|---------|------|----------|
|
||||||
|
| **c1, c2, c3** | compute-node | Nomad workers | Bare metal servers |
|
||||||
|
| **alo-cloud-1** | cloud-node | Consul server | Cloud VPS |
|
||||||
|
| **chilly** | server | Future bare metal services | Bare metal server |
|
||||||
|
| **zippy** | workstation | Development machine | Bare metal workstation |
|
||||||
|
| **sparky** | desktop | Desktop environment | Bare metal desktop |
|
||||||
|
|
||||||
|
### Adding a New Host
|
||||||
|
|
||||||
|
1. Create host directory:
|
||||||
|
```bash
|
||||||
|
mkdir -p hosts/newhost
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Create `hosts/newhost/default.nix`:
|
||||||
|
```nix
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../common/encrypted-btrfs-layout.nix # or your layout
|
||||||
|
../../common/global
|
||||||
|
./hardware.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "newhost";
|
||||||
|
# Host-specific configs here
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Generate hardware config:
|
||||||
|
```bash
|
||||||
|
nixos-generate-config --show-hardware-config > hosts/newhost/hardware.nix
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Add to `flake.nix`:
|
||||||
|
```nix
|
||||||
|
newhost = mkHost "x86_64-linux" "workstation" [
|
||||||
|
./hosts/newhost
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
### Using deploy-rs
|
||||||
|
|
||||||
|
Deploy to specific host:
|
||||||
|
```bash
|
||||||
|
deploy -s '.#sparky'
|
||||||
|
```
|
||||||
|
|
||||||
|
Deploy to all hosts:
|
||||||
|
```bash
|
||||||
|
deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
Deploy with detailed logging:
|
||||||
|
```bash
|
||||||
|
deploy -s '.#sparky' -- --show-trace
|
||||||
|
```
|
||||||
|
|
||||||
|
### Manual Deployment
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nixos-rebuild switch --flake .#sparky --target-host sparky
|
||||||
|
```
|
||||||
|
|
||||||
|
## Key Features
|
||||||
|
|
||||||
|
### Impermanence
|
||||||
|
All hosts use tmpfs root with selective persistence. Persistent paths configured per-host in `persistence.directories` and `persistence.files`.
|
||||||
|
|
||||||
|
### Unattended Encryption
|
||||||
|
Cluster nodes support automatic unlocking via Tailscale network using `common/unattended-encryption.nix`.
|
||||||
|
|
||||||
|
### Cluster Services
|
||||||
|
- **Consul**: Service discovery and distributed KV store
|
||||||
|
- **GlusterFS**: Distributed filesystem client
|
||||||
|
- **CIFS/Samba**: Network file sharing
|
||||||
|
|
||||||
|
### Desktop Environment (sparky only)
|
||||||
|
- **Hyprland**: Wayland compositor with CapsLock→Super remapping
|
||||||
|
- **wofi**: Application launcher (Super+D)
|
||||||
|
- **foot**: Terminal emulator (Super+Q)
|
||||||
|
- **greetd/tuigreet**: Login manager with console option
|
||||||
|
|
||||||
|
### Development Tools (workstation/desktop)
|
||||||
|
- Docker with rootless mode
|
||||||
|
- deploy-rs for NixOS deployments
|
||||||
|
- ARM emulation via binfmt
|
||||||
|
- Full NixVim configuration
|
||||||
|
|
||||||
|
## Future Work
|
||||||
|
|
||||||
|
- Migrate Nomad services (MySQL, PostgreSQL) to bare NixOS services under `server-node.nix`
|
||||||
|
- Add monitoring stack (Prometheus, Grafana)
|
||||||
|
- Document Tailscale key rotation process
|
||||||
|
- Add automated testing for configuration changes
|
||||||
@@ -1,13 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# DEPRECATED: Use cluster-node.nix for cluster nodes or minimal-node.nix for minimal systems
|
||||||
|
# This file is kept for backward compatibility with existing configurations
|
||||||
imports = [
|
imports = [
|
||||||
./cifs-client.nix
|
./cluster-node.nix
|
||||||
./consul.nix
|
|
||||||
./glusterfs-client.nix
|
|
||||||
./impermanence.nix
|
|
||||||
./sshd.nix
|
|
||||||
./user-ppetru.nix
|
|
||||||
./unattended-encryption.nix
|
|
||||||
./systemd-boot.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# Cloud node: Minimal system with Consul for cloud deployments
|
||||||
imports = [
|
imports = [
|
||||||
|
./minimal-node.nix
|
||||||
./consul.nix
|
./consul.nix
|
||||||
./impermanence.nix
|
|
||||||
./sshd.nix
|
|
||||||
./user-ppetru.nix
|
|
||||||
./systemd-boot.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
13
common/cluster-node.nix
Normal file
13
common/cluster-node.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Cluster node configuration
|
||||||
|
# Extends minimal-node with cluster-specific services (Consul, GlusterFS, CIFS)
|
||||||
|
# Used by: compute nodes (c1, c2, c3)
|
||||||
|
imports = [
|
||||||
|
./minimal-node.nix
|
||||||
|
./unattended-encryption.nix
|
||||||
|
./cifs-client.nix
|
||||||
|
./consul.nix
|
||||||
|
./glusterfs-client.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# Compute node: Cluster node with Nomad, GlusterFS server, and Syncthing
|
||||||
|
# Used by: c1, c2, c3
|
||||||
imports = [
|
imports = [
|
||||||
./base-node.nix
|
./cluster-node.nix
|
||||||
./glusterfs.nix
|
./glusterfs.nix
|
||||||
./nomad.nix
|
./nomad.nix
|
||||||
./syncthing-data.nix
|
./syncthing-data.nix
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./impermanence.nix # TODO: find a way to avoid needing this here
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.isContainer = true;
|
|
||||||
custom.impermanence.enable = false;
|
|
||||||
custom.tailscale.enable = false;
|
|
||||||
networking.useDHCP = lib.mkForce false;
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
# Desktop profile: Graphical desktop with Hyprland
|
||||||
|
# Extends workstation-node with desktop environment
|
||||||
|
imports = [
|
||||||
|
./workstation-node.nix
|
||||||
|
];
|
||||||
|
|
||||||
# Enable Hyprland (Wayland compositor)
|
# Enable Hyprland (Wayland compositor)
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -37,12 +43,15 @@
|
|||||||
fira-code-symbols
|
fira-code-symbols
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable GDM for login (can also use greetd or ly for lighter options)
|
# Enable greetd with tuigreet for login
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session = {
|
default_session = {
|
||||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland";
|
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session --sessions ${pkgs.writeText "sessions" ''
|
||||||
|
Hyprland:Hyprland
|
||||||
|
Console:fish
|
||||||
|
''}";
|
||||||
user = "greeter";
|
user = "greeter";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
44
common/global/console.nix
Normal file
44
common/global/console.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
# Configure Linux console (VT/framebuffer) colors to use Solarized Dark theme
|
||||||
|
# This affects the text-mode console accessed via Ctrl+Alt+F1-F6 or when booting without graphics
|
||||||
|
#
|
||||||
|
# Solarized Dark color scheme by Ethan Schoonover
|
||||||
|
# https://ethanschoonover.com/solarized/
|
||||||
|
#
|
||||||
|
# Color mapping:
|
||||||
|
# 0 = black -> base02 (#073642)
|
||||||
|
# 1 = red -> red (#dc322f)
|
||||||
|
# 2 = green -> green (#859900)
|
||||||
|
# 3 = yellow -> yellow (#b58900)
|
||||||
|
# 4 = blue -> blue (#268bd2)
|
||||||
|
# 5 = magenta -> magenta (#d33682)
|
||||||
|
# 6 = cyan -> cyan (#2aa198)
|
||||||
|
# 7 = white -> base2 (#eee8d5)
|
||||||
|
# 8 = br_black -> base03 (#002b36) - background
|
||||||
|
# 9 = br_red -> orange (#cb4b16)
|
||||||
|
# 10 = br_green -> base01 (#586e75)
|
||||||
|
# 11 = br_yellow -> base00 (#657b83)
|
||||||
|
# 12 = br_blue -> base0 (#839496)
|
||||||
|
# 13 = br_magenta -> violet (#6c71c4)
|
||||||
|
# 14 = br_cyan -> base1 (#93a1a1)
|
||||||
|
# 15 = br_white -> base3 (#fdf6e3)
|
||||||
|
|
||||||
|
console.colors = [
|
||||||
|
"073642" # 0: black (base02)
|
||||||
|
"dc322f" # 1: red
|
||||||
|
"859900" # 2: green
|
||||||
|
"b58900" # 3: yellow
|
||||||
|
"268bd2" # 4: blue
|
||||||
|
"d33682" # 5: magenta
|
||||||
|
"2aa198" # 6: cyan
|
||||||
|
"eee8d5" # 7: white (base2)
|
||||||
|
"002b36" # 8: bright black (base03 - Solarized Dark background)
|
||||||
|
"cb4b16" # 9: bright red (orange)
|
||||||
|
"586e75" # 10: bright green (base01)
|
||||||
|
"657b83" # 11: bright yellow (base00)
|
||||||
|
"839496" # 12: bright blue (base0)
|
||||||
|
"6c71c4" # 13: bright magenta (violet)
|
||||||
|
"93a1a1" # 14: bright cyan (base1)
|
||||||
|
"fdf6e3" # 15: bright white (base3)
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./backup.nix
|
./backup.nix
|
||||||
|
./console.nix
|
||||||
./cpufreq.nix
|
./cpufreq.nix
|
||||||
./flakes.nix
|
./flakes.nix
|
||||||
./kernel.nix
|
./kernel.nix
|
||||||
|
|||||||
12
common/minimal-node.nix
Normal file
12
common/minimal-node.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Minimal base configuration for all NixOS systems
|
||||||
|
# Provides: SSH access, user management, boot, impermanence
|
||||||
|
# Note: unattended-encryption is NOT included by default - add it explicitly where needed
|
||||||
|
imports = [
|
||||||
|
./impermanence.nix
|
||||||
|
./sshd.nix
|
||||||
|
./user-ppetru.nix
|
||||||
|
./systemd-boot.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
14
common/server-node.nix
Normal file
14
common/server-node.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Server profile: Cluster-enabled system for server deployments
|
||||||
|
# Extends cluster-node with server-specific configurations
|
||||||
|
# Future: Add bare NixOS services here (mysql, postgres, etc.) when migrating from Nomad
|
||||||
|
imports = [
|
||||||
|
./cluster-node.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Server-specific configurations can be added here
|
||||||
|
# Example (for future use):
|
||||||
|
# services.mysql.enable = lib.mkDefault false;
|
||||||
|
# services.postgresql.enable = lib.mkDefault false;
|
||||||
|
}
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
{ pkgs, inputs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
|
# Workstation profile: Development workstation configuration
|
||||||
|
# Extends server-node with development tools and emulation
|
||||||
|
imports = [
|
||||||
|
./server-node.nix
|
||||||
|
./unattended-encryption.nix
|
||||||
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
deploy-rs
|
deploy-rs
|
||||||
10
flake.nix
10
flake.nix
@@ -56,6 +56,14 @@
|
|||||||
|
|
||||||
mkHost =
|
mkHost =
|
||||||
system: profile: modules:
|
system: profile: modules:
|
||||||
|
let
|
||||||
|
# Auto-import profile-specific module based on profile parameter
|
||||||
|
profileModule =
|
||||||
|
if profile == "server" then ./common/server-node.nix
|
||||||
|
else if profile == "workstation" then ./common/workstation-node.nix
|
||||||
|
else if profile == "desktop" then ./common/desktop-node.nix
|
||||||
|
else null;
|
||||||
|
in
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
system = system;
|
system = system;
|
||||||
modules = [
|
modules = [
|
||||||
@@ -87,7 +95,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
] ++ modules;
|
] ++ nixpkgs.lib.optional (profileModule != null) profileModule ++ modules;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs self;
|
inherit inputs self;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{ pkgs, profile ? "cli", ... }:
|
{ pkgs, profile ? "cli", ... }:
|
||||||
{
|
{
|
||||||
|
imports = [ ./programs/${profile}.nix ];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = (import ./packages.nix { inherit pkgs profile; }).packages;
|
packages = (import ./packages.nix { inherit pkgs profile; }).packages;
|
||||||
stateVersion = "24.05"; # TODO: unify this with the references in flake.nix:inputs
|
stateVersion = "24.05"; # TODO: unify this with the references in flake.nix:inputs
|
||||||
@@ -42,6 +44,4 @@
|
|||||||
allowOther = true;
|
allowOther = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = import ./programs.nix { inherit pkgs; };
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ let
|
|||||||
desktopPkgs = with pkgs; [
|
desktopPkgs = with pkgs; [
|
||||||
unstable.chromium
|
unstable.chromium
|
||||||
foot # Wayland-native terminal emulator
|
foot # Wayland-native terminal emulator
|
||||||
|
wofi # Application launcher for Wayland
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
133
home/programs/desktop.nix
Normal file
133
home/programs/desktop.nix
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./workstation.nix ];
|
||||||
|
|
||||||
|
# Hyprland window manager configuration
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
# Remap CapsLock to Super (Mod4)
|
||||||
|
"$mod" = "SUPER";
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_options = "caps:super";
|
||||||
|
follow_mouse = 1;
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = false;
|
||||||
|
};
|
||||||
|
sensitivity = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = 5;
|
||||||
|
gaps_out = 10;
|
||||||
|
border_size = 2;
|
||||||
|
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||||
|
"col.inactive_border" = "rgba(595959aa)";
|
||||||
|
layout = "dwindle";
|
||||||
|
};
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 5;
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 3;
|
||||||
|
passes = 1;
|
||||||
|
};
|
||||||
|
drop_shadow = true;
|
||||||
|
shadow_range = 4;
|
||||||
|
shadow_render_power = 3;
|
||||||
|
"col.shadow" = "rgba(1a1a1aee)";
|
||||||
|
};
|
||||||
|
|
||||||
|
animations = {
|
||||||
|
enabled = true;
|
||||||
|
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||||
|
animation = [
|
||||||
|
"windows, 1, 7, myBezier"
|
||||||
|
"windowsOut, 1, 7, default, popin 80%"
|
||||||
|
"border, 1, 10, default"
|
||||||
|
"borderangle, 1, 8, default"
|
||||||
|
"fade, 1, 7, default"
|
||||||
|
"workspaces, 1, 6, default"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
dwindle = {
|
||||||
|
pseudotile = true;
|
||||||
|
preserve_split = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
master = {
|
||||||
|
new_status = "master";
|
||||||
|
};
|
||||||
|
|
||||||
|
gestures = {
|
||||||
|
workspace_swipe = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
force_default_wallpaper = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
bind = [
|
||||||
|
# Application launchers
|
||||||
|
"$mod, Q, exec, foot"
|
||||||
|
"$mod, D, exec, wofi --show drun"
|
||||||
|
"$mod SHIFT, D, exec, wofi --show run"
|
||||||
|
"$mod, C, killactive,"
|
||||||
|
"$mod SHIFT, E, exit,"
|
||||||
|
"$mod, V, togglefloating,"
|
||||||
|
"$mod, P, pseudo,"
|
||||||
|
"$mod, J, togglesplit,"
|
||||||
|
|
||||||
|
# Move focus with mod + arrow keys
|
||||||
|
"$mod, left, movefocus, l"
|
||||||
|
"$mod, right, movefocus, r"
|
||||||
|
"$mod, up, movefocus, u"
|
||||||
|
"$mod, down, movefocus, d"
|
||||||
|
|
||||||
|
# Move focus with mod + hjkl (vim-style)
|
||||||
|
"$mod, h, movefocus, l"
|
||||||
|
"$mod, l, movefocus, r"
|
||||||
|
"$mod, k, movefocus, u"
|
||||||
|
"$mod, j, movefocus, d"
|
||||||
|
|
||||||
|
# Switch workspaces with mod + [0-9]
|
||||||
|
"$mod, 1, workspace, 1"
|
||||||
|
"$mod, 2, workspace, 2"
|
||||||
|
"$mod, 3, workspace, 3"
|
||||||
|
"$mod, 4, workspace, 4"
|
||||||
|
"$mod, 5, workspace, 5"
|
||||||
|
"$mod, 6, workspace, 6"
|
||||||
|
"$mod, 7, workspace, 7"
|
||||||
|
"$mod, 8, workspace, 8"
|
||||||
|
"$mod, 9, workspace, 9"
|
||||||
|
"$mod, 0, workspace, 10"
|
||||||
|
|
||||||
|
# Move active window to a workspace with mod + SHIFT + [0-9]
|
||||||
|
"$mod SHIFT, 1, movetoworkspace, 1"
|
||||||
|
"$mod SHIFT, 2, movetoworkspace, 2"
|
||||||
|
"$mod SHIFT, 3, movetoworkspace, 3"
|
||||||
|
"$mod SHIFT, 4, movetoworkspace, 4"
|
||||||
|
"$mod SHIFT, 5, movetoworkspace, 5"
|
||||||
|
"$mod SHIFT, 6, movetoworkspace, 6"
|
||||||
|
"$mod SHIFT, 7, movetoworkspace, 7"
|
||||||
|
"$mod SHIFT, 8, movetoworkspace, 8"
|
||||||
|
"$mod SHIFT, 9, movetoworkspace, 9"
|
||||||
|
"$mod SHIFT, 0, movetoworkspace, 10"
|
||||||
|
|
||||||
|
# Scroll through existing workspaces with mod + scroll
|
||||||
|
"$mod, mouse_down, workspace, e+1"
|
||||||
|
"$mod, mouse_up, workspace, e-1"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Mouse bindings
|
||||||
|
bindm = [
|
||||||
|
"$mod, mouse:272, movewindow"
|
||||||
|
"$mod, mouse:273, resizewindow"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
programs = {
|
||||||
dircolors = {
|
dircolors = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
@@ -399,4 +400,5 @@
|
|||||||
set -g set-titles on
|
set -g set-titles on
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
6
home/programs/workstation.nix
Normal file
6
home/programs/workstation.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./server.nix ];
|
||||||
|
|
||||||
|
# Add workstation-specific programs here if needed in the future
|
||||||
|
}
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../../common/encrypted-btrfs-layout.nix
|
../../common/encrypted-btrfs-layout.nix
|
||||||
../../common/global
|
../../common/global
|
||||||
../../common/base-node.nix
|
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../../common/encrypted-btrfs-layout.nix
|
../../common/encrypted-btrfs-layout.nix
|
||||||
../../common/global
|
../../common/global
|
||||||
../../common/base-node.nix
|
|
||||||
../../common/dev-node.nix
|
|
||||||
../../common/desktop-node.nix
|
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
../../common/encrypted-btrfs-layout.nix
|
../../common/encrypted-btrfs-layout.nix
|
||||||
../../common/global
|
../../common/global
|
||||||
../../common/compute-node.nix
|
../../common/compute-node.nix
|
||||||
../../common/dev-node.nix
|
|
||||||
# ../../common/ethereum.nix
|
# ../../common/ethereum.nix
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user